diff -r 5bed45b14781 -r b5d63d5fc252 smf/smfservermodule/smfserver/server/smfserver.cpp --- a/smf/smfservermodule/smfserver/server/smfserver.cpp Fri May 21 16:50:44 2010 +0100 +++ b/smf/smfservermodule/smfserver/server/smfserver.cpp Mon Jun 07 11:43:45 2010 +0100 @@ -34,11 +34,19 @@ #include "smfserversymbian_p.h" #else #include "smfserverqt_p.h" +#include "smfserverqtsession.h" #endif -SmfServer::SmfServer(QObject* parent): QObject(parent) +SmfServer::SmfServer(QObject* parent) + : QObject(parent) { } + +SmfServer::~SmfServer() +{ + delete m_SmfServerPrivate; +} + bool SmfServer::startServer() { bool success = false; @@ -83,7 +91,7 @@ return success; } #else - m_SmfServerPrivate = new SmfServerQt(); + m_SmfServerPrivate = new SmfServerQt(this); success = m_SmfServerPrivate->start(); if (!success) { @@ -104,7 +112,7 @@ * @param clientID some unique client process ID, SID for symbian platform * TODO:-How to get the pid for rest of the platforms? * @return true if client is already athorized, else false - * + * */ bool SmfServer::isClientAuthorized(SmfClientAuthID clientID) { @@ -115,7 +123,7 @@ /** * This API is called by the private impl when isClientAuthorized returns false * @param clientID client Id (SID for symbian platform), provided by the private impl - * Note:- The session(and in turn the client) will be blocked untill authorization completes. + * Note:- The session(and in turn the client) will be blocked untill authorization completes. */ void SmfServer::authorizeClient(SmfClientAuthID clientID) { @@ -130,7 +138,7 @@ * @param pluginIDMap Map of plugins who implement this interface and corresponding provider, * this is returned to the private impl * It calls PM to get the list. Note:- PM may return SmfProviderBase which is superset of SmfProvider. - * TODO:- session should store this map for future ref? + * TODO:- session should store this map for future ref? */ void SmfServer::getPlugins(SmfInterfaceID interfaceID, QMap& pluginIDMap) { @@ -173,7 +181,7 @@ * @param requestID Request id (corresponds to the key of the mapmaintained by SmfServerSymbian). * @param pluginID PluginID, provided by the session * @param interfaceID InterfaceID provided by session - * @requestTypeID Request Opcode, provided by session + * @requestTypeID Request Opcode, provided by session */ void SmfServer::getRequestedData(int requestID,SmfPluginID pluginID,SmfInterfaceID interfaceID, SmfRequestTypeID requestTypeID,QByteArray dataForPlugin) { @@ -303,7 +311,7 @@ } /** * This slot is invoked when CM finishes the authorization of the client. - * @param authID As it contains the session ptr, sever directly invokes the session's API to notify success + * @param authID As it contains the session ptr, sever directly invokes the session's API to notify success */ void SmfServer::clientAuthorizationFinished(bool success,SmfClientAuthID authID ) { @@ -317,7 +325,7 @@ * @param requestID The request id which is completed * @param parsedData Serialized data(as per request type) filled by PM * @param error Error occured - * TODO:- should use smf wide global errors instead + * TODO:- should use smf wide global errors instead */ void SmfServer::resultsAvailable(int requestID,QByteArray* parsedData,SmfError error) { @@ -345,7 +353,7 @@ } /** * Used by PM to get a list of tokens - * TODO:- cross check the params + * TODO:- cross check the params */ void SmfServer::getAuthenticationKeys(int pluginID,QStringList& keys,QStringList& urls) { @@ -360,7 +368,7 @@ /** * This is called when CMclient notifies client expiry. * @param type notification type, set of enums for future expansion - * @param id Plugin Id for which the authentication has expired + * @param id Plugin Id for which the authentication has expired */ void SmfServer::authenticationKeysExpired(NotificationType type,SmfPluginID id) {