--- a/javaextensions/wma/sms_cbs/pushplugin/sms/src.s60/smsserverconnection.cpp Wed Sep 15 12:05:25 2010 +0300
+++ b/javaextensions/wma/sms_cbs/pushplugin/sms/src.s60/smsserverconnection.cpp Wed Oct 13 14:23:59 2010 +0300
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
@@ -64,15 +64,13 @@
OS_EXPORT SmsServerConnection::~SmsServerConnection()
{
JELOG2(EWMA);
- // As per internal spec the message store should be removed only when
- // Application is uninstalled / UnRegistered from push
- removeDir(mMessageStoreDirName);
+
delete mMessage;
delete mFilterDes;
delete mOpenMonitor;
}
-OS_EXPORT void SmsServerConnection::open(ConnectionListener* aListener,
+void SmsServerConnection::open(ConnectionListener* aListener,
bool aIsAppLaunched)
{
JELOG2(EWMA);
@@ -148,7 +146,9 @@
java::runtime::ApplicationInfo::getInstance();
const std::wstring& root = appInf.getRootPath();
LOG1(EWMA, EInfo,"SMS Store path %S",root.c_str());
- error = createMessageStore(root + SMS_STORE_PATH);
+ // At this point mIsAppLaunched will be true if it not
+ // push connection.
+ error = createMessageStore(root + SMS_STORE_PATH , mIsAppLaunched);
mState = EReceivingMessageForNotify;
if (KErrNone == error)
{
@@ -165,10 +165,6 @@
__FUNCTION__,__LINE__);
}
mOpenMonitor->wait();
- if (mMessagesOnStore > 0)
- {
- mListener->msgArrived();
- }
mIsListening = true;
}
}
@@ -301,7 +297,7 @@
}
-OS_EXPORT void SmsServerConnection::close()
+void SmsServerConnection::close()
{
JELOG2(EWMA);
// the close and RunL are synchronized to make it SMP safe.