qthighway/xqserviceipc/xqserviceipcserver/xqserviceipcserver_apasymbianserver.cpp
changeset 27 6bfad47013df
parent 26 3d09643def13
equal deleted inserted replaced
26:3d09643def13 27:6bfad47013df
   127 	    quint32 id = XQServiceUtil::serviceIdFromName(normalizedServerName.toLatin1().data());
   127 	    quint32 id = XQServiceUtil::serviceIdFromName(normalizedServerName.toLatin1().data());
   128 	    
   128 	    
   129 	    delete stateNotifyKey;
   129 	    delete stateNotifyKey;
   130 	    
   130 	    
   131 	    RProcess currentProcess;
   131 	    RProcess currentProcess;
       
   132 	    CleanupClosePushL(currentProcess);
   132 	    const TSecureId secureId = currentProcess.SecureId();
   133 	    const TSecureId secureId = currentProcess.SecureId();
   133 	    
   134 	    
   134 	    stateNotifyKey = new XQPublishAndSubscribeSettingsKey(secureId.iId, id);
   135 	    stateNotifyKey = new XQPublishAndSubscribeSettingsKey(secureId.iId, id);
   135 
   136 
   136 	    XQPublishAndSubscribeUtils utils(settingsManager); 
   137 	    XQPublishAndSubscribeUtils utils(settingsManager); 
   137 	    if (!utils.defineProperty(*stateNotifyKey, XQSettingsManager::TypeInt) && (settingsManager.error() != XQSettingsManager::AlreadyExistsError)) {
   138 	    if (!utils.defineProperty(*stateNotifyKey, XQSettingsManager::TypeInt) && (settingsManager.error() != XQSettingsManager::AlreadyExistsError)) {
   138 				XQSERVICE_WARNING_PRINT("CApaSymbianServer::listen: property for service UID:%s could not be created. Notifications may not work.", stateNotifyKey->uid());
   139 				XQSERVICE_WARNING_PRINT("CApaSymbianServer::listen: property for service UID:%s could not be created. Notifications may not work.", stateNotifyKey->uid());
   139 	    } else {
   140 	    } else {
   140 			settingsManager.writeItemValue(*stateNotifyKey, static_cast<int>(XQApplicationManager::ServiceStarted));
   141 			settingsManager.writeItemValue(*stateNotifyKey, static_cast<int>(XQApplicationManager::ServiceStarted));
   141 		}
   142 		}
       
   143 	    CleanupStack::PopAndDestroy(&currentProcess);
   142 	}
   144 	}
   143     // Complete the server rendezvous that th client started
   145     // Complete the server rendezvous that th client started
   144     XQSERVICE_DEBUG_PRINT("CApaSymbianServer::Rendezvouz");
   146     XQSERVICE_DEBUG_PRINT("CApaSymbianServer::Rendezvouz");
   145     RProcess::Rendezvous(KErrNone);
   147     RProcess::Rendezvous(KErrNone);
   146     XQSERVICE_DEBUG_PRINT("CApaSymbianServer::Rendezvouz done");
   148     XQSERVICE_DEBUG_PRINT("CApaSymbianServer::Rendezvouz done");