diff -r 1cee9f1b95e0 -r a180113055cb smf/smfservermodule/smfserver/pluginmgr/smfpluginmanager.cpp --- a/smf/smfservermodule/smfserver/pluginmgr/smfpluginmanager.cpp Thu Sep 23 17:20:22 2010 +0530 +++ b/smf/smfservermodule/smfserver/pluginmgr/smfpluginmanager.cpp Thu Sep 23 17:43:31 2010 +0530 @@ -58,8 +58,6 @@ // Save the server instance m_server = aServer; - qDebug()<<"Inside SmfPluginManager::SmfPluginManager()"; - // initialize the file watcher to monitor plugin addition/upgradation/removal initializeFileWatcher ( ); @@ -373,12 +371,12 @@ /** * Method to cancel the service request - * @param aPluginId The plugin whose current operation is to be cancelled. + * @param aSessionID The session to be cancelled. * If the plugin is not loaded currently, this method just returns true. * @return Returns true if the plugin operation could be cancelled * else returns false. */ -bool SmfPluginManager::cancelRequest ( const QString& aPluginId ) +bool SmfPluginManager::cancelRequest ( const quint32& aSessionID ) { bool retValue = true; qDebug()<<"Inside SmfPluginManager::cancelRequest()"; @@ -386,7 +384,7 @@ // Get the plugin for which cancel is requested foreach(SmfWaitingPluginInfoStruc* iPluginInfo, m_waitingPluginHash.values()) { - if( 0 == iPluginInfo->iPluginId.compare(aPluginId)) + if( aSessionID == iPluginInfo->iSessionID ) { qDebug()<<"Plugin to be cancelled found in the waiting list"; @@ -463,8 +461,9 @@ qDebug()<<"Database could not be opened, returning !!!"; return false; } - +#ifdef DETAILEDDEBUGGING qDebug()<<"Database opened"; +#endif // Create a query to create the DB table for Plugin Manager (if it doesn't exists) QSqlQuery query; @@ -483,8 +482,9 @@ m_pluginDataBase.close(); return false; } - +#ifdef DETAILEDDEBUGGING qDebug()<<"Table created"; +#endif // Get the directory having the Qt plugin stubs QDir dir(QLibraryInfo::location(QLibraryInfo::PluginsPath)); @@ -492,28 +492,38 @@ // If Smf folder exists if(dir.cd("smf/plugin")) { +#ifdef DETAILEDDEBUGGING qDebug()<<"Smf/plugin folder exists"; +#endif // Get each interface folders names foreach(QString intfName, dir.entryList(QDir::AllDirs)) { dir.cd(intfName); +#ifdef DETAILEDDEBUGGING qDebug()<<"Interface name : "<(instance); if (plugin) { +#ifdef DETAILEDDEBUGGING qDebug()<<"SmfPluginBase found"; +#endif plugin->initialize(); // get the plugin id @@ -522,7 +532,9 @@ // get the interface implemented by the plugin QString intfImplemented = dir.dirName(); intfImplemented.prepend("org.symbian.smf.plugin."); +#ifdef DETAILEDDEBUGGING qDebug()<<"intfImplemented = "<getProviderInfo()->serviceName(); @@ -756,38 +768,50 @@ { // Http HEAD case QNetworkAccessManager::HeadOperation: +#ifdef DETAILEDDEBUGGING qDebug()<<"http::head Operation requested"; +#endif reply = m_transMngrUtil->head(aReqData.iNetworkRequest, aUrlList, sopCompliant); break; // Http GET case QNetworkAccessManager::GetOperation: +#ifdef DETAILEDDEBUGGING qDebug()<<"http::get Operation requested"; +#endif reply = m_transMngrUtil->get(aReqData.iNetworkRequest, aUrlList, sopCompliant); break; // Http PUT case QNetworkAccessManager::PutOperation: +#ifdef DETAILEDDEBUGGING qDebug()<<"http::put Operation requested"; +#endif reply = m_transMngrUtil->put(aReqData.iNetworkRequest, aReqData.iPostData->buffer(), aUrlList, sopCompliant); delete aReqData.iPostData; break; // Http POST case QNetworkAccessManager::PostOperation: +#ifdef DETAILEDDEBUGGING qDebug()<<"http::post Operation requested"; +#endif reply = m_transMngrUtil->post(aReqData.iNetworkRequest, aReqData.iPostData->buffer(), aUrlList, sopCompliant); delete aReqData.iPostData; break; // Http DELETE case QNetworkAccessManager::DeleteOperation: +#ifdef DETAILEDDEBUGGING qDebug()<<"http::delete Operation requested"; +#endif reply = m_transMngrUtil->deleteResource(aReqData.iNetworkRequest, aUrlList, sopCompliant); break; default: +#ifdef DETAILEDDEBUGGING qDebug()<<"unknown http Operation requested!!!"; +#endif aResult = SmfPMPluginUnknownHttpService; return; } @@ -1103,8 +1127,9 @@ qDebug()<<"Data base not opened, exiting getplugins()!!!"; return; } - +#ifdef DETAILEDDEBUGGING qDebug()<<"Data base opened"; +#endif // Query the database for all pluginIDs that implement the given interface QSqlQuery query(QString("SELECT pluginId, interfaceName, serviceProvider, description, " @@ -1112,7 +1137,9 @@ while(query.next()) { +#ifdef DETAILEDDEBUGGING qDebug()<<"Query is success"; +#endif SmfProvider prov; @@ -1124,22 +1151,30 @@ QStringList servicetypes; servicetypes.insert(0, query.value(1).toString()); prov.setSupportedInterfaces(servicetypes); +#ifdef DETAILEDDEBUGGING qDebug()<<" Its interface = "<