24 #include "logger.h" |
24 #include "logger.h" |
25 #include "fs_methodcall.h" |
25 #include "fs_methodcall.h" |
26 #include "s60commonutils.h" |
26 #include "s60commonutils.h" |
27 #include "cmmsmessageattachment.h" |
27 #include "cmmsmessageattachment.h" |
28 #include "cmmsplatformservices60impl.h" |
28 #include "cmmsplatformservices60impl.h" |
29 |
29 #include "mmsserverconnection.h" |
|
30 #include "mmsserverconnectionfactory.h" |
30 //constants |
31 //constants |
31 const TInt KMaxAppIDLength = 34; |
32 const TInt KMaxAppIDLength = 34; |
32 |
33 |
33 using namespace java::push; |
34 using namespace java::push; |
34 using namespace java::util; |
35 using namespace java::util; |
1267 { |
1268 { |
1268 mReceivedMsgArray->ResetAndDestroy(); |
1269 mReceivedMsgArray->ResetAndDestroy(); |
1269 delete mReceivedMsgArray; |
1270 delete mReceivedMsgArray; |
1270 mReceivedMsgArray = NULL; |
1271 mReceivedMsgArray = NULL; |
1271 } |
1272 } |
1272 // Unregistering from MMS Engine. |
1273 ServerConnectionFactory* serverConnectionFactory = 0; |
1273 LOG(EWMA, EInfo , "CMMSPlatformServiceS60Impl::Close() Unregistering" |
1274 ServerConnection* serverConn = 0; |
1274 "from MMS Engine"); |
1275 serverConnectionFactory = &MmsServerConnectionFactory::getFactory(); |
1275 mMmsApplicationAdapter->UnregisterL(*mServerApplicationId); |
1276 std::wstring Uri(L"mms://:"); |
|
1277 Uri += std::wstring((wchar_t*)mServerApplicationId->Ptr(),mServerApplicationId->Length()); |
|
1278 serverConn = serverConnectionFactory->getPushConnection(Uri); |
|
1279 if (0 == serverConn) |
|
1280 { |
|
1281 // Unregistering from MMS Engine. |
|
1282 LOG(EWMA, EInfo , "CMMSPlatformServiceS60Impl::Close() Unregistering" |
|
1283 "from MMS Engine"); |
|
1284 mMmsApplicationAdapter->UnregisterL(*mServerApplicationId); |
|
1285 } |
1276 if (mServerApplicationId) |
1286 if (mServerApplicationId) |
1277 { |
1287 { |
1278 delete mServerApplicationId; |
1288 delete mServerApplicationId; |
1279 mServerApplicationId = NULL; |
1289 mServerApplicationId = NULL; |
1280 } |
1290 } |