changes for SmfPost, SmfCredentialMgr, PLuginManager, SmfServer. Adding Sample Plugins and Sample Client Applications.
authorcgandhi <chandradeep.gandhi@sasken.com>
Wed, 23 Jun 2010 19:51:49 +0530
changeset 14 a469c0e6e7fb
parent 13 b5d63d5fc252
child 15 9b00ca3cc206
changes for SmfPost, SmfCredentialMgr, PLuginManager, SmfServer. Adding Sample Plugins and Sample Client Applications.
.hgignore
ReadMe.txt
doc/html.rar
example/AuthApp/AuthApp.cpp
example/AuthApp/AuthApp.h
example/AuthApp/AuthApp.loc
example/AuthApp/AuthApp.pkg
example/AuthApp/AuthApp.pro
example/AuthApp/AuthApp.rss
example/AuthApp/AuthApp.ui
example/AuthApp/AuthApp_installer.pkg
example/AuthApp/AuthApp_reg.rss
example/AuthApp/AuthApp_template.pkg
example/AuthApp/backup_registration.xml
example/AuthApp/inc/authAppConstants.h
example/AuthApp/inc/baseDialog.h
example/AuthApp/inc/errorCodes.h
example/AuthApp/inc/loginDialog.h
example/AuthApp/inc/requestSP.h
example/AuthApp/inc/sessionSP.h
example/AuthApp/inc/xmlParser.h
example/AuthApp/main.cpp
example/AuthApp/progressbar.cpp
example/AuthApp/progressbar.h
example/AuthApp/progressbar.ui
example/AuthApp/smfdemo.svg
example/AuthApp/src/baseDialog.cpp
example/AuthApp/src/loginDialog.cpp
example/AuthApp/src/requestSP.cpp
example/AuthApp/src/sessionSP.cpp
example/AuthApp/src/xmlParser.cpp
example/AuthApp/ui_AuthApp.h
example/AuthApp/ui_progressbar.h
example/example.pro
example/fbcontactfetcherplugin/fbcontactfetcherplugin.cpp
example/fbcontactfetcherplugin/fbcontactfetcherplugin.h
example/fbcontactfetcherplugin/fbcontactfetcherplugin.pro
example/fbcontactfetcherplugin/fbcontactfetcherplugin_installer.pkg
example/fbcontactfetcherplugin/fbcontactfetcherplugin_template.pkg
example/fbcontactfetcherplugin/plugin_commonU.def
example/fbcontactfetcherplugin/qmakepluginstubs/fbcontactfetcherplugin.qtplugin
example/fbpostproviderplugin/Makefile
example/fbpostproviderplugin/fbpostproviderplugin.cpp
example/fbpostproviderplugin/fbpostproviderplugin.h
example/fbpostproviderplugin/fbpostproviderplugin.pro
example/fbpostproviderplugin/fbpostproviderplugin_template.pkg
example/fbpostproviderplugin/plugin_commonU.def
example/fbpostproviderplugin/qmakepluginstubs/fbpostproviderplugin.qtplugin
example/flickrcontactfetcherplugin/Makefile
example/flickrcontactfetcherplugin/flickrcontactfetcherplugin.cpp
example/flickrcontactfetcherplugin/flickrcontactfetcherplugin.h
example/flickrcontactfetcherplugin/flickrcontactfetcherplugin.pro
example/flickrcontactfetcherplugin/flickrcontactfetcherplugin_template.pkg
example/flickrcontactfetcherplugin/plugin_commonU.def
example/flickrcontactfetcherplugin/qmakepluginstubs/flickrcontactfetcherplugin.qtplugin
example/smfclientapp/Makefile
example/smfclientapp/displaywidget.cpp
example/smfclientapp/main.cpp
example/smfclientapp/posttestui.cpp
example/smfclientapp/posttestui.h
example/smfclientapp/posttestui.ui
example/smfclientapp/smfclientapp.loc
example/smfclientapp/smfclientapp.pro
example/smfclientapp/smfclientapp.rss
example/smfclientapp/smfclientapp_reg.rss
example/smfclientapp/smfclientapp_template.pkg
example/smfclientapp/testscreen.cpp
example/smfclientapp/ui_displaywidget.h
example/smfclientapp/ui_posttestui.h
example/smfclientapp/ui_smfclientapp.h
smf/smf.pro
smf/smfcredentialmgr/doc/Doxyfile
smf/smfcredentialmgr/smfcredentialmgr.loc
smf/smfcredentialmgr/smfcredentialmgr.pro
smf/smfcredentialmgr/smfcredentialmgr.rss
smf/smfcredentialmgr/smfcredentialmgr_installer.pkg
smf/smfcredentialmgr/smfcredentialmgr_reg.rss
smf/smfcredentialmgr/smfcredentialmgr_template.pkg
smf/smfcredentialmgr/smfcredmgrclient/bwins/smfcredmgrclientu.def
smf/smfcredentialmgr/smfcredmgrclient/smfcredmgrclient.cpp
smf/smfcredentialmgr/smfcredmgrclient/smfcredmgrclient.h
smf/smfcredentialmgr/smfcredmgrclient/smfcredmgrclient.pro
smf/smfcredentialmgr/smfcredmgrclient/smfcredmgrclient_p.cpp
smf/smfcredentialmgr/smfcredmgrclient/smfcredmgrclient_p.h
smf/smfcredentialmgr/smfcredmgrclient/smfcredmgrclient_template.pkg
smf/smfcredentialmgr/smfcredmgrclient/smfcredmgrclientsession.cpp
smf/smfcredentialmgr/smfcredmgrclient/smfcredmgrclientsession.h
smf/smfcredentialmgr/smfcredmgrclient/smfcredmgrclientutil.cpp
smf/smfcredentialmgr/smfcredmgrclient/smfcredmgrclientutil.h
smf/smfcredentialmgr/smfcredmgrcommon/group/smfcredmgrcommon.mmp
smf/smfcredentialmgr/smfcredmgrcommon/inc/smfcredmgrclientdatastruct.h
smf/smfcredentialmgr/smfcredmgrcommon/inc/smfcredmgrclientglobal.h
smf/smfcredentialmgr/smfcredmgrcommon/inc/smfcredmgrcommon.h
smf/smfcredentialmgr/smfcredmgrcommon/inc/smfutils.h
smf/smfcredentialmgr/smfcredmgrcommon/smfcredmgrcommon.pro
smf/smfcredentialmgr/smfcredmgrcommon/src/smfcredmgrclientdatastruct.cpp
smf/smfcredentialmgr/smfcredmgrcommon/src/smfutils.cpp
smf/smfcredentialmgr/smfcredmgrserver/group/smfcredmgrserver.mmp
smf/smfcredentialmgr/smfcredmgrserver/inc/smfcredmgrdb.h
smf/smfcredentialmgr/smfcredmgrserver/inc/smfcredmgrdbuser.h
smf/smfcredentialmgr/smfcredmgrserver/inc/smfcredmgrserver.h
smf/smfcredentialmgr/smfcredmgrserver/inc/smfcredmgrserversession.h
smf/smfcredentialmgr/smfcredmgrserver/inc/smfkeystoremanager.h
smf/smfcredentialmgr/smfcredmgrserver/sis/SmfCredMgrServer_EKA2.pkg
smf/smfcredentialmgr/smfcredmgrserver/sis/SmfCredMgrServer_EKA2.sis
smf/smfcredentialmgr/smfcredmgrserver/sis/SmfCredMgrServer_EKA2.sisx
smf/smfcredentialmgr/smfcredmgrserver/smfcredmgrserver.pro
smf/smfcredentialmgr/smfcredmgrserver/src/smfcredmgrdb.cpp
smf/smfcredentialmgr/smfcredmgrserver/src/smfcredmgrdbuser.cpp
smf/smfcredentialmgr/smfcredmgrserver/src/smfcredmgrserver.cpp
smf/smfcredentialmgr/smfcredmgrserver/src/smfcredmgrserversession.cpp
smf/smfcredentialmgr/smfcredmgrserver/src/smfkeystoremanager.cpp
smf/smfservermodule/smfclient/bwins/smfclientu.def
smf/smfservermodule/smfclient/client/client.pri
smf/smfservermodule/smfclient/client/smfactivityfetcher.cpp
smf/smfservermodule/smfclient/client/smfactivityfetcher.h
smf/smfservermodule/smfclient/client/smfactivityfetcher_p.cpp
smf/smfservermodule/smfclient/client/smfactivityfetcher_p.h
smf/smfservermodule/smfclient/client/smfclient.h
smf/smfservermodule/smfclient/client/smfclient_p.cpp
smf/smfservermodule/smfclient/client/smfclient_p.h
smf/smfservermodule/smfclient/client/smfclientsymbian.cpp
smf/smfservermodule/smfclient/client/smfclientsymbian.h
smf/smfservermodule/smfclient/client/smfclientsymbiansession.h
smf/smfservermodule/smfclient/client/smfcontactfetcher.cpp
smf/smfservermodule/smfclient/client/smfcontactfetcher.h
smf/smfservermodule/smfclient/client/smfcontactfetcher_p.cpp
smf/smfservermodule/smfclient/client/smfcontactfetcher_p.h
smf/smfservermodule/smfclient/client/smfgallery.cpp
smf/smfservermodule/smfclient/client/smfgallery.h
smf/smfservermodule/smfclient/client/smfgallery_p.cpp
smf/smfservermodule/smfclient/client/smfgallery_p.h
smf/smfservermodule/smfclient/client/smfmusic.cpp
smf/smfservermodule/smfclient/client/smfmusic.h
smf/smfservermodule/smfclient/client/smfmusic_p.cpp
smf/smfservermodule/smfclient/client/smfmusic_p.h
smf/smfservermodule/smfclient/client/smfpostprovider.cpp
smf/smfservermodule/smfclient/client/smfpostprovider.h
smf/smfservermodule/smfclient/client/smfpostprovider_p.cpp
smf/smfservermodule/smfclient/client/smfpostprovider_p.h
smf/smfservermodule/smfclient/client/smfrelationmgr.cpp
smf/smfservermodule/smfclient/client/smfrelationmgr.h
smf/smfservermodule/smfclient/client/smfrelationmgr_p.cpp
smf/smfservermodule/smfclient/client/smfrelationmgr_p.h
smf/smfservermodule/smfclient/common/common.pri
smf/smfservermodule/smfclient/common/smfactions.cpp
smf/smfservermodule/smfclient/common/smfactions.h
smf/smfservermodule/smfclient/common/smfactions_p.h
smf/smfservermodule/smfclient/common/smfclientglobal.h
smf/smfservermodule/smfclient/common/smfcomment.h
smf/smfservermodule/smfclient/common/smfcontact.cpp
smf/smfservermodule/smfclient/common/smfcontact.h
smf/smfservermodule/smfclient/common/smfevent.h
smf/smfservermodule/smfclient/common/smfglobal.h
smf/smfservermodule/smfclient/common/smfgroup.cpp
smf/smfservermodule/smfclient/common/smfgroup.h
smf/smfservermodule/smfclient/common/smfmusicfingerprint.h
smf/smfservermodule/smfclient/common/smfmusicprofile.h
smf/smfservermodule/smfclient/common/smfmusicrating.cpp
smf/smfservermodule/smfclient/common/smfmusicrating.h
smf/smfservermodule/smfclient/common/smfobserver.h
smf/smfservermodule/smfclient/common/smfpicture.cpp
smf/smfservermodule/smfclient/common/smfpicture.h
smf/smfservermodule/smfclient/common/smfpicture_p.h
smf/smfservermodule/smfclient/common/smfpicturealbum.cpp
smf/smfservermodule/smfclient/common/smfpicturealbum.h
smf/smfservermodule/smfclient/common/smfpicturealbum_p.h
smf/smfservermodule/smfclient/common/smfplaylist.cpp
smf/smfservermodule/smfclient/common/smfplaylist.h
smf/smfservermodule/smfclient/common/smfplaylist_p.h
smf/smfservermodule/smfclient/common/smfpluginutil.cpp
smf/smfservermodule/smfclient/common/smfpluginutil.h
smf/smfservermodule/smfclient/common/smfpost.cpp
smf/smfservermodule/smfclient/common/smfpost.h
smf/smfservermodule/smfclient/common/smfpost_p.h
smf/smfservermodule/smfclient/common/smfprovider.cpp
smf/smfservermodule/smfclient/common/smfprovider.h
smf/smfservermodule/smfclient/common/smfsubtitle.h
smf/smfservermodule/smfclient/common/smfurl.cpp
smf/smfservermodule/smfclient/common/smfurl.h
smf/smfservermodule/smfclient/common/smfurl_p.h
smf/smfservermodule/smfclient/smfclient.pro
smf/smfservermodule/smfserver/datastoremgr/datastoremgr.pri
smf/smfservermodule/smfserver/datastoremgr/dsm.cpp
smf/smfservermodule/smfserver/datastoremgr/dsm.h
smf/smfservermodule/smfserver/main.cpp
smf/smfservermodule/smfserver/pluginmgr/smfpluginmanager.cpp
smf/smfservermodule/smfserver/pluginmgr/smfpluginmanager.h
smf/smfservermodule/smfserver/pluginmgr/smfpluginmanagerutil.cpp
smf/smfservermodule/smfserver/pluginmgr/smfpluginmanagerutil.h
smf/smfservermodule/smfserver/server/server.pri
smf/smfservermodule/smfserver/server/smfserver.cpp
smf/smfservermodule/smfserver/server/smfserver.h
smf/smfservermodule/smfserver/server/smfserverqt.cpp
smf/smfservermodule/smfserver/server/smfserverqt_p.h
smf/smfservermodule/smfserver/server/smfserversymbian.cpp
smf/smfservermodule/smfserver/server/smfserversymbian_p.h
smf/smfservermodule/smfserver/server/smfsettingshandler.cpp
smf/smfservermodule/smfserver/server/smfsettingshandler.h
smf/smfservermodule/smfserver/server/smfsettingshandler_symbian.cpp
smf/smfservermodule/smfserver/server/smfsettingshandler_symbian.h
smf/smfservermodule/smfserver/smfplugins/smfactivityfetcherplugin.h
smf/smfservermodule/smfserver/smfplugins/smfcontactfetcherplugin.h
smf/smfservermodule/smfserver/smfplugins/smfgalleryplugin.h
smf/smfservermodule/smfserver/smfplugins/smflyricsserviceplugin.h
smf/smfservermodule/smfserver/smfplugins/smfmusiceventsplugin.h
smf/smfservermodule/smfserver/smfplugins/smfmusicsearchplugin.h
smf/smfservermodule/smfserver/smfplugins/smfmusicserviceplugin.h
smf/smfservermodule/smfserver/smfplugins/smfplaylistserviceplugin.h
smf/smfservermodule/smfserver/smfplugins/smfpluginbase.h
smf/smfservermodule/smfserver/smfplugins/smfplugins.pri
smf/smfservermodule/smfserver/smfplugins/smfpostproviderplugin.h
smf/smfservermodule/smfserver/smfplugins/smfproviderbase.h
smf/smfservermodule/smfserver/smfserver.loc
smf/smfservermodule/smfserver/smfserver.pro
smf/smfservermodule/smfserver/smfserver.rss
smf/smfservermodule/smfserver/smfserver_reg.rss
smf/smfservermodule/smfserver/smfserver_template.pkg
smf/smfservermodule/smfserver/smfserverglobal.h
smf/smfservermodule/smfserver/transportmgr/smftransportmanager.cpp
smf/smfservermodule/smfserver/transportmgr/smftransportmanager.h
smf/smfservermodule/smfserver/transportmgr/smftransportmanagerutil.cpp
smf/smfservermodule/smfserver/transportmgr/smftransportmanagerutil.h
smf/smfservermodule/smfservermodule.pro
smf/smfservermodule/util/qjson/qjson.pro
smf/smfservermodule/util/qjson/src/bwins/qjsonu.def
smf/smfservermodule/util/qjson/src/src.pro
smf/smfsettingsui/PlatfromIndependentSettings.cpp
smf/smfsettingsui/PlatfromIndependentSettings.h
smf/smfsettingsui/SMFSettings.cpp
smf/smfsettingsui/SMFSettings.h
smf/smfsettingsui/SMFSettings.loc
smf/smfsettingsui/SMFSettings.rss
smf/smfsettingsui/SMFSettings_reg.rss
smf/smfsettingsui/SettingsConstants.h
smf/smfsettingsui/SettingsRepository.cpp
smf/smfsettingsui/SettingsRepository.h
smf/smfsettingsui/main.cpp
smf/smfsettingsui/smfsettingsui.pro
smf/smfsettingsui/ui_SMFSettings.h
smfrepo.pro
--- a/.hgignore	Mon Jun 07 11:43:45 2010 +0100
+++ b/.hgignore	Wed Jun 23 19:51:49 2010 +0530
@@ -6,3 +6,5 @@
 ^.*\.moc$
 ^.*Makefile.*$
 ^bin/.*$
+^tmp
+^.*\bld.inf
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ReadMe.txt	Wed Jun 23 19:51:49 2010 +0530
@@ -0,0 +1,87 @@
+Content:
+==============================================================================
+This is pre-beta version of Social Mobile Framework code. Folder organization is as follows - 
+                Doxyfile - Doxygen configuration file 
+
+                \doc - contains zipped doxygen genrated documentation
+
+                \example - contains sample plugins, auth application and client test application
+                                    \example\AuthApp
+                                    \example\fbcontactfetcherplugin
+                                    \example\fbpostproviderplugin
+                                    \example\flickrcontactfetcherplugin
+                                    \example\smfclientapp
+
+
+                \smf - Contains smf source code
+
+                \smf\smfcredentialmgr - this is credential manager source code 
+
+                \smf\smfservermodule - this is SMF server 
+                                \smf\smfservermodule\smfclient
+                                \smf\smfservermodule\smfserver
+                                \smf\smfservermodule\smfserver\datastoremgr
+                                \smf\smfservermodule\smfserver\pluginmgr
+                                \smf\smfservermodule\smfserver\server
+                                \smf\smfservermodule\smfserver\smfplugins
+                                \smf\smfservermodule\smfserver\transportmgr
+
+                \smf\smfservermodule\util - this contains utility classes for plugins e.g. JSON
+                                \smf\smfservermodule\util\qjson
+
+                \smf\smfsettingsui - this contains SMF settins UI [incomplete]
+
+
+
+
+Dependencies:
+==============================================================================
+SMF is built on Nokia_Symbian3_SDK_v0.8 and Qt 4.6.3. 
+You would need to install qt-mobility-symbian-opensource-1.0.0. 
+To enable building of SMF in public SDK, the unified key store (RSA Signing) related code is 
+blocked with compiler switch. Use Symbian^3 PDK if you want to enable this feature.
+
+Main Interfaces that can be tested end-to-end using this set-up are ContactsFetcher and 
+SmfPost. Though framework code is available, plugins are yet to be available for other service 
+interfaces for end-to-end testing.
+
+Limitations:
+==============================================================================
+1. Support for Non-Symbian (Desktop) version of Qt is not supported at this moment.
+2. Integration of Authentication Application with Credential Manager is not complete at the moment. 
+    So sample plugins require some hacks to access application information for Facebook and Flickr. 
+    Please see pre-build step 2 on how to achieve this.
+3. SMFSettingsUI is not complete at this moment. This impacts network proxy settings. See pre-build
+    step 1 on how to overcome this.
+
+Pre-build steps:
+==============================================================================
+1. SMF uses QNetwork classes to setup proxy-settings. For testing on emulator (WINSCW), find the 
+    hardcoded value under compiler switch "EMULATORTESTING" in file smftransportmanagerutil.cpp. 
+    If your proxy requires authentication, provide "<username> space <password>" in plaintext in a file 
+    "DoNotShare.txt" and place this file in "C:/Data/" - which is at "\epoc32\winscw\c\data" under your 
+    SDK installation folder. You are good to go now.
+2. Since sample plugins are not integrated with Auth App and Credential Mgr yet, currently it expects
+the necessary credentials in plain text. Sample smfclientapp uses facebook plugins, place a file 
+named "FaceBookKeys.txt" under "C:/Data/" - which is at "\epoc32\winscw\c\data". This file should
+contain keys in the following order:  API key, API secret, session key, session secret.. all separated by \n
+If you want to know how to generate these, please see http://wiki.developers.facebook.com/index.php/Authorization_and_Authentication_for_Desktop_Applications
+We are integrating plugins with CredentialMgr, so these painful steps won't be required once it is up.
+
+
+Building Steps :  - 
+==============================================================================
+1. Use smfrepo.pro present in top level to build. This single pro file builds SmfServer, SmfCredMgr, SmfClient,
+Sample Plugins and Sample TestApp
+2. To test on emulator (WINSCW) you can run smfclientapp.exe.
+3. QJson requires high capability, so testing on device would require appropriate cerificatres for signing. 
+see https://www.symbiansigned.com/app/page
+
+Running Sample Application
+==============================================================================
+1. Run project from \example\smfclientapp. This should fetch names of the friends from facebook [for the user who
+provided the keys in step 2 in pre-build steps]
+2. The results might not show properly on UI due to problems in S^3 SDK. However textual result can be viewed
+at the generated log file - \epoc32\winscw\c\data\SmfClientLogs.txt
+3. The Smf Server generates a separate log file under same directiry - \epoc32\winscw\c\data\SmfLog.txt
+If the 
\ No newline at end of file
Binary file doc/html.rar has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/example/AuthApp/AuthApp.cpp	Wed Jun 23 19:51:49 2010 +0530
@@ -0,0 +1,108 @@
+/**
+* Copyright (c) 2010 Sasken Communication Technologies Ltd.
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the "{License}"
+* which accompanies  this distribution, and is available
+* at the URL "{LicenseUrl}".
+*
+* Initial Contributors:
+* Narasimhulu Kavadapu, Sasken Communication Technologies Ltd - Initial contribution
+*
+* Contributors:
+*
+* Description:
+* UI Class of Authentication Application
+*/
+
+#include "AuthApp.h"
+#include <QDebug>
+#include <QMessageBox>
+
+
+AuthApp::AuthApp(QWidget *parent)
+    : QMainWindow(parent),
+    ui(new Ui::AuthAppClass)
+{
+	ui->setupUi(this);
+    //iFBSession = FBSession::sessionForApplication("df51def3e750a350ddb961a70b5ab5ab", "3b86a756f77967dea4674f080fa5d345", QString());
+    iFBSession = FBSession::sessionForApplication("ed6d6d36813f0fbae8061776beb68daf", "fb10f1c758fc285b2a6113344ef4c893", QString());		//NArasimha's APP
+	//iFBSession = FBSession::sessionForApplication("077fd6b8881f39c2dc23207323cca439", "cb13436999afde9338ecd8b0bfb82508", QString());		//Nalina's App
+	connect (iFBSession,SIGNAL(sessionDidLogin(QString)), this, SLOT(sessionDidLogin(QString)));
+    connect (iFBSession, SIGNAL(sessionDidLogout()), this, SLOT(sessionDidLogout()));
+    
+    CheckforLogin();
+}
+
+AuthApp::~AuthApp()
+{
+	delete iFBSession;
+	delete ui;
+}
+
+void AuthApp::changeEvent(QEvent *e)
+{
+    QMainWindow::changeEvent(e);
+    switch (e->type()) {
+    case QEvent::LanguageChange:
+        ui->retranslateUi(this);
+        break;
+    default:
+        break;
+    }
+}
+void AuthApp::CheckforLogin()
+{
+	iLoginDialog = NULL;
+	if ( !( iFBSession->resume() ) ){
+		ui->buttonForget->setDisabled(true);
+		ui->pushButton->setEnabled(true);
+	}
+}
+void AuthApp::on_pushButton_clicked()
+{
+	iLoginDialog = new FBLoginDialog();
+	iLoginDialog->show();
+}
+void AuthApp::sessionDidLogin(QString sessionkey)
+{
+
+    if (iLoginDialog )
+    {
+		QMessageBox msgbox;
+		QString msg ("Authorization completes!!");
+		msgbox.setText(msg);
+		msgbox.exec();
+		
+        iLoginDialog->deleteLater();;
+        iLoginDialog = NULL;
+    }else{
+		QMessageBox msgbox;
+		QString msg ("your already authorized,Please logout and Login again for new authorization!!");
+		msgbox.setText(msg);
+		msgbox.exec();
+    }
+    
+    ui->pushButton->setDisabled(true);
+    ui->buttonForget->setEnabled(true);
+}
+
+void AuthApp::sessionDidLogout()
+{
+    QMessageBox msgbox;
+    msgbox.setText("logged out successfully!!");
+    msgbox.exec();
+    
+    ui->pushButton->setEnabled(true);
+    ui->buttonForget->setDisabled(true);
+    
+}
+void AuthApp::requestFailedWithFacebookError ( const FBError& aError )
+{
+    qDebug() << "facebook error is " << aError.code() << " - " << aError.description();
+}
+
+void AuthApp::on_buttonForget_clicked()
+{
+    iFBSession->logout();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/example/AuthApp/AuthApp.h	Wed Jun 23 19:51:49 2010 +0530
@@ -0,0 +1,54 @@
+/**
+* Copyright (c) 2010 Sasken Communication Technologies Ltd.
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the "{License}"
+* which accompanies  this distribution, and is available
+* at the URL "{LicenseUrl}".
+*
+* Initial Contributors:
+* Narasimhulu Kavadapu, Sasken Communication Technologies Ltd - Initial contribution
+*
+* Contributors:
+*
+* Description:
+* UI Class of Authentication Application
+*/
+
+#ifndef AUTHAPP_H
+#define AUTHAPP_H
+
+#include <QtGui/QMainWindow>
+#include "ui_AuthApp.h"
+#include "errorCodes.h"
+#include "loginDialog.h"
+#include "sessionSP.h"
+
+class AuthApp : public QMainWindow
+{
+    Q_OBJECT
+
+public:
+	AuthApp(QWidget *parent = 0);
+    ~AuthApp();
+private:
+	void CheckforLogin();
+private slots:
+    void on_buttonForget_clicked();
+    void on_pushButton_clicked();
+
+    void sessionDidLogin(QString sessionkey);
+    void sessionDidLogout();
+
+    void requestFailedWithFacebookError ( const FBError& aError );
+
+protected:
+    void changeEvent(QEvent *e);
+
+private:
+    FBSession*      iFBSession;
+    FBLoginDialog*  iLoginDialog;
+    Ui::AuthAppClass *ui;
+};
+
+#endif // AUTHAPP_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/example/AuthApp/AuthApp.loc	Wed Jun 23 19:51:49 2010 +0530
@@ -0,0 +1,13 @@
+// ============================================================================
+// * Generated by qmake (2.01a) (Qt 4.6.3) on: 2010-06-22T14:10:40
+// * This file is generated by qmake and should not be modified by the
+// * user.
+// ============================================================================
+
+#ifdef LANGUAGE_SC
+#define STRING_r_short_caption "AuthApp"
+#define STRING_r_caption "AuthApp"
+#else
+#define STRING_r_short_caption "AuthApp"
+#define STRING_r_caption "AuthApp"
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/example/AuthApp/AuthApp.pkg	Wed Jun 23 19:51:49 2010 +0530
@@ -0,0 +1,34 @@
+; Installation file for AuthApp GUI App
+;
+; This is an auto-generated PKG file by Carbide.
+; This file uses variables specific to Carbide builds that will not work
+; on command-line builds. If you want to use this generated PKG file from the
+; command-line tools you will need to modify the variables with the appropriate
+; values: $(EPOCROOT), $(PLATFORM), $(TARGET)
+;
+;Language - standard language definitions
+&EN
+
+; standard SIS file header
+#{"AuthApp"},(0xEFE2FD23),1,0,0
+
+;Localised Vendor name
+%{"Vendor-EN"}
+
+;Unique Vendor name
+:"Vendor"
+
+;Supports Series 60 v 3.0
+[0x101F7961], 0, 0, 0, {"Series60ProductID"}
+
+;Files to install
+;<source> <destination>
+"$(EPOCROOT)Epoc32\release\$(PLATFORM)\$(TARGET)\AuthApp.exe"		  -"!:\sys\bin\AuthApp.exe"
+"$(EPOCROOT)Epoc32\data\z\private\10003a3f\import\apps\AuthApp_reg.rsc"	-"!:\private\10003a3f\import\apps\AuthApp_reg.rsc"
+
+; Add any installation notes if applicable
+;"AuthApp.txt"		-"!:\private\EFE2FD23\AuthApp.txt"
+
+;required for application to be covered by backup/restore facility 
+"backup_registration.xml"		-"!:\private\EFE2FD23\backup_registration.xml"
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/example/AuthApp/AuthApp.pro	Wed Jun 23 19:51:49 2010 +0530
@@ -0,0 +1,33 @@
+TEMPLATE = app
+TARGET = AuthApp
+QT += core \
+    gui \
+    network \
+    webkit \
+    xml
+LIBS += -lsmfcredmgrclient
+HEADERS += progressbar.h \
+    inc/requestSP.h \
+    inc/xmlParser.h \
+    inc/sessionSP.h \
+    inc/loginDialog.h \
+    inc/errorCodes.h \
+    inc/baseDialog.h \
+    inc/authAppConstants.h \
+    AuthApp.h
+SOURCES += progressbar.cpp \
+    src/requestSP.cpp \
+    src/xmlParser.cpp \
+    src/sessionSP.cpp \
+    src/loginDialog.cpp \
+    src/baseDialog.cpp \
+    main.cpp \
+    AuthApp.cpp
+FORMS += progressbar.ui \
+    AuthApp.ui
+RESOURCES += 
+symbian: { 
+    TARGET.UID3 = 0xEFE2FD23 # Symbian specific, unprotected uid3 from symbiansigned.com
+    TARGET.CAPABILITY = NetworkServices # Symbian specific, we just need network access
+    #ICON = smfdemo.svg
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/example/AuthApp/AuthApp.rss	Wed Jun 23 19:51:49 2010 +0530
@@ -0,0 +1,21 @@
+// ============================================================================
+// * Generated by qmake (2.01a) (Qt 4.6.3) on: 2010-06-22T14:10:40
+// * This file is generated by qmake and should not be modified by the
+// * user.
+// ============================================================================
+
+#include <appinfo.rh>
+#include "AuthApp.loc"
+
+RESOURCE LOCALISABLE_APP_INFO r_localisable_app_info
+	{
+	short_caption = STRING_r_short_caption;
+	caption_and_icon =
+	CAPTION_AND_ICON_INFO
+		{
+		caption = STRING_r_caption;
+		number_of_icons = 0;
+		icon_file = "";
+		};
+	}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/example/AuthApp/AuthApp.ui	Wed Jun 23 19:51:49 2010 +0530
@@ -0,0 +1,50 @@
+<ui version="4.0" >
+ <class>AuthAppClass</class>
+ <widget class="QMainWindow" name="AuthAppClass" >
+  <property name="geometry" >
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>275</width>
+    <height>310</height>
+   </rect>
+  </property>
+  <property name="windowTitle" >
+   <string>MainWindow</string>
+  </property>
+  <widget class="QWidget" name="centralWidget" >
+   <layout class="QVBoxLayout" name="verticalLayout" >
+    <item>
+     <widget class="QPushButton" name="buttonForget" >
+      <property name="text" >
+       <string>Logout</string>
+      </property>
+     </widget>
+    </item>
+    <item>
+     <widget class="QPushButton" name="pushButton" >
+      <property name="text" >
+       <string>Login to facebook</string>
+      </property>
+     </widget>
+    </item>
+    <item>
+     <spacer name="verticalSpacer" >
+      <property name="orientation" >
+       <enum>Qt::Vertical</enum>
+      </property>
+      <property name="sizeHint" stdset="0" >
+       <size>
+        <width>20</width>
+        <height>40</height>
+       </size>
+      </property>
+     </spacer>
+    </item>
+   </layout>
+  </widget>
+ </widget>
+ <layoutdefault spacing="6" margin="11" />
+ <resources/>
+ <connections/>
+</ui>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/example/AuthApp/AuthApp_installer.pkg	Wed Jun 23 19:51:49 2010 +0530
@@ -0,0 +1,31 @@
+; AuthApp_installer.pkg generated by qmake at 2010-06-22T14:10:40
+; This file is generated by qmake and should not be modified by the user
+;
+
+; Language
+&EN
+
+
+; SIS header: name, uid, version
+#{"AuthApp installer"},(0xA000D7CE),1,0,0
+
+; Localised Vendor name
+%{"Vendor"}
+
+; Unique Vendor name
+:"Vendor"
+
+
+; Manual PKG pre-rules from PRO files
+; Dependency to Qt Webkit
+; Default dependency to Qt libraries
+; Default HW/platform dependencies
+[0x101F7961],0,0,0,{"S60ProductID"}
+[0x102032BE],0,0,0,{"S60ProductID"}
+[0x102752AE],0,0,0,{"S60ProductID"}
+[0x1028315F],0,0,0,{"S60ProductID"}
+ 
+
+
+"F:/Nokia/devices/Nokia_Symbian3_SDK_v0.8/SMFCode/smf_baseline_22june_latest/example/AuthApp/AuthApp.sis" - "c:\adm\AuthApp.sis"
+@"F:/Qt/4.6.3/smartinstaller.sis",(0x2002CCCD)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/example/AuthApp/AuthApp_reg.rss	Wed Jun 23 19:51:49 2010 +0530
@@ -0,0 +1,18 @@
+// ============================================================================
+// * Generated by qmake (2.01a) (Qt 4.6.3) on: 2010-06-22T14:10:40
+// * This file is generated by qmake and should not be modified by the
+// * user.
+// ============================================================================
+
+#include <AuthApp.rsg>
+#include <appinfo.rh>
+
+UID2 KUidAppRegistrationResourceFile
+UID3 0xEFE2FD23
+
+RESOURCE APP_REGISTRATION_INFO
+	{
+	app_file="AuthApp";
+	localisable_resource_file="\\resource\\apps\\AuthApp";
+
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/example/AuthApp/AuthApp_template.pkg	Wed Jun 23 19:51:49 2010 +0530
@@ -0,0 +1,36 @@
+; AuthApp_template.pkg generated by qmake at 2010-06-22T14:10:40
+; This file is generated by qmake and should not be modified by the user
+;
+
+; Language
+&EN
+
+
+; SIS header: name, uid, version
+#{"AuthApp"},(0xEFE2FD23),1,0,0
+
+; Localised Vendor name
+%{"Vendor"}
+
+; Unique Vendor name
+:"Vendor"
+
+
+; Manual PKG pre-rules from PRO files
+; Dependency to Qt Webkit
+(0x200267C2), 4, 6, 3, {"QtWebKit"}
+; Default dependency to Qt libraries
+(0x2001E61C), 4, 6, 3, {"Qt"}
+; Default HW/platform dependencies
+[0x101F7961],0,0,0,{"S60ProductID"}
+[0x102032BE],0,0,0,{"S60ProductID"}
+[0x102752AE],0,0,0,{"S60ProductID"}
+[0x1028315F],0,0,0,{"S60ProductID"}
+ 
+
+; Executable and default resource files
+"/Nokia/devices/Nokia_Symbian3_SDK_v0.8/epoc32/release/$(PLATFORM)/$(TARGET)/AuthApp.exe"    - "!:\sys\bin\AuthApp.exe"
+"/Nokia/devices/Nokia_Symbian3_SDK_v0.8/epoc32/data/z/resource/apps/AuthApp.rsc"    - "!:\resource\apps\AuthApp.rsc"
+"/Nokia/devices/Nokia_Symbian3_SDK_v0.8/epoc32/data/z/private/10003a3f/import/apps/AuthApp_reg.rsc"    - "!:\private\10003a3f\import\apps\AuthApp_reg.rsc"
+
+; Manual PKG post-rules from PRO files
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/example/AuthApp/backup_registration.xml	Wed Jun 23 19:51:49 2010 +0530
@@ -0,0 +1,5 @@
+<?xml version="1.0" standalone="yes"?>
+<backup_registration>
+  <system_backup/>
+  <restore requires_reboot = "no"/>
+</backup_registration>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/example/AuthApp/inc/authAppConstants.h	Wed Jun 23 19:51:49 2010 +0530
@@ -0,0 +1,30 @@
+/**
+* Copyright (c) 2010 Sasken Communication Technologies Ltd.
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the "{License}"
+* which accompanies  this distribution, and is available
+* at the URL "{LicenseUrl}".
+*
+* Initial Contributors:
+* Narasimhulu Kavadapu, Sasken Communication Technologies Ltd - Initial contribution
+*
+* Contributors:
+*
+* Description:
+* Common variable declarations
+*/
+
+#ifndef FBCONNECTGLOBAL_H
+#define FBCONNECTGLOBAL_H
+
+#include <QtGlobal>
+#include <QHash>
+#include <QString>
+
+typedef QHash<QString,QString> Dictionary;
+typedef QHashIterator<QString, QString> DictionaryIterator;
+
+
+
+#endif // FBCONNECTGLOBAL_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/example/AuthApp/inc/baseDialog.h	Wed Jun 23 19:51:49 2010 +0530
@@ -0,0 +1,160 @@
+/**
+* Copyright (c) 2010 Sasken Communication Technologies Ltd.
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the "{License}"
+* which accompanies  this distribution, and is available
+* at the URL "{LicenseUrl}".
+*
+* Initial Contributors:
+* Narasimhulu Kavadapu, Sasken Communication Technologies Ltd - Initial contribution
+*
+* Contributors:
+*
+* Description:
+* Base class of All dialogs
+*/
+
+#ifndef FB_DIALOG_H_
+#define FB_DIALOH_H_
+
+#include <QDialog>
+#include <QWebView>
+#include <qprogressbar.h>
+#include <qboxlayout.h>
+#include "authAppConstants.h"
+
+// FORWARD DECLARATIONS
+class FBSession;
+class FBError;
+class QNetworkReply;
+
+#define __WINSCW__
+
+const QString KSuccessurl = "http://www.facebook.com/connect/login_success.html";
+/**
+  * The base Dialoggg
+  */
+class FBDialog : public QWidget
+{
+    Q_OBJECT
+
+protected:
+
+    /**
+    * The session for which the login is taking place.
+    */
+    FBSession*	iSession;
+    QWebView*	iWebView;
+    QString	iLoadingUrl;
+    bool        iIgnorePageLoadCompleteEvent;
+    QProgressBar* progressbar;
+    QVBoxLayout* layout;
+
+signals:
+
+    /**
+     * Called when the dialog succeeds and is about to be dismissed.
+     */
+    void dialogDidSucceed ();
+
+    /**
+     * Called when the dialog is cancelled and is about to be dismissed.
+     */
+    void dialogDidCancel();
+
+    /**
+     * Called when dialog failed to load due to an error.
+     */
+    void dialogDidFailWithError ( const FBError& error );
+
+
+	
+private slots:
+    void cancel();
+
+    /* slots for signals from QWebView.page() */
+    void linkClicked ( const QUrl & url );
+    void loadStarted ();
+    void loadProgress(int progress);
+    void loadFinished ( bool ok );
+    
+    //Network Error Slots
+    void slotAuthenticationRequired( QNetworkReply* reply, QAuthenticator* authenticator );
+    void slotsslErrors( QNetworkReply* reply, const QList<QSslError>& errors  );
+    void slotproxyAuthenticationRequired( const QNetworkProxy& proxy, QAuthenticator* authenticator  );
+
+public:
+	
+	void proxysettings();
+    /**
+    * Creates the view but does not display it.
+    */
+    FBDialog(FBSession* aSession);
+    FBDialog();
+
+    /**
+    * Displays the view with an animation.
+    *
+    * The view will be added to the top of the current key window.
+    */
+    void show();
+	
+    /** Displays the first page of the dialog.
+     *
+     * Do not ever call this directly.  It is intended to be overriden by subclasses.
+     */
+    virtual void load ();
+		
+    /**
+     * Displays a URL in the dialog.
+     */
+    void loadURL(const QString& aUrl, QNetworkAccessManager::Operation aMethod, const QHash<QString, QString>& aGetParams,
+                 const QHash<QString, QString>&  aPostParams);
+
+
+    void dismiss(bool aAnimated);
+
+    /**
+     * Hides the view and notifies delegates of success or cancellation.
+     */
+    void dismissWithSuccess (bool aSuccess, bool aAnimated);
+
+    /**
+    * Hides the view and notifies delegates of an error.
+    */
+    void dismissWithError (const FBError& aError, bool aAnimated);
+
+    /**
+    * Subclasses may override to perform actions just prior to showing the dialog.
+    */
+    virtual void dialogWillAppear();
+
+    /**
+     * Subclasses may override to perform actions just after the dialog is hidden.
+     */
+    virtual void dialogWillDisappear();
+
+    /**
+     * Subclasses should override to process data returned from the server in a 'fbconnect' url.
+     *
+     * Implementations must call dismissWithSuccess:YES at some point to hide the dialog.
+     */
+    virtual void dialogDidSucceed(const QUrl& aUrl);
+	
+    QString title() const;
+    void setTitle ( const QString& aTitle );
+    
+    virtual void GetSessionKey(const QUrl& aUrl);
+
+private:
+    void createControls();
+
+    QString generateURL( const QString& aUrl, const QHash<QString, QString>& aParams) const;
+    QByteArray generatePostBody (const QHash<QString, QString>& aParams) const;
+
+    void postDismissCleanup();
+
+
+ };
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/example/AuthApp/inc/errorCodes.h	Wed Jun 23 19:51:49 2010 +0530
@@ -0,0 +1,221 @@
+/**
+* Copyright (c) 2010 Sasken Communication Technologies Ltd.
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the "{License}"
+* which accompanies  this distribution, and is available
+* at the URL "{LicenseUrl}".
+*
+* Initial Contributors:
+* Narasimhulu Kavadapu, Sasken Communication Technologies Ltd - Initial contribution
+*
+* Contributors:
+*
+* Description:
+* Common Errors Declaration
+*/
+
+#ifndef FBERROR_H_
+#define FBERROR_H_
+
+
+#include "authAppConstants.h"
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+// Error codes
+/* defined by this proj*/
+#define FBRESPONSE_PARSE_ERROR 13  /* the xml parser was unable to parse the response returned by the server */
+
+/* defined and returned by facebook */
+#define FBAPI_EC_SUCCESS 0
+#define FBAPI_EC_UNKNOWN 1
+#define FBAPI_EC_SERVICE 2
+#define FBAPI_EC_METHOD 3
+#define FBAPI_EC_TOO_MANY_CALLS 4
+#define FBAPI_EC_BAD_IP 5
+#define FBAPI_EC_HOST_API 6
+#define FBAPI_EC_HOST_UP 7
+#define FBAPI_EC_SECURE 8
+#define FBAPI_EC_RATE 9
+#define FBAPI_EC_PERMISSION_DENIED 10
+#define FBAPI_EC_DEPRECATED 11
+#define FBAPI_EC_VERSION 12
+
+#define FBAPI_EC_PARAM 100
+#define FBAPI_EC_PARAM_FBAPI_KEY 101
+#define FBAPI_EC_PARAM_SESSION_KEY 102
+#define FBAPI_EC_PARAM_CALL_ID 103
+#define FBAPI_EC_PARAM_SIGNATURE 104
+#define FBAPI_EC_PARAM_TOO_MANY 105
+#define FBAPI_EC_PARAM_USER_ID 110
+#define FBAPI_EC_PARAM_USER_FIELD 111
+#define FBAPI_EC_PARAM_SOCIAL_FIELD 112
+#define FBAPI_EC_PARAM_EMAIL 113
+#define FBAPI_EC_PARAM_ALBUM_ID 120
+#define FBAPI_EC_PARAM_PHOTO_ID 121
+#define FBAPI_EC_PARAM_FEED_PRIORITY 130
+#define FBAPI_EC_PARAM_CATEGORY 140
+#define FBAPI_EC_PARAM_SUBCATEGORY 141
+#define FBAPI_EC_PARAM_TITLE 142
+#define FBAPI_EC_PARAM_DESCRIPTION 143
+#define FBAPI_EC_PARAM_BAD_JSON 144
+#define FBAPI_EC_PARAM_BAD_EID 150
+#define FBAPI_EC_PARAM_UNKNOWN_CITY 151
+#define FBAPI_EC_PARAM_BAD_PAGE_TYPE 152
+
+#define FBAPI_EC_PERMISSION 200
+#define FBAPI_EC_PERMISSION_USER 210
+#define FBAPI_EC_PERMISSION_ALBUM 220
+#define FBAPI_EC_PERMISSION_PHOTO 221
+#define FBAPI_EC_PERMISSION_MESSAGE 230
+#define FBAPI_EC_PERMISSION_MARKUP_OTHER_USER 240
+#define FBAPI_EC_PERMISSION_STATUS_UPDATE 250
+#define FBAPI_EC_PERMISSION_PHOTO_UPLOAD 260
+#define FBAPI_EC_PERMISSION_SMS 270
+#define FBAPI_EC_PERMISSION_CREATE_LISTING 280
+#define FBAPI_EC_PERMISSION_EVENT 290
+#define FBAPI_EC_PERMISSION_LARGE_FBML_TEMPLATE 291
+#define FBAPI_EC_PERMISSION_LIVEMESSAGE 292
+#define FBAPI_EC_PERMISSION_RSVP_EVENT 299
+
+#define FBAPI_EC_EDIT 300
+#define FBAPI_EC_EDIT_USER_DATA 310
+#define FBAPI_EC_EDIT_PHOTO 320
+#define FBAPI_EC_EDIT_ALBUM_SIZE 321
+#define FBAPI_EC_EDIT_PHOTO_TAG_SUBJECT 322
+#define FBAPI_EC_EDIT_PHOTO_TAG_PHOTO 323
+#define FBAPI_EC_EDIT_PHOTO_FILE 324
+#define FBAPI_EC_EDIT_PHOTO_PENDING_LIMIT 325
+#define FBAPI_EC_EDIT_PHOTO_TAG_LIMIT 326
+#define FBAPI_EC_EDIT_ALBUM_REORDER_PHOTO_NOT_IN_ALBUM 327
+#define FBAPI_EC_EDIT_ALBUM_REORDER_TOO_FEW_PHOTOS 328
+#define FBAPI_EC_MALFORMED_MARKUP 329
+#define FBAPI_EC_EDIT_MARKUP 330
+#define FBAPI_EC_EDIT_FEED_TOO_MANY_USER_CALLS 340
+#define FBAPI_EC_EDIT_FEED_TOO_MANY_USER_ACTION_CALLS 341
+#define FBAPI_EC_EDIT_FEED_TITLE_LINK 342
+#define FBAPI_EC_EDIT_FEED_TITLE_LENGTH 343
+#define FBAPI_EC_EDIT_FEED_TITLE_NAME 344
+#define FBAPI_EC_EDIT_FEED_TITLE_BLANK 345
+#define FBAPI_EC_EDIT_FEED_BODY_LENGTH 346
+#define FBAPI_EC_EDIT_FEED_PHOTO_SRC 347
+#define FBAPI_EC_EDIT_FEED_PHOTO_LINK 348
+#define FBAPI_EC_EDIT_VIDEO_SIZE 350
+#define FBAPI_EC_EDIT_VIDEO_INVALID_FILE 351
+#define FBAPI_EC_EDIT_VIDEO_INVALID_TYPE 352
+#define FBAPI_EC_EDIT_FEED_TITLE_ARRAY 360
+#define FBAPI_EC_EDIT_FEED_TITLE_PARAMS 361
+#define FBAPI_EC_EDIT_FEED_BODY_ARRAY 362
+#define FBAPI_EC_EDIT_FEED_BODY_PARAMS 363
+#define FBAPI_EC_EDIT_FEED_PHOTO 364
+#define FBAPI_EC_EDIT_FEED_TEMPLATE 365
+#define FBAPI_EC_EDIT_FEED_TARGET 366
+#define FBAPI_EC_USERS_CREATE_INVALID_EMAIL 370
+#define FBAPI_EC_USERS_CREATE_EXISTING_EMAIL 371
+#define FBAPI_EC_USERS_CREATE_BIRTHDAY 372
+#define FBAPI_EC_USERS_CREATE_PASSWORD 373
+#define FBAPI_EC_USERS_REGISTER_INVALID_CREDENTIAL 374
+#define FBAPI_EC_USERS_REGISTER_CONF_FAILURE 375
+#define FBAPI_EC_USERS_REGISTER_EXISTING 376
+#define FBAPI_EC_USERS_REGISTER_DEFAULT_ERROR 377
+#define FBAPI_EC_USERS_REGISTER_PASSWORD_BLANK 378
+#define FBAPI_EC_USERS_REGISTER_PASSWORD_INVALID_CHARS 379
+#define FBAPI_EC_USERS_REGISTER_PASSWORD_SHORT 380
+#define FBAPI_EC_USERS_REGISTER_PASSWORD_WEAK 381
+#define FBAPI_EC_USERS_REGISTER_USERNAME_ERROR 382
+#define FBAPI_EC_USERS_REGISTER_MISSING_INPUT 383
+#define FBAPI_EC_USERS_REGISTER_INCOMPLETE_BDAY 384
+#define FBAPI_EC_USERS_REGISTER_INVALID_EMAIL 385
+#define FBAPI_EC_USERS_REGISTER_EMAIL_DISABLED 386
+#define FBAPI_EC_USERS_REGISTER_ADD_USER_FAILED 387
+#define FBAPI_EC_USERS_REGISTER_NO_GENDER 388
+
+#define FBAPI_EC_AUTH_EMAIL 400
+#define FBAPI_EC_AUTH_LOGIN 401
+#define FBAPI_EC_AUTH_SIG 402
+#define FBAPI_EC_AUTH_TIME 403
+
+#define FBAPI_EC_SESSION_METHOD 451
+#define FBAPI_EC_SESSION_REQUIRED 453
+#define FBAPI_EC_SESSION_REQUIRED_FOR_SECRET 454
+#define FBAPI_EC_SESSION_CANNOT_USE_SESSION_SECRET 455
+
+#define FBAPI_EC_MESG_BANNED 500
+#define FBAPI_EC_MESG_NO_BODY 501
+#define FBAPI_EC_MESG_TOO_LONG 502
+#define FBAPI_EC_MESG_RATE 503
+#define FBAPI_EC_MESG_INVALID_THREAD 504
+#define FBAPI_EC_MESG_INVALID_RECIP 505
+#define FBAPI_EC_POKE_INVALID_RECIP 510
+#define FBAPI_EC_POKE_OUTSTANDING 511
+#define FBAPI_EC_POKE_RATE 512
+
+#define FQL_EC_UNKNOWN_ERROR 600
+#define FQL_EC_PARSER_ERROR 601
+#define FQL_EC_UNKNOWN_FIELD 602
+#define FQL_EC_UNKNOWN_TABLE 603
+#define FQL_EC_NO_INDEX 604
+#define FQL_EC_UNKNOWN_FUNCTION 605
+#define FQL_EC_INVALID_PARAM 606
+#define FQL_EC_INVALID_FIELD 607
+#define FQL_EC_INVALID_SESSION 608
+
+#define FBAPI_EC_REF_SET_FAILED 700
+#define FBAPI_EC_FB_APP_UNKNOWN_ERROR 750
+#define FBAPI_EC_FB_APP_FETCH_FAILED 751
+#define FBAPI_EC_FB_APP_NO_DATA 752
+#define FBAPI_EC_FB_APP_NO_PERMISSIONS 753
+#define FBAPI_EC_FB_APP_TAG_MISSING 754
+
+#define FBAPI_EC_DATA_UNKNOWN_ERROR 800
+#define FBAPI_EC_DATA_INVALID_OPERATION 801
+#define FBAPI_EC_DATA_QUOTA_EXCEEDED 802
+#define FBAPI_EC_DATA_OBJECT_NOT_FOUND 803
+#define FBAPI_EC_DATA_OBJECT_ALREADY_EXISTS 804
+#define FBAPI_EC_DATA_DATABASE_ERROR 805
+#define FBAPI_EC_DATA_CREATE_TEMPLATE_ERROR 806
+#define FBAPI_EC_DATA_TEMPLATE_EXISTS_ERROR 807
+#define FBAPI_EC_DATA_TEMPLATE_HANDLE_TOO_LONG 808
+#define FBAPI_EC_DATA_TEMPLATE_HANDLE_ALREADY_IN_USE 809
+#define FBAPI_EC_DATA_TOO_MANY_TEMPLATE_BUNDLES 810
+#define FBAPI_EC_DATA_MALFORMED_ACTION_LINK 811
+#define FBAPI_EC_DATA_TEMPLATE_USES_RESERVED_TOKEN 812
+
+#define FBAPI_EC_NO_SUCH_APP 900
+#define FBAPI_BATCH_TOO_MANY_ITEMS 950
+#define FBAPI_EC_BATCH_ALREADY_STARTED 951
+#define FBAPI_EC_BATCH_NOT_STARTED 952
+#define FBAPI_EC_BATCH_METHOD_NOT_ALLOWED_IN_BATCH_MODE 953
+
+#define FBAPI_EC_EVENT_INVALID_TIME 1000
+#define FBAPI_EC_INFO_NO_INFORMATION 1050
+#define FBAPI_EC_INFO_SET_FAILED 1051
+
+#define FBAPI_EC_LIVEMESSAGE_SEND_FAILED 1100
+#define FBAPI_EC_LIVEMESSAGE_EVENT_NAME_TOO_LONG 1101
+#define FBAPI_EC_LIVEMESSAGE_MESSAGE_TOO_LONG 1102
+
+#define FBAPI_EC_PAGES_CREATE 1201
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+class FBError
+{
+
+public:
+    FBError(quint8 aErrorCode) : iErrorCode (aErrorCode) {}
+    FBError() : iErrorCode(0) {}
+
+    inline quint8 code() const { return iErrorCode; }
+    inline void setCode( quint8 aErrorCode ) { iErrorCode = aErrorCode; }
+
+    inline QString description() const { return iErrorDescription; }
+    inline void setDescription( const QString& aErrorDescription ) { iErrorDescription = aErrorDescription; }
+
+private:
+    quint8 iErrorCode;
+    QString iErrorDescription;
+};
+
+#endif // FBERROR_H_
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/example/AuthApp/inc/loginDialog.h	Wed Jun 23 19:51:49 2010 +0530
@@ -0,0 +1,58 @@
+/**
+* Copyright (c) 2010 Sasken Communication Technologies Ltd.
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the "{License}"
+* which accompanies  this distribution, and is available
+* at the URL "{LicenseUrl}".
+*
+* Initial Contributors:
+* Narasimhulu Kavadapu, Sasken Communication Technologies Ltd - Initial contribution
+*
+* Contributors:
+*
+* Description:
+* Login Dialog class of Authentication Application
+*/
+
+
+#ifndef FB_LOGIN_DIALOG_H_
+#define FB_LOGIN_DIALOG_H_
+
+#include "baseDialog.h"
+#include "requestSP.h"
+#include <QNetworkReply>
+
+// FORWARD DECLARATIONS
+class FBRequest;
+
+class FBLoginDialog : public FBDialog
+{
+    Q_OBJECT
+
+private:
+    FBRequest* iGetSessionRequest;
+	
+private slots:
+    /* slots for handling signals from FBRequest iGetSessionRequest */
+    void requestDidLoad (const QVariant& aResult);
+
+    void requestFailedWithFacebookError ( const FBError& aError );
+    void requestFailedWithNetworkError( QNetworkReply::NetworkError code );
+
+public:
+    FBLoginDialog(FBSession* aSession);
+    FBLoginDialog();
+
+    void load();
+
+protected:
+    virtual void dialogWillDisappear();
+    void GetSessionKey(const QUrl& aUrl);
+
+private:
+    void connectToGetSession(const QString& aToken);
+    void loadLoginPage();
+	
+ };
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/example/AuthApp/inc/requestSP.h	Wed Jun 23 19:51:49 2010 +0530
@@ -0,0 +1,219 @@
+/**
+* Copyright (c) 2010 Sasken Communication Technologies Ltd.
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the "{License}"
+* which accompanies  this distribution, and is available
+* at the URL "{LicenseUrl}".
+*
+* Initial Contributors:
+* Narasimhulu Kavadapu, Sasken Communication Technologies Ltd - Initial contribution
+*
+* Contributors:
+*
+* Description:
+* class to handle calls to rest Server API's
+*/
+#ifndef FBREQUEST_H
+#define FBREQUEST_H
+
+#include <QObject>
+#include <QString>
+#include <QDateTime>
+#include <QHttp>
+#include <QHash>
+#include <QNetworkAccessManager>
+#include <QNetworkReply>
+#include "progressbar.h"
+#include "authAppConstants.h"
+#include "xmlParser.h"
+
+// FORWARD DECLARATIONS
+class FBSession;
+class FBError;
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+class  FBRequest : public QObject
+{
+    Q_OBJECT
+
+private:
+
+    /* pointer to the session that owns this request */
+    FBSession*  iSession;
+
+    /**
+     * The URL which will be contacted to execute the request.
+     */
+    QString iUrl;
+
+    /**
+     * The API method which will be called.
+     */
+    QString iMethod;
+
+    /**
+     * An object used by the user of the request to help identify the meaning of the request.
+     */
+    void*   iUserInfo;
+
+    /**
+     * The dictionary of parameters to pass to the method.
+     *
+     * These values in the dictionary will be converted to strings using the
+     * standard Objective-C object-to-string conversion facilities.
+     */
+    Dictionary  iParams;
+
+    /**
+     * A data parameter.
+     *
+     * Used for methods such as photos.upload, video.upload, events.create, and
+     * events.edit.
+     */
+    QByteArray  iDataParam;
+
+    /**
+      * true if iDataParam holds picture data
+      */
+    bool        iDataParamPicture;
+
+    /**
+     * The timestamp of when the request was sent to the server.
+     */
+    QDateTime   iTimestamp;
+    QHttp       iConnection;
+    QByteArray  iResponseText;
+
+    QNetworkAccessManager iNetworkAccessManager;
+    progressbar* pbar;
+
+signals: /* the signals ommitted by FBRequest */
+
+    /**
+     * Called just before the request is sent to the server.
+     */
+    void requestLoading();
+
+    /**
+     * Called when the server responds and begins to send back data.
+     */
+    //todo: void requestDidReceiveResponse (FBRequest* aRequest, NSURLResponse* aResponse);
+
+    /**
+     * Called when an error prevents the request from completing successfully.
+     */
+    void requestFailedWithNetworkError( QNetworkReply::NetworkError code );
+    void requestFailedWithFacebookError ( const FBError& aError );
+
+    /**
+     * Called when a request returns and its response has been parsed into an object.
+     *
+     * The resulting object may be a dictionary, an array, a string, or a number, depending
+     * on thee format of the API response.
+     */
+    void requestDidLoad ( const QVariant& aResult);
+
+    /**
+     * Called when the request was cancelled.
+     */
+    void requestWasCancelled ();
+
+
+private slots:
+    void networkReplyError ( QNetworkReply::NetworkError code );
+    void networkReplyFinished ();
+
+public: /* class functions */
+    /**
+     * Creates a new API request for the global session.
+     */
+    static FBRequest* request();
+
+    /**
+     * Creates a new API request for a particular session.
+     */
+    static FBRequest* requestWithSession (FBSession* aSession);
+
+public: /* instance functions */
+
+    /**
+     * Creates a new request paired to a session.
+     */
+    FBRequest (FBSession* aSession);
+
+    /**
+     * Calls a method on the server asynchronously.
+     *
+     * The delegate will be called for each stage of the loading process.
+     */
+    void call (const QString& aMethod, const Dictionary& aParams);
+
+    /**
+     * Calls a method on the server asynchronously, with a file upload component.
+     *
+     * The delegate will be called for each stage of the loading process.
+     */
+    void callWithDataParams (const QString& aMethod, const Dictionary& aParams, const QByteArray& aDataParam, bool aDataParamPicture);
+
+    /**
+     * Calls a URL on the server asynchronously.
+     *
+     * The delegate will be called for each stage of the loading process.
+     */
+    void post( const QString& aUrl, const Dictionary& aParams);
+
+    /**
+     * Stops an active request before the response has returned.
+     */
+    void cancel();
+
+    /**
+      * returns the time stamp of when the request was sent to the server
+      */
+    const QDateTime& timeStamp() const;
+
+    void connect();
+
+private:
+    /**
+      * Given a string returns its hex coded md5 hash
+      */
+    static QString md5(const QString&);
+
+    /**
+      * @return true if the current request method is a special method
+      */
+    bool isSpecialMethod() const;
+
+    /**
+      * @return QString a url to use for the given method
+      */
+    QString urlForMethod (const QString& aMethod) const;
+
+    /**
+      * @return the Get Url for the request
+      */
+    QString generateGetURL() const;
+
+    QString generateCallId() const;
+    QString generateSig();
+
+    void generatePostBody(QByteArray& body);
+
+    /**
+      * handles the data received from the server
+      * @param aResponseData is the data received from the server
+      */
+    void handleResponseData( const QByteArray& aResponseData );
+
+    /**
+      * @param aResponseData is the data received from the server
+      * @param aError will get error codes if any error occurs ( this will change in the future )
+      * @return a void* pointer, this will change
+      */
+    QVariant parseXMLResponse ( const QByteArray& aResponseData, FBError& aError);
+
+};
+
+#endif // FBREQUEST_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/example/AuthApp/inc/sessionSP.h	Wed Jun 23 19:51:49 2010 +0530
@@ -0,0 +1,276 @@
+/**
+* Copyright (c) 2010 Sasken Communication Technologies Ltd.
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the "{License}"
+* which accompanies  this distribution, and is available
+* at the URL "{LicenseUrl}".
+*
+* Initial Contributors:
+* Narasimhulu Kavadapu, Sasken Communication Technologies Ltd - Initial contribution
+*
+* Contributors:
+*
+* Description:
+* class to maintian session & all credential keys.
+*/
+
+#ifndef FBSESSION_H
+#define FBSESSION_H
+
+#include <QObject>
+#include <QList>
+#include <QString>
+#include <QSettings>
+#include <QDateTime>
+#include "smfcredmgrclient.h"
+#include "authAppConstants.h"
+
+// FORWARD DECLARATIONS
+class FBRequest;
+
+const QString KFacebokkKeysFileName = "c://Data//FacebookKeys.txt";
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+/**
+ * An FBSession represents a single user's authenticated session for a Facebook application.
+ *
+ * To create a session, you must use the session key of your application (which can
+ * be found on the Facebook developer website).  You may then use the login dialog to ask
+ * the user to enter their email address and password.  If successful, you will get back a
+ * session key which can be used to make requests to the Facebook API.
+ *
+ * Session keys are cached and stored on the disk of the device so that you do not need to ask
+ * the user to login every time they launch the app.  To restore the last active session, call the
+ * resume method after instantiating your session.
+ */
+class FBSession : public QObject
+{
+    Q_OBJECT
+
+private:
+    /**
+      * the queue of requests
+      */
+    QList<FBRequest*>           iRequestQueue;
+
+    /**
+     * Your application's API key, as passed to the constructor.
+     */
+    QString iApiKey;
+
+    /**
+     * Your application's API secret, as passed to the constructor.
+     */
+    QString iApiSecret;
+
+    /**
+     * The URL to call to create a session key after login.
+     *
+     * This is an alternative to calling auth.getSession directly using the secret key.
+     */
+    QString iGetSessionProxy;
+
+    /**
+     * The current user's session key.
+     */
+    QString iSessionKey;
+
+    /**
+     * The current user's session secret.
+     */
+    QString iSessionSecret;
+
+    /**
+     * The expiration date of the session key.
+     */
+    QDateTime iExpirationDate;
+
+
+    /**
+      * the time at which the last request was performed, this is used to prevent
+      * too many requests going to the server at once.
+      */
+    QDateTime   iLastRequestTime;
+    int         iRequestBurstCount;
+
+
+    /**
+      * The settings object used to restore session from the disk.
+      */
+    QSettings   iSettings;
+    /**
+      * The Credentail Object used to store auth data
+      */
+    SmfCredMgrClient* m_Client; 
+    /**
+      * Variable to store 
+      */ 
+    QString iCMRegToken;
+
+signals: /* the signals ommitted by FBSession */
+
+    /**
+      * Called when session logged in sucessfully
+      * @param SessionKey is the fb assigned session key
+      */
+    void sessionDidLogin (QString SessionKey);
+
+    /**
+     * Called when a user closes the login dialog without logging in.
+     */
+    void sessionDidNotLogin ();
+
+    /**
+     * Called when a session is about to log out.
+     * @param aUid is the fb assigned session id
+     */
+    void sessionWillLogout ();
+
+    /**
+     * Called when a session has logged out.
+     */
+    void sessionDidLogout ();
+
+private slots:
+    /**
+      * handler function for the timer fired from startFlushTimer() function
+      */
+    void requestTimerReady();
+
+public: /* class functions */
+
+    /**
+     * The globally shared session instance.
+     */
+    static FBSession* session();
+
+    /**
+     * Sets the globally shared session instance.
+     *
+     * This session is not retained, so you are still responsible for retaining it yourself.  The
+     * first session that is created is automatically stored here.
+     */
+    static void setSession(FBSession* aSession);
+
+    /**
+     * Constructs a session and stores it as the globally shared session instance.
+     *
+     * @param aSessionProxy a url to that proxies auth.getSession
+     */
+    static FBSession* sessionForApplication ( const QString& aKey, const QString& aSecret, const QString& aSessionProxy);
+
+public: /* instance functions */
+
+    /**
+     * Constructs a session for an application.
+     *
+     * @param secret the application secret (optional)
+     * @param getSessionProxy a url to that proxies auth.getSession (optional)
+     */
+    FBSession( const QString& aKey, const QString& aSecret, const QString& aSessionProxy );
+
+    /**
+      * Destructor
+      */
+    ~FBSession();
+
+    /**
+     * Begins a session for a user with a given key and secret.
+     */
+    void beginSession ( const QString& aSessionKey, const QString& aSessionSecret, const QDateTime& aExpires );
+
+    /**
+     * Resumes a previous session whose uid, session key, and secret are cached on disk.
+     */
+     bool resume();
+
+    /**
+     * Cancels a login (no-op if the login is already complete).
+     */
+    void cancelLogin();
+
+    /**
+     * Ends the current session and deletes the uid, session key, and secret from disk.
+     */
+    void logout();
+
+    /**
+     * Sends a fully configured request to the server for execution.
+     */
+    void send (FBRequest* aRequest);
+
+    /**
+      * @return const QString& http:// URL to the facebook REST server
+      */
+    const QString& apiURL() const;
+
+    /**
+      * @return const QString& https:// URL to the secure facebook REST server
+      */
+    const QString& apiSecureURL() const;
+
+    /**
+     * Determines if the session is active and connected.
+     * @return bool true if connected
+     */
+    bool isConnected() const;
+
+    /**
+      * @return const QString& the api secret
+      */
+    const QString& apiSecret() const { return iApiSecret; }
+
+    /**
+      * @return const QString& the GET? session proxy
+      */
+    const QString& getSessionProxy() const { return iGetSessionProxy; }
+
+    /**
+      * @return api key for this session
+      */
+    const QString& apiKey() const { return iApiKey; }
+
+    /**
+      * @return the session secret
+      */
+    const QString& sessionSecret() const { return iSessionSecret; }
+
+    /**
+      * @return the session key
+      */
+    const QString& sessionKey() const { return iSessionKey; }
+
+private:
+
+    /**
+      * Saves the fb connect session information to disk
+      */
+    void save();
+    /**
+      * Forgets any fb connect session information saved to disk
+      */
+    void unsave();
+
+    void startFlushTimer();
+
+    /**
+      * @param aRequest, the request to add to the session queue, owner ship is transferred to the session
+      */
+    void enqueueRequest(FBRequest* aRequest);
+
+    /**
+      * @param aRequest, the request to perform.
+      * @param aEnqueue, if true add to queue if cant perform the request right now
+      */
+    bool performRequest(FBRequest* aRequest, bool aEnqueue);
+
+    /**
+      * flush the queue but performingRequest on the requests in the queue, if cant perform the request, waits a while using
+      * startFlushTimer() and then tries to continue ..
+      */
+    void flushRequestQueue();
+
+};
+
+#endif // FBSESSION_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/example/AuthApp/inc/xmlParser.h	Wed Jun 23 19:51:49 2010 +0530
@@ -0,0 +1,84 @@
+/**
+* Copyright (c) 2010 Sasken Communication Technologies Ltd.
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the "{License}"
+* which accompanies  this distribution, and is available
+* at the URL "{LicenseUrl}".
+*
+* Initial Contributors:
+* Narasimhulu Kavadapu, Sasken Communication Technologies Ltd - Initial contribution
+*
+* Contributors:
+*
+* Description:
+* XML Parser class
+*/
+
+#ifndef FB_XML_HANDLER_H
+#define FB_XML_HANDLER_H
+
+#include <QObject>
+#include <QString>
+#include <QXmlDefaultHandler>
+#include <QVariantList>
+
+#include "authAppConstants.h"
+
+// FORWARD DECLARATIONS
+class FBRequest;
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+class FBXMLHandler : public QObject, public QXmlDefaultHandler
+{
+    Q_OBJECT
+
+private:
+    QVariantList        iStack;
+    QList<QString>      iNameStack;
+    QVariant            iRootObject;
+    QString             iRootName;
+    QString             iChars;
+
+    QString         iParseErrorMessage;
+    bool            iError;
+
+public: /* class functions */
+
+    FBXMLHandler();
+    ~FBXMLHandler();
+
+    inline const QString& rootName() const { return iRootName; }
+    inline QVariant rootObject() const { return iRootObject; }
+
+    inline bool parseError() const { return iError; }
+
+private:
+    /* methods from QXmlDefaultHandler */
+    bool startElement( const QString & namespaceURI,
+                       const QString & localName,
+                       const QString & qName,
+                       const QXmlAttributes & atts);
+    bool characters(const QString& text);
+    bool endElement( const QString & namespaceURI,
+                     const QString & localName,
+                     const QString & qName );
+
+    /* methods from QXmlErrorHandler */
+    bool error(const QXmlParseException& exception);
+    bool fatalError(const QXmlParseException& exception);
+
+    /* private functions*/
+    const QString& topName() const;
+    void flushCharacters();
+    QVariant topObject(bool aCreate);
+
+    QVariant topContainer();
+
+
+    void initWhiteSpaceHash();
+    QHash<QChar, bool> iWhiteSpaceAndNewLineCharSet;
+
+};
+
+#endif // FB_XML_HANDLER_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/example/AuthApp/main.cpp	Wed Jun 23 19:51:49 2010 +0530
@@ -0,0 +1,48 @@
+/****************************************************************************
+**
+** Trolltech hereby grants a license to use the Qt/Eclipse Integration
+** plug-in (the software contained herein), in binary form, solely for the
+** purpose of creating code to be used with Trolltech's Qt software.
+**
+** Qt Designer is licensed under the terms of the GNU General Public
+** License versions 2.0 and 3.0 ("GPL License"). Trolltech offers users the
+** right to use certain no GPL licensed software under the terms of its GPL
+** Exception version 1.2 (http://trolltech.com/products/qt/gplexception).
+**
+** THIS SOFTWARE IS PROVIDED BY TROLLTECH AND ITS CONTRIBUTORS (IF ANY) "AS
+** IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+** TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+** PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
+** OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+** EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+** PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+** PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+** LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+** NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+** SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** Since we now have the GPL exception I think that the "special exception
+** is no longer needed. The license text proposed above (other than the
+** special exception portion of it) is the BSD license and we have added
+** the BSD license as a permissible license under the exception.
+**
+****************************************************************************/
+
+#include "AuthApp.h"
+
+#include <QtGui>
+#include <QApplication>
+
+int main(int argc, char *argv[])
+{
+    QApplication a(argc, argv);
+    AuthApp w;
+    
+	#if defined(Q_OS_SYMBIAN)
+		w.showMaximized();
+	#else
+		w.show();
+	#endif
+		
+    return a.exec();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/example/AuthApp/progressbar.cpp	Wed Jun 23 19:51:49 2010 +0530
@@ -0,0 +1,14 @@
+#include "progressbar.h"
+
+progressbar::progressbar(QWidget *parent)
+    : QWidget(parent)
+{
+	ui.setupUi(this);
+	ui.progressBar->setTextVisible(false);
+}
+
+
+progressbar::~progressbar()
+{
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/example/AuthApp/progressbar.h	Wed Jun 23 19:51:49 2010 +0530
@@ -0,0 +1,19 @@
+#ifndef PROGRESSBAR_H
+#define PROGRESSBAR_H
+
+#include <QtGui/QWidget>
+#include "ui_progressbar.h"
+
+class progressbar : public QWidget
+{
+    Q_OBJECT
+
+public:
+    progressbar(QWidget *parent = 0);
+    ~progressbar();
+
+private:
+    Ui::progressbarClass ui;
+};
+
+#endif // PROGRESSBAR_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/example/AuthApp/progressbar.ui	Wed Jun 23 19:51:49 2010 +0530
@@ -0,0 +1,31 @@
+<ui version="4.0" >
+ <class>progressbarClass</class>
+ <widget class="QWidget" name="progressbarClass" >
+    <property name="windowTitle" >
+   <string>progressbar</string>
+  </property>
+  <layout class="QVBoxLayout" name="verticalLayout" >
+   <item>
+    <widget class="QLabel" name="label" >
+     <property name="text" >
+      <string>&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
+&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;style type="text/css">
+p, li { white-space: pre-wrap; }
+&lt;/style>&lt;/head>&lt;body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;">
+&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">&lt;span style=" font-size:10pt;">Loading,Please wait.....&lt;/span>&lt;/p>&lt;/body>&lt;/html></string>
+     </property>
+    </widget>
+   </item>
+   <item>
+    <widget class="QProgressBar" name="progressBar" >
+     <property name="value" >
+      <number>24</number>
+     </property>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <layoutdefault spacing="6" margin="11" />
+ <resources/>
+ <connections/>
+</ui>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/example/AuthApp/smfdemo.svg	Wed Jun 23 19:51:49 2010 +0530
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="iso-8859-1"?><!-- Generator: eNetzwerk JPG2SVG 0.1 http://www.enetzwerk.de/svg -->
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20000303 Stylable//EN"   "http://www.w3.org/TR/2000/03/WD-SVG-20000303/DTD/svg-20000303-stylable.dtd" [
+	<!ENTITY st0 "fill-rule:nonzero;clip-rule:nonzero;stroke:#000000;stroke-miterlimit:4;">
+]>
+<svg  width="256" height="228" viewBox="0 0 256 228" xml:space="preserve">
+	<g id="Ebene_x0020_1" style="&st0;">
+		<image width="256" height="228" xlink:href="data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/4QAWRXhpZgAASUkqAAgAAAAAAAAAAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCADkAQADASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwD3+iig8CgAqpPfxQHa27PsuaxNb1sRym2iwSpIfdG3UY6HNYRviev8jWsKTauzGVVJ2R2B1ZOxb/vihdVj/jLfglcf9t/ztNH23/O01p7FEe2Z3UV9DMQF3c+oqyDmvPPtx9f0Nbmja7ulW3mxzgLtjbOSQBzmolSaV0XCqnozp6KKKxNgpMj1psxxBIf9k1wlzekXUoyeHPY1cIcxE58p3uR60ZHrXnv24+p/I/40fbm9T+R/xrT2L7mftkehZHrS1wC6pIowMfirf410vhzUzqGnr5gxMuS21CF68YJJrOcHEuFRSNqiikPSoNAyKMiuKm1yYTNgJjjqjen1qP8At2f0j/74b/GtfYyMvbRO5yKWuITxBcJnCxc+qN/8VTv+Ekuv7kP/AH7b/wCKo9jIPbRO1orJ8PauNZsHn4+SQxnCFen1rUY7VJ9BmsjUdRXISeKbxJCoWD/v03/xVN/4Su9/u2//AH6b/wCKrX2UjL2sTsaK47/hK73+7b/9+m/+KqYeKpMf8s/+/Lf40vZSH7WJ1dFcr/wlUn/TP/v03+NH/CVSf9M/+/Lf40eykHtYnVUVzX/CVR/3h/35b/GtDS9YXUZWRT0XP+rK/wA6ThJK7GpxbsjVrI8RagNP0uRiQPMDRjIJ5Kn0rWNeceOL2SXVxbKx8pYlbHI+bc4P8qdKPNKwVJWiYbXBdix6nk0nnVTwfX9aMN6/rXo2RxWLnnUedVPDf5NGG/yaLILFzzqVLgo6sOqkH8jVLDev60Yb1/WlZBY9V8L6iL/TFXI3RABgARgnPrW5Xkmgaymi6gtzcyOtsFKMFBbLHpwK9aFefVjyyaO2DvEZcf8AHtL/ALh/lXkt9N/p9x/10b+des3P/HrN/uH+VeOX4P8AaNzz/wAtW7+9bYbqZV+g/wA6jzqp4b1/WjDev6112Rz2LnnUngnxHHa/E/VdMmYKLiOCOHCMSTgk5PQVUw3r+tcRrt63hrxvp3iBGIZJgzZ+YHancDBPWufEL3bm1HSR9UVHPJ5URao7C4F1Y284/wCWkSv0x1UH+tVddlMOlu4OPmH8640rux0t2R5WJuKXzqp4OOv60Yb1/WvTsjgsXPOpRNyKpYb1/WlAOR/jTsgsbPwg1lXl1DR8jcs81x905xvA69O9eqSf6tv9018y/D3XG0X4oz7nIS5X7OBgsMtMo6A/rX01L/q3/wB0/wAq8t7netjyK4m/fn6D+VRedUN0D9ob6Dv7CocN6/rXppKxw2LnnUedVPDev60Yb1/WnZCsXPOo86qeG9f1ow3r+tFkFi551b/g27Ca5IrHAaIKOCeSwrlMN6/rUun3jWfiDShuI868ii4z3YVjXXuGtJe8e1scDJ6V5PrchuNavGP8E0kY+gdv8a9SvTizlP8As15fdpuvrlvWeQ/+PGsMPu2XXeiRm+X70ojJOBVvyzVXUpVstNuLlzhYk3E+n5V1OVkc6V3YbCbeUfecHdt6U94cMwGdoPU1wHh7Wlg1WRZZT5UrNsJ3HLFhge1ehpJ8okABZeGBHGa5Y4iV9djpdFW0IPLo8v3q55dHlmurmOUxdYs3utNeJCd29W4bHTmvQvhn4qPinwla3M20Xjea8qojBQPOcLgnPYDvXL+Xw2R/Cf5V558FPEM+i+LIdJbBGoGOHaxY7eC/y44FcuI3TOqg9Gj6buf+PWX/AHD/ACryO+TOoXH/AF0bv7165Pzaye6H+VeXXkf+nT/9dD/Onh3ZsVfoZnl+9Hl+9XPLNHlmunmOYp+X71wPxUh26bpj92llH/jor0ryzXCfFO1aXSLBwOIZJGPI9BWdZ3gzSlpNHrnwi1BtR8ELKxJK3DR857KvrW94vfZoEuOu9f51wP7P9yD4HlticsL2Z+c9MJXb+L2/4l4jz97B/IiuSn8SOqo7RZ535dHl+9XPLNHlmu/mOEp+X70oj5/+vVvyzSiPkUcwHiMbtF8SNOZeo1GE/XEwr7At5WnsFlYAM6knH418fN/yUew/7CMX/o4V9fWP/IKi/wBw/wBa857noLY8ouY/9Ib6D+VReX71o3Ef74/QfyqLyzXoqRwMp+X70eX71c8ujy6fMIp+X70eX71c8ujy6OYCn5fvWJrLmDX/AAowPB1u2B+m4V0/l1zPiZduueFP+w3bf+hCsaz9w1o/Ge86kcadOf8AYrzyWPdPKfV2P6mvRrxd9nKvqtcPNDieUY6Ow/U1jRdrmtZXsZ3k1j+KrVpfC2oqud3lHAGOeldN5XtUdxaLcwPC4G1xg5ANbN3VjFKzufPUbNBcc8MpyOe+a9M8M6ql5YqCwLRALL1ODjvmud8U+DL3TJXubeKWW3J3GQhQF6kjr2xWV4bv2tNRjIcmM7i67jgnacZHeuNqx2J3Wh7HFHuiBp/lU3F3YW0a3FvtJ6bj1oXUiB/qIz9a6FVVjndJ3HeVwfoa+ftdE+g+LpvJLxzWwiZCDtIJhU9R069q9/bUmIP+jxj6V4N44064svEtxJKZHjkEQSVzkviJM/l0rOpNSNKcHHc+ovBfiG18SeEI7i1nExgjW3lIDcSCJCwOep+aueuos3kx/wBs/wA6xPgDOjeCtQiMp8z+0JiE55HkwjNdRcRf6VLx/GadF2uKsr2MzyaPK5xV7yvaq1y4glizgeY4QZ9635jDlIvJrmfH1mJPB+oyEZMUDMOnqtdp5XtWD44h/wCKD17jn7Icf99LSm7xY4K0kZH7Pl3lLq0448yTv3Kj6V6f4tIL26eqsf1FeKfs+3JTxffQsxC/YyQMnqXFe1eI/wB7dwjH3VYfqK56fxHRU+E5jyaXyflzV3yvaogR9rNv/EI9+PbOK6eY5uUreTSiH5hV3yvalEXzDinzC5T52kGPiTY/9hKL/wBHCvr2x/5BcX+4f618iT8fEuy/7CUf/o6vruw/5BkX+4a4nudq2OAmizKfw/lUfk1oyxfvDx2H8qZ5XtXYmcbiUfKquLkhQFRGHqa1Wi+RuP4T/KudtZA8CjPIzn8zWVWT0NaUd7l37U3/ADyj/Wni9YD/AFEX5VWorHmZtyos/bm/54Rfka898T3k8/xL8NRFFWEajaMNpP3t47V3Ncl4itgPF3he5I+9q9smcD++KHJvcaikfRMg3RlfWuQuIv8ASp+P+Wr9v9o12Brn7y2KXT8feJbp6k1VN6kVFdGX5X+cUeV7fpV3yfajyT6Vpcy5TNns4bmIxzxJIh/hdQR+Vc/a+AtNi8SwalmNYED7rX7MvlncpAzz2znpXZeSfSjyT6UnZ7jV1sSa/YQ6hppltdpeFSQqKPmzgVwrKUdkYYIJBru4mkiI5JTumeDXM61p0kM5njTMTckjAAJySOtZONjaMrmTXJ+O9CGqaM9xEp8+2BcBUBMhOBgntXV5pGVJFKyKHQ9VYZBqSjmPgLevHqt7pjEj5ZpSu49cRr06dq9WnizcScfxHtXlngKzi8KfFGZ7qbZbXdnIUOzjfJLgLgZ9OtewTQkTScfxGtKbsZ1Fcz/K/wA4rnvE0v2WfSB082/ij6465rrvJPpXC/EaQ2s/hdugbW7dW+nNW3oRGOp1ph5PHf0qhrdgL3Qr61K7hNFsxtBzyO1bnlh8suCp6HFKtt5jqhAwzAdPcU2xJHz38I7r7B8QJU3bd5EPXH/LYDFfQeqjzLxv9lmH618x+Erv7D8SLUZx5uqJF1x1nFfUV3GWu5jj+M1lDc1nsZflf5xXPJcE/EmbT+w0dZ8Z/wCmuOldf5JPauKtis3xrudpBx4dUf8AkcVo5GaidR5Xt+lAi5HH6Vd8k+lKsPzDinzE8p8v3Ix8TrP/ALCcf/o6vrvT/wDkGRf7hr5GvBj4oWg/6ikf/o+vrnT/APkGQ/7hrnOjocxJF+8PHYdqb5X+cVfeLLnim+SfSuhMwcSg8X7t+P4T29q830W9eXxLrlk2dlsluV+Y/wAS5PHavVnh/dvx/Cf5V5F4WhlPxavQY91tO9or5IwwEY6jvUVHcumrHT5FGRXp39k6T/z423/fsVFJommOQVtbdfpHWRqebZFYHidM3Ggzj/l31SKYn/dOa9l/sHTj0gg/791W1Dwhp9/CkZhgUo24HygcGgDoqo30IYh8c8DpV6qGqwTy2weCRlaJvM2KP9Zjnb14z07007MTVyp5XtR5XtT7GdbyDcUEcygebDncYmP8JOBVryfb9Ku5Nil5XtR5XtV3yfb9KPJ9v0ouKxS8r2pktqk8TRuisCCOVBxxjNaHk+36UeT7fpRcLGLbeFbViH81TxypiXir0XhuyjJ3RQPn+9AtWZZWs4jKF3cgYziryOsi7lII9RUMtGPP4Y0mR0n/ALPshcRkETC2TfgHOM4zjNOkjzIxx1Na7fdNUzF8x47+lOLsKSuUvK9q8z+MR8i18Ny9NmswN+QY16z5Pt+leR/Hs/Z/D+jS9Nmpxt6dEc02xJHoekn7To9pP18yMNnrV+KPE0Zx0YfzrM8Ft9q8EaLP132iNnOf1reWLDqcdD6UXCx8krYPpfxT0yJwwJ1WGUBhjg3FfUyKZY1kPVhk18/+M7D7J8b9CiCYDXFk5+XHWc19Gpb7I1THQY6Uk7DaK0cOZFGOpFeU+Db5dU+MWpSqwcJorR5BzyLhfX617EsYV1OP4h2968D+DDNN8T9b3sWP2K4GTz/y3jptgke3eV7UqxfMOKueT7fpSrF8w4/SncVj5Hvhj4pW3/YUT/0fX1xp3/INh/3a+SNQ/wCSqW3/AGFE/wDR9fXGnf8AINh/3azLKLRfN0pPK9qumLnp+lHk+36VdyLFLygRjH6VUh0bTbe5N1BptnFcEgmaO3RX46fMBnitjyfb9KPJ9v0p3CxVzL/ff/vo0Zl/vv8A99GrXk+36UeT7fpRcLGXqV3JY6XdXRkYCGMvy5Fbls/m2sUn95Fb8xXK+PS1v4A12VMhltGwRweore0K4W50a0dGDYiQEg552ioZSNGkIyCD3paKQzm9UZ9FvftsUbGB9zTKvyqTwBuP404eJrNkDia3KnoROMVt3dpBe27QXEayRt1VuleTazp17oV1JaPLJJCADHMI9ikkZIAyen1pO5UbX1O+/wCEms/+e0H/AH/Wj/hJrP8A57Qf9/1rxm+1LUbR/lknlTGdytgD26GqH/CT3f8Afm/7+j/CsnUsdscIpK6Pdf8AhJrP/ntB/wB/1o/4Saz/AOe0H/f9a8K/4Se7/vzf9/R/hR/wk93/AH5v+/o/wo9qV9SZ7nJ4isJUKO9sw9DMp5rL8A+I3vIpNFvbnztQs0DyyTTZkfexZcr1HBAHsK8g/wCEnu/783/f0f4VS0zxZe+H/HMWtCeRbe5dBPCZAqyqkeMM2OmRnpVQnd2Ma+HdOPMfUTttjZj0AzWDJ4jtI5XQywAqcHMwFaEd8l9oP2yIjElt5mFbOMrnGfxrwPVPEl1Hq94geXCzOOJR6/SnOXKRQo+1ue1f8JNZ/wDPaD/v+teUfHnVIdQ8K6cInjYrfA/JIG/5Zv6Vg/8ACT3f9+b/AL+j/CsDxvqk2o+HLYSs5xeZ+Z8/wN7VMal3Y1q4Vwg5HtHw38UWy+BtLt3lhDQW6IQ04B6enaus/wCEms/+e0H/AH/Wvmzwnr9za6WYUkk2qQABIBjj6Vvf8JPd/wB+b/v6P8KHUs7Dp4TnipGp4weK/wDjVpd8oQ28Udo3mA5TcsxJ+bpmvYT4ms8n99B/3/Wvn661CWaeHUGDmVXVdxbJwDnrirn/AAk93/fm/wC/o/wodQccG3c9uu/FNpHau6zQZXB4nHqK8U+D2oRWXxE1e4lZFV7OcAs4UczRnrVPUPE15/Ztwweb5Vz/AK0ev0rmvC2oS2Orz3EZYM8LA7WweWU+ntTU7xuZToctRQ7n1H/wk1n/AM9oP+/60q+JrPcP30HX/nuteE/8JPd/35v+/o/woHie7z9+b/v6P8Kn2pv9SZyN5IJPijaupBB1SMjBz/y3r6508402H/cr46t5DL4+0yRs5a/hPJ/6aivsKzONIQ/9Mz/Wtjz2rOxmv4ks1bBlg/GYUn/CTWf/AD2g/wC/614je+JbtLplDzdF/wCWo9B7VB/wk93/AH5v+/o/wrH2p3rBM91/4Saz/wCe0H/f9aP+Ems/+e0H/f8AWvCv+Enu/wC/N/39H+FH/CT3f9+b/v6P8KPaj+pM91/4Saz/AOe0H/f9aP8AhJrP/ntB/wB/1rwr/hJ7v+/N/wB/R/hR/wAJPd/35v8Av6P8KPah9SZ6r45121u/AutwLLCWa1YACYEnkdqufCvUW1PwaszOXKzvGCW3cAAV4pqfiG6udLuoWeUq8ZU5kBH8q9Z+CH/JPz/1+y/0q4S5kctel7JpHpFFYPiTxLF4bt4ppbd5hKxUBWCngZ71yE3xYt3Xaml3aEHqJUoc4x3YU8NVqK8Voem1k6/okGtae8TqvnDmJ2ydjdM4HtXnFx8TZ5HzDFdxrzwWQ/0q14b+Icj6vbWupSSOl2/lI0joojPXJ4FJVIt2Rc8HVpwc5bHPXli1pdPa3kD7ckASIyZGcZGcHHWsTVNCjwJbRFRR/AisxbJ/GvZfEfhWPWgLm2eGOTA/eNubKgH0PvXAXWnXFhM9tOrMFOBJsKr+tVKCluZ0a86TujzowkHBUg+hBFJ5XtWzqFqIrxwFwvGKqeVXE9HY+hhacVJdSj5XtWP4nhMdlZSFgQzuFTHPpXT+VXPeMz5dhpvH3ZJDxWlJ+8c2Ohai2exfCPxY2r+FL3Tby9Wa8j8zy0eWPesSxRgDYMHGc84/GvPNXi/4nV9x/wAt37e9UvhLePbeLJxHKI1eykBPGDkrxzW3q8X/ABOb7j/lu/8AOrrvRHLlqu5GJ5XtWX4pTb4et/8Ar7/9kNdF5VYvjFNvh22/6/P/AGRqzpP30deMjaizM8LfPbzr33jH5Vv+V7Vz3hE5neP1JOPwrr/Koq6SDBLmoorEZthFtPDbs1F5XtV7yqXyqi51ezMy+jC6JqJPUQjH/fQrD0Jd19IP+mR/mK3ddkFvpMyH/lsu0fzrH8Mru1KUf9MD/wChLW8f4TPLq/75FG35XtS+Vz0/SrvlUvle1c9z1OQ4yzGPHWkj/p+g/wDRor7Dtf8AkDp/1yP9a+PbUY8eaV/1/Q/+jRX2Haf8ghP+uZ/rXetj5ifxM+aL+L/TH47L/wCgiq3le1a17F/pbcdl/wDQRVfyq4Wz6aMNCkIcsBjvXU2/hi3lgRz5JJz2b1PvWIIuQfeu00mTzdMhY/e+bP8A30a1pRUtzhx05UkuVnPnwbLuJF5CBngbG4pP+ENm/wCf2H/vhq6+itvZQ7Hn/XK3f8jz7X/DkumaLd3RnSVY4yxCofbvXq/wPOfh7n1vJf6VyniW3+1eGNTgHWSAqPzFdT8Dc/8ACvWB/hvpl/LFVGKjsY1Ks6jvIv8AxNtRcaVaMVB8p3bp0+WvKPJ9q9t8a24n0CZiM7EY9/avJfs/t+lc1Ze8e1ls17Gz6GZ5PtWZr8Dx6PPeRHbNaqZI3xyp6ZFdN9n9v0rO1+0eTw7qEUaMXki2gKpJPPpWcNJI6cTaVGS8j0f4VePIfEmjLa3E2LyHcCssqlyqhBnAxxlq76+0601GLZdQLKvo2fXNfG3hnXr3wv4givbWV4mVhHMFUZaPeCy8jjO2vr7w7rcPiDQ7XU4BtS4QPsLhiuexxXefMHlXjHw/JpFxCzOjrKzAFVI6Aev1rmPJ9q9L+IsguJ7SEMCYmfjOcZArh/s/t+lcVX42fR4GVqEbmZ5PtXL+Oo9tjp+O8j59+K7v7P7fpXF+PAClrFxlHY4+qinRXvk4+S9g0cr4avpbDXLVo2Zd0qqcdwWHFeq6knm6pdybCu6ZjtPbmvI9OAGtaeSOftUXPtuFe2XsIe/uGA4MrH9a0r7I5MraTlcxfJ9q53x0m3w5a/8AX5/7I1dr9n9v0rlPiJHs8N2nH/L6P/QGrKl8aO3HSToSOU8Gtu1+OLBO5HP/AI7Xofk+1cD4Cj8zxdbr/wBMpf8A0GvURb8dP0qq694xy2a9k0+5meT7UeT7Vp/Z/b9KPs/t+lY2PR5kcZ40iCaZp7ADJmf+RrN8Irv1aYf9O5/9CWtXx3IBBZ246xykkZ9Vz/WqPgZN+tzjr/orf+hLXUlakeI5Xx1/M6vyfalEPPStL7P7fpSi356fpXKe3zI8tg48faYPS/h/9GivsGz/AOQRH/1zP9a+P4xj4g6aP+ohD/6NFfYFn/yCY/8Armf616C2PlJ/GzwO8hzdNx2X+QqDyfatm7t83Lcdl7ewqH7P7fpXntH1MZKxmeT7Vb8KXslxrOraeSzC3SAxp7uCTgdasG34PH6VleB2ZfitcxA/u5JLRXHqNldGH3Z5eaNOMbHdfZrj/nhL/wB8ml+zXH/PCX/vk16d/Zln/wA8R+Zo/syz/wCeI/M10njnlkls8qNE0TYbg5BrT+Cj+X4QubZwQ41C4bB443DtXdnQ9OLbjbLn/eP+NN0nQNM0RHTT7VYA7M7BWJySck8mgBviKHztAvUHUxECvKWtirFSOVJB617PNGssTRsMhuDzivNNRszFqV0vYzSEdem84rGqtmehganKnEw/s/tR9n9q0/Io8isbHoe0PFfGPhmaw1FpbaEvFIAxEas3J3Ek/lXtnwZ1MJ4MeK4zGbby0CvhT07UxrYOhRvusMEZNRWunQ2cckcCbVkILAsTkjp1rVVGkefPCxcrp6C6vcHU9SludpCseAw56Y7VR+z+1afkUeRWT11O6M1FWRmfZ/avMPHGf+EjuYc8R+WRj3iQ/wBa9i8jgn2rxbXLj+0dTmuj/wAtAnUAdEUdvpWtJa3OTG1LwUTAto2/tO0KHDeemD77q9zSCQxqZSGkI+ZgOp714xp8edZsVPe5jH/j4r3+W22TOvTDEd6dVbGeBlytmT9n9q4r4oR7PDVn/wBfo/8AQGr0jyK4H4tx7PDNj/1+j/0W9RTXvI6cVO9Jo4r4cDPjW2H/AExl/wDQDXr/ANn9q8i+G3/I72v/AFxm/wDQDXuktr5chX0+tVWWxhgZ2TRk/Z/ak+z+1ankUeRWVjv9qeMePDIni27tmbKRrCVAHTMSH+taXw7si97PdY4MTx9/7yGszx5IJfGt84OQY4P/AESldp8MrPd4Ye6x1u5Y88/3YzXQ17ljyISviObzOh+z+1At+RxWn5FKIORXNY9f2h4TjHxF08f9RGL/ANHCvr6y/wCQXF/1zP8AWvkJxj4kWA/6iUX/AKOFfXtj/wAguL/cP9a7FseDL4meUXMH79uOw/lUX2f2rXuIP3x+g/lUfkVyWPdVTQyzb/KeOxrl/BYx8Xph/wBNbT/0Cu7aD5W+hrhvB4x8YZ/+utp/6LFa0lucOOlzJH0jRRRW55wUUUUAFcp4hs/9PEo6FAOp65Y11dUdStRc259V+brjoKmSujSlPllc4vyKPIrV+z44/rSeQP8AJrGx2e0MvyKPIrU8gf5NHkD/ACaLB7Qy/Io8itTyB/k0GAY/+vRYPaHJ+JrttK0Z7hDh96qOM8HOeDXi0kO1QvoMV6T48v1utRFmmcWxZHyMc8EYPeuEuIsgnv3raCsjkqz5pFHSbZ5df08JjctzEf8Ax8V9DXUDG7mLfe3nP515V8MdJi1PxgY5QSIrdpRhyvKsuK9onhzcSH1YnrU1EXQly3MfyK83+M0ezwxYf9fw/wDRb1655A/ya8u+OUezwvp//X8vf/pm9TBamlWd4NHm3w3/AOR3tf8ArjN/6Aa+j9Qttl9Ivpjv7V84fDf/AJHe1/64zf8AoBr6l1OHN/Ifp39quaujKhLlZgeRQLfmtTyB/k0jIIlL+nvWVjpdQ+VtTvRqGoS3YBAdVHIx0UD+le1/Cu1I+Grluv8Aa0vQnoY0/wAK8GJxAx9Aa+nPAlgLXwIkf968Mn3s9Y1raWxxU376ZY8ilWD5hWn5A/yaVYBuH+NY2O32h8yT8fEyyH/USj/9HCvruwGdLi/3DXyNdDHxPtB/1E4//R9fXOn/APINh/3K3OB7nGywZkP0H8qZ5Fa0kHzn8O9N8gf5NYWO9VDKaD5G/wB0/wAq8z8JDHxkuB/01tP/AEWK9geAeW/+6e/tXkPhYY+M9wP+mtn/AOixWlNGFeXMkfRtFFFaHMFFFFABTXUOjKehGKdRQBwuvz3Gj3h8zyzHKWaLaMnaMdc455rD/wCEqx/A3/fA/wAa9Nv7GLULN7abd5bYyFYg8e9eTa9of2Sd7S8AMZxkI5PUZ61Dj2NYVEtJFz/hKv8AYb/vgf40f8JV/sN/3wP8a5hvDNiUJSI5PTMhqOLwvDjMsan/AHZDUcsjXnpnWDxVkgbG5/2B/jUOo+I5mtHijUZlQoxZBjawIPfrzWTbaVa2JJt0Zc+rE0s8XBx0+tXGPcynUT0ic7dQ5J9RWRPHgZ/OumniP4j3rMeye6nWGMDMnyjJPpVmR3Pwn0BIba811jmVDJb4DHG3ajDjHuau3fijy72ePY3yuR9wev1ru9KsVi8OwW3zHfbqGyxPOwDg+nFeb6roNvZ38qFDgu2MOTxmpkm9jSnJLcn/AOEr/wBh/wDvgf41wPxb1b+0vDNiNpG29B5UD/lm/vXU/wBmW391v++zXD/EjSCunwTxBfKEmDljuyFY/lUxi0ypzi1ZHNfDb/kd7X/rjN/6Aa+kfFWsf2df7dpO444UHt9a+bvht/yO9r/1xm/9ANfRHj7w/bX0kVzcxlhuJG1yOwqpK60Ig0nqZP8AwlX+w3/fA/xqjrHizbpkjbH6j+Aev1rM/wCEY0v/AJ4yf9/DWH4r8O20OiySWseMMudzk96hRdzVzhbQ8rl4tpB/sn+VfVtzKNB8F6cwBbzJI+nzdY/fHpXy7Z2/2q6S3I++GHXHY19QeMtK/tLwppkMqhoY2ifG4g5EbD+taPYxi0nqYv8AwlX+w3/fA/xpR4r+YfI3/fA/xrmv+EY07/nk3/fw01/C9kUPlxHf2zIcVlyyOjnpnmMknnfEixk/valEfzmFfXticaXEfRD/AFr45tAyePtPRuq6lEv5SivsS0BOkR4/55n+tbHM9zzyfxRtmI2N0H8A9PrUf/CVf7Df98D/ABrlpPDSyPulRN5AzhyO30pv/CLw/wBxP+/h/wAKx5ZHSpUzqm8VZRhsbkEfcHp9a4XwfJ53xhnf1ltP/RYq8/hiJY3YImVUkfvD2GfSue+F9xJdfEbzpcb2mtwcDHQEdPwq4JrczquLtyn1JRRRVmIUUUUAFFFFABWVr2kJq9gY/m8xclAG2gn3ODWrRQB5Jf2E+j3f2a68tSQGAV9xwTx6elRAgHr8pr1a+sItQhWKVnChg3ynHP8Ak1zeoeEVaYG1DurZLl5AOaAONdahZeo9RXTS+EtSAAihQ/WUU1fB+pFTvhTOO0ooA4u5iA4LKPTLYrvvAmgJbWg1FyTJNkHbIGU7XYdMe3rW1oHh6PS0Sdy4uSuJF37lz7VvUAFYPiXSft9r5qf65AAuXwuM5OeK3qQjII9aAPIuhxx+FQXlst5ZTWz52yxshwcHBGOv413934Wiur2SRvM2HGCJAO1Rf8Ibbes3/fwf4UAfPPhnRzo/xNjt1wY/Ln2fPuOAvfgV9UX9qL2ylgbOHXbwcfrXB678OUvJIry1Ez3cK7EVpwFwTzkYr0XtQB5JNH5U7x5BwSODnvUbAMuDnFd5rnh9tRvFnQMTgKfnA4Gf8az/APhD2/ut/wB/RQB4Dp2iLYfEuw0ssP8AWKP9YCfmi3dce/pX1JJb+bpIh7mLaOf9nFcRc+Brpdf0bUrWMs1ncGV90wwBsKjjvXoSA+WN3XHP1oA8ou4DaXktuxG6Ntpwc1FXc614fkv7+KSNSYyG8w7wMHtis9/CEgQ7EYt2zKKAPD/E2lNB470S7jI8lry2Xl8tuMmTxjpX01pwzpsA/wBmvOdf+H+oalaW4ihDS29wtxGPPAG5eRn2zXf+H4Lu10Cygv0RLpIwJVQ5UN7UAcZ4mtGt9VlYEbGxt5yfujrWNXoXiPSZtUhiEK7mTJGWx1rn/wDhEb3H+rH/AH9FAHOMMqR6jFcf4Yt0074wmIZKvPaheckfuwTn869Mfwnqwc7IIyvbMorJk8B68PGegapHbxeRbXfmXbGcfKoVQMDv0NAHrNFIudoz170tABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFc34+8QXfhXwRqWtWMcMlzaqhRZ1JQ5dVOQCD0J70UUAf//Z" transform="matrix(1 0 0 1 0 0)"/>
+	</g>
+</svg>
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/example/AuthApp/src/baseDialog.cpp	Wed Jun 23 19:51:49 2010 +0530
@@ -0,0 +1,356 @@
+/**
+* Copyright (c) 2010 Sasken Communication Technologies Ltd.
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the "{License}"
+* which accompanies  this distribution, and is available
+* at the URL "{LicenseUrl}".
+*
+* Initial Contributors:
+* Narasimhulu Kavadapu, Sasken Communication Technologies Ltd - Initial contribution
+*
+* Contributors:
+*
+* Description:
+* Base class of All dialogs
+*/
+
+
+#include <QNetworkCookie>
+#include <QNetworkRequest>
+#include <QNetworkReply>
+#include <QWebFrame>
+#include <QFile>
+#include <QDesktopServices>
+#include <QResizeEvent>
+#include <QDebug>
+#include <qmessagebox.h>
+#include <QNetworkAccessManager>
+#include <QPropertyAnimation>
+ #include <qnetworkproxy.h>
+#include <qdesktopwidget.h>
+#include <qapplication.h>
+//#include <qboxlayout.h>
+#include "baseDialog.h"
+#include "sessionSP.h"
+#include "errorCodes.h"
+
+static const QString kDefaultTitle = "Connect to Facebook";
+static const QString kStringBoundary = "3i2ndDfv2rTHiSisAbouNdArYfORhtTPEefj3q2f";
+
+static QNetworkAccessManager namanager;
+
+/////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+FBDialog::FBDialog() : iSession(FBSession::session()), /*iWebView ( this  ),*/ iIgnorePageLoadCompleteEvent( false )
+{
+    createControls();
+}
+
+FBDialog::FBDialog(FBSession* aSession) : iSession ( aSession ), /*iWebView ( this  ) ,*/ iIgnorePageLoadCompleteEvent ( false )
+{
+    createControls();
+}
+void FBDialog::createControls()
+{
+	iWebView = new QWebView(this);
+    iWebView->page()->setNetworkAccessManager(&namanager);
+
+    iWebView->page()->setLinkDelegationPolicy(QWebPage::DelegateAllLinks);
+    
+    layout = new QVBoxLayout(this);
+    
+    
+    progressbar = new QProgressBar(this);
+    
+    layout->addWidget(iWebView);
+    layout->addWidget(progressbar);
+    
+    setLayout(layout);
+    
+    progressbar->setOrientation(Qt::Horizontal);
+    
+
+    connect( iWebView->page(), SIGNAL(linkClicked(const QUrl &)),
+                    this, SLOT(linkClicked(const QUrl &)));
+
+    connect ( iWebView->page(), SIGNAL(loadFinished(bool)), this, SLOT(loadFinished(bool)));
+
+    connect ( iWebView->page(), SIGNAL(loadStarted()), this, SLOT ( loadStarted()));
+    
+    connect ( iWebView->page(), SIGNAL(loadProgress(int)), this, SLOT ( loadProgress(int)));
+    
+    connect (iWebView->page()->networkAccessManager(),SIGNAL( authenticationRequired( QNetworkReply*, QAuthenticator*)),this,SLOT( slotAuthenticationRequired( QNetworkReply*, QAuthenticator*)));
+    connect (iWebView->page()->networkAccessManager(),SIGNAL( sslErrors( QNetworkReply*,QList<QSslError>&)),this,SLOT( slotsslErrors( QNetworkReply*,QList<QSslError>&)) );
+    connect (iWebView->page()->networkAccessManager(),SIGNAL( proxyAuthenticationRequired(QNetworkProxy&, QAuthenticator*)),this,SLOT( slotproxyAuthenticationRequired(QNetworkProxy&, QAuthenticator*)) );
+    
+}
+QString FBDialog::generateURL( const QString& aUrl, const QHash<QString, QString>& aParams) const
+{
+    QString url ( aUrl );
+
+    QStringList pairs;
+    QHashIterator<QString, QString> i(aParams);
+
+    while (i.hasNext()) {
+        i.next();
+
+        QUrl url (i.value());
+        QString pair = i.key() + "=" + url.toEncoded();
+        pairs << pair.toUtf8();
+    }
+
+    if (pairs.count())
+    {
+        url = url + "?" + pairs.join("&");
+    }
+
+    return url;
+
+}
+
+QByteArray FBDialog::generatePostBody (const QHash<QString, QString>& aParams) const
+{
+    QByteArray body;
+
+    if (!aParams.count())
+        return body;
+
+
+    QString endLine = "\r\n--" + kStringBoundary + "\r\n", kStringBoundary;
+
+    QString tmp = "--" + kStringBoundary + "\r\n";
+    body.append(tmp.toUtf8());
+
+
+    QHashIterator<QString, QString> i(aParams);
+    while (i.hasNext()) {
+        i.next();
+
+        tmp = "Content-Disposition: form-data; name=\"" + i.key().toUtf8() + "\"\r\n\r\n" ;
+        body.append(tmp.toUtf8());
+        body.append(i.value().toUtf8());
+        body.append(endLine.toUtf8());
+    }
+
+    return body;
+}
+
+void FBDialog::postDismissCleanup()
+{
+    //accept();
+    // could also be reject()?
+}
+
+void FBDialog::dismiss (bool /*aAnimated*/) {
+    dialogWillDisappear();
+    iLoadingUrl.clear();
+
+    //todo: do some animations if aAnimated == true !
+    postDismissCleanup();
+}
+
+
+void FBDialog::dismissWithSuccess( bool aSuccess, bool aAnimated)
+{
+  if (aSuccess) {
+        emit dialogDidSucceed();
+  } else {
+        emit dialogDidCancel();
+  }
+
+  dismiss(aAnimated);
+}
+
+void FBDialog::dismissWithError (const FBError& aError, bool aAnimated)
+{
+  emit dialogDidFailWithError( aError );
+  dismiss(aAnimated);
+}
+void FBDialog::slotAuthenticationRequired( QNetworkReply* reply, QAuthenticator* authenticator )
+	{
+		QMessageBox msgbox;
+		QString msg ("Error!Authentication Required");
+		msgbox.setText(msg);
+	}
+void FBDialog::slotsslErrors( QNetworkReply* reply, const QList<QSslError>& errors  )
+	{
+		QMessageBox msgbox;
+		QString msg ("Error!SSL Error");
+		msgbox.setText(msg);
+	}
+void FBDialog::slotproxyAuthenticationRequired( const QNetworkProxy& proxy, QAuthenticator* authenticator  )
+	{
+		QMessageBox msgbox;
+		QString msg ("Error!Proxy Authenticatio Required");
+		msgbox.setText(msg);
+	}
+void FBDialog::cancel()
+{}
+
+void FBDialog::load() {}
+
+void FBDialog::show()
+{
+
+    load();
+    showMaximized();
+    dialogWillAppear();
+
+}
+
+void FBDialog::loadURL(const QString& aUrl, QNetworkAccessManager::Operation aMethod, const QHash<QString, QString>& aGetParams, const QHash<QString, QString>&  aPostParams)
+{   
+    //proxysettings();
+    iIgnorePageLoadCompleteEvent = false;
+
+    QNetworkCookieJar* cookieJar = iWebView->page()->networkAccessManager()->cookieJar();
+    QByteArray body;
+
+    iLoadingUrl = generateURL(aUrl, aGetParams);
+
+    // This "test cookie" is required by login.php, or it complains that you need to enable JavaScript
+    QNetworkCookie testCookie ("test_cookie", "1");
+    testCookie.setDomain ( "www.facebook.com" );
+    testCookie.setPath ( "/" );
+
+    QList<QNetworkCookie> cookieList;
+    cookieList.append(testCookie);
+
+    cookieJar->setCookiesFromUrl ( cookieList, QUrl(iLoadingUrl) );
+
+    QUrl url (iLoadingUrl);
+    QNetworkRequest request(url);
+
+    if (aMethod == QNetworkAccessManager::PostOperation)
+    {
+        const QString contentType = "multipart/form-data; boundary=" + kStringBoundary;
+        request.setHeader (QNetworkRequest::ContentTypeHeader, contentType);
+        body = generatePostBody (aPostParams);
+    }
+	#ifdef __WINSCW__ 
+    proxysettings();
+	#endif
+    
+    qDebug()<< "Check URL : " << iLoadingUrl;
+
+    iWebView->load ( request, aMethod, body);
+
+}
+void FBDialog::proxysettings()
+{
+
+	qDebug()<<"proxysettings";
+    QString httpProxy = "10.1.0.214";//ipwproxy.sasken.com
+    QString httpPort = "3128";
+
+    QString httpUser ="";/* This could be taken thru an QDialog implmentation to remove the Hard coding */
+    QString httpPass ="";/* This could be taken thru an QDialog implmentation to remove the Hard coding */
+
+    /*==Classes used from Network Module==*/
+    QNetworkProxy proxy;
+
+    proxy.setType(QNetworkProxy::HttpProxy);
+    proxy.setHostName(httpProxy);
+    proxy.setPort(httpPort.toInt());
+    proxy.setUser(httpUser);
+    proxy.setPassword(httpPass);
+
+    QNetworkProxy::setApplicationProxy(proxy);
+
+}
+void FBDialog::dialogWillAppear() {}
+
+void FBDialog::dialogWillDisappear() {}
+
+void FBDialog::dialogDidSucceed (const QUrl& /*aUrl*/) {
+  dismissWithSuccess(true,true);
+}
+
+/////////////////////////////////////////////////////////////////////////////////////////////////////////////
+void FBDialog::linkClicked ( const QUrl & url )
+ {
+
+        qDebug() << "Loading the url: " <<  url;
+        proxysettings();
+        iWebView->load(url);
+}
+
+void FBDialog::loadStarted()
+{
+    qDebug() << "Load started: " << iWebView->url();
+    progressbar->setVisible(true);
+}
+void FBDialog::loadProgress(int progress)
+{
+	progressbar->setValue(progress);
+}
+void FBDialog::GetSessionKey(const QUrl& aUrl)
+{
+
+}
+void FBDialog::loadFinished ( bool ok )
+{
+    qDebug() << "Load " << (ok ? "" : "un") << "successfull for: " << iWebView->url();
+    progressbar->setVisible(false);
+    if (ok)
+    {
+		QString PAth = iWebView->url().toString();
+		PAth = PAth.mid(0,PAth.indexOf("?"));
+		
+		qDebug() << "Path is : " << PAth;
+		
+		if(KSuccessurl.compare(PAth) == 0){
+		
+			QByteArray URL = iWebView->url().encodedQuery();
+			qDebug() << "Encoded Query is : " << URL;
+			
+			if(URL.contains("auth_token"))
+				{
+					iWebView->setHidden(true);
+					QMessageBox msgbox;
+					QString msg ("Logged in Success!!!Complete the Authorization?");
+					msgbox.setText(msg);
+					if(msgbox.exec() == QMessageBox::Ok){
+						GetSessionKey(iWebView->url());
+					}else{
+						
+					}
+				}
+			else
+				{
+					iWebView->setHidden(true);
+					QMessageBox msgbox;
+					QString msg ("Permissions Success!!!continue login?");
+					msgbox.setText(msg);
+					if(msgbox.exec() == QMessageBox::Ok){
+						iWebView->setHidden(false);
+						load();
+					}else{
+						
+					}
+				}
+		}
+        /*else if (URL.contains("read_stream") || URL.contains("publish_stream") || URL.contains("offline_access"))
+        	{
+				iWebView->setHidden(true);
+				QMessageBox msgbox;
+				QString msg ("Permissions Success!!!continue login?");
+				msgbox.setText(msg);
+				if(msgbox.exec() == QMessageBox::Ok){
+					iWebView->setHidden(false);
+					load();
+				}else{
+					
+				}
+        	}*/
+    }
+    else
+    {
+        if (iIgnorePageLoadCompleteEvent)
+            return;
+
+        FBError err;
+        dismissWithError(err, true);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/example/AuthApp/src/loginDialog.cpp	Wed Jun 23 19:51:49 2010 +0530
@@ -0,0 +1,152 @@
+/**
+* Copyright (c) 2010 Sasken Communication Technologies Ltd.
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the "{License}"
+* which accompanies  this distribution, and is available
+* at the URL "{LicenseUrl}".
+*
+* Initial Contributors:
+* Narasimhulu Kavadapu, Sasken Communication Technologies Ltd - Initial contribution
+*
+* Contributors:
+*
+* Description:
+* Login Dialog class of Authentication Application
+*/
+
+#include "authAppConstants.h"
+#include "sessionSP.h"
+#include "errorCodes.h"
+#include "loginDialog.h"
+
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+// global
+
+static const QString kLoginURL = "http://www.facebook.com/login.php";
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+void FBLoginDialog::connectToGetSession(const QString& aToken)
+{
+    iGetSessionRequest = FBRequest::requestWithSession(iSession);
+
+    connect(iGetSessionRequest, SIGNAL(requestDidLoad(QVariant)), this, SLOT(requestDidLoad(QVariant)));
+    connect(iGetSessionRequest, SIGNAL(requestFailedWithNetworkError(QNetworkReply::NetworkError)), this, SLOT(requestFailedWithNetworkError(QNetworkReply::NetworkError)));
+    connect(iGetSessionRequest, SIGNAL(requestFailedWithFacebookError(FBError)), this, SLOT(requestFailedWithFacebookError(FBError)));
+
+    Dictionary params;
+    params["auth_token"] = aToken;
+
+    if (iSession->apiSecret().length())
+    {
+        params["generate_session_secret"]="1";
+    }
+
+    if (iSession->getSessionProxy().length())
+    {
+        iGetSessionRequest->post(iSession->getSessionProxy(),params);
+    }
+    else
+    {
+        iGetSessionRequest->call("facebook.auth.getSession", params);
+    }
+}
+
+void FBLoginDialog::loadLoginPage()
+{
+    Dictionary getParams, postParams;
+
+    getParams["fbconnect"] = "1";
+	
+    #ifdef __WINSCW__ 
+		getParams["connect_display"] = "touch";
+	#else
+		getParams["connect_display"] = "popup";
+	#endif
+		
+    getParams["api_key"] = iSession->apiKey();
+    getParams["next"] = KSuccessurl;
+    getParams["cancel_url"] = "http://www.facebook.com/connect/login_failure.html";
+    getParams["req_perms"] = "read_stream,publish_stream,offline_access";
+
+    loadURL(kLoginURL,QNetworkAccessManager::GetOperation, getParams, postParams);
+
+}
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+FBLoginDialog::FBLoginDialog() : FBDialog () {}
+
+FBLoginDialog::FBLoginDialog(FBSession* aSession) : FBDialog(aSession) {}
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+// FBDialog
+
+void FBLoginDialog::load()
+{
+    loadLoginPage();
+}
+
+void FBLoginDialog::dialogWillDisappear()
+{
+  iGetSessionRequest->cancel();
+
+  if (!iSession->isConnected())
+  {
+      iSession->cancelLogin();
+  }
+}
+
+void FBLoginDialog::GetSessionKey(const QUrl& aUrl)
+{
+    const QString authToken = "auth_token=";
+    const QString url ( aUrl.toString() );
+
+    int start = url.indexOf(authToken);
+    if (start != -1)
+    {
+        QString token;
+        int end = url.indexOf("&", start);
+        int delta = start + authToken.size() + 1;
+        if (end != -1)
+        {
+            token = url.mid(delta, end - delta );
+        }
+        else
+        {
+            token = url.right(url.size() - delta + 1);
+        }
+
+        connectToGetSession(token);
+    }
+}
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+// slots for signals from FBRequest
+
+void FBLoginDialog::requestDidLoad(const QVariant& aResult)
+{
+    bool conversionError = false;
+    QVariantHash object = aResult.toHash();
+    QString sessionKey = object.value("session_key").toString();
+    QString sessionSecret = object.value("secret").toString();
+
+    QVariant ex = object.value("expires");
+    uint expires = object.value("expires").toUInt(&conversionError);
+    QDateTime expiration; expiration.setTime_t( expires );
+
+    iSession->beginSession(sessionKey, sessionSecret,expiration);
+    iSession->resume();
+
+    dismissWithSuccess(true, true);
+}
+
+void FBLoginDialog::requestFailedWithFacebookError (const FBError& aCode )
+{
+    dismissWithError(aCode, true);
+}
+
+void FBLoginDialog::requestFailedWithNetworkError( QNetworkReply::NetworkError aCode )
+{
+    dismissWithError(aCode, true);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/example/AuthApp/src/requestSP.cpp	Wed Jun 23 19:51:49 2010 +0530
@@ -0,0 +1,357 @@
+/**
+* Copyright (c) 2010 Sasken Communication Technologies Ltd.
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the "{License}"
+* which accompanies  this distribution, and is available
+* at the URL "{LicenseUrl}".
+*
+* Initial Contributors:
+* Narasimhulu Kavadapu, Sasken Communication Technologies Ltd - Initial contribution
+*
+* Contributors:
+*
+* Description:
+* class to handle calls to rest Server API's
+*/
+
+#include "requestSP.h"
+#include "sessionSP.h"
+#include "xmlParser.h"
+#include "errorCodes.h"
+
+#include <QNetworkRequest>
+#include <QXmlSimpleReader>
+#include <QXmlInputSource>
+#include <QCryptographicHash>
+#include <QtAlgorithms>
+#include <QDebug>
+///////////////////////////////////////////////////////////////////////////////////////////////////
+// global
+
+static const QString kAPIVersion = "1.0";
+static const QString kAPIFormat = "XML";
+static const char kUserAgent[] = "FacebookConnect";
+static const QString kStringBoundary = "3i2ndDfv2rTHiSisAbouNdArYfORhtTPEefj3q2f";
+
+static const double kTimeoutInterval = 180.0;
+
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+static bool caseInsensitiveLessThan(const QString &s1, const QString &s2)
+{
+    return s1.toLower() < s2.toLower();
+}
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+// Static class functions
+
+FBRequest* FBRequest::request()
+{
+    return FBRequest::requestWithSession(FBSession::session());
+}
+
+FBRequest* FBRequest::requestWithSession (FBSession* aSession)
+{
+    FBRequest* request = new FBRequest(aSession);
+    return request;
+}
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+// instance public functions
+FBRequest::FBRequest(FBSession* aSession) : iSession ( aSession ), iNetworkAccessManager ( this )
+{}
+
+const QDateTime& FBRequest::timeStamp() const
+{
+    return iTimestamp;
+}
+
+void FBRequest::connect()
+{
+    emit requestLoading();
+
+    QString url ;
+    if (iMethod.length())
+        url = iUrl;
+    else
+        url = generateGetURL();
+
+    QNetworkRequest request;
+    request.setUrl(QUrl(url));
+    request.setRawHeader("User-Agent", kUserAgent);
+
+    /* from the Qt docs on QNetworkAccessManager:
+       QNetworkAccessManager by default does not have a set cache.
+       Qt provides a simple disk cache, QNetworkDiskCache, which can be used.
+
+       However we will not use it.*/
+
+    request.setAttribute(QNetworkRequest::CacheLoadControlAttribute, QNetworkRequest::AlwaysNetwork);
+    request.setAttribute(QNetworkRequest::CacheSaveControlAttribute, false);
+
+    iTimestamp = QDateTime::currentDateTime();
+
+    //if (iMethod.length())
+    //{
+        const QString contentType = "multipart/form-data; boundary=" + kStringBoundary;
+        request.setRawHeader("Content-Type", contentType.toUtf8());
+
+        /* connect all signals from iNetWorkAccessManager to this */
+        QByteArray postBody ;
+        generatePostBody (postBody);
+        
+        pbar = new progressbar;
+        pbar->show();
+        
+        QNetworkReply* reply = iNetworkAccessManager.post(request, postBody);
+
+        QObject::connect(reply, SIGNAL(finished()),  this, SLOT(networkReplyFinished()));
+        QObject::connect(reply, SIGNAL(error(QNetworkReply::NetworkError)),
+                         this, SLOT(networkReplyError(QNetworkReply::NetworkError)));
+
+    //}
+}
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+// instance private functions
+QString FBRequest::md5(const QString& aData)
+{
+    QByteArray byteArray;
+    byteArray.insert(0, aData.toUtf8());
+
+    QByteArray md5Hash = QCryptographicHash::hash(byteArray,QCryptographicHash::Md5 ).toHex();
+    QString returnString ( md5Hash );
+
+    return returnString;
+}
+
+bool FBRequest::isSpecialMethod() const {
+    return ( iMethod.compare("facebook.auth.getSession", Qt::CaseInsensitive) == 0
+             ||   iMethod.compare("facebook.auth.createToken", Qt::CaseInsensitive) == 0 );
+}
+
+QString FBRequest::urlForMethod (const QString& aMethod) const {
+
+	return iSession->apiURL();
+}
+
+QString FBRequest::generateGetURL() const
+{
+    const QUrl url(iUrl);
+    const QString queryPrefix = url.hasQuery() ? "&" : "?";
+
+    QStringList pairs;
+    DictionaryIterator i(iParams);
+
+    while (i.hasNext()) {
+        i.next();
+        pairs << i.key().toUtf8() + "=" + i.value().toUtf8();
+    }
+
+    return iUrl + queryPrefix + pairs.join("&");
+}
+
+QString FBRequest::generateCallId() const {
+    QDateTime dateTime = QDateTime::currentDateTime();
+    uint secs = dateTime.toTime_t();
+    QString result = QString::number(secs, 10);
+    return result;
+}
+
+QString FBRequest::generateSig()
+{
+    QString joined;
+    QStringList keys = iParams.keys();
+
+    qSort(keys.begin(), keys.end(), caseInsensitiveLessThan);
+
+    QListIterator<QString> i(keys);
+    while (i.hasNext())
+    {
+        const QString key = i.next();
+        joined.append(key.toUtf8());
+        joined.append("=");
+        joined.append(iParams.value(key).toUtf8());
+    }
+
+    if (isSpecialMethod())
+    {
+        if (iSession->apiSecret().length())
+        {
+            joined.append(iSession->apiSecret());
+        }
+    }
+    else if (iSession->sessionSecret().length())
+    {
+        joined.append(iSession->sessionSecret());
+    }
+    else if (iSession->apiSecret().length())
+    {
+        joined.append(iSession->apiSecret());
+    }
+
+    return md5(joined);
+}
+
+void FBRequest::generatePostBody( QByteArray& body )
+{
+    QString endLine = "\r\n--" + kStringBoundary + "\r\n";
+    body.append( "--" + kStringBoundary.toUtf8() + "\r\n" ) ;
+
+
+    DictionaryIterator i (iParams);
+
+    while (i.hasNext())
+    {
+        i.next();
+
+        body.append("Content-Disposition: form-data; name=\"" + i.key().toUtf8() + "\"\r\n\r\n" );
+        body.append(i.value().toUtf8());
+        body.append(endLine.toUtf8());
+    }
+
+
+    if (iDataParam.size())
+    {
+        if (iDataParamPicture)
+        {
+            body.append("Content-Disposition: form-data; filename=\"photo\"\r\n" );
+            body.append("Content-Type: image/png\r\n\r\n" );
+        }
+        else
+        {
+            body.append("Content-Disposition: form-data; filename=\"data\"\r\n");
+            body.append("Content-Type: content/unknown\r\n\r\n");
+        }
+
+        body.append(iDataParam);
+        body.append(endLine.toUtf8());
+
+    }
+}
+
+void FBRequest::handleResponseData( const QByteArray& aResponseData )
+{
+    FBError error;
+    QVariant result =  parseXMLResponse( aResponseData, error);
+    if (error.code() != 0)
+    {
+        emit requestFailedWithFacebookError(error);
+    }
+    else
+    {
+        emit requestDidLoad(result);
+    }
+    
+    delete pbar;
+}
+
+void FBRequest::post( const QString& aUrl, const Dictionary& aParams)
+{
+    iUrl = aUrl;
+    iParams = aParams;
+
+    iSession->send(this);
+}
+
+void FBRequest::cancel()
+{
+
+}
+
+
+void FBRequest::call (const QString& aMethod, const Dictionary& aParams)
+{
+    QByteArray dataParams;
+    callWithDataParams(aMethod, aParams, dataParams, false);
+
+}
+
+void FBRequest::callWithDataParams (const QString& aMethod, const Dictionary& aParams, const QByteArray& aDataParam, bool aDataParamPicture)
+{
+    iUrl = urlForMethod(aMethod);
+    iMethod = aMethod;
+    iParams = aParams;
+    iDataParam = aDataParam;
+    iDataParamPicture = aDataParamPicture;
+
+    iParams["method"] = iMethod;
+    iParams["api_key"] = iSession->apiKey();
+    iParams["v"] = kAPIVersion;
+    iParams["format"] = kAPIFormat;
+
+    if (!isSpecialMethod())
+    {
+        iParams["session_key"] = iSession->sessionKey();
+        iParams["call_id"] = generateCallId();
+
+        if (iSession->sessionSecret().length())
+        {
+            iParams["ss"] = "1";
+        }
+    }
+
+    // XXX: workaround what seems to be a Qt bug with the extras-devel libraries.
+    QString signature = generateSig();
+    iParams["sig"] = signature;
+    // XXX: end workaround.
+    iSession->send(this);
+}
+
+
+QVariant FBRequest::parseXMLResponse ( const QByteArray& aResponseData, FBError& aError)
+{
+    QXmlInputSource input;
+    input.setData(aResponseData);
+
+    FBXMLHandler handler;
+    QXmlSimpleReader parser;
+    parser.setContentHandler(&handler);
+    bool result = parser.parse(&input);
+
+    QVariant rootObject = handler.rootObject();
+
+    if (handler.parseError() || !result)
+    {
+        aError.setCode( FBRESPONSE_PARSE_ERROR );
+        aError.setDescription("parser was unable to parse the xml response from facebook server.");
+
+        return QVariant();
+    }
+    else if (handler.rootName().compare("error_response")==0)
+    {
+        QVariantHash errorDict =  rootObject.toHash();
+
+        bool result;
+        int errorCode = errorDict.value("error_code").toInt(&result);
+
+        aError.setCode( errorCode );
+        aError.setDescription( errorDict.value("error_msg").toString() );
+
+        return rootObject;
+    }
+    else
+    {
+        return rootObject;
+    }
+
+}
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+// instance provate slots
+void FBRequest::networkReplyError ( QNetworkReply::NetworkError aCode )
+{
+    emit requestFailedWithNetworkError(aCode );
+}
+
+void FBRequest::networkReplyFinished ()
+{
+
+    QNetworkReply* reply = static_cast<QNetworkReply*> ( sender() );
+    QByteArray responseData = reply->readAll();
+
+    handleResponseData ( responseData );
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/example/AuthApp/src/sessionSP.cpp	Wed Jun 23 19:51:49 2010 +0530
@@ -0,0 +1,232 @@
+/**
+* Copyright (c) 2010 Sasken Communication Technologies Ltd.
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the "{License}"
+* which accompanies  this distribution, and is available
+* at the URL "{LicenseUrl}".
+*
+* Initial Contributors:
+* Narasimhulu Kavadapu, Sasken Communication Technologies Ltd - Initial contribution
+*
+* Contributors:
+*
+* Description:
+* class to maintian session & all credential keys.
+*/
+
+#include "sessionSP.h"
+#include "requestSP.h"
+#include <qfile.h>
+#include <QTimer>
+#include <qdebug.h>
+///////////////////////////////////////////////////////////////////////////////////////////////////
+// global
+
+static const QString kAPIRestURL = "http://api.facebook.com/restserver.php";
+static const QString kAPIRestSecureURL = "https://api.facebook.com/restserver.php";
+
+static const int kMaxBurstRequests = 3;
+static const int kBurstDuration = 2;
+
+static FBSession* sharedSession = NULL;
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+// Static class functions
+FBSession* FBSession::session()
+{
+    return sharedSession;
+}
+
+void FBSession::setSession(FBSession* aSession)
+{
+    sharedSession = aSession;
+}
+
+
+FBSession* FBSession::sessionForApplication ( const QString& aAppKey, const QString& aAppSecret, const QString& aSessionProxy)
+{
+    FBSession* session = new FBSession ( aAppKey, aAppSecret, aSessionProxy );
+    
+    return session;
+}
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+// instance public functions
+FBSession::FBSession( const QString& aAppKey, const QString& aAppSecret, const QString& aGetSessionProxy ) :
+        iApiKey (aAppKey),
+        iApiSecret ( aAppSecret ),
+        iGetSessionProxy ( aGetSessionProxy ),
+        iRequestBurstCount(0),
+        m_Client(new SmfCredMgrClient(this))	
+{
+    if (!sharedSession)
+    {
+        sharedSession = this;
+    }
+    
+}
+
+FBSession::~FBSession()
+{
+	if(m_Client){
+		delete m_Client;
+		m_Client = NULL;
+	}
+}
+
+const QString& FBSession::apiURL() const
+{
+    return kAPIRestURL;
+}
+
+const QString& FBSession::apiSecureURL() const
+{
+    return kAPIRestSecureURL;
+}
+
+bool FBSession::isConnected() const
+{
+    return iSessionKey.length() > 0 ;
+}
+
+
+void FBSession::beginSession (const QString& aSessionKey, const QString& aSessionSecret, const QDateTime& aExpires )
+{
+    iSessionKey = aSessionKey;
+    iSessionSecret = aSessionSecret;
+
+
+    iExpirationDate = aExpires;
+
+    save();
+}
+
+bool FBSession::resume()
+{
+	QString CMRegToken = iSettings.value("CMRegToken").toString();
+	QDateTime ExpiryTime = iSettings.value("ExpiryTime").toDateTime();
+	SmfAuthParams Params;
+	if(m_Client->AuthDataSet(CMRegToken,ExpiryTime,Params))
+	{
+		QByteArray accessToken = Params.value("accessToken");
+		emit sessionDidLogin( accessToken );
+        return true;
+    }
+    return false;
+}
+
+void FBSession::cancelLogin() {
+    if (!isConnected()) {
+        emit sessionDidNotLogin();
+    }
+}
+
+void FBSession::logout() {
+
+	iExpirationDate = QDateTime();
+	iSessionKey.clear();
+	iSessionSecret.clear();
+	
+	unsave();
+	
+	emit sessionDidLogout();
+}
+
+void FBSession::send (FBRequest* aRequest) {
+    performRequest (aRequest, true);
+}
+
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+// instance private functions
+void FBSession::save()
+{
+  
+    SmfAuthParams Params;
+    Params.insert("accessToken",iSessionKey.toAscii());
+    
+    QList<QUrl> UrlList;
+    UrlList.append(QUrl("http://www.facebook.com"));
+    
+    QStringList PluginList;
+    PluginList.append(QString("facebook"));
+    
+    QString UID("0xEFE2FD23");
+    
+    //Currently Hardcoded with current time bcoz CM is not handling expiry time as '0' value
+    iExpirationDate = QDateTime::currentDateTime();
+    iExpirationDate.addYears(1);
+    
+    QString CMRegToken = m_Client->StoreAuthData(Params,iExpirationDate,UrlList,PluginList,UID,true);
+    
+    if(CMRegToken.size()){
+    	iSettings.setValue("CMRegToken", CMRegToken);
+    	iSettings.setValue("ExpiryTime", iExpirationDate);
+    }
+}
+
+void FBSession::unsave()
+{
+	//Delete saved keys from Credential Manager.
+}
+
+void FBSession::startFlushTimer()
+{
+	int t = kBurstDuration;
+    QTimer::singleShot( t, this, SLOT(requestTimerReady()));
+}
+
+void FBSession::enqueueRequest(FBRequest* aRequest)
+{
+    iRequestQueue.append(aRequest);
+    startFlushTimer();
+}
+
+bool FBSession::performRequest(FBRequest* aRequest, bool aEnqueue) {
+    // Stagger requests that happen in short bursts to prevent the server from rejecting
+    // them for making too many requests in a short time
+
+    int seconds = iLastRequestTime.secsTo( QDateTime::currentDateTime() );
+	bool burst = seconds && (seconds < kBurstDuration);
+
+	if (burst && (iRequestBurstCount > kMaxBurstRequests))
+    {
+        if (aEnqueue)
+        {
+            enqueueRequest(aRequest);
+        }
+        return false;
+    }
+    else
+    {
+        aRequest->connect();
+		if (burst) {
+			iRequestBurstCount++;
+		} else {
+            iRequestBurstCount = 1;
+            iLastRequestTime = aRequest->timeStamp();
+        }
+    }
+    return true;
+}
+
+void FBSession::flushRequestQueue()
+{
+    while ( iRequestQueue.count() ) {
+      FBRequest* request = iRequestQueue.at(0);
+      if (performRequest(request, false)) {
+          iRequestQueue.removeAt(0);
+      } else {
+        startFlushTimer();
+        break;
+      }
+    }
+}
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+// instance provate slots
+void FBSession::requestTimerReady()
+{
+    flushRequestQueue();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/example/AuthApp/src/xmlParser.cpp	Wed Jun 23 19:51:49 2010 +0530
@@ -0,0 +1,208 @@
+/**
+* Copyright (c) 2010 Sasken Communication Technologies Ltd.
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the "{License}"
+* which accompanies  this distribution, and is available
+* at the URL "{LicenseUrl}".
+*
+* Initial Contributors:
+* Narasimhulu Kavadapu, Sasken Communication Technologies Ltd - Initial contribution
+*
+* Contributors:
+*
+* Description:
+* XML Parser class
+*/
+#include "xmlParser.h"
+
+#include <QVariantList>
+///////////////////////////////////////////////////////////////////////////////////////////////////
+// instance public functions
+
+FBXMLHandler::FBXMLHandler() : iError(false)
+{
+    initWhiteSpaceHash();
+}
+
+FBXMLHandler::~FBXMLHandler()
+{
+    iWhiteSpaceAndNewLineCharSet.clear();
+}
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+// instance private functions
+
+void FBXMLHandler::initWhiteSpaceHash()
+{
+    iWhiteSpaceAndNewLineCharSet.insert(QChar(0x20), true);
+    iWhiteSpaceAndNewLineCharSet.insert(QChar(0x9), true);
+    iWhiteSpaceAndNewLineCharSet.insert(QChar(0xA), true);
+    iWhiteSpaceAndNewLineCharSet.insert(QChar(0xB), true);
+    iWhiteSpaceAndNewLineCharSet.insert(QChar(0xC), true);
+    iWhiteSpaceAndNewLineCharSet.insert(QChar(0xD), true);
+    iWhiteSpaceAndNewLineCharSet.insert(QChar(0x85), true);
+}
+
+/* methods from QXmlErrorHandler */
+bool FBXMLHandler::error(const QXmlParseException& exception)
+{
+    iParseErrorMessage = exception.message();
+    iError = true;
+    return false;
+}
+
+bool FBXMLHandler::fatalError(const QXmlParseException& exception)
+{
+    iParseErrorMessage = exception.message();
+    iError = true;
+    return false;
+}
+
+/* methods from QXmlDefaultHandler */
+bool FBXMLHandler::startElement( const QString & /*namespaceURI*/,
+                                 const QString & localName,
+                                 const QString & /*qName*/,
+                                 const QXmlAttributes & atts)
+{
+    flushCharacters();
+
+    QVariant item ;
+
+    if  (atts.value("list").compare("true")==0)
+    {
+        item = QVariantList();
+    }
+
+    iStack.append(item);
+    iNameStack.append(localName);
+
+    return true;
+}
+
+bool FBXMLHandler::characters(const QString& aText)
+{
+    iChars.append(aText);
+    return true;
+}
+
+bool FBXMLHandler::endElement( const QString & /*namespaceURI*/,
+                               const QString & /*localName*/,
+                               const QString & /*qName*/ )
+{
+    flushCharacters();
+
+    QVariant c = iStack [iStack.count() - 1] ;
+    QString name = topName();
+
+    iStack.removeLast();
+    iNameStack.removeLast();
+
+    if (!iStack.count())
+    {
+        iRootObject = c;
+        iRootName = name;
+    }
+    else
+    {
+        QVariant tC = iStack[iStack.count() - 1] ;
+        if (tC.isNull())
+        {
+            tC = QVariantHash();
+            iStack.replace(iStack.count() - 1, tC);
+        }
+
+        if (tC.type() == QVariant::List)
+        {
+            QVariantList list = tC.toList();
+            list.append( c.toHash() );
+
+            iStack.replace( iStack.count() - 1 , list);
+
+        }
+        else if (tC.type() == QVariant::Hash)
+        {
+            QVariantHash hash = tC.toHash();
+            if (c.isNull())
+            {
+                c  = QString("");
+            }
+            hash.insert( name, c );
+
+            iStack.replace( iStack.count() - 1 , hash);
+        }
+    }
+
+    return true;
+}
+
+
+/* */
+const QString& FBXMLHandler::topName() const
+{
+    return iNameStack.last();
+}
+
+QVariant FBXMLHandler::topObject(bool /*aCreate*/)
+{
+    QVariant item ;
+    {
+        iStack.replace(iStack.count() - 1, item);
+    }
+    return item;
+}
+
+QVariant FBXMLHandler::topContainer()
+{
+    if (iStack.count() < 2)
+    {
+        return QVariant();
+    }
+    else
+    {
+
+        QVariant item = iStack[iStack.count() - 2 ];
+        {
+            iStack.replace( iStack.count() - 2 , item);
+        }
+
+        return item;
+    }
+}
+
+void FBXMLHandler::flushCharacters()
+{
+    for ( int i = 0; i < iChars.length(); i ++)
+    {
+        QChar uniChar = iChars.at(i);
+
+        if (!iWhiteSpaceAndNewLineCharSet.contains(uniChar))
+        {
+
+            QVariant container;
+            if (iStack.count() >= 2)
+            {
+                container = iStack[iStack.count() - 2];
+                if (container.isNull())
+                {
+                    container = QVariantHash();
+                    iStack.replace( iStack.count() - 2 , container);
+                }
+            }
+
+            if (container.type() == QVariant::List)
+            {                
+                QVariantHash object;
+                object.insert( topName(), iChars );
+                iStack.replace (iStack.count() - 1, object);
+            } else {
+                QVariant object(iChars);
+                iStack.replace (iStack.count() - 1, object);
+            }
+            break;
+        }
+
+    }
+
+    iChars.clear();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/example/AuthApp/ui_AuthApp.h	Wed Jun 23 19:51:49 2010 +0530
@@ -0,0 +1,82 @@
+/********************************************************************************
+** Form generated from reading UI file 'AuthApp.ui'
+**
+** Created: Tue Jun 22 13:45:16 2010
+**      by: Qt User Interface Compiler version 4.6.3
+**
+** WARNING! All changes made in this file will be lost when recompiling UI file!
+********************************************************************************/
+
+#ifndef UI_AUTHAPP_H
+#define UI_AUTHAPP_H
+
+#include <QtCore/QVariant>
+#include <QtGui/QAction>
+#include <QtGui/QApplication>
+#include <QtGui/QButtonGroup>
+#include <QtGui/QHeaderView>
+#include <QtGui/QMainWindow>
+#include <QtGui/QPushButton>
+#include <QtGui/QSpacerItem>
+#include <QtGui/QVBoxLayout>
+#include <QtGui/QWidget>
+
+QT_BEGIN_NAMESPACE
+
+class Ui_AuthAppClass
+{
+public:
+    QWidget *centralWidget;
+    QVBoxLayout *verticalLayout;
+    QPushButton *buttonForget;
+    QPushButton *pushButton;
+    QSpacerItem *verticalSpacer;
+
+    void setupUi(QMainWindow *AuthAppClass)
+    {
+        if (AuthAppClass->objectName().isEmpty())
+            AuthAppClass->setObjectName(QString::fromUtf8("AuthAppClass"));
+        AuthAppClass->resize(275, 310);
+        centralWidget = new QWidget(AuthAppClass);
+        centralWidget->setObjectName(QString::fromUtf8("centralWidget"));
+        verticalLayout = new QVBoxLayout(centralWidget);
+        verticalLayout->setSpacing(6);
+        verticalLayout->setContentsMargins(11, 11, 11, 11);
+        verticalLayout->setObjectName(QString::fromUtf8("verticalLayout"));
+        buttonForget = new QPushButton(centralWidget);
+        buttonForget->setObjectName(QString::fromUtf8("buttonForget"));
+
+        verticalLayout->addWidget(buttonForget);
+
+        pushButton = new QPushButton(centralWidget);
+        pushButton->setObjectName(QString::fromUtf8("pushButton"));
+
+        verticalLayout->addWidget(pushButton);
+
+        verticalSpacer = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding);
+
+        verticalLayout->addItem(verticalSpacer);
+
+        AuthAppClass->setCentralWidget(centralWidget);
+
+        retranslateUi(AuthAppClass);
+
+        QMetaObject::connectSlotsByName(AuthAppClass);
+    } // setupUi
+
+    void retranslateUi(QMainWindow *AuthAppClass)
+    {
+        AuthAppClass->setWindowTitle(QApplication::translate("AuthAppClass", "MainWindow", 0, QApplication::UnicodeUTF8));
+        buttonForget->setText(QApplication::translate("AuthAppClass", "Logout", 0, QApplication::UnicodeUTF8));
+        pushButton->setText(QApplication::translate("AuthAppClass", "Login to facebook", 0, QApplication::UnicodeUTF8));
+    } // retranslateUi
+
+};
+
+namespace Ui {
+    class AuthAppClass: public Ui_AuthAppClass {};
+} // namespace Ui
+
+QT_END_NAMESPACE
+
+#endif // UI_AUTHAPP_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/example/AuthApp/ui_progressbar.h	Wed Jun 23 19:51:49 2010 +0530
@@ -0,0 +1,75 @@
+/********************************************************************************
+** Form generated from reading UI file 'progressbar.ui'
+**
+** Created: Tue Jun 22 13:45:04 2010
+**      by: Qt User Interface Compiler version 4.6.3
+**
+** WARNING! All changes made in this file will be lost when recompiling UI file!
+********************************************************************************/
+
+#ifndef UI_PROGRESSBAR_H
+#define UI_PROGRESSBAR_H
+
+#include <QtCore/QVariant>
+#include <QtGui/QAction>
+#include <QtGui/QApplication>
+#include <QtGui/QButtonGroup>
+#include <QtGui/QHeaderView>
+#include <QtGui/QLabel>
+#include <QtGui/QProgressBar>
+#include <QtGui/QVBoxLayout>
+#include <QtGui/QWidget>
+
+QT_BEGIN_NAMESPACE
+
+class Ui_progressbarClass
+{
+public:
+    QVBoxLayout *verticalLayout;
+    QLabel *label;
+    QProgressBar *progressBar;
+
+    void setupUi(QWidget *progressbarClass)
+    {
+        if (progressbarClass->objectName().isEmpty())
+            progressbarClass->setObjectName(QString::fromUtf8("progressbarClass"));
+        verticalLayout = new QVBoxLayout(progressbarClass);
+        verticalLayout->setSpacing(6);
+        verticalLayout->setContentsMargins(11, 11, 11, 11);
+        verticalLayout->setObjectName(QString::fromUtf8("verticalLayout"));
+        label = new QLabel(progressbarClass);
+        label->setObjectName(QString::fromUtf8("label"));
+
+        verticalLayout->addWidget(label);
+
+        progressBar = new QProgressBar(progressbarClass);
+        progressBar->setObjectName(QString::fromUtf8("progressBar"));
+        progressBar->setValue(24);
+
+        verticalLayout->addWidget(progressBar);
+
+
+        retranslateUi(progressbarClass);
+
+        QMetaObject::connectSlotsByName(progressbarClass);
+    } // setupUi
+
+    void retranslateUi(QWidget *progressbarClass)
+    {
+        progressbarClass->setWindowTitle(QApplication::translate("progressbarClass", "progressbar", 0, QApplication::UnicodeUTF8));
+        label->setText(QApplication::translate("progressbarClass", "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n"
+"<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
+"p, li { white-space: pre-wrap; }\n"
+"</style></head><body style=\" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;\">\n"
+"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:10pt;\">Loading,Please wait.....</span></p></body></html>", 0, QApplication::UnicodeUTF8));
+    } // retranslateUi
+
+};
+
+namespace Ui {
+    class progressbarClass: public Ui_progressbarClass {};
+} // namespace Ui
+
+QT_END_NAMESPACE
+
+#endif // UI_PROGRESSBAR_H
--- a/example/example.pro	Mon Jun 07 11:43:45 2010 +0100
+++ b/example/example.pro	Wed Jun 23 19:51:49 2010 +0530
@@ -1,5 +1,7 @@
 TEMPLATE  = 	subdirs
 
-SUBDIRS   =	fbpostproviderplugin \
+SUBDIRS   =	AuthApp \
+		fbcontactfetcherplugin \
+		fbpostproviderplugin \
 		flickrcontactfetcherplugin \
 		smfclientapp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/example/fbcontactfetcherplugin/fbcontactfetcherplugin.cpp	Wed Jun 23 19:51:49 2010 +0530
@@ -0,0 +1,1046 @@
+/**
+ * Copyright (c) 2010 Sasken Communication Technologies Ltd.
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of the "Eclipse Public License v1.0" 
+ * which accompanies  this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html"
+ *
+ * Initial Contributors:
+ * Chandradeep Gandhi, Sasken Communication Technologies Ltd - Initial contribution
+ *
+ * Contributors:
+ * Nalina Hariharan
+ * 
+ * Description:
+ * The Plugin that fetches contacts from the logged in user's facebook account
+ *
+ */
+
+// Include files
+#include <QtPlugin>
+#include <QDebug>
+#include <QCryptographicHash>
+#include <QTextStream>
+#include <QFile>
+#include <QMap>
+#include <QListIterator>
+#ifdef SMF_XMLPARSING
+#include <QXmlStreamReader>
+#endif
+
+#include "fbcontactfetcherplugin.h"
+
+// Global variables
+static int chance = 0;
+QString uids;
+
+#ifdef SMF_XMLPARSING
+SmfContact contact;
+#endif
+
+
+/**
+ * Destructor
+ */
+FBContactFetcherPlugin::~FBContactFetcherPlugin( )
+	{
+	if(m_provider)
+		delete m_provider;
+	}
+
+/**
+ * Method to get the list of friends
+ * @param aRequest [out] The request data to be sent to network
+ * @param aPageNum The page to be extracted
+ * @param aItemsPerPage Number of items per page
+ * @return SmfPluginError Plugin error if any, else SmfPluginErrNone
+ */
+SmfPluginError FBContactFetcherPlugin::friends( SmfPluginRequestData &aRequest,
+		const int aPageNum, 
+		const int aItemsPerPage )
+	{
+	qDebug()<<"Inside FBContactFetcherPlugin::friends()";
+	
+	if(0 == chance)
+		return getFriendsUids(aRequest, aPageNum, aItemsPerPage);
+	else// if(1 == chance)
+		return getFriendsDetails(aRequest, aPageNum, aItemsPerPage);
+
+	}
+
+/**
+ * Method to get Facebook specific UIDs of the user's friends
+ * @param aRequest [out] The request data to be sent to network
+ * @param aPageNum The page to be extracted
+ * @param aItemsPerPage Number of items per page
+ * @return SmfPluginError Plugin error if any, else SmfPluginErrNone
+ */
+SmfPluginError FBContactFetcherPlugin::getFriendsUids( SmfPluginRequestData &aRequest,
+		const int aPageNum, 
+		const int aItemsPerPage )
+	{
+	qDebug()<<"Inside FBContactFetcherPlugin::getFriendsUids()";
+	
+	SmfPluginError error = SmfPluginErrInvalidArguments;
+
+	// invalid arguments
+	if( aPageNum < 0 || aItemsPerPage < 0 )
+		{
+		qDebug()<<"Invalid arguments";
+		return error;
+		}
+	
+	qDebug()<<"Valid arguments";
+
+#if 1
+// Reading the keys, CSM Stubbed - START
+	QFile file("c:\\data\\FacebookKeys.txt");
+	if (!file.open(QIODevice::ReadOnly))
+		{
+		qDebug()<<"File to read the keys could not be opened";
+		return SmfPluginErrUserNotLoggedIn;
+		}
+	
+	qDebug()<<"Key file read, going to parse the key values from file";
+	
+	QByteArray arr = file.readAll();
+	QList<QByteArray> list = arr.split('\n');
+	file.close();
+	
+	QString apiKey(list[0]);
+	QString apiSecret(list[1]);
+	QString sessionKey(list[2]);
+	QString sessionSecret(list[3]);
+	
+	qDebug()<<"Api Key = "<<apiKey;
+	qDebug()<<"Api Secret = "<<apiSecret;
+	qDebug()<<"session Key = "<<sessionKey;
+	qDebug()<<"session Secret = "<<sessionSecret;
+// Reading the keys, CSM Stubbed - END
+#endif
+		
+	// Get the current date and time and convert it to seconds as a string
+	QString call_id = QString::number(QDateTime::currentDateTime().toTime_t(), 10);
+	
+	// Create the API signature string
+	QString baseString;
+	baseString.append("api_key="+apiKey);
+	baseString.append("call_id="+call_id);
+#ifdef SMF_XMLPARSING
+	baseString.append("format=XML");
+#else
+	baseString.append("format=JSON");
+#endif
+	if(0 == aPageNum)
+		baseString.append("limit="+QString::number((aItemsPerPage*(aPageNum+1)), 10));
+	else
+		baseString.append("limit="+QString::number((aItemsPerPage*aPageNum), 10));
+	baseString.append("method=friends.get");
+	baseString.append("session_key="+sessionKey);
+	baseString.append("ss=1");
+	baseString.append("v=1.0");
+	baseString.append(sessionSecret);
+
+	// Create the url
+	QUrl url("http://api.facebook.com/restserver.php?");
+	url.addQueryItem("api_key", apiKey);
+	url.addQueryItem("call_id", call_id);
+#ifdef SMF_XMLPARSING
+	url.addQueryItem("format", "XML");
+#else
+	url.addQueryItem("format", "JSON");
+#endif
+	if(0 == aPageNum)
+		url.addQueryItem("limit", QString::number((aItemsPerPage*(aPageNum+1)), 10));
+	else
+		url.addQueryItem("limit", QString::number((aItemsPerPage*aPageNum), 10));
+	url.addQueryItem("method", "friends.get");
+	url.addQueryItem("session_key", sessionKey);
+	url.addQueryItem("ss", "1");
+	url.addQueryItem("v", "1.0");		
+	url.addQueryItem("sig", generateSignature(baseString));
+			
+	// Create the request, set the url
+	aRequest.iNetworkRequest.setUrl(url);
+	aRequest.iRequestType = SmfContactGetFriends;
+	aRequest.iPostData = NULL;
+	aRequest.iHttpOperationType = QNetworkAccessManager::GetOperation;
+	error = SmfPluginErrNone;
+
+	qDebug()<<"Url string is : "<<aRequest.iNetworkRequest.url().toString();
+	return error;
+	}
+
+
+/**
+ * Method to get the details of users friends from facebook
+ * @param aRequest [out] The request data to be sent to network
+ * @param aPageNum The page to be extracted
+ * @param aItemsPerPage Number of items per page
+ * @return SmfPluginError Plugin error if any, else SmfPluginErrNone
+ */
+SmfPluginError FBContactFetcherPlugin::getFriendsDetails( SmfPluginRequestData &aRequest,
+		const int aPageNum, 
+		const int aItemsPerPage )
+	{
+	Q_UNUSED(aPageNum)
+	Q_UNUSED(aItemsPerPage)
+	qDebug()<<"Inside FBContactFetcherPlugin::getFriendsDetails()";
+	
+	SmfPluginError error = SmfPluginErrUserNotLoggedIn;
+	
+#if 1
+// Reading the keys, CSM Stubbed - START
+	QFile file("c:\\data\\FacebookKeys.txt");
+	if (!file.open(QIODevice::ReadOnly))
+		{
+		qDebug()<<"File to read the keys could not be opened";
+		return error;
+		}
+	
+	qDebug()<<"Key file read, going to parse the key values from file";
+	
+	QByteArray arr = file.readAll();
+	QList<QByteArray> list = arr.split('\n');
+	file.close();
+	
+	QString apiKey(list[0]);
+	QString apiSecret(list[1]);
+	QString sessionKey(list[2]);
+	QString sessionSecret(list[3]);
+	
+	qDebug()<<"Api Key = "<<apiKey;
+	qDebug()<<"Api Secret = "<<apiSecret;
+	qDebug()<<"session Key = "<<sessionKey;
+	qDebug()<<"session Secret = "<<sessionSecret;
+// Reading the keys, CSM Stubbed - END
+#endif
+		
+	// Get the current date and time and convert it to sec as a string
+	QString call_id = QString::number(QDateTime::currentDateTime().toTime_t(), 10);
+	
+	// Create the API signature string
+	QString baseString;
+	baseString.append("api_key="+apiKey);
+	baseString.append("call_id="+call_id);
+	baseString.append("fields=uid,name,pic,pic_square");
+#ifdef SMF_XMLPARSING
+	baseString.append("format=XML");
+#else
+	baseString.append("format=JSON");
+#endif
+	baseString.append("method=users.getInfo");
+	baseString.append("session_key="+sessionKey);
+	baseString.append("ss=1");
+	baseString.append("uids="+uids);
+	baseString.append("v=1.0");
+	baseString.append(sessionSecret);
+
+	// Create the url
+	QUrl url("http://api.facebook.com/restserver.php?");
+	url.addQueryItem("api_key", apiKey);
+	url.addQueryItem("call_id", call_id);
+	url.addQueryItem("fields", "uid,name,pic,pic_square");
+#ifdef SMF_XMLPARSING
+	url.addQueryItem("format", "XML");
+#else
+	url.addQueryItem("format", "JSON");
+#endif
+	url.addQueryItem("method", "users.getInfo");
+	url.addQueryItem("session_key", sessionKey);
+	url.addQueryItem("ss", "1");
+	url.addQueryItem("uids", uids);
+	url.addQueryItem("v", "1.0");		
+	url.addQueryItem("sig", generateSignature(baseString));
+				
+	// Create the request, set the url
+	aRequest.iNetworkRequest.setUrl(url);
+	aRequest.iRequestType = SmfContactGetFriends;
+	aRequest.iPostData = NULL;
+	aRequest.iHttpOperationType = QNetworkAccessManager::GetOperation;
+	error = SmfPluginErrNone;
+
+	qDebug()<<"Url string is : "<<aRequest.iNetworkRequest.url().toString();
+	return error;
+
+	}
+
+
+/**
+ * Method called by plugins to generate a signature string from a base string
+ * @param aBaseString The base string
+ * @return The md5 hash of the base string
+ */
+QString FBContactFetcherPlugin::generateSignature(const QString aBaseString)
+	{
+	qDebug()<<"Inside FBContactFetcherPlugin::generateSignature()";
+	
+	// Create md5 hash of the signature string
+    QByteArray byteArray;
+    byteArray.insert(0, aBaseString.toAscii());
+
+    QByteArray md5Hash = QCryptographicHash::hash(byteArray,QCryptographicHash::Md5 ).toHex();
+    QString returnString (md5Hash);
+    return returnString;
+	}
+
+
+/**
+ * Method to get the list of followers
+ * @param aRequest [out] The request data to be sent to network
+ * @param aPageNum The page to be extracted
+ * @param aItemsPerPage Number of items per page
+ * @return SmfPluginError Plugin error if any, else SmfPluginErrNone
+ */
+SmfPluginError FBContactFetcherPlugin::followers( SmfPluginRequestData &aRequest,
+		const int aPageNum , 
+		const int aItemsPerPage  )
+	{
+	Q_UNUSED(aRequest)
+	Q_UNUSED(aPageNum)
+	Q_UNUSED(aItemsPerPage)
+	qDebug()<<"Inside FBContactFetcherPlugin::followers()";
+	return SmfPluginErrServiceNotSupported; 
+	}
+
+
+/**
+ * Method to search for a contact
+ * @param aRequest [out] The request data to be sent to network
+ * @param aContact contact to be searched
+ * @param aPageNum The page to be extracted
+ * @param aItemsPerPage Number of items per page
+ * @return SmfPluginError Plugin error if any, else SmfPluginErrNone
+ */
+SmfPluginError FBContactFetcherPlugin::search( SmfPluginRequestData &aRequest,
+		const SmfContact &aContact,
+		const int aPageNum , 
+		const int aItemsPerPage  )
+	{
+	Q_UNUSED(aRequest)
+	Q_UNUSED(aContact)
+	Q_UNUSED(aPageNum)
+	Q_UNUSED(aItemsPerPage)
+	qDebug()<<"Inside FBContactFetcherPlugin::search()";
+	return SmfPluginErrServiceNotSupported; 
+	}
+
+
+/**
+ * Method to search for contacts (friends) who are near the user.
+ * Proximity defines accuracy level
+ * @param aRequest [out] The request data to be sent to network
+ * @param aLocation The location search criteria
+ * @param aProximity location search boundary
+ * @param aPageNum The page to be extracted
+ * @param aItemsPerPage Number of items per page
+ * @return SmfPluginError Plugin error if any, else SmfPluginErrNone
+ */
+SmfPluginError FBContactFetcherPlugin::searchNear( SmfPluginRequestData &aRequest,
+		const SmfLocation &aLocation,
+		const SmfLocationSearchBoundary &aProximity,
+		const int aPageNum , 
+		const int aItemsPerPage  )
+	{
+	Q_UNUSED(aRequest)
+	Q_UNUSED(aLocation)
+	Q_UNUSED(aProximity)
+	Q_UNUSED(aPageNum)
+	Q_UNUSED(aItemsPerPage)
+	qDebug()<<"Inside FBContactFetcherPlugin::searchNear()";
+	return SmfPluginErrServiceNotSupported; 
+	}
+
+
+/**
+ * Method to get the list of groups
+ * @param aRequest [out] The request data to be sent to network
+ * @param aPageNum The page to be extracted
+ * @param aItemsPerPage Number of items per page
+ * @return SmfPluginError Plugin error if any, else SmfPluginErrNone
+ */
+SmfPluginError FBContactFetcherPlugin::groups( SmfPluginRequestData &aRequest,
+		const int aPageNum , 
+		const int aItemsPerPage  )
+	{
+	Q_UNUSED(aRequest)
+	Q_UNUSED(aPageNum)
+	Q_UNUSED(aItemsPerPage)
+	qDebug()<<"Inside FBContactFetcherPlugin::groups()";
+	return SmfPluginErrServiceNotSupported; 
+	}
+
+
+/**
+ * Method to search for a contact in a group
+ * @param aRequest [out] The request data to be sent to network
+ * @param aGroup the group in which to search
+ * @param aPageNum The page to be extracted
+ * @param aItemsPerPage Number of items per page
+ * @return SmfPluginError Plugin error if any, else SmfPluginErrNone
+ */
+SmfPluginError FBContactFetcherPlugin::searchInGroup( SmfPluginRequestData &aRequest,
+		const SmfGroup &aGroup,
+		const int aPageNum , 
+		const int aItemsPerPage  )
+	{
+	Q_UNUSED(aRequest)
+	Q_UNUSED(aGroup)
+	Q_UNUSED(aPageNum)
+	Q_UNUSED(aItemsPerPage)
+	qDebug()<<"Inside FBContactFetcherPlugin::searchInGroup()";
+	return SmfPluginErrServiceNotSupported; 
+	}
+
+
+/**
+ * Customised method for SmfContactFetcherPlugin interface
+ * @param aRequest [out] The request data to be sent to network
+ * @param aOperation The operation type (should be known between 
+ * the client interface and the plugin)
+ * @param aData The data required to form the request (The type 
+ * of data should be known between client and the plugin)
+ * @return SmfPluginError Plugin error if any, else SmfPluginErrNone
+ */
+SmfPluginError FBContactFetcherPlugin::customRequest( SmfPluginRequestData &aRequest, 
+		const int &aOperation, QByteArray *aData )
+	{
+	Q_UNUSED(aRequest)
+	Q_UNUSED(aOperation)
+	Q_UNUSED(aData)
+	qDebug()<<"Inside FBContactFetcherPlugin::customRequest()";
+	return SmfPluginErrServiceNotSupported; 
+	}
+
+
+/**
+ * The first method to be called in the plugin that implements this interface.
+ * If this method is not called, plugin may not behave as expected.
+ * Plugins are expected to save the aUtil handle and use and when required.
+ * @param aUtil The instance of SmfPluginUtil
+ */
+void FBContactFetcherPlugin::initialize( SmfPluginUtil *aUtil )
+	{
+	// Save the SmfPluginUtil handle
+	m_util = aUtil;
+	
+	// Create an instance of FBContactProviderBase
+	m_provider = new FBContactProviderBase;
+	m_provider->initialize();
+	}
+
+
+/**
+ * Method to get the provider information
+ * @return Instance of SmfProviderBase
+ */
+SmfProviderBase* FBContactFetcherPlugin::getProviderInfo( )
+	{
+	return m_provider;
+	}
+
+
+/**
+ * Method to get the result for a network request.
+ * @param aOperation The type of operation to be requested
+ * @param aTransportResult The result of transport operation
+ * @param aResponse The QByteArray instance containing the network response.
+ * The plugins should delete this instance once they have read the 
+ * data from it.
+ * @param aResult [out] An output parameter to the plugin manager.If the 
+ * return value is SmfSendRequestAgain, QVariant will be of type 
+ * SmfPluginRequestData.
+ * For SmfGalleryPlugin: If last operation was pictures(), aResult will 
+ * be of type QList<SmfPicture>. If last operation was description(), 
+ * aResult will be of type QString. If last operation was upload() or 
+ * postComment(), aResult will be of type bool.
+ * @param aRetType [out] SmfPluginRetType
+ * @param aPageResult [out] The SmfResultPage structure variable
+ */
+SmfPluginError FBContactFetcherPlugin::responseAvailable( 
+		const SmfRequestTypeID aOperation,
+		const SmfTransportResult &aTransportResult, 
+		QByteArray *aResponse, 
+		QVariant* aResult, 
+		SmfPluginRetType &aRetType,
+		SmfResultPage &aPageResult )
+	{
+	Q_UNUSED(aPageResult)
+	qDebug()<<"Inside FBContactFetcherPlugin::responseAvailable()";
+	
+	SmfPluginError error = SmfPluginErrNetworkError;
+	
+	if( !aResponse || (0 == aResponse->size()) )
+		{
+		qDebug()<<"Response is NULL or empty";
+		aRetType = SmfRequestError;
+		return error;
+		}
+	
+	QByteArray response(*aResponse);
+	delete aResponse;
+	qDebug()<<"FB response = "<<QString(response);
+	qDebug()<<"FB response size = "<<response.size();
+	
+	
+	if(SmfTransportOpNoError == aTransportResult)
+		{
+		qDebug()<<"No transport error";
+		
+		if(SmfContactGetFriends == aOperation)
+			{
+			// For getting contact's UIDs
+			if(0 == chance)
+				{
+				qDebug()<<"For Getting friends UIDs";
+				chance = 1;
+				
+				QString errStr;
+				errStr.clear();
+				uids.clear();
+				
+#ifdef SMF_XMLPARSING
+				qDebug()<<"Xml parsing";
+				
+				// For getting contacts from xml response
+				QXmlStreamReader xml(response);
+				int count = 0;
+				while (!xml.atEnd())
+					{
+					xml.readNext();
+					if (xml.tokenType() == QXmlStreamReader::StartElement)
+						{
+						if (xml.name() == "uid")
+							{
+							qDebug()<<"uid tag found";
+							QString message(xml.readElementText());
+							uids.append(message);
+							uids.append(",");
+							count++;
+							if(5 == count)
+								break;
+							}
+						else if("error_msg" == xml.name())
+							{
+							qDebug()<<"error_msg tag found";
+							errStr.append(xml.readElementText());
+							break;
+							}
+						}
+					}
+				// Remove the final appended ',' for no error
+				if(0 == errStr.size())
+					uids.chop(1);
+#else
+				qDebug()<<"Json parsing";
+		
+				// For error in response
+				if(response.contains(QByteArray("error_msg")))
+					{
+					qDebug()<<"Response contains error, so parse and get the error code";
+					
+					bool ok;
+					QVariant result = m_util->parse(response, &ok);
+					if (!ok) 
+						{
+						qDebug()<<"An error occurred during json parsing, error = "<<m_util->errorString();
+						aRetType = SmfRequestError;
+						return SmfPluginErrParsingFailed;
+						}
+					else
+						{
+						QVariantMap map = result.toMap();
+						errStr.append(map["error_msg"].toString());
+						}
+					}
+				else
+					{
+					qDebug()<<"Response is ok, so don't parse";
+					response.remove(0, 1);
+					response.chop(1);
+					uids.append(response);
+					}
+			
+#endif
+				if(errStr.size())
+					{
+					qDebug()<<"Response error found = "<<errStr;
+					error = SmfPluginErrInvalidRequest;
+					aRetType = SmfRequestError;
+					aResult->setValue(errStr);
+					}
+				else
+					{
+					qDebug()<<"UIDs array = "<<uids;
+					error = SmfPluginErrNone;
+					aRetType = SmfSendRequestAgain;
+					}
+				}
+			
+			// For getting details of friends like name, pic etc.
+			else// if(1 == chance)
+				{
+				QList<SmfContact> list;
+			
+				QString errStr;
+				errStr.clear();
+				qDebug()<<"For Getting friends details";
+				chance = 0;
+				
+#ifdef SMF_XMLPARSING
+				qDebug()<<"Xml parsing";
+				
+				// For getting contacts from xml response
+				QXmlStreamReader xml(response);
+				while (!xml.atEnd())
+					{
+					xml.readNext();
+					
+					if (xml.tokenType() == QXmlStreamReader::StartElement)
+						{
+						if (xml.name() == "name")
+							{
+							QString message(xml.readElementText());
+							
+							QContactName contactname;
+							contactname.setFirstName(message);
+							contactname.setLastName(message);
+							QVariant nameVar = QVariant::fromValue(contactname);
+							contact.setValue("Name",nameVar);
+							}
+						else if (xml.name() == "uid")
+							{
+							QString message(xml.readElementText());
+							QContactGuid guid;
+							guid.setGuid(message);
+							QVariant guidVar = QVariant::fromValue(guid);
+							contact.setValue("Guid", guidVar);
+							}
+						else if (xml.name() == "pic_square")
+							{
+							QUrl url(xml.readElementText());
+							qDebug()<<"pic_square = "<<url.toString();
+							QContactAvatar avatar;
+							avatar.setImageUrl(url);
+							QVariant avatarVar = QVariant::fromValue(avatar);
+							contact.setValue("Avatar", avatarVar);
+							}
+						else if("error_msg" == xml.name())
+							{
+							qDebug()<<"error_msg tag found";
+							errStr.append(xml.readElementText());
+							break;
+							}
+						}
+					if (xml.tokenType() == QXmlStreamReader::EndElement)
+						{
+						if (xml.name() == "user")
+							{
+							qDebug()<<"avatar url = "<<contact.value("Avatar").value<QContactAvatar>().imageUrl().toString();
+							list.append(contact);
+							}
+						}
+					}
+#else
+				qDebug()<<"Json parsing";
+				
+				bool ok;
+				QVariant result = m_util->parse(response, &ok);
+				if (!ok) 
+					{
+					qDebug()<<"An error occurred during json parsing";
+					aRetType = SmfRequestError;
+					return SmfPluginErrParsingFailed;
+					}
+				
+				if(response.contains(QByteArray("error_msg")))
+					{
+					QVariantMap map = result.toMap();
+					errStr.append(map["error_msg"].toString());
+					}
+				else
+					{
+					QList<QVariant> list1 = result.toList();
+					QListIterator<QVariant> iter(list1);
+					while(iter.hasNext())
+						{
+						SmfContact contact;
+						QVariantMap map2 = iter.next().toMap();
+						qDebug()<<"name = "<<map2["name"].toString();
+						qDebug()<<"pic = "<<map2["pic"].toString();
+						qDebug()<<"uid = "<<map2["uid"].toString();
+						qDebug()<<"pic_square = "<<map2["pic_square"].toString();
+						
+						QContactName contactname;
+						contactname.setFirstName(map2["name"].toString());
+						contactname.setLastName(map2["name"].toString());
+						QVariant nameVar = QVariant::fromValue(contactname);
+						contact.setValue("Name",nameVar);
+						
+						QContactAvatar avatar;
+						QUrl url(map2["pic_square"].toString());
+						avatar.setImageUrl(url);
+						QVariant avatarVar = QVariant::fromValue(avatar);
+						contact.setValue("Avatar", avatarVar);
+						
+						QContactGuid guid;
+						guid.setGuid(map2["uid"].toString());
+						QVariant guidVar = QVariant::fromValue(guid);
+						contact.setValue("Guid", guidVar);
+						
+						
+#if 0 // tesing SmfContact serialization
+						QContactAddress address;
+						address.setCountry("sampleCountry");
+						address.setLocality("samplelocatlity");
+						address.setPostOfficeBox("12345");
+						address.setPostcode("67890");
+						address.setRegion("sampleregion");
+						address.setStreet("sampleStreet");
+						QStringList list1;
+						list1.append("type1");
+						address.setSubTypes(list1);
+						QVariant var1 = QVariant::fromValue(address);
+						contact.setValue("Address", var1);
+								
+						QContactAnniversary anni;
+						anni.setCalendarId("12345");
+						anni.setEvent("6547645");
+						QDate date1(2010, 06, 18);
+						anni.setOriginalDate(date1);
+						anni.setSubType("76345764");
+						QVariant var2 = QVariant::fromValue(anni);
+						contact.setValue("Anniversary", var2);
+						
+						QContactAvatar avatar;
+						QUrl url(map2["pic_square"].toString());
+						avatar.setImageUrl(url);
+						avatar.setVideoUrl(url);
+						QVariant avatarVar = QVariant::fromValue(avatar);
+						contact.setValue("Avatar", avatarVar);
+						
+						QContactBirthday bday;
+						date1.setDate(1983,9,12);
+						bday.setDate(date1);
+						QVariant var3 = QVariant::fromValue(bday);
+						contact.setValue("Birthday", var3);
+						
+						QContactId id;
+						QContactLocalId localid = 10;
+						id.setLocalId(localid);
+						id.setManagerUri("djfhjhyd");
+						QVariant v4 = QVariant::fromValue(id);
+						contact.setValue("ContactId", v4);
+						
+						QContactEmailAddress email;
+						email.setEmailAddress("sdjfhujsdhf@kjdfk.com");
+						QVariant v5 = QVariant::fromValue(email);
+						contact.setValue("EmailAddress", v5);
+						
+						QContactGender gender;
+						gender.setGender("female");
+						QVariant v6 = QVariant::fromValue(gender);
+						contact.setValue("Gender", v6);
+						
+						QTime t(14,0,0);
+						QDateTime time1(date1, t);
+						QContactGeoLocation geo;
+						geo.setAccuracy(1.23);
+						geo.setAltitude(2.34);
+						geo.setAltitudeAccuracy(3.45);
+						geo.setHeading(4.56);
+						geo.setLabel("hdgfhdgf");
+						geo.setLatitude(6.78);
+						geo.setLongitude(7.89);
+						geo.setSpeed(23.456);
+						geo.setTimestamp(time1);
+						QVariant v7 = QVariant::fromValue(geo);
+						contact.setValue("Geolocation", v7);
+						
+						QContactGuid guid;
+						guid.setGuid(map2["uid"].toString());
+						QVariant guidVar = QVariant::fromValue(guid);
+						contact.setValue("Guid", guidVar);
+						
+						QContactName contactname;
+						contactname.setFirstName(map2["name"].toString());
+						contactname.setLastName(map2["name"].toString());
+						contactname.setCustomLabel("jsdhfjhsdf");
+						contactname.setMiddleName("kjtiuer");
+						contactname.setPrefix("djfhj");
+						contactname.setSuffix("jdhf");
+						QVariant nameVar = QVariant::fromValue(contactname);
+						contact.setValue("Name",nameVar);
+						
+						QContactNickname nickname;
+						nickname.setNickname("ddfffff");
+						QVariant v8 = QVariant::fromValue(nickname);
+						contact.setValue("Nickname", v8);
+						
+						QContactNote note;
+						note.setNote("jdhfjsdhf");
+						QVariant v9 = QVariant::fromValue(note);
+						contact.setValue("Note", v9);
+						
+						QContactOnlineAccount account;
+						account.setAccountUri("jnjhd");
+						account.setCapabilities(list1);
+						account.setServiceProvider("jhjyhjk");
+						list1.append("345");
+						account.setSubTypes(list1);
+						QVariant v10 = QVariant::fromValue(account);
+						contact.setValue("OnlineAccount", v10);
+						
+						QContactOrganization org;
+						org.setAssistantName("mnjhj");
+						org.setDepartment(list1);
+						org.setLocation("mnjh");
+						org.setLogoUrl(url);
+						org.setName("kkiujki");
+						org.setRole("nhfg");
+						org.setTitle("mnhfg");
+						QVariant v11 = QVariant::fromValue(org);
+						contact.setValue("Organization", v11);
+						
+						QContactPhoneNumber number;
+						number.setNumber("76347");
+						list1.append("jhsdjhsdf");
+						number.setSubTypes(list1);
+						QVariant v12 = QVariant::fromValue(number);
+						contact.setValue("PhoneNumber", v12);
+						
+						QContactPresence presence;
+						presence.setCustomMessage("djhfjhsd");
+						presence.setNickname("kajsiju");
+						QContactPresence::PresenceState state = QContactPresence::PresenceBusy;
+						presence.setPresenceState(state);
+						presence.setPresenceStateImageUrl(url);
+						presence.setPresenceStateText("Busy Now");
+						presence.setTimestamp(time1);
+						QVariant v13 = QVariant::fromValue(presence);
+						contact.setValue("Presence", v13);
+						
+						QContactThumbnail thumbnail;
+						QImage image("c://Data//TestUploadPics//BlueHills.jpg");
+						qDebug()<<"Image bytecount = "<<image.byteCount();
+						thumbnail.setThumbnail(image);
+						QVariant v14 = QVariant::fromValue(thumbnail);
+						contact.setValue("Thumbnail", v14);
+						
+						QContactTimestamp timestamp;
+						timestamp.setCreated(time1);
+						timestamp.setLastModified(time1);
+						QVariant v15 = QVariant::fromValue(timestamp);
+						contact.setValue("Timestamp", v15);
+						
+						QContactType type;
+						type.setType("default");
+						QVariant v16 = QVariant::fromValue(type);
+						contact.setValue("Type", v16);
+						
+						QContactUrl myurl;
+						myurl.setUrl("My Url");
+						myurl.setSubType("my url type");
+						QVariant v17 = QVariant::fromValue(myurl);
+						contact.setValue("Url", v17);
+
+#endif
+						
+						list.append(contact);
+						}
+					}
+#endif
+				
+				if(errStr.size())
+					{
+					qDebug()<<"Response error found = "<<errStr;
+					error = SmfPluginErrInvalidRequest;
+					aRetType = SmfRequestError;
+					aResult->setValue(errStr);
+					}
+				else
+					{
+					qDebug()<<"list count = "<<list.count();
+					aResult->setValue(list);
+					aRetType = SmfRequestComplete;
+					error = SmfPluginErrNone;
+					}
+				}
+			}
+		else
+			{
+			qDebug()<<"Service unsupported, as of now only SmfContactGetFriends!!!";
+			aRetType = SmfRequestError;
+			error = SmfPluginErrServiceNotSupported;
+			}
+		}
+
+	else if(SmfTransportOpOperationCanceledError == aTransportResult)
+		{
+		qDebug()<<"Operation Cancelled !!!";
+		error = SmfPluginErrCancelComplete;
+		aRetType = SmfRequestComplete;
+		}
+
+	else
+		{
+		qDebug()<<"Transport Error !!!";
+		error = SmfPluginErrNetworkError;
+		aRetType = SmfRequestError;
+		}
+	
+	return error;
+	}
+
+
+/**
+ * Destructor
+ */
+FBContactProviderBase::~FBContactProviderBase( )
+	{
+	}
+
+
+/**
+ * Method to get the Localisable name of the service.
+ * @return The Localisable name of the service.
+ */
+QString FBContactProviderBase::serviceName( ) const
+	{
+	return m_serviceName;
+	}
+
+
+/**
+ * Method to get the Logo of the service
+ * @return The Logo of the service
+ */
+QImage FBContactProviderBase::serviceIcon( ) const
+	{
+	return m_serviceIcon;
+	}
+
+
+/**
+ * Method to get the Readable service description
+ * @return The Readable service description
+ */
+QString FBContactProviderBase::description( ) const
+	{
+	return m_description;
+	}
+
+
+/**
+ * Method to get the Website of the service
+ * @return The Website of the service
+ */
+QUrl FBContactProviderBase::serviceUrl( ) const
+	{
+	return m_serviceUrl;
+	}
+
+
+/**
+ * Method to get the URL of the Application providing this service
+ * @return The URL of the Application providing this service
+ */
+QUrl FBContactProviderBase::applicationUrl( ) const
+	{
+	return m_applicationUrl;
+	}
+
+
+/**
+ * Method to get the Icon of the application
+ * @return The Icon of the application
+ */
+QImage FBContactProviderBase::applicationIcon( ) const
+	{
+	return m_applicationIcon;
+	}
+
+/**
+* Method to get the list of interfaces that this provider support
+* @return List of supported Interafces
+*/
+QList<QString> FBContactProviderBase::supportedInterfaces( ) const
+	{
+	return m_supportedInterfaces;
+	}
+
+/**
+* Method to get the list of languages supported by this service provider
+* @return a QStringList of languages supported by this service 
+* provider in 2 letter ISO 639-1 format.
+*/
+QStringList FBContactProviderBase::supportedLanguages( ) const
+	{
+	return m_supportedLangs;
+	}
+
+/**
+ * Method to get the Plugin specific ID
+ * @return The Plugin specific ID
+ */
+QString FBContactProviderBase::pluginId( ) const
+	{
+	return m_pluginId;
+	}
+
+
+/**
+ * Method to get the ID of the authentication application 
+ * for this service
+ * @param aProgram The authentication application name
+ * @param aArguments List of arguments required for authentication app
+ * @param aMode Strting mode for authentication application
+ * @return The ID of the authentication application 
+ */
+QString FBContactProviderBase::authenticationApp( QString &aProgram, 
+		QStringList & aArguments, 
+		QIODevice::OpenModeFlag aMode ) const
+	{
+	Q_UNUSED(aProgram)
+	Q_UNUSED(aArguments)
+	Q_UNUSED(aMode)
+	return m_authAppId;
+	}
+
+
+/**
+ * Method to get the unique registration ID provided by the 
+ * Smf for authorised plugins
+ * @return The unique registration ID/token provided by the Smf for 
+ * authorised plugins
+ */
+QString FBContactProviderBase::smfRegistrationId( ) const
+	{
+	return m_smfRegToken;
+	}
+
+
+/**
+ * Method that initializes this class. This method should be called 
+ * from the initialize() method of the FBContactFetcherPlugin class
+ */
+void FBContactProviderBase::initialize()
+	{
+	m_serviceName = "Facebook";
+	m_description = "Facebook contact fetcher plugin description";
+	m_serviceUrl = QUrl(QString("http://api.facebook.com"));
+	m_pluginId = "fbcontactfetcherplugin.qtplugin";
+	m_authAppId = "Facebook AuthAppId";
+	m_smfRegToken = "Facebook RegToken";
+	m_supportedInterfaces.append("org.symbian.smf.plugin.contact.fetcher/v0.2");
+	}
+
+
+/*
+ * Export Macro
+ * plugin name : fbcontactfetcherplugin
+ * plugin class : FBContactFetcherPlugin
+ */
+Q_EXPORT_PLUGIN2( fbcontactfetcherplugin, FBContactFetcherPlugin )
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/example/fbcontactfetcherplugin/fbcontactfetcherplugin.h	Wed Jun 23 19:51:49 2010 +0530
@@ -0,0 +1,323 @@
+/**
+ * Copyright (c) 2010 Sasken Communication Technologies Ltd.
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of the "Eclipse Public License v1.0" 
+ * which accompanies  this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html"
+ *
+ * Initial Contributors:
+ * Chandradeep Gandhi, Sasken Communication Technologies Ltd - Initial contribution
+ *
+ * Contributors:
+ * Nalina Hariharan
+ * 
+ * Description:
+ * The Plugin that fetches contacts from the logged in user's facebook account
+ *
+ */
+
+#ifndef _FBCONTACTFETCHERPLUGIN_H
+#define _FBCONTACTFETCHERPLUGIN_H
+
+// Include files
+#include <smfcontactfetcherplugin.h>
+#include <smfpluginutil.h>
+
+// Forward declarations
+class FBContactProviderBase;
+class QVariant;
+class QNetworkReply;
+
+/**
+ * The Plugin class that fetches contacts from the logged in user's 
+ * facebook account
+ */
+class FBContactFetcherPlugin : public QObject, public SmfContactFetcherPlugin
+	{
+	Q_OBJECT
+	Q_INTERFACES( SmfContactFetcherPlugin SmfPluginBase )
+
+public:
+	/**
+	 * Destructor
+	 */
+	virtual ~FBContactFetcherPlugin( );
+	
+public: // From SmfContactFetcherPlugin interface
+	
+	/**
+	 * Method to get the list of friends
+	 * @param aRequest [out] The request data to be sent to network
+	 * @param aPageNum The page to be extracted
+	 * @param aItemsPerPage Number of items per page
+	 * @return SmfPluginError Plugin error if any, else SmfPluginErrNone
+	 */
+	SmfPluginError friends( SmfPluginRequestData &aRequest,
+			const int aPageNum = SMF_FIRST_PAGE, 
+			const int aItemsPerPage = SMF_ITEMS_PER_PAGE );
+	
+	/**
+	 * Method to get the list of followers
+	 * @param aRequest [out] The request data to be sent to network
+	 * @param aPageNum The page to be extracted
+	 * @param aItemsPerPage Number of items per page
+	 * @return SmfPluginError Plugin error if any, else SmfPluginErrNone
+	 */
+	SmfPluginError followers( SmfPluginRequestData &aRequest,
+			const int aPageNum = SMF_FIRST_PAGE, 
+			const int aItemsPerPage = SMF_ITEMS_PER_PAGE );
+	
+	/**
+	 * Method to search for a contact
+	 * @param aRequest [out] The request data to be sent to network
+	 * @param aContact contact to be searched
+	 * @param aPageNum The page to be extracted
+	 * @param aItemsPerPage Number of items per page
+	 * @return SmfPluginError Plugin error if any, else SmfPluginErrNone
+	 */
+	SmfPluginError search( SmfPluginRequestData &aRequest,
+			const SmfContact &aContact,
+			const int aPageNum = SMF_FIRST_PAGE, 
+			const int aItemsPerPage = SMF_ITEMS_PER_PAGE );
+	
+	/**
+	 * Method to search for contacts (friends) who are near the user.
+	 * Proximity defines accuracy level
+	 * @param aRequest [out] The request data to be sent to network
+	 * @param aLocation The location search criteria
+	 * @param aProximity location search boundary
+	 * @param aPageNum The page to be extracted
+	 * @param aItemsPerPage Number of items per page
+	 * @return SmfPluginError Plugin error if any, else SmfPluginErrNone
+	 */
+	SmfPluginError searchNear( SmfPluginRequestData &aRequest,
+			const SmfLocation &aLocation,
+			const SmfLocationSearchBoundary &aProximity,
+			const int aPageNum = SMF_FIRST_PAGE, 
+			const int aItemsPerPage = SMF_ITEMS_PER_PAGE );
+	
+	/**
+	 * Method to get the list of groups
+	 * @param aRequest [out] The request data to be sent to network
+	 * @param aPageNum The page to be extracted
+	 * @param aItemsPerPage Number of items per page
+	 * @return SmfPluginError Plugin error if any, else SmfPluginErrNone
+	 */
+	SmfPluginError groups( SmfPluginRequestData &aRequest,
+			const int aPageNum = SMF_FIRST_PAGE, 
+			const int aItemsPerPage = SMF_ITEMS_PER_PAGE );
+	
+	/**
+	 * Method to search for a contact in a group
+	 * @param aRequest [out] The request data to be sent to network
+	 * @param aGroup the group in which to search
+	 * @param aPageNum The page to be extracted
+	 * @param aItemsPerPage Number of items per page
+	 * @return SmfPluginError Plugin error if any, else SmfPluginErrNone
+	 */
+	SmfPluginError searchInGroup( SmfPluginRequestData &aRequest,
+			const SmfGroup &aGroup,
+			const int aPageNum = SMF_FIRST_PAGE, 
+			const int aItemsPerPage = SMF_ITEMS_PER_PAGE );
+	
+	/**
+	 * Customised method for SmfContactFetcherPlugin interface
+	 * @param aRequest [out] The request data to be sent to network
+	 * @param aOperation The operation type (should be known between 
+	 * the client interface and the plugin)
+	 * @param aData The data required to form the request (The type 
+	 * of data should be known between client and the plugin)
+	 * @return SmfPluginError Plugin error if any, else SmfPluginErrNone
+	 */
+	SmfPluginError customRequest( SmfPluginRequestData &aRequest, 
+			const int &aOperation, QByteArray *aData );
+	
+public: // From SmfPluginBase interface
+	/**
+	 * The first method to be called in the plugin that implements this interface.
+	 * If this method is not called, plugin may not behave as expected.
+	 * Plugins are expected to save the aUtil handle and use and when required.
+	 * @param aUtil The instance of SmfPluginUtil
+	 */
+	void initialize( SmfPluginUtil *aUtil );
+	
+	/**
+	 * Method to get the provider information
+	 * @return Instance of SmfProviderBase
+	 */
+	SmfProviderBase* getProviderInfo( );
+	
+	/**
+	 * Method to get the result for a network request.
+	 * @param aOperation The type of operation to be requested
+	 * @param aTransportResult The result of transport operation
+	 * @param aResponse The QByteArray instance containing the network response.
+	 * The plugins should delete this instance once they have read the 
+	 * data from it.
+	 * @param aResult [out] An output parameter to the plugin manager.If the 
+	 * return value is SmfSendRequestAgain, QVariant will be of type 
+	 * SmfPluginRequestData.
+	 * For SmfGalleryPlugin: If last operation was pictures(), aResult will 
+	 * be of type QList<SmfPicture>. If last operation was description(), 
+	 * aResult will be of type QString. If last operation was upload() or 
+	 * postComment(), aResult will be of type bool.
+	 * @param aRetType [out] SmfPluginRetType
+	 * @param aPageResult [out] The SmfResultPage structure variable
+	 */
+	SmfPluginError responseAvailable( 
+			const SmfRequestTypeID aOperation,
+			const SmfTransportResult &aTransportResult, 
+			QByteArray *aResponse, 
+			QVariant* aResult, 
+			SmfPluginRetType &aRetType,
+			SmfResultPage &aPageResult );
+	
+private:
+	/**
+	 * Method called by plugins to generate a signature string from a base string
+	 * @param aBaseString The base string
+	 * @return The md5 hash of the base string
+	 */
+	QString generateSignature(const QString aBaseString);
+	
+	/**
+	 * Method to get Facebook specific UIDs of the user's friends
+	 * @param aRequest [out] The request data to be sent to network
+	 * @param aPageNum The page to be extracted
+	 * @param aItemsPerPage Number of items per page
+	 * @return SmfPluginError Plugin error if any, else SmfPluginErrNone
+	 */
+	SmfPluginError getFriendsUids( SmfPluginRequestData &aRequest,
+			const int aPageNum, 
+			const int aItemsPerPage );
+	
+	/**
+	 * Method to get the details of users friends from facebook
+	 * @param aRequest [out] The request data to be sent to network
+	 * @param aPageNum The page to be extracted
+	 * @param aItemsPerPage Number of items per page
+	 * @return SmfPluginError Plugin error if any, else SmfPluginErrNone
+	 */
+	SmfPluginError getFriendsDetails( SmfPluginRequestData &aRequest,
+			const int aPageNum, 
+			const int aItemsPerPage );
+	
+private:
+	FBContactProviderBase *m_provider;
+	SmfPluginUtil *m_util;
+	};
+
+
+
+/**
+ * The Plugin class that implements SmfProviderBase for this facebook plugin
+ */
+class FBContactProviderBase : public QObject, public SmfProviderBase
+	{
+	Q_OBJECT
+	Q_INTERFACES( SmfProviderBase )
+
+public:
+	/**
+	 * Destructor
+	 */
+	virtual ~FBContactProviderBase( );
+
+	/**
+	 * Method to get the Localisable name of the service.
+	 * @return The Localisable name of the service.
+	 */
+	QString serviceName( ) const;
+	
+	/**
+	 * Method to get the Logo of the service
+	 * @return The Logo of the service
+	 */
+	QImage serviceIcon( ) const;
+	
+	/**
+	 * Method to get the Readable service description
+	 * @return The Readable service description
+	 */
+	QString description( ) const;
+	
+	/**
+	 * Method to get the Website of the service
+	 * @return The Website of the service
+	 */
+	QUrl serviceUrl( ) const;
+	
+	/**
+	 * Method to get the URL of the Application providing this service
+	 * @return The URL of the Application providing this service
+	 */
+	QUrl applicationUrl( ) const;
+	
+	/**
+	 * Method to get the Icon of the application
+	 * @return The Icon of the application
+	 */
+	QImage applicationIcon( ) const;
+	
+	/**
+	* Method to get the list of interfaces that this provider support
+	* @return List of supported Interafces
+	*/
+	QList<QString> supportedInterfaces( ) const;
+	
+	/**
+	* Method to get the list of languages supported by this service provider
+	* @return a QStringList of languages supported by this service 
+	* provider in 2 letter ISO 639-1 format.
+	*/
+	QStringList supportedLanguages( ) const;
+	
+	/**
+	 * Method to get the Plugin specific ID
+	 * @return The Plugin specific ID
+	 */
+	QString pluginId( ) const;
+	
+	/**
+	 * Method to get the ID of the authentication application 
+	 * for this service
+	 * @param aProgram The authentication application name
+	 * @param aArguments List of arguments required for authentication app
+	 * @param aMode Strting mode for authentication application
+	 * @return The ID of the authentication application 
+	 */
+	QString authenticationApp( QString &aProgram, QStringList & aArguments, 
+			QIODevice::OpenModeFlag aMode = QIODevice::ReadWrite ) const;
+	
+	/**
+	 * Method to get the unique registration ID provided by the 
+	 * Smf for authorised plugins
+	 * @return The unique registration ID/token provided by the Smf for 
+	 * authorised plugins
+	 */
+	QString smfRegistrationId( ) const;
+	
+private:
+	/**
+	 * Method that initializes this class. This method should be called 
+	 * from the initialize() method of the FBContactFetcherPlugin class
+	 */
+	void initialize();
+	
+private:
+	friend class FBContactFetcherPlugin;
+	QString m_serviceName;
+	QImage m_serviceIcon;
+	QString m_description;
+	QUrl m_serviceUrl;
+	QUrl m_applicationUrl;
+	QImage m_applicationIcon;
+	QString m_pluginId;
+	QString m_authAppId;
+	QString m_smfRegToken;
+	QList<QString> m_supportedInterfaces;
+	QStringList m_supportedLangs;
+	};
+
+#endif /*_FBCONTACTFETCHERPLUGIN_H*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/example/fbcontactfetcherplugin/fbcontactfetcherplugin.pro	Wed Jun 23 19:51:49 2010 +0530
@@ -0,0 +1,44 @@
+TEMPLATE = lib
+
+CONFIG += plugin \
+	mobility
+	
+MOBILITY += contacts \ 
+	location
+	
+QT += core \
+	xml \
+	network
+	
+HEADERS = fbcontactfetcherplugin.h
+
+SOURCES = fbcontactfetcherplugin.cpp
+
+TARGET = $$qtLibraryTarget(fbcontactfetcherplugin)
+
+symbian: { 
+    # Load predefined include paths (e.g. QT_PLUGINS_BASE_DIR) to be used in the pro-files
+    load(data_caging_paths)
+    
+    # EPOCALLOWDLLDATA have to set true because Qt macros has initialised global data
+    TARGET.EPOCALLOWDLLDATA = 1
+    
+    # Defines plugin files into Symbian .pkg package
+    pluginDep.sources = fbcontactfetcherplugin.dll
+    pluginDep.path = $$QT_PLUGINS_BASE_DIR/smf/plugin/contact.fetcher
+    DEPLOYMENT += pluginDep
+    
+    TARGET.CAPABILITY = NetworkServices \
+    	ReadUserData \
+    	WriteUserData \
+    	LocalServices \
+    	UserEnvironment \
+    	ReadDeviceData \
+    	WriteDeviceData
+    
+   LIBS += -lsmfclient.dll
+}
+
+target.path += $$[QT_INSTALL_PLUGINS]/smf/plugin/contact.fetcher
+
+INSTALLS += target
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/example/fbcontactfetcherplugin/fbcontactfetcherplugin_installer.pkg	Wed Jun 23 19:51:49 2010 +0530
@@ -0,0 +1,31 @@
+; fbcontactfetcherplugin_installer.pkg generated by qmake at 2010-06-22T14:10:41
+; This file is generated by qmake and should not be modified by the user
+;
+
+; Language
+&EN
+
+
+; SIS header: name, uid, version
+#{"fbcontactfetcherplugin installer"},(0xA000D7CE),1,0,0
+
+; Localised Vendor name
+%{"Vendor"}
+
+; Unique Vendor name
+:"Vendor"
+
+
+; Manual PKG pre-rules from PRO files
+; Default dependency to Qt libraries
+; Default HW/platform dependencies
+[0x101F7961],0,0,0,{"S60ProductID"}
+[0x102032BE],0,0,0,{"S60ProductID"}
+[0x102752AE],0,0,0,{"S60ProductID"}
+[0x1028315F],0,0,0,{"S60ProductID"}
+ 
+; Default dependency to QtMobility libraries
+
+
+"F:/Nokia/devices/Nokia_Symbian3_SDK_v0.8/SMFCode/smf_baseline_22june_latest/example/fbcontactfetcherplugin/fbcontactfetcherplugin.sis" - "c:\adm\fbcontactfetcherplugin.sis"
+@"F:/Qt/4.6.3/smartinstaller.sis",(0x2002CCCD)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/example/fbcontactfetcherplugin/fbcontactfetcherplugin_template.pkg	Wed Jun 23 19:51:49 2010 +0530
@@ -0,0 +1,35 @@
+; fbcontactfetcherplugin_template.pkg generated by qmake at 2010-06-22T14:10:41
+; This file is generated by qmake and should not be modified by the user
+;
+
+; Language
+&EN
+
+
+; SIS header: name, uid, version
+#{"fbcontactfetcherplugin"},(0xEc03b6cf),1,0,0
+
+; Localised Vendor name
+%{"Vendor"}
+
+; Unique Vendor name
+:"Vendor"
+
+
+; Manual PKG pre-rules from PRO files
+; Default dependency to Qt libraries
+(0x2001E61C), 4, 6, 3, {"Qt"}
+; Default HW/platform dependencies
+[0x101F7961],0,0,0,{"S60ProductID"}
+[0x102032BE],0,0,0,{"S60ProductID"}
+[0x102752AE],0,0,0,{"S60ProductID"}
+[0x1028315F],0,0,0,{"S60ProductID"}
+ 
+; Default dependency to QtMobility libraries
+(0x2002AC89), 1, 0, 0, {"QtMobility"}
+
+; DEPLOYMENT
+"/Nokia/devices/Nokia_Symbian3_SDK_v0.8/epoc32/release/$(PLATFORM)/$(TARGET)/fbcontactfetcherplugin.dll"    - "!:\sys\bin\fbcontactfetcherplugin.dll"
+"/Nokia/devices/Nokia_Symbian3_SDK_v0.8/epoc32/data/z/resource/qt/plugins/smf/plugin/contact.fetcher/fbcontactfetcherplugin.qtplugin"    - "!:\resource\qt\plugins\smf\plugin\contact.fetcher\fbcontactfetcherplugin.qtplugin"
+
+; Manual PKG post-rules from PRO files
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/example/fbcontactfetcherplugin/plugin_commonU.def	Wed Jun 23 19:51:49 2010 +0530
@@ -0,0 +1,16 @@
+; ==============================================================================
+; Generated by qmake (2.01a) (Qt 4.6.3) on: 2010-06-22T14:10:41
+; This file is generated by qmake and should not be modified by the
+; user.
+;  Name        : plugin_commonU.def
+;  Part of     : fbcontactfetcherplugin
+;  Description : Fixes common plugin symbols to known ordinals
+;  Version     : 
+;
+; ==============================================================================
+
+
+EXPORTS
+	qt_plugin_query_verification_data @ 1 NONAME
+	qt_plugin_instance @ 2 NONAME
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/example/fbcontactfetcherplugin/qmakepluginstubs/fbcontactfetcherplugin.qtplugin	Wed Jun 23 19:51:49 2010 +0530
@@ -0,0 +1,1 @@
+This file is a Qt plugin stub file. The real Qt plugin is located in /sys/bin. Created:2010-06-22T14:10:41
--- a/example/fbpostproviderplugin/Makefile	Mon Jun 07 11:43:45 2010 +0100
+++ b/example/fbpostproviderplugin/Makefile	Wed Jun 23 19:51:49 2010 +0530
@@ -1,5 +1,5 @@
 # ==============================================================================
-# Generated by qmake (2.01a) (Qt 4.6.1) on: Tue May 18 16:00:33 2010
+# Generated by qmake (2.01a) (Qt 4.6.3) on: Tue Jun 22 14:10:41 2010
 # This file is generated by qmake and should not be modified by the
 # user.
 #  Name        : Makefile
@@ -9,10 +9,12 @@
 
 
 MAKEFILE          = Makefile
-QMAKE             = d:\Qt\4.6.1\bin\qmake
+QMAKE             = f:\Qt\4.6.3\bin\qmake
 DEL_FILE          = del
 DEL_DIR           = rmdir
 MOVE              = move
+CHK_DIR_EXISTS    = if not exist
+MKDIR             = mkdir
 XCOPY             = xcopy /d /f /h /r /y /i
 ABLD              = ABLD.BAT
 DEBUG_PLATFORMS   = winscw gcce armv5 armv6
@@ -26,13 +28,13 @@
 endif
 
 DEFINES	 = -DSYMBIAN -DUNICODE -DQT_KEYPAD_NAVIGATION -DQT_SOFTKEYS_ENABLED -DQT_USE_MATH_H_FLOATS -DQT_PLUGIN -DQT_XML_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB
-INCPATH	 =  -I"D:/Qt/4.6.1/include/QtCore" -I"D:/Qt/4.6.1/include/QtCore/tmp" -I"D:/Qt/4.6.1/include/QtNetwork" -I"D:/Qt/4.6.1/include/QtNetwork/tmp" -I"D:/Qt/4.6.1/include/QtGui" -I"D:/Qt/4.6.1/include/QtGui/tmp" -I"D:/Qt/4.6.1/include/QtXml" -I"D:/Qt/4.6.1/include/QtXml/tmp" -I"D:/Qt/4.6.1/include" -I"D:/Qt/4.6.1/include/tmp" -I"D:/CarbideWorkspace/smfserver_cleaned/example/fbpostproviderplugin" -I"D:/CarbideWorkspace/smfserver_cleaned/example/fbpostproviderplugin/tmp" -I"D:/Qt/4.6.1/mkspecs/common/symbian" -I"D:/Qt/4.6.1/mkspecs/common/symbian/tmp" -I"D:/S60/devices/S60_5th_Edition_SDK_v0.9/epoc32/include" -I"D:/S60/devices/S60_5th_Edition_SDK_v0.9/epoc32/include/stdapis" -I"D:/S60/devices/S60_5th_Edition_SDK_v0.9/epoc32/include/stdapis/sys" -I"D:/S60/devices/S60_5th_Edition_SDK_v0.9/epoc32/include/middleware" -I"D:/S60/devices/S60_5th_Edition_SDK_v0.9/epoc32/include/domain/middleware" -I"D:/S60/devices/S60_5th_Edition_SDK_v0.9/epoc32/include/applications" -I"D:/S60/devices/S60_5th_Edition_SDK_v0.9/epoc32/include/domain/applications" -I"D:/S60/devices/S60_5th_Edition_SDK_v0.9/epoc32/include/domain/middleware/loc" -I"D:/S60/devices/S60_5th_Edition_SDK_v0.9/epoc32/include/stdapis/stlport"
+INCPATH	 =  -I"F:/Qt/4.6.3/include/QtCore" -I"F:/Qt/4.6.3/include/QtCore/tmp" -I"F:/Qt/4.6.3/include/QtNetwork" -I"F:/Qt/4.6.3/include/QtNetwork/tmp" -I"F:/Qt/4.6.3/include/QtGui" -I"F:/Qt/4.6.3/include/QtGui/tmp" -I"F:/Qt/4.6.3/include/QtXml" -I"F:/Qt/4.6.3/include/QtXml/tmp" -I"F:/Qt/4.6.3/include" -I"F:/Qt/4.6.3/include/tmp" -I"F:/Qt/4.6.3/include/QtContacts" -I"F:/Qt/4.6.3/include/QtContacts/tmp" -I"F:/Qt/4.6.3/include/QtLocation" -I"F:/Qt/4.6.3/include/QtLocation/tmp" -I"F:/Qt/4.6.3/mkspecs/common/symbian" -I"F:/Qt/4.6.3/mkspecs/common/symbian/tmp" -I"F:/Nokia/devices/Nokia_Symbian3_SDK_v0.8/epoc32/include" -I"F:/Nokia/devices/Nokia_Symbian3_SDK_v0.8/epoc32/include/stdapis" -I"F:/Nokia/devices/Nokia_Symbian3_SDK_v0.8/epoc32/include/stdapis/sys" -I"F:/Nokia/devices/Nokia_Symbian3_SDK_v0.8/epoc32/include/mw" -I"F:/Nokia/devices/Nokia_Symbian3_SDK_v0.8/epoc32/include/platform/mw" -I"F:/Nokia/devices/Nokia_Symbian3_SDK_v0.8/epoc32/include/platform" -I"F:/Nokia/devices/Nokia_Symbian3_SDK_v0.8/epoc32/include/app" -I"F:/Nokia/devices/Nokia_Symbian3_SDK_v0.8/epoc32/include/platform/app" -I"F:/Nokia/devices/Nokia_Symbian3_SDK_v0.8/epoc32/include/platform/loc" -I"F:/Nokia/devices/Nokia_Symbian3_SDK_v0.8/epoc32/include/platform/mw/loc" -I"F:/Nokia/devices/Nokia_Symbian3_SDK_v0.8/epoc32/include/platform/app/loc" -I"F:/Nokia/devices/Nokia_Symbian3_SDK_v0.8/epoc32/include/platform/loc/sc" -I"F:/Nokia/devices/Nokia_Symbian3_SDK_v0.8/epoc32/include/platform/mw/loc/sc" -I"F:/Nokia/devices/Nokia_Symbian3_SDK_v0.8/epoc32/include/platform/app/loc/sc" -I"F:/Nokia/devices/Nokia_Symbian3_SDK_v0.8/epoc32/include/stdapis/stlportv5" -I"F:/Nokia/devices/Nokia_Symbian3_SDK_v0.8/SMFCode/smf_baseline_22june_latest/example/fbpostproviderplugin" -I"F:/Nokia/devices/Nokia_Symbian3_SDK_v0.8/SMFCode/smf_baseline_22june_latest/example/fbpostproviderplugin/tmp"
 first: default
 default: debug-winscw
 all: debug release
 
 qmake:
-	$(QMAKE) -spec symbian-abld -o "bld.inf" "D:/CarbideWorkspace/smfserver_cleaned/example/fbpostproviderplugin/fbpostproviderplugin.pro"
+	$(QMAKE) -spec symbian-abld -o "bld.inf" "F:/Nokia/devices/Nokia_Symbian3_SDK_v0.8/SMFCode/smf_baseline_22june_latest/example/fbpostproviderplugin/fbpostproviderplugin.pro"
 
 bld.inf:
 	$(QMAKE)
@@ -72,8 +74,7 @@
 cleanexport: $(ABLD)
 	$(ABLD) cleanexport
 
-D:\Qt\4.6.1\bin\moc.exe:
-	(cd $(QTDIR)/src/tools/moc && $(MAKE))
+check: first
 
 mocclean: compiler_moc_header_clean compiler_moc_source_clean
 
@@ -82,9 +83,8 @@
 compiler_moc_header_make_all: moc_fbpostproviderplugin.cpp
 compiler_moc_header_clean:
 	-$(DEL_FILE) moc_fbpostproviderplugin.cpp 2> NUL
-moc_fbpostproviderplugin.cpp: fbpostproviderplugin.h \
-		..\..\..\..\Qt\4.6.1\bin\moc.exe
-	D:\Qt\4.6.1\bin\moc.exe $(DEFINES) $(INCPATH) -DSYMBIAN fbpostproviderplugin.h -o moc_fbpostproviderplugin.cpp
+moc_fbpostproviderplugin.cpp: fbpostproviderplugin.h
+	F:\Qt\4.6.3\bin\moc.exe $(DEFINES) $(INCPATH) -DSYMBIAN fbpostproviderplugin.h -o moc_fbpostproviderplugin.cpp
 
 compiler_rcc_make_all:
 compiler_rcc_clean:
@@ -104,22 +104,26 @@
 compiler_clean: compiler_moc_header_clean 
 
 create_temps:
-	-@ if NOT EXIST "D:\Qt\4.6.1\include\QtCore\tmp" mkdir "D:\Qt\4.6.1\include\QtCore\tmp"
-	-@ if NOT EXIST "D:\Qt\4.6.1\include\QtNetwork\tmp" mkdir "D:\Qt\4.6.1\include\QtNetwork\tmp"
-	-@ if NOT EXIST "D:\Qt\4.6.1\include\QtGui\tmp" mkdir "D:\Qt\4.6.1\include\QtGui\tmp"
-	-@ if NOT EXIST "D:\Qt\4.6.1\include\QtXml\tmp" mkdir "D:\Qt\4.6.1\include\QtXml\tmp"
-	-@ if NOT EXIST "D:\Qt\4.6.1\include\tmp" mkdir "D:\Qt\4.6.1\include\tmp"
-	-@ if NOT EXIST "D:\CarbideWorkspace\smfserver_cleaned\example\fbpostproviderplugin\tmp" mkdir "D:\CarbideWorkspace\smfserver_cleaned\example\fbpostproviderplugin\tmp"
-	-@ if NOT EXIST "D:\Qt\4.6.1\mkspecs\common\symbian\tmp" mkdir "D:\Qt\4.6.1\mkspecs\common\symbian\tmp"
+	-@ if NOT EXIST "F:\Qt\4.6.3\include\QtCore\tmp" mkdir "F:\Qt\4.6.3\include\QtCore\tmp"
+	-@ if NOT EXIST "F:\Qt\4.6.3\include\QtNetwork\tmp" mkdir "F:\Qt\4.6.3\include\QtNetwork\tmp"
+	-@ if NOT EXIST "F:\Qt\4.6.3\include\QtGui\tmp" mkdir "F:\Qt\4.6.3\include\QtGui\tmp"
+	-@ if NOT EXIST "F:\Qt\4.6.3\include\QtXml\tmp" mkdir "F:\Qt\4.6.3\include\QtXml\tmp"
+	-@ if NOT EXIST "F:\Qt\4.6.3\include\tmp" mkdir "F:\Qt\4.6.3\include\tmp"
+	-@ if NOT EXIST "F:\Qt\4.6.3\include\QtContacts\tmp" mkdir "F:\Qt\4.6.3\include\QtContacts\tmp"
+	-@ if NOT EXIST "F:\Qt\4.6.3\include\QtLocation\tmp" mkdir "F:\Qt\4.6.3\include\QtLocation\tmp"
+	-@ if NOT EXIST "F:\Qt\4.6.3\mkspecs\common\symbian\tmp" mkdir "F:\Qt\4.6.3\mkspecs\common\symbian\tmp"
+	-@ if NOT EXIST "F:\Nokia\devices\Nokia_Symbian3_SDK_v0.8\SMFCode\smf_baseline_22june_latest\example\fbpostproviderplugin\tmp" mkdir "F:\Nokia\devices\Nokia_Symbian3_SDK_v0.8\SMFCode\smf_baseline_22june_latest\example\fbpostproviderplugin\tmp"
 
 extension_clean: compiler_clean
-	-@ if EXIST "D:\Qt\4.6.1\include\QtCore\tmp" rmdir  /S /Q  "D:\Qt\4.6.1\include\QtCore\tmp"
-	-@ if EXIST "D:\Qt\4.6.1\include\QtNetwork\tmp" rmdir  /S /Q  "D:\Qt\4.6.1\include\QtNetwork\tmp"
-	-@ if EXIST "D:\Qt\4.6.1\include\QtGui\tmp" rmdir  /S /Q  "D:\Qt\4.6.1\include\QtGui\tmp"
-	-@ if EXIST "D:\Qt\4.6.1\include\QtXml\tmp" rmdir  /S /Q  "D:\Qt\4.6.1\include\QtXml\tmp"
-	-@ if EXIST "D:\Qt\4.6.1\include\tmp" rmdir  /S /Q  "D:\Qt\4.6.1\include\tmp"
-	-@ if EXIST "D:\CarbideWorkspace\smfserver_cleaned\example\fbpostproviderplugin\tmp" rmdir  /S /Q  "D:\CarbideWorkspace\smfserver_cleaned\example\fbpostproviderplugin\tmp"
-	-@ if EXIST "D:\Qt\4.6.1\mkspecs\common\symbian\tmp" rmdir  /S /Q  "D:\Qt\4.6.1\mkspecs\common\symbian\tmp"
+	-@ if EXIST "F:\Qt\4.6.3\include\QtCore\tmp" rmdir  /S /Q  "F:\Qt\4.6.3\include\QtCore\tmp"
+	-@ if EXIST "F:\Qt\4.6.3\include\QtNetwork\tmp" rmdir  /S /Q  "F:\Qt\4.6.3\include\QtNetwork\tmp"
+	-@ if EXIST "F:\Qt\4.6.3\include\QtGui\tmp" rmdir  /S /Q  "F:\Qt\4.6.3\include\QtGui\tmp"
+	-@ if EXIST "F:\Qt\4.6.3\include\QtXml\tmp" rmdir  /S /Q  "F:\Qt\4.6.3\include\QtXml\tmp"
+	-@ if EXIST "F:\Qt\4.6.3\include\tmp" rmdir  /S /Q  "F:\Qt\4.6.3\include\tmp"
+	-@ if EXIST "F:\Qt\4.6.3\include\QtContacts\tmp" rmdir  /S /Q  "F:\Qt\4.6.3\include\QtContacts\tmp"
+	-@ if EXIST "F:\Qt\4.6.3\include\QtLocation\tmp" rmdir  /S /Q  "F:\Qt\4.6.3\include\QtLocation\tmp"
+	-@ if EXIST "F:\Qt\4.6.3\mkspecs\common\symbian\tmp" rmdir  /S /Q  "F:\Qt\4.6.3\mkspecs\common\symbian\tmp"
+	-@ if EXIST "F:\Nokia\devices\Nokia_Symbian3_SDK_v0.8\SMFCode\smf_baseline_22june_latest\example\fbpostproviderplugin\tmp" rmdir  /S /Q  "F:\Nokia\devices\Nokia_Symbian3_SDK_v0.8\SMFCode\smf_baseline_22june_latest\example\fbpostproviderplugin\tmp"
 
 pre_targetdeps: \
 	generated_sources \
@@ -135,26 +139,47 @@
 
 winscw_deployment:
 	-echo Deploying changed files...
-	-$(XCOPY) "d:\CarbideWorkspace\smfserver_cleaned\example\fbpostproviderplugin\qmakepluginstubs\fbpostproviderplugin.qtplugin" "\S60\devices\S60_5th_Edition_SDK_v0.9\epoc32\winscw\c\resource\qt\plugins\smf\plugin\contact.posts\"
+	-$(XCOPY) "f:\Nokia\devices\Nokia_Symbian3_SDK_v0.8\SMFCode\smf_baseline_22june_latest\example\fbpostproviderplugin\qmakepluginstubs\fbpostproviderplugin.qtplugin" "\Nokia\devices\Nokia_Symbian3_SDK_v0.8\epoc32\winscw\c\resource\qt\plugins\smf\plugin\contact.posts\"
 
 winscw_deployment_clean:
-	-@ if EXIST "\S60\devices\S60_5th_Edition_SDK_v0.9\epoc32\winscw\c\resource\qt\plugins\smf\plugin\contact.posts\fbpostproviderplugin.qtplugin" $(DEL_FILE)  "\S60\devices\S60_5th_Edition_SDK_v0.9\epoc32\winscw\c\resource\qt\plugins\smf\plugin\contact.posts\fbpostproviderplugin.qtplugin"
+	-@ if EXIST "\Nokia\devices\Nokia_Symbian3_SDK_v0.8\epoc32\winscw\c\resource\qt\plugins\smf\plugin\contact.posts\fbpostproviderplugin.qtplugin" $(DEL_FILE)  "\Nokia\devices\Nokia_Symbian3_SDK_v0.8\epoc32\winscw\c\resource\qt\plugins\smf\plugin\contact.posts\fbpostproviderplugin.qtplugin"
+
+deployment:
+	-echo Deploying changed files...
+	-$(XCOPY) "f:\Nokia\devices\Nokia_Symbian3_SDK_v0.8\SMFCode\smf_baseline_22june_latest\example\fbpostproviderplugin\qmakepluginstubs\fbpostproviderplugin.qtplugin" "\Nokia\devices\Nokia_Symbian3_SDK_v0.8\epoc32\data\z\resource\qt\plugins\smf\plugin\contact.posts\"
 
-sis: restore_build
+deployment_clean:
+	-@ if EXIST "\Nokia\devices\Nokia_Symbian3_SDK_v0.8\epoc32\data\z\resource\qt\plugins\smf\plugin\contact.posts\fbpostproviderplugin.qtplugin" $(DEL_FILE)  "\Nokia\devices\Nokia_Symbian3_SDK_v0.8\epoc32\data\z\resource\qt\plugins\smf\plugin\contact.posts\fbpostproviderplugin.qtplugin"
+
+-include .make.cache
+
+sis:
 	$(if $(wildcard fbpostproviderplugin_template.pkg),$(if $(wildcard .make.cache),$(MAKE) -s -f $(MAKEFILE) ok_sis,$(if $(QT_SIS_TARGET),$(MAKE) -s -f $(MAKEFILE) ok_sis,$(MAKE) -s -f $(MAKEFILE) fail_sis_nocache)),$(MAKE) -s -f $(MAKEFILE) fail_sis_nopkg)
 
 ok_sis:
 	createpackage.bat $(QT_SIS_OPTIONS) fbpostproviderplugin_template.pkg $(QT_SIS_TARGET) $(QT_SIS_CERTIFICATE) $(QT_SIS_KEY) $(QT_SIS_PASSPHRASE)
 
+fbpostproviderplugin.sis:
+	$(MAKE) -s -f $(MAKEFILE) sis
+
+stub_sis:
+	$(if $(wildcard fbpostproviderplugin_template.pkg),$(if $(wildcard .make.cache),$(MAKE) -s -f $(MAKEFILE) ok_stub_sis,$(if $(QT_SIS_TARGET),$(MAKE) -s -f $(MAKEFILE) ok_stub_sis,$(MAKE) -s -f $(MAKEFILE) fail_sis_nocache)),$(MAKE) -s -f $(MAKEFILE) fail_sis_nopkg)
+
+ok_stub_sis:
+	createpackage.bat -s $(QT_SIS_OPTIONS) fbpostproviderplugin_template.pkg $(QT_SIS_TARGET) $(QT_SIS_CERTIFICATE) $(QT_SIS_KEY) $(QT_SIS_PASSPHRASE)
+
+installer_sis: fbpostproviderplugin.sis
+	$(if $(wildcard fbpostproviderplugin_installer.pkg),$(MAKE) -s -f $(MAKEFILE) ok_installer_sis,$(MAKE) -s -f $(MAKEFILE) fail_sis_nopkg)
+
+ok_installer_sis: 
+	createpackage.bat $(QT_SIS_OPTIONS) fbpostproviderplugin_installer.pkg - $(QT_SIS_CERTIFICATE) $(QT_SIS_KEY) $(QT_SIS_PASSPHRASE)
+
 fail_sis_nopkg:
-	$(error PKG file does not exist, 'SIS' target is only supported for executables or projects with DEPLOYMENT statement)
+	$(error PKG file does not exist, 'sis' and 'installer_sis' target are only supported for executables or projects with DEPLOYMENT statement)
 
 fail_sis_nocache:
 	$(error Project has to be built or QT_SIS_TARGET environment variable has to be set before calling 'SIS' target)
 
-restore_build:
--include .make.cache
-
 store_build:
 	@echo # ============================================================================== > .make.cache
 	@echo # This file is generated by make and should not be modified by the user >> .make.cache
@@ -169,15 +194,16 @@
 	@echo QT_SIS_TARGET ?= $(QT_SIS_TARGET) >> .make.cache
 
 dodistclean:
-	-@ if EXIST "d:\CarbideWorkspace\smfserver_cleaned\example\fbpostproviderplugin\fbpostproviderplugin_template.pkg" $(DEL_FILE)  "d:\CarbideWorkspace\smfserver_cleaned\example\fbpostproviderplugin\fbpostproviderplugin_template.pkg"
-	-@ if EXIST "d:\CarbideWorkspace\smfserver_cleaned\example\fbpostproviderplugin\qmakepluginstubs\fbpostproviderplugin.qtplugin" $(DEL_FILE)  "d:\CarbideWorkspace\smfserver_cleaned\example\fbpostproviderplugin\qmakepluginstubs\fbpostproviderplugin.qtplugin"
-	-@ if EXIST "d:\CarbideWorkspace\smfserver_cleaned\example\fbpostproviderplugin\Makefile" $(DEL_FILE)  "d:\CarbideWorkspace\smfserver_cleaned\example\fbpostproviderplugin\Makefile"
-	-@ if EXIST "d:\CarbideWorkspace\smfserver_cleaned\example\fbpostproviderplugin\Makefile_0xEa2c8e07.mk" $(DEL_FILE)  "d:\CarbideWorkspace\smfserver_cleaned\example\fbpostproviderplugin\Makefile_0xEa2c8e07.mk"
-	-@ if EXIST "d:\CarbideWorkspace\smfserver_cleaned\example\fbpostproviderplugin\fbpostproviderplugin_0xEa2c8e07.mmp" $(DEL_FILE)  "d:\CarbideWorkspace\smfserver_cleaned\example\fbpostproviderplugin\fbpostproviderplugin_0xEa2c8e07.mmp"
-	-@ if EXIST "d:\CarbideWorkspace\smfserver_cleaned\example\fbpostproviderplugin\plugin_commonU.def" $(DEL_FILE)  "d:\CarbideWorkspace\smfserver_cleaned\example\fbpostproviderplugin\plugin_commonU.def"
-	-@ if EXIST "d:\CarbideWorkspace\smfserver_cleaned\example\fbpostproviderplugin\.make.cache" $(DEL_FILE)  "d:\CarbideWorkspace\smfserver_cleaned\example\fbpostproviderplugin\.make.cache"
-	-@ if EXIST "d:\CarbideWorkspace\smfserver_cleaned\example\fbpostproviderplugin\bld.inf" $(DEL_FILE)  "d:\CarbideWorkspace\smfserver_cleaned\example\fbpostproviderplugin\bld.inf"
-	-@ if EXIST "d:\CarbideWorkspace\smfserver_cleaned\example\fbpostproviderplugin\qmakepluginstubs" $(DEL_DIR)  "d:\CarbideWorkspace\smfserver_cleaned\example\fbpostproviderplugin\qmakepluginstubs"
+	-@ if EXIST "f:\Nokia\devices\Nokia_Symbian3_SDK_v0.8\SMFCode\smf_baseline_22june_latest\example\fbpostproviderplugin\fbpostproviderplugin_template.pkg" $(DEL_FILE)  "f:\Nokia\devices\Nokia_Symbian3_SDK_v0.8\SMFCode\smf_baseline_22june_latest\example\fbpostproviderplugin\fbpostproviderplugin_template.pkg"
+	-@ if EXIST "f:\Nokia\devices\Nokia_Symbian3_SDK_v0.8\SMFCode\smf_baseline_22june_latest\example\fbpostproviderplugin\qmakepluginstubs\fbpostproviderplugin.qtplugin" $(DEL_FILE)  "f:\Nokia\devices\Nokia_Symbian3_SDK_v0.8\SMFCode\smf_baseline_22june_latest\example\fbpostproviderplugin\qmakepluginstubs\fbpostproviderplugin.qtplugin"
+	-@ if EXIST "f:\Nokia\devices\Nokia_Symbian3_SDK_v0.8\SMFCode\smf_baseline_22june_latest\example\fbpostproviderplugin\fbpostproviderplugin_installer.pkg" $(DEL_FILE)  "f:\Nokia\devices\Nokia_Symbian3_SDK_v0.8\SMFCode\smf_baseline_22june_latest\example\fbpostproviderplugin\fbpostproviderplugin_installer.pkg"
+	-@ if EXIST "f:\Nokia\devices\Nokia_Symbian3_SDK_v0.8\SMFCode\smf_baseline_22june_latest\example\fbpostproviderplugin\Makefile" $(DEL_FILE)  "f:\Nokia\devices\Nokia_Symbian3_SDK_v0.8\SMFCode\smf_baseline_22june_latest\example\fbpostproviderplugin\Makefile"
+	-@ if EXIST "f:\Nokia\devices\Nokia_Symbian3_SDK_v0.8\SMFCode\smf_baseline_22june_latest\example\fbpostproviderplugin\Makefile_0xEfa582ee.mk" $(DEL_FILE)  "f:\Nokia\devices\Nokia_Symbian3_SDK_v0.8\SMFCode\smf_baseline_22june_latest\example\fbpostproviderplugin\Makefile_0xEfa582ee.mk"
+	-@ if EXIST "f:\Nokia\devices\Nokia_Symbian3_SDK_v0.8\SMFCode\smf_baseline_22june_latest\example\fbpostproviderplugin\fbpostproviderplugin_0xEfa582ee.mmp" $(DEL_FILE)  "f:\Nokia\devices\Nokia_Symbian3_SDK_v0.8\SMFCode\smf_baseline_22june_latest\example\fbpostproviderplugin\fbpostproviderplugin_0xEfa582ee.mmp"
+	-@ if EXIST "f:\Nokia\devices\Nokia_Symbian3_SDK_v0.8\SMFCode\smf_baseline_22june_latest\example\fbpostproviderplugin\plugin_commonU.def" $(DEL_FILE)  "f:\Nokia\devices\Nokia_Symbian3_SDK_v0.8\SMFCode\smf_baseline_22june_latest\example\fbpostproviderplugin\plugin_commonU.def"
+	-@ if EXIST "f:\Nokia\devices\Nokia_Symbian3_SDK_v0.8\SMFCode\smf_baseline_22june_latest\example\fbpostproviderplugin\.make.cache" $(DEL_FILE)  "f:\Nokia\devices\Nokia_Symbian3_SDK_v0.8\SMFCode\smf_baseline_22june_latest\example\fbpostproviderplugin\.make.cache"
+	-@ if EXIST "f:\Nokia\devices\Nokia_Symbian3_SDK_v0.8\SMFCode\smf_baseline_22june_latest\example\fbpostproviderplugin\bld.inf" $(DEL_FILE)  "f:\Nokia\devices\Nokia_Symbian3_SDK_v0.8\SMFCode\smf_baseline_22june_latest\example\fbpostproviderplugin\bld.inf"
+	-@ if EXIST "f:\Nokia\devices\Nokia_Symbian3_SDK_v0.8\SMFCode\smf_baseline_22june_latest\example\fbpostproviderplugin\qmakepluginstubs" $(DEL_DIR)  "f:\Nokia\devices\Nokia_Symbian3_SDK_v0.8\SMFCode\smf_baseline_22june_latest\example\fbpostproviderplugin\qmakepluginstubs"
 
 distclean: clean dodistclean
 
--- a/example/fbpostproviderplugin/fbpostproviderplugin.cpp	Mon Jun 07 11:43:45 2010 +0100
+++ b/example/fbpostproviderplugin/fbpostproviderplugin.cpp	Wed Jun 23 19:51:49 2010 +0530
@@ -1,21 +1,44 @@
+/**
+ * Copyright (c) 2010 Sasken Communication Technologies Ltd.
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of the "Eclipse Public License v1.0" 
+ * which accompanies  this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html"
+ *
+ * Initial Contributors:
+ * Chandradeep Gandhi, Sasken Communication Technologies Ltd - Initial contribution
+ *
+ * Contributors:
+ * Nalina Hariharan
+ * 
+ * Description:
+ * The Plugin that manages post operations on the logged in user's facebook account
+ *
+ */
 
 // Include files
 #include <QtPlugin>
 #include <QCryptographicHash>
 #include <QTextFormat>
-#include <QTextStream>
 #include <QFile>
-#include <QNetworkReply>
+#include <QVariant>
+#include <QListIterator>
+#include <QDebug>
+#ifdef SMF_XMLPARSING
 #include <QXmlStreamReader>
+#endif
 
 #include "fbpostproviderplugin.h"
 
-// Added for flickr testing - start - put your registered app's  keys here
-static const QString apiKey = "";
-static const QString apiSecret = "";
-static const QString sessionKey = "";
-static const QString sessionSecret = "";
-
+static int chance = 0;
+QString uid;
+#ifdef SMF_XMLPARSING
+SmfPost mypost;
+SmfContact contact;
+QString currentId;
+#endif
+QMap<QString, QString> idNameMap;
 
 /**
  * Method called by plugins to generate a signature string from a base string
@@ -24,8 +47,8 @@
  */
 QString FBPostProviderPlugin::generateSignature(const QString aBaseString)
 	{
-	writeLog("FBPostProviderPlugin::generateSignature");
-
+	qDebug()<<"Inside FBPostProviderPlugin::generateSignature()";
+	
 	// Create md5 hash of the signature string
     QByteArray byteArray;
     byteArray.insert(0, aBaseString.toAscii());
@@ -35,21 +58,6 @@
     return returnString;
 	}
 
-
-/**
- * Method called by plugins for logging
- * @param log string to be logged
- */
-void FBPostProviderPlugin::writeLog(QString log) const
-	{
-	QFile file("c:\\data\\PluginLogs.txt");
-    if (!file.open(QIODevice::Append | QIODevice::Text))
-	         ;
-    QTextStream out(&file);
-    out << log << "\n";
-    file.close();
-	}
-
 /**
  * Destructor
  */
@@ -60,49 +68,53 @@
 	}
 
 /**
- * Method that returns maximum no of chars (unicode) that service
- * provider can post without truncation. Negative value means
+ * Method that returns maximum no of chars (unicode) that service 
+ * provider can post without truncation. Negative value means 
  * no limit
  * @return Max characters that can be posted without truncation
  */
 qint32 FBPostProviderPlugin::maxCharsInPost( ) const
-		{
+	{
+	qDebug()<<"Inside FBPostProviderPlugin::maxCharsInPost()";
 	qint32 maxCharsInPost = 256;
 	return maxCharsInPost;
-		}
+	}
 /**
- * Method that returns maximum no of items that can be returned
- * in a single query to getPosts. Negative value means feature
+ * Method that returns maximum no of items that can be returned 
+ * in a single query to getPosts. Negative value means feature 
  * not supported.
  * @return Max items that can be returned in a single query
  */
 qint32 FBPostProviderPlugin::maxItems( ) const
-		{
+	{
+	qDebug()<<"Inside FBPostProviderPlugin::maxItems()";
 	qint32 maxItems = 10;
 	return maxItems;
-		}
+	}
 
 /**
- * <Method that returns all the formatting of posts that this
- * service provider supports. May return 0 items to mean
+ * <Method that returns all the formatting of posts that this 
+ * service provider supports. May return 0 items to mean 
  * only QString is supported.
  * @return Supported formats of posts
  */
 QVector<QTextFormat> FBPostProviderPlugin::supportedFormats ( ) const
-		{
+	{
+	qDebug()<<"Inside FBPostProviderPlugin::supportedFormats()";
 	QVector<QTextFormat> data;
 	return data;
-		}
+	}
 
 /**
  * Method that returns whether this SP supports Appearence
- * @return Returns true if Appearance is supported, else false.
+ * @return Returns true if Appearance is supported, else false. 
  * @see SmfAppearenceInfo
  */
 bool FBPostProviderPlugin::supportsAppearence ( ) const
-		{
+	{
+	qDebug()<<"Inside FBPostProviderPlugin::supportsAppearence()";
 	return false;
-		}
+	}
 
 /**
  * Method to get the latest posts
@@ -114,53 +126,218 @@
  */
 SmfPluginError FBPostProviderPlugin::retrieve( SmfPluginRequestData &aRequest,
 		const SmfContact *aUser,
-		const int aPageNum ,
+		const int aPageNum , 
 		const int aItemsPerPage  )
 	{
 	Q_UNUSED(aUser)
-	writeLog("Inside FBPostProviderPlugin::retrieve");
+	qDebug()<<"Inside FBPostProviderPlugin::retrieve()";
+	
+	//// Currently considering for self contact , ie, omitting aUser
+	if(0 == chance)
+		return getFacebookUserId(aRequest);
+	else
+		return getPosts(aRequest, aPageNum , aItemsPerPage);
+	}
+
+
+/**
+ * Method to get the user's facebook ID
+ * @param aRequest [out] The request data to be sent to network
+ * @return SmfPluginError Plugin error if any, else SmfPluginErrNone
+ */
+SmfPluginError FBPostProviderPlugin::getFacebookUserId( 
+		SmfPluginRequestData &aRequest )
+	{
+	qDebug()<<"Inside FBPostProviderPlugin::getFacebookUserId()";
+	
+	SmfPluginError error = SmfPluginErrUserNotLoggedIn;
+	
+#if 1
+// Reading the keys, CSM Stubbed - START
+	QFile file("c:\\data\\FacebookKeys.txt");
+	if (!file.open(QIODevice::ReadOnly))
+		{
+		qDebug()<<"File to read the keys could not be opened";
+		return error;
+		}
+	
+	qDebug()<<"Key file read, going to parse the key values from file";
+	
+	QByteArray arr = file.readAll();
+	QList<QByteArray> list = arr.split('\n');
+	file.close();
 
-	SmfPluginError error = SmfPluginErrInvalidRequest;
+	QString apiKey(list[0]);
+	QString apiSecret(list[1]);
+	QString sessionKey(list[2]);
+	QString sessionSecret(list[3]);
+	
+	qDebug()<<"Api Key = "+apiKey;
+	qDebug()<<"Api Secret = "+apiSecret;
+	qDebug()<<"session Key = "+sessionKey;
+	qDebug()<<"session Secret = "+sessionSecret;
+// Reading the keys, CSM Stubbed - END
+#endif
+	
+	// Get the current date and time and convert it to sec as a string
+	QString call_id = QString::number(QDateTime::currentDateTime().toTime_t(), 10);
+	
+	// Create the API signature string
+	QString baseString;
+	baseString.append("api_key="+apiKey);
+	baseString.append("call_id="+call_id);
+#ifdef SMF_XMLPARSING
+	baseString.append("format=XML");
+#else
+	baseString.append("format=JSON");
+#endif
+	baseString.append("method=users.getLoggedInUser");
+	baseString.append("session_key="+sessionKey);
+	baseString.append("ss=1");
+	baseString.append("v=1.0");
+	baseString.append(sessionSecret);
 
-	//// Currently considering for self contatc , ie, omitting aUser
+	// Create the url
+	QUrl url("http://api.facebook.com/restserver.php?");
+	url.addQueryItem("api_key", apiKey);
+	url.addQueryItem("call_id", call_id);
+#ifdef SMF_XMLPARSING
+	url.addQueryItem("format", "XML");
+#else
+	url.addQueryItem("format", "JSON");
+#endif
+	url.addQueryItem("method", "users.getLoggedInUser");
+	url.addQueryItem("session_key", sessionKey);
+	url.addQueryItem("ss", "1");
+	url.addQueryItem("v", "1.0");	
+	url.addQueryItem("sig", generateSignature(baseString));
+			
+	// Create the request, set the url
+	aRequest.iNetworkRequest.setUrl(url);
+	aRequest.iRequestType = SmfContactRetrievePosts;
+	aRequest.iPostData = NULL;
+	aRequest.iHttpOperationType = QNetworkAccessManager::GetOperation;
+	error = SmfPluginErrNone;
+
+	qDebug()<<"Url string is : "<<aRequest.iNetworkRequest.url().toString();
+	return error;
+	}
+
+/**
+ * Method to get the user's posts
+ * @param aRequest [out] The request data to be sent to network
+ * @param aPageNum The page to be extracted
+ * @param aItemsPerPage Number of items per page
+ * @return SmfPluginError Plugin error if any, else SmfPluginErrNone
+ */
+SmfPluginError FBPostProviderPlugin::getPosts( 
+		SmfPluginRequestData &aRequest,
+		const int aPageNum , 
+		const int aItemsPerPage  )
+	{
+	qDebug()<<"Inside FBPostProviderPlugin::getPosts()";
+	qDebug()<<"aPageNum = "<<aPageNum;
+	qDebug()<<"aItemsPerPage = "<<aItemsPerPage;
+	
+	SmfPluginError error = SmfPluginErrInvalidArguments;
+	
 	// invalid arguments
 	if( aPageNum < 0 || aItemsPerPage < 0 )
+		{
+		qDebug()<<"Invalid arguments";
 		return error;
-	else
+		}
+	
+	qDebug()<<"Valid arguments";
+	
+#if 1
+// Reading the keys, CSM Stubbed - START
+	QFile file("c:\\data\\FacebookKeys.txt");
+	if (!file.open(QIODevice::ReadOnly))
 		{
-		// Get the current date and time and convert it to sec as a string
-		QString call_id = QString::number(QDateTime::currentDateTime().toTime_t(), 10);
-
-		// Create the API signature string
-		QString baseString;
-		baseString.append("api_key="+apiKey);
-		baseString.append("call_id="+call_id);
-		baseString.append("format=XML");
-		baseString.append("method=stream.get");
-		baseString.append("session_key="+sessionKey);
-		baseString.append("ss=1");
-		baseString.append("v=1.0");
-		baseString.append(sessionSecret);
+		qDebug()<<"File to read the keys could not be opened";
+		return SmfPluginErrUserNotLoggedIn;
+		}
+	
+	qDebug()<<"Key file read, going to parse the key values from file";
+	
+	QByteArray arr = file.readAll();
+	QList<QByteArray> list = arr.split('\n');
+	file.close();
+	
+	QString apiKey(list[0]);
+	QString apiSecret(list[1]);
+	QString sessionKey(list[2]);
+	QString sessionSecret(list[3]);
+	
+	qDebug()<<"Api Key = "+apiKey;
+	qDebug()<<"Api Secret = "+apiSecret;
+	qDebug()<<"session Key = "+sessionKey;
+	qDebug()<<"session Secret = "+sessionSecret;
+// Reading the keys, CSM Stubbed - END
+#endif
+	
+	// Get the current date and time and convert it to sec as a string
+	QString call_id = QString::number(QDateTime::currentDateTime().toTime_t(), 10);
+	
+	// Create the API signature string
+	QString baseString;
+	baseString.append("api_key="+apiKey);
+	baseString.append("call_id="+call_id);
+#ifdef SMF_XMLPARSING
+	baseString.append("format=XML");
+#else
+	baseString.append("format=JSON");
+#endif
+	if(0 == aPageNum)
+		{
+		//baseString.append("limit="+QString::number((aItemsPerPage*(aPageNum+1)), 10));
+		qDebug()<<"Hardcoding pagenumber and itemperpage to fetch 5 posts";
+		int val = 5;
+		baseString.append("limit="+QString::number(val));
+		}
+	else
+		baseString.append("limit="+QString::number((aItemsPerPage*aPageNum), 10));
+	baseString.append("method=stream.get");
+	baseString.append("session_key="+sessionKey);
+	baseString.append("source_ids="+uid);
+	baseString.append("ss=1");
+	baseString.append("v=1.0");
+	baseString.append(sessionSecret);
 
-		// Create the url
-		QUrl url("http://api.facebook.com/restserver.php?");
-		url.addQueryItem("api_key", apiKey);
-		url.addQueryItem("call_id", call_id);
-		url.addQueryItem("format", "XML");
-		url.addQueryItem("method", "stream.get");
-		url.addQueryItem("session_key", sessionKey);
-		url.addQueryItem("ss", "1");
-		url.addQueryItem("v", "1.0");
-		url.addQueryItem("sig", generateSignature(baseString));
-
-		// Create the request, set the url
-		aRequest.iNetworkRequest.setUrl(url);
-		aRequest.iRequestType = SmfContactRetrievePosts;
-		aRequest.iPostData = NULL;
-		aRequest.iHttpOperationType = QNetworkAccessManager::GetOperation;
-		error = SmfPluginErrNone;
+	// Create the url
+	QUrl url("http://api.facebook.com/restserver.php?");
+	url.addQueryItem("api_key", apiKey);
+	url.addQueryItem("call_id", call_id);
+#ifdef SMF_XMLPARSING
+	url.addQueryItem("format", "XML");
+#else
+	url.addQueryItem("format", "JSON");
+#endif
+	if(0 == aPageNum)
+		{
+//		url.addQueryItem("limit", QString::number((aItemsPerPage*(aPageNum+1)), 10));
+		qDebug()<<"Hardcoding pagenumber and itemperpage to fetch 5 posts";
+		int val = 5;
+		url.addQueryItem("limit", QString::number(val));
 		}
-	writeLog("Url string is : "+aRequest.iNetworkRequest.url().toString());
+	else
+		url.addQueryItem("limit", QString::number((aItemsPerPage*aPageNum), 10));
+	url.addQueryItem("method", "stream.get");
+	url.addQueryItem("session_key", sessionKey);
+	url.addQueryItem("source_ids",uid);
+	url.addQueryItem("ss", "1");
+	url.addQueryItem("v", "1.0");	
+	url.addQueryItem("sig", generateSignature(baseString));
+	
+	// Create the request, set the url
+	aRequest.iNetworkRequest.setUrl(url);
+	aRequest.iRequestType = SmfContactRetrievePosts;
+	aRequest.iPostData = NULL;
+	aRequest.iHttpOperationType = QNetworkAccessManager::GetOperation;
+	error = SmfPluginErrNone;
+	
+	qDebug()<<"Url string is : "<<aRequest.iNetworkRequest.url().toString();
 	return error;
 	}
 
@@ -172,14 +349,15 @@
  * @return SmfPluginError Plugin error if any, else SmfPluginErrNone
  */
 SmfPluginError FBPostProviderPlugin::post( SmfPluginRequestData &aRequest,
-		const SmfPost &aPostData,
+		const SmfPost &aPostData, 
 		const SmfLocation &aLocation )
 	{
 	Q_UNUSED(aRequest)
-Q_UNUSED(aPostData)
-Q_UNUSED(aLocation)
+	Q_UNUSED(aPostData)
+	Q_UNUSED(aLocation)
+	qDebug()<<"Inside FBPostProviderPlugin::post()";
 	SmfPluginError error = SmfPluginErrInvalidRequest;
-	return error;
+	return error; 
 	}
 
 /**
@@ -192,9 +370,10 @@
 		const SmfPost &aPostData )
 	{
 	Q_UNUSED(aRequest)
-Q_UNUSED(aPostData)
+	Q_UNUSED(aPostData)
+	qDebug()<<"Inside FBPostProviderPlugin::updatePost()";
 	SmfPluginError error = SmfPluginErrInvalidRequest;
-	return error;
+	return error; 
 	}
 
 /**
@@ -206,15 +385,99 @@
  * @return SmfPluginError Plugin error if any, else SmfPluginErrNone
  */
 SmfPluginError FBPostProviderPlugin::postDirected( SmfPluginRequestData &aRequest,
-		const SmfPost &aPostData,
-		const SmfContact &aContact,
+		const SmfPost &aPostData, 
+		const SmfContact &aContact, 
 		const SmfLocation *aLocation  )
 	{
-	Q_UNUSED(aRequest)
-Q_UNUSED(aPostData)
-Q_UNUSED(aContact)
-Q_UNUSED(aLocation)
-	SmfPluginError error = SmfPluginErrInvalidRequest;
+	Q_UNUSED(aLocation)
+	qDebug()<<"Inside FBPostProviderPlugin::postDirected()";
+	
+	SmfPluginError error = SmfPluginErrInvalidArguments;
+	
+	// invalid arguments
+	qDebug()<<"To be Post data = "<<aPostData.description();
+	qDebug()<<"To be posted Contact id = "<<aContact.value("Guid").value<QContactGuid>().guid();
+	
+	if( (0 == aPostData.description().size()) || (0 == aContact.value("Guid").value<QContactGuid>().guid().size()) )
+		{
+		qDebug()<<"Invalid arguments";
+		return error;
+		}
+	
+	qDebug()<<"Valid arguments";
+			
+#if 1
+// Reading the keys, CSM Stubbed - START
+	QFile file("c:\\data\\FacebookKeys.txt");
+	if (!file.open(QIODevice::ReadOnly))
+		{
+		qDebug()<<"File to read the keys could not be opened";
+		return SmfPluginErrUserNotLoggedIn;
+		}
+	
+	qDebug()<<"Key file read, going to parse the key values from file";
+	
+	QByteArray arr = file.readAll();
+	QList<QByteArray> list = arr.split('\n');
+	file.close();
+	
+	QString apiKey(list[0]);
+	QString apiSecret(list[1]);
+	QString sessionKey(list[2]);
+	QString sessionSecret(list[3]);
+	
+	qDebug()<<"Api Key = "<<apiKey;
+	qDebug()<<"Api Secret = "<<apiSecret;
+	qDebug()<<"session Key = "<<sessionKey;
+	qDebug()<<"session Secret = "<<sessionSecret;
+// Reading the keys, CSM Stubbed - END
+#endif
+			
+	// Get the current date and time and convert it to sec as a string
+	QString call_id = QString::number(QDateTime::currentDateTime().toTime_t(), 10);
+	
+	// Create the API signature string
+	QString baseString;
+	baseString.append("api_key="+apiKey);
+	baseString.append("call_id="+call_id);
+#ifdef SMF_XMLPARSING
+	baseString.append("format=XML");
+#else
+	baseString.append("format=JSON");
+#endif
+	baseString.append("message="+aPostData.description());
+	baseString.append("method=stream.publish");
+	baseString.append("session_key="+sessionKey);
+	baseString.append("ss=1");
+	baseString.append("target_id="+aContact.value("Guid").value<QContactGuid>().guid());
+	baseString.append("v=1.0");
+	baseString.append(sessionSecret);
+
+	// Create the url
+	QUrl url("http://api.facebook.com/restserver.php?");
+	url.addQueryItem("api_key", apiKey);
+	url.addQueryItem("call_id", call_id);
+#ifdef SMF_XMLPARSING
+	url.addQueryItem("format", "XML");
+#else
+	url.addQueryItem("format", "JSON");
+#endif
+	url.addQueryItem("message", aPostData.description());
+	url.addQueryItem("method", "stream.publish");
+	url.addQueryItem("session_key", sessionKey);
+	url.addQueryItem("ss", "1");
+	url.addQueryItem("target_id", aContact.value("Guid").value<QContactGuid>().guid());
+	url.addQueryItem("v", "1.0");	
+	url.addQueryItem("sig", generateSignature(baseString));
+			
+	// Create the request, set the url
+	aRequest.iNetworkRequest.setUrl(url);
+	aRequest.iRequestType = SmfContactPostDirected;
+	aRequest.iPostData = NULL;
+	aRequest.iHttpOperationType = QNetworkAccessManager::GetOperation;
+	error = SmfPluginErrNone;
+	
+	qDebug()<<"Url string is : "<<aRequest.iNetworkRequest.url().toString();
 	return error;
 	}
 
@@ -228,15 +491,16 @@
  */
 SmfPluginError FBPostProviderPlugin::commentOnAPost(SmfPluginRequestData &aRequest,
 		const SmfPost &aTarget,
-		const SmfPost &aComment,
+		const SmfPost &aComment, 
 		const SmfLocation *aLocation )
 	{
 	Q_UNUSED(aRequest)
-Q_UNUSED(aTarget)
-Q_UNUSED(aComment)
-Q_UNUSED(aLocation)
+	Q_UNUSED(aTarget)
+	Q_UNUSED(aComment)
+	Q_UNUSED(aLocation)
+	qDebug()<<"Inside FBPostProviderPlugin::commentOnAPost()";
 	SmfPluginError error = SmfPluginErrInvalidRequest;
-	return error;
+	return error; 
 	}
 
 /**
@@ -246,15 +510,16 @@
  * @param aStatus The status string
  * @return SmfPluginError Plugin error if any, else SmfPluginErrNone
  */
-SmfPluginError FBPostProviderPlugin::postAppearence( SmfPluginRequestData &aRequest,
+SmfPluginError FBPostProviderPlugin::postAppearence( SmfPluginRequestData &aRequest,  
 		const SmfPresenceInfo &aAppearence,
 		const QString &aStatus )
 	{
 	Q_UNUSED(aRequest)
-Q_UNUSED(aAppearence)
-Q_UNUSED(aStatus)
+	Q_UNUSED(aAppearence)
+	Q_UNUSED(aStatus)
+	qDebug()<<"Inside FBPostProviderPlugin::postAppearence()";
 	SmfPluginError error = SmfPluginErrInvalidRequest;
-	return error;
+	return error; 
 	}
 
 /**
@@ -266,36 +531,39 @@
  * @param aEdited whether user changed items within the post
  * @return SmfPluginError Plugin error if any, else SmfPluginErrNone
  */
-SmfPluginError FBPostProviderPlugin::sharePost( SmfPluginRequestData &aRequest,
-		const SmfPost &aPostData,
-		const SmfContact &aContact,
+SmfPluginError FBPostProviderPlugin::sharePost( SmfPluginRequestData &aRequest, 
+		const SmfPost &aPostData, 
+		const SmfContact &aContact, 
 		const bool &aEdited)
 	{
 	Q_UNUSED(aRequest)
-Q_UNUSED(aPostData)
-Q_UNUSED(aContact)
-Q_UNUSED(aEdited)
+	Q_UNUSED(aPostData)
+	Q_UNUSED(aContact)
+	Q_UNUSED(aEdited)
+	qDebug()<<"Inside FBPostProviderPlugin::sharePost()";
 	SmfPluginError error = SmfPluginErrInvalidRequest;
-	return error;
+	return error; 
 	}
 
 /**
  * Customised method for SmfPostProviderPlugin interface
  * @param aRequest [out] The request data to be sent to network
- * @param aOperation The operation type (should be known between
+ * @param aOperation The operation type (should be known between 
  * the client interface and the plugin)
- * @param aData The data required to form the request (The type
+ * @param aData The data required to form the request (The type 
  * of data should be known between client and the plugin)
  * @return SmfPluginError Plugin error if any, else SmfPluginErrNone
  */
-SmfPluginError FBPostProviderPlugin::customRequest( SmfPluginRequestData &aRequest,
-		const int &aOperation, QByteArray *aData )
+SmfPluginError FBPostProviderPlugin::customRequest( SmfPluginRequestData &aRequest, 
+		const int &aOperation, 
+		QByteArray *aData )
 	{
 	Q_UNUSED(aRequest)
-Q_UNUSED(aOperation)
-Q_UNUSED(aData)
+	Q_UNUSED(aOperation)
+	Q_UNUSED(aData)
+	qDebug()<<"Inside FBPostProviderPlugin::customRequest()";
 	SmfPluginError error = SmfPluginErrInvalidRequest;
-	return error;
+	return error; 
 	}
 
 
@@ -309,7 +577,7 @@
 	{
 	// Save the SmfPluginUtil handle
 	m_util = aUtil;
-
+	
 	// Create an instance of FlickrProviderBase
 	m_provider = new FBProviderBase;
 	m_provider->initialize();
@@ -326,77 +594,389 @@
 
 /**
  * Method to get the result for a network request.
+ * @param aOperation The type of operation to be requested
  * @param aTransportResult The result of transport operation
  * @param aResponse The QByteArray instance containing the network response.
- * The plugins should delete this instance once they have read the
+ * The plugins should delete this instance once they have read the 
  * data from it.
- * @param aResult [out] An output parameter to the plugin manager.If the
- * return value is SmfSendRequestAgain, QVariant will be of type
+ * @param aResult [out] An output parameter to the plugin manager.If the 
+ * return value is SmfSendRequestAgain, QVariant will be of type 
  * SmfPluginRequestData.
- * For SmfPostProviderPlugin: If last operation was retrieve(), aResult will be
- * of type QList<SmfPost>. If last operation was post() or updatePost() or
- * postDirected() or commentOnAPost() or postAppearence() or sharePost(),
+ * For SmfPostProviderPlugin: If last operation was retrieve(), aResult will be 
+ * of type QList<SmfPost>. If last operation was post() or updatePost() or 
+ * postDirected() or commentOnAPost() or postAppearence() or sharePost(), 
  * aResult will be of type bool
  * @param aRetType [out] SmfPluginRetType
  * @param aPageResult [out] The SmfResultPage structure variable
  */
-SmfPluginError FBPostProviderPlugin::responseAvailable(
-		const SmfTransportResult &aTransportResult,
-		QByteArray *aResponse,
-		QVariant* aResult,
+SmfPluginError FBPostProviderPlugin::responseAvailable( 
+		const SmfRequestTypeID aOperation,
+		const SmfTransportResult &aTransportResult, 
+		QByteArray *aResponse, 
+		QVariant* aResult, 
 		SmfPluginRetType &aRetType,
 		SmfResultPage &aPageResult )
 	{
-	writeLog("FBPostProviderPlugin::::responseAvailable");
+	qDebug()<<"Inside FBPostProviderPlugin::responseAvailable()";
 	Q_UNUSED(aPageResult)
-	//This API is slightly changed by Manasij
-	SmfPluginError error;
+	SmfPluginError error = SmfPluginErrNetworkError;
+	
+	if( !aResponse || (0 == aResponse->size()) )
+		{
+		qDebug()<<"Response is NULL or empty";
+		aRetType = SmfRequestError;
+		return error;
+		}
+	
+	QByteArray response(*aResponse);
+	delete aResponse;
+	qDebug()<<"FB response = "<<QString(response);
+	qDebug()<<"FB response size = "<<response.size();
+	
 	if(SmfTransportOpNoError == aTransportResult)
 		{
-		writeLog("No transport error");
-
-		// Write the response to a file
-		QFile file("c:\\data\\fbresponse.txt");
-		writeLog("response data written to c:\\data\\fbresponse.txt");
-		if (!file.open(QIODevice::Append | QIODevice::Text))
-				 ;
-		file.write(aResponse->data());
-		file.close();
-
-		QList<SmfPost> list;
+		qDebug()<<"No transport error";
 
-		// For getting contacts
-		QXmlStreamReader xml(aResponse->data());
-		while (!xml.atEnd())
+		if(SmfContactRetrievePosts == aOperation)
 			{
-			xml.readNext();
-			if (xml.tokenType() == QXmlStreamReader::StartElement)
+			qDebug()<<"Response for retrieving posts";
+			if(0 == chance)
+				{
+				chance = 1;
+				qDebug()<<"For Getting Current logged in User";
+				
+				QString errStr;
+				errStr.clear();
+				uid.clear();
+#ifdef SMF_XMLPARSING
+				qDebug()<<"Xml parsing";
+				// For getting contacts from xml response
+				QXmlStreamReader xml(response);
+				while (!xml.atEnd())
+					{
+					xml.readNext();
+					if (xml.tokenType() == QXmlStreamReader::StartElement)
+						{
+						if (xml.name() == "users_getLoggedInUser_response")
+							{
+							qDebug()<<"users_getLoggedInUser_response tag found";
+							QString message(xml.readElementText());
+							uid.append(message);
+							qDebug()<<"current logged in uid  = "<<uid;
+							}
+						else if("error_msg" == xml.name())
+							{
+							qDebug()<<"error_msg tag found";
+							errStr.append(xml.readElementText());
+							break;
+							}
+						}
+					}
+#else
+				qDebug()<<"Json parsing";
+				if(response.contains(QByteArray("error_msg")))
+					{
+					qDebug()<<"Response contains error, so parse and get the error code";
+					
+					bool ok;
+					QVariant result = m_util->parse(response, &ok);
+					if (!ok) 
+						{
+						qDebug()<<"An error occurred during json parsing, error = "<<m_util->errorString();
+						aRetType = SmfRequestError;
+						return SmfPluginErrParsingFailed;
+						}
+					else
+						{
+						QVariantMap map = result.toMap();
+						errStr.append(map["error_msg"].toString());
+						}
+					}
+				else
+					{
+					qDebug()<<"Response is ok, so don't parse";
+					uid.append(response);
+					}
+#endif
+				
+				if(errStr.size())
+					{
+					qDebug()<<"Response error found = "<<errStr;
+					error = SmfPluginErrInvalidRequest;
+					aRetType = SmfRequestError;
+					aResult->setValue(errStr);
+					}
+				else
+					{
+					qDebug()<<"current logged in uid  = "<<uid;
+					aRetType = SmfSendRequestAgain;
+					error = SmfPluginErrNone;
+					}
+				}
+			else
 				{
-				// If the tag is contact
-				if (xml.name() == "message")
+				qDebug()<<"For Fetching posts";
+			
+				QList<SmfPost> list;
+				QString errStr;
+				errStr.clear();
+				
+#ifdef SMF_XMLPARSING
+				qDebug()<<"Xml parsing";
+				
+				// For getting contacts from xml response
+				QXmlStreamReader xml(response);
+				while (!xml.atEnd())
+					{
+					xml.readNext();
+					
+					if (xml.tokenType() == QXmlStreamReader::StartElement)
+						{
+						if (xml.name() == "post_id")
+							{
+							QString message(xml.readElementText());
+							mypost.setId(message);
+							qDebug()<<"post post_id = "<<mypost.id();
+							}
+						else if (xml.name() == "actor_id")
+							{
+							QString message(xml.readElementText());
+	
+							QContactGuid guid;
+							guid.setGuid(message);
+							QVariant varGuid = QVariant::fromValue(guid);
+							contact.setValue("Guid", varGuid);
+							mypost.setOwner(contact);
+							qDebug()<<"post actor_id = "<<contact.value("Guid").value<QContactGuid>().guid();
+							}
+						else if (xml.name() == "message")
+							{
+							QString message(xml.readElementText());
+							mypost.setDescription(message);
+							qDebug()<<"post message = "<<mypost.description();
+							}
+						else if (xml.name() == "permalink")
+							{
+							QString message(xml.readElementText());
+							QUrl url(message);
+							mypost.setUrl(url);
+							qDebug()<<"post url = "<<mypost.url().toString();
+							}
+						else if(xml.name() == "id")
+							{
+							currentId.clear();
+							currentId.append(xml.readElementText());
+							qDebug()<<"post owners id = "<<currentId;
+							}
+						else if(xml.name() == "name")
+							{
+							QString name = xml.readElementText();
+							idNameMap.insert(currentId, name);
+							currentId.clear();
+							qDebug()<<"post owners name = "<<name;
+							}
+						else if("error_msg" == xml.name())
+							{
+							qDebug()<<"error_msg tag found";
+							errStr.append(xml.readElementText());
+							break;
+							}
+						}
+					if (xml.tokenType() == QXmlStreamReader::EndElement)
+						{
+						if (xml.name() == "stream_post")
+							{
+							list.append(mypost);
+							}
+						}
+					}
+				// Loop for setting the "Name" of sctor_id, currently only "Guid" is there 
+				// in the post.owner member
+				if(0 == errStr.size())
 					{
-					writeLog("message tag found");
-
-					SmfPost post;
-					QString descStr(xml.readElementText());
-					post.setDescription(descStr);
-
-                    list.append(post);
+					for (int i=0 ; i <list.count() ; i++)
+						{
+						QContactGuid guid;
+						guid.setGuid(list[i].owner().value("Guid").value<QContactGuid>().guid());
+						QVariant guidVar = QVariant::fromValue(guid);
+						contact.setValue("Guid", guidVar);
+						
+						QContactName contactName;
+						contactName.setFirstName(idNameMap.value(list[i].owner().value("Guid").value<QContactGuid>().guid()));
+						QVariant nameVar = QVariant::fromValue(contactName);
+						contact.setValue("Name", nameVar);
+						
+						list[i].setOwner(contact);
+						}
+					}
+#else
+				qDebug()<<"Json parsing";
+				
+				bool ok;
+				QVariantMap result = m_util->parse(response, &ok).toMap();
+				if (!ok) 
+					{
+					qDebug()<<"An error occurred during json parsing";
+					aRetType = SmfRequestError;
+					return SmfPluginErrParsingFailed;
+					}
+				
+				chance = 0;
+				
+				if(response.contains(QByteArray("error_msg")))
+					{
+					errStr.append(result["error_msg"].toString());
+					}
+				else
+					{
+					QList<QVariant> list1 = result["posts"].toList();
+					QListIterator<QVariant> iter(list1);
+					while(iter.hasNext())
+						{
+						SmfPost post;
+	
+						QVariantMap map2 = iter.next().toMap();
+						qDebug()<<"post_id = "<<map2["post_id"].toString();
+						qDebug()<<"viewer_id = "<<map2["viewer_id"].toString();
+						qDebug()<<"message = "<<map2["message"].toString();
+						qDebug()<<"updated_time = "<<map2["updated_time"].toString();
+						qDebug()<<"created_time = "<<map2["created_time"].toString();
+						qDebug()<<"permalink = "<<map2["permalink"].toString();
+						
+						// Set the posts's description
+						post.setDescription(map2["message"].toString());
+						
+						// Set the posts's link
+						QUrl url(map2["permalink"].toString());
+						post.setUrl(url);
+						
+						// Set the posts's Id
+						post.setId(map2["post_id"].toString());
+						
+						SmfContact contact;
+						QContactGuid guid;
+						guid.setGuid(map2["actor_id"].toString());
+						QVariant varGuid = QVariant::fromValue(guid);
+						contact.setValue("Guid", varGuid);
+						
+						// Set the posts's owner details
+						post.setOwner(contact);
+						
+						list.append(post);
+						}
+					
+					// Loop for getting the "Name" of actor_id
+					QList<QVariant> list2 = result["profiles"].toList();
+					QListIterator<QVariant> iter2(list2);
+					while(iter2.hasNext())
+						{
+						QVariantMap map2 = iter2.next().toMap();
+						qDebug()<<"owner's id = "<<map2["id"].toString();
+						qDebug()<<"owner's name = "<<map2["name"].toString();
+						idNameMap.insert(map2["id"].toString(), map2["name"].toString());
+						}
+					
+					// Loop for setting the "Name" of actor_id
+					for (int i=0 ; i <list.count() ; i++)
+						{
+						SmfContact contact = list[i].owner();
+						
+						QContactName contactName;
+						contactName.setFirstName(idNameMap.value(contact.value("Guid").value<QContactGuid>().guid()));
+						qDebug()<<"Name = "<<contactName.firstName();
+						QVariant nameVar = QVariant::fromValue(contactName);
+						contact.setValue("Name", nameVar);
+						
+						list[i].setOwner(contact);
+						}
+					}
+#endif
+				if(errStr.size())
+					{
+					qDebug()<<"Response error found = "<<errStr;
+					error = SmfPluginErrInvalidRequest;
+					aRetType = SmfRequestError;
+					aResult->setValue(errStr);
+					}
+				else
+					{
+					qDebug()<<"list count = "<<list.count();
+					aResult->setValue(list);
+					aRetType = SmfRequestComplete;
+					error = SmfPluginErrNone;
 					}
 				}
 			}
+		else if(SmfContactPostDirected == aOperation)
+			{
+			qDebug()<<"Response for post directed";
+					
+			bool posted = false;
+			
+#ifdef SMF_XMLPARSING
+				// For getting contacts from xml response
+				QXmlStreamReader xml(response);
+				while (!xml.atEnd())
+					{
+					xml.readNext();
+					if (xml.tokenType() == QXmlStreamReader::StartElement)
+						{
+						if (xml.name() == "stream_publish_response")
+							{
+							qDebug()<<"stream_publish_response tag found";
+							QString message(xml.readElementText());
+							qDebug()<<"response content is = "<<message;
+							qDebug()<<"response size is = "<<message.size();
+							if(message.size())
+								posted = true;
+							else
+								posted = false;
+							}
+						}
+					}
+#else
+				bool ok;
+				QVariantMap result = m_util->parse(response, &ok).toMap();
+				if (!ok) 
+					{
+					qDebug()<<"Response cannot be parsed";
+					posted = true;
+					aRetType = SmfRequestComplete;
+					error = SmfPluginErrNone;
+					}
+				else
+					{
+					qDebug()<<"Error!!!";
+					aRetType = SmfRequestError;
+					error =  SmfPluginErrInvalidRequest;
+					}
+#endif
+				
+			qDebug()<<"post posted???  = "<<posted;
+			aResult->setValue(posted);
+			}
+		else
+			{
+			qDebug()<<"Service unsupported, currently only SmfContactRetrievePosts and SmfContactPostDirected!!!";
+			aRetType = SmfRequestError;
+			error = SmfPluginErrServiceNotSupported;
+			}
+		}
 
-		aResult->setValue(list);
+	else if(SmfTransportOpOperationCanceledError == aTransportResult)
+		{
+		qDebug()<<"Operation Cancelled !!!";
+		error = SmfPluginErrCancelComplete;
 		aRetType = SmfRequestComplete;
-		error = SmfPluginErrNone;
 		}
 
 	else
 		{
-		error = SmfPluginErrInvalidRequest;
+		qDebug()<<"Transport Error !!!";
+		error = SmfPluginErrNetworkError;
 		aRetType = SmfRequestError;
 		}
-	delete aResponse;
+	
 	return error;
 	}
 
@@ -463,6 +1043,25 @@
 	}
 
 /**
+* Method to get the list of interfaces that this provider support
+* @return List of supported Interafces
+*/
+QList<QString> FBProviderBase::supportedInterfaces( ) const
+	{
+	return m_supportedInterfaces;
+	}
+
+/**
+* Method to get the list of languages supported by this service provider
+* @return a QStringList of languages supported by this service 
+* provider in 2 letter ISO 639-1 format.
+*/
+QStringList FBProviderBase::supportedLanguages( ) const
+	{
+	return m_supportedLangs;
+	}
+
+/**
  * Method to get the Plugin specific ID
  * @return The Plugin specific ID
  */
@@ -472,27 +1071,27 @@
 	}
 
 /**
- * Method to get the ID of the authentication application
+ * Method to get the ID of the authentication application 
  * for this service
  * @param aProgram The authentication application name
  * @param aArguments List of arguments required for authentication app
  * @param aMode Strting mode for authentication application
- * @return The ID of the authentication application
+ * @return The ID of the authentication application 
  */
-QString FBProviderBase::authenticationApp( QString &aProgram,
-		QStringList & aArguments,
+QString FBProviderBase::authenticationApp( QString &aProgram, 
+		QStringList & aArguments, 
 		QIODevice::OpenModeFlag aMode ) const
 	{
 	Q_UNUSED(aProgram)
-Q_UNUSED(aArguments)
-Q_UNUSED(aMode)
+	Q_UNUSED(aArguments)
+	Q_UNUSED(aMode)
 	return m_authAppId;
 	}
 
 /**
- * Method to get the unique registration ID provided by the
+ * Method to get the unique registration ID provided by the 
  * Smf for authorised plugins
- * @return The unique registration ID/token provided by the Smf for
+ * @return The unique registration ID/token provided by the Smf for 
  * authorised plugins
  */
 QString FBProviderBase::smfRegistrationId( ) const
@@ -500,6 +1099,10 @@
 	return m_smfRegToken;
 	}
 
+/**
+ * Method that initializes this class. This method should be called 
+ * from the initialize() method of the FBPostProviderPlugin class
+ */
 void FBProviderBase::initialize()
 	{
 	m_serviceName = "Facebook";
@@ -508,6 +1111,7 @@
 	m_pluginId = "fbpostproviderplugin.qtplugin";
 	m_authAppId = "Facebook AuthAppId";
 	m_smfRegToken = "Facebook RegToken";
+	m_supportedInterfaces.append("org.symbian.smf.plugin.contact.posts/v0.2");
 	}
 
 
--- a/example/fbpostproviderplugin/fbpostproviderplugin.h	Mon Jun 07 11:43:45 2010 +0100
+++ b/example/fbpostproviderplugin/fbpostproviderplugin.h	Wed Jun 23 19:51:49 2010 +0530
@@ -1,3 +1,22 @@
+/**
+ * Copyright (c) 2010 Sasken Communication Technologies Ltd.
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of the "Eclipse Public License v1.0" 
+ * which accompanies  this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html"
+ *
+ * Initial Contributors:
+ * Chandradeep Gandhi, Sasken Communication Technologies Ltd - Initial contribution
+ *
+ * Contributors:
+ * Nalina Hariharan
+ * 
+ * Description:
+ * The Plugin that manages post operations on the logged in user's facebook account
+ *
+ */
+
 #ifndef _FBPOSTPROVIDERPLUGIN_H
 #define _FBPOSTPROVIDERPLUGIN_H
 
@@ -10,16 +29,23 @@
 class QVariant;
 class QNetworkReply;
 
-// Class declaration
+
+/**
+ * The Plugin that manages post operations on the logged in user's 
+ * facebook account
+ */
 class FBPostProviderPlugin : public QObject, public SmfPostProviderPlugin
 {
 	Q_OBJECT
 	Q_INTERFACES( SmfPostProviderPlugin SmfPluginBase )
 
 public:
+	/**
+	 * Destructor
+	 */
 	virtual ~FBPostProviderPlugin( );
 	
-public: // From SmfPostProviderPlugin
+public: // From SmfPostProviderPlugin interface
 	
 	/**
 	 * Method that returns maximum no of chars (unicode) that service 
@@ -149,7 +175,7 @@
 	SmfPluginError customRequest( SmfPluginRequestData &aRequest, 
 			const int &aOperation, QByteArray *aData );
 	
-public: // From SmfPluginBase
+public: // From SmfPluginBase interface
 	/**
 	 * The first method to be called in the plugin that implements this interface.
 	 * If this method is not called, plugin may not behave as expected.
@@ -166,6 +192,7 @@
 	
 	/**
 	 * Method to get the result for a network request.
+	 * @param aOperation The type of operation to be requested
 	 * @param aTransportResult The result of transport operation
 	 * @param aResponse The QByteArray instance containing the network response.
 	 * The plugins should delete this instance once they have read the 
@@ -181,6 +208,7 @@
 	 * @param aPageResult [out] The SmfResultPage structure variable
 	 */
 	SmfPluginError responseAvailable( 
+			const SmfRequestTypeID aOperation,
 			const SmfTransportResult &aTransportResult, 
 			QByteArray *aResponse, 
 			QVariant* aResult, 
@@ -193,26 +221,44 @@
 	 * @param aBaseString The base string
 	 * @return The md5 hash of the base string
 	 */
-	QString generateSignature(const QString aBaseString);
+	QString generateSignature( const QString aBaseString );
 	
 	/**
-	 * Method called by plugins for logging
-	 * @param log string to be logged
+	 * Method to get the user's facebook ID
+	 * @param aRequest [out] The request data to be sent to network
+	 * @return SmfPluginError Plugin error if any, else SmfPluginErrNone
 	 */
-	void writeLog(QString log) const;
+	SmfPluginError getFacebookUserId( SmfPluginRequestData &aRequest );
+
+	/**
+	 * Method to get the user's posts
+	 * @param aRequest [out] The request data to be sent to network
+	 * @param aPageNum The page to be extracted
+	 * @param aItemsPerPage Number of items per page
+	 * @return SmfPluginError Plugin error if any, else SmfPluginErrNone
+	 */
+	SmfPluginError getPosts( SmfPluginRequestData &aRequest,
+			const int aPageNum , 
+			const int aItemsPerPage );
 	
 private:
 	FBProviderBase *m_provider;
 	SmfPluginUtil *m_util;
 };
 
-// Class declaration
+
+/**
+ * The Plugin class that implements SmfProviderBase for this facebook plugin
+ */
 class FBProviderBase : public QObject, public SmfProviderBase
 	{
 	Q_OBJECT
 	Q_INTERFACES( SmfProviderBase )
 
 public:
+	/**
+	 * Destructor
+	 */
 	virtual ~FBProviderBase( );
 
 	/**
@@ -252,6 +298,19 @@
 	QImage applicationIcon( ) const;
 	
 	/**
+	* Method to get the list of interfaces that this provider support
+	* @return List of supported Interafces
+	*/
+	QList<QString> supportedInterfaces( ) const;
+	
+	/**
+	* Method to get the list of languages supported by this service provider
+	* @return a QStringList of languages supported by this service 
+	* provider in 2 letter ISO 639-1 format.
+	*/
+	QStringList supportedLanguages( ) const;
+	
+	/**
 	 * Method to get the Plugin specific ID
 	 * @return The Plugin specific ID
 	 */
@@ -277,8 +336,14 @@
 	QString smfRegistrationId( ) const;
 	
 private:
+	/**
+	 * Method that initializes this class. This method should be called 
+	 * from the initialize() method of the FBPostProviderPlugin class
+	 */
+	void initialize();
+	
+private:
 	friend class FBPostProviderPlugin;
-	void initialize();
 	QString m_serviceName;
 	QImage m_serviceIcon;
 	QString m_description;
@@ -288,6 +353,8 @@
 	QString m_pluginId;
 	QString m_authAppId;
 	QString m_smfRegToken;
+	QList<QString> m_supportedInterfaces;
+	QStringList m_supportedLangs;
 	};
 
 #endif /*_FBPOSTPROVIDERPLUGIN_H*/
--- a/example/fbpostproviderplugin/fbpostproviderplugin.pro	Mon Jun 07 11:43:45 2010 +0100
+++ b/example/fbpostproviderplugin/fbpostproviderplugin.pro	Wed Jun 23 19:51:49 2010 +0530
@@ -9,7 +9,7 @@
 QT += core \
 	xml \
 	network
-	
+
 HEADERS = fbpostproviderplugin.h
 
 SOURCES = fbpostproviderplugin.cpp
@@ -28,11 +28,13 @@
     pluginDep.path = $$QT_PLUGINS_BASE_DIR/smf/plugin/contact.posts
     DEPLOYMENT += pluginDep
     
-    TARGET.CAPABILITY = ReadUserData \
-        WriteUserData \
-        LocalServices \
-        NetworkServices \
-        UserEnvironment
+    TARGET.CAPABILITY = NetworkServices \
+    	ReadUserData \
+    	WriteUserData \
+    	LocalServices \
+    	UserEnvironment \
+    	ReadDeviceData \
+    	WriteDeviceData
     
    LIBS += -lsmfclient.dll
 }
--- a/example/fbpostproviderplugin/fbpostproviderplugin_template.pkg	Mon Jun 07 11:43:45 2010 +0100
+++ b/example/fbpostproviderplugin/fbpostproviderplugin_template.pkg	Wed Jun 23 19:51:49 2010 +0530
@@ -1,12 +1,13 @@
-; fbpostproviderplugin_template.pkg generated by qmake at 2010-05-18T16:00:33
+; fbpostproviderplugin_template.pkg generated by qmake at 2010-06-22T14:10:41
 ; This file is generated by qmake and should not be modified by the user
 ;
 
 ; Language
 &EN
 
+
 ; SIS header: name, uid, version
-#{"fbpostproviderplugin"},(0xEa2c8e07),1,0,0
+#{"fbpostproviderplugin"},(0xEfa582ee),1,0,0
 
 ; Localised Vendor name
 %{"Vendor"}
@@ -14,20 +15,21 @@
 ; Unique Vendor name
 :"Vendor"
 
+
 ; Manual PKG pre-rules from PRO files
+; Default dependency to Qt libraries
+(0x2001E61C), 4, 6, 3, {"Qt"}
 ; Default HW/platform dependencies
 [0x101F7961],0,0,0,{"S60ProductID"}
 [0x102032BE],0,0,0,{"S60ProductID"}
 [0x102752AE],0,0,0,{"S60ProductID"}
 [0x1028315F],0,0,0,{"S60ProductID"}
  
-; Default dependency to Qt libraries
-(0x2001E61C), 4, 6, 1, {"Qt"}
 ; Default dependency to QtMobility libraries
-(0x2002AC89), 0, 2, 0, {"QtMobility"}
+(0x2002AC89), 1, 0, 0, {"QtMobility"}
 
 ; DEPLOYMENT
-"d:/S60/devices/S60_5th_Edition_SDK_v0.9/epoc32/release/$(PLATFORM)/$(TARGET)/fbpostproviderplugin.dll"    - "!:\sys\bin\fbpostproviderplugin.dll"
-"d:/CarbideWorkspace/smfserver_cleaned/example/fbpostproviderplugin/qmakepluginstubs/fbpostproviderplugin.qtplugin"    - "!:\resource\qt\plugins\smf\plugin\contact.posts\fbpostproviderplugin.qtplugin"
+"/Nokia/devices/Nokia_Symbian3_SDK_v0.8/epoc32/release/$(PLATFORM)/$(TARGET)/fbpostproviderplugin.dll"    - "!:\sys\bin\fbpostproviderplugin.dll"
+"/Nokia/devices/Nokia_Symbian3_SDK_v0.8/epoc32/data/z/resource/qt/plugins/smf/plugin/contact.posts/fbpostproviderplugin.qtplugin"    - "!:\resource\qt\plugins\smf\plugin\contact.posts\fbpostproviderplugin.qtplugin"
 
 ; Manual PKG post-rules from PRO files
--- a/example/fbpostproviderplugin/plugin_commonU.def	Mon Jun 07 11:43:45 2010 +0100
+++ b/example/fbpostproviderplugin/plugin_commonU.def	Wed Jun 23 19:51:49 2010 +0530
@@ -1,5 +1,5 @@
 ; ==============================================================================
-; Generated by qmake (2.01a) (Qt 4.6.1) on: 2010-05-18T16:00:33
+; Generated by qmake (2.01a) (Qt 4.6.3) on: 2010-06-22T14:10:41
 ; This file is generated by qmake and should not be modified by the
 ; user.
 ;  Name        : plugin_commonU.def
--- a/example/fbpostproviderplugin/qmakepluginstubs/fbpostproviderplugin.qtplugin	Mon Jun 07 11:43:45 2010 +0100
+++ b/example/fbpostproviderplugin/qmakepluginstubs/fbpostproviderplugin.qtplugin	Wed Jun 23 19:51:49 2010 +0530
@@ -1,1 +1,1 @@
-This file is a Qt plugin stub file. The real Qt plugin is located in \sys\bin. Created:2010-05-18T16:00:33
+This file is a Qt plugin stub file. The real Qt plugin is located in /sys/bin. Created:2010-06-22T14:10:41
--- a/example/flickrcontactfetcherplugin/Makefile	Mon Jun 07 11:43:45 2010 +0100
+++ b/example/flickrcontactfetcherplugin/Makefile	Wed Jun 23 19:51:49 2010 +0530
@@ -1,5 +1,5 @@
 # ==============================================================================
-# Generated by qmake (2.01a) (Qt 4.6.1) on: Tue May 18 16:01:40 2010
+# Generated by qmake (2.01a) (Qt 4.6.3) on: Tue Jun 22 14:10:41 2010
 # This file is generated by qmake and should not be modified by the
 # user.
 #  Name        : Makefile
@@ -9,10 +9,12 @@
 
 
 MAKEFILE          = Makefile
-QMAKE             = d:\Qt\4.6.1\bin\qmake
+QMAKE             = f:\Qt\4.6.3\bin\qmake
 DEL_FILE          = del
 DEL_DIR           = rmdir
 MOVE              = move
+CHK_DIR_EXISTS    = if not exist
+MKDIR             = mkdir
 XCOPY             = xcopy /d /f /h /r /y /i
 ABLD              = ABLD.BAT
 DEBUG_PLATFORMS   = winscw gcce armv5 armv6
@@ -26,13 +28,13 @@
 endif
 
 DEFINES	 = -DSYMBIAN -DUNICODE -DQT_KEYPAD_NAVIGATION -DQT_SOFTKEYS_ENABLED -DQT_USE_MATH_H_FLOATS -DQT_PLUGIN -DQT_XML_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB
-INCPATH	 =  -I"D:/Qt/4.6.1/include/QtCore" -I"D:/Qt/4.6.1/include/QtCore/tmp" -I"D:/Qt/4.6.1/include/QtNetwork" -I"D:/Qt/4.6.1/include/QtNetwork/tmp" -I"D:/Qt/4.6.1/include/QtGui" -I"D:/Qt/4.6.1/include/QtGui/tmp" -I"D:/Qt/4.6.1/include/QtXml" -I"D:/Qt/4.6.1/include/QtXml/tmp" -I"D:/Qt/4.6.1/include" -I"D:/Qt/4.6.1/include/tmp" -I"D:/CarbideWorkspace/smfserver_cleaned/example/flickrcontactfetcherplugin" -I"D:/CarbideWorkspace/smfserver_cleaned/example/flickrcontactfetcherplugin/tmp" -I"D:/Qt/4.6.1/mkspecs/common/symbian" -I"D:/Qt/4.6.1/mkspecs/common/symbian/tmp" -I"D:/S60/devices/S60_5th_Edition_SDK_v0.9/epoc32/include" -I"D:/S60/devices/S60_5th_Edition_SDK_v0.9/epoc32/include/stdapis" -I"D:/S60/devices/S60_5th_Edition_SDK_v0.9/epoc32/include/stdapis/sys" -I"D:/S60/devices/S60_5th_Edition_SDK_v0.9/epoc32/include/middleware" -I"D:/S60/devices/S60_5th_Edition_SDK_v0.9/epoc32/include/domain/middleware" -I"D:/S60/devices/S60_5th_Edition_SDK_v0.9/epoc32/include/applications" -I"D:/S60/devices/S60_5th_Edition_SDK_v0.9/epoc32/include/domain/applications" -I"D:/S60/devices/S60_5th_Edition_SDK_v0.9/epoc32/include/domain/middleware/loc" -I"D:/S60/devices/S60_5th_Edition_SDK_v0.9/epoc32/include/stdapis/stlport"
+INCPATH	 =  -I"F:/Qt/4.6.3/include/QtCore" -I"F:/Qt/4.6.3/include/QtCore/tmp" -I"F:/Qt/4.6.3/include/QtNetwork" -I"F:/Qt/4.6.3/include/QtNetwork/tmp" -I"F:/Qt/4.6.3/include/QtGui" -I"F:/Qt/4.6.3/include/QtGui/tmp" -I"F:/Qt/4.6.3/include/QtXml" -I"F:/Qt/4.6.3/include/QtXml/tmp" -I"F:/Qt/4.6.3/include" -I"F:/Qt/4.6.3/include/tmp" -I"F:/Qt/4.6.3/include/QtContacts" -I"F:/Qt/4.6.3/include/QtContacts/tmp" -I"F:/Qt/4.6.3/include/QtLocation" -I"F:/Qt/4.6.3/include/QtLocation/tmp" -I"F:/Qt/4.6.3/mkspecs/common/symbian" -I"F:/Qt/4.6.3/mkspecs/common/symbian/tmp" -I"F:/Nokia/devices/Nokia_Symbian3_SDK_v0.8/epoc32/include" -I"F:/Nokia/devices/Nokia_Symbian3_SDK_v0.8/epoc32/include/stdapis" -I"F:/Nokia/devices/Nokia_Symbian3_SDK_v0.8/epoc32/include/stdapis/sys" -I"F:/Nokia/devices/Nokia_Symbian3_SDK_v0.8/epoc32/include/mw" -I"F:/Nokia/devices/Nokia_Symbian3_SDK_v0.8/epoc32/include/platform/mw" -I"F:/Nokia/devices/Nokia_Symbian3_SDK_v0.8/epoc32/include/platform" -I"F:/Nokia/devices/Nokia_Symbian3_SDK_v0.8/epoc32/include/app" -I"F:/Nokia/devices/Nokia_Symbian3_SDK_v0.8/epoc32/include/platform/app" -I"F:/Nokia/devices/Nokia_Symbian3_SDK_v0.8/epoc32/include/platform/loc" -I"F:/Nokia/devices/Nokia_Symbian3_SDK_v0.8/epoc32/include/platform/mw/loc" -I"F:/Nokia/devices/Nokia_Symbian3_SDK_v0.8/epoc32/include/platform/app/loc" -I"F:/Nokia/devices/Nokia_Symbian3_SDK_v0.8/epoc32/include/platform/loc/sc" -I"F:/Nokia/devices/Nokia_Symbian3_SDK_v0.8/epoc32/include/platform/mw/loc/sc" -I"F:/Nokia/devices/Nokia_Symbian3_SDK_v0.8/epoc32/include/platform/app/loc/sc" -I"F:/Nokia/devices/Nokia_Symbian3_SDK_v0.8/epoc32/include/stdapis/stlportv5" -I"F:/Nokia/devices/Nokia_Symbian3_SDK_v0.8/SMFCode/smf_baseline_22june_latest/example/flickrcontactfetcherplugin" -I"F:/Nokia/devices/Nokia_Symbian3_SDK_v0.8/SMFCode/smf_baseline_22june_latest/example/flickrcontactfetcherplugin/tmp"
 first: default
 default: debug-winscw
 all: debug release
 
 qmake:
-	$(QMAKE) -spec symbian-abld -o "bld.inf" "D:/CarbideWorkspace/smfserver_cleaned/example/flickrcontactfetcherplugin/flickrcontactfetcherplugin.pro"
+	$(QMAKE) -spec symbian-abld -o "bld.inf" "F:/Nokia/devices/Nokia_Symbian3_SDK_v0.8/SMFCode/smf_baseline_22june_latest/example/flickrcontactfetcherplugin/flickrcontactfetcherplugin.pro"
 
 bld.inf:
 	$(QMAKE)
@@ -72,8 +74,7 @@
 cleanexport: $(ABLD)
 	$(ABLD) cleanexport
 
-D:\Qt\4.6.1\bin\moc.exe:
-	(cd $(QTDIR)/src/tools/moc && $(MAKE))
+check: first
 
 mocclean: compiler_moc_header_clean compiler_moc_source_clean
 
@@ -82,9 +83,8 @@
 compiler_moc_header_make_all: moc_flickrcontactfetcherplugin.cpp
 compiler_moc_header_clean:
 	-$(DEL_FILE) moc_flickrcontactfetcherplugin.cpp 2> NUL
-moc_flickrcontactfetcherplugin.cpp: flickrcontactfetcherplugin.h \
-		..\..\..\..\Qt\4.6.1\bin\moc.exe
-	D:\Qt\4.6.1\bin\moc.exe $(DEFINES) $(INCPATH) -DSYMBIAN flickrcontactfetcherplugin.h -o moc_flickrcontactfetcherplugin.cpp
+moc_flickrcontactfetcherplugin.cpp: flickrcontactfetcherplugin.h
+	F:\Qt\4.6.3\bin\moc.exe $(DEFINES) $(INCPATH) -DSYMBIAN flickrcontactfetcherplugin.h -o moc_flickrcontactfetcherplugin.cpp
 
 compiler_rcc_make_all:
 compiler_rcc_clean:
@@ -104,22 +104,26 @@
 compiler_clean: compiler_moc_header_clean 
 
 create_temps:
-	-@ if NOT EXIST "D:\Qt\4.6.1\include\QtCore\tmp" mkdir "D:\Qt\4.6.1\include\QtCore\tmp"
-	-@ if NOT EXIST "D:\Qt\4.6.1\include\QtNetwork\tmp" mkdir "D:\Qt\4.6.1\include\QtNetwork\tmp"
-	-@ if NOT EXIST "D:\Qt\4.6.1\include\QtGui\tmp" mkdir "D:\Qt\4.6.1\include\QtGui\tmp"
-	-@ if NOT EXIST "D:\Qt\4.6.1\include\QtXml\tmp" mkdir "D:\Qt\4.6.1\include\QtXml\tmp"
-	-@ if NOT EXIST "D:\Qt\4.6.1\include\tmp" mkdir "D:\Qt\4.6.1\include\tmp"
-	-@ if NOT EXIST "D:\CarbideWorkspace\smfserver_cleaned\example\flickrcontactfetcherplugin\tmp" mkdir "D:\CarbideWorkspace\smfserver_cleaned\example\flickrcontactfetcherplugin\tmp"
-	-@ if NOT EXIST "D:\Qt\4.6.1\mkspecs\common\symbian\tmp" mkdir "D:\Qt\4.6.1\mkspecs\common\symbian\tmp"
+	-@ if NOT EXIST "F:\Qt\4.6.3\include\QtCore\tmp" mkdir "F:\Qt\4.6.3\include\QtCore\tmp"
+	-@ if NOT EXIST "F:\Qt\4.6.3\include\QtNetwork\tmp" mkdir "F:\Qt\4.6.3\include\QtNetwork\tmp"
+	-@ if NOT EXIST "F:\Qt\4.6.3\include\QtGui\tmp" mkdir "F:\Qt\4.6.3\include\QtGui\tmp"
+	-@ if NOT EXIST "F:\Qt\4.6.3\include\QtXml\tmp" mkdir "F:\Qt\4.6.3\include\QtXml\tmp"
+	-@ if NOT EXIST "F:\Qt\4.6.3\include\tmp" mkdir "F:\Qt\4.6.3\include\tmp"
+	-@ if NOT EXIST "F:\Qt\4.6.3\include\QtContacts\tmp" mkdir "F:\Qt\4.6.3\include\QtContacts\tmp"
+	-@ if NOT EXIST "F:\Qt\4.6.3\include\QtLocation\tmp" mkdir "F:\Qt\4.6.3\include\QtLocation\tmp"
+	-@ if NOT EXIST "F:\Qt\4.6.3\mkspecs\common\symbian\tmp" mkdir "F:\Qt\4.6.3\mkspecs\common\symbian\tmp"
+	-@ if NOT EXIST "F:\Nokia\devices\Nokia_Symbian3_SDK_v0.8\SMFCode\smf_baseline_22june_latest\example\flickrcontactfetcherplugin\tmp" mkdir "F:\Nokia\devices\Nokia_Symbian3_SDK_v0.8\SMFCode\smf_baseline_22june_latest\example\flickrcontactfetcherplugin\tmp"
 
 extension_clean: compiler_clean
-	-@ if EXIST "D:\Qt\4.6.1\include\QtCore\tmp" rmdir  /S /Q  "D:\Qt\4.6.1\include\QtCore\tmp"
-	-@ if EXIST "D:\Qt\4.6.1\include\QtNetwork\tmp" rmdir  /S /Q  "D:\Qt\4.6.1\include\QtNetwork\tmp"
-	-@ if EXIST "D:\Qt\4.6.1\include\QtGui\tmp" rmdir  /S /Q  "D:\Qt\4.6.1\include\QtGui\tmp"
-	-@ if EXIST "D:\Qt\4.6.1\include\QtXml\tmp" rmdir  /S /Q  "D:\Qt\4.6.1\include\QtXml\tmp"
-	-@ if EXIST "D:\Qt\4.6.1\include\tmp" rmdir  /S /Q  "D:\Qt\4.6.1\include\tmp"
-	-@ if EXIST "D:\CarbideWorkspace\smfserver_cleaned\example\flickrcontactfetcherplugin\tmp" rmdir  /S /Q  "D:\CarbideWorkspace\smfserver_cleaned\example\flickrcontactfetcherplugin\tmp"
-	-@ if EXIST "D:\Qt\4.6.1\mkspecs\common\symbian\tmp" rmdir  /S /Q  "D:\Qt\4.6.1\mkspecs\common\symbian\tmp"
+	-@ if EXIST "F:\Qt\4.6.3\include\QtCore\tmp" rmdir  /S /Q  "F:\Qt\4.6.3\include\QtCore\tmp"
+	-@ if EXIST "F:\Qt\4.6.3\include\QtNetwork\tmp" rmdir  /S /Q  "F:\Qt\4.6.3\include\QtNetwork\tmp"
+	-@ if EXIST "F:\Qt\4.6.3\include\QtGui\tmp" rmdir  /S /Q  "F:\Qt\4.6.3\include\QtGui\tmp"
+	-@ if EXIST "F:\Qt\4.6.3\include\QtXml\tmp" rmdir  /S /Q  "F:\Qt\4.6.3\include\QtXml\tmp"
+	-@ if EXIST "F:\Qt\4.6.3\include\tmp" rmdir  /S /Q  "F:\Qt\4.6.3\include\tmp"
+	-@ if EXIST "F:\Qt\4.6.3\include\QtContacts\tmp" rmdir  /S /Q  "F:\Qt\4.6.3\include\QtContacts\tmp"
+	-@ if EXIST "F:\Qt\4.6.3\include\QtLocation\tmp" rmdir  /S /Q  "F:\Qt\4.6.3\include\QtLocation\tmp"
+	-@ if EXIST "F:\Qt\4.6.3\mkspecs\common\symbian\tmp" rmdir  /S /Q  "F:\Qt\4.6.3\mkspecs\common\symbian\tmp"
+	-@ if EXIST "F:\Nokia\devices\Nokia_Symbian3_SDK_v0.8\SMFCode\smf_baseline_22june_latest\example\flickrcontactfetcherplugin\tmp" rmdir  /S /Q  "F:\Nokia\devices\Nokia_Symbian3_SDK_v0.8\SMFCode\smf_baseline_22june_latest\example\flickrcontactfetcherplugin\tmp"
 
 pre_targetdeps: \
 	generated_sources \
@@ -135,26 +139,47 @@
 
 winscw_deployment:
 	-echo Deploying changed files...
-	-$(XCOPY) "d:\CarbideWorkspace\smfserver_cleaned\example\flickrcontactfetcherplugin\qmakepluginstubs\flickrcontactfetcherplugin.qtplugin" "\S60\devices\S60_5th_Edition_SDK_v0.9\epoc32\winscw\c\resource\qt\plugins\smf\plugin\contact.fetcher\"
+	-$(XCOPY) "f:\Nokia\devices\Nokia_Symbian3_SDK_v0.8\SMFCode\smf_baseline_22june_latest\example\flickrcontactfetcherplugin\qmakepluginstubs\flickrcontactfetcherplugin.qtplugin" "\Nokia\devices\Nokia_Symbian3_SDK_v0.8\epoc32\winscw\c\resource\qt\plugins\smf\plugin\contact.fetcher\"
 
 winscw_deployment_clean:
-	-@ if EXIST "\S60\devices\S60_5th_Edition_SDK_v0.9\epoc32\winscw\c\resource\qt\plugins\smf\plugin\contact.fetcher\flickrcontactfetcherplugin.qtplugin" $(DEL_FILE)  "\S60\devices\S60_5th_Edition_SDK_v0.9\epoc32\winscw\c\resource\qt\plugins\smf\plugin\contact.fetcher\flickrcontactfetcherplugin.qtplugin"
+	-@ if EXIST "\Nokia\devices\Nokia_Symbian3_SDK_v0.8\epoc32\winscw\c\resource\qt\plugins\smf\plugin\contact.fetcher\flickrcontactfetcherplugin.qtplugin" $(DEL_FILE)  "\Nokia\devices\Nokia_Symbian3_SDK_v0.8\epoc32\winscw\c\resource\qt\plugins\smf\plugin\contact.fetcher\flickrcontactfetcherplugin.qtplugin"
+
+deployment:
+	-echo Deploying changed files...
+	-$(XCOPY) "f:\Nokia\devices\Nokia_Symbian3_SDK_v0.8\SMFCode\smf_baseline_22june_latest\example\flickrcontactfetcherplugin\qmakepluginstubs\flickrcontactfetcherplugin.qtplugin" "\Nokia\devices\Nokia_Symbian3_SDK_v0.8\epoc32\data\z\resource\qt\plugins\smf\plugin\contact.fetcher\"
 
-sis: restore_build
+deployment_clean:
+	-@ if EXIST "\Nokia\devices\Nokia_Symbian3_SDK_v0.8\epoc32\data\z\resource\qt\plugins\smf\plugin\contact.fetcher\flickrcontactfetcherplugin.qtplugin" $(DEL_FILE)  "\Nokia\devices\Nokia_Symbian3_SDK_v0.8\epoc32\data\z\resource\qt\plugins\smf\plugin\contact.fetcher\flickrcontactfetcherplugin.qtplugin"
+
+-include .make.cache
+
+sis:
 	$(if $(wildcard flickrcontactfetcherplugin_template.pkg),$(if $(wildcard .make.cache),$(MAKE) -s -f $(MAKEFILE) ok_sis,$(if $(QT_SIS_TARGET),$(MAKE) -s -f $(MAKEFILE) ok_sis,$(MAKE) -s -f $(MAKEFILE) fail_sis_nocache)),$(MAKE) -s -f $(MAKEFILE) fail_sis_nopkg)
 
 ok_sis:
 	createpackage.bat $(QT_SIS_OPTIONS) flickrcontactfetcherplugin_template.pkg $(QT_SIS_TARGET) $(QT_SIS_CERTIFICATE) $(QT_SIS_KEY) $(QT_SIS_PASSPHRASE)
 
+flickrcontactfetcherplugin.sis:
+	$(MAKE) -s -f $(MAKEFILE) sis
+
+stub_sis:
+	$(if $(wildcard flickrcontactfetcherplugin_template.pkg),$(if $(wildcard .make.cache),$(MAKE) -s -f $(MAKEFILE) ok_stub_sis,$(if $(QT_SIS_TARGET),$(MAKE) -s -f $(MAKEFILE) ok_stub_sis,$(MAKE) -s -f $(MAKEFILE) fail_sis_nocache)),$(MAKE) -s -f $(MAKEFILE) fail_sis_nopkg)
+
+ok_stub_sis:
+	createpackage.bat -s $(QT_SIS_OPTIONS) flickrcontactfetcherplugin_template.pkg $(QT_SIS_TARGET) $(QT_SIS_CERTIFICATE) $(QT_SIS_KEY) $(QT_SIS_PASSPHRASE)
+
+installer_sis: flickrcontactfetcherplugin.sis
+	$(if $(wildcard flickrcontactfetcherplugin_installer.pkg),$(MAKE) -s -f $(MAKEFILE) ok_installer_sis,$(MAKE) -s -f $(MAKEFILE) fail_sis_nopkg)
+
+ok_installer_sis: 
+	createpackage.bat $(QT_SIS_OPTIONS) flickrcontactfetcherplugin_installer.pkg - $(QT_SIS_CERTIFICATE) $(QT_SIS_KEY) $(QT_SIS_PASSPHRASE)
+
 fail_sis_nopkg:
-	$(error PKG file does not exist, 'SIS' target is only supported for executables or projects with DEPLOYMENT statement)
+	$(error PKG file does not exist, 'sis' and 'installer_sis' target are only supported for executables or projects with DEPLOYMENT statement)
 
 fail_sis_nocache:
 	$(error Project has to be built or QT_SIS_TARGET environment variable has to be set before calling 'SIS' target)
 
-restore_build:
--include .make.cache
-
 store_build:
 	@echo # ============================================================================== > .make.cache
 	@echo # This file is generated by make and should not be modified by the user >> .make.cache
@@ -169,15 +194,16 @@
 	@echo QT_SIS_TARGET ?= $(QT_SIS_TARGET) >> .make.cache
 
 dodistclean:
-	-@ if EXIST "d:\CarbideWorkspace\smfserver_cleaned\example\flickrcontactfetcherplugin\flickrcontactfetcherplugin_template.pkg" $(DEL_FILE)  "d:\CarbideWorkspace\smfserver_cleaned\example\flickrcontactfetcherplugin\flickrcontactfetcherplugin_template.pkg"
-	-@ if EXIST "d:\CarbideWorkspace\smfserver_cleaned\example\flickrcontactfetcherplugin\qmakepluginstubs\flickrcontactfetcherplugin.qtplugin" $(DEL_FILE)  "d:\CarbideWorkspace\smfserver_cleaned\example\flickrcontactfetcherplugin\qmakepluginstubs\flickrcontactfetcherplugin.qtplugin"
-	-@ if EXIST "d:\CarbideWorkspace\smfserver_cleaned\example\flickrcontactfetcherplugin\Makefile" $(DEL_FILE)  "d:\CarbideWorkspace\smfserver_cleaned\example\flickrcontactfetcherplugin\Makefile"
-	-@ if EXIST "d:\CarbideWorkspace\smfserver_cleaned\example\flickrcontactfetcherplugin\Makefile_0xE341a8b4.mk" $(DEL_FILE)  "d:\CarbideWorkspace\smfserver_cleaned\example\flickrcontactfetcherplugin\Makefile_0xE341a8b4.mk"
-	-@ if EXIST "d:\CarbideWorkspace\smfserver_cleaned\example\flickrcontactfetcherplugin\flickrcontactfetcherplugin_0xE341a8b4.mmp" $(DEL_FILE)  "d:\CarbideWorkspace\smfserver_cleaned\example\flickrcontactfetcherplugin\flickrcontactfetcherplugin_0xE341a8b4.mmp"
-	-@ if EXIST "d:\CarbideWorkspace\smfserver_cleaned\example\flickrcontactfetcherplugin\plugin_commonU.def" $(DEL_FILE)  "d:\CarbideWorkspace\smfserver_cleaned\example\flickrcontactfetcherplugin\plugin_commonU.def"
-	-@ if EXIST "d:\CarbideWorkspace\smfserver_cleaned\example\flickrcontactfetcherplugin\.make.cache" $(DEL_FILE)  "d:\CarbideWorkspace\smfserver_cleaned\example\flickrcontactfetcherplugin\.make.cache"
-	-@ if EXIST "d:\CarbideWorkspace\smfserver_cleaned\example\flickrcontactfetcherplugin\bld.inf" $(DEL_FILE)  "d:\CarbideWorkspace\smfserver_cleaned\example\flickrcontactfetcherplugin\bld.inf"
-	-@ if EXIST "d:\CarbideWorkspace\smfserver_cleaned\example\flickrcontactfetcherplugin\qmakepluginstubs" $(DEL_DIR)  "d:\CarbideWorkspace\smfserver_cleaned\example\flickrcontactfetcherplugin\qmakepluginstubs"
+	-@ if EXIST "f:\Nokia\devices\Nokia_Symbian3_SDK_v0.8\SMFCode\smf_baseline_22june_latest\example\flickrcontactfetcherplugin\flickrcontactfetcherplugin_template.pkg" $(DEL_FILE)  "f:\Nokia\devices\Nokia_Symbian3_SDK_v0.8\SMFCode\smf_baseline_22june_latest\example\flickrcontactfetcherplugin\flickrcontactfetcherplugin_template.pkg"
+	-@ if EXIST "f:\Nokia\devices\Nokia_Symbian3_SDK_v0.8\SMFCode\smf_baseline_22june_latest\example\flickrcontactfetcherplugin\qmakepluginstubs\flickrcontactfetcherplugin.qtplugin" $(DEL_FILE)  "f:\Nokia\devices\Nokia_Symbian3_SDK_v0.8\SMFCode\smf_baseline_22june_latest\example\flickrcontactfetcherplugin\qmakepluginstubs\flickrcontactfetcherplugin.qtplugin"
+	-@ if EXIST "f:\Nokia\devices\Nokia_Symbian3_SDK_v0.8\SMFCode\smf_baseline_22june_latest\example\flickrcontactfetcherplugin\flickrcontactfetcherplugin_installer.pkg" $(DEL_FILE)  "f:\Nokia\devices\Nokia_Symbian3_SDK_v0.8\SMFCode\smf_baseline_22june_latest\example\flickrcontactfetcherplugin\flickrcontactfetcherplugin_installer.pkg"
+	-@ if EXIST "f:\Nokia\devices\Nokia_Symbian3_SDK_v0.8\SMFCode\smf_baseline_22june_latest\example\flickrcontactfetcherplugin\Makefile" $(DEL_FILE)  "f:\Nokia\devices\Nokia_Symbian3_SDK_v0.8\SMFCode\smf_baseline_22june_latest\example\flickrcontactfetcherplugin\Makefile"
+	-@ if EXIST "f:\Nokia\devices\Nokia_Symbian3_SDK_v0.8\SMFCode\smf_baseline_22june_latest\example\flickrcontactfetcherplugin\Makefile_0xE1f540a6.mk" $(DEL_FILE)  "f:\Nokia\devices\Nokia_Symbian3_SDK_v0.8\SMFCode\smf_baseline_22june_latest\example\flickrcontactfetcherplugin\Makefile_0xE1f540a6.mk"
+	-@ if EXIST "f:\Nokia\devices\Nokia_Symbian3_SDK_v0.8\SMFCode\smf_baseline_22june_latest\example\flickrcontactfetcherplugin\flickrcontactfetcherplugin_0xE1f540a6.mmp" $(DEL_FILE)  "f:\Nokia\devices\Nokia_Symbian3_SDK_v0.8\SMFCode\smf_baseline_22june_latest\example\flickrcontactfetcherplugin\flickrcontactfetcherplugin_0xE1f540a6.mmp"
+	-@ if EXIST "f:\Nokia\devices\Nokia_Symbian3_SDK_v0.8\SMFCode\smf_baseline_22june_latest\example\flickrcontactfetcherplugin\plugin_commonU.def" $(DEL_FILE)  "f:\Nokia\devices\Nokia_Symbian3_SDK_v0.8\SMFCode\smf_baseline_22june_latest\example\flickrcontactfetcherplugin\plugin_commonU.def"
+	-@ if EXIST "f:\Nokia\devices\Nokia_Symbian3_SDK_v0.8\SMFCode\smf_baseline_22june_latest\example\flickrcontactfetcherplugin\.make.cache" $(DEL_FILE)  "f:\Nokia\devices\Nokia_Symbian3_SDK_v0.8\SMFCode\smf_baseline_22june_latest\example\flickrcontactfetcherplugin\.make.cache"
+	-@ if EXIST "f:\Nokia\devices\Nokia_Symbian3_SDK_v0.8\SMFCode\smf_baseline_22june_latest\example\flickrcontactfetcherplugin\bld.inf" $(DEL_FILE)  "f:\Nokia\devices\Nokia_Symbian3_SDK_v0.8\SMFCode\smf_baseline_22june_latest\example\flickrcontactfetcherplugin\bld.inf"
+	-@ if EXIST "f:\Nokia\devices\Nokia_Symbian3_SDK_v0.8\SMFCode\smf_baseline_22june_latest\example\flickrcontactfetcherplugin\qmakepluginstubs" $(DEL_DIR)  "f:\Nokia\devices\Nokia_Symbian3_SDK_v0.8\SMFCode\smf_baseline_22june_latest\example\flickrcontactfetcherplugin\qmakepluginstubs"
 
 distclean: clean dodistclean
 
--- a/example/flickrcontactfetcherplugin/flickrcontactfetcherplugin.cpp	Mon Jun 07 11:43:45 2010 +0100
+++ b/example/flickrcontactfetcherplugin/flickrcontactfetcherplugin.cpp	Wed Jun 23 19:51:49 2010 +0530
@@ -1,40 +1,36 @@
+/**
+ * Copyright (c) 2010 Sasken Communication Technologies Ltd.
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of the "Eclipse Public License v1.0" 
+ * which accompanies  this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html"
+ *
+ * Initial Contributors:
+ * Chandradeep Gandhi, Sasken Communication Technologies Ltd - Initial contribution
+ *
+ * Contributors:
+ * Nalina Hariharan
+ * 
+ * Description:
+ * The Plugin that fetches contacts from the logged in user's flickr account
+ *
+ */
 
 // Include files
 #include <QtPlugin>
 #include <QCryptographicHash>
-#include <QDataStream>
 #include <QTextStream>
 #include <QFile>
-#include <QNetworkReply>
-#include <QXmlStreamReader>
-#include <parser.h>
 #include <QMap>
 #include <QListIterator>
+#include <QDebug>
+#ifdef SMF_XMLPARSING
+#include <QXmlStreamReader>
+#endif
 
 #include "flickrcontactfetcherplugin.h"
 
-// HARD CODED AS CSM IS NOT AVAILABLE - START - use your rigistered app's keys here
-static const QString apiKey = "";
-static const QString apiSecret = "";
-static const QString miniToken = "";
-QString fullToken = "";
-// HARD CODED AS CSM IS NOT AVAILABLE - END
-
-
-/**
- * Method called by plugins for logging
- * @param log string to be logged
- */
-void FlickrContactFetcherPlugin::writeLog(QString log) const
-	{
-	QFile file("c:\\data\\PluginLogs.txt");
-    if (!file.open(QIODevice::Append | QIODevice::Text))
-	         ;
-    QTextStream out(&file);
-    out << log << "\n";
-    file.close();
-	}
-
 /**
  * Destructor
  */
@@ -52,50 +48,86 @@
  * @return SmfPluginError Plugin error if any, else SmfPluginErrNone
  */
 SmfPluginError FlickrContactFetcherPlugin::friends( SmfPluginRequestData &aRequest,
-		const int aPageNum,
+		const int aPageNum, 
 		const int aItemsPerPage )
 	{
-	writeLog("FlickrContactFetcherPlugin::friends");
-
-	SmfPluginError error = SmfPluginErrInvalidRequest;
+	qDebug()<<"Inside FlickrContactFetcherPlugin::friends()";
+	
+	SmfPluginError error = SmfPluginErrInvalidArguments;
 
 	// invalid arguments
 	if( aPageNum < 0 || aItemsPerPage < 0 )
+		{
+		qDebug()<<"Invalid arguments";
 		return error;
-	else
+		}
+	
+	qDebug()<<"Valid arguments";
+	
+#if 1
+// Reading the keys, CSM Stubbed - START
+	QFile file("c:\\data\\FlickrKeys.txt");
+	if (!file.open(QIODevice::ReadOnly))
 		{
-		// Create the API signature string
-		QString baseString;
-		baseString.append(apiSecret);
-		baseString.append("api_key"+apiKey);
-		baseString.append("auth_token"+fullToken);
-		baseString.append("filterfriends");
-		baseString.append("formatjson");
-		baseString.append("methodflickr.contacts.getList");
-		baseString.append("page"+QString::number(aPageNum));
-		baseString.append("per_page"+QString::number(aItemsPerPage));
+		qDebug()<<"File to read the keys could not be opened";
+		return SmfPluginErrUserNotLoggedIn;
+		}
+	
+	qDebug()<<"Key file read, going to parse the key values from file";
+	
+	QByteArray arr = file.readAll();
+	QList<QByteArray> list = arr.split('\n');
+	file.close();
+	
+	QString apiKey(list[0]);
+	QString apiSecret(list[1]);
+	QString authToken(list[2]);
+	
+	qDebug()<<"Api Key = "<<apiKey;
+	qDebug()<<"Api Secret = "<<apiSecret;
+	qDebug()<<"Auth Token = "<<authToken;
+// Reading the keys, CSM Stubbed - END
+#endif
+	
+	// Create the API signature string
+	QString baseString;
+	baseString.append(apiSecret);
+	baseString.append("api_key"+apiKey);
+	baseString.append("auth_token"+authToken);
+	baseString.append("filterfriends");
+#ifdef SMF_XMLPARSING
+	baseString.append("formatxml");
+#else
+	baseString.append("formatjson");
+#endif
+	baseString.append("methodflickr.contacts.getList");
+	baseString.append("page"+QString::number(aPageNum));
+	baseString.append("per_page"+QString::number(aItemsPerPage));
+	
+	// Create the url
+	QUrl url("http://api.flickr.com/services/rest/?");
+	url.addQueryItem("api_key", apiKey);
+	url.addQueryItem("auth_token", authToken);
+	url.addQueryItem("filter", "friends");
+#ifdef SMF_XMLPARSING
+	url.addQueryItem("format", "x");
+#else
+	url.addQueryItem("format", "json");
+#endif
+	url.addQueryItem("method", "flickr.contacts.getList");
+	url.addQueryItem("page", QString::number(aPageNum));
+	url.addQueryItem("per_page", QString::number(aItemsPerPage));
+	url.addQueryItem("api_sig", generateSignature(baseString));
+	
+	// Create the request, set the url
+	aRequest.iNetworkRequest.setUrl(url);
+	aRequest.iRequestType = SmfContactGetFriends;
+	aRequest.iPostData = NULL;
+	aRequest.iHttpOperationType = QNetworkAccessManager::GetOperation;
+	error = SmfPluginErrNone;
 
-		// Create the url
-		QUrl url("http://api.flickr.com/services/rest/?");
-		url.addQueryItem("method", "flickr.contacts.getList");
-		url.addQueryItem("api_key", apiKey);
-		url.addQueryItem("filter", "friends");
-		url.addQueryItem("format", "json");
-		url.addQueryItem("page", QString::number(aPageNum));
-		url.addQueryItem("per_page", QString::number(aItemsPerPage));
-		url.addQueryItem("auth_token", fullToken);
-		url.addQueryItem("api_sig", generateSignature(baseString));
-
-		// Create the request, set the url
-		writeLog("final url = "+url.toString());
-		aRequest.iNetworkRequest.setUrl(url);
-		aRequest.iRequestType = SmfContactGetFriends;
-		aRequest.iPostData = NULL;
-		aRequest.iHttpOperationType = QNetworkAccessManager::GetOperation;
-		error = SmfPluginErrNone;
-		}
-	writeLog("Url string is : "+aRequest.iNetworkRequest.url().toString());
-	return error;
+	qDebug()<<"Url string is : "<<aRequest.iNetworkRequest.url().toString();
+	return error; 
 	}
 
 /**
@@ -105,15 +137,15 @@
  */
 QString FlickrContactFetcherPlugin::generateSignature(const QString aBaseString)
 	{
-	writeLog("FlickrContactFetcherPlugin::generateSignature");
-
+	qDebug()<<"Inside FlickrContactFetcherPlugin::generateSignature()";
+	
 	// Create md5 hash of the signature string
     QByteArray byteArray;
     byteArray.insert(0, aBaseString.toAscii());
 
     QByteArray md5Hash = QCryptographicHash::hash(byteArray,QCryptographicHash::Md5 ).toHex();
     QString returnString (md5Hash);
-    writeLog("generated signature = "+QString(returnString));
+    qDebug()<<"generated signature = "<<QString(returnString);
     return returnString;
 	}
 
@@ -125,14 +157,14 @@
  * @return SmfPluginError Plugin error if any, else SmfPluginErrNone
  */
 SmfPluginError FlickrContactFetcherPlugin::followers( SmfPluginRequestData &aRequest,
-		const int aPageNum ,
+		const int aPageNum , 
 		const int aItemsPerPage  )
 	{
 	Q_UNUSED(aRequest)
-Q_UNUSED(aPageNum)
-Q_UNUSED(aItemsPerPage)
-	SmfPluginError error = SmfPluginErrInvalidRequest;
-	return error;
+	Q_UNUSED(aPageNum)
+	Q_UNUSED(aItemsPerPage)
+	qDebug()<<"Inside FlickrContactFetcherPlugin::followers()";
+	return SmfPluginErrServiceNotSupported; 
 	}
 
 /**
@@ -145,15 +177,15 @@
  */
 SmfPluginError FlickrContactFetcherPlugin::search( SmfPluginRequestData &aRequest,
 		const SmfContact &aContact,
-		const int aPageNum ,
+		const int aPageNum , 
 		const int aItemsPerPage  )
 	{
 	Q_UNUSED(aRequest)
-Q_UNUSED(aContact)
-Q_UNUSED(aPageNum)
-Q_UNUSED(aItemsPerPage)
-	SmfPluginError error = SmfPluginErrInvalidRequest;
-	return error;
+	Q_UNUSED(aContact)
+	Q_UNUSED(aPageNum)
+	Q_UNUSED(aItemsPerPage)
+	qDebug()<<"Inside FlickrContactFetcherPlugin::search()";
+	return SmfPluginErrServiceNotSupported; 
 	}
 
 /**
@@ -169,16 +201,16 @@
 SmfPluginError FlickrContactFetcherPlugin::searchNear( SmfPluginRequestData &aRequest,
 		const SmfLocation &aLocation,
 		const SmfLocationSearchBoundary &aProximity,
-		const int aPageNum ,
+		const int aPageNum , 
 		const int aItemsPerPage  )
 	{
 	Q_UNUSED(aRequest)
-Q_UNUSED(aLocation)
-Q_UNUSED(aProximity)
-Q_UNUSED(aPageNum)
-Q_UNUSED(aItemsPerPage)
-	SmfPluginError error = SmfPluginErrInvalidRequest;
-	return error;
+	Q_UNUSED(aLocation)
+	Q_UNUSED(aProximity)
+	Q_UNUSED(aPageNum)
+	Q_UNUSED(aItemsPerPage)
+	qDebug()<<"Inside FlickrContactFetcherPlugin::searchNear()";
+	return SmfPluginErrServiceNotSupported; 
 	}
 
 /**
@@ -189,14 +221,14 @@
  * @return SmfPluginError Plugin error if any, else SmfPluginErrNone
  */
 SmfPluginError FlickrContactFetcherPlugin::groups( SmfPluginRequestData &aRequest,
-		const int aPageNum ,
+		const int aPageNum , 
 		const int aItemsPerPage  )
 	{
 	Q_UNUSED(aRequest)
-Q_UNUSED(aPageNum)
-Q_UNUSED(aItemsPerPage)
-	SmfPluginError error = SmfPluginErrInvalidRequest;
-	return error;
+	Q_UNUSED(aPageNum)
+	Q_UNUSED(aItemsPerPage)
+	qDebug()<<"Inside FlickrContactFetcherPlugin::groups()";
+	return SmfPluginErrServiceNotSupported; 
 	}
 
 /**
@@ -209,34 +241,34 @@
  */
 SmfPluginError FlickrContactFetcherPlugin::searchInGroup( SmfPluginRequestData &aRequest,
 		const SmfGroup &aGroup,
-		const int aPageNum ,
+		const int aPageNum , 
 		const int aItemsPerPage  )
 	{
 	Q_UNUSED(aRequest)
-Q_UNUSED(aGroup)
-Q_UNUSED(aPageNum)
-Q_UNUSED(aItemsPerPage)
-	SmfPluginError error = SmfPluginErrInvalidRequest;
-	return error;
+	Q_UNUSED(aGroup)
+	Q_UNUSED(aPageNum)
+	Q_UNUSED(aItemsPerPage)
+	qDebug()<<"Inside FlickrContactFetcherPlugin::searchInGroup()";
+	return SmfPluginErrServiceNotSupported; 
 	}
 
 /**
  * Customised method for SmfContactFetcherPlugin interface
  * @param aRequest [out] The request data to be sent to network
- * @param aOperation The operation type (should be known between
+ * @param aOperation The operation type (should be known between 
  * the client interface and the plugin)
- * @param aData The data required to form the request (The type
+ * @param aData The data required to form the request (The type 
  * of data should be known between client and the plugin)
  * @return SmfPluginError Plugin error if any, else SmfPluginErrNone
  */
-SmfPluginError FlickrContactFetcherPlugin::customRequest( SmfPluginRequestData &aRequest,
+SmfPluginError FlickrContactFetcherPlugin::customRequest( SmfPluginRequestData &aRequest, 
 		const int &aOperation, QByteArray *aData )
 	{
 	Q_UNUSED(aRequest)
-Q_UNUSED(aOperation)
-Q_UNUSED(aData)
-	SmfPluginError error = SmfPluginErrInvalidRequest;
-	return error;
+	Q_UNUSED(aOperation)
+	Q_UNUSED(aData)
+	qDebug()<<"Inside FlickrContactFetcherPlugin::customRequest()";
+	return SmfPluginErrServiceNotSupported; 
 	}
 
 /**
@@ -249,7 +281,7 @@
 	{
 	// Save the SmfPluginUtil handle
 	m_util = aUtil;
-
+	
 	// Create an instance of FlickrProviderBase
 	m_provider = new FlickrProviderBase;
 	m_provider->initialize();
@@ -266,134 +298,160 @@
 
 /**
  * Method to get the result for a network request.
+ * @param aOperation The type of operation to be requested
  * @param aTransportResult The result of transport operation
  * @param aResponse The QByteArray instance containing the network response.
- * The plugins should delete this instance once they have read the
+ * The plugins should delete this instance once they have read the 
  * data from it.
- * @param aResult [out] An output parameter to the plugin manager.If the
- * return value is SmfSendRequestAgain, QVariant will be of type
+ * @param aResult [out] An output parameter to the plugin manager.If the 
+ * return value is SmfSendRequestAgain, QVariant will be of type 
  * SmfPluginRequestData.
- * For SmfGalleryPlugin: If last operation was pictures(), aResult will
- * be of type QList<SmfPicture>. If last operation was description(),
- * aResult will be of type QString. If last operation was upload() or
+ * For SmfGalleryPlugin: If last operation was pictures(), aResult will 
+ * be of type QList<SmfPicture>. If last operation was description(), 
+ * aResult will be of type QString. If last operation was upload() or 
  * postComment(), aResult will be of type bool.
  * @param aRetType [out] SmfPluginRetType
  * @param aPageResult [out] The SmfResultPage structure variable
  */
-SmfPluginError FlickrContactFetcherPlugin::responseAvailable(
-		const SmfTransportResult &aTransportResult,
-		QByteArray *aResponse,
-		QVariant* aResult,
+SmfPluginError FlickrContactFetcherPlugin::responseAvailable( 
+		const SmfRequestTypeID aOperation,
+		const SmfTransportResult &aTransportResult, 
+		QByteArray *aResponse, 
+		QVariant* aResult, 
 		SmfPluginRetType &aRetType,
 		SmfResultPage &aPageResult )
 	{
-	writeLog("FlickrContactFetcherPlugin::responseAvailable");
 	Q_UNUSED(aPageResult)
-	SmfPluginError error;
-	QList<SmfContact> list;
-
+	qDebug()<<"Inside FlickrContactFetcherPlugin::responseAvailable()";
+	
+	SmfPluginError error = SmfPluginErrNetworkError;
+	
+	if( !aResponse || (0 == aResponse->size()) )
+		{
+		qDebug()<<"Response is NULL or empty";
+		aRetType = SmfRequestError;
+		return error;
+		}
+	
+	QByteArray response(*aResponse);
+	delete aResponse;
+	qDebug()<<"FB response = "<<QString(response);
+	qDebug()<<"FB response size = "<<response.size();
+	
 	if(SmfTransportOpNoError == aTransportResult)
 		{
-		writeLog("No transport error");
-
-		QByteArray response(aResponse->data());
-		delete aResponse;
-		writeLog("Flickr response = "+QString(response));
-
-#if 1
-		// For getting contacts from json response
-		QJson::Parser parser;
-		bool ok;
-
-		// To remove the "jsonFlickrApi(" and also remove the last ")" from the response,
-		// as these gives a Json parsing error
-		response.remove(0, 14);
-		response.chop(1);
-
-		QVariantMap result = parser.parse(response, &ok).toMap();
-		if (!ok) {
-			writeLog("An error occurred during json parsing");
+		qDebug()<<"No transport error";
+		
+		if(SmfContactGetFriends == aOperation)
+			{
+			qDebug()<<"For getting friends response";
+			
+			QList<SmfContact> list;
+			
+#ifdef SMF_XMLPARSING // Xml parsing
+			// For getting contacts from xml response
+			QXmlStreamReader xml(response);
+			while (!xml.atEnd())
+				{
+				xml.readNext();
+				if (xml.tokenType() == QXmlStreamReader::StartElement)
+					{
+					// If the tag is contact
+					if (xml.name() == "contact")
+						{
+						qDebug()<<"Contact tag found";
+						SmfContact contact;
+						QStringRef str;
+						QContactName contactname;
+						QString username = xml.attributes().value("username").toString();
+						qDebug()<<"Username = "<<username;
+						contactname.setFirstName(username);
+						contactname.setLastName(username);
+						QVariant namevar1 = QVariant::fromValue(contactname);
+						contact.setValue("Name",namevar1);
+						list.append(contact);
+						}
+					}
+				}
+#else
+			// To remove the "jsonFlickrApi(" and also remove the last ")" from the response,
+			// as these gives a Json parsing error
+			response.remove(0, 14);
+			response.chop(1);
+			
+			// For getting contacts from json response
+			bool ok;
+			QVariantMap result = m_util->parse(response, &ok).toMap();
+			if (!ok) {
+				qDebug()<<"An error occurred during json parsing";
+				aResult->setValue(list);
+				aRetType = SmfRequestError;
+				return SmfPluginErrParsingFailed;
+			}
+			
+			QVariantMap map1 = result["contacts"].toMap();
+			qDebug()<<"page = "<<map1["page"].toString();
+			qDebug()<<"pages = "<<map1["pages"].toString();
+			qDebug()<<"per_page = "<<map1["per_page"].toString();
+			qDebug()<<"perpage = "<<map1["perpage"].toString();
+			qDebug()<<"total = "<<map1["perpage"].toString();
+			
+			QList<QVariant> list1 = map1["contact"].toList();
+			
+			QListIterator<QVariant> i(list1);
+			while(i.hasNext())
+				{
+				SmfContact contact;
+				QVariantMap map2 = i.next().toMap();
+				qDebug()<<"nsid = "<<map2["nsid"].toString();
+				qDebug()<<"username = "<<map2["username"].toString();
+				qDebug()<<"iconserver = "<<map2["iconserver"].toString();
+				qDebug()<<"iconfarm = "<<map2["iconfarm"].toString();
+				qDebug()<<"ignored = "<<map2["ignored"].toString();
+				qDebug()<<"realname = "<<map2["realname"].toString();
+				qDebug()<<"friend = "<<map2["friend"].toString();
+				qDebug()<<"family = "<<map2["family"].toString();
+				qDebug()<<"path_alias = "<<map2["path_alias"].toString();
+				qDebug()<<"location = "<<map2["location"].toString();
+				
+				QContactName contactname;
+				QString username = map2["username"].toString();
+				qDebug()<<"Username = "<<username;
+				contactname.setFirstName(username);
+				contactname.setLastName(username);
+				QVariant nameVar = QVariant::fromValue(contactname);
+				contact.setValue("Name",nameVar);
+				list.append(contact);
+				}
+#endif
+			
+			qDebug()<<"list count = "<<list.count();
 			aResult->setValue(list);
-			error = SmfPluginErrParsingFailed;
-			return error;
+			aRetType = SmfRequestComplete;
+			error = SmfPluginErrNone;
+			}
+		else
+			{
+			qDebug()<<"Service unsupported, currently only SmfContactGetFriends !!!";
+			aRetType = SmfRequestError;
+			error = SmfPluginErrServiceNotSupported;
+			}
 		}
 
-		QVariantMap map1 = result["contacts"].toMap();
-		writeLog("page = "+map1["page"].toString());
-		writeLog("pages = "+map1["pages"].toString());
-		writeLog("per_page = "+map1["per_page"].toString());
-		writeLog("perpage = "+map1["perpage"].toString());
-		writeLog("total = "+map1["perpage"].toString());
-
-		QList<QVariant> list1 = map1["contact"].toList();
-
-		QListIterator<QVariant> i(list1);
-		while(i.hasNext())
-			{
-			SmfContact contact;
-			QVariantMap map2 = i.next().toMap();
-			writeLog("nsid = "+map2["nsid"].toString());
-			writeLog("username = "+map2["username"].toString());
-			writeLog("iconserver = "+map2["iconserver"].toString());
-			writeLog("iconfarm = "+map2["iconfarm"].toString());
-			writeLog("ignored = "+map2["ignored"].toString());
-			writeLog("realname = "+map2["realname"].toString());
-			writeLog("friend = "+map2["friend"].toString());
-			writeLog("family = "+map2["family"].toString());
-			writeLog("path_alias = "+map2["path_alias"].toString());
-			writeLog("location = "+map2["location"].toString());
-
-			QContactName contactname;
-			QString username = map2["username"].toString();
-			writeLog("Username = "+username);
-			contactname.setFirstName(username);
-			contactname.setLastName(username);
-			QVariant nameVar = QVariant::fromValue(contactname);
-			contact.setValue("Name",nameVar);
-			list.append(contact);
-			}
-#endif
-
-#if 0
-		// For getting contacts from xml response
-		QXmlStreamReader xml(response);
-		while (!xml.atEnd())
-			{
-			xml.readNext();
-			if (xml.tokenType() == QXmlStreamReader::StartElement)
-				{
-				// If the tag is contact
-				if (xml.name() == "contact")
-					{
-					writeLog("Contact tag found");
-					SmfContact contact;
-					QStringRef str;
-					QContactName contactname;
-					QString username = xml.attributes().value("username").toString();
-					writeLog("Username = ");
-					writeLog(username);
-					contactname.setFirstName(username);
-					contactname.setLastName(username);
-					QVariant namevar1 = QVariant::fromValue(contactname);
-					contact.setValue("Name",namevar1);
-                    list.append(contact);
-					}
-				}
-			}
-#endif
-
-		writeLog("list count = "+QString::number(list.count(),10));
+	else if(SmfTransportOpOperationCanceledError == aTransportResult)
+		{
+		qDebug()<<"Operation Cancelled !!!";
+		error = SmfPluginErrCancelComplete;
 		aRetType = SmfRequestComplete;
-		error = SmfPluginErrNone;
 		}
 
 	else
 		{
-		error = SmfPluginErrInvalidRequest;
+		qDebug()<<"Transport Error !!!";
+		error = SmfPluginErrNetworkError;
 		aRetType = SmfRequestError;
 		}
-
-	aResult->setValue(list);
+	
 	return error;
 	}
 
@@ -460,6 +518,25 @@
 	}
 
 /**
+* Method to get the list of interfaces that this provider support
+* @return List of supported Interafces
+*/
+QList<QString> FlickrProviderBase::supportedInterfaces( ) const
+	{
+	return m_supportedInterfaces;
+	}
+
+/**
+* Method to get the list of languages supported by this service provider
+* @return a QStringList of languages supported by this service 
+* provider in 2 letter ISO 639-1 format.
+*/
+QStringList FlickrProviderBase::supportedLanguages( ) const
+	{
+	return m_supportedLangs;
+	}
+
+/**
  * Method to get the Plugin specific ID
  * @return The Plugin specific ID
  */
@@ -469,27 +546,27 @@
 	}
 
 /**
- * Method to get the ID of the authentication application
+ * Method to get the ID of the authentication application 
  * for this service
  * @param aProgram The authentication application name
  * @param aArguments List of arguments required for authentication app
  * @param aMode Strting mode for authentication application
- * @return The ID of the authentication application
+ * @return The ID of the authentication application 
  */
-QString FlickrProviderBase::authenticationApp( QString &aProgram,
-		QStringList & aArguments,
+QString FlickrProviderBase::authenticationApp( QString &aProgram, 
+		QStringList & aArguments, 
 		QIODevice::OpenModeFlag aMode ) const
 	{
 	Q_UNUSED(aProgram)
-Q_UNUSED(aArguments)
-Q_UNUSED(aMode)
+	Q_UNUSED(aArguments)
+	Q_UNUSED(aMode)
 	return m_authAppId;
 	}
 
 /**
- * Method to get the unique registration ID provided by the
+ * Method to get the unique registration ID provided by the 
  * Smf for authorised plugins
- * @return The unique registration ID/token provided by the Smf for
+ * @return The unique registration ID/token provided by the Smf for 
  * authorised plugins
  */
 QString FlickrProviderBase::smfRegistrationId( ) const
@@ -500,11 +577,12 @@
 void FlickrProviderBase::initialize()
 	{
 	m_serviceName = "Flickr";
-	m_description = "Flickr plugin description";
+	m_description = "Flickr contact fetcher plugin description";
 	m_serviceUrl = QUrl(QString("http://api.flickr.com"));
 	m_pluginId = "flickrcontactfetcherplugin.qtplugin";
 	m_authAppId = "Flickr AuthAppId";
 	m_smfRegToken = "Flickr RegToken";
+	m_supportedInterfaces.append("org.symbian.smf.plugin.contact.fetcher/v0.2");
 	}
 
 
--- a/example/flickrcontactfetcherplugin/flickrcontactfetcherplugin.h	Mon Jun 07 11:43:45 2010 +0100
+++ b/example/flickrcontactfetcherplugin/flickrcontactfetcherplugin.h	Wed Jun 23 19:51:49 2010 +0530
@@ -1,3 +1,22 @@
+/**
+ * Copyright (c) 2010 Sasken Communication Technologies Ltd.
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of the "Eclipse Public License v1.0" 
+ * which accompanies  this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html"
+ *
+ * Initial Contributors:
+ * Chandradeep Gandhi, Sasken Communication Technologies Ltd - Initial contribution
+ *
+ * Contributors:
+ * Nalina Hariharan
+ * 
+ * Description:
+ * The Plugin that fetches contacts from the logged in user's flickr account
+ *
+ */
+
 #ifndef _FLICKRCONTACTFETCHERPLUGIN_H
 #define _FLICKRCONTACTFETCHERPLUGIN_H
 
@@ -10,16 +29,22 @@
 class QVariant;
 class QNetworkReply;
 
-// Class declaration
+
+/**
+ * The Plugin that fetches contacts from the logged in user's flickr account
+ */
 class FlickrContactFetcherPlugin : public QObject, public SmfContactFetcherPlugin
 	{
 	Q_OBJECT
 	Q_INTERFACES( SmfContactFetcherPlugin SmfPluginBase )
 
 public:
+	/**
+	 * Destructor
+	 */
 	virtual ~FlickrContactFetcherPlugin( );
 	
-public: // From SmfContactFetcherPlugin
+public: // From SmfContactFetcherPlugin interface
 	
 	/**
 	 * Method to get the list of friends
@@ -108,7 +133,7 @@
 	SmfPluginError customRequest( SmfPluginRequestData &aRequest, 
 			const int &aOperation, QByteArray *aData );
 	
-public: // From SmfPluginBase
+public: // From SmfPluginBase interface
 	/**
 	 * The first method to be called in the plugin that implements this interface.
 	 * If this method is not called, plugin may not behave as expected.
@@ -125,6 +150,7 @@
 	
 	/**
 	 * Method to get the result for a network request.
+	 * @param aOperation The type of operation to be requested
 	 * @param aTransportResult The result of transport operation
 	 * @param aResponse The QByteArray instance containing the network response.
 	 * The plugins should delete this instance once they have read the 
@@ -140,6 +166,7 @@
 	 * @param aPageResult [out] The SmfResultPage structure variable
 	 */
 	SmfPluginError responseAvailable( 
+			const SmfRequestTypeID aOperation,
 			const SmfTransportResult &aTransportResult, 
 			QByteArray *aResponse, 
 			QVariant* aResult, 
@@ -152,47 +179,26 @@
 	 * @param aBaseString The base string
 	 * @return The md5 hash of the base string
 	 */
-	QString generateSignature(const QString aBaseString);
-	
-	/**
-	 * Method called by plugins for logging
-	 * @param log string to be logged
-	 */
-	void writeLog(QString log) const;
+	QString generateSignature( const QString aBaseString );
     
 private:
-	/**
-	 * Method called by plugins to generate a request data
-	 * @param aRequest [out] The request data to be sent to network
-	 * @param aOperation The type of http operation
-	 * @param aSignatureMethod The signature method to be used
-	 * @param aParams A map of parameters to its values
-	 * @param aMode The mode of creation of the request
-	 * @param aPostData The data to be posted (for HTTP POST 
-	 * only, else it will be NULL)
-	 * @return SmfPluginError Plugin error if any, else SmfPluginErrNone
-	 */
-	SmfPluginError createRequest( SmfPluginRequestData &aRequest,
-			const QNetworkAccessManager::Operation aOperation, 
-			const SmfSignatureMethod aSignatureMethod, 
-			QMultiMap<QByteArray, QByteArray> &aParams, 
-			const SmfParsingMode aMode,
-			QBuffer *aPostData );
-
-private:
 	FlickrProviderBase *m_provider;
 	SmfPluginUtil *m_util;
-	
 	};
 
 
-// Class declaration
+/**
+ * The Plugin class that implements SmfProviderBase for this flickr plugin
+ */
 class FlickrProviderBase : public QObject, public SmfProviderBase
 	{
 	Q_OBJECT
 	Q_INTERFACES( SmfProviderBase )
 
 public:
+	/**
+	 * Destructor
+	 */
 	virtual ~FlickrProviderBase( );
 
 	/**
@@ -232,6 +238,19 @@
 	QImage applicationIcon( ) const;
 	
 	/**
+	* Method to get the list of interfaces that this provider support
+	* @return List of supported Interafces
+	*/
+	QList<QString> supportedInterfaces( ) const;
+	
+	/**
+	* Method to get the list of languages supported by this service provider
+	* @return a QStringList of languages supported by this service 
+	* provider in 2 letter ISO 639-1 format.
+	*/
+	QStringList supportedLanguages( ) const;
+	
+	/**
 	 * Method to get the Plugin specific ID
 	 * @return The Plugin specific ID
 	 */
@@ -257,8 +276,14 @@
 	QString smfRegistrationId( ) const;
 	
 private:
+	/**
+	 * Method that initializes this class. This method should be called 
+	 * from the initialize() method of the FlickrContactProviderBase class
+	 */
+	void initialize();
+	
+private:
 	friend class FlickrContactFetcherPlugin;
-	void initialize();
 	QString m_serviceName;
 	QImage m_serviceIcon;
 	QString m_description;
@@ -268,6 +293,8 @@
 	QString m_pluginId;
 	QString m_authAppId;
 	QString m_smfRegToken;
+	QList<QString> m_supportedInterfaces;
+	QStringList m_supportedLangs;
 	};
 
 #endif /*_FLICKRCONTACTFETCHERPLUGIN_H*/
--- a/example/flickrcontactfetcherplugin/flickrcontactfetcherplugin.pro	Mon Jun 07 11:43:45 2010 +0100
+++ b/example/flickrcontactfetcherplugin/flickrcontactfetcherplugin.pro	Wed Jun 23 19:51:49 2010 +0530
@@ -10,6 +10,8 @@
 	xml \
 	network
 	
+#DEFINES += SMF_XMLPARSING
+	
 HEADERS = flickrcontactfetcherplugin.h
 
 SOURCES = flickrcontactfetcherplugin.cpp
@@ -28,13 +30,15 @@
     pluginDep.path = $$QT_PLUGINS_BASE_DIR/smf/plugin/contact.fetcher
     DEPLOYMENT += pluginDep
     
-    TARGET.CAPABILITY = ReadUserData \
-        WriteUserData \
-        LocalServices \
-        NetworkServices \
-        UserEnvironment
+    TARGET.CAPABILITY = NetworkServices \
+    	ReadUserData \
+    	WriteUserData \
+    	LocalServices \
+    	UserEnvironment \
+    	ReadDeviceData \
+    	WriteDeviceData
     
-   LIBS += -lsmfclient.dll -lqjson.dll
+   LIBS += -lsmfclient.dll
 }
 
 target.path += $$[QT_INSTALL_PLUGINS]/smf/plugin/contact.fetcher
--- a/example/flickrcontactfetcherplugin/flickrcontactfetcherplugin_template.pkg	Mon Jun 07 11:43:45 2010 +0100
+++ b/example/flickrcontactfetcherplugin/flickrcontactfetcherplugin_template.pkg	Wed Jun 23 19:51:49 2010 +0530
@@ -1,12 +1,13 @@
-; flickrcontactfetcherplugin_template.pkg generated by qmake at 2010-05-18T16:01:40
+; flickrcontactfetcherplugin_template.pkg generated by qmake at 2010-06-22T14:10:41
 ; This file is generated by qmake and should not be modified by the user
 ;
 
 ; Language
 &EN
 
+
 ; SIS header: name, uid, version
-#{"flickrcontactfetcherplugin"},(0xE341a8b4),1,0,0
+#{"flickrcontactfetcherplugin"},(0xE1f540a6),1,0,0
 
 ; Localised Vendor name
 %{"Vendor"}
@@ -14,20 +15,21 @@
 ; Unique Vendor name
 :"Vendor"
 
+
 ; Manual PKG pre-rules from PRO files
+; Default dependency to Qt libraries
+(0x2001E61C), 4, 6, 3, {"Qt"}
 ; Default HW/platform dependencies
 [0x101F7961],0,0,0,{"S60ProductID"}
 [0x102032BE],0,0,0,{"S60ProductID"}
 [0x102752AE],0,0,0,{"S60ProductID"}
 [0x1028315F],0,0,0,{"S60ProductID"}
  
-; Default dependency to Qt libraries
-(0x2001E61C), 4, 6, 1, {"Qt"}
 ; Default dependency to QtMobility libraries
-(0x2002AC89), 0, 2, 0, {"QtMobility"}
+(0x2002AC89), 1, 0, 0, {"QtMobility"}
 
 ; DEPLOYMENT
-"d:/S60/devices/S60_5th_Edition_SDK_v0.9/epoc32/release/$(PLATFORM)/$(TARGET)/flickrcontactfetcherplugin.dll"    - "!:\sys\bin\flickrcontactfetcherplugin.dll"
-"d:/CarbideWorkspace/smfserver_cleaned/example/flickrcontactfetcherplugin/qmakepluginstubs/flickrcontactfetcherplugin.qtplugin"    - "!:\resource\qt\plugins\smf\plugin\contact.fetcher\flickrcontactfetcherplugin.qtplugin"
+"/Nokia/devices/Nokia_Symbian3_SDK_v0.8/epoc32/release/$(PLATFORM)/$(TARGET)/flickrcontactfetcherplugin.dll"    - "!:\sys\bin\flickrcontactfetcherplugin.dll"
+"/Nokia/devices/Nokia_Symbian3_SDK_v0.8/epoc32/data/z/resource/qt/plugins/smf/plugin/contact.fetcher/flickrcontactfetcherplugin.qtplugin"    - "!:\resource\qt\plugins\smf\plugin\contact.fetcher\flickrcontactfetcherplugin.qtplugin"
 
 ; Manual PKG post-rules from PRO files
--- a/example/flickrcontactfetcherplugin/plugin_commonU.def	Mon Jun 07 11:43:45 2010 +0100
+++ b/example/flickrcontactfetcherplugin/plugin_commonU.def	Wed Jun 23 19:51:49 2010 +0530
@@ -1,5 +1,5 @@
 ; ==============================================================================
-; Generated by qmake (2.01a) (Qt 4.6.1) on: 2010-05-18T16:01:40
+; Generated by qmake (2.01a) (Qt 4.6.3) on: 2010-06-22T14:10:41
 ; This file is generated by qmake and should not be modified by the
 ; user.
 ;  Name        : plugin_commonU.def
--- a/example/flickrcontactfetcherplugin/qmakepluginstubs/flickrcontactfetcherplugin.qtplugin	Mon Jun 07 11:43:45 2010 +0100
+++ b/example/flickrcontactfetcherplugin/qmakepluginstubs/flickrcontactfetcherplugin.qtplugin	Wed Jun 23 19:51:49 2010 +0530
@@ -1,1 +1,1 @@
-This file is a Qt plugin stub file. The real Qt plugin is located in \sys\bin. Created:2010-05-18T16:01:40
+This file is a Qt plugin stub file. The real Qt plugin is located in /sys/bin. Created:2010-06-22T14:10:41
--- a/example/smfclientapp/Makefile	Mon Jun 07 11:43:45 2010 +0100
+++ b/example/smfclientapp/Makefile	Wed Jun 23 19:51:49 2010 +0530
@@ -1,5 +1,5 @@
 # ==============================================================================
-# Generated by qmake (2.01a) (Qt 4.6.1) on: Tue May 18 15:54:38 2010
+# Generated by qmake (2.01a) (Qt 4.6.3) on: Tue Jun 22 14:45:30 2010
 # This file is generated by qmake and should not be modified by the
 # user.
 #  Name        : Makefile
@@ -9,10 +9,12 @@
 
 
 MAKEFILE          = Makefile
-QMAKE             = d:\Qt\4.6.1\bin\qmake
+QMAKE             = f:\Qt\4.6.3\bin\qmake
 DEL_FILE          = del
 DEL_DIR           = rmdir
 MOVE              = move
+CHK_DIR_EXISTS    = if not exist
+MKDIR             = mkdir
 XCOPY             = xcopy /d /f /h /r /y /i
 ABLD              = ABLD.BAT
 DEBUG_PLATFORMS   = winscw gcce armv5 armv6
@@ -26,13 +28,13 @@
 endif
 
 DEFINES	 = -DSYMBIAN -DUNICODE -DQT_KEYPAD_NAVIGATION -DQT_SOFTKEYS_ENABLED -DQT_USE_MATH_H_FLOATS -DWRITE_LOG -DQT_WEBKIT_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB
-INCPATH	 =  -I"D:/Qt/4.6.1/include/QtCore" -I"D:/Qt/4.6.1/include/QtCore/tmp" -I"D:/Qt/4.6.1/include/QtNetwork" -I"D:/Qt/4.6.1/include/QtNetwork/tmp" -I"D:/Qt/4.6.1/include/QtGui" -I"D:/Qt/4.6.1/include/QtGui/tmp" -I"D:/Qt/4.6.1/include/QtWebKit" -I"D:/Qt/4.6.1/include/QtWebKit/tmp" -I"D:/Qt/4.6.1/include" -I"D:/Qt/4.6.1/include/tmp" -I"D:/CarbideWorkspace/smfserver_cleaned/example/smfclientapp" -I"D:/CarbideWorkspace/smfserver_cleaned/example/smfclientapp/tmp" -I"D:/Qt/4.6.1/mkspecs/common/symbian" -I"D:/Qt/4.6.1/mkspecs/common/symbian/tmp" -I"D:/S60/devices/S60_5th_Edition_SDK_v0.9/epoc32/include" -I"D:/S60/devices/S60_5th_Edition_SDK_v0.9/epoc32/include/stdapis" -I"D:/S60/devices/S60_5th_Edition_SDK_v0.9/epoc32/include/stdapis/sys" -I"D:/S60/devices/S60_5th_Edition_SDK_v0.9/epoc32/include/middleware" -I"D:/S60/devices/S60_5th_Edition_SDK_v0.9/epoc32/include/domain/middleware" -I"D:/S60/devices/S60_5th_Edition_SDK_v0.9/epoc32/include/applications" -I"D:/S60/devices/S60_5th_Edition_SDK_v0.9/epoc32/include/domain/applications" -I"D:/S60/devices/S60_5th_Edition_SDK_v0.9/epoc32/include/domain/middleware/loc" -I"D:/S60/devices/S60_5th_Edition_SDK_v0.9/epoc32/include/stdapis/stlport" -I"D:/Qt/4.6.1/include/QtXmlPatterns" -I"D:/Qt/4.6.1/include/QtXmlPatterns/tmp"
+INCPATH	 =  -I"F:/Qt/4.6.3/include/QtCore" -I"F:/Qt/4.6.3/include/QtCore/tmp" -I"F:/Qt/4.6.3/include/QtNetwork" -I"F:/Qt/4.6.3/include/QtNetwork/tmp" -I"F:/Qt/4.6.3/include/QtGui" -I"F:/Qt/4.6.3/include/QtGui/tmp" -I"F:/Qt/4.6.3/include/QtWebKit" -I"F:/Qt/4.6.3/include/QtWebKit/tmp" -I"F:/Qt/4.6.3/include" -I"F:/Qt/4.6.3/include/tmp" -I"F:/Qt/4.6.3/include/QtContacts" -I"F:/Qt/4.6.3/include/QtContacts/tmp" -I"F:/Qt/4.6.3/include/QtLocation" -I"F:/Qt/4.6.3/include/QtLocation/tmp" -I"F:/Qt/4.6.3/mkspecs/common/symbian" -I"F:/Qt/4.6.3/mkspecs/common/symbian/tmp" -I"F:/Nokia/devices/Nokia_Symbian3_SDK_v0.8/epoc32/include" -I"F:/Nokia/devices/Nokia_Symbian3_SDK_v0.8/epoc32/include/stdapis" -I"F:/Nokia/devices/Nokia_Symbian3_SDK_v0.8/epoc32/include/stdapis/sys" -I"F:/Nokia/devices/Nokia_Symbian3_SDK_v0.8/epoc32/include/mw" -I"F:/Nokia/devices/Nokia_Symbian3_SDK_v0.8/epoc32/include/platform/mw" -I"F:/Nokia/devices/Nokia_Symbian3_SDK_v0.8/epoc32/include/platform" -I"F:/Nokia/devices/Nokia_Symbian3_SDK_v0.8/epoc32/include/app" -I"F:/Nokia/devices/Nokia_Symbian3_SDK_v0.8/epoc32/include/platform/app" -I"F:/Nokia/devices/Nokia_Symbian3_SDK_v0.8/epoc32/include/platform/loc" -I"F:/Nokia/devices/Nokia_Symbian3_SDK_v0.8/epoc32/include/platform/mw/loc" -I"F:/Nokia/devices/Nokia_Symbian3_SDK_v0.8/epoc32/include/platform/app/loc" -I"F:/Nokia/devices/Nokia_Symbian3_SDK_v0.8/epoc32/include/platform/loc/sc" -I"F:/Nokia/devices/Nokia_Symbian3_SDK_v0.8/epoc32/include/platform/mw/loc/sc" -I"F:/Nokia/devices/Nokia_Symbian3_SDK_v0.8/epoc32/include/platform/app/loc/sc" -I"F:/Nokia/devices/Nokia_Symbian3_SDK_v0.8/epoc32/include/stdapis/stlportv5" -I"F:/Qt/4.6.3/include/QtXmlPatterns" -I"F:/Qt/4.6.3/include/QtXmlPatterns/tmp" -I"F:/Nokia/devices/Nokia_Symbian3_SDK_v0.8/SMFCode/smf_baseline_22june_latest/example/smfclientapp" -I"F:/Nokia/devices/Nokia_Symbian3_SDK_v0.8/SMFCode/smf_baseline_22june_latest/example/smfclientapp/tmp"
 first: default
 default: debug-winscw
 all: debug release
 
 qmake:
-	$(QMAKE) -spec symbian-abld -o "bld.inf" "D:/CarbideWorkspace/smfserver_cleaned/example/smfclientapp/smfclientapp.pro"
+	$(QMAKE) -spec symbian-abld -o "bld.inf" "F:/Nokia/devices/Nokia_Symbian3_SDK_v0.8/SMFCode/smf_baseline_22june_latest/example/smfclientapp/smfclientapp.pro"
 
 bld.inf:
 	$(QMAKE)
@@ -72,30 +74,30 @@
 cleanexport: $(ABLD)
 	$(ABLD) cleanexport
 
-D:\Qt\4.6.1\bin\moc.exe:
-	(cd $(QTDIR)/src/tools/moc && $(MAKE))
+check: first
 
 mocclean: compiler_moc_header_clean compiler_moc_source_clean
 
 mocables: compiler_moc_header_make_all compiler_moc_source_make_all
 
-compiler_moc_header_make_all: moc_displaywidget.cpp moc_testscreen.cpp moc_smfclientapp.cpp
+compiler_moc_header_make_all: moc_posttestui.cpp moc_displaywidget.cpp moc_testscreen.cpp moc_smfclientapp.cpp
 compiler_moc_header_clean:
-	-$(DEL_FILE) moc_displaywidget.cpp moc_testscreen.cpp moc_smfclientapp.cpp 2> NUL
+	-$(DEL_FILE) moc_posttestui.cpp moc_displaywidget.cpp moc_testscreen.cpp moc_smfclientapp.cpp 2> NUL
+moc_posttestui.cpp: ui_posttestui.h \
+		posttestui.h
+	F:\Qt\4.6.3\bin\moc.exe $(DEFINES) $(INCPATH) -DSYMBIAN posttestui.h -o moc_posttestui.cpp
+
 moc_displaywidget.cpp: ui_displaywidget.h \
-		displaywidget.h \
-		..\..\..\..\Qt\4.6.1\bin\moc.exe
-	D:\Qt\4.6.1\bin\moc.exe $(DEFINES) $(INCPATH) -DSYMBIAN displaywidget.h -o moc_displaywidget.cpp
+		displaywidget.h
+	F:\Qt\4.6.3\bin\moc.exe $(DEFINES) $(INCPATH) -DSYMBIAN displaywidget.h -o moc_displaywidget.cpp
 
 moc_testscreen.cpp: ui_SmfClientApp.h \
-		testscreen.h \
-		..\..\..\..\Qt\4.6.1\bin\moc.exe
-	D:\Qt\4.6.1\bin\moc.exe $(DEFINES) $(INCPATH) -DSYMBIAN testscreen.h -o moc_testscreen.cpp
+		testscreen.h
+	F:\Qt\4.6.3\bin\moc.exe $(DEFINES) $(INCPATH) -DSYMBIAN testscreen.h -o moc_testscreen.cpp
 
 moc_smfclientapp.cpp: ui_SmfClientApp.h \
-		smfclientapp.h \
-		..\..\..\..\Qt\4.6.1\bin\moc.exe
-	D:\Qt\4.6.1\bin\moc.exe $(DEFINES) $(INCPATH) -DSYMBIAN smfclientapp.h -o moc_smfclientapp.cpp
+		smfclientapp.h
+	F:\Qt\4.6.3\bin\moc.exe $(DEFINES) $(INCPATH) -DSYMBIAN smfclientapp.h -o moc_smfclientapp.cpp
 
 compiler_rcc_make_all:
 compiler_rcc_clean:
@@ -104,14 +106,17 @@
 	-$(DEL_FILE) qmake_image_collection.cpp 2> NUL
 compiler_moc_source_make_all:
 compiler_moc_source_clean:
-compiler_uic_make_all: ui_displaywidget.h ui_smfclientapp.h
+compiler_uic_make_all: ui_posttestui.h ui_displaywidget.h ui_smfclientapp.h
 compiler_uic_clean:
-	-$(DEL_FILE) ui_displaywidget.h ui_smfclientapp.h 2> NUL
+	-$(DEL_FILE) ui_posttestui.h ui_displaywidget.h ui_smfclientapp.h 2> NUL
+ui_posttestui.h: posttestui.ui
+	f:\Qt\4.6.3\bin\uic.exe posttestui.ui -o ui_posttestui.h
+
 ui_displaywidget.h: displaywidget.ui
-	d:\Qt\4.6.1\bin\uic.exe displaywidget.ui -o ui_displaywidget.h
+	f:\Qt\4.6.3\bin\uic.exe displaywidget.ui -o ui_displaywidget.h
 
 ui_smfclientapp.h: smfclientapp.ui
-	d:\Qt\4.6.1\bin\uic.exe smfclientapp.ui -o ui_smfclientapp.h
+	f:\Qt\4.6.3\bin\uic.exe smfclientapp.ui -o ui_smfclientapp.h
 
 compiler_yacc_decl_make_all:
 compiler_yacc_decl_clean:
@@ -122,37 +127,45 @@
 compiler_clean: compiler_moc_header_clean compiler_uic_clean 
 
 create_temps:
-	-@ if NOT EXIST "D:\Qt\4.6.1\include\QtCore\tmp" mkdir "D:\Qt\4.6.1\include\QtCore\tmp"
-	-@ if NOT EXIST "D:\Qt\4.6.1\include\QtNetwork\tmp" mkdir "D:\Qt\4.6.1\include\QtNetwork\tmp"
-	-@ if NOT EXIST "D:\Qt\4.6.1\include\QtGui\tmp" mkdir "D:\Qt\4.6.1\include\QtGui\tmp"
-	-@ if NOT EXIST "D:\Qt\4.6.1\include\QtWebKit\tmp" mkdir "D:\Qt\4.6.1\include\QtWebKit\tmp"
-	-@ if NOT EXIST "D:\Qt\4.6.1\include\tmp" mkdir "D:\Qt\4.6.1\include\tmp"
-	-@ if NOT EXIST "D:\CarbideWorkspace\smfserver_cleaned\example\smfclientapp\tmp" mkdir "D:\CarbideWorkspace\smfserver_cleaned\example\smfclientapp\tmp"
-	-@ if NOT EXIST "D:\Qt\4.6.1\mkspecs\common\symbian\tmp" mkdir "D:\Qt\4.6.1\mkspecs\common\symbian\tmp"
-	-@ if NOT EXIST "D:\Qt\4.6.1\include\QtXmlPatterns\tmp" mkdir "D:\Qt\4.6.1\include\QtXmlPatterns\tmp"
+	-@ if NOT EXIST "F:\Qt\4.6.3\include\QtCore\tmp" mkdir "F:\Qt\4.6.3\include\QtCore\tmp"
+	-@ if NOT EXIST "F:\Qt\4.6.3\include\QtNetwork\tmp" mkdir "F:\Qt\4.6.3\include\QtNetwork\tmp"
+	-@ if NOT EXIST "F:\Qt\4.6.3\include\QtGui\tmp" mkdir "F:\Qt\4.6.3\include\QtGui\tmp"
+	-@ if NOT EXIST "F:\Qt\4.6.3\include\QtWebKit\tmp" mkdir "F:\Qt\4.6.3\include\QtWebKit\tmp"
+	-@ if NOT EXIST "F:\Qt\4.6.3\include\tmp" mkdir "F:\Qt\4.6.3\include\tmp"
+	-@ if NOT EXIST "F:\Qt\4.6.3\include\QtContacts\tmp" mkdir "F:\Qt\4.6.3\include\QtContacts\tmp"
+	-@ if NOT EXIST "F:\Qt\4.6.3\include\QtLocation\tmp" mkdir "F:\Qt\4.6.3\include\QtLocation\tmp"
+	-@ if NOT EXIST "F:\Qt\4.6.3\mkspecs\common\symbian\tmp" mkdir "F:\Qt\4.6.3\mkspecs\common\symbian\tmp"
+	-@ if NOT EXIST "F:\Qt\4.6.3\include\QtXmlPatterns\tmp" mkdir "F:\Qt\4.6.3\include\QtXmlPatterns\tmp"
+	-@ if NOT EXIST "F:\Nokia\devices\Nokia_Symbian3_SDK_v0.8\SMFCode\smf_baseline_22june_latest\example\smfclientapp\tmp" mkdir "F:\Nokia\devices\Nokia_Symbian3_SDK_v0.8\SMFCode\smf_baseline_22june_latest\example\smfclientapp\tmp"
 
 extension_clean: compiler_clean
-	-@ if EXIST "D:\Qt\4.6.1\include\QtCore\tmp" rmdir  /S /Q  "D:\Qt\4.6.1\include\QtCore\tmp"
-	-@ if EXIST "D:\Qt\4.6.1\include\QtNetwork\tmp" rmdir  /S /Q  "D:\Qt\4.6.1\include\QtNetwork\tmp"
-	-@ if EXIST "D:\Qt\4.6.1\include\QtGui\tmp" rmdir  /S /Q  "D:\Qt\4.6.1\include\QtGui\tmp"
-	-@ if EXIST "D:\Qt\4.6.1\include\QtWebKit\tmp" rmdir  /S /Q  "D:\Qt\4.6.1\include\QtWebKit\tmp"
-	-@ if EXIST "D:\Qt\4.6.1\include\tmp" rmdir  /S /Q  "D:\Qt\4.6.1\include\tmp"
-	-@ if EXIST "D:\CarbideWorkspace\smfserver_cleaned\example\smfclientapp\tmp" rmdir  /S /Q  "D:\CarbideWorkspace\smfserver_cleaned\example\smfclientapp\tmp"
-	-@ if EXIST "D:\Qt\4.6.1\mkspecs\common\symbian\tmp" rmdir  /S /Q  "D:\Qt\4.6.1\mkspecs\common\symbian\tmp"
-	-@ if EXIST "D:\Qt\4.6.1\include\QtXmlPatterns\tmp" rmdir  /S /Q  "D:\Qt\4.6.1\include\QtXmlPatterns\tmp"
+	-@ if EXIST "F:\Qt\4.6.3\include\QtCore\tmp" rmdir  /S /Q  "F:\Qt\4.6.3\include\QtCore\tmp"
+	-@ if EXIST "F:\Qt\4.6.3\include\QtNetwork\tmp" rmdir  /S /Q  "F:\Qt\4.6.3\include\QtNetwork\tmp"
+	-@ if EXIST "F:\Qt\4.6.3\include\QtGui\tmp" rmdir  /S /Q  "F:\Qt\4.6.3\include\QtGui\tmp"
+	-@ if EXIST "F:\Qt\4.6.3\include\QtWebKit\tmp" rmdir  /S /Q  "F:\Qt\4.6.3\include\QtWebKit\tmp"
+	-@ if EXIST "F:\Qt\4.6.3\include\tmp" rmdir  /S /Q  "F:\Qt\4.6.3\include\tmp"
+	-@ if EXIST "F:\Qt\4.6.3\include\QtContacts\tmp" rmdir  /S /Q  "F:\Qt\4.6.3\include\QtContacts\tmp"
+	-@ if EXIST "F:\Qt\4.6.3\include\QtLocation\tmp" rmdir  /S /Q  "F:\Qt\4.6.3\include\QtLocation\tmp"
+	-@ if EXIST "F:\Qt\4.6.3\mkspecs\common\symbian\tmp" rmdir  /S /Q  "F:\Qt\4.6.3\mkspecs\common\symbian\tmp"
+	-@ if EXIST "F:\Qt\4.6.3\include\QtXmlPatterns\tmp" rmdir  /S /Q  "F:\Qt\4.6.3\include\QtXmlPatterns\tmp"
+	-@ if EXIST "F:\Nokia\devices\Nokia_Symbian3_SDK_v0.8\SMFCode\smf_baseline_22june_latest\example\smfclientapp\tmp" rmdir  /S /Q  "F:\Nokia\devices\Nokia_Symbian3_SDK_v0.8\SMFCode\smf_baseline_22june_latest\example\smfclientapp\tmp"
 
 pre_targetdeps: \
 	generated_sources \
 	all_source_deps \
+	ui_posttestui.h \
 	ui_displaywidget.h \
 	ui_smfclientapp.h
 
 generated_sources: \
+	moc_posttestui.cpp \
 	moc_displaywidget.cpp \
 	moc_testscreen.cpp \
 	moc_smfclientapp.cpp
 
 all_source_deps: \
+	posttestui.h \
+	ui_posttestui.h \
 	displaywidget.h \
 	ui_displaywidget.h \
 	testscreen.h \
@@ -165,21 +178,39 @@
 
 winscw_deployment_clean:
 
-sis: restore_build
+deployment:
+
+deployment_clean:
+
+-include .make.cache
+
+sis:
 	$(if $(wildcard smfclientapp_template.pkg),$(if $(wildcard .make.cache),$(MAKE) -s -f $(MAKEFILE) ok_sis,$(if $(QT_SIS_TARGET),$(MAKE) -s -f $(MAKEFILE) ok_sis,$(MAKE) -s -f $(MAKEFILE) fail_sis_nocache)),$(MAKE) -s -f $(MAKEFILE) fail_sis_nopkg)
 
 ok_sis:
 	createpackage.bat $(QT_SIS_OPTIONS) smfclientapp_template.pkg $(QT_SIS_TARGET) $(QT_SIS_CERTIFICATE) $(QT_SIS_KEY) $(QT_SIS_PASSPHRASE)
 
+smfclientapp.sis:
+	$(MAKE) -s -f $(MAKEFILE) sis
+
+stub_sis:
+	$(if $(wildcard smfclientapp_template.pkg),$(if $(wildcard .make.cache),$(MAKE) -s -f $(MAKEFILE) ok_stub_sis,$(if $(QT_SIS_TARGET),$(MAKE) -s -f $(MAKEFILE) ok_stub_sis,$(MAKE) -s -f $(MAKEFILE) fail_sis_nocache)),$(MAKE) -s -f $(MAKEFILE) fail_sis_nopkg)
+
+ok_stub_sis:
+	createpackage.bat -s $(QT_SIS_OPTIONS) smfclientapp_template.pkg $(QT_SIS_TARGET) $(QT_SIS_CERTIFICATE) $(QT_SIS_KEY) $(QT_SIS_PASSPHRASE)
+
+installer_sis: smfclientapp.sis
+	$(if $(wildcard smfclientapp_installer.pkg),$(MAKE) -s -f $(MAKEFILE) ok_installer_sis,$(MAKE) -s -f $(MAKEFILE) fail_sis_nopkg)
+
+ok_installer_sis: 
+	createpackage.bat $(QT_SIS_OPTIONS) smfclientapp_installer.pkg - $(QT_SIS_CERTIFICATE) $(QT_SIS_KEY) $(QT_SIS_PASSPHRASE)
+
 fail_sis_nopkg:
-	$(error PKG file does not exist, 'SIS' target is only supported for executables or projects with DEPLOYMENT statement)
+	$(error PKG file does not exist, 'sis' and 'installer_sis' target are only supported for executables or projects with DEPLOYMENT statement)
 
 fail_sis_nocache:
 	$(error Project has to be built or QT_SIS_TARGET environment variable has to be set before calling 'SIS' target)
 
-restore_build:
--include .make.cache
-
 store_build:
 	@echo # ============================================================================== > .make.cache
 	@echo # This file is generated by make and should not be modified by the user >> .make.cache
@@ -194,15 +225,16 @@
 	@echo QT_SIS_TARGET ?= $(QT_SIS_TARGET) >> .make.cache
 
 dodistclean:
-	-@ if EXIST "d:\CarbideWorkspace\smfserver_cleaned\example\smfclientapp\smfclientapp_template.pkg" $(DEL_FILE)  "d:\CarbideWorkspace\smfserver_cleaned\example\smfclientapp\smfclientapp_template.pkg"
-	-@ if EXIST "d:\CarbideWorkspace\smfserver_cleaned\example\smfclientapp\Makefile" $(DEL_FILE)  "d:\CarbideWorkspace\smfserver_cleaned\example\smfclientapp\Makefile"
-	-@ if EXIST "d:\CarbideWorkspace\smfserver_cleaned\example\smfclientapp\Makefile_0xE08059D4.mk" $(DEL_FILE)  "d:\CarbideWorkspace\smfserver_cleaned\example\smfclientapp\Makefile_0xE08059D4.mk"
-	-@ if EXIST "d:\CarbideWorkspace\smfserver_cleaned\example\smfclientapp\smfclientapp_0xE08059D4.mmp" $(DEL_FILE)  "d:\CarbideWorkspace\smfserver_cleaned\example\smfclientapp\smfclientapp_0xE08059D4.mmp"
-	-@ if EXIST "d:\CarbideWorkspace\smfserver_cleaned\example\smfclientapp\smfclientapp_reg.rss" $(DEL_FILE)  "d:\CarbideWorkspace\smfserver_cleaned\example\smfclientapp\smfclientapp_reg.rss"
-	-@ if EXIST "d:\CarbideWorkspace\smfserver_cleaned\example\smfclientapp\smfclientapp.rss" $(DEL_FILE)  "d:\CarbideWorkspace\smfserver_cleaned\example\smfclientapp\smfclientapp.rss"
-	-@ if EXIST "d:\CarbideWorkspace\smfserver_cleaned\example\smfclientapp\smfclientapp.loc" $(DEL_FILE)  "d:\CarbideWorkspace\smfserver_cleaned\example\smfclientapp\smfclientapp.loc"
-	-@ if EXIST "d:\CarbideWorkspace\smfserver_cleaned\example\smfclientapp\.make.cache" $(DEL_FILE)  "d:\CarbideWorkspace\smfserver_cleaned\example\smfclientapp\.make.cache"
-	-@ if EXIST "d:\CarbideWorkspace\smfserver_cleaned\example\smfclientapp\bld.inf" $(DEL_FILE)  "d:\CarbideWorkspace\smfserver_cleaned\example\smfclientapp\bld.inf"
+	-@ if EXIST "f:\Nokia\devices\Nokia_Symbian3_SDK_v0.8\SMFCode\smf_baseline_22june_latest\example\smfclientapp\smfclientapp_template.pkg" $(DEL_FILE)  "f:\Nokia\devices\Nokia_Symbian3_SDK_v0.8\SMFCode\smf_baseline_22june_latest\example\smfclientapp\smfclientapp_template.pkg"
+	-@ if EXIST "f:\Nokia\devices\Nokia_Symbian3_SDK_v0.8\SMFCode\smf_baseline_22june_latest\example\smfclientapp\smfclientapp_installer.pkg" $(DEL_FILE)  "f:\Nokia\devices\Nokia_Symbian3_SDK_v0.8\SMFCode\smf_baseline_22june_latest\example\smfclientapp\smfclientapp_installer.pkg"
+	-@ if EXIST "f:\Nokia\devices\Nokia_Symbian3_SDK_v0.8\SMFCode\smf_baseline_22june_latest\example\smfclientapp\Makefile" $(DEL_FILE)  "f:\Nokia\devices\Nokia_Symbian3_SDK_v0.8\SMFCode\smf_baseline_22june_latest\example\smfclientapp\Makefile"
+	-@ if EXIST "f:\Nokia\devices\Nokia_Symbian3_SDK_v0.8\SMFCode\smf_baseline_22june_latest\example\smfclientapp\Makefile_0xE08059D6.mk" $(DEL_FILE)  "f:\Nokia\devices\Nokia_Symbian3_SDK_v0.8\SMFCode\smf_baseline_22june_latest\example\smfclientapp\Makefile_0xE08059D6.mk"
+	-@ if EXIST "f:\Nokia\devices\Nokia_Symbian3_SDK_v0.8\SMFCode\smf_baseline_22june_latest\example\smfclientapp\smfclientapp_0xE08059D6.mmp" $(DEL_FILE)  "f:\Nokia\devices\Nokia_Symbian3_SDK_v0.8\SMFCode\smf_baseline_22june_latest\example\smfclientapp\smfclientapp_0xE08059D6.mmp"
+	-@ if EXIST "f:\Nokia\devices\Nokia_Symbian3_SDK_v0.8\SMFCode\smf_baseline_22june_latest\example\smfclientapp\smfclientapp_reg.rss" $(DEL_FILE)  "f:\Nokia\devices\Nokia_Symbian3_SDK_v0.8\SMFCode\smf_baseline_22june_latest\example\smfclientapp\smfclientapp_reg.rss"
+	-@ if EXIST "f:\Nokia\devices\Nokia_Symbian3_SDK_v0.8\SMFCode\smf_baseline_22june_latest\example\smfclientapp\smfclientapp.rss" $(DEL_FILE)  "f:\Nokia\devices\Nokia_Symbian3_SDK_v0.8\SMFCode\smf_baseline_22june_latest\example\smfclientapp\smfclientapp.rss"
+	-@ if EXIST "f:\Nokia\devices\Nokia_Symbian3_SDK_v0.8\SMFCode\smf_baseline_22june_latest\example\smfclientapp\smfclientapp.loc" $(DEL_FILE)  "f:\Nokia\devices\Nokia_Symbian3_SDK_v0.8\SMFCode\smf_baseline_22june_latest\example\smfclientapp\smfclientapp.loc"
+	-@ if EXIST "f:\Nokia\devices\Nokia_Symbian3_SDK_v0.8\SMFCode\smf_baseline_22june_latest\example\smfclientapp\.make.cache" $(DEL_FILE)  "f:\Nokia\devices\Nokia_Symbian3_SDK_v0.8\SMFCode\smf_baseline_22june_latest\example\smfclientapp\.make.cache"
+	-@ if EXIST "f:\Nokia\devices\Nokia_Symbian3_SDK_v0.8\SMFCode\smf_baseline_22june_latest\example\smfclientapp\bld.inf" $(DEL_FILE)  "f:\Nokia\devices\Nokia_Symbian3_SDK_v0.8\SMFCode\smf_baseline_22june_latest\example\smfclientapp\bld.inf"
 
 distclean: clean dodistclean
 
@@ -237,7 +269,7 @@
 	$(ABLD) reallyclean armv6 urel
 
 run:
-	-call /S60/devices/S60_5th_Edition_SDK_v0.9/epoc32/release/winscw/udeb/smfclientapp.exe $(QT_RUN_OPTIONS)
+	-call /Nokia/devices/Nokia_Symbian3_SDK_v0.8/epoc32/release/winscw/udeb/smfclientapp.exe $(QT_RUN_OPTIONS)
 runonphone: sis
-	runonphone $(QT_RUN_ON_PHONE_OPTIONS) --sis smfclientapp_$(QT_SIS_TARGET).sis smfclientapp.exe $(QT_RUN_OPTIONS)
+	runonphone $(QT_RUN_ON_PHONE_OPTIONS) --sis smfclientapp.sis smfclientapp.exe $(QT_RUN_OPTIONS)
 
--- a/example/smfclientapp/displaywidget.cpp	Mon Jun 07 11:43:45 2010 +0100
+++ b/example/smfclientapp/displaywidget.cpp	Wed Jun 23 19:51:49 2010 +0530
@@ -22,25 +22,40 @@
 DisplayWidget::DisplayWidget(QWidget *parent)
     : QWidget(parent)
 {
-	ui.setupUi(this);
-	ui.verticalLayout->setGeometry(QApplication::desktop()->availableGeometry());
-	//Add item as and when they are implemented
-	ui.comboBox_intf->addItem("Contact Fetcher");
-	ui.comboBox_intf->addItem("Post Provider");
-//	connect(ui.comboBox_intf,
-//			SIGNAL(currentIndexChanged(int)),
-//			this,
-//			SLOT(interfaceSelected(int)));
-	connect(ui.pushButton_intf,SIGNAL(clicked()),this,SLOT(interfaceSelected()));
-	connect(ui.pushButton_SP,SIGNAL(clicked()),this,SLOT(serviceProviderSelected()));
-	connect(ui.pushButton_service,SIGNAL(clicked()),this,SLOT(serviceSelected()));
-	writeLog("Start");
+//	ui.setupUi(this);
+//	ui.verticalLayout->setGeometry(QApplication::desktop()->availableGeometry());
+//	//Add item as and when they are implemented
+//	ui.comboBox_intf->addItem("Contact Fetcher");
+//	ui.comboBox_intf->addItem("Post Provider");
+////	connect(ui.comboBox_intf,
+////			SIGNAL(currentIndexChanged(int)),
+////			this,
+////			SLOT(interfaceSelected(int)));
+//	connect(ui.pushButton_intf,SIGNAL(clicked()),this,SLOT(interfaceSelected()));
+//	connect(ui.pushButton_SP,SIGNAL(clicked()),this,SLOT(serviceProviderSelected()));
+//	connect(ui.pushButton_service,SIGNAL(clicked()),this,SLOT(serviceSelected()));
+//	writeLog("Start");
+	SmfClient client;
+	QString intfName("org.symbian.smf.client.contact.fetcher\0.2");
+	providerList= client.GetServices(intfName);
+	writeLog("GetServices count=");
+	QString c = QString::number(providerList->count());
+	writeLog(c);	
+	SmfProvider smfP(providerList->at(0));
+	m_contactFetcher = new SmfContactFetcher(&smfP);
+				//connect to appropriate slot
+	connect(m_contactFetcher,
+			SIGNAL(friendsListAvailable(SmfContactList*, SmfError , SmfResultPage)),
+			this,
+			SLOT(showFriends(SmfContactList*, SmfError , SmfResultPage)));
+	
+	writeLog("Before m_contactFetcher->friends=");
+	//request for friends, excluding paging info
+	m_contactFetcher->friends();
 }
 void DisplayWidget::interfaceSelected()
 	{
 	SmfClient client;
-	//TODO:- PM should use commented interface name instead
-//	QString name("org.symbian.smf.client.contact.posts");
 	QString intfName;
 	switch(ui.comboBox_intf->currentIndex())
 		{
@@ -48,7 +63,7 @@
 			intfName = "org.symbian.smf.client.contact.fetcher";
 			break;
 		case 1:
-			intfName = "posts";
+			intfName = "org.symbian.smf.client.contact.posts";
 			break;
 		default:
 			//should not reach here!!!!
@@ -98,9 +113,9 @@
 	SmfProvider smfP(providerList->at(ui.comboBox_service->currentIndex()));
 	
 	writeLog("Selected SmfProvider=");
-	writeLog(smfP.m_description);
-	writeLog(smfP.m_serviceUrl.toString());
-	writeLog(smfP.m_appUrl.toString());
+	writeLog(smfP.description());
+	writeLog(smfP.serviceUrl().toString());
+	writeLog(smfP.applicationUrl().toString());
 	switch(ui.comboBox_intf->currentIndex())
 		{
 		case 1:
@@ -148,7 +163,7 @@
 	//display post description
 	
 	foreach(SmfPost post, *postlist)
-			{
+			{ 
 			QString desc = post.description();
 			ui.listWidget->addItem(desc);
 			}
@@ -165,22 +180,18 @@
 	
 	foreach(SmfContact frnd, *frnds)
 			{
-		//lets display only street
+		//lets display only name
 		QVariant nameVar = frnd.value("Name");
 		QContactName name = nameVar.value<QContactName>();
 		QString fname;
 		QString lname;
-#ifdef OLDER_QT_MOBILITY
-		fname = name.first();
-		lname = name.last();
-#else
 		fname = name.firstName();
 		lname = name.lastName();
-#endif
-		
-		ui.listWidget->addItem(fname);
+		//qDebug()<<fname;
+		//qDebug()<<lname;
+		//ui.listWidget->addItem(fname);
 			}
-	ui.listWidget->show();
+	//ui.listWidget->show();
 	}
 void DisplayWidget::writeLog(QString log) const
 	{
--- a/example/smfclientapp/main.cpp	Mon Jun 07 11:43:45 2010 +0100
+++ b/example/smfclientapp/main.cpp	Wed Jun 23 19:51:49 2010 +0530
@@ -34,9 +34,42 @@
 #include <QtGui>
 #include <QApplication>
 
+void debugOutput(QtMsgType type, const char *msg)
+	{
+	QFile logFile("c:\\data\\SmfLog.txt");
+	Q_ASSERT(logFile.open( QIODevice::WriteOnly | QIODevice::Text | QIODevice::Append ));
+	QTextStream stream(&logFile);
+	
+	switch (type)
+		{
+		case QtDebugMsg:
+			stream<<msg<<"\n";
+			break;
+
+		case QtWarningMsg:
+			stream<<"Warning: ";
+			stream<<msg<<"\n";
+			break;
+			
+		case QtCriticalMsg:
+			stream<<"Critical: ";
+			stream<<msg<<"\n";
+			break;
+			
+		case QtFatalMsg:
+			stream<<"Fatal: ";
+			stream<<msg<<"\n";
+			break;
+			
+		default:;
+		}
+	}
+
 int main(int argc, char *argv[])
 {
-    QApplication a(argc, argv);
+//	QApplication::setAttribute(Qt::AA_S60DontConstructApplicationPanes);
+	qInstallMsgHandler(debugOutput);
+	QApplication a(argc, argv);
     DisplayWidget screen;
     //TestScreen screen;
     screen.showMaximized();
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/example/smfclientapp/posttestui.cpp	Wed Jun 23 19:51:49 2010 +0530
@@ -0,0 +1,12 @@
+#include "posttestui.h"
+
+PostTestUi::PostTestUi(QWidget *parent)
+    : QWidget(parent)
+{
+	ui.setupUi(this);
+}
+
+PostTestUi::~PostTestUi()
+{
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/example/smfclientapp/posttestui.h	Wed Jun 23 19:51:49 2010 +0530
@@ -0,0 +1,19 @@
+#ifndef POSTTESTUI_H
+#define POSTTESTUI_H
+
+#include <QtGui/QWidget>
+#include "ui_posttestui.h"
+
+class PostTestUi : public QWidget
+{
+    Q_OBJECT
+
+public:
+    PostTestUi(QWidget *parent = 0);
+    ~PostTestUi();
+
+private:
+    Ui::PostTestUiClass ui;
+};
+
+#endif // POSTTESTUI_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/example/smfclientapp/posttestui.ui	Wed Jun 23 19:51:49 2010 +0530
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>PostTestUiClass</class>
+ <widget class="QWidget" name="PostTestUiClass">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>400</width>
+    <height>300</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>PostTestUi</string>
+  </property>
+  <widget class="QWidget" name="verticalLayoutWidget">
+   <property name="geometry">
+    <rect>
+     <x>10</x>
+     <y>20</y>
+     <width>371</width>
+     <height>261</height>
+    </rect>
+   </property>
+   <layout class="QVBoxLayout" name="verticalLayout">
+    <item>
+     <layout class="QGridLayout" name="gridLayout">
+      <item row="1" column="0">
+       <widget class="QComboBox" name="comboBox">
+        <item>
+         <property name="text">
+          <string>Retreive Post</string>
+         </property>
+        </item>
+        <item>
+         <property name="text">
+          <string>Post Scrap</string>
+         </property>
+        </item>
+        <item>
+         <property name="text">
+          <string>Post Scrap directed</string>
+         </property>
+        </item>
+       </widget>
+      </item>
+      <item row="2" column="0">
+       <widget class="QListWidget" name="listWidget"/>
+      </item>
+     </layout>
+    </item>
+   </layout>
+  </widget>
+ </widget>
+ <layoutdefault spacing="6" margin="11"/>
+ <resources/>
+ <connections/>
+</ui>
--- a/example/smfclientapp/smfclientapp.loc	Mon Jun 07 11:43:45 2010 +0100
+++ b/example/smfclientapp/smfclientapp.loc	Wed Jun 23 19:51:49 2010 +0530
@@ -1,5 +1,5 @@
 // ============================================================================
-// * Generated by qmake (2.01a) (Qt 4.6.1) on: 2010-05-18T15:54:38
+// * Generated by qmake (2.01a) (Qt 4.6.3) on: 2010-06-22T14:45:30
 // * This file is generated by qmake and should not be modified by the
 // * user.
 // ============================================================================
--- a/example/smfclientapp/smfclientapp.pro	Mon Jun 07 11:43:45 2010 +0100
+++ b/example/smfclientapp/smfclientapp.pro	Wed Jun 23 19:51:49 2010 +0530
@@ -9,21 +9,26 @@
 CONFIG += mobility
 MOBILITY = contacts \
     location
-HEADERS += displaywidget.h \
+HEADERS += posttestui.h \
+    displaywidget.h \
     testscreen.h \
     smfclientapp.h
-SOURCES += displaywidget.cpp \
+SOURCES += posttestui.cpp \
+    displaywidget.cpp \
     testscreen.cpp \
     smfclientapp_reg.rss \
     main.cpp \
     smfclientapp.cpp
-FORMS += displaywidget.ui \
+FORMS += posttestui.ui \
+    displaywidget.ui \
     smfclientapp.ui
 RESOURCES += 
-symbian:TARGET.UID3 = 0xE08059D4
+symbian:TARGET.UID3 = 0xE08059D6
 symbian:LIBS += -lsmfclient.dll
 symbian:TARGET.CAPABILITY = ReadUserData \
     WriteUserData \
     LocalServices \
     NetworkServices \
-    UserEnvironment
+    UserEnvironment \
+    ReadDeviceData \
+    WriteDeviceData
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/example/smfclientapp/smfclientapp.rss	Wed Jun 23 19:51:49 2010 +0530
@@ -0,0 +1,21 @@
+// ============================================================================
+// * Generated by qmake (2.01a) (Qt 4.6.3) on: 2010-06-22T14:45:30
+// * This file is generated by qmake and should not be modified by the
+// * user.
+// ============================================================================
+
+#include <appinfo.rh>
+#include "smfclientapp.loc"
+
+RESOURCE LOCALISABLE_APP_INFO r_localisable_app_info
+	{
+	short_caption = STRING_r_short_caption;
+	caption_and_icon =
+	CAPTION_AND_ICON_INFO
+		{
+		caption = STRING_r_caption;
+		number_of_icons = 0;
+		icon_file = "";
+		};
+	}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/example/smfclientapp/smfclientapp_reg.rss	Wed Jun 23 19:51:49 2010 +0530
@@ -0,0 +1,18 @@
+// ============================================================================
+// * Generated by qmake (2.01a) (Qt 4.6.3) on: 2010-06-22T14:45:30
+// * This file is generated by qmake and should not be modified by the
+// * user.
+// ============================================================================
+
+#include <smfclientapp.rsg>
+#include <appinfo.rh>
+
+UID2 KUidAppRegistrationResourceFile
+UID3 0xE08059D6
+
+RESOURCE APP_REGISTRATION_INFO
+	{
+	app_file="smfclientapp";
+	localisable_resource_file="\\resource\\apps\\smfclientapp";
+
+	}
--- a/example/smfclientapp/smfclientapp_template.pkg	Mon Jun 07 11:43:45 2010 +0100
+++ b/example/smfclientapp/smfclientapp_template.pkg	Wed Jun 23 19:51:49 2010 +0530
@@ -1,12 +1,13 @@
-; smfclientapp_template.pkg generated by qmake at 2010-05-18T15:54:38
+; smfclientapp_template.pkg generated by qmake at 2010-06-22T14:45:30
 ; This file is generated by qmake and should not be modified by the user
 ;
 
 ; Language
 &EN
 
+
 ; SIS header: name, uid, version
-#{"smfclientapp"},(0xE08059D4),1,0,0
+#{"smfclientapp"},(0xE08059D6),1,0,0
 
 ; Localised Vendor name
 %{"Vendor"}
@@ -14,23 +15,24 @@
 ; Unique Vendor name
 :"Vendor"
 
+
 ; Manual PKG pre-rules from PRO files
+; Dependency to Qt Webkit
+(0x200267C2), 4, 6, 3, {"QtWebKit"}
+; Default dependency to Qt libraries
+(0x2001E61C), 4, 6, 3, {"Qt"}
 ; Default HW/platform dependencies
 [0x101F7961],0,0,0,{"S60ProductID"}
 [0x102032BE],0,0,0,{"S60ProductID"}
 [0x102752AE],0,0,0,{"S60ProductID"}
 [0x1028315F],0,0,0,{"S60ProductID"}
  
-; Default dependency to Qt libraries
-(0x2001E61C), 4, 6, 1, {"Qt"}
-; Dependency to Qt Webkit
-(0x200267C2), 4, 6, 1, {"QtWebKit"}
 ; Default dependency to QtMobility libraries
-(0x2002AC89), 0, 2, 0, {"QtMobility"}
+(0x2002AC89), 1, 0, 0, {"QtMobility"}
 
 ; Executable and default resource files
-"/S60/devices/S60_5th_Edition_SDK_v0.9/epoc32/release/$(PLATFORM)/$(TARGET)/smfclientapp.exe"    - "!:\sys\bin\smfclientapp.exe"
-"/S60/devices/S60_5th_Edition_SDK_v0.9/epoc32/data/z/resource/apps/smfclientapp.rsc"    - "!:\resource\apps\smfclientapp.rsc"
-"/S60/devices/S60_5th_Edition_SDK_v0.9/epoc32/data/z/private/10003a3f/import/apps/smfclientapp_reg.rsc"    - "!:\private\10003a3f\import\apps\smfclientapp_reg.rsc"
+"/Nokia/devices/Nokia_Symbian3_SDK_v0.8/epoc32/release/$(PLATFORM)/$(TARGET)/smfclientapp.exe"    - "!:\sys\bin\smfclientapp.exe"
+"/Nokia/devices/Nokia_Symbian3_SDK_v0.8/epoc32/data/z/resource/apps/smfclientapp.rsc"    - "!:\resource\apps\smfclientapp.rsc"
+"/Nokia/devices/Nokia_Symbian3_SDK_v0.8/epoc32/data/z/private/10003a3f/import/apps/smfclientapp_reg.rsc"    - "!:\private\10003a3f\import\apps\smfclientapp_reg.rsc"
 
 ; Manual PKG post-rules from PRO files
--- a/example/smfclientapp/testscreen.cpp	Mon Jun 07 11:43:45 2010 +0100
+++ b/example/smfclientapp/testscreen.cpp	Wed Jun 23 19:51:49 2010 +0530
@@ -35,10 +35,10 @@
 	SmfProvider smfP(providerList->at(0));
 	
 	writeLog("0th SmfProvider=");
-	writeLog(smfP.m_description);
-	writeLog(smfP.m_serviceUrl.toString());
-	writeLog(smfP.m_appUrl.toString());
-	m_postProvider = new SmfPostProvider(&smfP);
+	writeLog(smfP.description());
+		writeLog(smfP.serviceUrl().toString());
+		writeLog(smfP.applicationUrl().toString());
+		m_postProvider = new SmfPostProvider(&smfP);
 	//connect to appropriate slot
 	connect(m_postProvider,
 			SIGNAL(postsAvailable(SmfPostList*, SmfError, SmfResultPage)),
@@ -61,9 +61,10 @@
 	SmfProvider smfP(providerList->at(providerIndex));
 	
 	writeLog("0th SmfProvider=");
-	writeLog(smfP.m_description);
-	writeLog(smfP.m_serviceUrl.toString());
-	writeLog(smfP.m_appUrl.toString());
+	writeLog(smfP.description());
+		writeLog(smfP.serviceUrl().toString());
+		writeLog(smfP.applicationUrl().toString());
+		
 	m_contactFetcher = new SmfContactFetcher(&smfP);
 	//connect to appropriate slot
 	connect(m_contactFetcher,SIGNAL(friendsListAvailable(SmfContactList*, SmfError , SmfResultPage)),
@@ -84,9 +85,10 @@
 	SmfProvider smfP(providerList->at(providerIndex));
 	
 	writeLog("0th SmfProvider=");
-	writeLog(smfP.m_description);
-	writeLog(smfP.m_serviceUrl.toString());
-	writeLog(smfP.m_appUrl.toString());
+	writeLog(smfP.description());
+		writeLog(smfP.serviceUrl().toString());
+		writeLog(smfP.applicationUrl().toString());
+		
 	m_postProvider = new SmfPostProvider(&smfP);
 //	//connect to appropriate slot
 	connect(m_postProvider,
@@ -150,13 +152,8 @@
 //		QString nick = name.value("Nickname");
 		QString fname;
 		QString lname;
-#ifdef OLDER_QT_MOBILITY
-		fname = name.first();
-		lname = name.last();
-#else
 		fname = name.firstName();
 		lname = name.lastName();
-#endif
 		
 		ui.listWidget->addItem(fname);
 //		QMessageBox::information(this,QString("First Name"),fname,QMessageBox::Ok);
--- a/example/smfclientapp/ui_displaywidget.h	Mon Jun 07 11:43:45 2010 +0100
+++ b/example/smfclientapp/ui_displaywidget.h	Wed Jun 23 19:51:49 2010 +0530
@@ -1,8 +1,8 @@
 /********************************************************************************
 ** Form generated from reading UI file 'displaywidget.ui'
 **
-** Created: Fri May 7 18:24:44 2010
-**      by: Qt User Interface Compiler version 4.6.1
+** Created: Tue Jun 22 13:45:34 2010
+**      by: Qt User Interface Compiler version 4.6.3
 **
 ** WARNING! All changes made in this file will be lost when recompiling UI file!
 ********************************************************************************/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/example/smfclientapp/ui_posttestui.h	Wed Jun 23 19:51:49 2010 +0530
@@ -0,0 +1,89 @@
+/********************************************************************************
+** Form generated from reading UI file 'posttestui.ui'
+**
+** Created: Tue Jun 22 13:45:31 2010
+**      by: Qt User Interface Compiler version 4.6.3
+**
+** WARNING! All changes made in this file will be lost when recompiling UI file!
+********************************************************************************/
+
+#ifndef UI_POSTTESTUI_H
+#define UI_POSTTESTUI_H
+
+#include <QtCore/QVariant>
+#include <QtGui/QAction>
+#include <QtGui/QApplication>
+#include <QtGui/QButtonGroup>
+#include <QtGui/QComboBox>
+#include <QtGui/QGridLayout>
+#include <QtGui/QHeaderView>
+#include <QtGui/QListWidget>
+#include <QtGui/QVBoxLayout>
+#include <QtGui/QWidget>
+
+QT_BEGIN_NAMESPACE
+
+class Ui_PostTestUiClass
+{
+public:
+    QWidget *verticalLayoutWidget;
+    QVBoxLayout *verticalLayout;
+    QGridLayout *gridLayout;
+    QComboBox *comboBox;
+    QListWidget *listWidget;
+
+    void setupUi(QWidget *PostTestUiClass)
+    {
+        if (PostTestUiClass->objectName().isEmpty())
+            PostTestUiClass->setObjectName(QString::fromUtf8("PostTestUiClass"));
+        PostTestUiClass->resize(400, 300);
+        verticalLayoutWidget = new QWidget(PostTestUiClass);
+        verticalLayoutWidget->setObjectName(QString::fromUtf8("verticalLayoutWidget"));
+        verticalLayoutWidget->setGeometry(QRect(10, 20, 371, 261));
+        verticalLayout = new QVBoxLayout(verticalLayoutWidget);
+        verticalLayout->setSpacing(6);
+        verticalLayout->setContentsMargins(11, 11, 11, 11);
+        verticalLayout->setObjectName(QString::fromUtf8("verticalLayout"));
+        verticalLayout->setContentsMargins(0, 0, 0, 0);
+        gridLayout = new QGridLayout();
+        gridLayout->setSpacing(6);
+        gridLayout->setObjectName(QString::fromUtf8("gridLayout"));
+        comboBox = new QComboBox(verticalLayoutWidget);
+        comboBox->setObjectName(QString::fromUtf8("comboBox"));
+
+        gridLayout->addWidget(comboBox, 1, 0, 1, 1);
+
+        listWidget = new QListWidget(verticalLayoutWidget);
+        listWidget->setObjectName(QString::fromUtf8("listWidget"));
+
+        gridLayout->addWidget(listWidget, 2, 0, 1, 1);
+
+
+        verticalLayout->addLayout(gridLayout);
+
+
+        retranslateUi(PostTestUiClass);
+
+        QMetaObject::connectSlotsByName(PostTestUiClass);
+    } // setupUi
+
+    void retranslateUi(QWidget *PostTestUiClass)
+    {
+        PostTestUiClass->setWindowTitle(QApplication::translate("PostTestUiClass", "PostTestUi", 0, QApplication::UnicodeUTF8));
+        comboBox->clear();
+        comboBox->insertItems(0, QStringList()
+         << QApplication::translate("PostTestUiClass", "Retreive Post", 0, QApplication::UnicodeUTF8)
+         << QApplication::translate("PostTestUiClass", "Post Scrap", 0, QApplication::UnicodeUTF8)
+         << QApplication::translate("PostTestUiClass", "Post Scrap directed", 0, QApplication::UnicodeUTF8)
+        );
+    } // retranslateUi
+
+};
+
+namespace Ui {
+    class PostTestUiClass: public Ui_PostTestUiClass {};
+} // namespace Ui
+
+QT_END_NAMESPACE
+
+#endif // UI_POSTTESTUI_H
--- a/example/smfclientapp/ui_smfclientapp.h	Mon Jun 07 11:43:45 2010 +0100
+++ b/example/smfclientapp/ui_smfclientapp.h	Wed Jun 23 19:51:49 2010 +0530
@@ -1,8 +1,8 @@
 /********************************************************************************
 ** Form generated from reading UI file 'smfclientapp.ui'
 **
-** Created: Fri May 7 15:23:58 2010
-**      by: Qt User Interface Compiler version 4.6.1
+** Created: Tue Jun 22 13:45:36 2010
+**      by: Qt User Interface Compiler version 4.6.3
 **
 ** WARNING! All changes made in this file will be lost when recompiling UI file!
 ********************************************************************************/
--- a/smf/smf.pro	Mon Jun 07 11:43:45 2010 +0100
+++ b/smf/smf.pro	Wed Jun 23 19:51:49 2010 +0530
@@ -1,5 +1,7 @@
 TEMPLATE  = 	subdirs
 
-SUBDIRS   =	smfservermodule \
-		# smfsettingsui \
-                # smfcredentialmgr
+SUBDIRS   =	smfcredentialmgr \
+		smfsettingsui \
+		smfservermodule 
+		
+CONFIG += ordered
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/smf/smfcredentialmgr/doc/Doxyfile	Wed Jun 23 19:51:49 2010 +0530
@@ -0,0 +1,1600 @@
+# Doxyfile 1.6.3
+
+# This file describes the settings to be used by the documentation system
+# doxygen (www.doxygen.org) for a project
+#
+# All text after a hash (#) is considered a comment and will be ignored
+# The format is:
+#       TAG = value [value, ...]
+# For lists items can also be appended using:
+#       TAG += value [value, ...]
+# Values that contain spaces should be placed between quotes (" ")
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+
+# This tag specifies the encoding used for all characters in the config file 
+# that follow. The default is UTF-8 which is also the encoding used for all 
+# text before the first occurrence of this tag. Doxygen uses libiconv (or the 
+# iconv built into libc) for the transcoding. See 
+# http://www.gnu.org/software/libiconv for the list of possible encodings.
+
+DOXYFILE_ENCODING      = UTF-8
+
+# The PROJECT_NAME tag is a single word (or a sequence of words surrounded 
+# by quotes) that should identify the project.
+
+PROJECT_NAME           = 
+
+# The PROJECT_NUMBER tag can be used to enter a project or revision number. 
+# This could be handy for archiving the generated documentation or 
+# if some version control system is used.
+
+PROJECT_NUMBER         = 
+
+# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) 
+# base path where the generated documentation will be put. 
+# If a relative path is entered, it will be relative to the location 
+# where doxygen was started. If left blank the current directory will be used.
+
+OUTPUT_DIRECTORY       = C:/Symbian/Carbide/SmfCredMgr/doc
+
+# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create 
+# 4096 sub-directories (in 2 levels) under the output directory of each output 
+# format and will distribute the generated files over these directories. 
+# Enabling this option can be useful when feeding doxygen a huge amount of 
+# source files, where putting all generated files in the same directory would 
+# otherwise cause performance problems for the file system.
+
+CREATE_SUBDIRS         = NO
+
+# The OUTPUT_LANGUAGE tag is used to specify the language in which all 
+# documentation generated by doxygen is written. Doxygen will use this 
+# information to generate all constant output in the proper language. 
+# The default language is English, other supported languages are: 
+# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, 
+# Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German, 
+# Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English 
+# messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian, 
+# Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrilic, Slovak, 
+# Slovene, Spanish, Swedish, Ukrainian, and Vietnamese.
+
+OUTPUT_LANGUAGE        = English
+
+# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will 
+# include brief member descriptions after the members that are listed in 
+# the file and class documentation (similar to JavaDoc). 
+# Set to NO to disable this.
+
+BRIEF_MEMBER_DESC      = YES
+
+# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend 
+# the brief description of a member or function before the detailed description. 
+# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the 
+# brief descriptions will be completely suppressed.
+
+REPEAT_BRIEF           = YES
+
+# This tag implements a quasi-intelligent brief description abbreviator 
+# that is used to form the text in various listings. Each string 
+# in this list, if found as the leading text of the brief description, will be 
+# stripped from the text and the result after processing the whole list, is 
+# used as the annotated text. Otherwise, the brief description is used as-is. 
+# If left blank, the following values are used ("$name" is automatically 
+# replaced with the name of the entity): "The $name class" "The $name widget" 
+# "The $name file" "is" "provides" "specifies" "contains" 
+# "represents" "a" "an" "the"
+
+ABBREVIATE_BRIEF       = "The $name class" \
+                         "The $name widget" \
+                         "The $name file" \
+                         is \
+                         provides \
+                         specifies \
+                         contains \
+                         represents \
+                         a \
+                         an \
+                         the
+
+# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then 
+# Doxygen will generate a detailed section even if there is only a brief 
+# description.
+
+ALWAYS_DETAILED_SEC    = NO
+
+# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all 
+# inherited members of a class in the documentation of that class as if those 
+# members were ordinary class members. Constructors, destructors and assignment 
+# operators of the base classes will not be shown.
+
+INLINE_INHERITED_MEMB  = NO
+
+# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full 
+# path before files name in the file list and in the header files. If set 
+# to NO the shortest path that makes the file name unique will be used.
+
+FULL_PATH_NAMES        = YES
+
+# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag 
+# can be used to strip a user-defined part of the path. Stripping is 
+# only done if one of the specified strings matches the left-hand part of 
+# the path. The tag can be used to show relative paths in the file list. 
+# If left blank the directory from which doxygen is run is used as the 
+# path to strip.
+
+STRIP_FROM_PATH        = 
+
+# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of 
+# the path mentioned in the documentation of a class, which tells 
+# the reader which header file to include in order to use a class. 
+# If left blank only the name of the header file containing the class 
+# definition is used. Otherwise one should specify the include paths that 
+# are normally passed to the compiler using the -I flag.
+
+STRIP_FROM_INC_PATH    = 
+
+# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter 
+# (but less readable) file names. This can be useful is your file systems 
+# doesn't support long names like on DOS, Mac, or CD-ROM.
+
+SHORT_NAMES            = NO
+
+# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen 
+# will interpret the first line (until the first dot) of a JavaDoc-style 
+# comment as the brief description. If set to NO, the JavaDoc 
+# comments will behave just like regular Qt-style comments 
+# (thus requiring an explicit @brief command for a brief description.)
+
+JAVADOC_AUTOBRIEF      = NO
+
+# If the QT_AUTOBRIEF tag is set to YES then Doxygen will 
+# interpret the first line (until the first dot) of a Qt-style 
+# comment as the brief description. If set to NO, the comments 
+# will behave just like regular Qt-style comments (thus requiring 
+# an explicit \brief command for a brief description.)
+
+QT_AUTOBRIEF           = NO
+
+# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen 
+# treat a multi-line C++ special comment block (i.e. a block of //! or /// 
+# comments) as a brief description. This used to be the default behaviour. 
+# The new default is to treat a multi-line C++ comment block as a detailed 
+# description. Set this tag to YES if you prefer the old behaviour instead.
+
+MULTILINE_CPP_IS_BRIEF = NO
+
+# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented 
+# member inherits the documentation from any documented member that it 
+# re-implements.
+
+INHERIT_DOCS           = YES
+
+# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce 
+# a new page for each member. If set to NO, the documentation of a member will 
+# be part of the file/class/namespace that contains it.
+
+SEPARATE_MEMBER_PAGES  = NO
+
+# The TAB_SIZE tag can be used to set the number of spaces in a tab. 
+# Doxygen uses this value to replace tabs by spaces in code fragments.
+
+TAB_SIZE               = 8
+
+# This tag can be used to specify a number of aliases that acts 
+# as commands in the documentation. An alias has the form "name=value". 
+# For example adding "sideeffect=\par Side Effects:\n" will allow you to 
+# put the command \sideeffect (or @sideeffect) in the documentation, which 
+# will result in a user-defined paragraph with heading "Side Effects:". 
+# You can put \n's in the value part of an alias to insert newlines.
+
+ALIASES                = 
+
+# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C 
+# sources only. Doxygen will then generate output that is more tailored for C. 
+# For instance, some of the names that are used will be different. The list 
+# of all members will be omitted, etc.
+
+OPTIMIZE_OUTPUT_FOR_C  = NO
+
+# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java 
+# sources only. Doxygen will then generate output that is more tailored for 
+# Java. For instance, namespaces will be presented as packages, qualified 
+# scopes will look different, etc.
+
+OPTIMIZE_OUTPUT_JAVA   = NO
+
+# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran 
+# sources only. Doxygen will then generate output that is more tailored for 
+# Fortran.
+
+OPTIMIZE_FOR_FORTRAN   = NO
+
+# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL 
+# sources. Doxygen will then generate output that is tailored for 
+# VHDL.
+
+OPTIMIZE_OUTPUT_VHDL   = NO
+
+# Doxygen selects the parser to use depending on the extension of the files it parses. 
+# With this tag you can assign which parser to use for a given extension. 
+# Doxygen has a built-in mapping, but you can override or extend it using this tag. 
+# The format is ext=language, where ext is a file extension, and language is one of 
+# the parsers supported by doxygen: IDL, Java, Javascript, C#, C, C++, D, PHP, 
+# Objective-C, Python, Fortran, VHDL, C, C++. For instance to make doxygen treat 
+# .inc files as Fortran files (default is PHP), and .f files as C (default is Fortran), 
+# use: inc=Fortran f=C. Note that for custom extensions you also need to set
+# FILE_PATTERNS otherwise the files are not read by doxygen.
+
+EXTENSION_MAPPING      = 
+
+# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want 
+# to include (a tag file for) the STL sources as input, then you should 
+# set this tag to YES in order to let doxygen match functions declarations and 
+# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. 
+# func(std::string) {}). This also make the inheritance and collaboration 
+# diagrams that involve STL classes more complete and accurate.
+
+BUILTIN_STL_SUPPORT    = NO
+
+# If you use Microsoft's C++/CLI language, you should set this option to YES to 
+# enable parsing support.
+
+CPP_CLI_SUPPORT        = NO
+
+# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only. 
+# Doxygen will parse them like normal C++ but will assume all classes use public 
+# instead of private inheritance when no explicit protection keyword is present.
+
+SIP_SUPPORT            = NO
+
+# For Microsoft's IDL there are propget and propput attributes to indicate getter 
+# and setter methods for a property. Setting this option to YES (the default) 
+# will make doxygen to replace the get and set methods by a property in the 
+# documentation. This will only work if the methods are indeed getting or 
+# setting a simple type. If this is not the case, or you want to show the 
+# methods anyway, you should set this option to NO.
+
+IDL_PROPERTY_SUPPORT   = YES
+
+# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC 
+# tag is set to YES, then doxygen will reuse the documentation of the first 
+# member in the group (if any) for the other members of the group. By default 
+# all members of a group must be documented explicitly.
+
+DISTRIBUTE_GROUP_DOC   = NO
+
+# Set the SUBGROUPING tag to YES (the default) to allow class member groups of 
+# the same type (for instance a group of public functions) to be put as a 
+# subgroup of that type (e.g. under the Public Functions section). Set it to 
+# NO to prevent subgrouping. Alternatively, this can be done per class using 
+# the \nosubgrouping command.
+
+SUBGROUPING            = YES
+
+# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum 
+# is documented as struct, union, or enum with the name of the typedef. So 
+# typedef struct TypeS {} TypeT, will appear in the documentation as a struct 
+# with name TypeT. When disabled the typedef will appear as a member of a file, 
+# namespace, or class. And the struct will be named TypeS. This can typically 
+# be useful for C code in case the coding convention dictates that all compound 
+# types are typedef'ed and only the typedef is referenced, never the tag name.
+
+TYPEDEF_HIDES_STRUCT   = NO
+
+# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to 
+# determine which symbols to keep in memory and which to flush to disk. 
+# When the cache is full, less often used symbols will be written to disk. 
+# For small to medium size projects (<1000 input files) the default value is 
+# probably good enough. For larger projects a too small cache size can cause 
+# doxygen to be busy swapping symbols to and from disk most of the time 
+# causing a significant performance penality. 
+# If the system has enough physical memory increasing the cache will improve the 
+# performance by keeping more symbols in memory. Note that the value works on 
+# a logarithmic scale so increasing the size by one will rougly double the 
+# memory usage. The cache size is given by this formula: 
+# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0, 
+# corresponding to a cache size of 2^16 = 65536 symbols
+
+SYMBOL_CACHE_SIZE      = 0
+
+#---------------------------------------------------------------------------
+# Build related configuration options
+#---------------------------------------------------------------------------
+
+# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in 
+# documentation are documented, even if no documentation was available. 
+# Private class members and static file members will be hidden unless 
+# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
+
+EXTRACT_ALL            = NO
+
+# If the EXTRACT_PRIVATE tag is set to YES all private members of a class 
+# will be included in the documentation.
+
+EXTRACT_PRIVATE        = NO
+
+# If the EXTRACT_STATIC tag is set to YES all static members of a file 
+# will be included in the documentation.
+
+EXTRACT_STATIC         = NO
+
+# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) 
+# defined locally in source files will be included in the documentation. 
+# If set to NO only classes defined in header files are included.
+
+EXTRACT_LOCAL_CLASSES  = YES
+
+# This flag is only useful for Objective-C code. When set to YES local 
+# methods, which are defined in the implementation section but not in 
+# the interface are included in the documentation. 
+# If set to NO (the default) only methods in the interface are included.
+
+EXTRACT_LOCAL_METHODS  = NO
+
+# If this flag is set to YES, the members of anonymous namespaces will be 
+# extracted and appear in the documentation as a namespace called 
+# 'anonymous_namespace{file}', where file will be replaced with the base 
+# name of the file that contains the anonymous namespace. By default 
+# anonymous namespace are hidden.
+
+EXTRACT_ANON_NSPACES   = NO
+
+# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all 
+# undocumented members of documented classes, files or namespaces. 
+# If set to NO (the default) these members will be included in the 
+# various overviews, but no documentation section is generated. 
+# This option has no effect if EXTRACT_ALL is enabled.
+
+HIDE_UNDOC_MEMBERS     = NO
+
+# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all 
+# undocumented classes that are normally visible in the class hierarchy. 
+# If set to NO (the default) these classes will be included in the various 
+# overviews. This option has no effect if EXTRACT_ALL is enabled.
+
+HIDE_UNDOC_CLASSES     = NO
+
+# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all 
+# friend (class|struct|union) declarations. 
+# If set to NO (the default) these declarations will be included in the 
+# documentation.
+
+HIDE_FRIEND_COMPOUNDS  = NO
+
+# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any 
+# documentation blocks found inside the body of a function. 
+# If set to NO (the default) these blocks will be appended to the 
+# function's detailed documentation block.
+
+HIDE_IN_BODY_DOCS      = NO
+
+# The INTERNAL_DOCS tag determines if documentation 
+# that is typed after a \internal command is included. If the tag is set 
+# to NO (the default) then the documentation will be excluded. 
+# Set it to YES to include the internal documentation.
+
+INTERNAL_DOCS          = NO
+
+# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate 
+# file names in lower-case letters. If set to YES upper-case letters are also 
+# allowed. This is useful if you have classes or files whose names only differ 
+# in case and if your file system supports case sensitive file names. Windows 
+# and Mac users are advised to set this option to NO.
+
+CASE_SENSE_NAMES       = NO
+
+# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen 
+# will show members with their full class and namespace scopes in the 
+# documentation. If set to YES the scope will be hidden.
+
+HIDE_SCOPE_NAMES       = NO
+
+# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen 
+# will put a list of the files that are included by a file in the documentation 
+# of that file.
+
+SHOW_INCLUDE_FILES     = YES
+
+# If the FORCE_LOCAL_INCLUDES tag is set to YES then Doxygen 
+# will list include files with double quotes in the documentation 
+# rather than with sharp brackets.
+
+FORCE_LOCAL_INCLUDES   = NO
+
+# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] 
+# is inserted in the documentation for inline members.
+
+INLINE_INFO            = YES
+
+# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen 
+# will sort the (detailed) documentation of file and class members 
+# alphabetically by member name. If set to NO the members will appear in 
+# declaration order.
+
+SORT_MEMBER_DOCS       = YES
+
+# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the 
+# brief documentation of file, namespace and class members alphabetically 
+# by member name. If set to NO (the default) the members will appear in 
+# declaration order.
+
+SORT_BRIEF_DOCS        = NO
+
+# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen
+# will sort the (brief and detailed) documentation of class members so that
+# constructors and destructors are listed first. If set to NO (the default)
+# the constructors will appear in the respective orders defined by
+# SORT_MEMBER_DOCS and SORT_BRIEF_DOCS.
+# This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO
+# and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO.
+
+SORT_MEMBERS_CTORS_1ST = NO
+
+# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the 
+# hierarchy of group names into alphabetical order. If set to NO (the default) 
+# the group names will appear in their defined order.
+
+SORT_GROUP_NAMES       = NO
+
+# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be 
+# sorted by fully-qualified names, including namespaces. If set to 
+# NO (the default), the class list will be sorted only by class name, 
+# not including the namespace part. 
+# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. 
+# Note: This option applies only to the class list, not to the 
+# alphabetical list.
+
+SORT_BY_SCOPE_NAME     = NO
+
+# The GENERATE_TODOLIST tag can be used to enable (YES) or 
+# disable (NO) the todo list. This list is created by putting \todo 
+# commands in the documentation.
+
+GENERATE_TODOLIST      = YES
+
+# The GENERATE_TESTLIST tag can be used to enable (YES) or 
+# disable (NO) the test list. This list is created by putting \test 
+# commands in the documentation.
+
+GENERATE_TESTLIST      = YES
+
+# The GENERATE_BUGLIST tag can be used to enable (YES) or 
+# disable (NO) the bug list. This list is created by putting \bug 
+# commands in the documentation.
+
+GENERATE_BUGLIST       = YES
+
+# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or 
+# disable (NO) the deprecated list. This list is created by putting 
+# \deprecated commands in the documentation.
+
+GENERATE_DEPRECATEDLIST= YES
+
+# The ENABLED_SECTIONS tag can be used to enable conditional 
+# documentation sections, marked by \if sectionname ... \endif.
+
+ENABLED_SECTIONS       = 
+
+# The MAX_INITIALIZER_LINES tag determines the maximum number of lines 
+# the initial value of a variable or define consists of for it to appear in 
+# the documentation. If the initializer consists of more lines than specified 
+# here it will be hidden. Use a value of 0 to hide initializers completely. 
+# The appearance of the initializer of individual variables and defines in the 
+# documentation can be controlled using \showinitializer or \hideinitializer 
+# command in the documentation regardless of this setting.
+
+MAX_INITIALIZER_LINES  = 30
+
+# Set the SHOW_USED_FILES tag to NO to disable the list of files generated 
+# at the bottom of the documentation of classes and structs. If set to YES the 
+# list will mention the files that were used to generate the documentation.
+
+SHOW_USED_FILES        = YES
+
+# If the sources in your project are distributed over multiple directories 
+# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy 
+# in the documentation. The default is NO.
+
+SHOW_DIRECTORIES       = NO
+
+# Set the SHOW_FILES tag to NO to disable the generation of the Files page. 
+# This will remove the Files entry from the Quick Index and from the 
+# Folder Tree View (if specified). The default is YES.
+
+SHOW_FILES             = YES
+
+# Set the SHOW_NAMESPACES tag to NO to disable the generation of the 
+# Namespaces page.  This will remove the Namespaces entry from the Quick Index 
+# and from the Folder Tree View (if specified). The default is YES.
+
+SHOW_NAMESPACES        = YES
+
+# The FILE_VERSION_FILTER tag can be used to specify a program or script that 
+# doxygen should invoke to get the current version for each file (typically from 
+# the version control system). Doxygen will invoke the program by executing (via 
+# popen()) the command <command> <input-file>, where <command> is the value of 
+# the FILE_VERSION_FILTER tag, and <input-file> is the name of an input file 
+# provided by doxygen. Whatever the program writes to standard output 
+# is used as the file version. See the manual for examples.
+
+FILE_VERSION_FILTER    = 
+
+# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed by 
+# doxygen. The layout file controls the global structure of the generated output files 
+# in an output format independent way. The create the layout file that represents 
+# doxygen's defaults, run doxygen with the -l option. You can optionally specify a 
+# file name after the option, if omitted DoxygenLayout.xml will be used as the name 
+# of the layout file.
+
+LAYOUT_FILE            = 
+
+#---------------------------------------------------------------------------
+# configuration options related to warning and progress messages
+#---------------------------------------------------------------------------
+
+# The QUIET tag can be used to turn on/off the messages that are generated 
+# by doxygen. Possible values are YES and NO. If left blank NO is used.
+
+QUIET                  = NO
+
+# The WARNINGS tag can be used to turn on/off the warning messages that are 
+# generated by doxygen. Possible values are YES and NO. If left blank 
+# NO is used.
+
+WARNINGS               = YES
+
+# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings 
+# for undocumented members. If EXTRACT_ALL is set to YES then this flag will 
+# automatically be disabled.
+
+WARN_IF_UNDOCUMENTED   = YES
+
+# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for 
+# potential errors in the documentation, such as not documenting some 
+# parameters in a documented function, or documenting parameters that 
+# don't exist or using markup commands wrongly.
+
+WARN_IF_DOC_ERROR      = YES
+
+# This WARN_NO_PARAMDOC option can be abled to get warnings for 
+# functions that are documented, but have no documentation for their parameters 
+# or return value. If set to NO (the default) doxygen will only warn about 
+# wrong or incomplete parameter documentation, but not about the absence of 
+# documentation.
+
+WARN_NO_PARAMDOC       = NO
+
+# The WARN_FORMAT tag determines the format of the warning messages that 
+# doxygen can produce. The string should contain the $file, $line, and $text 
+# tags, which will be replaced by the file and line number from which the 
+# warning originated and the warning text. Optionally the format may contain 
+# $version, which will be replaced by the version of the file (if it could 
+# be obtained via FILE_VERSION_FILTER)
+
+WARN_FORMAT            = "$file:$line: $text"
+
+# The WARN_LOGFILE tag can be used to specify a file to which warning 
+# and error messages should be written. If left blank the output is written 
+# to stderr.
+
+WARN_LOGFILE           = 
+
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+
+# The INPUT tag can be used to specify the files and/or directories that contain 
+# documented source files. You may enter file names like "myfile.cpp" or 
+# directories like "/usr/src/myproject". Separate the files or directories 
+# with spaces.
+
+INPUT                  = C:/Symbian/Carbide/SmfCredMgr
+
+# This tag can be used to specify the character encoding of the source files 
+# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is 
+# also the default input encoding. Doxygen uses libiconv (or the iconv built 
+# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for 
+# the list of possible encodings.
+
+INPUT_ENCODING         = UTF-8
+
+# If the value of the INPUT tag contains directories, you can use the 
+# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp 
+# and *.h) to filter out the source-files in the directories. If left 
+# blank the following patterns are tested: 
+# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx 
+# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py *.f90
+
+FILE_PATTERNS          = *.c \
+                         *.cc \
+                         *.cxx \
+                         *.cpp \
+                         *.c++ \
+                         *.d \
+                         *.java \
+                         *.ii \
+                         *.ixx \
+                         *.ipp \
+                         *.i++ \
+                         *.inl \
+                         *.h \
+                         *.hh \
+                         *.hxx \
+                         *.hpp \
+                         *.h++ \
+                         *.idl \
+                         *.odl \
+                         *.cs \
+                         *.php \
+                         *.php3 \
+                         *.inc \
+                         *.m \
+                         *.mm \
+                         *.dox \
+                         *.py \
+                         *.f90 \
+                         *.f \
+                         *.vhd \
+                         *.vhdl
+
+# The RECURSIVE tag can be used to turn specify whether or not subdirectories 
+# should be searched for input files as well. Possible values are YES and NO. 
+# If left blank NO is used.
+
+RECURSIVE              = YES
+
+# The EXCLUDE tag can be used to specify files and/or directories that should 
+# excluded from the INPUT source files. This way you can easily exclude a 
+# subdirectory from a directory tree whose root is specified with the INPUT tag.
+
+EXCLUDE                = 
+
+# The EXCLUDE_SYMLINKS tag can be used select whether or not files or 
+# directories that are symbolic links (a Unix filesystem feature) are excluded 
+# from the input.
+
+EXCLUDE_SYMLINKS       = NO
+
+# If the value of the INPUT tag contains directories, you can use the 
+# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude 
+# certain files from those directories. Note that the wildcards are matched 
+# against the file with absolute path, so to exclude all test directories 
+# for example use the pattern */test/*
+
+EXCLUDE_PATTERNS       = 
+
+# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names 
+# (namespaces, classes, functions, etc.) that should be excluded from the 
+# output. The symbol name can be a fully qualified name, a word, or if the 
+# wildcard * is used, a substring. Examples: ANamespace, AClass, 
+# AClass::ANamespace, ANamespace::*Test
+
+EXCLUDE_SYMBOLS        = 
+
+# The EXAMPLE_PATH tag can be used to specify one or more files or 
+# directories that contain example code fragments that are included (see 
+# the \include command).
+
+EXAMPLE_PATH           = 
+
+# If the value of the EXAMPLE_PATH tag contains directories, you can use the 
+# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp 
+# and *.h) to filter out the source-files in the directories. If left 
+# blank all files are included.
+
+EXAMPLE_PATTERNS       = *
+
+# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be 
+# searched for input files to be used with the \include or \dontinclude 
+# commands irrespective of the value of the RECURSIVE tag. 
+# Possible values are YES and NO. If left blank NO is used.
+
+EXAMPLE_RECURSIVE      = NO
+
+# The IMAGE_PATH tag can be used to specify one or more files or 
+# directories that contain image that are included in the documentation (see 
+# the \image command).
+
+IMAGE_PATH             = 
+
+# The INPUT_FILTER tag can be used to specify a program that doxygen should 
+# invoke to filter for each input file. Doxygen will invoke the filter program 
+# by executing (via popen()) the command <filter> <input-file>, where <filter> 
+# is the value of the INPUT_FILTER tag, and <input-file> is the name of an 
+# input file. Doxygen will then use the output that the filter program writes 
+# to standard output.  If FILTER_PATTERNS is specified, this tag will be 
+# ignored.
+
+INPUT_FILTER           = 
+
+# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern 
+# basis.  Doxygen will compare the file name with each pattern and apply the 
+# filter if there is a match.  The filters are a list of the form: 
+# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further 
+# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER 
+# is applied to all files.
+
+FILTER_PATTERNS        = 
+
+# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using 
+# INPUT_FILTER) will be used to filter the input files when producing source 
+# files to browse (i.e. when SOURCE_BROWSER is set to YES).
+
+FILTER_SOURCE_FILES    = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to source browsing
+#---------------------------------------------------------------------------
+
+# If the SOURCE_BROWSER tag is set to YES then a list of source files will 
+# be generated. Documented entities will be cross-referenced with these sources. 
+# Note: To get rid of all source code in the generated output, make sure also 
+# VERBATIM_HEADERS is set to NO.
+
+SOURCE_BROWSER         = NO
+
+# Setting the INLINE_SOURCES tag to YES will include the body 
+# of functions and classes directly in the documentation.
+
+INLINE_SOURCES         = NO
+
+# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct 
+# doxygen to hide any special comment blocks from generated source code 
+# fragments. Normal C and C++ comments will always remain visible.
+
+STRIP_CODE_COMMENTS    = YES
+
+# If the REFERENCED_BY_RELATION tag is set to YES 
+# then for each documented function all documented 
+# functions referencing it will be listed.
+
+REFERENCED_BY_RELATION = NO
+
+# If the REFERENCES_RELATION tag is set to YES 
+# then for each documented function all documented entities 
+# called/used by that function will be listed.
+
+REFERENCES_RELATION    = NO
+
+# If the REFERENCES_LINK_SOURCE tag is set to YES (the default) 
+# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from 
+# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will 
+# link to the source code.  Otherwise they will link to the documentation.
+
+REFERENCES_LINK_SOURCE = YES
+
+# If the USE_HTAGS tag is set to YES then the references to source code 
+# will point to the HTML generated by the htags(1) tool instead of doxygen 
+# built-in source browser. The htags tool is part of GNU's global source 
+# tagging system (see http://www.gnu.org/software/global/global.html). You 
+# will need version 4.8.6 or higher.
+
+USE_HTAGS              = NO
+
+# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen 
+# will generate a verbatim copy of the header file for each class for 
+# which an include is specified. Set to NO to disable this.
+
+VERBATIM_HEADERS       = YES
+
+#---------------------------------------------------------------------------
+# configuration options related to the alphabetical class index
+#---------------------------------------------------------------------------
+
+# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index 
+# of all compounds will be generated. Enable this if the project 
+# contains a lot of classes, structs, unions or interfaces.
+
+ALPHABETICAL_INDEX     = NO
+
+# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then 
+# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns 
+# in which this list will be split (can be a number in the range [1..20])
+
+COLS_IN_ALPHA_INDEX    = 5
+
+# In case all classes in a project start with a common prefix, all 
+# classes will be put under the same header in the alphabetical index. 
+# The IGNORE_PREFIX tag can be used to specify one or more prefixes that 
+# should be ignored while generating the index headers.
+
+IGNORE_PREFIX          = 
+
+#---------------------------------------------------------------------------
+# configuration options related to the HTML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_HTML tag is set to YES (the default) Doxygen will 
+# generate HTML output.
+
+GENERATE_HTML          = YES
+
+# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `html' will be used as the default path.
+
+HTML_OUTPUT            = html
+
+# The HTML_FILE_EXTENSION tag can be used to specify the file extension for 
+# each generated HTML page (for example: .htm,.php,.asp). If it is left blank 
+# doxygen will generate files with .html extension.
+
+HTML_FILE_EXTENSION    = .html
+
+# The HTML_HEADER tag can be used to specify a personal HTML header for 
+# each generated HTML page. If it is left blank doxygen will generate a 
+# standard header.
+
+HTML_HEADER            = 
+
+# The HTML_FOOTER tag can be used to specify a personal HTML footer for 
+# each generated HTML page. If it is left blank doxygen will generate a 
+# standard footer.
+
+HTML_FOOTER            = 
+
+# The HTML_STYLESHEET tag can be used to specify a user-defined cascading 
+# style sheet that is used by each HTML page. It can be used to 
+# fine-tune the look of the HTML output. If the tag is left blank doxygen 
+# will generate a default style sheet. Note that doxygen will try to copy 
+# the style sheet file to the HTML output directory, so don't put your own 
+# stylesheet in the HTML output directory as well, or it will be erased!
+
+HTML_STYLESHEET        = 
+
+# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML 
+# page will contain the date and time when the page was generated. Setting 
+# this to NO can help when comparing the output of multiple runs.
+
+HTML_TIMESTAMP         = YES
+
+# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, 
+# files or namespaces will be aligned in HTML using tables. If set to 
+# NO a bullet list will be used.
+
+HTML_ALIGN_MEMBERS     = YES
+
+# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML 
+# documentation will contain sections that can be hidden and shown after the 
+# page has loaded. For this to work a browser that supports 
+# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox 
+# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari).
+
+HTML_DYNAMIC_SECTIONS  = NO
+
+# If the GENERATE_DOCSET tag is set to YES, additional index files 
+# will be generated that can be used as input for Apple's Xcode 3 
+# integrated development environment, introduced with OSX 10.5 (Leopard). 
+# To create a documentation set, doxygen will generate a Makefile in the 
+# HTML output directory. Running make will produce the docset in that 
+# directory and running "make install" will install the docset in 
+# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find 
+# it at startup. 
+# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html for more information.
+
+GENERATE_DOCSET        = NO
+
+# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the 
+# feed. A documentation feed provides an umbrella under which multiple 
+# documentation sets from a single provider (such as a company or product suite) 
+# can be grouped.
+
+DOCSET_FEEDNAME        = "Doxygen generated docs"
+
+# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that 
+# should uniquely identify the documentation set bundle. This should be a 
+# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen 
+# will append .docset to the name.
+
+DOCSET_BUNDLE_ID       = org.doxygen.Project
+
+# If the GENERATE_HTMLHELP tag is set to YES, additional index files 
+# will be generated that can be used as input for tools like the 
+# Microsoft HTML help workshop to generate a compiled HTML help file (.chm) 
+# of the generated HTML documentation.
+
+GENERATE_HTMLHELP      = NO
+
+# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can 
+# be used to specify the file name of the resulting .chm file. You 
+# can add a path in front of the file if the result should not be 
+# written to the html output directory.
+
+CHM_FILE               = 
+
+# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can 
+# be used to specify the location (absolute path including file name) of 
+# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run 
+# the HTML help compiler on the generated index.hhp.
+
+HHC_LOCATION           = 
+
+# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag 
+# controls if a separate .chi index file is generated (YES) or that 
+# it should be included in the master .chm file (NO).
+
+GENERATE_CHI           = NO
+
+# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING 
+# is used to encode HtmlHelp index (hhk), content (hhc) and project file 
+# content.
+
+CHM_INDEX_ENCODING     = 
+
+# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag 
+# controls whether a binary table of contents is generated (YES) or a 
+# normal table of contents (NO) in the .chm file.
+
+BINARY_TOC             = NO
+
+# The TOC_EXPAND flag can be set to YES to add extra items for group members 
+# to the contents of the HTML help documentation and to the tree view.
+
+TOC_EXPAND             = NO
+
+# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and QHP_VIRTUAL_FOLDER 
+# are set, an additional index file will be generated that can be used as input for 
+# Qt's qhelpgenerator to generate a Qt Compressed Help (.qch) of the generated 
+# HTML documentation.
+
+GENERATE_QHP           = NO
+
+# If the QHG_LOCATION tag is specified, the QCH_FILE tag can 
+# be used to specify the file name of the resulting .qch file. 
+# The path specified is relative to the HTML output folder.
+
+QCH_FILE               = 
+
+# The QHP_NAMESPACE tag specifies the namespace to use when generating 
+# Qt Help Project output. For more information please see 
+# http://doc.trolltech.com/qthelpproject.html#namespace
+
+QHP_NAMESPACE          = org.doxygen.Project
+
+# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating 
+# Qt Help Project output. For more information please see 
+# http://doc.trolltech.com/qthelpproject.html#virtual-folders
+
+QHP_VIRTUAL_FOLDER     = doc
+
+# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to add. 
+# For more information please see 
+# http://doc.trolltech.com/qthelpproject.html#custom-filters
+
+QHP_CUST_FILTER_NAME   = 
+
+# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the custom filter to add.For more information please see 
+# <a href="http://doc.trolltech.com/qthelpproject.html#custom-filters">Qt Help Project / Custom Filters</a>.
+
+QHP_CUST_FILTER_ATTRS  = 
+
+# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this project's 
+# filter section matches. 
+# <a href="http://doc.trolltech.com/qthelpproject.html#filter-attributes">Qt Help Project / Filter Attributes</a>.
+
+QHP_SECT_FILTER_ATTRS  = 
+
+# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can 
+# be used to specify the location of Qt's qhelpgenerator. 
+# If non-empty doxygen will try to run qhelpgenerator on the generated 
+# .qhp file.
+
+QHG_LOCATION           = 
+
+# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files  
+# will be generated, which together with the HTML files, form an Eclipse help  
+# plugin. To install this plugin and make it available under the help contents 
+# menu in Eclipse, the contents of the directory containing the HTML and XML 
+# files needs to be copied into the plugins directory of eclipse. The name of 
+# the directory within the plugins directory should be the same as 
+# the ECLIPSE_DOC_ID value. After copying Eclipse needs to be restarted before
+# the help appears.
+
+GENERATE_ECLIPSEHELP   = NO
+
+# A unique identifier for the eclipse help plugin. When installing the plugin 
+# the directory name containing the HTML and XML files should also have 
+# this name.
+
+ECLIPSE_DOC_ID         = org.doxygen.Project
+
+# The DISABLE_INDEX tag can be used to turn on/off the condensed index at 
+# top of each HTML page. The value NO (the default) enables the index and 
+# the value YES disables it.
+
+DISABLE_INDEX          = NO
+
+# This tag can be used to set the number of enum values (range [1..20]) 
+# that doxygen will group on one line in the generated HTML documentation.
+
+ENUM_VALUES_PER_LINE   = 4
+
+# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index 
+# structure should be generated to display hierarchical information. 
+# If the tag value is set to YES, a side panel will be generated 
+# containing a tree-like index structure (just like the one that 
+# is generated for HTML Help). For this to work a browser that supports 
+# JavaScript, DHTML, CSS and frames is required (i.e. any modern browser). 
+# Windows users are probably better off using the HTML help feature.
+
+GENERATE_TREEVIEW      = NO
+
+# By enabling USE_INLINE_TREES, doxygen will generate the Groups, Directories, 
+# and Class Hierarchy pages using a tree view instead of an ordered list.
+
+USE_INLINE_TREES       = NO
+
+# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be 
+# used to set the initial width (in pixels) of the frame in which the tree 
+# is shown.
+
+TREEVIEW_WIDTH         = 250
+
+# Use this tag to change the font size of Latex formulas included 
+# as images in the HTML documentation. The default is 10. Note that 
+# when you change the font size after a successful doxygen run you need 
+# to manually remove any form_*.png images from the HTML output directory 
+# to force them to be regenerated.
+
+FORMULA_FONTSIZE       = 10
+
+# When the SEARCHENGINE tag is enabled doxygen will generate a search box
+# for the HTML output. The underlying search engine uses javascript 
+# and DHTML and should work on any modern browser. Note that when using
+# HTML help (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets
+# (GENERATE_DOCSET) there is already a search function so this one should 
+# typically be disabled. For large projects the javascript based search engine 
+# can be slow, then enabling SERVER_BASED_SEARCH may provide a better solution.
+
+SEARCHENGINE           = YES
+
+# When the SERVER_BASED_SEARCH tag is enabled the search engine will be
+# implemented using a PHP enabled web server instead of at the web client
+# using Javascript. Doxygen will generate the search PHP script and index 
+# file to put on the web server. The advantage of the server
+# based approach is that it scales better to large projects and allows
+# full text search. The disadvances is that it is more difficult to setup 
+# and does not have live searching capabilities.
+
+SERVER_BASED_SEARCH    = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the LaTeX output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will 
+# generate Latex output.
+
+GENERATE_LATEX         = YES
+
+# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `latex' will be used as the default path.
+
+LATEX_OUTPUT           = latex
+
+# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be 
+# invoked. If left blank `latex' will be used as the default command name. 
+# Note that when enabling USE_PDFLATEX this option is only used for 
+# generating bitmaps for formulas in the HTML output, but not in the 
+# Makefile that is written to the output directory.
+
+LATEX_CMD_NAME         = latex
+
+# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to 
+# generate index for LaTeX. If left blank `makeindex' will be used as the 
+# default command name.
+
+MAKEINDEX_CMD_NAME     = makeindex
+
+# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact 
+# LaTeX documents. This may be useful for small projects and may help to 
+# save some trees in general.
+
+COMPACT_LATEX          = NO
+
+# The PAPER_TYPE tag can be used to set the paper type that is used 
+# by the printer. Possible values are: a4, a4wide, letter, legal and 
+# executive. If left blank a4wide will be used.
+
+PAPER_TYPE             = a4wide
+
+# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX 
+# packages that should be included in the LaTeX output.
+
+EXTRA_PACKAGES         = 
+
+# The LATEX_HEADER tag can be used to specify a personal LaTeX header for 
+# the generated latex document. The header should contain everything until 
+# the first chapter. If it is left blank doxygen will generate a 
+# standard header. Notice: only use this tag if you know what you are doing!
+
+LATEX_HEADER           = 
+
+# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated 
+# is prepared for conversion to pdf (using ps2pdf). The pdf file will 
+# contain links (just like the HTML output) instead of page references 
+# This makes the output suitable for online browsing using a pdf viewer.
+
+PDF_HYPERLINKS         = YES
+
+# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of 
+# plain latex in the generated Makefile. Set this option to YES to get a 
+# higher quality PDF documentation.
+
+USE_PDFLATEX           = YES
+
+# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. 
+# command to the generated LaTeX files. This will instruct LaTeX to keep 
+# running if errors occur, instead of asking the user for help. 
+# This option is also used when generating formulas in HTML.
+
+LATEX_BATCHMODE        = NO
+
+# If LATEX_HIDE_INDICES is set to YES then doxygen will not 
+# include the index chapters (such as File Index, Compound Index, etc.) 
+# in the output.
+
+LATEX_HIDE_INDICES     = NO
+
+# If LATEX_SOURCE_CODE is set to YES then doxygen will include
+# source code with syntax highlighting in the LaTeX output.
+# Note that which sources are shown also depends on other settings
+# such as SOURCE_BROWSER.
+
+LATEX_SOURCE_CODE      = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the RTF output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output 
+# The RTF output is optimized for Word 97 and may not look very pretty with 
+# other RTF readers or editors.
+
+GENERATE_RTF           = NO
+
+# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `rtf' will be used as the default path.
+
+RTF_OUTPUT             = rtf
+
+# If the COMPACT_RTF tag is set to YES Doxygen generates more compact 
+# RTF documents. This may be useful for small projects and may help to 
+# save some trees in general.
+
+COMPACT_RTF            = NO
+
+# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated 
+# will contain hyperlink fields. The RTF file will 
+# contain links (just like the HTML output) instead of page references. 
+# This makes the output suitable for online browsing using WORD or other 
+# programs which support those fields. 
+# Note: wordpad (write) and others do not support links.
+
+RTF_HYPERLINKS         = NO
+
+# Load stylesheet definitions from file. Syntax is similar to doxygen's 
+# config file, i.e. a series of assignments. You only have to provide 
+# replacements, missing definitions are set to their default value.
+
+RTF_STYLESHEET_FILE    = 
+
+# Set optional variables used in the generation of an rtf document. 
+# Syntax is similar to doxygen's config file.
+
+RTF_EXTENSIONS_FILE    = 
+
+#---------------------------------------------------------------------------
+# configuration options related to the man page output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_MAN tag is set to YES (the default) Doxygen will 
+# generate man pages
+
+GENERATE_MAN           = NO
+
+# The MAN_OUTPUT tag is used to specify where the man pages will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `man' will be used as the default path.
+
+MAN_OUTPUT             = man
+
+# The MAN_EXTENSION tag determines the extension that is added to 
+# the generated man pages (default is the subroutine's section .3)
+
+MAN_EXTENSION          = .3
+
+# If the MAN_LINKS tag is set to YES and Doxygen generates man output, 
+# then it will generate one additional man file for each entity 
+# documented in the real man page(s). These additional files 
+# only source the real man page, but without them the man command 
+# would be unable to find the correct page. The default is NO.
+
+MAN_LINKS              = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the XML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_XML tag is set to YES Doxygen will 
+# generate an XML file that captures the structure of 
+# the code including all documentation.
+
+GENERATE_XML           = NO
+
+# The XML_OUTPUT tag is used to specify where the XML pages will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `xml' will be used as the default path.
+
+XML_OUTPUT             = xml
+
+# The XML_SCHEMA tag can be used to specify an XML schema, 
+# which can be used by a validating XML parser to check the 
+# syntax of the XML files.
+
+XML_SCHEMA             = 
+
+# The XML_DTD tag can be used to specify an XML DTD, 
+# which can be used by a validating XML parser to check the 
+# syntax of the XML files.
+
+XML_DTD                = 
+
+# If the XML_PROGRAMLISTING tag is set to YES Doxygen will 
+# dump the program listings (including syntax highlighting 
+# and cross-referencing information) to the XML output. Note that 
+# enabling this will significantly increase the size of the XML output.
+
+XML_PROGRAMLISTING     = YES
+
+#---------------------------------------------------------------------------
+# configuration options for the AutoGen Definitions output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will 
+# generate an AutoGen Definitions (see autogen.sf.net) file 
+# that captures the structure of the code including all 
+# documentation. Note that this feature is still experimental 
+# and incomplete at the moment.
+
+GENERATE_AUTOGEN_DEF   = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the Perl module output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_PERLMOD tag is set to YES Doxygen will 
+# generate a Perl module file that captures the structure of 
+# the code including all documentation. Note that this 
+# feature is still experimental and incomplete at the 
+# moment.
+
+GENERATE_PERLMOD       = NO
+
+# If the PERLMOD_LATEX tag is set to YES Doxygen will generate 
+# the necessary Makefile rules, Perl scripts and LaTeX code to be able 
+# to generate PDF and DVI output from the Perl module output.
+
+PERLMOD_LATEX          = NO
+
+# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be 
+# nicely formatted so it can be parsed by a human reader.  This is useful 
+# if you want to understand what is going on.  On the other hand, if this 
+# tag is set to NO the size of the Perl module output will be much smaller 
+# and Perl will parse it just the same.
+
+PERLMOD_PRETTY         = YES
+
+# The names of the make variables in the generated doxyrules.make file 
+# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. 
+# This is useful so different doxyrules.make files included by the same 
+# Makefile don't overwrite each other's variables.
+
+PERLMOD_MAKEVAR_PREFIX = 
+
+#---------------------------------------------------------------------------
+# Configuration options related to the preprocessor
+#---------------------------------------------------------------------------
+
+# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will 
+# evaluate all C-preprocessor directives found in the sources and include 
+# files.
+
+ENABLE_PREPROCESSING   = YES
+
+# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro 
+# names in the source code. If set to NO (the default) only conditional 
+# compilation will be performed. Macro expansion can be done in a controlled 
+# way by setting EXPAND_ONLY_PREDEF to YES.
+
+MACRO_EXPANSION        = NO
+
+# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES 
+# then the macro expansion is limited to the macros specified with the 
+# PREDEFINED and EXPAND_AS_DEFINED tags.
+
+EXPAND_ONLY_PREDEF     = NO
+
+# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files 
+# in the INCLUDE_PATH (see below) will be search if a #include is found.
+
+SEARCH_INCLUDES        = YES
+
+# The INCLUDE_PATH tag can be used to specify one or more directories that 
+# contain include files that are not input files but should be processed by 
+# the preprocessor.
+
+INCLUDE_PATH           = 
+
+# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard 
+# patterns (like *.h and *.hpp) to filter out the header-files in the 
+# directories. If left blank, the patterns specified with FILE_PATTERNS will 
+# be used.
+
+INCLUDE_FILE_PATTERNS  = 
+
+# The PREDEFINED tag can be used to specify one or more macro names that 
+# are defined before the preprocessor is started (similar to the -D option of 
+# gcc). The argument of the tag is a list of macros of the form: name 
+# or name=definition (no spaces). If the definition and the = are 
+# omitted =1 is assumed. To prevent a macro definition from being 
+# undefined via #undef or recursively expanded use the := operator 
+# instead of the = operator.
+
+PREDEFINED             = 
+
+# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then 
+# this tag can be used to specify a list of macro names that should be expanded. 
+# The macro definition that is found in the sources will be used. 
+# Use the PREDEFINED tag if you want to use a different macro definition.
+
+EXPAND_AS_DEFINED      = 
+
+# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then 
+# doxygen's preprocessor will remove all function-like macros that are alone 
+# on a line, have an all uppercase name, and do not end with a semicolon. Such 
+# function macros are typically used for boiler-plate code, and will confuse 
+# the parser if not removed.
+
+SKIP_FUNCTION_MACROS   = YES
+
+#---------------------------------------------------------------------------
+# Configuration::additions related to external references
+#---------------------------------------------------------------------------
+
+# The TAGFILES option can be used to specify one or more tagfiles. 
+# Optionally an initial location of the external documentation 
+# can be added for each tagfile. The format of a tag file without 
+# this location is as follows: 
+#   TAGFILES = file1 file2 ... 
+# Adding location for the tag files is done as follows: 
+#   TAGFILES = file1=loc1 "file2 = loc2" ... 
+# where "loc1" and "loc2" can be relative or absolute paths or 
+# URLs. If a location is present for each tag, the installdox tool 
+# does not have to be run to correct the links. 
+# Note that each tag file must have a unique name 
+# (where the name does NOT include the path) 
+# If a tag file is not located in the directory in which doxygen 
+# is run, you must also specify the path to the tagfile here.
+
+TAGFILES               = 
+
+# When a file name is specified after GENERATE_TAGFILE, doxygen will create 
+# a tag file that is based on the input files it reads.
+
+GENERATE_TAGFILE       = 
+
+# If the ALLEXTERNALS tag is set to YES all external classes will be listed 
+# in the class index. If set to NO only the inherited external classes 
+# will be listed.
+
+ALLEXTERNALS           = NO
+
+# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed 
+# in the modules index. If set to NO, only the current project's groups will 
+# be listed.
+
+EXTERNAL_GROUPS        = YES
+
+# The PERL_PATH should be the absolute path and name of the perl script 
+# interpreter (i.e. the result of `which perl').
+
+PERL_PATH              = /usr/bin/perl
+
+#---------------------------------------------------------------------------
+# Configuration options related to the dot tool
+#---------------------------------------------------------------------------
+
+# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will 
+# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base 
+# or super classes. Setting the tag to NO turns the diagrams off. Note that 
+# this option is superseded by the HAVE_DOT option below. This is only a 
+# fallback. It is recommended to install and use dot, since it yields more 
+# powerful graphs.
+
+CLASS_DIAGRAMS         = YES
+
+# You can define message sequence charts within doxygen comments using the \msc 
+# command. Doxygen will then run the mscgen tool (see 
+# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the 
+# documentation. The MSCGEN_PATH tag allows you to specify the directory where 
+# the mscgen tool resides. If left empty the tool is assumed to be found in the 
+# default search path.
+
+MSCGEN_PATH            = "C:\Program Files\mscgen\bin"
+
+# If set to YES, the inheritance and collaboration graphs will hide 
+# inheritance and usage relations if the target is undocumented 
+# or is not a class.
+
+HIDE_UNDOC_RELATIONS   = YES
+
+# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is 
+# available from the path. This tool is part of Graphviz, a graph visualization 
+# toolkit from AT&T and Lucent Bell Labs. The other options in this section 
+# have no effect if this option is set to NO (the default)
+
+HAVE_DOT               = YES
+
+# By default doxygen will write a font called FreeSans.ttf to the output 
+# directory and reference it in all dot files that doxygen generates. This 
+# font does not include all possible unicode characters however, so when you need 
+# these (or just want a differently looking font) you can specify the font name 
+# using DOT_FONTNAME. You need need to make sure dot is able to find the font, 
+# which can be done by putting it in a standard location or by setting the 
+# DOTFONTPATH environment variable or by setting DOT_FONTPATH to the directory 
+# containing the font.
+
+DOT_FONTNAME           = FreeSans
+
+# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs. 
+# The default size is 10pt.
+
+DOT_FONTSIZE           = 10
+
+# By default doxygen will tell dot to use the output directory to look for the 
+# FreeSans.ttf font (which doxygen will put there itself). If you specify a 
+# different font using DOT_FONTNAME you can set the path where dot 
+# can find it using this tag.
+
+DOT_FONTPATH           = 
+
+# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen 
+# will generate a graph for each documented class showing the direct and 
+# indirect inheritance relations. Setting this tag to YES will force the 
+# the CLASS_DIAGRAMS tag to NO.
+
+CLASS_GRAPH            = YES
+
+# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen 
+# will generate a graph for each documented class showing the direct and 
+# indirect implementation dependencies (inheritance, containment, and 
+# class references variables) of the class with other documented classes.
+
+COLLABORATION_GRAPH    = YES
+
+# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen 
+# will generate a graph for groups, showing the direct groups dependencies
+
+GROUP_GRAPHS           = YES
+
+# If the UML_LOOK tag is set to YES doxygen will generate inheritance and 
+# collaboration diagrams in a style similar to the OMG's Unified Modeling 
+# Language.
+
+UML_LOOK               = YES
+
+# If set to YES, the inheritance and collaboration graphs will show the 
+# relations between templates and their instances.
+
+TEMPLATE_RELATIONS     = YES
+
+# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT 
+# tags are set to YES then doxygen will generate a graph for each documented 
+# file showing the direct and indirect include dependencies of the file with 
+# other documented files.
+
+INCLUDE_GRAPH          = YES
+
+# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and 
+# HAVE_DOT tags are set to YES then doxygen will generate a graph for each 
+# documented header file showing the documented files that directly or 
+# indirectly include this file.
+
+INCLUDED_BY_GRAPH      = YES
+
+# If the CALL_GRAPH and HAVE_DOT options are set to YES then 
+# doxygen will generate a call dependency graph for every global function 
+# or class method. Note that enabling this option will significantly increase 
+# the time of a run. So in most cases it will be better to enable call graphs 
+# for selected functions only using the \callgraph command.
+
+CALL_GRAPH             = YES
+
+# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then 
+# doxygen will generate a caller dependency graph for every global function 
+# or class method. Note that enabling this option will significantly increase 
+# the time of a run. So in most cases it will be better to enable caller 
+# graphs for selected functions only using the \callergraph command.
+
+CALLER_GRAPH           = YES
+
+# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen 
+# will graphical hierarchy of all classes instead of a textual one.
+
+GRAPHICAL_HIERARCHY    = YES
+
+# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES 
+# then doxygen will show the dependencies a directory has on other directories 
+# in a graphical way. The dependency relations are determined by the #include 
+# relations between the files in the directories.
+
+DIRECTORY_GRAPH        = YES
+
+# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images 
+# generated by dot. Possible values are png, jpg, or gif 
+# If left blank png will be used.
+
+DOT_IMAGE_FORMAT       = png
+
+# The tag DOT_PATH can be used to specify the path where the dot tool can be 
+# found. If left blank, it is assumed the dot tool can be found in the path.
+
+DOT_PATH               = "C:\Program Files\Graphviz2.26.3\bin"
+
+# The DOTFILE_DIRS tag can be used to specify one or more directories that 
+# contain dot files that are included in the documentation (see the 
+# \dotfile command).
+
+DOTFILE_DIRS           = 
+
+# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of 
+# nodes that will be shown in the graph. If the number of nodes in a graph 
+# becomes larger than this value, doxygen will truncate the graph, which is 
+# visualized by representing a node as a red box. Note that doxygen if the 
+# number of direct children of the root node in a graph is already larger than 
+# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note 
+# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH.
+
+DOT_GRAPH_MAX_NODES    = 50
+
+# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the 
+# graphs generated by dot. A depth value of 3 means that only nodes reachable 
+# from the root by following a path via at most 3 edges will be shown. Nodes 
+# that lay further from the root node will be omitted. Note that setting this 
+# option to 1 or 2 may greatly reduce the computation time needed for large 
+# code bases. Also note that the size of a graph can be further restricted by 
+# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction.
+
+MAX_DOT_GRAPH_DEPTH    = 8
+
+# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent 
+# background. This is disabled by default, because dot on Windows does not 
+# seem to support this out of the box. Warning: Depending on the platform used, 
+# enabling this option may lead to badly anti-aliased labels on the edges of 
+# a graph (i.e. they become hard to read).
+
+DOT_TRANSPARENT        = NO
+
+# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output 
+# files in one run (i.e. multiple -o and -T options on the command line). This 
+# makes dot run faster, but since only newer versions of dot (>1.8.10) 
+# support this, this feature is disabled by default.
+
+DOT_MULTI_TARGETS      = NO
+
+# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will 
+# generate a legend page explaining the meaning of the various boxes and 
+# arrows in the dot generated graphs.
+
+GENERATE_LEGEND        = YES
+
+# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will 
+# remove the intermediate dot files that are used to generate 
+# the various graphs.
+
+DOT_CLEANUP            = YES
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/smf/smfcredentialmgr/smfcredentialmgr.loc	Wed Jun 23 19:51:49 2010 +0530
@@ -0,0 +1,13 @@
+// ============================================================================
+// * Generated by qmake (2.01a) (Qt 4.6.2) on: 2010-06-21T23:34:34
+// * This file is generated by qmake and should not be modified by the
+// * user.
+// ============================================================================
+
+#ifdef LANGUAGE_SC
+#define STRING_r_short_caption "smfcredentialmgr"
+#define STRING_r_caption "smfcredentialmgr"
+#else
+#define STRING_r_short_caption "smfcredentialmgr"
+#define STRING_r_caption "smfcredentialmgr"
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/smf/smfcredentialmgr/smfcredentialmgr.pro	Wed Jun 23 19:51:49 2010 +0530
@@ -0,0 +1,15 @@
+######################################################################
+#/*
+#========================================================================
+# Name        : smfcredentialmgr.pro
+# Author      : Pritam Roy Biswas
+# Copyright   : Copyright (c) 2009-2010, Sasken Communication Technologies Ltd.
+# Description : 
+#========================================================================
+# */
+######################################################################
+
+TEMPLATE = subdirs
+SUBDIRS  = smfcredmgrcommon smfcredmgrclient smfcredmgrserver
+CONFIG += ordered
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/smf/smfcredentialmgr/smfcredentialmgr.rss	Wed Jun 23 19:51:49 2010 +0530
@@ -0,0 +1,21 @@
+// ============================================================================
+// * Generated by qmake (2.01a) (Qt 4.6.2) on: 2010-06-21T23:34:34
+// * This file is generated by qmake and should not be modified by the
+// * user.
+// ============================================================================
+
+#include <appinfo.rh>
+#include "smfcredentialmgr.loc"
+
+RESOURCE LOCALISABLE_APP_INFO r_localisable_app_info
+	{
+	short_caption = STRING_r_short_caption;
+	caption_and_icon =
+	CAPTION_AND_ICON_INFO
+		{
+		caption = STRING_r_caption;
+		number_of_icons = 0;
+		icon_file = "";
+		};
+	}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/smf/smfcredentialmgr/smfcredentialmgr_installer.pkg	Wed Jun 23 19:51:49 2010 +0530
@@ -0,0 +1,28 @@
+; smfcredentialmgr_installer.pkg generated by qmake at 2010-06-21T23:34:34
+; This file is generated by qmake and should not be modified by the user
+;
+
+; Language
+&EN
+
+; SIS header: name, uid, version
+#{"smfcredentialmgr installer"},(0xA000D7CE),1,0,0
+
+; Localised Vendor name
+%{"Vendor"}
+
+; Unique Vendor name
+:"Vendor"
+
+
+; Manual PKG pre-rules from PRO files
+; Default HW/platform dependencies
+[0x101F7961],0,0,0,{"S60ProductID"}
+[0x102032BE],0,0,0,{"S60ProductID"}
+[0x102752AE],0,0,0,{"S60ProductID"}
+[0x1028315F],0,0,0,{"S60ProductID"}
+ 
+
+
+"C:/Symbian/Carbide/smf_hg_21june/smfrepo/smfrepo/smf/smfcredentialmgr/smfcredentialmgr.sis" - "c:\adm\smfcredentialmgr.sis"
+@"C:/Qt/4.6.2/smartinstaller.sis",(0x2002CCCD)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/smf/smfcredentialmgr/smfcredentialmgr_reg.rss	Wed Jun 23 19:51:49 2010 +0530
@@ -0,0 +1,18 @@
+// ============================================================================
+// * Generated by qmake (2.01a) (Qt 4.6.2) on: 2010-06-21T23:34:34
+// * This file is generated by qmake and should not be modified by the
+// * user.
+// ============================================================================
+
+#include <smfcredentialmgr.rsg>
+#include <appinfo.rh>
+
+UID2 KUidAppRegistrationResourceFile
+UID3 0xEb5f47a6
+
+RESOURCE APP_REGISTRATION_INFO
+	{
+	app_file="smfcredentialmgr";
+	localisable_resource_file="\\resource\\apps\\smfcredentialmgr";
+
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/smf/smfcredentialmgr/smfcredentialmgr_template.pkg	Wed Jun 23 19:51:49 2010 +0530
@@ -0,0 +1,31 @@
+; smfcredentialmgr_template.pkg generated by qmake at 2010-06-21T23:34:34
+; This file is generated by qmake and should not be modified by the user
+;
+
+; Language
+&EN
+
+; SIS header: name, uid, version
+#{"smfcredentialmgr"},(0xEb5f47a6),1,0,0
+
+; Localised Vendor name
+%{"Vendor"}
+
+; Unique Vendor name
+:"Vendor"
+
+
+; Manual PKG pre-rules from PRO files
+; Default HW/platform dependencies
+[0x101F7961],0,0,0,{"S60ProductID"}
+[0x102032BE],0,0,0,{"S60ProductID"}
+[0x102752AE],0,0,0,{"S60ProductID"}
+[0x1028315F],0,0,0,{"S60ProductID"}
+ 
+
+; Executable and default resource files
+"/Symbian/Nokia_Symbian3_SDK_v0.8_2/epoc32/release/$(PLATFORM)/$(TARGET)/smfcredentialmgr.exe"    - "!:\sys\bin\smfcredentialmgr.exe"
+"/Symbian/Nokia_Symbian3_SDK_v0.8_2/epoc32/data/z/resource/apps/smfcredentialmgr.rsc"    - "!:\resource\apps\smfcredentialmgr.rsc"
+"/Symbian/Nokia_Symbian3_SDK_v0.8_2/epoc32/data/z/private/10003a3f/import/apps/smfcredentialmgr_reg.rsc"    - "!:\private\10003a3f\import\apps\smfcredentialmgr_reg.rsc"
+
+; Manual PKG post-rules from PRO files
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/smf/smfcredentialmgr/smfcredmgrclient/bwins/smfcredmgrclientu.def	Wed Jun 23 19:51:49 2010 +0530
@@ -0,0 +1,14 @@
+EXPORTS
+	?DeleteRSAKey@SmfCredMgrClient@@QAEXVQString@@@Z @ 1 NONAME ; void SmfCredMgrClient::DeleteRSAKey(class QString)
+	?URLList@SmfCredMgrClient@@QBE?AV?$QList@VQUrl@@@@VQString@@@Z @ 2 NONAME ; class QList<class QUrl> SmfCredMgrClient::URLList(class QString) const
+	?GenerateNONCE@SmfCredMgrClient@@QAE?AVQString@@_J@Z @ 3 NONAME ; class QString SmfCredMgrClient::GenerateNONCE(long long)
+	?AuthDataSet@SmfCredMgrClient@@QBE_NVQString@@VQDateTime@@AAV?$QMap@VQByteArray@@V1@@@@Z @ 4 NONAME ; bool SmfCredMgrClient::AuthDataSet(class QString, class QDateTime, class QMap<class QByteArray, class QByteArray> &) const
+	?SignMessage@SmfCredMgrClient@@QAE?AW4SMFCredMgrErrorCode@@VQString@@0AAV3@W4SmfSignatureMethod@@@Z @ 5 NONAME ; enum SMFCredMgrErrorCode SmfCredMgrClient::SignMessage(class QString, class QString, class QString &, enum SmfSignatureMethod)
+	?CheckPluginAuthentication@SmfCredMgrClient@@QBE_NVQString@@@Z @ 6 NONAME ; bool SmfCredMgrClient::CheckPluginAuthentication(class QString) const
+	??1SmfCredMgrClient@@UAE@XZ @ 7 NONAME ; SmfCredMgrClient::~SmfCredMgrClient(void)
+	?StoreAuthData@SmfCredMgrClient@@QAE?AVQString@@V?$QMap@VQByteArray@@V1@@@VQDateTime@@V?$QList@VQUrl@@@@VQStringList@@V2@_N@Z @ 8 NONAME ; class QString SmfCredMgrClient::StoreAuthData(class QMap<class QByteArray, class QByteArray>, class QDateTime, class QList<class QUrl>, class QStringList, class QString, bool)
+	?ChangePluginIDList@SmfCredMgrClient@@QAEXVQString@@_N0@Z @ 9 NONAME ; void SmfCredMgrClient::ChangePluginIDList(class QString, bool, class QString)
+	?AuthenticatedPluginList@SmfCredMgrClient@@QBE?AVQStringList@@VQString@@@Z @ 10 NONAME ; class QStringList SmfCredMgrClient::AuthenticatedPluginList(class QString) const
+	??0SmfCredMgrClient@@QAE@PAVQObject@@@Z @ 11 NONAME ; SmfCredMgrClient::SmfCredMgrClient(class QObject *)
+	?StoreRSAKeys@SmfCredMgrClient@@QAE?AVQString@@V2@0VQDateTime@@@Z @ 12 NONAME ; class QString SmfCredMgrClient::StoreRSAKeys(class QString, class QString, class QDateTime)
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/smf/smfcredentialmgr/smfcredmgrclient/smfcredmgrclient.cpp	Wed Jun 23 19:51:49 2010 +0530
@@ -0,0 +1,148 @@
+/**
+ * Copyright (c) 2010 Sasken Communication Technologies Ltd.
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of the "Eclipse Public License v1.0"
+ * which accompanies  this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html"
+ *
+ * Initial Contributors:
+ * Pritam Roy Biswas, Sasken Communication Technologies Ltd - Initial contribution
+ *
+ * Description:
+ * This is the public implementation Class(Qt wrapper) for symbian client for Credential Manager server
+ *
+ */
+#include "smfcredmgrclient.h"
+#include "smfcredmgrclient_p.h"
+
+SmfCredMgrClient::SmfCredMgrClient(QObject* Parent) :
+	QObject(Parent)
+	{
+	//Symbian specific compilation
+#ifdef Q_OS_SYMBIAN 
+	QT_TRAP_THROWING(m_SmfClientPrivate = CSmfCredMgrClientSymbian::NewL(this));
+#else    
+	m_SmfClientPrivate = new SmfCredMgrClientStub(this);
+#endif
+	}
+SmfCredMgrClient::~SmfCredMgrClient()
+	{
+	delete m_SmfClientPrivate;
+	}
+
+QString SmfCredMgrClient::StoreAuthData(SmfAuthParams Set, QDateTime Validity,
+		QList<QUrl> URLList, QStringList PluginList, QString AuthAppId,
+		bool Flag)
+	{
+	if (!(Set.isEmpty() || URLList.isEmpty() || PluginList.isEmpty()
+			|| AuthAppId.isEmpty() || Validity.isNull()))
+		{
+		return (m_SmfClientPrivate->storeAuthDataL(Set, Validity, URLList,
+				PluginList, AuthAppId, Flag));
+		}
+	else
+		{
+		return NULL;
+		}
+	}
+
+QStringList SmfCredMgrClient::AuthenticatedPluginList(QString RegistrationToken) const
+	{
+	QStringList List;
+	if (RegistrationToken.isEmpty())
+		{
+		//return the empty list
+		return List;
+		}
+	else
+		{
+		m_SmfClientPrivate->authenticatedPluginListL(RegistrationToken, List);
+		return List;
+		}
+	
+	}
+
+QList<QUrl> SmfCredMgrClient::URLList(QString PluginID) const
+	{
+	QList<QUrl> List;
+	if (!(PluginID.isEmpty()))
+		{
+		m_SmfClientPrivate->URLListL(PluginID, List);
+		}
+	return List;
+	}
+
+QString SmfCredMgrClient::GenerateNONCE(const qint64 Length)
+	{
+	return m_SmfClientPrivate->generateNONCE(Length);
+	}
+
+void SmfCredMgrClient::ChangePluginIDList(QString NewPluginID, bool Flag,
+		QString OldPluginID)
+	{
+	if (!(OldPluginID.isEmpty() || NewPluginID.isEmpty()))
+		{
+		m_SmfClientPrivate->changePluginIDListL(NewPluginID, Flag, OldPluginID);
+		}
+	}
+
+bool SmfCredMgrClient::CheckPluginAuthentication(QString PluginID) const
+	{
+	if (!(PluginID.isEmpty()))
+		{
+		return (m_SmfClientPrivate->isPluginAuthenticatedL(PluginID));
+		}
+	else
+		{
+		return false;
+		}
+	}
+
+bool SmfCredMgrClient::AuthDataSet(QString RegToken, QDateTime Validity,
+		SmfAuthParams& AuthTokenSet) const
+	{
+	if (!(RegToken.isEmpty() || Validity.isNull()))
+		{
+		if (m_SmfClientPrivate->AuthDataSetL(RegToken, Validity, AuthTokenSet))
+			return true;
+		}
+	else
+		{
+		AuthTokenSet.clear();
+		return false;
+		}
+	}
+
+QString SmfCredMgrClient::StoreRSAKeys(const QString KeyLabel,
+		const QString keydata, const QDateTime Validity)
+	{
+	if (!(KeyLabel.isEmpty() || keydata.isEmpty()) && Validity.isValid())
+		{
+		return (m_SmfClientPrivate->storeRSAKeysL(KeyLabel, keydata, Validity));
+		}
+	else
+		{
+		return NULL;
+		}
+	}
+SMFCredMgrErrorCode SmfCredMgrClient::SignMessage(QString Message, QString Key,
+		QString& Signature, SmfSignatureMethod AlgorithmUsed)
+	{
+	if (!(Message.isEmpty() || Key.isEmpty()))
+		return (m_SmfClientPrivate->signMessageL(Message, Key, Signature,
+				AlgorithmUsed));
+
+	else
+		{
+		return SmfErrBadParameter;
+		}
+	}
+
+void SmfCredMgrClient::DeleteRSAKey(QString KeyLabel)
+	{
+	if (!(KeyLabel.isEmpty()))
+		{
+		m_SmfClientPrivate->deleteRSAKey(KeyLabel);
+		}
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/smf/smfcredentialmgr/smfcredmgrclient/smfcredmgrclient.h	Wed Jun 23 19:51:49 2010 +0530
@@ -0,0 +1,164 @@
+/**
+ * Copyright (c) 2010 Sasken Communication Technologies Ltd.
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of the "Eclipse Public License v1.0"
+ * which accompanies  this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html"
+ *
+ * Initial Contributors:
+ * Pritam Roy Biswas, Sasken Communication Technologies Ltd - Initial contribution
+ *
+ * Description:
+ * This is the public implementation Class(Qt-wrapper) for symbian client for Credential Manager server
+ *
+ */
+
+#ifndef SMFCREDMGRCLIENT_H_
+#define SMFCREDMGRCLIENT_H_
+
+#include <QObject>
+#include <QUrl>
+#include <QDateTime>
+#include <QStringList>
+
+#ifdef Q_OS_SYMBIAN
+#include <smfcredmgrcommon.h>
+#include <smfcredmgrclientglobal.h>
+#endif
+//Private implementation for different platforms
+#ifdef Q_OS_SYMBIAN
+class CSmfCredMgrClientSymbian;
+class RSmfCredMgrClientSession;
+#else
+class SmfCredMgrClientStub;
+class SmfCredMgrClientStubSession;
+#endif
+
+/**
+ * Qt wrapper class for for exporting APIs of Credential Manager server
+ */
+class SmfCredMgrClient : public QObject
+	{
+	//Q_OBJECT -- todo used when signal and slots implemented
+public:
+
+	/**
+	 * Constructor
+	 */
+	SmfCredMgrClient_EXPORT SmfCredMgrClient(QObject* parent = 0);
+
+	/**
+	 * Destructor
+	 */
+	SmfCredMgrClient_EXPORT ~SmfCredMgrClient();
+
+public:
+
+	/**
+	 * API to check plugin authentication
+	 * @param PluginID The ID of the Plugin to be checked
+	 * @return The boolean value-TRUE if authenticated, FALSE if not
+	 */
+	SmfCredMgrClient_EXPORT bool
+	CheckPluginAuthentication(QString PluginID) const;
+
+	/**
+	 * API to get the Auth Data set, eg:OAuth_RequestToken; OAuth_AccessToken
+	 * @param RegToken Registration Token obtained from SMF while storing this Auth Data set
+	 * @param Validity Time by which the Auth set will expire
+	 * @param AuthDataSet The Auth Token Set for the plugin, this Api would fill this parameter
+	 *   so the caller of The API must create space for SmfAuthParams
+	 * @return boolean Value if the reg token is still valid
+	 */
+	SmfCredMgrClient_EXPORT bool AuthDataSet(QString RegToken,
+			QDateTime Validity, SmfAuthParams& AuthDataSet) const;
+
+	/**
+	 * API to get list of URLs which plugin can access
+	 * @param PluginID The ID of the Plugin whose corresponding list of URLs to be retrieved
+	 * @return The URL list
+	 */
+	SmfCredMgrClient_EXPORT QList<QUrl> URLList(QString PluginID) const;
+
+	/**
+	 * API to get the list of authenticated plugins
+	 * @param RegistrationToken The token that validates a list of such plugins.
+	 * @return The list of authenticated plugins
+	 */
+	SmfCredMgrClient_EXPORT QStringList AuthenticatedPluginList(
+			QString RegistrationToken) const;
+
+	/**
+	 * API to generate NONCE token
+	 * @param Length Lenth of the NONCE tobe generated
+	 * @return The generated NONCE. This is never zero, the minimum length is 12.
+	 */
+	SmfCredMgrClient_EXPORT QString GenerateNONCE(const qint64 Length);
+
+	/**
+	 * API to update the list of authenticated plugins-add, remove, update to plugins
+	 * @param NewPluginID ID of the new plugin 
+	 * @param Flag flag to enable or disable the plugin
+	 * @param OldPluginID ID of the old plugin to be replaced
+	 * @todo - should return an error code to indicate error while changing the list.
+	 */
+	SmfCredMgrClient_EXPORT void ChangePluginIDList(QString NewPluginID,
+			bool Flag, QString OldPluginID);
+	/**
+	 * API to store all data related to an auth app i.e URL list for Plugins, List of Plugins.etc.
+	 * @param Set The auth Key set
+	 * @param Validity time by which the Auth set will expire
+	 * @param URLList The URL list to be set
+	 * @param PluginList The plugin list to be set
+	 * @param AuthAppId The Authentication Application Id
+	 * @param Flag flag to enable or disable the plugins
+	 * @return The registration token that completes authentication, its a NULL string if the 
+	 *   API fails due to any wrong argument
+	 */
+	SmfCredMgrClient_EXPORT QString StoreAuthData(SmfAuthParams Set,
+			QDateTime Validity, QList<QUrl> URLList, QStringList PluginList,
+			QString AuthAppId, bool Flag);
+
+	/**
+	 * API to store RSA Keys
+	 * @param KeyLabel First key of the key pair
+	 * @param Keydata  Other key of the key pair
+	 * @param Validity time by which the key set will expire
+	 * @return The Label of key pair
+	 */
+	SmfCredMgrClient_EXPORT QString StoreRSAKeys(const QString KeyLabel,
+			const QString Keydata, const QDateTime Validity);
+
+	/**
+	 * API to Sign the message
+	 * @param Message The message to be signed
+	 * @param Key If Signature method is RSA-SHA1 then it must be equal to the value
+	 * 				returned while storeRSAKeys(), if signature method is HMAC-SHA1 key
+	 * 				must the value to sign the message with
+	 * @param Signature The signed message is an output argument
+	 * @param AlgorithmUsed The algorithm used for signing
+	 * return Smf defined errorcode
+	 * @todo - RSA Signing is falgged-put for time being. 
+	 */
+	SmfCredMgrClient_EXPORT SMFCredMgrErrorCode SignMessage(QString Message,
+			QString Key, QString& Signature, SmfSignatureMethod AlgorithmUsed);
+	/**
+	 * API To delete the RSA Key from the Key Store 
+	 * @param KeyLabel The Label of key pair. This is the value returned while StoreRSAKeys().
+	 */
+	SmfCredMgrClient_EXPORT void DeleteRSAKey(QString KeyLabel);
+
+private:
+	/**
+	 * Handle to private implementation class.
+	 */
+#ifdef Q_OS_SYMBIAN
+	CSmfCredMgrClientSymbian* m_SmfClientPrivate;
+	friend class CSmfCredMgrClientSymbian;
+#endif
+
+	};
+
+#endif /* SMFCREDMGRCLIENT_H_ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/smf/smfcredentialmgr/smfcredmgrclient/smfcredmgrclient.pro	Wed Jun 23 19:51:49 2010 +0530
@@ -0,0 +1,37 @@
+# ##############################################################################
+# /*
+# ========================================================================
+# Name : smfcredmgrclient.pro
+# Author : Pritam Roy Biswas
+# Copyright : Copyright (c) 2009-2010, Sasken Communication Technologies Ltd.
+# Description :
+# ========================================================================
+# */
+# ###############################################################################
+QT += network
+TARGET = smfcredmgrclient
+TEMPLATE = lib
+CONFIG += precompile_header
+DEFINES += SMFCREDMGRCLIENT_LIBRARY \
+	Q_OS_SYMBIAN
+INCLUDEPATH += . \
+    
+SOURCES += smfcredmgrclient.cpp \
+    smfcredmgrclientutil.cpp
+HEADERS += smfcredmgrclient.h \
+    smfcredmgrclientutil.h
+symbian { 
+    TARGET.UID3 = 0xEd21cfd3
+    SOURCES += smfcredmgrclient_p.cpp \
+        smfcredmgrclientsession.cpp
+        
+    HEADERS += smfcredmgrclient_p.h \
+        smfcredmgrclientsession.h 
+     
+    BLD_INF_RULES.prj_exports += smfcredmgrclient.h
+}
+symbian::LIBS += -leuser \
+    -lestor \
+    -lefsrv \
+     -lsmfcredmgrcommon
+    
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/smf/smfcredentialmgr/smfcredmgrclient/smfcredmgrclient_p.cpp	Wed Jun 23 19:51:49 2010 +0530
@@ -0,0 +1,519 @@
+/**
+ * Copyright (c) 2010 Sasken Communication Technologies Ltd.
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of the "Eclipse Public License v1.0"
+ * which accompanies  this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html"
+ *
+ * Initial Contributors:
+ * Pritam Roy Biswas, Sasken Communication Technologies Ltd - Initial contribution
+ *
+ * Description:
+ * This is the private implementation Class on Symbian OS for Credential Manager Client.
+ *  Derives from CAtive to support asynchronous requests.
+ *
+ */
+//  Include Files
+#include <smfcredmgrcommon.h>
+#include <smfcredmgrclientdatastruct.h>
+#include <smfutils.h>
+#include <securitydefs.h>
+#include "smfcredmgrclientutil.h"
+#include "smfcredmgrclient_p.h"
+
+CSmfCredMgrClientSymbian::CSmfCredMgrClientSymbian(
+		SmfCredMgrClient* aPublicImpl) :
+	iPublicImpl(aPublicImpl), CActive(EPriorityStandard)
+	{
+
+	}
+
+CSmfCredMgrClientSymbian* CSmfCredMgrClientSymbian::NewL(
+		SmfCredMgrClient* aPublicImpl)
+	{
+	CSmfCredMgrClientSymbian* self = NewLC(aPublicImpl);
+	CleanupStack::Pop(self);
+	return (self);
+	}
+
+CSmfCredMgrClientSymbian* CSmfCredMgrClientSymbian::NewLC(
+		SmfCredMgrClient* aPublicImpl)
+	{
+	CSmfCredMgrClientSymbian* self = new (ELeave) CSmfCredMgrClientSymbian(
+			aPublicImpl);
+	CleanupStack::PushL(self);
+	self->ConstructL();
+	return (self);
+	}
+
+void CSmfCredMgrClientSymbian::ConstructL()
+	{
+	User::LeaveIfError(iSession.connectToServer());
+	}
+
+CSmfCredMgrClientSymbian::~CSmfCredMgrClientSymbian()
+	{
+	//cancel pending request before close session
+	Cancel();
+	iSession.Close();
+	}
+
+void CSmfCredMgrClientSymbian::RunL()
+	{
+
+	}
+
+void CSmfCredMgrClientSymbian::DoCancel()
+	{
+
+	}
+
+TBool CSmfCredMgrClientSymbian::AuthDataSetL(QString RegToken,
+		QDateTime Validity, SmfAuthParams& AuthTokenSet)
+	{
+	CSmfFetchAuthTokenSet* fetchAuthTokenSetParams =
+			new (ELeave) CSmfFetchAuthTokenSet;
+
+	CleanupStack::PushL(fetchAuthTokenSetParams);
+
+	//fill the input params
+	fetchAuthTokenSetParams->iRegistrationToken = qt_QString2HBufC(RegToken);
+	fetchAuthTokenSetParams->iValidity = Validity.toTime_t();
+
+	//create buffer to serialize data
+	CBufFlat* buf = CBufFlat::NewL(KMaxBufSize);
+	CleanupStack::PushL(buf);
+	RBufWriteStream stream(*buf);
+	CleanupClosePushL(stream);
+
+	fetchAuthTokenSetParams->ExternalizeL(stream);
+	stream.CommitL();
+
+	TPtr8 bufPtr = buf->Ptr(0);
+
+	TIpcArgs args;
+	args.Set(0, &bufPtr);
+
+	// to get the data from server, we create a space.
+	HBufC8* retBuf = HBufC8::NewL(KMaxBufSize);
+	CleanupStack::PushL(retBuf);
+
+	TPtr8 outputptr = retBuf->Des();
+	args.Set(1, &outputptr);
+
+	iSession.RequestService(ESendAuthDataSet, args);
+
+	//create buffer to read data sent by server
+	RBuf8 dataBuf;
+	CleanupClosePushL(dataBuf);
+	dataBuf.Create(outputptr);
+
+	fetchAuthTokenSetParams->InternalizeL(dataBuf);
+
+	//return EFalse if count is 0
+	if (fetchAuthTokenSetParams->iAuthTokenArray.Count() == 0)
+		{
+		return EFalse;
+		}
+
+	smfcredmgrclientutil::RArrayToSmfAuthParams(
+			fetchAuthTokenSetParams->iAuthTokenArray, AuthTokenSet);
+
+	CleanupStack::PopAndDestroy(&dataBuf);
+	CleanupStack::PopAndDestroy(retBuf);
+	CleanupStack::PopAndDestroy(&stream);
+	CleanupStack::PopAndDestroy(buf);
+	CleanupStack::PopAndDestroy(fetchAuthTokenSetParams);
+
+	return ETrue;
+	}
+
+QString CSmfCredMgrClientSymbian::storeAuthDataL(SmfAuthParams Set,
+		QDateTime Validity, QList<QUrl> URLList, QStringList PluginList,
+		QString AuthAppAID, bool Flag)
+	{
+
+	CSmfStoreAuthParams* authenticationProcessData =
+			new (ELeave) CSmfStoreAuthParams;
+	CleanupStack::PushL(authenticationProcessData);
+
+	//create space for iRegistrationToken
+	authenticationProcessData->iRegistrationToken = HBufC::NewL(
+			KMaxRegistrationTokenLength);
+
+	TPtr8 regTokenPtr(
+			authenticationProcessData->iRegistrationToken->Des().Collapse());
+
+	//fill the input params
+	smfcredmgrclientutil::SmfAuthParamstoRArray(Set,
+			authenticationProcessData->iAuthTokenArray);
+	authenticationProcessData->pluginIDEnabled = Flag;
+	//set iValidity
+	authenticationProcessData->iValidity = Validity.toTime_t();
+
+
+	//set authappid
+	authenticationProcessData->iAuthAppID = qt_QString2HBufC(AuthAppAID);
+	//set the lists
+	authenticationProcessData->iURLList
+			= smfcredmgrclientutil::convertToSymbianURLList(URLList);
+	authenticationProcessData->iPluginIDList
+			= smfcredmgrclientutil::convertToSymbianPluginList(
+					PluginList);
+
+	//create buffer to serialize data
+	CBufFlat* buf = CBufFlat::NewL(KMaxBufSize);
+	CleanupStack::PushL(buf);
+	RBufWriteStream stream(*buf);
+	CleanupClosePushL(stream);
+
+	authenticationProcessData->ExternalizeL(stream);
+	stream.CommitL();
+
+	TPtr8 bufPtr = buf->Ptr(0);
+
+	TIpcArgs args;
+	args.Set(0, &bufPtr);
+	args.Set(1, &regTokenPtr);
+	iSession.RequestService(EStoreAuthData, args);
+
+	TPtr wideRegToken = regTokenPtr.Expand();
+
+	//convert and return
+	QString regString = qt_TDes2QString(wideRegToken);
+
+	CleanupStack::PopAndDestroy(&stream);
+	CleanupStack::PopAndDestroy(buf);
+	CleanupStack::Pop();
+
+	return regString;
+	}
+
+TBool CSmfCredMgrClientSymbian::isPluginAuthenticatedL(QString PluginID)
+	{
+	CBufFlat* buf = CBufFlat::NewL(KMinBufSize);
+	CleanupStack::PushL(buf);
+
+	RBufWriteStream stream(*buf);
+	CleanupClosePushL(stream);
+
+	TPtr idPtr(qt_QString2HBufC(PluginID)->Des());
+	SmfUtils::ExternalizeDesL(idPtr, stream);
+
+	stream.CommitL();
+
+	// to get the data from server, we create a space.
+	HBufC8* retBuf = HBufC8::NewL(32);
+	CleanupStack::PushL(retBuf);
+
+	TPtr8 bufPtr = buf->Ptr(0);
+	TPtr8 flag(retBuf->Des());
+
+	TIpcArgs args;
+
+	args.Set(0, &bufPtr);
+	args.Set(1, &flag);
+
+	iSession.RequestService(ECheckPluginAuthentication, args);
+
+	TLex8 iLex = TLex8(flag);
+	TInt value = 0;
+	iLex.Val(value);
+
+	CleanupStack::PopAndDestroy(retBuf);
+	CleanupStack::PopAndDestroy(&stream);
+	CleanupStack::PopAndDestroy(buf);
+
+	if (value)
+		{
+		RDebug::Printf("flag returned is ETrue");
+		return ETrue;
+		}
+	else
+		{
+		RDebug::Printf("flag returned is EFalse");
+		return EFalse;
+		}
+	}
+
+void CSmfCredMgrClientSymbian::authenticatedPluginListL(
+		QString RegistrationToken, QStringList& List)
+	{
+	CSmfPluginIDListParams* fetchPluginListParams =
+			new (ELeave) CSmfPluginIDListParams;
+	CleanupStack::PushL(fetchPluginListParams);
+
+	//fill input params
+	fetchPluginListParams->iRegistrationToken = qt_QString2HBufC(
+			RegistrationToken);
+
+	//create buffer to serialize data
+	CBufFlat* buf = CBufFlat::NewL(KMinBufSize);
+	CleanupStack::PushL(buf);
+	RBufWriteStream stream(*buf);
+	CleanupClosePushL(stream);
+
+	fetchPluginListParams->ExternalizeL(stream);
+	stream.CommitL();
+
+	TPtr8 bufPtr1 = buf->Ptr(0);
+	TIpcArgs args;
+	args.Set(0, &bufPtr1);
+
+	// to get the data from server, we create a space.
+	HBufC8* retBuf = HBufC8::NewL(KMaxBufSize);
+	CleanupStack::PushL(retBuf);
+
+	TPtr8 outputptr = retBuf->Des();
+	args.Set(1, &outputptr);
+
+	iSession.RequestService(ESendPluginIDList, args);
+
+	//create buffer to read data received
+	RBuf8 dataBuf;
+	CleanupClosePushL(dataBuf);
+	dataBuf.Create(outputptr);
+
+	fetchPluginListParams->InternalizeL(dataBuf);
+
+	smfcredmgrclientutil::convertToQStringList(
+			fetchPluginListParams->iPluginList, List);
+
+	CleanupStack::PopAndDestroy(&dataBuf);
+	CleanupStack::PopAndDestroy(retBuf);
+	CleanupStack::PopAndDestroy(&stream);
+	CleanupStack::PopAndDestroy(buf);
+	CleanupStack::PopAndDestroy(fetchPluginListParams);
+	}
+
+void CSmfCredMgrClientSymbian::URLListL(QString PluginID, QList<QUrl>& List)
+
+	{
+	CSmfURLListParams* fetchURLListParams = new (ELeave) CSmfURLListParams;
+	CleanupStack::PushL(fetchURLListParams);
+
+	fetchURLListParams->iPluginID = qt_QString2HBufC(PluginID);
+
+	//create buffer to serialize data
+	CBufFlat* buf = CBufFlat::NewL(KMinBufSize);
+	CleanupStack::PushL(buf);
+	RBufWriteStream stream(*buf);
+	CleanupClosePushL(stream);
+
+	fetchURLListParams->ExternalizeL(stream);
+	stream.CommitL();
+
+	TPtr8 bufPtr = buf->Ptr(0);
+
+	TIpcArgs args;
+	args.Set(0, &bufPtr);
+
+	// to get the data from server, we create a space.
+	HBufC8* retBuf = HBufC8::NewL(KMaxBufSize);
+	CleanupStack::PushL(retBuf);
+
+	TPtr8 outputptr = retBuf->Des();
+	args.Set(1, &outputptr);
+
+	iSession.RequestService(ESendURLList, args);
+
+	//create buffer to read data received
+	RBuf8 dataBuf;
+	CleanupClosePushL(dataBuf);
+	dataBuf.Create(outputptr);
+
+	fetchURLListParams->InternalizeL(dataBuf);
+
+	smfcredmgrclientutil::convertToQUrlList(
+			fetchURLListParams->iURLList, List);
+
+	CleanupStack::PopAndDestroy(&dataBuf);
+	CleanupStack::PopAndDestroy(retBuf);
+	CleanupStack::PopAndDestroy(&stream);
+	CleanupStack::PopAndDestroy(buf);
+	CleanupStack::Pop(fetchURLListParams);
+
+	}
+
+QString CSmfCredMgrClientSymbian::generateNONCE(const qint64 Length)
+	{
+	srand(time(0));
+	QDateTime UniqueNumber = QDateTime::currentDateTime();
+
+	//read upto milliseconds
+	QString RetString(UniqueNumber.toString("hh:mm:ss.zzz"));
+
+	QString Letters(
+			"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789");
+
+	//append a randomly generated string to RetString
+	for (int i = RetString.count(); i < Length; i++)
+		{
+		RetString.insert((i), Letters.at(rand() % Letters.size()));
+		}
+
+	return RetString;
+	}
+
+void CSmfCredMgrClientSymbian::changePluginIDListL(const QString NewPluginID,
+		const bool Flag, const QString OldPluginID)
+	{
+	CSmfPluginIDUpdate* changePluginListParams =
+			new (ELeave) CSmfPluginIDUpdate;
+	CleanupStack::PushL(changePluginListParams);
+
+	//set the input params
+	changePluginListParams->iNewPluginID = qt_QString2HBufC(NewPluginID);
+	changePluginListParams->iOldPluginID = qt_QString2HBufC(OldPluginID);
+	changePluginListParams->pluginIDEnabled = Flag;
+
+	//create buffer to serialize data
+	CBufFlat* buf = CBufFlat::NewL(KMaxBufSize);
+	CleanupStack::PushL(buf);
+	RBufWriteStream stream(*buf);
+	CleanupClosePushL(stream);
+
+	changePluginListParams->ExternalizeL(stream);
+	stream.CommitL();
+
+	TPtr8 bufPtr = buf->Ptr(0);
+
+	TIpcArgs args;
+	args.Set(0, &bufPtr);
+
+	iSession.RequestService(EUpdatePluginIDList, args);
+
+	CleanupStack::PopAndDestroy(&stream);
+	CleanupStack::PopAndDestroy(buf);
+	CleanupStack::PopAndDestroy(changePluginListParams);
+
+	}
+
+SMFCredMgrErrorCode CSmfCredMgrClientSymbian::signMessageL(QString Message,
+		QString Key, QString& Signature, SmfSignatureMethod AlgorithmUsed)
+	{
+	SMFCredMgrErrorCode signError = SmfErrNone;
+	TPtr msgPtr((qt_QString2HBufC(Message))->Des());
+	TPtr keyPtr((qt_QString2HBufC(Key))->Des());
+
+	CSmfSignParameters* signMsgParams = CSmfSignParameters::NewL(
+			msgPtr.Collapse(), keyPtr.Collapse());
+	CleanupStack::PushL(signMsgParams);
+
+	CBufFlat* buf = CBufFlat::NewL(KMinBufSize);
+	CleanupStack::PushL(buf);
+	RBufWriteStream stream(*buf);
+	CleanupClosePushL(stream);
+
+	signMsgParams->ExternalizeL(stream);
+	stream.CommitL();
+
+	TPtr8 bufPtr = buf->Ptr(0);
+
+	TIpcArgs args;
+	args.Set(0, &bufPtr);
+
+	HBufC8* msgBuf = HBufC8::NewL(KMaxSignedMsgLength);
+	TPtr8 msgBufPtr(msgBuf->Des());
+	CleanupStack::PushL(msgBuf);
+	args.Set(1, &msgBufPtr);
+
+	switch (AlgorithmUsed)
+		{
+		case ESMFRSAProtocol:
+			{
+			iSession.RequestService(ESmfRSASignMessage, args);
+			}
+			break;
+		case ESMFHMACProtocol:
+			{
+			iSession.RequestService(ESmfHMACSHA1SignMessage, args);
+			}
+			break;
+		default:
+			{
+			RDebug::Printf("Unsupported Algo:");
+			return SmfErrBadParameter;
+			}
+		}
+
+	TBuf<KMaxSignedMsgLength> signedMsg;
+	signedMsg.Copy(msgBufPtr);
+
+	Signature = qt_TDesC2QString(signedMsg);
+
+	CleanupStack::Pop(msgBuf);
+	CleanupStack::PopAndDestroy(&stream);
+	CleanupStack::PopAndDestroy(buf);
+	CleanupStack::PopAndDestroy(signMsgParams);
+
+	return signError;
+	}
+
+QString CSmfCredMgrClientSymbian::storeRSAKeysL(const QString KeyLabel,
+		const QString keydata, const QDateTime Validity)
+	{
+	RDebug::Printf("Sending store RSA key message to server");
+
+	TPtrC labelPtr(qt_QString2TPtrC(KeyLabel));
+	TPtr dataPtr((qt_QString2HBufC(keydata)->Des()));
+
+	QDateTime CurrentTime = QDateTime::currentDateTime();
+	TTimeIntervalSeconds duration(CurrentTime.secsTo(Validity));
+
+	TTime startDate;
+	startDate.UniversalTime();
+
+	TTime endDate(startDate);
+	endDate += duration;
+
+	CSmfRsaKeyParameters* storeRSAKeysparams = CSmfRsaKeyParameters::NewL(
+			labelPtr, startDate, endDate, (dataPtr.Collapse()));
+	CleanupStack::PushL(storeRSAKeysparams);
+
+	CBufFlat* buf = CBufFlat::NewL(KMinBufSize);
+	CleanupStack::PushL(buf);
+	RBufWriteStream stream(*buf);
+	CleanupClosePushL(stream);
+
+	storeRSAKeysparams->ExternalizeL(stream);
+	stream.CommitL();
+
+	TPtr8 bufPtr = buf->Ptr(0);
+
+	TIpcArgs args;
+	args.Set(0, &bufPtr);
+
+	CleanupStack::PopAndDestroy(&stream);
+
+	HBufC8* retBuf = HBufC8::NewLC(KSHA1HashLengthBytes);
+	TPtr8 retBufPtr(retBuf->Des());
+	args.Set(1, &retBufPtr);
+
+	iSession.RequestService(ESmfStoreRSAKey, args);
+
+	RDebug::Printf("SMF: Message completed");
+
+	TBuf<KSHA1HashLengthBytes> key;
+	key.Copy(retBufPtr);
+
+	QString RetString(qt_TDesC2QString(key));
+
+	CleanupStack::Pop(retBuf);
+	CleanupStack::PopAndDestroy(buf);
+	CleanupStack::PopAndDestroy(storeRSAKeysparams);
+
+	return (RetString);
+
+	}
+
+void CSmfCredMgrClientSymbian::deleteRSAKey(QString KeyLabel)
+	{
+	TPtr bufPtr((qt_QString2HBufC(KeyLabel))->Des());
+
+	TIpcArgs args;
+	args.Set(0, &bufPtr);
+
+	iSession.RequestService(ESmfDeleteKeys, args);
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/smf/smfcredentialmgr/smfcredmgrclient/smfcredmgrclient_p.h	Wed Jun 23 19:51:49 2010 +0530
@@ -0,0 +1,202 @@
+/**
+ * Copyright (c) 2010 Sasken Communication Technologies Ltd.
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of the "Eclipse Public License v1.0"
+ * which accompanies  this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html"
+ *
+ * Initial Contributors:
+ * Pritam Roy Biswas, Sasken Communication Technologies Ltd - Initial contribution
+ *
+ * Description:
+ * This is the private implementation Class on Symbian OS for Credential Manager Client.
+ *  Derives from CAtive to support asynchronous requests.
+ *
+ */
+
+#ifndef __SMFCREDMGRCLIENT_P_H__
+#define __SMFCREDMGRCLIENT_P_H__
+
+//  Include Files
+#ifdef Q_OS_SYMBIAN
+#include <e32base.h>
+#include <e32std.h>
+#include <e32cmn.h>
+#include <s32strm.h>
+#include <S32MEM.H> 
+#include <e32des16.h>
+#endif
+#include <QUrl>
+#include <QDateTime>
+#include <private/qcore_symbian_p.h>
+#include <QtCore/qglobal.h>
+#include <qstring.h>
+#include <QStringList>
+#include <qbytearray.h>
+#include <qlist.h>
+
+#ifdef Q_OS_SYMBIAN
+#include "smfcredmgrcommon.h"  //client-server common header.
+#include "smfcredmgrclientsession.h"
+#include "smfcredmgrclientglobal.h"
+#else
+#endif
+
+const TInt KMinBufSize = 128;
+const TInt KMaxBufSize = 512;
+
+//forward declarations
+class SmfCredMgrClient;
+
+/**
+ * The private implementation class for the APIs exported by Credential Manager.
+ *  Its a symbian implementation.
+ */
+class CSmfCredMgrClientSymbian : public CActive
+	{
+public:
+	/**
+	 * new methods
+	 * @param aPublicImpl The Qt client object
+	 */
+	static CSmfCredMgrClientSymbian* NewL(SmfCredMgrClient* aPublicImpl);
+	static CSmfCredMgrClientSymbian* NewLC(SmfCredMgrClient* aPublicImpl);
+
+	/**
+	 * Destructor
+	 */
+	~CSmfCredMgrClientSymbian();
+
+	/**
+	 * Method to store all data related to an auth app i.e URL list for Plugins, List of Plugins.etc.
+	 * Called by storeAuthData() of SmfCredMgrClient.
+	 * @param Set The auth Key set
+	 * @param Validity time by which the Auth set will expire
+	 * @param URLList The URL list to be set
+	 * @param PluginList The plugin list to be set
+	 * @param AuthAppAID The Authentication Application Id
+	 * @param Flag flag to enable or disable the plugin
+	 * @return The registration token that completes authentication
+	 */
+	QString storeAuthDataL(SmfAuthParams Set, QDateTime Validity,
+			QList<QUrl> URLList, QStringList PluginList, QString AuthAppAID,
+			bool Flag);
+
+	/**
+	 * Method to check the authentication of a Plugin
+	 * @param PluginID Id of the Plugin to be checked.
+	 * @return True if authenticated or False if not
+	 */
+	TBool isPluginAuthenticatedL(QString PluginID);
+
+	/**
+	 * Method to get the list of authenticated plugins
+	 * @param RegistrationToken The token that validates a list of such plugins.
+	 * @param List The list of authenticated plugins to be retrieved
+	 */
+	void authenticatedPluginListL(QString RegistrationToken, QStringList& List);
+
+	/**
+	 * Method to get list of URLs which plugin can access
+	 * @param PluginID The ID of the Plugin whose corresponding list of URLs to be retrieved
+	 * @param List The URL list to be retrieved
+	 */
+	void URLListL(QString PluginID, QList<QUrl>& List);
+
+	/**
+	 * Method to generate NONCE token
+	 * @param Length Lenth of the NONCE tobe generated
+	 * @return The generated NONCE
+	 */
+	QString generateNONCE(const qint64 Length);
+
+	/**
+	 * Method to update the list of authenticated plugins-add, remove, update to plugins
+	 * Called by changePluginIDList() of SmfCredMgrClient.
+	 * @param NewPluginID ID of the new plugin 
+	 * @param Flag boolean to indicate plugin is enabled or disabled
+	 * @param OldPluginID ID of the old plugin to be replaced
+	 */
+	void changePluginIDListL(const QString NewPluginID, const bool Flag,
+			const QString OldPluginID);
+
+	/**
+	 * Method to get the Auth Token set, eg:OAuth_RequestToken; OAuth_AccessToken
+	 * @param RegToken Registration Token previously obtained from SMF
+	 * @param Validity time by which the Auth set will expire, its to check if reg token is still valid
+	 * @param AuthTokenSet the Auth Token Set for the plugin
+	 * @return boolean value if the reg token is still valid
+	 */
+	TBool AuthDataSetL(QString RegToken, QDateTime Validity,
+			SmfAuthParams& AuthTokenSet);
+
+	/**
+	 * Method to store RSA Keys
+	 * @param KeyLabel First key of the key pair
+	 * @param keydata Other key of the key pair
+	 * @param Validity time by which the key set will expire
+	 * @return The Label of key pair
+	 */
+	QString storeRSAKeysL(const QString KeyLabel, const QString keydata,
+			const QDateTime Validity);
+	/**
+	 * API to Sign the message
+	 * @param Message The message to be signed
+	 * @param Key If Signature method is RSA-SHA1 then it must be equal to the value
+	 * 				returned while storeRSAKeys(), if signature method is HMAC-SHA1 key
+	 * 				must the value to sign the message with
+	 * @param Signature The signed message is an output argument
+	 * @param AlgorithmUsed The algorithm used for signing
+	 * return Smf defined errorcode
+	 * @todo - RSA Signing is falgged-put for time being. 
+	 */
+	SMFCredMgrErrorCode signMessageL(QString Message, QString Key,
+			QString& Signature, SmfSignatureMethod AlgorithmUsed);
+	/**
+	 * API To delete the RSA Key from the Key Store 
+	 * @param KeyLabel The Label of key pair. This is the value returned while StoreRSAKeys().
+	 */
+	void deleteRSAKey(QString KeyLabel);
+
+protected:
+	// Functions from base classes
+
+	/**
+	 * From CActive, RunL.
+	 * Callback function.
+	 * Invoked to handle responses from the server.
+	 */
+	void RunL();
+
+	/**
+	 * From CActive, DoCancel.
+	 * Cancels any outstanding operation.
+	 */
+	void DoCancel();
+
+private:
+	/**
+	 * Constructor
+	 * @param aObserver symbianClientObserver object to notify the Qt-Client
+	 */
+	CSmfCredMgrClientSymbian(SmfCredMgrClient* aPublicImpl);
+
+	/**
+	 * Symbian two phase constructor
+	 */
+	void ConstructL();
+
+private:
+	/**
+	 *Handle to the session
+	 */
+	RSmfCredMgrClientSession iSession;
+	/**
+	 * Wrapper class object. 
+	 */
+	SmfCredMgrClient* iPublicImpl;
+
+	};
+
+#endif  // __SMFCREDMGRCLIENT_P_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/smf/smfcredentialmgr/smfcredmgrclient/smfcredmgrclient_template.pkg	Wed Jun 23 19:51:49 2010 +0530
@@ -0,0 +1,32 @@
+; SmfCredMgrClient_template.pkg generated by qmake at 2010-05-08T16:55:31
+; This file is generated by qmake and should not be modified by the user
+;
+
+; Language
+&EN
+
+; SIS header: name, uid, version
+#{"smfcredmgrclient"},(0xEd21cfd1),1,0,0
+
+; Localised Vendor name
+%{"Vendor"}
+
+; Unique Vendor name
+:"Vendor"
+
+; Manual PKG pre-rules from PRO files
+; Default HW/platform dependencies
+[0x101F7961],0,0,0,{"S60ProductID"}
+[0x102032BE],0,0,0,{"S60ProductID"}
+[0x102752AE],0,0,0,{"S60ProductID"}
+[0x1028315F],0,0,0,{"S60ProductID"}
+ 
+; Default dependency to Qt libraries
+(0x2001E61C), 4, 6, 1, {"Qt"}
+
+; Executable and default resource files
+"/S60/devices/S60_5th_Edition_SDK_v1.0/epoc32/release/$(PLATFORM)/$(TARGET)/smfcredmgrclient.dll"    - "!:\sys\bin\smfcredmgrclient.dll"
+"/S60/devices/S60_5th_Edition_SDK_v1.0/epoc32/data/z/resource/apps/SmfCredMgrClient.rsc"    - "!:\resource\apps\SmfCredMgrClient.rsc"
+"/S60/devices/S60_5th_Edition_SDK_v1.0/epoc32/data/z/private/10003a3f/import/apps/SmfCredMgrClient_reg.rsc"    - "!:\private\10003a3f\import\apps\SmfCredMgrClient_reg.rsc"
+
+; Manual PKG post-rules from PRO files
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/smf/smfcredentialmgr/smfcredmgrclient/smfcredmgrclientsession.cpp	Wed Jun 23 19:51:49 2010 +0530
@@ -0,0 +1,110 @@
+/**
+ * Copyright (c) 2010 Sasken Communication Technologies Ltd.
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of the "Eclipse Public License v1.0"
+ * which accompanies  this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html"
+ *
+ * Initial Contributors:
+ * Pritam Roy Biswas, Sasken Communication Technologies Ltd - Initial contribution
+ *
+ * Description:
+ *  Client-side handle to a session with a server. Derives from RSessionBase to 
+ *   create a communicating channel with the server.
+ *
+ */
+
+#include "smfcredmgrclientsession.h"
+
+// The number of connection attempts.
+const TInt KConnectAttempts = 2;
+
+//  Global Functions
+static TInt StartServer()
+	{
+
+	RProcess server;
+	TInt r = server.Create(KCredMgrServerName, KNullDesC);
+	if (r != KErrNone)
+		{
+		return r;
+		}
+	TRequestStatus stat = KRequestPending;
+	server.Rendezvous(stat);
+	if (stat != KRequestPending)
+		server.Kill(0);
+	else
+		server.Resume();
+	
+	User::WaitForRequest(stat);
+	TExitType et = server.ExitType();
+	TInt code = stat.Int();
+	r = (et == EExitPanic) ? KErrGeneral : code;
+	server.Close();
+
+	return KErrNone;
+	}
+
+RSmfCredMgrClientSession::RSmfCredMgrClientSession()
+	{
+
+	}
+
+TInt RSmfCredMgrClientSession::connectToServer()
+	{
+	TInt retry = KConnectAttempts;
+	TInt r = 0;
+	for (;;)
+		{
+		r = CreateSession(KCredMgrServerName, Version(), 1);
+		if (r == KErrNone)
+			{
+			break;
+			}
+		else if (r != KErrNotFound && r != KErrServerTerminated)
+			{
+			return r;
+			}
+
+		if (--retry == 0)
+			{
+			return r;
+			}
+
+		r = StartServer();
+		if (r != KErrNone && r != KErrAlreadyExists)
+			{
+			return r;
+			//error 
+			}
+		}
+
+	return r;
+
+	}
+
+TVersion RSmfCredMgrClientSession::Version() const
+	{
+	return (TVersion(KSecureServMajorVersionNumber,
+			KSecureServMinorVersionNumber, KSecureServBuildVersionNumber));
+	}
+
+void RSmfCredMgrClientSession::Close()
+	{
+	RSessionBase::Close();
+	}
+
+void RSmfCredMgrClientSession::RequestAsyncService(
+		TCredentialServerRequestID aRequestType, TRequestStatus& aStatus)
+	{
+	SendReceive(aRequestType, aStatus);
+	}
+
+void RSmfCredMgrClientSession::RequestService(
+		TCredentialServerRequestID aRequestType, const TIpcArgs &aArgs)
+	{
+	TInt err = SendReceive(aRequestType, aArgs);
+
+	}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/smf/smfcredentialmgr/smfcredmgrclient/smfcredmgrclientsession.h	Wed Jun 23 19:51:49 2010 +0530
@@ -0,0 +1,69 @@
+/**
+ * Copyright (c) 2010 Sasken Communication Technologies Ltd.
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of the "Eclipse Public License v1.0"
+ * which accompanies  this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html"
+ *
+ * Initial Contributors:
+ * Pritam Roy Biswas, Sasken Communication Technologies Ltd - Initial contribution
+ *
+ * Description:
+ *  Client-side handle to a session with a server. Derives from RSessionBase to 
+ *   create a communicating channel with the server.
+ *
+ */
+#ifndef RSMFCREDMGRCLIENTSESSION_H_
+#define RSMFCREDMGRCLIENTSESSION_H_
+
+#ifdef Q_OS_SYMBIAN
+#include <smfcredmgrcommon.h>
+#include <e32std.h>
+#include <e32std.h>
+#include <e32cmn.h>
+#endif
+
+/**
+ * Class for client side handle and to create a channel with the server. 
+ * Derives from RSessionBase.
+ */
+class RSmfCredMgrClientSession : public RSessionBase
+	{
+public:
+	/**
+	 * Constructor
+	 */
+	RSmfCredMgrClientSession();
+
+	/**
+	 * Connection to server to be made using CreateSession()
+	 */
+	TInt connectToServer();
+
+	/**
+	 * Method to retrieve the Version of the Server
+	 */
+	TVersion Version() const;
+
+	/**
+	 * Close the session
+	 */
+	void Close();
+
+	/**
+	 * Calls SendReceive with requestType opcode and packaged data
+	 * depending on requestType
+	 */
+	void RequestAsyncService(TCredentialServerRequestID aRequestType,
+			TRequestStatus& aStatus);
+
+	/**
+	 * Issue request to server using SendReceive()
+	 */
+	void RequestService(TCredentialServerRequestID aRequestType,
+			const TIpcArgs &aArgs);
+
+	};
+
+#endif /* RSMFCREDMGRCLIENTSESSION_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/smf/smfcredentialmgr/smfcredmgrclient/smfcredmgrclientutil.cpp	Wed Jun 23 19:51:49 2010 +0530
@@ -0,0 +1,130 @@
+/**
+ * Copyright (c) 2010 Sasken Communication Technologies Ltd.
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of the "Eclipse Public License v1.0"
+ * which accompanies  this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html"
+ *
+ * Initial Contributors:
+ * Pritam Roy Biswas, Sasken Communication Technologies Ltd - Initial contribution
+ *
+ * Description:
+ *  Header file for the utility to handle conversion between symbian and Qt 
+ *  in Credential Manager.
+ */
+
+
+#include "smfcredmgrclientutil.h"
+
+namespace smfcredmgrclientutil
+	{
+
+	RPointerArray<HBufC> convertToSymbianURLList(QList<QUrl> URLList)
+		{
+		RPointerArray<HBufC> urlListSymbian;
+
+		for (int i = 0; i < URLList.count(); i++)
+			{
+			QString SingleURLString(URLList.at(i).toString(QUrl::None));
+
+			HBufC* buf = qt_QString2HBufC(SingleURLString);
+				QT_TRAP_THROWING(urlListSymbian.InsertL(buf, i));
+
+			SingleURLString.clear();
+			}
+
+		return urlListSymbian;
+		}
+
+	RPointerArray<HBufC> convertToSymbianPluginList(QStringList PluginList)
+		{
+		RPointerArray<HBufC> pluginListSymbian;
+
+		for (int i = 0; i < PluginList.count(); i++)
+			{
+			QString SinglePlugin = PluginList.at(i);
+
+			HBufC* buf = qt_QString2HBufC(SinglePlugin);
+				QT_TRAP_THROWING(pluginListSymbian.InsertL(buf, i));
+
+			SinglePlugin.clear();
+			}
+		return pluginListSymbian;
+		}
+
+	void convertToQStringList(RPointerArray<HBufC> aPluginList,
+			QStringList &ListInQt)
+		{
+
+		for (int i = 0; i < aPluginList.Count(); i++)
+			{
+			TPtr ptr(aPluginList[i]->Des());
+
+			QString pluginString = qt_TDesC2QString(ptr);
+			ListInQt.insert(i, pluginString);
+
+			ptr.Zero();
+
+			}
+		}
+
+	void convertToQUrlList(RPointerArray<HBufC> aURLList, QList<QUrl> &List)
+		{
+
+		for (int i = 0; i < aURLList.Count(); i++)
+			{
+			TPtr ptr(aURLList[i]->Des());
+
+			QString URLString = qt_TDesC2QString(ptr);
+			QUrl URL(URLString);
+
+			List.insert(i, URL);
+			ptr.Zero();
+
+			}
+		}
+
+	void RArrayToSmfAuthParams(RArray<TSmfAuthToken> aArray,
+			SmfAuthParams& Params)
+		{
+		Params.clear();
+		for (int i = 0; i < aArray.Count(); i++)
+			{
+			TSmfAuthToken Set(aArray[i]);
+
+			QByteArray Key((qt_TDesC2QString(Set.iKey->Des())).toAscii());
+			QByteArray Secret(
+					(qt_TDesC2QString(Set.iSecret->Des())).toAscii());
+
+			Params.insertMulti(Key, Secret);
+			}
+
+		}
+	
+	void SmfAuthParamstoRArray(SmfAuthParams Params, 
+				RArray<TSmfAuthToken>& aArray)
+		{
+		int arrayPos = 0;
+		SmfAuthParams::const_iterator itr;
+		for (itr = Params.constBegin(); itr != Params.constEnd(); ++itr)
+			{
+			TSmfAuthToken set;
+			
+			QString KeyString(itr.key());
+			QString ValueString(itr.value());
+			
+			set.iKey = qt_QString2HBufC(KeyString);
+			set.iSecret = qt_QString2HBufC(ValueString);
+			//insert into the array
+			aArray.Insert(set, arrayPos);
+			//clear previous values
+			KeyString.clear();
+			ValueString.clear();
+			arrayPos++;
+			}
+		
+		}
+
+	}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/smf/smfcredentialmgr/smfcredmgrclient/smfcredmgrclientutil.h	Wed Jun 23 19:51:49 2010 +0530
@@ -0,0 +1,92 @@
+/**
+ * Copyright (c) 2010 Sasken Communication Technologies Ltd.
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of the "Eclipse Public License v1.0"
+ * which accompanies  this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html"
+ *
+ * Initial Contributors:
+ * Pritam Roy Biswas, Sasken Communication Technologies Ltd - Initial contribution
+ *
+ * Description:
+ *  Header file for the utility to handle conversion between symbian and Qt 
+ *  in Credential Manager.
+ */
+
+#ifndef SMFQTSYMBIANCONVERSIONUTILS_H_
+#define SMFQTSYMBIANCONVERSIONUTILS_H_
+
+#include <QUrl>
+#include <QDateTime>
+#include <private/qcore_symbian_p.h>
+#include <QtCore/qglobal.h>
+#include <qstring.h>
+#include <QStringList>
+#include <qbytearray.h>
+#include <qlist.h>
+
+#ifdef Q_OS_SYMBIAN
+#include <e32base.h>
+#include <e32std.h>
+#include <e32cmn.h>
+#include <s32strm.h>
+#include <S32MEM.H> 
+#include <e32des16.h> 
+#include <smfcredmgrclientdatastruct.h>
+#include <smfcredmgrclientglobal.h> 
+#endif
+/**
+ * Utility to handle conversion between symbian and Qt in Credential Manager.
+ */
+namespace smfcredmgrclientutil
+	{
+
+	/**
+	 * Method to convert QList<QUrl> type to RPointerArray<HBufC> type  
+	 * @param URLList List of URL in Qt
+	 * @return the symbian list of thype RPointerArray<HBufC>
+	 */
+	RPointerArray<HBufC> convertToSymbianURLList(QList<QUrl> URLList);
+
+	/** 
+	 * Method to convert QStringList type to RPointerArray<HBufC>
+	 * @param PluginList The QStringList to be converted
+	 * @return The Converted plugin list in RPointerArray<HBufC> 
+	 */
+	RPointerArray<HBufC> convertToSymbianPluginList(QStringList PluginList);
+
+	/**
+	 * Conversion method
+	 * @param aPluginList List in RPointerArray<HBufC> 
+	 * @param ListInQt List in QStringList
+	 */
+	void convertToQStringList(RPointerArray<HBufC> aPluginList,
+			QStringList &ListInQt);
+
+	/**
+	 * Conversion method
+	 * @param aURLList List in RPointerArray<HBufC> 
+	 * @param List List in QStringList
+	 */
+	void convertToQUrlList(RPointerArray<HBufC> aURLList, QList<QUrl> &List);
+
+	/**
+	 * Conversion Method
+	 * @param aArray Array in RArray<TSmfAuthToken>
+	 * @param Params Array in SmfAuthParams
+	 */
+	void RArrayToSmfAuthParams(RArray<TSmfAuthToken> aArray,
+			SmfAuthParams& Params);
+
+	/**
+	 * Conversion Method
+	 * @param aArray Array in RArray<TSmfAuthToken>
+	 * @param Params Array in SmfAuthParams
+	 */
+	void SmfAuthParamstoRArray(SmfAuthParams Params, 
+			RArray<TSmfAuthToken>& aArray);
+
+	}
+
+#endif /* SMFQTSYMBIANCONVERSIONUTILS_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/smf/smfcredentialmgr/smfcredmgrcommon/group/smfcredmgrcommon.mmp	Wed Jun 23 19:51:49 2010 +0530
@@ -0,0 +1,66 @@
+/*
+============================================================================
+ Name		: smfcredmgrcommon.mmp
+ Author	  : pritam
+ Copyright   : Your copyright notice
+ Description : This is the project specification file for SmfCredMgrClient.
+============================================================================
+*/
+
+TARGET		  smfcredmgrcommon.lib
+TARGETTYPE	  lib
+UID			 0
+
+USERINCLUDE	 ..\inc
+
+// Qt Macros
+MACRO		UNICODE
+MACRO		QT_KEYPAD_NAVIGATION
+MACRO		QT_SOFTKEYS_ENABLED
+MACRO		QT_USE_MATH_H_FLOATS
+MACRO		Q_OS_SYMBIAN
+MACRO		QT_GUI_LIB
+MACRO		QT_NETWORK_LIB
+MACRO		QT_CORE_LIB
+
+SYSTEMINCLUDE		../../../../../Qt/4.6.1/include/QtCore
+SYSTEMINCLUDE		../../../../../Qt/4.6.1/include/QtNetwork
+SYSTEMINCLUDE		../../../../../Qt/4.6.1/include/QtGui
+SYSTEMINCLUDE		../../../../../Qt/4.6.1/include
+SYSTEMINCLUDE		../../../../../Qt/4.6.1/mkspecs/common/symbian
+SYSTEMINCLUDE		/epoc32/include
+SYSTEMINCLUDE		.
+SYSTEMINCLUDE		/epoc32/include/stdapis
+SYSTEMINCLUDE		/epoc32/include/stdapis/sys
+SYSTEMINCLUDE		/epoc32/include/stdapis/stlport
+SYSTEMINCLUDE		/epoc32/include/domain/middleware
+SYSTEMINCLUDE		/epoc32/include/domain/middleware/loc
+SYSTEMINCLUDE		/epoc32/include/platform
+
+LIBRARY		 estor.lib
+LIBRARY		libstdcpp.lib
+LIBRARY		QtGui.lib
+LIBRARY		QtNetwork.lib
+LIBRARY		QtCore.lib
+LIBRARY		libc.lib
+LIBRARY		libm.lib
+LIBRARY		libdl.lib
+STATICLIBRARY	qtmain.lib
+
+CAPABILITY		None
+
+OPTION CW -wchar_t on
+OPTION ARMCC --visibility_inlines_hidden --fpu ssoftvfp
+
+VERSION 10.0
+
+PAGED
+
+OPTION_REPLACE ARMCC --export_all_vtbl // don't use --export_all_vtbl
+
+#ifdef ENABLE_ABIV2_MODE
+DEBUGGABLE_UDEBONLY
+#endif
+SOURCEPATH ..\src
+SOURCE  smfutils.cpp smfcredmgrclientdatastruct.cpp 
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/smf/smfcredentialmgr/smfcredmgrcommon/inc/smfcredmgrclientdatastruct.h	Wed Jun 23 19:51:49 2010 +0530
@@ -0,0 +1,422 @@
+/**
+ * Copyright (c) 2010 Sasken Communication Technologies Ltd.
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of the "Eclipse Public License v1.0"
+ * which accompanies  this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html"
+ *
+ * Initial Contributors:
+ * Pritam Roy Biswas, Sasken Communication Technologies Ltd - Initial contribution
+ *
+ * Description:
+ *	This header file gives different data classes to be used
+ * by Credential Manager Client and Server for data transfer.	
+ *
+ */
+#ifndef CSMFCREDMGRCLIENTDATASTRUCT_H_
+#define CSMFCREDMGRCLIENTDATASTRUCT_H_
+
+// System includes
+#include <e32cmn.h>
+#include <S32MEM.H>  
+#include <s32strm.h> 
+
+#include "smfcredmgrcommon.h"
+
+/**
+ * Maximum Length for AuthTokens
+ */
+const TInt KMaxAuthTokenLength = 256;
+
+/**
+ * Maximum Length for Plugin ID
+ */
+const TInt KMaxPluginIDLength = 256;
+
+/**
+ * Maximum Length for Registration Token
+ */
+const TInt KMaxRegistrationTokenLength = 50;
+
+/**
+ * Maximum Length for URLString
+ */
+const TInt KMaxURLStringLength = 256;
+
+/**
+ * Maximum Length for Authentication Application ID
+ */
+const TInt KMaxAuthIdLength = 256;
+
+/**
+ * Maximum Length for SignedMessage
+ */
+const TInt KMaxSignedMsgLength = 256;
+/**
+ * This class provide details and to serialize Authentication Key And Secret   
+ */
+class TSmfAuthToken
+	{
+public:
+	/**
+	 * constructor
+	 */
+	inline TSmfAuthToken() :
+		iKey(NULL), iSecret(NULL)
+		{
+		}
+	/**
+	 * Method to externalize the member variables
+	 * @param aStream The Write Stream to be filled.
+	 */
+	void ExternalizeL(RWriteStream& aStream);
+
+	/**
+	 * Method to internalize the member variables
+	 * @param aStream the stream to read from
+	 */
+	void InternalizeL(RReadStream& aStream);
+	
+	/**
+	 * buf to hold the key
+	 */
+	HBufC* iKey;
+	/**
+	 * buf to hold the secret
+	 */
+	HBufC* iSecret;
+	};
+
+/**
+ * This class provide details and to serialize for the API fetching Authentication Parameters  
+ */
+class CSmfFetchAuthTokenSet : public CBase
+	{
+public:
+	/**
+	 * destructor
+	 */
+	~CSmfFetchAuthTokenSet()
+		{
+		iAuthTokenArray.Reset();
+		delete iRegistrationToken;
+		}
+
+	/**
+	 * Method to externalize the member variables
+	 * @param aStream The Write Stream to be filled.
+	 */
+	void ExternalizeL(RWriteStream& aStream);
+
+	/**
+	 * Method to internalize the member variables
+	 * @param aSource the source to read from
+	 */
+	void InternalizeL(const RBuf8& aSource);
+	/**
+	 * buf to hold registration token
+	 */
+	HBufC* iRegistrationToken;
+	/**
+	 * Time by which the Auth set will expire
+	 */
+	TUint32 iValidity;
+	/**
+	 * array in symbian to hold the key-value pair
+	 */
+	RArray<TSmfAuthToken> iAuthTokenArray;
+	};
+
+/**
+ * This class provide details and to serialize of data to the API retreiving URL List 
+ */
+class CSmfURLListParams : public CBase
+	{
+public:
+	/**
+	 * destructor
+	 */
+	~CSmfURLListParams()
+		{
+		iURLList.ResetAndDestroy();
+		delete iPluginID;
+		}
+
+	/**
+	 * Method to externalize the member variables
+	 * @param aStream The Write Stream to be filled.
+	 */
+	void ExternalizeL(RWriteStream& aStream);
+
+	/**
+	 * Method to internalize the member variables
+	 * @param aSource the source to read from
+	 */
+	void InternalizeL(const TDesC8& aSource);
+	
+	/**
+	 * array in symbian to hold url list
+	 */
+	RPointerArray<HBufC> iURLList;
+	
+	/**
+	 * buf to hold the plugin id for which urls will be queried
+	 */
+	HBufC* iPluginID;
+	};
+
+/**
+ * This class provide details and to serialize data to the API retreiving Authenticated PluginID List 
+ */
+class CSmfPluginIDListParams : public CBase
+	{
+public:
+	/**
+	 * destructor
+	 */
+	~CSmfPluginIDListParams()
+		{
+		iPluginList.ResetAndDestroy();
+		delete iRegistrationToken;
+		}
+
+	/**
+	 * Method to externalize the member variables
+	 * @param aStream The Write Stream to be filled.
+	 */
+	void ExternalizeL(RWriteStream& aStream);
+
+	/**
+	 * Method to internalize the member variables
+	 * @param aSource the source to read from
+	 */
+	void InternalizeL(const RBuf8& aSource);
+	/**
+	 * array in symbian to hold plugin list
+	 */
+	RPointerArray<HBufC> iPluginList;
+	/**
+	 * buf to hold registration token for which the list of plugins will be queried
+	 */
+	HBufC* iRegistrationToken;
+	};
+
+/**
+ * Class to provide details of data to API storing Parameters during Authentication process
+ */
+class CSmfStoreAuthParams : public CBase
+	{
+public:
+	/**
+	 * destructor
+	 */
+	~CSmfStoreAuthParams()
+		{
+		iAuthTokenArray.Reset();
+		iURLList.ResetAndDestroy();
+		iPluginIDList.ResetAndDestroy();
+		delete iRegistrationToken;
+		delete iAuthAppID;
+		}
+
+	/**
+	 * Method to externalize the member variables
+	 * @param aStream The Write Stream to be filled.
+	 */
+	void ExternalizeL(RWriteStream& aStream);
+
+	/**
+	 * Method to internalize the member variables
+	 * @param aSource the source to read from
+	 */
+	void InternalizeL(const RBuf8& aSource);
+	/**
+	 * array to hold TSmfAuthToken elements
+	 */
+	RArray<TSmfAuthToken> iAuthTokenArray;
+	/**
+	 * array to hold list of plugins
+	 */
+	RPointerArray<HBufC> iPluginIDList;
+	/**
+	 * array to hold URl list
+	 */
+	RPointerArray<HBufC> iURLList;
+	/**
+	 * buf to hold the registration token
+	 */
+	HBufC* iRegistrationToken;
+	/**
+	 * buf to hold the authentication application ID
+	 */
+	HBufC* iAuthAppID;
+	/**
+	 * flag to indicate an enabled pluginID 
+	 */
+	TBool pluginIDEnabled;
+	/**
+	 * Time by which the Auth set will expire
+	 */
+	TUint32 iValidity;
+	};
+
+/**
+ * Class to provide details of data to the API changing/updating Authenticated 
+ * plugin list
+ */
+class CSmfPluginIDUpdate : public CBase
+	{
+public:
+	~CSmfPluginIDUpdate()
+		{
+		delete iNewPluginID;
+		delete iOldPluginID;
+		}
+
+	/**
+	 * Method to externalize the member variables
+	 * @param aStream The Write Stream to be filled.
+	 */
+	void ExternalizeL(RWriteStream& aStream);
+
+	/**
+	 * Method to internalize the member variables
+	 * @param aSource the source to read from
+	 */
+	void InternalizeL(const RBuf8& aSource);
+
+	/**
+	 * Id of new plugin
+	 */
+	HBufC* iNewPluginID;
+	/**
+	 * Id of the old plugin to be replaced
+	 */
+	HBufC* iOldPluginID;
+	/**
+	 * flag to indicate an enabled pluginID 
+	 */
+	TBool pluginIDEnabled;
+	};
+
+/**
+ * Class to provide data to Signing API. 
+ */
+class CSmfSignParameters : public CBase
+{
+public:
+	/**
+	 * New Functions 
+	 */
+	static CSmfSignParameters* NewL( const TDesC8& aMessage, const TDesC8& aKey );
+	static CSmfSignParameters* NewL( const TDesC8& aData );
+	/**
+	 * Destructor 
+	 */
+	~CSmfSignParameters();
+	/**
+	 * Method to externalize the member variables
+	 * @param aStream The Write Stream to be filled.
+	 */
+	void ExternalizeL( RWriteStream& aStream ) const;
+	/**
+	 * Get Method for key. 
+	 */
+	const TDesC8& Key() const;
+	/**
+	 * Get Method for message. 
+	 */
+	const TDesC8& Message() const;
+	
+private:
+	/**
+	 * Constructor 
+	 */
+	CSmfSignParameters();
+	/**
+	 * Two Phase constructors 
+	 */
+	void ConstructL( const TDesC8& aMessage, const TDesC8& aKey );
+	void ConstructL( const TDesC8& aData );
+	
+private:
+	/**
+	 * Message to sign 
+	 */
+	RBuf8 iMessage;
+	/**
+	 * Key for the signature 
+	 */
+	RBuf8 iKey;
+};
+
+/**
+ * Class to provide RSA key details 
+ */
+class CSmfRsaKeyParameters : public CBase
+	{
+public:
+	/**
+	 * New methods 
+	 */
+	static CSmfRsaKeyParameters* NewL(
+			const TDesC& aKeyName, const TTime& startDate,
+			const TTime& endDate, const TDesC8& aKeyData );
+	static CSmfRsaKeyParameters* NewL( const TDesC8& aData );
+	
+	/**
+	 * Destructor 
+	 */
+	~CSmfRsaKeyParameters();
+	/**
+	 * Method to externalize the member variables
+	 * @param aStream The Write Stream to be filled.
+	 */
+	void ExternalizeL( RWriteStream& aStream ) const;
+	/**
+	 * Get Method for keyname. 
+	 */
+	const TDesC& KeyName() const;
+	/**
+	 * Get Method for keydata. 
+	 */
+	const TDesC8& KeyData() const;
+	/**
+	 * Get Method for start date. 
+	 */
+	const TTime& StartDate() const;
+	/**
+	 * Get Method for end date. 
+	 */
+	const TTime& EndDate() const;
+	
+private:
+	/**
+	 * Two phase constructors 
+	 */
+	void ConstructL(
+			const TDesC& aKeyName, const TTime& startDate,
+			const TTime& endDate, const TDesC8& aKeyData );
+	void ConstructL( const TDesC8& aData );
+			
+private:
+	/**
+	 * Name of the key pair 
+	 */
+	RBuf iKeyName;
+	/**
+	 * Data of the key pair 
+	 */
+	RBuf8 iKeyData;
+	/**
+	 * Start date of validity 
+	 */
+	TTime iStartDate;
+	/**
+	 * End date of validity 
+	 */
+	TTime iEndDate;
+	};
+
+#endif /* CSMFCREDMGRCLIENTDATASTRUCT_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/smf/smfcredentialmgr/smfcredmgrcommon/inc/smfcredmgrclientglobal.h	Wed Jun 23 19:51:49 2010 +0530
@@ -0,0 +1,57 @@
+/**
+ * Copyright (c) 2010 Sasken Communication Technologies Ltd.
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of the "Eclipse Public License v1.0"
+ * which accompanies  this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html"
+ *
+ * Initial Contributors:
+ * Pritam Roy Biswas, Sasken Communication Technologies Ltd - Initial contribution
+ *
+ * Description:
+ * The header represents the error code, typedefs and export macro declaration for
+ *  CredMgr Server-client
+ *
+ */
+
+#ifndef SMFCREDMGRCLIENTGLOBAL_H
+#define SMFCREDMGRCLIENTGLOBAL_H
+
+#include <QtCore/qglobal.h>
+#include <QByteArray>
+#include <QMap>
+
+typedef QMap<QByteArray, QByteArray> SmfAuthParams;
+
+#if defined(SMFCREDMGRCLIENT_LIBRARY)
+#  define SmfCredMgrClient_EXPORT Q_DECL_EXPORT
+#else
+#  define SmfCredMgrClient_EXPORT Q_DECL_IMPORT
+#endif
+
+/**
+ *Enumeration to represent Error occured during API call
+ *todo- to be used later
+ */
+enum SMFCredMgrErrorCode
+	{
+	/**
+	 *No error has occured
+	 */
+	SmfErrNone = 200,
+	/**
+	 *Plugin not autherised
+	 */
+	SmfErrUnAutherised,
+	/**
+	 *Parameters of API are unexpected/invalid
+	 */
+	SmfErrBadParameter,
+	/**
+	 *Error reason is not known
+	 */
+	SmfErrUnKnown
+	};
+
+#endif // SMFCREDMGRCLIENTGLOBAL_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/smf/smfcredentialmgr/smfcredmgrcommon/inc/smfcredmgrcommon.h	Wed Jun 23 19:51:49 2010 +0530
@@ -0,0 +1,154 @@
+/**
+ * Copyright (c) 2010 Sasken Communication Technologies Ltd.
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of the "Eclipse Public License v1.0"
+ * which accompanies  this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html"
+ *
+ * Initial Contributors:
+ * Pritam Roy Biswas, Sasken Communication Technologies Ltd - Initial contribution
+ *
+ * Description:
+ * This header contains common data-types between the server and client
+ */
+/**
+ *  @section CredentialMgr_info Implementation Information
+ *  Currently there are 9 Apis exposed by the CredMgr Client. 
+ *  
+ *  The client is a Dll which will be used by Apps to get the CredMgr services. 
+ *  The server is a seperate EXE(process). 
+ *  
+ *  There is also a static LIB SmfCredMgrCommon which contains data structures that are
+ *  common between the server-client. 
+ * 
+ *  Currently data is given to server to store in a Database using @ref storeAuthData()
+ *  and the other APIs are used to retrieve the data from the server-database 
+ *  using SqLite queries.
+ * 
+ * 	So, generally to store authentication data the flow is like 
+ * @msc {
+ * SmfCredMgrClient, SmfCredMgrClient_p, RSmfCredMgrClientSession, SmfCredMgrServer, SmfCredMgrServerSession, CSmfCredMgrDbUser;
+ * SmfCredMgrClient->SmfCredMgrClient_p  [label = "storeAuthData()"];
+ * SmfCredMgrClient_p=>SmfCredMgrClient_p  [label = "ConversionsOfDatatypeAndSerializing"];
+ * SmfCredMgrClient_p->RSmfCredMgrClientSession  [label = "RequestService()"];
+ * RSmfCredMgrClientSession->SmfCredMgrServerSession  [label = "SendReceive()"];
+ * SmfCredMgrServerSession=>SmfCredMgrServerSession  [label = "GenerateRegToken()"];
+ * SmfCredMgrServerSession->CSmfCredMgrDbUser  [label = "InsertTables"];
+ * SmfCredMgrClient_p<-SmfCredMgrServerSession  [label = "return = Registration Token"];
+ * SmfCredMgrClient<-SmfCredMgrClient_p  [label = "return = Registration Token"];
+ * };
+ *
+ *  The flag associated to each Plugin ID is now taken as a generic flag to entire 
+ * PluginList during storing in  storeAuthData() API ,i.e if Flag = 1 the 
+ * entire List of Plugins are enabled. 
+ * 
+ *  The NONCE and Registration Token are to be generated using SecureRandomL() library function.
+ *   
+ *  @Todo-  1)The validity check of the authentication data at the server side is an open item yet and is to be implemented. 
+ *  This will require the signal-slot implementation at the client side to notify authentication expiry. The error handling 
+ *  and also state-machine (if required) are to be implemented. 2) The process id of SmfServer needs to be checked inside 
+ *  credmgr to ensure nobody else reads the keys. 
+ *   
+ */
+#ifndef COMMON_H_
+#define COMMON_H_
+#include <e32base.h>
+#include <e32debug.h>
+/**
+ *Name of the server.
+ */
+_LIT(KCredMgrServerName,"smfcredmgrserver");
+_LIT(KCredMgrServerSemaphoreName, "smfcredmgrserversemaphore" );
+_LIT(KCredMgrServerFilename, "smfcredmgrserver" );
+
+const TUint KDefaultMessageSlots = 10;
+/**
+ * Version of the server
+ */
+const TUint KSecureServMajorVersionNumber = 1;
+const TUint KSecureServMinorVersionNumber = 0;
+const TUint KSecureServBuildVersionNumber = 0;
+
+/**
+ *Enumeration to represent Cryptographic Algorithm useds
+ */
+enum SmfSignatureMethod
+	{
+	/**
+	 * Enum for no algorithm
+	 */
+	ESmfNoSigningMethod = 0,
+	/**
+	 *Enum for algorithm RSA-SHA1
+	 */
+	ESMFRSAProtocol,
+
+	/**
+	 *Enum for algorithm HMAC-SHA1
+	 */
+	ESMFHMACProtocol,
+	/**
+	 *Enum for Plain Tezt
+	 */
+	ESMFPlainText,
+	/**
+	 *Enum for SHA256
+	 */
+	ESMFSHA256Protocol
+	};
+
+/**
+ * Op codes supported by the server
+ */
+enum TCredentialServerRequestID
+	{
+	/**
+	 * Op code to check plugin is authorised
+	 * */
+	ECheckPluginAuthentication = 1,
+
+	/**
+	 * Op code to store entire set of data while authentication
+	 * */
+	EStoreAuthData,
+
+	/**
+	 * Op code to send OAuth key set i.e SmfAuthParams
+	 * */
+	ESendAuthDataSet,
+
+	/**
+	 * Op code to send authenticated plugin list
+	 * */
+	ESendPluginIDList,
+
+	/**
+	 * Op code to send URL list.
+	 */
+	ESendURLList,
+
+	/**
+	 * Op code to update plugin list.
+	 */
+	EUpdatePluginIDList,
+
+	/**
+	 * Op code to store RSA keys.
+	 */
+	ESmfStoreRSAKey,
+	/**
+	 * Op code to sign message using RSA algo.
+	 */
+	ESmfRSASignMessage,
+	/**
+	 * Op code to sign using HAMC-SHA1 algo.
+	 */
+	ESmfHMACSHA1SignMessage,
+	/**
+	 * Op code to delete RSA keys.
+	 */
+	ESmfDeleteKeys
+	};
+
+#endif /* COMMON_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/smf/smfcredentialmgr/smfcredmgrcommon/inc/smfutils.h	Wed Jun 23 19:51:49 2010 +0530
@@ -0,0 +1,72 @@
+/**
+ * Copyright (c) 2010 Sasken Communication Technologies Ltd.
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of the "Eclipse Public License v1.0"
+ * which accompanies  this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html"
+ *
+ * Initial Contributors:
+ * Lasse Laasonen, Sasken Communication Technologies Ltd - Initial contribution
+ *
+ * Description:
+ * This header contains utility routines used by server and client
+ */
+
+#ifndef SMFUTILS_H_
+#define SMFUTILS_H_
+
+#include <e32base.h>
+
+class RWriteStream;
+class RReadStream;
+
+/**
+ * Utility to serialize data
+ */
+namespace SmfUtils
+	{
+	/**
+	 * Method to externalize
+	 * @param aDes descriptor to be externalized
+	 * @param aStream The Write Stream to be filled.
+	 */
+	void ExternalizeDesL(const TDesC8& aDes, RWriteStream& aStream);
+
+	/**
+	 * Method to internalize 
+	 * @param aDes descriptor to be internalized
+	 * @param aStream the stream to read from.
+	 */
+	TInt InternalizeDesL(RBuf8& aDes, RReadStream& aStream);
+
+	/**
+	 * Method to externalize
+	 * @param aDes descriptor to be externalized
+	 * @param aStream The Write Stream to be filled.
+	 */
+	void ExternalizeDesL(const TDesC16& aDes, RWriteStream& aStream);
+
+	/**
+	 * Method to internalize 
+	 * @param aStream the stream to read from.
+	 */
+	HBufC16* InternalizeDesL(RReadStream& aStream);
+
+	TInt InternalizeDesL( RBuf16& aDes, RReadStream& aStream );
+	/**
+	 * Method to externalize 
+	 * @param aInt integer to be externalized
+	 * @param aStream The Write Stream to be filled.
+	 */
+	void ExternalizeInt64L(const TInt64& aInt, RWriteStream& aStream);
+
+	/**
+	 * Method to internalize 
+	 * @param aInt integer to be internalized
+	 * @param aStream the stream to read from.
+	 */
+	void InternalizeInt64L(TInt64& aInt, RReadStream& aStream);
+	}
+
+#endif /* SMFUTILS_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/smf/smfcredentialmgr/smfcredmgrcommon/smfcredmgrcommon.pro	Wed Jun 23 19:51:49 2010 +0530
@@ -0,0 +1,21 @@
+######################################################################
+#/*
+#========================================================================
+# Name        : smfcredmgrcommon.pro
+# Author      : Pritam Roy Biswas
+# Copyright   : Copyright (c) 2009-2010, Sasken Communication Technologies Ltd.
+# Description : 
+#========================================================================
+# */
+######################################################################
+
+TEMPLATE = subdirs
+symbian:
+    {
+	BLD_INF_RULES.prj_exports += inc/smfcredmgrclientdatastruct.h
+	BLD_INF_RULES.prj_exports += inc/smfcredmgrclientglobal.h
+	BLD_INF_RULES.prj_exports += inc/smfutils.h
+	BLD_INF_RULES.prj_exports += inc/smfcredmgrcommon.h
+    BLD_INF_RULES.prj_mmpfiles = "group/smfcredmgrcommon.mmp"
+    }
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/smf/smfcredentialmgr/smfcredmgrcommon/src/smfcredmgrclientdatastruct.cpp	Wed Jun 23 19:51:49 2010 +0530
@@ -0,0 +1,404 @@
+/**
+ * Copyright (c) 2010 Sasken Communication Technologies Ltd.
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of the "Eclipse Public License v1.0"
+ * which accompanies  this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html"
+ *
+ * Initial Contributors:
+ * Pritam Roy Biswas, Sasken Communication Technologies Ltd - Initial contribution
+ *
+ * Description:
+ *	This source file gives different data classes to be used
+ * by Credential Manager Client and Server for data transfer.	
+ *
+ */
+
+#include "smfcredmgrclientdatastruct.h"
+#include "smfutils.h"
+#include <f32file.h>
+
+void TSmfAuthToken::ExternalizeL(RWriteStream& aStream)
+	{
+
+	TPtr firstArgPtr(iKey->Des());
+	SmfUtils::ExternalizeDesL(firstArgPtr, aStream);
+
+	TPtr secondArgPtr(iSecret->Des());
+	SmfUtils::ExternalizeDesL(secondArgPtr, aStream);
+	}
+
+void TSmfAuthToken::InternalizeL(RReadStream& aStream)
+	{
+
+	// Delete the current values
+	delete iKey;
+	iKey = SmfUtils::InternalizeDesL(aStream);
+
+	delete iSecret;
+	iSecret = SmfUtils::InternalizeDesL(aStream);
+	}
+
+void CSmfFetchAuthTokenSet::ExternalizeL(RWriteStream& aStream)
+	{
+	aStream.WriteUint32L(iValidity);
+
+	TPtr tokenPtr(iRegistrationToken->Des());
+	SmfUtils::ExternalizeDesL(tokenPtr, aStream);
+
+	TInt32 countTokenSet = iAuthTokenArray.Count();
+	aStream.WriteInt32L(countTokenSet);
+
+	for (int i = 0; i < countTokenSet; i++)
+		{
+		iAuthTokenArray[i].ExternalizeL(aStream);
+		}
+
+	}
+
+void CSmfFetchAuthTokenSet::InternalizeL(const RBuf8& aSource)
+	{
+	// Create stream to read from the given buffer
+	RDesReadStream stream(aSource);
+	CleanupClosePushL(stream);
+
+	iValidity = stream.ReadUint32L();
+	
+	// Delete the current values
+	delete iRegistrationToken;
+	iRegistrationToken = SmfUtils::InternalizeDesL(stream);
+
+	TInt32 countTokenSet = stream.ReadInt32L();
+	iAuthTokenArray.Reset();
+	for (int i = 0; i < countTokenSet; i++)
+		{
+		TSmfAuthToken set;
+		set.InternalizeL(stream);
+		iAuthTokenArray.Insert(set, i);
+		}
+	CleanupStack::PopAndDestroy(&stream);
+	}
+
+void CSmfURLListParams::ExternalizeL(RWriteStream& aStream)
+	{
+	TInt32 countPlugin = iURLList.Count();
+	aStream.WriteInt32L(countPlugin);
+	for (int i = 0; i < countPlugin; i++)
+		{
+		TPtr pluginBufPtr(iURLList[i]->Des());
+		SmfUtils::ExternalizeDesL(pluginBufPtr, aStream);
+		}
+
+	TPtr tokenPtr(iPluginID->Des());
+	SmfUtils::ExternalizeDesL(tokenPtr, aStream);
+	}
+
+void CSmfURLListParams::InternalizeL(const TDesC8& aSource)
+	{
+	// Create stream to read from the given buffer
+	RDesReadStream stream(aSource);
+	CleanupClosePushL(stream);
+
+	//internalize plugin ids
+	TInt32 countPlugin = stream.ReadInt32L();
+	iURLList.Reset();
+	for (int i = 0; i < countPlugin; i++)
+		{
+		HBufC* bufPlugin(SmfUtils::InternalizeDesL(stream));
+		iURLList.Insert(bufPlugin, i);
+		}
+	iPluginID = SmfUtils::InternalizeDesL(stream);
+
+	CleanupStack::PopAndDestroy(&stream);
+	}
+
+void CSmfPluginIDListParams::ExternalizeL(RWriteStream& aStream)
+	{
+	TPtr tokenPtr(iRegistrationToken->Des());
+	SmfUtils::ExternalizeDesL(tokenPtr, aStream);
+
+	TInt32 countPlugin = iPluginList.Count();
+	aStream.WriteInt32L(countPlugin);
+	for (int i = 0; i < countPlugin; i++)
+		{
+		TPtr pluginBufPtr(iPluginList[i]->Des());
+		SmfUtils::ExternalizeDesL(pluginBufPtr, aStream);
+		}
+	}
+
+void CSmfPluginIDListParams::InternalizeL(const RBuf8& aSource)
+	{
+	// Create stream to use given buffer.
+	RDesReadStream stream(aSource);
+	CleanupClosePushL(stream);
+
+	// Delete the current values
+	delete iRegistrationToken;
+	iRegistrationToken = SmfUtils::InternalizeDesL(stream);
+
+	//internalize plugin ids
+	TInt32 countPlugin = stream.ReadInt32L();
+	iPluginList.Reset();
+	for (int i = 0; i < countPlugin; i++)
+		{
+		HBufC* bufPlugin(SmfUtils::InternalizeDesL(stream));
+		iPluginList.Insert(bufPlugin, i);
+		}
+	CleanupStack::PopAndDestroy(&stream);
+	}
+
+void CSmfStoreAuthParams::ExternalizeL(RWriteStream& aStream)
+	{
+	aStream.WriteInt32L(pluginIDEnabled);
+
+	aStream.WriteUint32L(iValidity);
+
+	TPtr tokenPtr(iRegistrationToken->Des());
+	SmfUtils::ExternalizeDesL(tokenPtr, aStream);
+
+	TPtr AuthAppIdPtr(iAuthAppID->Des());
+	SmfUtils::ExternalizeDesL(AuthAppIdPtr, aStream);
+
+	TInt32 countTokenSet = iAuthTokenArray.Count();
+	aStream.WriteInt32L(countTokenSet);
+
+	for (int i = 0; i < countTokenSet; i++)
+		{
+		iAuthTokenArray[i].ExternalizeL(aStream);
+		}
+
+	TInt32 countPlugin = iPluginIDList.Count();
+
+	aStream.WriteInt32L(countPlugin);
+
+	for (int i = 0; i < countPlugin; i++)
+		{
+
+		TPtr pluginBufPtr(iPluginIDList[i]->Des());
+		SmfUtils::ExternalizeDesL(pluginBufPtr, aStream);
+		}
+
+	TInt32 countUrl = iURLList.Count();
+	aStream.WriteInt32L(countUrl);
+
+	for (int i = 0; i < countUrl; i++)
+		{
+		TPtr urlBufPtr(iURLList[i]->Des());
+		SmfUtils::ExternalizeDesL(urlBufPtr, aStream);
+		}
+	}
+
+void CSmfStoreAuthParams::InternalizeL(const RBuf8& aSource)
+	{
+	// Create stream to read from the given buffer
+	RDesReadStream stream(aSource);
+	CleanupClosePushL(stream);
+
+	pluginIDEnabled = stream.ReadInt32L();
+
+	iValidity = stream.ReadUint32L();
+
+	// Delete the current values
+	delete iRegistrationToken;
+	iRegistrationToken = SmfUtils::InternalizeDesL(stream);
+
+	delete iAuthAppID;
+	iAuthAppID = SmfUtils::InternalizeDesL(stream);
+
+	TInt32 countTokenSet = stream.ReadInt32L();
+	iAuthTokenArray.Reset();
+	for (int i = 0; i < countTokenSet; i++)
+		{
+		TSmfAuthToken set;
+		set.InternalizeL(stream);
+		iAuthTokenArray.Insert(set, i);
+		}
+
+	//internalize plugin ids
+	TInt32 countPlugin = stream.ReadInt32L();
+	iPluginIDList.Reset();
+	for (int i = 0; i < countPlugin; i++)
+		{
+		HBufC* bufPlugin = SmfUtils::InternalizeDesL(stream);
+		iPluginIDList.Insert(bufPlugin, i);
+		}
+
+	//internalize URLs
+	TInt32 countURL = stream.ReadInt32L();
+	iURLList.Reset();
+	for (int i = 0; i < countURL; i++)
+		{
+		HBufC* bufURL = SmfUtils::InternalizeDesL(stream);
+		iURLList.Insert(bufURL, i);
+		}
+	CleanupStack::PopAndDestroy(&stream);
+	}
+
+void CSmfPluginIDUpdate::ExternalizeL(RWriteStream& aStream)
+	{
+	aStream.WriteInt32L(pluginIDEnabled);
+
+	TPtr newPtr(iNewPluginID->Des());
+	SmfUtils::ExternalizeDesL(newPtr, aStream);
+
+	TPtr oldPtr(iOldPluginID->Des());
+	SmfUtils::ExternalizeDesL(oldPtr, aStream);
+	}
+
+void CSmfPluginIDUpdate::InternalizeL(const RBuf8& aSource)
+	{
+	// Create stream to read from the given buffer
+	RDesReadStream stream(aSource);
+	CleanupClosePushL(stream);
+
+	pluginIDEnabled = stream.ReadInt32L();
+
+	// Delete the current values
+	delete iNewPluginID;
+	iNewPluginID = SmfUtils::InternalizeDesL(stream);
+
+	delete iOldPluginID;
+	iOldPluginID = SmfUtils::InternalizeDesL(stream);
+
+	CleanupStack::PopAndDestroy(&stream);
+	}
+
+CSmfSignParameters* CSmfSignParameters::NewL(
+	const TDesC8& aMessage, const TDesC8& aKey ) 
+	{
+	CSmfSignParameters* self = new( ELeave ) CSmfSignParameters();
+	CleanupStack::PushL( self );
+	self->ConstructL( aMessage, aKey );
+	CleanupStack::Pop( self );
+	return self;
+	}
+
+CSmfSignParameters* CSmfSignParameters::NewL( const TDesC8& aData ) 
+	{
+	CSmfSignParameters* self = new( ELeave ) CSmfSignParameters();
+	CleanupStack::PushL( self );
+	self->ConstructL( aData );
+	CleanupStack::Pop( self );
+	return self;
+	}
+
+CSmfSignParameters::~CSmfSignParameters() 
+	{
+	iMessage.Close();
+	iKey.Close();
+	}
+
+void CSmfSignParameters::ExternalizeL( RWriteStream& aStream ) const
+	{
+	SmfUtils::ExternalizeDesL( iMessage, aStream );
+	SmfUtils::ExternalizeDesL( iKey, aStream );
+	}
+
+const TDesC8& CSmfSignParameters::Key() const 
+	{
+	return iKey;
+	}
+
+const TDesC8& CSmfSignParameters::Message() const 
+	{
+	return iMessage;
+	}
+
+CSmfSignParameters::CSmfSignParameters() 
+	{
+	}
+
+void CSmfSignParameters::ConstructL( const TDesC8& aMessage, const TDesC8& aKey )
+	{
+	iMessage.CreateL( aMessage );
+	iKey.CreateL( aKey );
+	}
+
+void CSmfSignParameters::ConstructL( const TDesC8& aData ) 
+	{
+	RDesReadStream stream( aData );
+	CleanupClosePushL( stream );
+	SmfUtils::InternalizeDesL( iMessage, stream );
+	SmfUtils::InternalizeDesL( iKey, stream );
+	CleanupStack::PopAndDestroy( &stream );
+	}
+
+CSmfRsaKeyParameters* CSmfRsaKeyParameters::NewL(
+		const TDesC& aKeyName, const TTime& startDate,
+		const TTime& endDate, const TDesC8& aKeyData )
+	{
+	CSmfRsaKeyParameters* self = new( ELeave ) CSmfRsaKeyParameters;
+	CleanupStack::PushL( self );
+	self->ConstructL( aKeyName, startDate, endDate, aKeyData );
+	CleanupStack::Pop( self );
+	return self;
+	}
+
+CSmfRsaKeyParameters* CSmfRsaKeyParameters::NewL( const TDesC8& aData )
+	{
+	CSmfRsaKeyParameters* self = new( ELeave ) CSmfRsaKeyParameters;
+	CleanupStack::PushL( self );
+	self->ConstructL( aData );
+	CleanupStack::Pop( self );
+	return self;
+	}
+
+CSmfRsaKeyParameters::~CSmfRsaKeyParameters() 
+	{
+	iKeyName.Close();
+	iKeyData.Close();
+	}
+
+void CSmfRsaKeyParameters::ExternalizeL( RWriteStream& aStream ) const
+	{
+	SmfUtils::ExternalizeDesL( iKeyName, aStream );
+	SmfUtils::ExternalizeDesL( iKeyData, aStream );
+	SmfUtils::ExternalizeInt64L( iStartDate.Int64(), aStream );
+	SmfUtils::ExternalizeInt64L( iEndDate.Int64(), aStream );		
+	}
+
+const TDesC& CSmfRsaKeyParameters::KeyName() const
+	{
+	return iKeyName;
+	}
+
+const TDesC8& CSmfRsaKeyParameters::KeyData() const
+	{
+	return iKeyData;
+	}
+
+const TTime& CSmfRsaKeyParameters::StartDate() const
+	{
+	return iStartDate;
+	}
+
+const TTime& CSmfRsaKeyParameters::EndDate() const
+	{
+	return iEndDate;
+	}
+
+void CSmfRsaKeyParameters::ConstructL( 
+		const TDesC& aKeyName, const TTime& startDate,
+		const TTime& endDate, const TDesC8& aKeyData )
+	{
+	iKeyName.CreateL( aKeyName );
+	iKeyData.CreateL( aKeyData );
+	iStartDate = startDate;
+	iEndDate = endDate;
+	}
+
+void CSmfRsaKeyParameters::ConstructL( const TDesC8& aData )
+	{
+	RDesReadStream stream( aData );
+	CleanupClosePushL( stream );
+	SmfUtils::InternalizeDesL( iKeyName, stream );
+	SmfUtils::InternalizeDesL( iKeyData, stream );
+	TInt64 startDate;
+	TInt64 endDate;
+	SmfUtils::InternalizeInt64L( startDate, stream );
+	SmfUtils::InternalizeInt64L( endDate, stream );
+	iStartDate = TTime( startDate );
+	iEndDate = TTime( endDate );
+	CleanupStack::PopAndDestroy( &stream );	
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/smf/smfcredentialmgr/smfcredmgrcommon/src/smfutils.cpp	Wed Jun 23 19:51:49 2010 +0530
@@ -0,0 +1,103 @@
+/**
+ * Copyright (c) 2010 Sasken Communication Technologies Ltd.
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of the "Eclipse Public License v1.0"
+ * which accompanies  this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html"
+ *
+ * Initial Contributors:
+ * Lasse Laasonen, Sasken Communication Technologies Ltd - Initial contribution
+ *
+ * Description:
+ * This header contains utility routines used by server and client
+ */
+
+#include <s32strm.h>
+#include "smfutils.h"
+
+namespace SmfUtils
+	{
+	void ExternalizeDesL(const TDesC8& aDes, RWriteStream& aStream)
+		{
+		TInt length = aDes.Length();
+		aStream.WriteInt32L(length);
+
+		if (length > 0)
+			{
+			aStream << aDes;
+			}
+		}
+
+	TInt InternalizeDesL(RBuf8& aDes, RReadStream& aStream)
+		{
+		TInt length = aStream.ReadInt32L();
+		aDes.Close();
+
+		if (length > 0)
+			{
+			aDes.CreateL(aStream, length);
+			}
+		else
+			{
+			aDes.CreateL(KNullDesC8);
+			}
+
+		return length;
+		}
+
+	void ExternalizeDesL(const TDesC16& aDes, RWriteStream& aStream)
+		{
+		TInt length = aDes.Length();
+		aStream.WriteInt32L(length);
+
+		if (length > 0)
+			{
+			aStream << aDes;
+			}
+		}
+
+	HBufC16* InternalizeDesL(RReadStream& aStream)
+		{
+		TInt length = aStream.ReadInt32L();
+		if (length)
+			{
+			HBufC* buf = HBufC::NewL(aStream, length);
+			return buf;
+			}
+		else
+			return NULL;
+		}
+	TInt InternalizeDesL( RBuf16& aDes, RReadStream& aStream )
+	    {
+	    TInt length = aStream.ReadInt32L();
+	    
+	    aDes.Close();
+	    
+	    if( length > 0 )
+	        {
+	        aDes.CreateL( aStream, length );
+	        }
+	    else
+	        {
+	        aDes.CreateL( KNullDesC16 );
+	        }
+
+	    return length;
+	    }
+	void ExternalizeInt64L(const TInt64& aInt, RWriteStream& aStream)
+		{
+		TInt32 low = I64LOW( aInt );
+		TInt32 high = I64HIGH( aInt );
+		aStream.WriteInt32L(low);
+		aStream.WriteInt32L(high);
+		}
+
+	void InternalizeInt64L(TInt64& aInt, RReadStream& aStream)
+		{
+		TInt32 low = aStream.ReadInt32L();
+		TInt32 high = aStream.ReadInt32L();
+		aInt = MAKE_TINT64(high, low);
+		}
+
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/smf/smfcredentialmgr/smfcredmgrserver/group/smfcredmgrserver.mmp	Wed Jun 23 19:51:49 2010 +0530
@@ -0,0 +1,51 @@
+/*
+============================================================================
+ Name		: smfcredmgrserver
+ Author	  : pritam
+ Copyright   : Your copyright notice
+ Description : This is the project specification file for SmfCredMgrServer.
+============================================================================
+*/
+
+TARGET		  smfcredmgrserver.exe
+TARGETTYPE	  exe
+UID			 0 0xEF0FFBD7   /*5*/
+
+CAPABILITY  CAP_APPLICATION 
+
+USERINCLUDE	 ..\inc
+SYSTEMINCLUDE   \epoc32\include
+SYSTEMINCLUDE   \epoc32\include\ct
+SYSTEMINCLUDE	\epoc32\include\platform
+SYSTEMINCLUDE   \epoc32\include\stdapis
+SYSTEMINCLUDE   \epoc32\include\libc
+
+SOURCEPATH	  ..\src
+SOURCE		  smfcredmgrserver.cpp
+SOURCE		  smfcredmgrserversession.cpp 
+SOURCE		  smfcredmgrdbuser.cpp 
+SOURCE		  smfkeystoremanager.cpp
+SOURCE		  smfcredmgrdb.cpp
+
+/*MACRO		 SYMBIAN_V3  // enable this if building on symbian version 3 OS */  
+
+LIBRARY		 euser.lib
+LIBRARY		 estor.lib
+LIBRARY		 sqldb.lib 
+LIBRARY		 bafl.lib
+LIBRARY      efsrv.lib
+LIBRARY      estlib.lib
+#ifdef SYMBIAN_V3
+LIBRARY		certstore.lib
+LIBRARY		cryptography.lib
+LIBRARY		ctframework.lib
+#endif
+LIBRARY		hash.lib
+LIBRARY		flogger.lib
+LIBRARY		estor.lib
+LIBRARY		random.lib
+STATICLIBRARY	smfcredmgrcommon.lib
+
+#ifdef ENABLE_ABIV2_MODE
+DEBUGGABLE_UDEBONLY
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/smf/smfcredentialmgr/smfcredmgrserver/inc/smfcredmgrdb.h	Wed Jun 23 19:51:49 2010 +0530
@@ -0,0 +1,109 @@
+/**
+ * Copyright (c) 2010 Sasken Communication Technologies Ltd.
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of the "Eclipse Public License v1.0"
+ * which accompanies  this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html"
+ *
+ * Initial Contributors:
+ * Pritam Roy Biswas, Sasken Communication Technologies Ltd - Initial contribution
+ *
+ * Description:
+ * This header defines the database-table and the creation of database that will be 
+ *  used by the Credential Manager Server to store all 
+ *  the credentials related to an Authentication Application
+ */
+#ifndef SMFCREDMGRDB_H_
+#define SMFCREDMGRDB_H_
+#include <sqldb.h>
+#include <e32base.h>
+#include <f32file.h>
+
+//the private folder of the app
+_LIT(KSmfCredMgrDbPrivateDir, "C:\\private\\EF0FFBD7\\");
+_LIT(KSmfCredMgrDbFileName, "[EF0FFBD7]CREDMGRDB.db");
+
+//Create Table
+_LIT8(KCreatePluginIDTable,"CREATE TABLE PluginIDTable(PluginId TEXT PRIMARY KEY, AuthAppId TEXT UNIQUE, IsEnabled INT)");
+_LIT8(KCreateURLTable,"CREATE TABLE URLTable(AuthAppId TEXT UNIQUE, URL TEXT,PRIMARY KEY(AuthAppId,URL))");
+_LIT8(KCreateRegTokenValidityTable,"CREATE TABLE RegTokenValidityTable(RegistrationToken TEXT PRIMARY KEY, AuthAppId TEXT UNIQUE, Validity BIGINT)");
+_LIT8(KCreateAuthParamsTable,"CREATE TABLE AuthParamsTable(AuthAppId TEXT UNIQUE, AuthKey TEXT, AuthSecret TEXT, PRIMARY KEY(AuthAppId,AuthKey))");
+
+/**
+ * The creator class of the server database.
+ *  Derives from CBase
+ */
+class CSmfCredMgrDb : public CBase
+	{
+public:
+	/**
+	 * New Methods
+	 */
+	static CSmfCredMgrDb* NewL();
+	/**
+	 * New Methods
+	 */
+	static CSmfCredMgrDb* NewLC();
+
+	/**
+	 * destructor
+	 */
+	~CSmfCredMgrDb();
+
+private:
+	/**
+	 * constructor
+	 */
+	CSmfCredMgrDb();
+
+	/**
+	 * two phase constructor
+	 */
+	void ConstructL();
+
+	/**
+	 * Method to create the Db file
+	 * @param aFileName The file name
+	 */
+	TInt CreateDbFile(const TFileName &aFileName);
+
+	/**
+	 * Method to crete the Db tables
+	 * @param aFileName The Db file name
+	 */
+	void CompleteDBCreationL(const TFileName &aFileName);
+
+	/**
+	 * Creates the Plugin Id table 
+	 */
+	TInt PluginIDTableCreate();
+
+	/**
+	 * Creates the URL table 
+	 */
+	TInt URLTableCreate();
+
+	/**
+	 * Creates the RegistrationToken-Validity Table  
+	 */
+	TInt RegTokenValidityTableCreate();
+
+	/**
+	 * Creates the Authentication Parameters Table  
+	 */
+	TInt AuthParamsTableCreate();
+
+	/**
+	 * Deletes the Db 
+	 * @param aFileName The Db file name
+	 */
+	TInt DeleteDbFile(const TFileName &aFileName);
+
+private:
+	RFs iFileSession;
+	TFileName iDbFilePathName;
+	RSqlDatabase iDataBase;
+	};
+
+#endif /* SMFCREDMGRDB_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/smf/smfcredentialmgr/smfcredmgrserver/inc/smfcredmgrdbuser.h	Wed Jun 23 19:51:49 2010 +0530
@@ -0,0 +1,190 @@
+/**
+ * Copyright (c) 2010 Sasken Communication Technologies Ltd.
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of the "Eclipse Public License v1.0"
+ * which accompanies  this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html"
+ *
+ * Initial Contributors:
+ * Pritam Roy Biswas, Sasken Communication Technologies Ltd - Initial contribution
+ *
+ * Description:
+ * This header provides a handle to use the data-base operations like insertion, query etc. which
+ *  is used by the Credential Manager Server Sessions to operate on
+ *  Credential Manager Server Database
+ */
+#ifndef SMFCREDMGRDBUSER_H_
+#define SMFCREDMGRDBUSER_H_
+
+#include <sqldb.h>
+#include <e32base.h>
+#include <f32file.h>
+#include "smfcredmgrserversession.h"
+
+//INSERTION
+_LIT(KBegin , "BEGIN");
+_LIT(KCommit, "COMMIT");
+_LIT(KRollback, "ROLLBACK");
+_LIT(KSmfPluginIDTableInsert, "INSERT INTO PluginIDTable(PluginId, AuthAppId, IsEnabled) VALUES(:Val1, :Val2, :Val3)");
+_LIT(KSmfURLTableInsert, "INSERT INTO URLTable(AuthAppId, URL) VALUES(:Val1, :Val2)");
+_LIT(KSmfRegTokenValidityTableInsert, "INSERT INTO RegTokenValidityTable(RegistrationToken, AuthAppId, Validity) VALUES(:Val1, :Val2, :Val3)");
+_LIT(KSmfAuthParamsTableInsert, "INSERT INTO AuthParamsTable(AuthAppId, AuthKey, AuthSecret) VALUES(:Val1, :Val2, :Val3)");
+//READ
+_LIT(KSmfDbReadValidity, "SELECT Validity FROM RegTokenValidityTable WHERE AuthAppId = :iID");
+_LIT(KSmfDbReadRegistrationToken, "SELECT RegistrationToken FROM RegTokenValidityTable WHERE AuthAppId = :iID");
+_LIT(KSmfDbReadAuthTokens, "SELECT AuthKey, AuthSecret FROM AuthParamsTable WHERE AuthAppId = :iID");
+_LIT(KSmfDbReadPluginID, "SELECT PluginId, IsEnabled FROM PluginIDTable WHERE AuthAppId = :iID");
+_LIT(KSmfDbReadURL, "SELECT URL FROM URLTable WHERE AuthAppId = :iID");
+_LIT(KSmfDbReadAuthAppIdInPluginTable, "SELECT AuthAppId FROM PluginIDTable WHERE PluginId = :iID");
+_LIT(KSmfDbReadFlagInPluginTable, "SELECT IsEnabled FROM PluginIDTable WHERE PluginId = :iID");
+_LIT(KSmfDbReadAuthAppIdInRegTokenTable, "SELECT AuthAppId, Validity FROM RegTokenValidityTable WHERE RegistrationToken = :iID");
+//UPDATE 
+_LIT( KUpdatePluginID, "UPDATE PluginIDTable SET PluginId =:iText, IsEnabled =:iFlag WHERE PluginId = :iID");
+
+/**
+ * The class to use the server database i.e insert table in Db, query from Db.
+ */
+class CSmfCredMgrDbUser : public CBase
+	{
+public:
+	/**
+	 * New functions
+	 * @param aSession the session object using this class
+	 */
+	static CSmfCredMgrDbUser* NewL(CSmfCredMgrServerSession* aSession);
+	static CSmfCredMgrDbUser* NewLC(CSmfCredMgrServerSession* aSession);
+
+	/**
+	 * Destructor
+	 */
+	~CSmfCredMgrDbUser();
+
+public:
+	/**
+	 * Method to insert PluginIDTable
+	 * @param aPluginID ID of the plugin 
+	 * @param aAuthAppId ID of the Authentication app associated with the plugin
+	 * @param aEnableFlag a flag to indicate if the plugin is enabled, 
+	 * 	   i.e aEnableFlag =0 for disabled plugin
+	 */
+	TInt PluginIDTableInsert(const TDesC& aPluginID, const TDesC& aAuthAppId,
+			TBool aEnableFlag);
+
+	/**
+	 * Method to insert URLTable
+	 * @param aAuthAppId ID of the Authentication app associated with the URLs 
+	 * @param aURL the URL to be stored 
+	 */
+	TInt URLTableInsert(const TDesC& aAuthAppId, const TDesC& aURL);
+
+	/**
+	 * Method to insert RegTokenValidityTable
+	 * @param aRegToken the Registration token for the authentication app 
+	 * @param aAuthAppId ID of the Authentication app
+	 * @param aValidity time by which the set will expire 
+	 */
+	TInt RegTokenValidityTableInsert(const TDesC& aRegToken,
+			const TDesC& aAuthAppId, const TUint aValidity);
+	/**
+	 * Method to insert AuthParamsTable
+	 * @param aAuthAppId ID of the Authentication app
+	 * @param aKey The Key
+	 * @param aSecret The Secret 
+	 */
+	TInt AuthParamsTableInsert(const TDesC& aAuthAppId, const TDesC& aKey,
+			const TDesC& aSecret);
+
+	/**
+	 * Method to fetch all the plugins associated with the registration token
+	 * @param aRegToken the Registration token of the authentication app
+	 * @param aArray The array to be updated with plugin ids 
+	 */
+	void fetchPluginList(const TDesC& aRegToken, RPointerArray<HBufC>& aArray);
+
+	/**
+	 * Method to Key-Secret pairs of the Authentication app
+	 * @param aAuthAppId ID of the Authentication app
+	 * @param aArray The array containing the key-secret pair
+	 */
+	void readAuthTokens(const TDesC& aAuthAppId, RArray<TSmfAuthToken>& aArray);
+
+	/**
+	 * Method to fetch all the URLs associated with the Authentication app
+	 * @param aAuthAppId ID of the Authentication app
+	 * @param aArray The array to be updated with URLs 
+	 */
+	void readURL(const TDesC& aAuthAppId, RPointerArray<HBufC>& aArray);
+
+	/**
+	 * Method to fetch Validity of the Authentication app
+	 * @param aAuthAppId ID of the Authentication app
+	 * @param aValidity time by which the Auth set will expire
+	 */
+	void readValidity(const TDesC& aAuthAppId, TInt64& aValidity);
+
+	/**
+	 * Method to fetch Registration token of the Authentication app from RegTokenValidityTable
+	 * @param aAuthAppId ID of the Authentication app
+	 * @param aRegToken the Registration token of the authentication app
+	 */
+	void readRegistrationToken(const TDesC& aAuthAppId, TDesC& aRegToken);
+
+	/**
+	 * Method to fetch Authentication app ID from RegTokenValidityTable
+	 * @param aRegToken the Registration token of the authentication app
+	 * @param aAuthAppId ID of the Authentication app
+	 */
+	void readAuthAppIdInRegTokenTable(const TDesC& aRegToken, TDes& aAuthAppId);
+
+	/**
+	 * Method to fetch Authentication app ID from PluginIDTable
+	 * @param aPluginID the ID of the plugin
+	 * @param aAuthAppId ID of the Authentication app
+	 */
+	void readAuthAppIdInPluginIdTable(const TDesC& aPluginID, TDes& aAuthAppId);
+
+	/**
+	 * Method to read the IsEnabled flag from plugin Id table
+	 * @param aPluginID the ID of the plugin
+	 * @param aFlag flag that indicates the plugin id is enables or disabled
+	 */
+	void readFlagInPluginIdTable(const TDesC& aPluginID, TInt& aFlag);
+
+	/**
+	 * Method to change a plugin id in plugin Id table
+	 * @param aNewPluginID the ID of the new plugin
+	 * @param aFlag flag that indicates the plugin id is enables or disabled
+	 * @param aOldPluginID the ID of the plugin to be replaced
+	 */
+	TInt updatePlugin(const TDesC& aPluginID, const TBool& aFlag,
+			const TDesC& aOldPluginID);
+
+	/**
+	 * Method to fetch a plugin id associated with Authentication App id, it is 
+	 * 	called internally by fetchPluginList().
+	 * @param aAuthAppId ID of the Authentication app
+	 * @param aArray The array to be updated with plugin ids 
+	 */
+	void readPluginId(const TDesC& aAuthAppId, RPointerArray<HBufC>& aArray);
+
+private:
+	/**
+	 * constructor
+	 */
+	CSmfCredMgrDbUser(CSmfCredMgrServerSession* aSession);
+
+	/**
+	 * Two phase constructor
+	 */
+	void ConstructL();
+
+private:
+	//data
+	RFs iFileSession;
+	TFileName iDbFilePathName;
+	RSqlDatabase iDataBase;
+	CSmfCredMgrServerSession* iSession;
+	};
+
+#endif /* SMFCREDMGRDBUSER_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/smf/smfcredentialmgr/smfcredmgrserver/inc/smfcredmgrserver.h	Wed Jun 23 19:51:49 2010 +0530
@@ -0,0 +1,91 @@
+/**
+ * Copyright (c) 2010 Sasken Communication Technologies Ltd.
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of the "Eclipse Public License v1.0"
+ * which accompanies  this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html"
+ *
+ * Initial Contributors:
+ * Pritam Roy Biswas, Sasken Communication Technologies Ltd - Initial contribution
+ *
+ * Description:
+ * Header file for Credential Manager Server.
+ */
+#ifndef __SMFCREDMGRSERVER_H__
+#define __SMFCREDMGRSERVER_H__
+
+//  Include Files
+
+#include <e32base.h>
+
+class CSmfCredMgrDb;
+
+//  Function Prototypes
+
+GLDEF_C TInt E32Main();
+
+// ----------------------------------------------------------------------------------------
+// Server's policy
+// ----------------------------------------------------------------------------------------
+static const TUint rangeCount = 1;
+static const TInt ranges[rangeCount] =
+	{
+	0
+	};
+static const TUint8 elementsIndex[rangeCount] =
+	{
+	CPolicyServer::EAlwaysPass
+	};
+static const CPolicyServer::TPolicy policy =
+	{
+	CPolicyServer::EAlwaysPass, //specifies all connect attempts should pass
+			rangeCount,
+			ranges,
+			elementsIndex,
+			NULL
+	};
+
+/**
+ * Class for Credential Manager Server.
+ *  Derives from CPolicyServer.
+ */
+class CSmfCredMgrServer : public CPolicyServer
+	{
+public:
+	/**
+	 * New Methods
+	 */
+	static CSmfCredMgrServer * NewL();
+	static CSmfCredMgrServer* NewLC();
+
+	/**
+	 * destructor
+	 */
+	~CSmfCredMgrServer();
+
+	/**
+	 * Creates a server-side session object.The session represents a 
+	 * communication link between a client and a server, and its creation 
+	 * is initiated by the client through a call to one of the 
+	 * RSessionBase::CreateSession() variants.
+	 */
+	CSession2
+			* NewSessionL(const TVersion& aVersion, const RMessage2& aMessage) const;
+
+private:
+	/**
+	 * constructor
+	 */
+	CSmfCredMgrServer();
+
+	/**
+	 * Two-phase constructor
+	 */
+	void ConstructL();
+
+private:
+	CSmfCredMgrDb* iDbCreator;
+	};
+
+#endif  // __SMFCREDMGRSERVER_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/smf/smfcredentialmgr/smfcredmgrserver/inc/smfcredmgrserversession.h	Wed Jun 23 19:51:49 2010 +0530
@@ -0,0 +1,109 @@
+/**
+ * Copyright (c) 2010 Sasken Communication Technologies Ltd.
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of the "Eclipse Public License v1.0"
+ * which accompanies  this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html"
+ *
+ * Initial Contributors:
+ * Pritam Roy Biswas, Sasken Communication Technologies Ltd - Initial contribution
+ *
+ * Description:
+ * Header file for Credential Manager Server Session.
+ */
+
+#ifndef SMFCREDMGRSERVERSESSION_H_
+#define SMFCREDMGRSERVERSESSION_H_
+
+#include <e32base.h>
+#include "smfcredmgrserver.h"
+#include "smfcredmgrclientdatastruct.h"
+#include "smfkeystoremanager.h"
+
+/**
+ * Forward declarations
+ */
+class CSmfCredMgrDbUser;
+
+/**
+ * Maximun size for buffer
+ */
+const TInt KMaxBufSize = 512;
+
+/**
+ * Class to establish a client session at server side.
+ *  Derives from CSession2
+ */
+class CSmfCredMgrServerSession : public CSession2
+	{
+public:
+	/**
+	 * New Methods
+	 * @param aServer the server object
+	 */
+	static CSmfCredMgrServerSession* NewL(CSmfCredMgrServer& aServer);
+	static CSmfCredMgrServerSession* NewLC(CSmfCredMgrServer& aServer);
+
+	/**
+	 * Destructor
+	 */
+	~CSmfCredMgrServerSession();
+
+	/**
+	 * Constructor
+	 * @param aServer The server object
+	 */
+	CSmfCredMgrServerSession(CSmfCredMgrServer& aServer);
+
+public:
+	// from CSession2
+
+	/**
+	 * Handles the servicing of a client request that has been 
+	 * passed to the server
+	 * @param aMessage The message containing the details of the client request
+	 */
+	virtual void ServiceL(const RMessage2& aMessage);
+
+private:
+	/**
+	 * Two-Phase constructor
+	 */
+	void ConstructL();
+
+	/**
+	 * Stores data to Db during Authentication process
+	 * @param aParams class containg the data to be stored at Db
+	 */
+	void storeInDb(CSmfStoreAuthParams* aParams);
+
+	/**
+	 * Retieves the plugin ids from Db
+	 * @param aParams class object to be updated
+	 */
+	void fetchPluginIDs(CSmfPluginIDListParams* aParams);
+
+	/**
+	 * Retieves the URLs from Db
+	 * @param aArg class object to be updated
+	 */
+	void fetchURLs(CSmfURLListParams* aArg);
+
+	/**
+	 * retrieves each token set from Db and updates the array of CSmfFetchAuthTokenSet
+	 * @param aParams class containg the array to be filled
+	 */
+	void getTokenArray(CSmfFetchAuthTokenSet* aParams);
+
+
+private:
+
+	CSmfCredMgrServer& iServer;
+	CSmfCredMgrDbUser* iDbUser;
+	CSmfKeyStoreManager* iKeyStore;
+	CSmfFetchAuthTokenSet* iFetchAuthTokenSetParams;
+
+	};
+
+#endif /* SMFCREDMGRSERVERSESSION_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/smf/smfcredentialmgr/smfcredmgrserver/inc/smfkeystoremanager.h	Wed Jun 23 19:51:49 2010 +0530
@@ -0,0 +1,93 @@
+/*
+ * smfkeystoremanager.h
+ *
+ *  Created on: 21.4.2010
+ *      Author: lassela
+ */
+
+#ifndef SMFKEYSTOREMANAGER_H_
+#define SMFKEYSTOREMANAGER_H_
+
+#include <e32base.h>
+#include <f32file.h>
+
+#ifdef	SYMBIAN_V3
+#include <rmpointerarray.h>
+#include <platform/mkeystore.h>
+#include <platform/flogger.h>
+
+class CUnifiedKeyStore;
+class CCTKeyInfo;
+class CRSASignature;
+#endif
+
+class CSmfSignParameters;
+class CSmfRsaKeyParameters;
+
+class CSmfKeyStoreManager : public CActive 
+	{
+public:
+	static CSmfKeyStoreManager* NewL();
+	static CSmfKeyStoreManager* NewLC();
+	
+	~CSmfKeyStoreManager();
+	
+	void HandleMessageL( const RMessage2& aMessage );
+	
+//	void GenerateKeyL( const RMessage2& aMessage );
+//	void StoreRSAKeyL( const RMessage2& aMessage );
+	
+private: // from CActive
+	void RunL();
+	void DoCancel();
+	TInt RunError(TInt aError);
+	
+private:
+	CSmfKeyStoreManager();
+	void ConstructL();
+	
+	void ContinueMessageHandlingL();
+	
+	void StoreRSAKeyL();
+	void RSA_SHA1_SignMessageL();
+	void HMAC_SHA1_SignMessageL();
+		
+	void DeleteKeys();
+	
+	void SetPassphraseTimeout();
+	
+	void ReadSignParametersL();
+	void ReadRsaKeyParametersL();
+	
+private:
+	RFs iFs;
+	
+	RPointerArray<RMessage2> iMessages;
+	CSmfSignParameters* iSignParameters;
+	CSmfRsaKeyParameters* iRsaKeyParameters;
+#ifdef	SYMBIAN_V3	
+	CCTKeyInfo*	iImportedKey;
+	CUnifiedKeyStore* iKeyStore;
+	RMPointerArray<CCTKeyInfo> iKeys;
+	MRSASigner* iRSASigner;
+	CRSASignature* iRSASignature;
+#endif
+	
+	enum {
+		EInitializingKeystore,
+		ESettingPassphraseTimeout,
+		EInitialized,
+		EGeneratingKey,
+		EImportingKey,
+		EGettingKeyList,
+		EGettingRSASigner,
+		ERSASigningMessage,
+		EListingKeys,
+		EDeletingKey,
+		EKeyDeleted		//state after the key has been deleted
+	} iState;
+	
+};
+
+
+#endif /* SMFKEYSTOREMANAGER_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/smf/smfcredentialmgr/smfcredmgrserver/sis/SmfCredMgrServer_EKA2.pkg	Wed Jun 23 19:51:49 2010 +0530
@@ -0,0 +1,24 @@
+; Installation file for Symbian OS 9.x for generic console application
+; Installation file for SmfCredMgrServer EXE
+;
+; This is an auto-generated PKG file by Carbide.
+; This file uses variables specific to Carbide builds that will not work
+; on command-line builds. If you want to use this generated PKG file from the
+; command-line tools you will need to modify the variables with the appropriate
+; values: $(EPOCROOT), $(PLATFORM), $(TARGET)
+;
+
+;
+; UID is the exe's UID
+;
+#{"smfcredmgrserver.EXE"},(0xEF0FFBD5),1,0,0
+
+
+;Localised Vendor name
+%{"Vendor-EN"}
+
+;Unique Vendor name
+:"Vendor"
+
+"$(EPOCROOT)Epoc32\release\$(PLATFORM)\$(TARGET)\smfcredmgrserver.exe"		  -"!:\sys\bin\smfcredmgrserver.exe"
+
Binary file smf/smfcredentialmgr/smfcredmgrserver/sis/SmfCredMgrServer_EKA2.sis has changed
Binary file smf/smfcredentialmgr/smfcredmgrserver/sis/SmfCredMgrServer_EKA2.sisx has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/smf/smfcredentialmgr/smfcredmgrserver/smfcredmgrserver.pro	Wed Jun 23 19:51:49 2010 +0530
@@ -0,0 +1,17 @@
+######################################################################
+#/*
+#========================================================================
+# Name        : SmfCredMgrServer.pro
+# Author      : Pritam Roy Biswas
+# Copyright   : Copyright (c) 2009-2010, Sasken Communication Technologies Ltd.
+# Description : 
+#========================================================================
+# */
+######################################################################
+
+TEMPLATE = subdirs
+symbian:
+    {
+    BLD_INF_RULES.prj_mmpfiles = "group/smfcredmgrserver.mmp"
+    }
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/smf/smfcredentialmgr/smfcredmgrserver/src/smfcredmgrdb.cpp	Wed Jun 23 19:51:49 2010 +0530
@@ -0,0 +1,147 @@
+/**
+ * SmfCredMgrDb.cpp
+ *
+ *  Created on: Apr 27, 2010
+ *      Author: pritam
+ */
+
+#include "smfcredmgrdb.h"
+#include <BAUTILS.H>
+
+CSmfCredMgrDb* CSmfCredMgrDb::NewL()
+	{
+	CSmfCredMgrDb* self = CSmfCredMgrDb::NewLC();
+	CleanupStack::Pop(self);
+	return (self);
+	}
+
+CSmfCredMgrDb* CSmfCredMgrDb::NewLC()
+	{
+	CSmfCredMgrDb* self = new (ELeave) CSmfCredMgrDb();
+	CleanupStack::PushL(self);
+	self->ConstructL();
+	return (self);
+	}
+
+CSmfCredMgrDb::CSmfCredMgrDb()
+	{
+	RDebug::Printf("in constructor db");
+	}
+
+void CSmfCredMgrDb::ConstructL()
+	{
+	//create db file 
+	TInt err = iFileSession.Connect();
+	User::LeaveIfError(err);
+
+	err = iFileSession.MkDirAll(KSmfCredMgrDbPrivateDir);
+
+	TFileName dbFileName = KSmfCredMgrDbPrivateDir();
+	dbFileName.Append(KSmfCredMgrDbFileName);
+	iDbFilePathName = dbFileName;
+	if (!BaflUtils::FileExists(iFileSession, dbFileName))
+		{
+		err = iFileSession.SetSessionToPrivate(EDriveC);
+
+		// no database exists so we make one
+		CompleteDBCreationL(dbFileName);
+		}
+	else if (BaflUtils::FileExists(iFileSession, dbFileName))
+		{
+		
+		//Reset if necessary
+		}
+
+	}
+
+CSmfCredMgrDb::~CSmfCredMgrDb()
+	{
+	//delete db file
+
+	iDataBase.Close();
+	iFileSession.Close();
+	RDebug::Printf("in destructor db");
+	}
+
+void CSmfCredMgrDb::CompleteDBCreationL(const TFileName &aFileName)
+	{
+	User::LeaveIfError(CreateDbFile(aFileName));
+	User::LeaveIfError(PluginIDTableCreate());
+	User::LeaveIfError(URLTableCreate());
+	User::LeaveIfError(RegTokenValidityTableCreate());
+	User::LeaveIfError(AuthParamsTableCreate());
+	}
+
+TInt CSmfCredMgrDb::CreateDbFile(const TFileName &aFileName)
+	{
+	TInt err(KErrNone);
+	err = iDataBase.Create(aFileName);
+	if (err != KErrNone)
+		{
+		//the empty file is deleted in case of error
+		DeleteDbFile(aFileName);
+		}
+	return err;
+
+	}
+
+TInt CSmfCredMgrDb::PluginIDTableCreate()
+	{
+	TInt err(KErrNone);
+	err = iDataBase.Exec(KCreatePluginIDTable);
+	if (err >= 0)
+		{
+		return KErrNone;
+		}
+	//delete file in case of incomplete table creation
+	DeleteDbFile(iDbFilePathName);
+	return err;
+	}
+
+TInt CSmfCredMgrDb::URLTableCreate()
+	{
+	TInt err(KErrNone);
+	err = iDataBase.Exec(KCreateURLTable);
+	if (err >= 0)
+		{
+		return KErrNone;
+		}
+	//delete file in case of incomplete table creation
+	DeleteDbFile(iDbFilePathName);
+	return err;
+	}
+
+TInt CSmfCredMgrDb::RegTokenValidityTableCreate()
+	{
+	TInt err(KErrNone);
+	err = iDataBase.Exec(KCreateRegTokenValidityTable);
+	if (err >= 0)
+		{
+		return KErrNone;
+		}
+	//delete file in case of incomplete table creation
+	DeleteDbFile(iDbFilePathName);
+	return err;
+	}
+
+TInt CSmfCredMgrDb::AuthParamsTableCreate()
+	{
+	TInt err(KErrNone);
+	err = iDataBase.Exec(KCreateAuthParamsTable);
+	if (err >= 0)
+		{
+		return KErrNone;
+		}
+	//delete file in case of incomplete table creation
+	DeleteDbFile(iDbFilePathName);
+	return err;
+	}
+
+TInt CSmfCredMgrDb::DeleteDbFile(const TFileName &aFileName)
+	{
+	//close the sql handle before deleting
+	iDataBase.Close();
+	TInt err = iDataBase.Delete(aFileName);
+	return err;
+	}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/smf/smfcredentialmgr/smfcredmgrserver/src/smfcredmgrdbuser.cpp	Wed Jun 23 19:51:49 2010 +0530
@@ -0,0 +1,597 @@
+/**
+ * Copyright (c) 2010 Sasken Communication Technologies Ltd.
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of the "Eclipse Public License v1.0"
+ * which accompanies  this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html"
+ *
+ * Initial Contributors:
+ * Pritam Roy Biswas, Sasken Communication Technologies Ltd - Initial contribution
+ *
+ * Description:
+ * This file contains routines to handle the data-base operations like insertion, query etc. 
+ * on Credential Manager Server Database
+ */
+
+#include <BAUTILS.H>
+#include "smfcredmgrdbuser.h"
+#include "smfcredmgrdb.h"
+
+CSmfCredMgrDbUser* CSmfCredMgrDbUser::NewL(CSmfCredMgrServerSession* aSession)
+	{
+	CSmfCredMgrDbUser* self = CSmfCredMgrDbUser::NewLC(aSession);
+	CleanupStack::Pop(self);
+	return (self);
+	}
+
+CSmfCredMgrDbUser* CSmfCredMgrDbUser::NewLC(CSmfCredMgrServerSession* aSession)
+	{
+	CSmfCredMgrDbUser* self = new (ELeave) CSmfCredMgrDbUser(aSession);
+	CleanupStack::PushL(self);
+	self->ConstructL();
+	return (self);
+	}
+
+void CSmfCredMgrDbUser::ConstructL()
+	{
+	TInt err = iFileSession.Connect();
+	User::LeaveIfError(err);
+
+	iFileSession.SetSessionToPrivate(EDriveC);
+
+	TFileName dbFileName;
+	iFileSession.PrivatePath(dbFileName);
+	TFindFile PrivFolder(iFileSession);
+
+	// find drive-private path
+	if (KErrNone == PrivFolder.FindByDir(dbFileName, KNullDesC))
+		{
+		dbFileName.Copy(PrivFolder.File());
+		dbFileName.Append(KSmfCredMgrDbFileName);
+		iDbFilePathName = dbFileName;
+		if (BaflUtils::FileExists(iFileSession, dbFileName))
+			{
+			//err = iDataBase.Open(dbFileName);
+			User::LeaveIfError(iDataBase.Open(dbFileName));
+			RSqlDatabase::TIsolationLevel isolationLevel =
+					RSqlDatabase::EReadUncommitted;
+			iDataBase.SetIsolationLevel(isolationLevel);
+			}
+		else
+			{
+			//file not present
+			User::Leave(KErrNotFound);
+			}
+		}
+	else
+		{
+		//path not present
+		User::Leave(KErrPathNotFound);
+		}
+	}
+
+CSmfCredMgrDbUser::CSmfCredMgrDbUser(CSmfCredMgrServerSession* aSession) :
+	iSession(aSession)
+	{
+	}
+
+CSmfCredMgrDbUser::~CSmfCredMgrDbUser()
+	{
+	iFileSession.Close();
+	iDataBase.Close();
+	}
+
+TInt CSmfCredMgrDbUser::PluginIDTableInsert(const TDesC& aPluginId,
+		const TDesC& aAuthAppId, TBool aEnableFlag)
+	{
+	TInt err(KErrNone);
+	RSqlStatement sqlStatement;
+	RSqlDatabase db;
+
+	err = db.Open(iDbFilePathName);
+	__ASSERT_DEBUG( (err >= KErrNone), User::Invariant());
+
+	err = sqlStatement.Prepare(db, KSmfPluginIDTableInsert);
+	TInt paramIndex(KErrNone);
+
+	TBuf<KMaxBufSize> pluginbuf(aPluginId);
+
+	paramIndex = sqlStatement.ParameterIndex(_L(":Val1"));
+	err = sqlStatement.BindText(paramIndex, pluginbuf);
+
+	paramIndex = sqlStatement.ParameterIndex(_L(":Val2"));
+	err = sqlStatement.BindText(paramIndex, aAuthAppId);
+
+	paramIndex = sqlStatement.ParameterIndex(_L(":Val3"));
+	err = sqlStatement.BindInt(paramIndex, aEnableFlag);
+
+	err = db.Exec(KBegin);
+	__ASSERT_DEBUG( (err >= KErrNone), User::Invariant());
+	err = sqlStatement.Exec();
+	if (KSqlErrConstraint == err)
+		{
+		//Table already present.
+		}
+	else if (err < KErrNone)
+		{
+		__ASSERT_DEBUG( (err >= KErrNone), User::Invariant());
+		}
+
+	err = db.Exec(KCommit);
+	__ASSERT_DEBUG( (err >= KErrNone), User::Invariant());
+
+	//if commit fails we have to roll back
+	if (err < KErrNone)
+		{
+		err = db.Exec(KRollback);
+		}
+	sqlStatement.Close();
+	db.Close();
+	if (err >= 0)
+		{
+		return KErrNone;
+		}
+	return err;
+	}
+
+TInt CSmfCredMgrDbUser::URLTableInsert(const TDesC& aAuthAppId,
+		const TDesC& aURL)
+	{
+	TInt err(KErrNone);
+	RSqlStatement sqlStatement;
+	RSqlDatabase db;
+
+	err = db.Open(iDbFilePathName);
+	__ASSERT_DEBUG( (err >= KErrNone), User::Invariant());
+
+	err = sqlStatement.Prepare(db, KSmfURLTableInsert);
+	TInt paramIndex(KErrNone);
+
+	paramIndex = sqlStatement.ParameterIndex(_L(":Val1"));
+	err = sqlStatement.BindText(paramIndex, aAuthAppId);
+
+	TBuf<KMaxBufSize> urlbuf(aURL);
+
+	paramIndex = sqlStatement.ParameterIndex(_L(":Val2"));
+	err = sqlStatement.BindText(paramIndex, urlbuf);
+
+	err = db.Exec(KBegin);
+	__ASSERT_DEBUG( (err >= KErrNone), User::Invariant());
+	err = sqlStatement.Exec();
+	if (KSqlErrConstraint == err)
+		{
+		//Table already present.
+		}
+	else if (err < KErrNone)
+		{
+		__ASSERT_DEBUG( (err >= KErrNone), User::Invariant());
+		}
+
+	err = db.Exec(KCommit);
+	__ASSERT_DEBUG( (err >= KErrNone), User::Invariant());
+
+	//if commit fails we have to roll back
+	if (err < KErrNone)
+		{
+		err = db.Exec(KRollback);
+		}
+	sqlStatement.Close();
+	db.Close();
+	if (err >= 0)
+		{
+		return KErrNone;
+		}
+	return err;
+	}
+
+TInt CSmfCredMgrDbUser::RegTokenValidityTableInsert(const TDesC& aRegToken,
+		const TDesC& aAuthAppId, const TUint aValidity)
+	{
+	TInt err(KErrNone);
+	RSqlStatement sqlStatement;
+	RSqlDatabase db;
+
+	TBuf<KMaxBufSize> regTokenBuf(aRegToken);
+
+	err = db.Open(iDbFilePathName);
+	__ASSERT_DEBUG( (err >= KErrNone), User::Invariant());
+
+	err = sqlStatement.Prepare(db, KSmfRegTokenValidityTableInsert);
+	TInt paramIndex(KErrNone);
+
+	paramIndex = sqlStatement.ParameterIndex(_L(":Val1"));
+	err = sqlStatement.BindText(paramIndex, aRegToken);
+
+	paramIndex = sqlStatement.ParameterIndex(_L(":Val2"));
+	err = sqlStatement.BindText(paramIndex, aAuthAppId);
+
+	paramIndex = sqlStatement.ParameterIndex(_L(":Val3"));
+	err = sqlStatement.BindInt(paramIndex, aValidity);
+
+	err = db.Exec(KBegin);
+	__ASSERT_DEBUG( (err >= KErrNone), User::Invariant());
+	err = sqlStatement.Exec();
+	if (KSqlErrConstraint == err)
+		{
+		//Table already present.
+		}
+	else if (err < KErrNone)
+		{
+		__ASSERT_DEBUG( (err >= KErrNone), User::Invariant());
+		}
+
+	err = db.Exec(KCommit);
+	__ASSERT_DEBUG( (err >= KErrNone), User::Invariant());
+
+	//if commit fails we have to roll back
+	if (err < KErrNone)
+		{
+		err = db.Exec(KRollback);
+		}
+	sqlStatement.Close();
+	db.Close();
+	if (err >= 0)
+		{
+		return KErrNone;
+		}
+	return err;
+
+	}
+
+TInt CSmfCredMgrDbUser::AuthParamsTableInsert(const TDesC& aAuthAppId,
+		const TDesC& aKey, const TDesC& aSecret)
+	{
+	TInt err(KErrNone);
+	RSqlStatement sqlStatement;
+	RSqlDatabase db;
+
+	TBuf<KMaxBufSize> keyBuf(aKey);
+	TBuf<KMaxBufSize> secretBuf(aSecret);
+
+	err = db.Open(iDbFilePathName);
+	__ASSERT_DEBUG( (err >= KErrNone), User::Invariant());
+
+	err = sqlStatement.Prepare(db, KSmfAuthParamsTableInsert);
+	TInt paramIndex(KErrNone);
+
+	paramIndex = sqlStatement.ParameterIndex(_L(":Val1"));
+	err = sqlStatement.BindText(paramIndex, aAuthAppId);
+
+	paramIndex = sqlStatement.ParameterIndex(_L(":Val2"));
+	err = sqlStatement.BindText(paramIndex, keyBuf);
+
+	paramIndex = sqlStatement.ParameterIndex(_L(":Val3"));
+	err = sqlStatement.BindText(paramIndex, secretBuf);
+
+	err = db.Exec(KBegin);
+	__ASSERT_DEBUG( (err >= KErrNone), User::Invariant());
+	err = sqlStatement.Exec();
+	if (KSqlErrConstraint == err)
+		{
+		//Table already present.
+		}
+	else if (err < KErrNone)
+		{
+		__ASSERT_DEBUG( (err >= KErrNone), User::Invariant());
+		}
+
+	err = db.Exec(KCommit);
+	__ASSERT_DEBUG( (err >= KErrNone), User::Invariant());
+
+	//if commit fails we have to roll back
+	if (err < KErrNone)
+		{
+		err = db.Exec(KRollback);
+		}
+	sqlStatement.Close();
+	db.Close();
+	if (err >= 0)
+		{
+		return KErrNone;
+		}
+	return err;
+	}
+
+void CSmfCredMgrDbUser::readFlagInPluginIdTable(const TDesC& aPluginID,
+		TInt& aFlag)
+	{
+	TInt err(KErrNone);
+
+	RSqlStatement sqlReadStatement;
+	TInt paramIndex(KErrNone);
+
+	err = sqlReadStatement.Prepare(iDataBase, KSmfDbReadFlagInPluginTable);
+
+	paramIndex = sqlReadStatement.ParameterIndex(_L(":iID"));
+	err = sqlReadStatement.BindText(paramIndex, aPluginID);
+
+	while ((err = sqlReadStatement.Next()) == KSqlAtRow)
+		{
+		//sometimes sqlStmt.Next returns KSqlAtRow even if no row is present
+		if (!sqlReadStatement.IsNull(0))
+			{
+			aFlag = sqlReadStatement.ColumnInt(0);
+			}
+		}
+	sqlReadStatement.Close();
+	}
+
+void CSmfCredMgrDbUser::readAuthAppIdInPluginIdTable(const TDesC& aPluginID,
+		TDes& aAuthAppId)
+	{
+	TInt err(KErrNone);
+
+	RSqlStatement sqlReadStatement;
+	TInt paramIndex(KErrNone);
+
+	err = sqlReadStatement.Prepare(iDataBase, KSmfDbReadAuthAppIdInPluginTable);
+
+	paramIndex = sqlReadStatement.ParameterIndex(_L(":iID"));
+	err = sqlReadStatement.BindText(paramIndex, aPluginID);
+
+	while ((err = sqlReadStatement.Next()) == KSqlAtRow)
+		{
+		//sometimes sqlStmt.Next returns KSqlAtRow even if no row is present
+		if (!sqlReadStatement.IsNull(0))
+			{
+			sqlReadStatement.ColumnText(0, aAuthAppId);
+			}
+		}
+	sqlReadStatement.Close();
+	}
+
+void CSmfCredMgrDbUser::readAuthTokens(const TDesC& aAuthAppId, RArray<
+		TSmfAuthToken>& aArray)
+	{
+	TInt err(KErrNone);
+
+	RSqlStatement sqlReadStatement;
+	TInt paramIndex(KErrNone);
+
+	err = sqlReadStatement.Prepare(iDataBase, KSmfDbReadAuthTokens);
+	paramIndex = sqlReadStatement.ParameterIndex(_L(":iID"));
+	err = sqlReadStatement.BindText(paramIndex, aAuthAppId);
+
+	while ((err = sqlReadStatement.Next()) == KSqlAtRow)
+		{
+		//sometimes sqlStmt.Next returns KSqlAtRow even if no row is present
+		if (!sqlReadStatement.IsNull(0))
+			{
+			TSmfAuthToken Set;
+
+			Set.iKey = HBufC::NewL(KMaxAuthTokenLength);
+			Set.iSecret = HBufC::NewL(KMaxAuthTokenLength);
+
+			TBuf<KMaxBufSize> keyBuf;
+			TBuf<KMaxBufSize> secretBuf;
+
+			sqlReadStatement.ColumnText(0, keyBuf);
+			sqlReadStatement.ColumnText(1, secretBuf);
+
+			Set.iKey->Des().Copy(keyBuf);
+			Set.iSecret->Des().Copy(secretBuf);
+			//add it to the array
+			aArray.Append(Set);
+
+			}
+		else
+			{
+			__ASSERT_DEBUG( 0, User::Invariant());
+			}
+		}
+	sqlReadStatement.Close();
+	}
+
+void CSmfCredMgrDbUser::fetchPluginList(const TDesC& aRegToken, RPointerArray<
+		HBufC>& aArray)
+	{
+	TBuf<KMaxBufSize> authAppID;
+	readAuthAppIdInRegTokenTable(aRegToken, authAppID);
+	readPluginId(authAppID, aArray);
+	}
+
+void CSmfCredMgrDbUser::readAuthAppIdInRegTokenTable(const TDesC& aRegToken,
+		TDes& aAuthAppId)
+	{
+	TInt err(KErrNone);
+
+	RSqlStatement sqlReadStatement;
+	TInt paramIndex(KErrNone);
+	TInt64 duration;
+	TBuf<KMaxBufSize> tokenBuf(aRegToken);
+	err = sqlReadStatement.Prepare(iDataBase,
+			KSmfDbReadAuthAppIdInRegTokenTable);
+	paramIndex = sqlReadStatement.ParameterIndex(_L(":iID"));
+	err = sqlReadStatement.BindText(paramIndex, tokenBuf);
+
+	while ((err = sqlReadStatement.Next()) == KSqlAtRow)
+		{
+		//sometimes sqlStmt.Next returns KSqlAtRow even if no row is present
+		if (!sqlReadStatement.IsNull(0))
+			{
+			duration = sqlReadStatement.ColumnInt(1);
+			if (duration) //to be checked with epoch date-time
+				{
+				sqlReadStatement.ColumnText(0, aAuthAppId);
+				}
+			}
+		else
+			{
+			__ASSERT_DEBUG( 0, User::Invariant());
+			}
+		}
+	sqlReadStatement.Close();
+	}
+void CSmfCredMgrDbUser::readPluginId(const TDesC& aAuthAppId, RPointerArray<
+		HBufC>& aArray)
+	{
+	TInt err(KErrNone);
+	RSqlStatement sqlReadStatement;
+	TInt paramIndex(KErrNone);
+	TInt flag;
+
+	err = sqlReadStatement.Prepare(iDataBase, KSmfDbReadPluginID);
+	paramIndex = sqlReadStatement.ParameterIndex(_L(":iID"));
+	err = sqlReadStatement.BindText(paramIndex, aAuthAppId);
+
+	while ((err = sqlReadStatement.Next()) == KSqlAtRow)
+		{
+		//sometimes sqlStmt.Next returns KSqlAtRow even if no row is present
+		if (!sqlReadStatement.IsNull(0))
+			{
+			flag = sqlReadStatement.ColumnInt(1);
+			if (flag > 0)
+				{
+				TBuf<KMaxBufSize> pluginbuf;
+				HBufC* buf = HBufC::NewL(KMaxBufSize);
+				sqlReadStatement.ColumnText(0, pluginbuf);
+				buf->Des().Copy(pluginbuf);
+				aArray.Append(buf);
+				}
+			}
+		else
+			{
+			__ASSERT_DEBUG( 0, User::Invariant());
+			}
+		}
+	sqlReadStatement.Close();
+	}
+
+void CSmfCredMgrDbUser::readURL(const TDesC& aAuthAppId,
+		RPointerArray<HBufC>& aArray)
+	{
+	TInt err(KErrNone);
+
+	RSqlStatement sqlReadStatement;
+	TInt paramIndex(KErrNone);
+
+	err = sqlReadStatement.Prepare(iDataBase, KSmfDbReadURL);
+	paramIndex = sqlReadStatement.ParameterIndex(_L(":iID"));
+	err = sqlReadStatement.BindText(paramIndex, aAuthAppId);
+
+	while ((err = sqlReadStatement.Next()) == KSqlAtRow)
+		{
+		//sometimes sqlStmt.Next returns KSqlAtRow even if no row is present
+		if (!sqlReadStatement.IsNull(0))
+			{
+			TBuf<KMaxBufSize> urlBuf;
+			HBufC* buf = HBufC::NewL(KMaxBufSize);
+			sqlReadStatement.ColumnText(0, urlBuf);
+			buf->Des().Copy(urlBuf);
+			aArray.Append(buf);
+			}
+		else
+			{
+			__ASSERT_DEBUG( 0, User::Invariant());
+			}
+		}
+	sqlReadStatement.Close();
+	}
+
+void CSmfCredMgrDbUser::readValidity(const TDesC& aAuthAppId, TInt64& aValidity)
+	{
+	TInt err(KErrNone);
+
+	RSqlStatement sqlReadStatement;
+	TInt paramIndex(KErrNone);
+
+	err = sqlReadStatement.Prepare(iDataBase, KSmfDbReadValidity);
+	paramIndex = sqlReadStatement.ParameterIndex(_L(":iID"));
+	err = sqlReadStatement.BindText(paramIndex, aAuthAppId);
+
+	while ((err = sqlReadStatement.Next()) == KSqlAtRow)
+		{
+		//sometimes sqlStmt.Next returns KSqlAtRow even if no row is present
+		if (!sqlReadStatement.IsNull(0))
+			{
+			aValidity = sqlReadStatement.ColumnInt64(1);
+			}
+		else
+			{
+			__ASSERT_DEBUG( 0, User::Invariant());
+			}
+		}
+	sqlReadStatement.Close();
+
+	}
+
+void CSmfCredMgrDbUser::readRegistrationToken(const TDesC& aAuthAppId,
+		TDesC& aRegToken)
+	{
+	TInt err(KErrNone);
+
+	RSqlStatement sqlReadStatement;
+	TInt paramIndex(KErrNone);
+
+	err = sqlReadStatement.Prepare(iDataBase, KSmfDbReadRegistrationToken);
+	paramIndex = sqlReadStatement.ParameterIndex(_L(":iID"));
+	err = sqlReadStatement.BindText(paramIndex, aAuthAppId);
+
+	while ((err = sqlReadStatement.Next()) == KSqlAtRow)
+		{
+		//sometimes sqlStmt.Next returns KSqlAtRow even if no row is present
+		if (!sqlReadStatement.IsNull(0))
+			{
+			aRegToken = sqlReadStatement.ColumnTextL(0);//aKey.AllocL();
+			}
+		else
+			{
+			__ASSERT_DEBUG( 0, User::Invariant());
+			}
+		}
+	sqlReadStatement.Close();
+	}
+
+TInt CSmfCredMgrDbUser::updatePlugin(const TDesC& aPluginID,
+		const TBool& aFlag, const TDesC& aOldPluginID)
+	{
+	TInt err(KErrNone);
+	RSqlStatement sqlStatement;
+	TInt paramIndex(KErrNone);
+	TBuf<KMaxBufSize> newPluginBuf(aPluginID);
+	TBuf<KMaxBufSize> OldPluginBuf(aOldPluginID);
+	RSqlDatabase db;
+
+	err = db.Open(iDbFilePathName);
+	__ASSERT_DEBUG( (err >= KErrNone), User::Invariant());
+
+	err = sqlStatement.Prepare(db, KUpdatePluginID);
+
+	paramIndex = sqlStatement.ParameterIndex(_L(":iText"));
+	err = sqlStatement.BindText(paramIndex, newPluginBuf);
+
+	paramIndex = sqlStatement.ParameterIndex(_L(":iFlag"));
+	err = sqlStatement.BindInt(paramIndex, aFlag);
+
+	paramIndex = sqlStatement.ParameterIndex(_L(":iID"));
+	err = sqlStatement.BindText(paramIndex, OldPluginBuf);
+
+	err = db.Exec(KBegin);
+	__ASSERT_DEBUG( (err >= KErrNone), User::Invariant());
+	err = sqlStatement.Exec();
+	if (KSqlErrConstraint == err)
+		{
+		//
+		}
+	else if (err < KErrNone)
+		{
+		__ASSERT_DEBUG( (err >= KErrNone), User::Invariant());
+		}
+
+	err = db.Exec(KCommit);
+	__ASSERT_DEBUG( (err >= KErrNone), User::Invariant());
+
+	//if commit fails we have to roll back
+	if (err < KErrNone)
+		{
+		err = db.Exec(KRollback);
+		}
+	sqlStatement.Close();
+	db.Close();
+	if (err >= 0)
+		{
+		return KErrNone;
+		}
+	return err;
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/smf/smfcredentialmgr/smfcredmgrserver/src/smfcredmgrserver.cpp	Wed Jun 23 19:51:49 2010 +0530
@@ -0,0 +1,137 @@
+/**
+ * Copyright (c) 2010 Sasken Communication Technologies Ltd.
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of the "Eclipse Public License v1.0"
+ * which accompanies  this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html"
+ *
+ * Initial Contributors:
+ * Pritam Roy Biswas, Sasken Communication Technologies Ltd - Initial contribution
+ *
+ * Description:
+ * Routines for Credential Manager Server.
+ */
+
+//  Include Files  
+#include <e32base.h>
+#include <e32std.h>
+#include <smfcredmgrcommon.h>
+
+#include "smfcredmgrserver.h"
+#include "smfcredmgrserversession.h"
+#include "smfcredmgrdb.h"
+
+// Perform all server initialisation, in particular creation of the
+// scheduler and server and then run the scheduler
+static void RunServerL()
+	{
+	// naming the server thread after the server helps to debug panics
+	User::LeaveIfError(User::RenameThread(KCredMgrServerName));
+
+	// create and install the active scheduler we need
+	CActiveScheduler* scheduler = new (ELeave) CActiveScheduler;
+	CleanupStack::PushL(scheduler);
+	CActiveScheduler::Install(scheduler);
+
+	// create the server (leave it on the cleanup stack)
+	CSmfCredMgrServer* server = CSmfCredMgrServer::NewL();
+	CleanupStack::PushL(server);
+
+	// Initialisation complete, now signal the client
+	RProcess::Rendezvous(KErrNone);
+
+	// Run (will block until server exits)
+	CActiveScheduler::Start();
+
+	// Cleanup the server and scheduler
+	CleanupStack::PopAndDestroy(server);
+	CleanupStack::PopAndDestroy(scheduler);
+	}
+
+// Server process entry-point
+TInt E32Main()
+	{
+
+	__UHEAP_MARK;
+
+	CTrapCleanup* cleanup = CTrapCleanup::New();
+	TInt r = KErrNoMemory;
+	if (cleanup)
+		{
+			TRAP( r, RunServerL() );
+		delete cleanup;
+		}
+
+	__UHEAP_MARKEND;
+	return r;
+	}
+
+CSmfCredMgrServer::CSmfCredMgrServer() :
+	CPolicyServer(CActive::EPriorityStandard, policy, EUnsharableSessions)
+	{
+
+	}
+
+/**
+ * CSmfCredMgrServer::NewL()
+ * Two-phased constructor.
+ */
+CSmfCredMgrServer* CSmfCredMgrServer::NewL()
+	{
+	CSmfCredMgrServer* Server = CSmfCredMgrServer::NewLC();
+	CleanupStack::Pop(Server);
+	return Server;
+	}
+
+/**
+ * CSmfCredMgrServer::NewLC()
+ * Two-phased constructor.
+ */
+CSmfCredMgrServer* CSmfCredMgrServer::NewLC()
+	{
+	CSmfCredMgrServer* Server = new (ELeave) CSmfCredMgrServer();
+	CleanupStack::PushL(Server);
+	Server->ConstructL();
+	return Server;
+	}
+
+/**
+ * CSmfCredMgrServer::ConstructL()
+ * Symbian 2nd phase constructor can leave.
+ */
+void CSmfCredMgrServer::ConstructL()
+	{
+
+	iDbCreator = CSmfCredMgrDb::NewL();
+	StartL(KCredMgrServerName);
+	RDebug::Printf("in constructor CSmfCredMgrServer");
+	}
+
+/**
+ * CSmfCredMgrServer::~CSmfCredMgrServer()
+ * Destructor.
+ */
+CSmfCredMgrServer::~CSmfCredMgrServer()
+	{
+	delete iDbCreator;
+	RDebug::Printf("in destructor CSmfCredMgrServer");
+	}
+
+/**
+ * CSmfCredMgrServer::NewSessionL
+ * Creates a new session with the server.
+ */
+CSession2* CSmfCredMgrServer::NewSessionL(const TVersion& aVersion,
+		const RMessage2& /*aMessage*/) const
+	{
+	// Check that the version is OK
+	TVersion v(KSecureServMajorVersionNumber, KSecureServMinorVersionNumber,
+			KSecureServBuildVersionNumber);
+	if (!User::QueryVersionSupported(v, aVersion))
+		User::Leave(KErrNotSupported);
+
+	return CSmfCredMgrServerSession::NewL(
+			*const_cast<CSmfCredMgrServer*> (this));
+	}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/smf/smfcredentialmgr/smfcredmgrserver/src/smfcredmgrserversession.cpp	Wed Jun 23 19:51:49 2010 +0530
@@ -0,0 +1,349 @@
+/**
+ * Copyright (c) 2010 Sasken Communication Technologies Ltd.
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of the "Eclipse Public License v1.0"
+ * which accompanies  this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html"
+ *
+ * Initial Contributors:
+ * Pritam Roy Biswas, Sasken Communication Technologies Ltd - Initial contribution
+ *
+ * Description:
+ * Header file for Credential Manager Server Session.
+ */
+
+#include <S32MEM.H>
+#include <e32math.h>
+#include <time.h>
+#include <stdlib.h>
+#include <random.h>
+#include <smfcredmgrcommon.h>
+#include <smfcredmgrclientdatastruct.h>
+#include <smfutils.h>
+
+
+#include "smfcredmgrserversession.h"
+#include "smfcredmgrserver.h"
+#include "smfcredmgrdbuser.h"
+
+CSmfCredMgrServerSession* CSmfCredMgrServerSession::NewLC(
+		CSmfCredMgrServer& aServer)
+	{
+	CSmfCredMgrServerSession* self = new (ELeave) CSmfCredMgrServerSession(
+			aServer);
+	CleanupStack::PushL(self);
+	self->ConstructL();
+	return self;
+	}
+
+CSmfCredMgrServerSession* CSmfCredMgrServerSession::NewL(
+		CSmfCredMgrServer& aServer)
+	{
+	CSmfCredMgrServerSession* self = CSmfCredMgrServerSession::NewLC(aServer);
+	CleanupStack::Pop(self);
+	return self;
+	}
+
+CSmfCredMgrServerSession::CSmfCredMgrServerSession(CSmfCredMgrServer& aServer) :
+	iServer(aServer)
+	{
+	RDebug::Printf("in constructor CSmfCredMgrServerSession");
+	}
+
+void CSmfCredMgrServerSession::ConstructL()
+	{
+	iDbUser = CSmfCredMgrDbUser::NewL(this);
+	iKeyStore = CSmfKeyStoreManager::NewL();
+	}
+
+CSmfCredMgrServerSession::~CSmfCredMgrServerSession()
+	{
+	RDebug::Printf("in destructor CSmfCredMgrServerSession");
+	delete iDbUser;
+	delete iKeyStore;
+	}
+
+void CSmfCredMgrServerSession::ServiceL(const RMessage2& aMessage)
+	{
+	TInt err = KErrNone;
+	switch (aMessage.Function())
+		{
+
+		case ESendAuthDataSet:
+			{
+			//create buffer to read the received data
+			RBuf8 dataBuf;
+			CleanupClosePushL(dataBuf);
+			dataBuf.CreateL(aMessage.GetDesLength(0));
+			aMessage.ReadL(0, dataBuf);
+			CSmfFetchAuthTokenSet* fetchAuthTokenSetParams =
+					new (ELeave) CSmfFetchAuthTokenSet;
+
+			CleanupStack::PushL(fetchAuthTokenSetParams);
+
+			fetchAuthTokenSetParams->InternalizeL(dataBuf);
+
+			getTokenArray(fetchAuthTokenSetParams);
+
+			//create buffer to serialize the data to be sent
+			CBufFlat* buf = CBufFlat::NewL(512);
+			CleanupStack::PushL(buf);
+			RBufWriteStream stream(*buf);
+			CleanupClosePushL(stream);
+
+			fetchAuthTokenSetParams->ExternalizeL(stream);
+
+			stream.CommitL();
+
+			TPtr8 bufPtr = buf->Ptr(0);
+
+			TInt err = aMessage.Write(1, bufPtr);
+
+			CleanupStack::PopAndDestroy(&stream);
+			CleanupStack::PopAndDestroy(buf);
+			CleanupStack::PopAndDestroy(fetchAuthTokenSetParams);
+			CleanupStack::PopAndDestroy(&dataBuf);
+			aMessage.Complete(err);
+			}
+			break;
+
+		case EUpdatePluginIDList:
+			{
+			//create buffer to read the received data
+			RBuf8 dataBuf;
+			CleanupClosePushL(dataBuf);
+			dataBuf.CreateL(aMessage.GetDesLength(0));
+			aMessage.ReadL(0, dataBuf);
+
+			CSmfPluginIDUpdate* changePluginListParams =
+					new (ELeave) CSmfPluginIDUpdate;
+			CleanupStack::PushL(changePluginListParams);
+
+			changePluginListParams->InternalizeL(dataBuf);
+
+			iDbUser->updatePlugin(changePluginListParams->iNewPluginID->Des(),
+					changePluginListParams->pluginIDEnabled,
+					changePluginListParams->iOldPluginID->Des());
+
+			CleanupStack::PopAndDestroy(changePluginListParams);
+			CleanupStack::PopAndDestroy(&dataBuf);
+			aMessage.Complete(err);
+			}
+			break;
+
+		case ESendURLList:
+			{
+			//create buffer to read the received data
+			RBuf8 dataBuf;
+			CleanupClosePushL(dataBuf);
+			dataBuf.CreateL(aMessage.GetDesLength(0));
+			aMessage.ReadL(0, dataBuf);
+
+			CSmfURLListParams* fetchURLListParams =
+					new (ELeave) CSmfURLListParams;
+			CleanupStack::PushL(fetchURLListParams);
+
+			fetchURLListParams->InternalizeL(dataBuf);
+
+			fetchURLs(fetchURLListParams);
+
+			//to serialize data we need a buffer
+			CBufFlat* buf = CBufFlat::NewL(512);
+			CleanupStack::PushL(buf);
+			RBufWriteStream stream(*buf);
+			CleanupClosePushL(stream);
+
+			fetchURLListParams->ExternalizeL(stream);
+
+			stream.CommitL();
+
+			TPtr8 bufPtr = buf->Ptr(0);
+
+			TInt err = aMessage.Write(1, bufPtr);
+
+			CleanupStack::PopAndDestroy(&stream);
+			CleanupStack::PopAndDestroy(buf);
+			CleanupStack::PopAndDestroy(fetchURLListParams);
+			CleanupStack::PopAndDestroy(&dataBuf);
+			aMessage.Complete(err);
+			}
+			break;
+
+		case ESendPluginIDList:
+			{
+			//create buffer to read
+			RBuf8 dataBuf;
+			CleanupClosePushL(dataBuf);
+			dataBuf.CreateL(aMessage.GetDesLength(0));
+			aMessage.ReadL(0, dataBuf);
+
+			CSmfPluginIDListParams* fetchPluginListParams =
+					new (ELeave) CSmfPluginIDListParams;
+			CleanupStack::PushL(fetchPluginListParams);
+			fetchPluginListParams->InternalizeL(dataBuf);
+
+			fetchPluginIDs(fetchPluginListParams);
+
+			//to serialize data we need a buffer
+			CBufFlat* buf = CBufFlat::NewL(512);
+			CleanupStack::PushL(buf);
+			RBufWriteStream stream(*buf);
+			CleanupClosePushL(stream);
+			fetchPluginListParams->ExternalizeL(stream);
+
+			stream.CommitL();
+
+			TPtr8 bufPtr = buf->Ptr(0);
+
+			TInt err = aMessage.Write(1, bufPtr);
+
+			CleanupStack::PopAndDestroy(&stream);
+			CleanupStack::PopAndDestroy(buf);
+			CleanupStack::PopAndDestroy(fetchPluginListParams);
+			CleanupStack::PopAndDestroy(&dataBuf);
+			aMessage.Complete(err);
+			}
+			break;
+
+		case ECheckPluginAuthentication:
+			{
+			//create buffer to read
+			RBuf8 dataBuf;
+			CleanupClosePushL(dataBuf);
+
+			dataBuf.CreateL(aMessage.GetDesLength(0));
+			aMessage.ReadL(0, dataBuf);
+
+			RDesReadStream stream(dataBuf);
+			CleanupClosePushL(stream);
+
+			TBool isAuthenticated = EFalse;
+
+			HBufC* buf = SmfUtils::InternalizeDesL(stream);
+			CleanupStack::PushL(buf);
+			TBuf<KMaxBufSize> pluginIDBuf(buf->Des());
+
+			TInt value = 0;
+			iDbUser->readFlagInPluginIdTable(pluginIDBuf, value);
+			if (value > 0)
+				isAuthenticated = ETrue;
+			else
+				isAuthenticated = EFalse;
+
+			HBufC8* isAuthenticatedBuf = HBufC8::NewLC(32);
+
+			TPtr8 isAuthenticatedBufPtr(isAuthenticatedBuf->Des());
+			isAuthenticatedBufPtr.AppendNum(isAuthenticated);
+
+			TInt err = aMessage.Write(1, isAuthenticatedBufPtr);
+
+			CleanupStack::PopAndDestroy(isAuthenticatedBuf);
+			CleanupStack::PopAndDestroy(buf);
+			CleanupStack::PopAndDestroy(&stream);
+			CleanupStack::PopAndDestroy(&dataBuf);
+			aMessage.Complete(err);
+			}
+			break;
+
+		case EStoreAuthData:
+			{
+			//create buffer to read
+			RBuf8 dataBuf;
+			CleanupClosePushL(dataBuf);
+			dataBuf.CreateL(aMessage.GetDesLength(0));
+			aMessage.ReadL(0, dataBuf);
+
+			CSmfStoreAuthParams* authenticationProcessData =
+					new (ELeave) CSmfStoreAuthParams;
+			CleanupStack::PushL(authenticationProcessData);
+
+			authenticationProcessData->InternalizeL(dataBuf);
+
+
+			TBuf8<56> regToken;
+			regToken.SetLength(regToken.MaxLength());
+			TRandom::RandomL(regToken);
+			authenticationProcessData->iRegistrationToken = HBufC::NewL(KMaxRegistrationTokenLength);
+			TPtr tokenPtr(authenticationProcessData->iRegistrationToken->Des());
+			tokenPtr.Copy(regToken);
+			storeInDb(authenticationProcessData);
+
+			aMessage.WriteL(1, regToken);
+			
+			CleanupStack::PopAndDestroy(authenticationProcessData->iRegistrationToken);
+			CleanupStack::PopAndDestroy(authenticationProcessData);
+			CleanupStack::PopAndDestroy(&dataBuf);
+			aMessage.Complete(err);
+			}
+			break;
+		case ESmfHMACSHA1SignMessage:
+		case ESmfRSASignMessage:
+		case ESmfStoreRSAKey:
+		case ESmfDeleteKeys:
+			{
+			iKeyStore->HandleMessageL(aMessage);
+			}
+			break;
+		default:
+			//todo -panic client
+			break;
+		}
+	}
+
+void CSmfCredMgrServerSession::storeInDb(
+		CSmfStoreAuthParams* aAuthenticationProcessData)
+	{
+	TBuf<KMaxBufSize> authAppIDbuf(
+			aAuthenticationProcessData->iAuthAppID->Des());
+
+	iDbUser->RegTokenValidityTableInsert(
+			aAuthenticationProcessData->iRegistrationToken->Des(),
+			authAppIDbuf, aAuthenticationProcessData->iValidity);
+
+	for (int i = 0; i < aAuthenticationProcessData->iAuthTokenArray.Count(); i++)
+		{
+		iDbUser->AuthParamsTableInsert(
+				authAppIDbuf,
+				aAuthenticationProcessData->iAuthTokenArray[i].iKey->Des(),
+				aAuthenticationProcessData->iAuthTokenArray[i].iSecret->Des());
+		}
+
+	//iterate pluginlist and insert in DB
+	for (int i = 0; i < aAuthenticationProcessData->iPluginIDList.Count(); i++)
+		{
+		HBufC* buf = aAuthenticationProcessData->iPluginIDList[i];
+		iDbUser->PluginIDTableInsert(buf->Des(), authAppIDbuf,
+				aAuthenticationProcessData->pluginIDEnabled);
+		}
+
+	//iterate URLlist and insert in DB
+	for (int i = 0; i < aAuthenticationProcessData->iURLList.Count(); i++)
+		{
+		HBufC* buf = aAuthenticationProcessData->iURLList[i];
+		iDbUser->URLTableInsert(authAppIDbuf, buf->Des());
+		}
+	}
+
+void CSmfCredMgrServerSession::fetchPluginIDs(CSmfPluginIDListParams* aParams)
+	{
+	TBuf<KMaxBufSize> tokenBuf(aParams->iRegistrationToken->Des());
+	iDbUser->fetchPluginList(tokenBuf, aParams->iPluginList);
+	}
+
+void CSmfCredMgrServerSession::fetchURLs(CSmfURLListParams* aArg)
+	{
+	TBuf<KMaxBufSize> authAppIDBuf;
+	iDbUser->readAuthAppIdInPluginIdTable(aArg->iPluginID->Des(), authAppIDBuf);
+	iDbUser->readURL(authAppIDBuf, aArg->iURLList);
+	}
+
+
+void CSmfCredMgrServerSession::getTokenArray(CSmfFetchAuthTokenSet* aParams)
+	{
+	TBuf<KMaxBufSize> authAppIDBuf;
+	iDbUser->readAuthAppIdInRegTokenTable(aParams->iRegistrationToken->Des(),
+			authAppIDBuf);
+	iDbUser->readAuthTokens(authAppIDBuf, aParams->iAuthTokenArray);
+	}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/smf/smfcredentialmgr/smfcredmgrserver/src/smfkeystoremanager.cpp	Wed Jun 23 19:51:49 2010 +0530
@@ -0,0 +1,427 @@
+/**
+ * Copyright (c) 2010 Sasken Communication Technologies Ltd.
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of the "Eclipse Public License v1.0"
+ * which accompanies  this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html"
+ *
+ * Initial Contributors:
+ * Lasse Laasonen, Sasken Communication Technologies Ltd - Initial contribution
+ *
+ * Description:
+ * This source contains routines handling RSA signing using Unified Key Store 
+ */
+
+#ifdef SYMBIAN_V3
+#include <unifiedkeystore.h>
+#include <asymmetric.h>
+#include <mctkeystore.h>
+#endif
+
+#include <smfcredmgrclientdatastruct.h>
+#include <smfcredmgrcommon.h>
+#include <hash.h>
+#include "smfkeystoremanager.h"
+
+CSmfKeyStoreManager* CSmfKeyStoreManager::NewL() {
+	CSmfKeyStoreManager* self = CSmfKeyStoreManager::NewLC();
+	CleanupStack::Pop( self );
+	return self;
+}
+
+CSmfKeyStoreManager* CSmfKeyStoreManager::NewLC() {
+	CSmfKeyStoreManager* self = new( ELeave )CSmfKeyStoreManager();
+	CleanupStack::PushL( self );
+	self->ConstructL();
+	return self;
+}
+
+CSmfKeyStoreManager::~CSmfKeyStoreManager() {
+	iFs.Close();
+	
+	delete iSignParameters;
+	iSignParameters = NULL;
+	
+	delete iRsaKeyParameters;
+	iRsaKeyParameters = NULL;
+	
+}
+
+void CSmfKeyStoreManager::HandleMessageL( const RMessage2& aMessage ) 
+	{
+	RDebug::Printf("SMF: CSmfKeyStoreManager::HandleMessageL");
+	iMessages.AppendL( &aMessage );
+	if ( !IsActive() ) 
+		{
+		ContinueMessageHandlingL();
+		}
+	}
+
+void CSmfKeyStoreManager::RunL() 
+	{
+	RDebug::Printf("SMF: CSmfKeyStoreManager::RunL, iStatus=%d", iStatus.Int() );
+	
+	switch( iState )
+		{
+		case EInitializingKeystore:
+			{
+			SetPassphraseTimeout();
+			break;			
+			}
+		case ESettingPassphraseTimeout:
+			{
+			RDebug::Printf("SMF: Key store manager initialized");
+			iState = EInitialized;
+			break;
+			}		
+#ifdef SYMBIAN_V3
+		case EGeneratingKey:
+			{
+			iState = EInitialized;
+			RDebug::Printf("SMF: Completing generate key message");			
+			iMessages[0]->Complete( iStatus.Int() );
+			iMessages.Remove(0);
+			break;
+			}
+		case EImportingKey:
+			{
+			iState = EInitialized;
+			TInt num = iStatus.Int();
+			if( iStatus.Int() == KErrNone ) 
+				{
+				iMessages[0]->WriteL( 1, iImportedKey->ID() );
+				}
+			
+			RDebug::Printf("SMF: Completing import key message");
+			iMessages[0]->Complete( iStatus.Int() );
+			iMessages.Remove(0);
+			break;
+			}
+		case EGettingKeyList:
+		case EGettingRSASigner:
+			{
+			RSA_SHA1_SignMessageL();
+			return;
+			}
+		case ERSASigningMessage:
+			{
+			iState = EInitialized;
+			
+			if ( iStatus.Int() == KErrNone ) 
+				{
+				HBufC8* signature = iRSASignature->S().BufferLC();
+				RDebug::Printf("SMF: Signed message=%S", signature);			
+				iMessages[0]->WriteL(1, *signature);			
+				CleanupStack::PopAndDestroy();
+				}
+			iMessages[0]->Complete( iStatus.Int() );
+			iMessages.Remove(0);
+			break;
+			}
+		case EListingKeys:
+			{
+			iState = EInitialized;
+			RDebug::Printf("Key count: %d", iKeys.Count() );
+			for (TInt i = 0; i < iKeys.Count(); i++)
+				{
+				CCTKeyInfo* info = iKeys[i];
+				RDebug::Printf("key label: %S", &info->Label());
+				}
+			iMessages[0]->Complete( iStatus.Int() );
+			iMessages.Remove(0);
+			break;
+			}
+		case EKeyDeleted:
+			{
+			iState = EInitialized;
+			iMessages[0]->Complete(iStatus.Int());
+			iMessages.Remove( 0 );
+			break;
+			}
+		case EDeletingKey:
+			{
+			DeleteKeys();
+			break;
+			}
+#endif
+		default:
+			{
+			break;
+			}
+		}
+		
+	if ( iMessages.Count() )
+		{
+		ContinueMessageHandlingL();
+		}	
+	}
+
+void CSmfKeyStoreManager::DoCancel() {	
+}
+
+TInt CSmfKeyStoreManager::RunError( TInt aError ) {
+	RDebug::Printf("SMF: CSmfKeyStoreManager::RunError error=%d", aError);
+	
+	if ( iMessages.Count() ) 
+		{
+		iMessages[0]->Complete( aError );
+		iMessages.Remove( 0 );
+		}
+
+	return KErrNone;
+}
+
+CSmfKeyStoreManager::CSmfKeyStoreManager() 
+	:CActive(EPriorityStandard), iState(EInitializingKeystore) 
+	{
+	}
+
+void CSmfKeyStoreManager::ConstructL() {
+	RDebug::Printf("SMF: CSmfKeyStoreManager::ConstructL");
+	CActiveScheduler::Add( this );
+#ifdef	SYMBIAN_V3
+	User::LeaveIfError( iFs.Connect() );
+	
+	iKeyStore = CUnifiedKeyStore::NewL(iFs);
+	iKeyStore->Initialize( iStatus );
+	iState = EInitializingKeystore;
+	SetActive();	
+#endif
+}
+
+void CSmfKeyStoreManager::ContinueMessageHandlingL() 
+	{
+	RDebug::Printf("SMF: CSmfKeyStoreManager::ContinueMessageHandling");
+	
+	if ( IsActive() )
+		{
+		return;
+		}
+	
+	RMessage2* message = iMessages[0];
+	TInt function = message->Function();
+	
+	switch( function ) 
+		{
+		case ESmfStoreRSAKey:
+			{
+			StoreRSAKeyL();
+			break;
+			}
+		case ESmfRSASignMessage:
+			{
+			RSA_SHA1_SignMessageL();
+			break;
+			}
+		case ESmfHMACSHA1SignMessage:
+			{
+			HMAC_SHA1_SignMessageL();
+			break;
+			}
+		case ESmfDeleteKeys:
+			{
+			DeleteKeys();
+			break;
+			}
+		}
+	}
+
+void CSmfKeyStoreManager::StoreRSAKeyL() 
+	{
+#ifdef SYMBIAN_V3
+	RDebug::Printf("SMF: CSmfKeyStoreManager::StoreRSAKeyL");
+	
+	ReadRsaKeyParametersL();
+	
+	RDebug::Printf("SMF: Parameters read");
+	
+	iKeyStore->ImportKey(
+			0, iRsaKeyParameters->KeyData(), EPKCS15UsageSign, iRsaKeyParameters->KeyName(),
+			CCTKeyInfo::EExtractable, iRsaKeyParameters->StartDate(), iRsaKeyParameters->EndDate(),
+			iImportedKey, iStatus );
+	SetActive();
+	iState = EImportingKey;
+#endif
+	}
+
+void CSmfKeyStoreManager::RSA_SHA1_SignMessageL() 
+	{
+	
+	RDebug::Printf("SMF: CSmfKeyStoreManager::RSA_SHA1_SignMessage");
+#ifdef SYMBIAN_V3
+	switch( iState ) 
+		{
+		case EInitialized:
+			{
+			// Get the key
+			ReadSignParametersL(); 
+			TCTKeyAttributeFilter filter;
+			filter.iKeyAlgorithm = CCTKeyInfo::ERSA;
+			
+			iKeyStore->List( iKeys, filter, iStatus );
+			iState = EGettingKeyList;
+			SetActive();
+			break;
+			}
+		case EGettingKeyList:
+			{
+			RDebug::Printf("SMF: key count=%d", iKeys.Count());
+			// Find the correct key
+			bool keyFound = EFalse;
+			for( TInt i = 0; i < iKeys.Count(); i++ ) 
+				{
+			
+				if ( iKeys[i]->ID() == iSignParameters->Key() ) 
+					{
+					RDebug::Printf("SMF: Correct key found");
+					iKeyStore->Open( *iKeys[i], iRSASigner, iStatus );
+					iState = EGettingRSASigner;
+					keyFound = ETrue;
+					SetActive();
+					break;						
+					}
+				}
+			if ( !keyFound ) 
+				{
+				iMessages[0]->Complete( KErrNotFound );
+				iMessages.Remove( 0 );
+				}
+			break;
+			}
+		case EGettingRSASigner:
+			{
+			ASSERT( iRSASigner != NULL );
+			iRSASigner->SignMessage(iSignParameters->Message(), iRSASignature, iStatus);
+			iState = ERSASigningMessage;
+			SetActive();
+			break;
+			}
+		default:
+			{
+			break;
+			}
+		}	
+#endif
+	}
+
+void CSmfKeyStoreManager::HMAC_SHA1_SignMessageL()
+	{	
+	ReadSignParametersL();
+	
+	RDebug::Printf("SMF: CSmfKeyStoreManager::HMAC_SHA1_SignMessage");
+	
+	CSHA1* sha = CSHA1::NewL();
+	CHMAC* hmac = CHMAC::NewL( iSignParameters->Key(), sha );
+	TPtrC8 hashedSig( hmac->Hash( iSignParameters->Message() ) );
+	
+	RDebug::Printf("SMF: hashed message length=%d", hashedSig.Length());
+	RDebug::Printf("SMF: hashed message=%S", &hashedSig);
+	
+	iMessages[0]->WriteL( 1, hashedSig );
+	
+	RDebug::Printf("SMF: result written");
+	
+	iMessages[0]->Complete( KErrNone );
+	iMessages.Remove(0);
+	
+	RDebug::Printf("SMF: message completed");
+	
+	delete iSignParameters;
+	iSignParameters = NULL;	
+	}
+
+void CSmfKeyStoreManager::DeleteKeys() 
+	{
+	RDebug::Printf("SMF: CSmfKeyStoreManager::DeleteKeys");
+#ifdef SYMBIAN_V3
+	switch ( iState ) 
+		{
+		case EInitialized:
+			{
+			iKeys.Reset();
+			TCTKeyAttributeFilter filter;
+			filter.iKeyAlgorithm = CCTKeyInfo::ERSA;
+			iKeyStore->List( iKeys, filter, iStatus );
+			iState = EDeletingKey;
+			SetActive();
+			break;
+			}
+		case EDeletingKey:
+			{
+			RDebug::Printf("SMF: key count=%d", iKeys.Count());
+			//read the key-label to delete from message
+			HBufC* KeyBuf = HBufC::NewL(KMaxSignedMsgLength);
+			TPtr keyPtr(KeyBuf->Des());
+			iMessages[0]->Read(0, keyPtr);
+
+			// Find the correct key
+			bool keyFound = EFalse;
+			for (TInt i = 0; i < iKeys.Count(); i++)
+				{
+				if (iKeys[i]->ID() == (keyPtr.Collapse()))
+					{
+					RDebug::Printf("SMF: Correct key found");
+					iKeyStore->DeleteKey(*iKeys[i], iStatus);
+					keyFound = ETrue;
+					iState = EKeyDeleted;
+					SetActive();
+					}
+				}
+			if (!keyFound)
+				{
+				iMessages[0]->Complete(KErrNotFound);
+				iMessages.Remove( 0 );
+				}
+			
+			
+			break;
+			}
+		}
+#endif
+	}
+
+void CSmfKeyStoreManager::SetPassphraseTimeout() 
+	{
+#ifdef SYMBIAN_V3
+	iKeyStore->SetPassphraseTimeout( -1, iStatus );
+	iState = ESettingPassphraseTimeout;
+	SetActive();
+#endif
+	}
+
+void CSmfKeyStoreManager::ReadSignParametersL()
+	{
+	RMessage2* message = iMessages[0];
+	RBuf8 dataBuf;
+	CleanupClosePushL( dataBuf );
+	dataBuf.CreateL( message->GetDesLength( 0 ) );
+	message->ReadL( 0, dataBuf, 0 );
+
+	delete iSignParameters;
+	iSignParameters = NULL;
+	
+	iSignParameters = CSmfSignParameters::NewL( dataBuf );
+	
+	CleanupStack::PopAndDestroy( &dataBuf );
+	}
+
+void CSmfKeyStoreManager::ReadRsaKeyParametersL()
+	{
+	RMessage2* message = iMessages[0];
+
+	RBuf8 dataBuf;
+	CleanupClosePushL( dataBuf );
+	dataBuf.CreateL( message->GetDesLength( 0 ) );
+	message->ReadL( 0, dataBuf, 0 );
+
+	delete iRsaKeyParameters;
+	iRsaKeyParameters = NULL;
+	
+	iRsaKeyParameters = CSmfRsaKeyParameters::NewL( dataBuf );
+	
+	CleanupStack::PopAndDestroy( &dataBuf );
+	}
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/smf/smfservermodule/smfclient/bwins/smfclientu.def	Wed Jun 23 19:51:49 2010 +0530
@@ -0,0 +1,680 @@
+EXPORTS
+	??0SmfMusicRating@@QAE@ABV0@@Z @ 1 NONAME ; SmfMusicRating::SmfMusicRating(class SmfMusicRating const &)
+	?setId@SmfLocation@@QAEXABVQString@@@Z @ 2 NONAME ; void SmfLocation::setId(class QString const &)
+	?id@SmfPost@@QBE?AVQString@@XZ @ 3 NONAME ; class QString SmfPost::id(void) const
+	?convert@SmfContact@@QBEXAAVQContact@QtMobility@@@Z @ 4 NONAME ; void SmfContact::convert(class QtMobility::QContact &) const
+	??5@YAAAVQDataStream@@AAV0@AAVSmfArtists@@@Z @ 5 NONAME ; class QDataStream & operator>>(class QDataStream &, class SmfArtists &)
+	?setTitle@SmfActivityEntry@@QAE_NABVSmfPost@@@Z @ 6 NONAME ; bool SmfActivityEntry::setTitle(class SmfPost const &)
+	?genre@SmfTrackInfo@@QBE?AVQString@@XZ @ 7 NONAME ; class QString SmfTrackInfo::genre(void) const
+	?artists@SmfTrackInfo@@QBE?AVSmfArtists@@XZ @ 8 NONAME ; class SmfArtists SmfTrackInfo::artists(void) const
+	??_ESmfPictureAlbum@@QAE@I@Z @ 9 NONAME ; SmfPictureAlbum::~SmfPictureAlbum(unsigned int)
+	?playlistUpdated@SmfPlaylistService@@IAEXW4SmfError@@@Z @ 10 NONAME ; void SmfPlaylistService::playlistUpdated(enum SmfError)
+	?tags@SmfPicture@@QBE?AVQStringList@@XZ @ 11 NONAME ; class QStringList SmfPicture::tags(void) const
+	??0SmfEvent@@QAE@XZ @ 12 NONAME ; SmfEvent::SmfEvent(void)
+	?keywords@SmfPictureAlbum@@QBE?AVQStringList@@XZ @ 13 NONAME ; class QStringList SmfPictureAlbum::keywords(void) const
+	??_ESmfMusicEvents@@UAE@I@Z @ 14 NONAME ; SmfMusicEvents::~SmfMusicEvents(unsigned int)
+	?country@SmfLocation@@QBE?AVQString@@XZ @ 15 NONAME ; class QString SmfLocation::country(void) const
+	?getStaticMetaObject@SmfActivityFetcher@@SAABUQMetaObject@@XZ @ 16 NONAME ; struct QMetaObject const & SmfActivityFetcher::getStaticMetaObject(void)
+	?setCaption@SmfActivityObject@@QAEXABVQString@@@Z @ 17 NONAME ; void SmfActivityObject::setCaption(class QString const &)
+	?id@SmfPicture@@QBE?AVQString@@XZ @ 18 NONAME ; class QString SmfPicture::id(void) const
+	?postRating@SmfMusicSearch@@QAEXVSmfTrackInfo@@VSmfMusicRating@@@Z @ 19 NONAME ; void SmfMusicSearch::postRating(class SmfTrackInfo, class SmfMusicRating)
+	??0SmfPlaylist@@QAE@XZ @ 20 NONAME ; SmfPlaylist::SmfPlaylist(void)
+	??5@YAAAVQDataStream@@AAV0@AAVQContactGuid@QtMobility@@@Z @ 21 NONAME ; class QDataStream & operator>>(class QDataStream &, class QtMobility::QContactGuid &)
+	?setNames@SmfArtists@@QAEXABVQStringList@@@Z @ 22 NONAME ; void SmfArtists::setNames(class QStringList const &)
+	?id@SmfActivityObject@@QBE?AVQString@@XZ @ 23 NONAME ; class QString SmfActivityObject::id(void) const
+	??4SmfMusicFingerPrint@@QAEAAV0@ABV0@@Z @ 24 NONAME ; class SmfMusicFingerPrint & SmfMusicFingerPrint::operator=(class SmfMusicFingerPrint const &)
+	??6@YAAAVQDataStream@@AAV0@ABVQContactName@QtMobility@@@Z @ 25 NONAME ; class QDataStream & operator<<(class QDataStream &, class QtMobility::QContactName const &)
+	?setLocation@SmfPlaylist@@QAEXABVQUrl@@@Z @ 26 NONAME ; void SmfPlaylist::setLocation(class QUrl const &)
+	??6@YAAAVQDataStream@@AAV0@ABVQContactThumbnail@QtMobility@@@Z @ 27 NONAME ; class QDataStream & operator<<(class QDataStream &, class QtMobility::QContactThumbnail const &)
+	?tr@SmfPostProvider@@SA?AVQString@@PBD0H@Z @ 28 NONAME ; class QString SmfPostProvider::tr(char const *, char const *, int)
+	?trUtf8@SmfActivityFetcher@@SA?AVQString@@PBD0H@Z @ 29 NONAME ; class QString SmfActivityFetcher::trUtf8(char const *, char const *, int)
+	?get@SmfRelationMgr@@QAE?AVSmfRelationItem@@AAVQString@@I@Z @ 30 NONAME ; class SmfRelationItem SmfRelationMgr::get(class QString &, unsigned int)
+	??0SmfGroup@@QAE@PAV?$QList@VSmfContact@@@@@Z @ 31 NONAME ; SmfGroup::SmfGroup(class QList<class SmfContact> *)
+	??6@YAAAVQDataStream@@AAV0@ABVQContactUrl@QtMobility@@@Z @ 32 NONAME ; class QDataStream & operator<<(class QDataStream &, class QtMobility::QContactUrl const &)
+	?trUtf8@SmfPlaylistService@@SA?AVQString@@PBD0H@Z @ 33 NONAME ; class QString SmfPlaylistService::trUtf8(char const *, char const *, int)
+	?lyricsAvailable@SmfLyricsService@@IAEXPAV?$QList@VSmfLyrics@@@@W4SmfError@@USmfResultPage@@@Z @ 34 NONAME ; void SmfLyricsService::lyricsAvailable(class QList<class SmfLyrics> *, enum SmfError, struct SmfResultPage)
+	??6@YAAAVQDataStream@@AAV0@ABVSmfPicture@@@Z @ 35 NONAME ; class QDataStream & operator<<(class QDataStream &, class SmfPicture const &)
+	?staticMetaObject@SmfMusicService@@2UQMetaObject@@B @ 36 NONAME ; struct QMetaObject const SmfMusicService::staticMetaObject
+	?setLength@SmfUrl@@QAEXABVQString@@@Z @ 37 NONAME ; void SmfUrl::setLength(class QString const &)
+	?postEvents@SmfMusicEvents@@QAEXV?$QList@VSmfEvent@@@@@Z @ 38 NONAME ; void SmfMusicEvents::postEvents(class QList<class SmfEvent>)
+	?serviceUrl@SmfProvider@@QBE?AVQUrl@@XZ @ 39 NONAME ; class QUrl SmfProvider::serviceUrl(void) const
+	?setTags@SmfTrackInfo@@QAEXABVQStringList@@@Z @ 40 NONAME ; void SmfTrackInfo::setTags(class QStringList const &)
+	?addComment@SmfPicture@@QAEXABVSmfComment@@@Z @ 41 NONAME ; void SmfPicture::addComment(class SmfComment const &)
+	?metaObject@SmfActivityFetcher@@UBEPBUQMetaObject@@XZ @ 42 NONAME ; struct QMetaObject const * SmfActivityFetcher::metaObject(void) const
+	??4SmfMusicRating@@QAEAAV0@ABV0@@Z @ 43 NONAME ; class SmfMusicRating & SmfMusicRating::operator=(class SmfMusicRating const &)
+	?playlists@SmfPlaylistService@@QAEXHH@Z @ 44 NONAME ; void SmfPlaylistService::playlists(int, int)
+	?venuesAvailable@SmfMusicEvents@@IAEXPAV?$QList@VSmfLocation@@@@W4SmfError@@USmfResultPage@@@Z @ 45 NONAME ; void SmfMusicEvents::venuesAvailable(class QList<class SmfLocation> *, enum SmfError, struct SmfResultPage)
+	?name@SmfAlbum@@QBE?AVQString@@XZ @ 46 NONAME ; class QString SmfAlbum::name(void) const
+	??6@YAAAVQDataStream@@AAV0@ABVSmfComment@@@Z @ 47 NONAME ; class QDataStream & operator<<(class QDataStream &, class SmfComment const &)
+	?frameRate@SmfSubtitle@@QBENXZ @ 48 NONAME ; double SmfSubtitle::frameRate(void) const
+	?setId@SmfMusicProfile@@QAEXABVQString@@@Z @ 49 NONAME ; void SmfMusicProfile::setId(class QString const &)
+	?setId@SmfAlbum@@QAEXABVQString@@@Z @ 50 NONAME ; void SmfAlbum::setId(class QString const &)
+	?description@SmfPost@@QBE?AVQString@@XZ @ 51 NONAME ; class QString SmfPost::description(void) const
+	??_ESmfSubtitle@@QAE@I@Z @ 52 NONAME ; SmfSubtitle::~SmfSubtitle(unsigned int)
+	?trUtf8@SmfPostProvider@@SA?AVQString@@PBD0@Z @ 53 NONAME ; class QString SmfPostProvider::trUtf8(char const *, char const *)
+	??_ESmfLocation@@QAE@I@Z @ 54 NONAME ; SmfLocation::~SmfLocation(unsigned int)
+	?setCountry@SmfLocation@@QAEXABVQString@@@Z @ 55 NONAME ; void SmfLocation::setCountry(class QString const &)
+	?zipCode@SmfLocation@@QBE?AVQString@@XZ @ 56 NONAME ; class QString SmfLocation::zipCode(void) const
+	??4SmfTrackInfo@@QAEAAV0@ABV0@@Z @ 57 NONAME ; class SmfTrackInfo & SmfTrackInfo::operator=(class SmfTrackInfo const &)
+	??0SmfActivityFetcher@@QAE@PAVSmfProvider@@@Z @ 58 NONAME ; SmfActivityFetcher::SmfActivityFetcher(class SmfProvider *)
+	?url@SmfPictureAlbum@@QBE?AVQUrl@@XZ @ 59 NONAME ; class QUrl SmfPictureAlbum::url(void) const
+	?qt_metacall@SmfContactFetcher@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 60 NONAME ; int SmfContactFetcher::qt_metacall(enum QMetaObject::Call, int, void * *)
+	??_ESmfPost@@QAE@I@Z @ 61 NONAME ; SmfPost::~SmfPost(unsigned int)
+	??5@YAAAVQDataStream@@AAV0@AAVSmfSubtitle@@@Z @ 62 NONAME ; class QDataStream & operator>>(class QDataStream &, class SmfSubtitle &)
+	?setId@SmfActivityObject@@QAEXABVQString@@@Z @ 63 NONAME ; void SmfActivityObject::setId(class QString const &)
+	??5@YAAAVQDataStream@@AAV0@AAVQContactNote@QtMobility@@@Z @ 64 NONAME ; class QDataStream & operator>>(class QDataStream &, class QtMobility::QContactNote &)
+	?duration@SmfTrackInfo@@QBE?AVQTime@@XZ @ 65 NONAME ; class QTime SmfTrackInfo::duration(void) const
+	?author@SmfActivityEntry@@QBE?AVSmfContact@@XZ @ 66 NONAME ; class SmfContact SmfActivityEntry::author(void) const
+	?setId@SmfEvent@@QAEXABVQString@@@Z @ 67 NONAME ; void SmfEvent::setId(class QString const &)
+	?geoPositionInfo@SmfLocation@@QBE?AVQGeoPositionInfo@QtMobility@@XZ @ 68 NONAME ; class QtMobility::QGeoPositionInfo SmfLocation::geoPositionInfo(void) const
+	?duration@SmfEvent@@QBE?AVQTime@@XZ @ 69 NONAME ; class QTime SmfEvent::duration(void) const
+	??_ESmfComment@@QAE@I@Z @ 70 NONAME ; SmfComment::~SmfComment(unsigned int)
+	?location@SmfPlaylist@@QBE?AVQUrl@@XZ @ 71 NONAME ; class QUrl SmfPlaylist::location(void) const
+	??6@YAAAVQDataStream@@AAV0@ABVSmfPost@@@Z @ 72 NONAME ; class QDataStream & operator<<(class QDataStream &, class SmfPost const &)
+	??4SmfPicture@@QAEAAV0@ABV0@@Z @ 73 NONAME ; class SmfPicture & SmfPicture::operator=(class SmfPicture const &)
+	?setId@SmfActivityEntry@@QAE_NABVQString@@@Z @ 74 NONAME ; bool SmfActivityEntry::setId(class QString const &)
+	?postfinished@SmfMusicSearch@@IAEXW4SmfError@@@Z @ 75 NONAME ; void SmfMusicSearch::postfinished(enum SmfError)
+	?image@SmfArtists@@QBE?AVQImage@@XZ @ 76 NONAME ; class QImage SmfArtists::image(void) const
+	?trackSearchAvailable@SmfMusicSearch@@IAEXPAV?$QList@VSmfTrackInfo@@@@W4SmfError@@USmfResultPage@@@Z @ 77 NONAME ; void SmfMusicSearch::trackSearchAvailable(class QList<class SmfTrackInfo> *, enum SmfError, struct SmfResultPage)
+	?getStaticMetaObject@SmfMusicSearch@@SAABUQMetaObject@@XZ @ 78 NONAME ; struct QMetaObject const & SmfMusicSearch::getStaticMetaObject(void)
+	?qt_metacall@SmfMusicSearch@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 79 NONAME ; int SmfMusicSearch::qt_metacall(enum QMetaObject::Call, int, void * *)
+	??5@YAAAVQDataStream@@AAV0@AAVQContactAnniversary@QtMobility@@@Z @ 80 NONAME ; class QDataStream & operator>>(class QDataStream &, class QtMobility::QContactAnniversary &)
+	?image@SmfPlaylist@@QBE?AVQUrl@@XZ @ 81 NONAME ; class QUrl SmfPlaylist::image(void) const
+	?setGeoPositionInfo@SmfLocation@@QAEXABVQGeoPositionInfo@QtMobility@@@Z @ 82 NONAME ; void SmfLocation::setGeoPositionInfo(class QtMobility::QGeoPositionInfo const &)
+	?staticMetaObject@SmfActivityFetcher@@2UQMetaObject@@B @ 83 NONAME ; struct QMetaObject const SmfActivityFetcher::staticMetaObject
+	??0SmfMusicRating@@QAE@PAVSmfTrackInfo@@@Z @ 84 NONAME ; SmfMusicRating::SmfMusicRating(class SmfTrackInfo *)
+	?qt_metacast@SmfActivityFetcher@@UAEPAXPBD@Z @ 85 NONAME ; void * SmfActivityFetcher::qt_metacast(char const *)
+	?getContact@SmfRelationItem@@QBE?AVSmfContact@@XZ @ 86 NONAME ; class SmfContact SmfRelationItem::getContact(void) const
+	?tr@SmfRelationMgr@@SA?AVQString@@PBD0@Z @ 87 NONAME ; class QString SmfRelationMgr::tr(char const *, char const *)
+	?maxCharsInPost@SmfPostProvider@@QBEHXZ @ 88 NONAME ; int SmfPostProvider::maxCharsInPost(void) const
+	?setVisibility@SmfPicture@@QAEXABW4SmfPictureVisibility@@@Z @ 89 NONAME ; void SmfPicture::setVisibility(enum SmfPictureVisibility const &)
+	?resultsAvailable@SmfActivityFetcher@@IAEXPAV?$QList@VSmfActivityEntry@@@@W4SmfError@@USmfResultPage@@@Z @ 90 NONAME ; void SmfActivityFetcher::resultsAvailable(class QList<class SmfActivityEntry> *, enum SmfError, struct SmfResultPage)
+	?trUtf8@SmfActivityFetcher@@SA?AVQString@@PBD0@Z @ 91 NONAME ; class QString SmfActivityFetcher::trUtf8(char const *, char const *)
+	?setVersion@SmfPlaylist@@QAEXABVQString@@@Z @ 92 NONAME ; void SmfPlaylist::setVersion(class QString const &)
+	?errorLine@SmfPluginUtil@@QBEHXZ @ 93 NONAME ; int SmfPluginUtil::errorLine(void) const
+	?setImage@SmfAlbum@@QAEXABVQImage@@@Z @ 94 NONAME ; void SmfAlbum::setImage(class QImage const &)
+	?description@SmfPictureAlbum@@QBE?AVQString@@XZ @ 95 NONAME ; class QString SmfPictureAlbum::description(void) const
+	??6@YAAAVQDataStream@@AAV0@ABVSmfMusicRating@@@Z @ 96 NONAME ; class QDataStream & operator<<(class QDataStream &, class SmfMusicRating const &)
+	?setDescription@SmfPictureAlbum@@QAEXABVQString@@@Z @ 97 NONAME ; void SmfPictureAlbum::setDescription(class QString const &)
+	?trUtf8@SmfMusicService@@SA?AVQString@@PBD0@Z @ 98 NONAME ; class QString SmfMusicService::trUtf8(char const *, char const *)
+	?qt_metacall@SmfLyricsService@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 99 NONAME ; int SmfLyricsService::qt_metacall(enum QMetaObject::Call, int, void * *)
+	?venues@SmfMusicEvents@@QAEXVQContactGeoLocation@QtMobility@@HH@Z @ 100 NONAME ; void SmfMusicEvents::venues(class QtMobility::QContactGeoLocation, int, int)
+	??6@YAAAVQDataStream@@AAV0@ABVSmfActivityEntry@@@Z @ 101 NONAME ; class QDataStream & operator<<(class QDataStream &, class SmfActivityEntry const &)
+	??1SmfMusicService@@UAE@XZ @ 102 NONAME ; SmfMusicService::~SmfMusicService(void)
+	?trUtf8@SmfContactFetcher@@SA?AVQString@@PBD0@Z @ 103 NONAME ; class QString SmfContactFetcher::trUtf8(char const *, char const *)
+	?tr@SmfGallery@@SA?AVQString@@PBD0H@Z @ 104 NONAME ; class QString SmfGallery::tr(char const *, char const *, int)
+	?musicUsageInfo@SmfMusicProfile@@QBE?AV?$QList@VSmfTrackInfo@@@@XZ @ 105 NONAME ; class QList<class SmfTrackInfo> SmfMusicProfile::musicUsageInfo(void) const
+	??1SmfComment@@QAE@XZ @ 106 NONAME ; SmfComment::~SmfComment(void)
+	?setFrameRate@SmfSubtitle@@QAEXABN@Z @ 107 NONAME ; void SmfSubtitle::setFrameRate(double const &)
+	?maxItems@SmfPostProvider@@QBEHXZ @ 108 NONAME ; int SmfPostProvider::maxItems(void) const
+	?customRequest@SmfPostProvider@@QAEXABHPAVQByteArray@@@Z @ 109 NONAME ; void SmfPostProvider::customRequest(int const &, class QByteArray *)
+	??0SmfContact@@QAE@ABV0@@Z @ 110 NONAME ; SmfContact::SmfContact(class SmfContact const &)
+	??5@YAAAVQDataStream@@AAV0@AAVQContactName@QtMobility@@@Z @ 111 NONAME ; class QDataStream & operator>>(class QDataStream &, class QtMobility::QContactName &)
+	?metadata@SmfPlaylist@@QBE?AV?$QMap@VQString@@VQVariant@@@@XZ @ 112 NONAME ; class QMap<class QString, class QVariant> SmfPlaylist::metadata(void) const
+	?url@SmfLocation@@QBE?AVQUrl@@XZ @ 113 NONAME ; class QUrl SmfLocation::url(void) const
+	??6@YAAAVQDataStream@@AAV0@ABVQContactAddress@QtMobility@@@Z @ 114 NONAME ; class QDataStream & operator<<(class QDataStream &, class QtMobility::QContactAddress const &)
+	?getStaticMetaObject@SmfMusicEvents@@SAABUQMetaObject@@XZ @ 115 NONAME ; struct QMetaObject const & SmfMusicEvents::getStaticMetaObject(void)
+	?setName@SmfGroup@@QAEXAAVQString@@@Z @ 116 NONAME ; void SmfGroup::setName(class QString &)
+	?customRequest@SmfContactFetcher@@QAEXABHPAVQByteArray@@@Z @ 117 NONAME ; void SmfContactFetcher::customRequest(int const &, class QByteArray *)
+	??5@YAAAVQDataStream@@AAV0@AAVQContactNickname@QtMobility@@@Z @ 118 NONAME ; class QDataStream & operator>>(class QDataStream &, class QtMobility::QContactNickname &)
+	?setServiceUrl@SmfProvider@@QAEXAAVQUrl@@@Z @ 119 NONAME ; void SmfProvider::setServiceUrl(class QUrl &)
+	?setDescription@SmfPicture@@QAEXABVQString@@@Z @ 120 NONAME ; void SmfPicture::setDescription(class QString const &)
+	??_ESmfContactFetcher@@UAE@I@Z @ 121 NONAME ; SmfContactFetcher::~SmfContactFetcher(unsigned int)
+	?tr@SmfMusicEvents@@SA?AVQString@@PBD0H@Z @ 122 NONAME ; class QString SmfMusicEvents::tr(char const *, char const *, int)
+	?setThumbnail@SmfActivityObject@@QAEXABVQImage@@@Z @ 123 NONAME ; void SmfActivityObject::setThumbnail(class QImage const &)
+	?pictureCount@SmfPictureAlbum@@QBEHXZ @ 124 NONAME ; int SmfPictureAlbum::pictureCount(void) const
+	?post@SmfPostProvider@@QAEXAAVSmfPost@@AAVSmfLocation@@@Z @ 125 NONAME ; void SmfPostProvider::post(class SmfPost &, class SmfLocation &)
+	??6@YAAAVQDataStream@@AAV0@ABVSmfArtists@@@Z @ 126 NONAME ; class QDataStream & operator<<(class QDataStream &, class SmfArtists const &)
+	?postComments@SmfMusicSearch@@QAEXVSmfTrackInfo@@VSmfComment@@@Z @ 127 NONAME ; void SmfMusicSearch::postComments(class SmfTrackInfo, class SmfComment)
+	?tr@SmfLyricsService@@SA?AVQString@@PBD0@Z @ 128 NONAME ; class QString SmfLyricsService::tr(char const *, char const *)
+	?id@SmfSubtitle@@QBE?AVQString@@XZ @ 129 NONAME ; class QString SmfSubtitle::id(void) const
+	?setId@SmfGroup@@QAEXAAVQString@@@Z @ 130 NONAME ; void SmfGroup::setId(class QString &)
+	?setThumbnail@SmfPictureAlbum@@QAEXABVQImage@@@Z @ 131 NONAME ; void SmfPictureAlbum::setThumbnail(class QImage const &)
+	?getStaticMetaObject@SmfRelationMgr@@SAABUQMetaObject@@XZ @ 132 NONAME ; struct QMetaObject const & SmfRelationMgr::getStaticMetaObject(void)
+	??4SmfComment@@QAEAAV0@ABV0@@Z @ 133 NONAME ; class SmfComment & SmfComment::operator=(class SmfComment const &)
+	??5@YAAAVQDataStream@@AAV0@AAVQContactAvatar@QtMobility@@@Z @ 134 NONAME ; class QDataStream & operator>>(class QDataStream &, class QtMobility::QContactAvatar &)
+	?setAlbum@SmfTrackInfo@@QAEXABVSmfAlbum@@@Z @ 135 NONAME ; void SmfTrackInfo::setAlbum(class SmfAlbum const &)
+	?metaObject@SmfLyricsService@@UBEPBUQMetaObject@@XZ @ 136 NONAME ; struct QMetaObject const * SmfLyricsService::metaObject(void) const
+	?staticMetaObject@SmfRelationMgr@@2UQMetaObject@@B @ 137 NONAME ; struct QMetaObject const SmfRelationMgr::staticMetaObject
+	?setPostedDate@SmfPicture@@QAEXABVQDateTime@@@Z @ 138 NONAME ; void SmfPicture::setPostedDate(class QDateTime const &)
+	?qt_metacast@SmfPostProvider@@UAEPAXPBD@Z @ 139 NONAME ; void * SmfPostProvider::qt_metacast(char const *)
+	??5@YAAAVQDataStream@@AAV0@AAVQContactUrl@QtMobility@@@Z @ 140 NONAME ; class QDataStream & operator>>(class QDataStream &, class QtMobility::QContactUrl &)
+	??6@YAAAVQDataStream@@AAV0@ABVSmfPictureAlbum@@@Z @ 141 NONAME ; class QDataStream & operator<<(class QDataStream &, class SmfPictureAlbum const &)
+	?postFinished@SmfPostProvider@@IAEXW4SmfError@@@Z @ 142 NONAME ; void SmfPostProvider::postFinished(enum SmfError)
+	?url@SmfPicture@@QBE?AVQUrl@@XZ @ 143 NONAME ; class QUrl SmfPicture::url(void) const
+	?setLanguage@SmfLyrics@@QAEXABVQString@@@Z @ 144 NONAME ; void SmfLyrics::setLanguage(class QString const &)
+	??5@YAAAVQDataStream@@AAV0@AAVSmfEvent@@@Z @ 145 NONAME ; class QDataStream & operator>>(class QDataStream &, class SmfEvent &)
+	??5@YAAAVQDataStream@@AAV0@AAVSmfPicture@@@Z @ 146 NONAME ; class QDataStream & operator>>(class QDataStream &, class SmfPicture &)
+	?GetServices@SmfClient@@QAEPAV?$QList@VSmfProvider@@@@ABVQString@@@Z @ 147 NONAME ; class QList<class SmfProvider> * SmfClient::GetServices(class QString const &)
+	?eventDateTime@SmfEvent@@QBE?AVQDateTime@@XZ @ 148 NONAME ; class QDateTime SmfEvent::eventDateTime(void) const
+	?albumsAvailable@SmfGallery@@IAEXPAV?$QList@VSmfPictureAlbum@@@@W4SmfError@@USmfResultPage@@@Z @ 149 NONAME ; void SmfGallery::albumsAvailable(class QList<class SmfPictureAlbum> *, enum SmfError, struct SmfResultPage)
+	??1SmfActivityEntry@@QAE@XZ @ 150 NONAME ; SmfActivityEntry::~SmfActivityEntry(void)
+	??4SmfPlaylist@@QAEAAV0@ABV0@@Z @ 151 NONAME ; class SmfPlaylist & SmfPlaylist::operator=(class SmfPlaylist const &)
+	??1SmfPlaylistService@@UAE@XZ @ 152 NONAME ; SmfPlaylistService::~SmfPlaylistService(void)
+	?tr@SmfActivityFetcher@@SA?AVQString@@PBD0H@Z @ 153 NONAME ; class QString SmfActivityFetcher::tr(char const *, char const *, int)
+	?postCurrentPlayingPlaylist@SmfPlaylistService@@QAEHVSmfPlaylist@@@Z @ 154 NONAME ; int SmfPlaylistService::postCurrentPlayingPlaylist(class SmfPlaylist)
+	?tr@SmfPlaylistService@@SA?AVQString@@PBD0@Z @ 155 NONAME ; class QString SmfPlaylistService::tr(char const *, char const *)
+	??_ESmfRelationMgr@@UAE@I@Z @ 156 NONAME ; SmfRelationMgr::~SmfRelationMgr(unsigned int)
+	?url@SmfPost@@QBE?AVQUrl@@XZ @ 157 NONAME ; class QUrl SmfPost::url(void) const
+	?customRequest@SmfGallery@@QAEXABHPAVQByteArray@@@Z @ 158 NONAME ; void SmfGallery::customRequest(int const &, class QByteArray *)
+	?setDescription@SmfPost@@QAEXABVQString@@@Z @ 159 NONAME ; void SmfPost::setDescription(class QString const &)
+	??6@YAAAVQDataStream@@AAV0@ABVSmfPlaylist@@@Z @ 160 NONAME ; class QDataStream & operator<<(class QDataStream &, class SmfPlaylist const &)
+	?customDataAvailable@SmfContactFetcher@@IAEXHPAVQByteArray@@@Z @ 161 NONAME ; void SmfContactFetcher::customDataAvailable(int, class QByteArray *)
+	?trUtf8@SmfMusicSearch@@SA?AVQString@@PBD0H@Z @ 162 NONAME ; class QString SmfMusicSearch::trUtf8(char const *, char const *, int)
+	?getIndex@SmfRelationItem@@QBEIXZ @ 163 NONAME ; unsigned int SmfRelationItem::getIndex(void) const
+	?metaObject@SmfMusicSearch@@UBEPBUQMetaObject@@XZ @ 164 NONAME ; struct QMetaObject const * SmfMusicSearch::metaObject(void) const
+	??5@YAAAVQDataStream@@AAV0@AAVSmfPost@@@Z @ 165 NONAME ; class QDataStream & operator>>(class QDataStream &, class SmfPost &)
+	??1SmfEvent@@QAE@XZ @ 166 NONAME ; SmfEvent::~SmfEvent(void)
+	?title@SmfPictureAlbum@@QBE?AVQString@@XZ @ 167 NONAME ; class QString SmfPictureAlbum::title(void) const
+	??5@YAAAVQDataStream@@AAV0@AAVQContactPresence@QtMobility@@@Z @ 168 NONAME ; class QDataStream & operator>>(class QDataStream &, class QtMobility::QContactPresence &)
+	?qt_metacast@SmfMusicService@@UAEPAXPBD@Z @ 169 NONAME ; void * SmfMusicService::qt_metacast(char const *)
+	??6@YAAAVQDataStream@@AAV0@ABVSmfContact@@@Z @ 170 NONAME ; class QDataStream & operator<<(class QDataStream &, class SmfContact const &)
+	?href@SmfUrl@@QBE?AVQUrl@@XZ @ 171 NONAME ; class QUrl SmfUrl::href(void) const
+	??0SmfLocation@@QAE@ABV0@@Z @ 172 NONAME ; SmfLocation::SmfLocation(class SmfLocation const &)
+	??0SmfProvider@@QAE@XZ @ 173 NONAME ; SmfProvider::SmfProvider(void)
+	?eventsAvailable@SmfMusicEvents@@IAEXPAV?$QList@VSmfEvent@@@@W4SmfError@@USmfResultPage@@@Z @ 174 NONAME ; void SmfMusicEvents::eventsAvailable(class QList<class SmfEvent> *, enum SmfError, struct SmfResultPage)
+	?image@SmfAlbum@@QBE?AVQImage@@XZ @ 175 NONAME ; class QImage SmfAlbum::image(void) const
+	?artists@SmfAlbum@@QBE?AVSmfArtists@@XZ @ 176 NONAME ; class SmfArtists SmfAlbum::artists(void) const
+	?releaseYear@SmfSubtitle@@QBE?AVQDateTime@@XZ @ 177 NONAME ; class QDateTime SmfSubtitle::releaseYear(void) const
+	?tr@SmfRelationMgr@@SA?AVQString@@PBD0H@Z @ 178 NONAME ; class QString SmfRelationMgr::tr(char const *, char const *, int)
+	?staticMetaObject@SmfPostProvider@@2UQMetaObject@@B @ 179 NONAME ; struct QMetaObject const SmfPostProvider::staticMetaObject
+	?setId@SmfPictureAlbum@@QAEXABVQString@@@Z @ 180 NONAME ; void SmfPictureAlbum::setId(class QString const &)
+	?lyrics@SmfLyricsService@@QAEXVSmfTrackInfo@@HH@Z @ 181 NONAME ; void SmfLyricsService::lyrics(class SmfTrackInfo, int, int)
+	??5@YAAAVQDataStream@@AAV0@AAVSmfComment@@@Z @ 182 NONAME ; class QDataStream & operator>>(class QDataStream &, class SmfComment &)
+	?getAuthKeys@SmfPluginUtil@@QAEXAAV?$QMap@VQString@@V1@@@VQString@@1@Z @ 183 NONAME ; void SmfPluginUtil::getAuthKeys(class QMap<class QString, class QString> &, class QString, class QString)
+	?setReleaseYear@SmfLyrics@@QAEXABVQDateTime@@@Z @ 184 NONAME ; void SmfLyrics::setReleaseYear(class QDateTime const &)
+	??5@YAAAVQDataStream@@AAV0@AAVQContactEmailAddress@QtMobility@@@Z @ 185 NONAME ; class QDataStream & operator>>(class QDataStream &, class QtMobility::QContactEmailAddress &)
+	?setMusicUsageInfo@SmfMusicProfile@@QAEXABV?$QList@VSmfTrackInfo@@@@@Z @ 186 NONAME ; void SmfMusicProfile::setMusicUsageInfo(class QList<class SmfTrackInfo> const &)
+	?id@SmfEvent@@QBE?AVQString@@XZ @ 187 NONAME ; class QString SmfEvent::id(void) const
+	?addTags@SmfPicture@@QAEXABVQStringList@@@Z @ 188 NONAME ; void SmfPicture::addTags(class QStringList const &)
+	?setUrl@SmfLocation@@QAEXABVQUrl@@@Z @ 189 NONAME ; void SmfLocation::setUrl(class QUrl const &)
+	?actionName@SmfActivityEntry@@QBE?AW4SmfActivityVerb@@XZ @ 190 NONAME ; enum SmfActivityVerb SmfActivityEntry::actionName(void) const
+	?searchInGroupFinished@SmfContactFetcher@@IAEXPAV?$QList@VSmfContact@@@@W4SmfError@@USmfResultPage@@@Z @ 191 NONAME ; void SmfContactFetcher::searchInGroupFinished(class QList<class SmfContact> *, enum SmfError, struct SmfResultPage)
+	??5@YAAAVQDataStream@@AAV0@AAVQContactId@QtMobility@@@Z @ 192 NONAME ; class QDataStream & operator>>(class QDataStream &, class QtMobility::QContactId &)
+	?id@SmfComment@@QBE?AVQString@@XZ @ 193 NONAME ; class QString SmfComment::id(void) const
+	??6@YAAAVQDataStream@@AAV0@ABVSmfMusicProfile@@@Z @ 194 NONAME ; class QDataStream & operator<<(class QDataStream &, class SmfMusicProfile const &)
+	??_ESmfPluginUtil@@QAE@I@Z @ 195 NONAME ; SmfPluginUtil::~SmfPluginUtil(unsigned int)
+	??_ESmfTrackInfo@@QAE@I@Z @ 196 NONAME ; SmfTrackInfo::~SmfTrackInfo(unsigned int)
+	?searchNearFinished@SmfContactFetcher@@IAEXPAV?$QList@VSmfContact@@@@W4SmfError@@USmfResultPage@@@Z @ 197 NONAME ; void SmfContactFetcher::searchNearFinished(class QList<class SmfContact> *, enum SmfError, struct SmfResultPage)
+	?setName@SmfAlbum@@QAEXABVQString@@@Z @ 198 NONAME ; void SmfAlbum::setName(class QString const &)
+	?owner@SmfPicture@@QBE?AVQString@@XZ @ 199 NONAME ; class QString SmfPicture::owner(void) const
+	?getStaticMetaObject@SmfContactFetcher@@SAABUQMetaObject@@XZ @ 200 NONAME ; struct QMetaObject const & SmfContactFetcher::getStaticMetaObject(void)
+	??5@YAAAVQDataStream@@AAV0@AAVSmfTrackInfo@@@Z @ 201 NONAME ; class QDataStream & operator>>(class QDataStream &, class SmfTrackInfo &)
+	?trUtf8@SmfContactFetcher@@SA?AVQString@@PBD0H@Z @ 202 NONAME ; class QString SmfContactFetcher::trUtf8(char const *, char const *, int)
+	??_ESmfPicture@@QAE@I@Z @ 203 NONAME ; SmfPicture::~SmfPicture(unsigned int)
+	?applicationUrl@SmfProvider@@QBE?AVQUrl@@XZ @ 204 NONAME ; class QUrl SmfProvider::applicationUrl(void) const
+	?setDetails@SmfActivityEntry@@QAE_NABVSmfPost@@@Z @ 205 NONAME ; bool SmfActivityEntry::setDetails(class SmfPost const &)
+	?searchInfoAvailable@SmfMusicService@@IAEXAAV?$QList@VSmfMusicProfile@@@@W4SmfError@@USmfResultPage@@@Z @ 206 NONAME ; void SmfMusicService::searchInfoAvailable(class QList<class SmfMusicProfile> &, enum SmfError, struct SmfResultPage)
+	?metaObject@SmfMusicEvents@@UBEPBUQMetaObject@@XZ @ 207 NONAME ; struct QMetaObject const * SmfMusicEvents::metaObject(void) const
+	?postAppearence@SmfPostProvider@@QAE_NW4SmfAppearenceInfo@@@Z @ 208 NONAME ; bool SmfPostProvider::postAppearence(enum SmfAppearenceInfo)
+	??6@YAAAVQDataStream@@AAV0@ABVQContactNote@QtMobility@@@Z @ 209 NONAME ; class QDataStream & operator<<(class QDataStream &, class QtMobility::QContactNote const &)
+	??0SmfPictureAlbum@@QAE@ABV0@@Z @ 210 NONAME ; SmfPictureAlbum::SmfPictureAlbum(class SmfPictureAlbum const &)
+	?album@SmfTrackInfo@@QBE?AVSmfAlbum@@XZ @ 211 NONAME ; class SmfAlbum SmfTrackInfo::album(void) const
+	?eventsUpdated@SmfMusicEvents@@IAEXW4SmfError@@@Z @ 212 NONAME ; void SmfMusicEvents::eventsUpdated(enum SmfError)
+	??_ESmfEvent@@QAE@I@Z @ 213 NONAME ; SmfEvent::~SmfEvent(unsigned int)
+	?type@SmfActivityObject@@QBE?AW4SmfActivityObjectType@@XZ @ 214 NONAME ; enum SmfActivityObjectType SmfActivityObject::type(void) const
+	??6@YAAAVQDataStream@@AAV0@ABVQContactOnlineAccount@QtMobility@@@Z @ 215 NONAME ; class QDataStream & operator<<(class QDataStream &, class QtMobility::QContactOnlineAccount const &)
+	??0SmfPostProvider@@QAE@PAVSmfProvider@@@Z @ 216 NONAME ; SmfPostProvider::SmfPostProvider(class SmfProvider *)
+	?tr@SmfMusicService@@SA?AVQString@@PBD0@Z @ 217 NONAME ; class QString SmfMusicService::tr(char const *, char const *)
+	?m_myInstance@SmfPluginUtil@@0PAV1@A @ 218 NONAME ; class SmfPluginUtil * SmfPluginUtil::m_myInstance
+	??0SmfLocation@@QAE@XZ @ 219 NONAME ; SmfLocation::SmfLocation(void)
+	?ticketUrl@SmfEvent@@QBE?AVQUrl@@XZ @ 220 NONAME ; class QUrl SmfEvent::ticketUrl(void) const
+	??0SmfContactFetcher@@QAE@PAVSmfProvider@@PAVSmfContact@@@Z @ 221 NONAME ; SmfContactFetcher::SmfContactFetcher(class SmfProvider *, class SmfContact *)
+	?minRating@SmfMusicRating@@QBEHXZ @ 222 NONAME ; int SmfMusicRating::minRating(void) const
+	?tr@SmfPlaylistService@@SA?AVQString@@PBD0H@Z @ 223 NONAME ; class QString SmfPlaylistService::tr(char const *, char const *, int)
+	?tr@SmfMusicSearch@@SA?AVQString@@PBD0@Z @ 224 NONAME ; class QString SmfMusicSearch::tr(char const *, char const *)
+	?setValue@SmfContact@@QAEXABVQString@@AAVQVariant@@@Z @ 225 NONAME ; void SmfContact::setValue(class QString const &, class QVariant &)
+	??0SmfActivityEntry@@QAE@ABV0@@Z @ 226 NONAME ; SmfActivityEntry::SmfActivityEntry(class SmfActivityEntry const &)
+	?pictures@SmfGallery@@QAEXAAV?$QList@VSmfPictureAlbum@@@@HH@Z @ 227 NONAME ; void SmfGallery::pictures(class QList<class SmfPictureAlbum> &, int, int)
+	??0SmfUrl@@QAE@XZ @ 228 NONAME ; SmfUrl::SmfUrl(void)
+	??5@YAAAVQDataStream@@AAV0@AAVQContactGender@QtMobility@@@Z @ 229 NONAME ; class QDataStream & operator>>(class QDataStream &, class QtMobility::QContactGender &)
+	??5@YAAAVQDataStream@@AAV0@AAVSmfPlaylist@@@Z @ 230 NONAME ; class QDataStream & operator>>(class QDataStream &, class SmfPlaylist &)
+	?subtitle@SmfSubtitle@@QBE?AVQByteArray@@XZ @ 231 NONAME ; class QByteArray SmfSubtitle::subtitle(void) const
+	?setUrl@SmfArtists@@QAEXABVQUrl@@@Z @ 232 NONAME ; void SmfArtists::setUrl(class QUrl const &)
+	??0SmfPicture@@QAE@ABVQImage@@@Z @ 233 NONAME ; SmfPicture::SmfPicture(class QImage const &)
+	??_ESmfGroup@@QAE@I@Z @ 234 NONAME ; SmfGroup::~SmfGroup(unsigned int)
+	??5@YAAAVQDataStream@@AAV0@AAVSmfUrl@@@Z @ 235 NONAME ; class QDataStream & operator>>(class QDataStream &, class SmfUrl &)
+	?qt_metacall@SmfMusicService@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 236 NONAME ; int SmfMusicService::qt_metacall(enum QMetaObject::Call, int, void * *)
+	??0SmfPost@@QAE@XZ @ 237 NONAME ; SmfPost::SmfPost(void)
+	?year@SmfTrackInfo@@QBE?AVQDateTime@@XZ @ 238 NONAME ; class QDateTime SmfTrackInfo::year(void) const
+	?staticMetaObject@SmfLyricsService@@2UQMetaObject@@B @ 239 NONAME ; struct QMetaObject const SmfLyricsService::staticMetaObject
+	??4SmfUrl@@QAEAAV0@ABV0@@Z @ 240 NONAME ; class SmfUrl & SmfUrl::operator=(class SmfUrl const &)
+	?tr@SmfMusicSearch@@SA?AVQString@@PBD0H@Z @ 241 NONAME ; class QString SmfMusicSearch::tr(char const *, char const *, int)
+	?description@SmfProvider@@QBE?AVQString@@XZ @ 242 NONAME ; class QString SmfProvider::description(void) const
+	??1SmfActivityFetcher@@UAE@XZ @ 243 NONAME ; SmfActivityFetcher::~SmfActivityFetcher(void)
+	??0SmfClient@@QAE@XZ @ 244 NONAME ; SmfClient::SmfClient(void)
+	?subtitles@SmfLyricsService@@QAEXVSmfTrackInfo@@W4SmfSubtitleSearchFilter@@HH@Z @ 245 NONAME ; void SmfLyricsService::subtitles(class SmfTrackInfo, enum SmfSubtitleSearchFilter, int, int)
+	?stores@SmfMusicSearch@@QAEXVSmfTrackInfo@@HH@Z @ 246 NONAME ; void SmfMusicSearch::stores(class SmfTrackInfo, int, int)
+	?releaseYear@SmfLyrics@@QBE?AVQDateTime@@XZ @ 247 NONAME ; class QDateTime SmfLyrics::releaseYear(void) const
+	??6@YAAAVQDataStream@@AAV0@ABVSmfGroup@@@Z @ 248 NONAME ; class QDataStream & operator<<(class QDataStream &, class SmfGroup const &)
+	?postedDate@SmfPicture@@QBE?AVQDateTime@@XZ @ 249 NONAME ; class QDateTime SmfPicture::postedDate(void) const
+	??6@YAAAVQDataStream@@AAV0@ABVQContactAvatar@QtMobility@@@Z @ 250 NONAME ; class QDataStream & operator<<(class QDataStream &, class QtMobility::QContactAvatar const &)
+	?staticMetaObject@SmfPlaylistService@@2UQMetaObject@@B @ 251 NONAME ; struct QMetaObject const SmfPlaylistService::staticMetaObject
+	??5@YAAAVQDataStream@@AAV0@AAVSmfContact@@@Z @ 252 NONAME ; class QDataStream & operator>>(class QDataStream &, class SmfContact &)
+	?trUtf8@SmfLyricsService@@SA?AVQString@@PBD0@Z @ 253 NONAME ; class QString SmfLyricsService::trUtf8(char const *, char const *)
+	??1SmfMusicEvents@@UAE@XZ @ 254 NONAME ; SmfMusicEvents::~SmfMusicEvents(void)
+	??4SmfProvider@@QAEAAV0@ABV0@@Z @ 255 NONAME ; class SmfProvider & SmfProvider::operator=(class SmfProvider const &)
+	?duration@SmfSubtitle@@QBENXZ @ 256 NONAME ; double SmfSubtitle::duration(void) const
+	??5@YAAAVQDataStream@@AAV0@AAVSmfLocation@@@Z @ 257 NONAME ; class QDataStream & operator>>(class QDataStream &, class SmfLocation &)
+	?setPicture@SmfPicture@@QAEXABVQImage@@@Z @ 258 NONAME ; void SmfPicture::setPicture(class QImage const &)
+	?title@SmfPicture@@QBE?AVQString@@XZ @ 259 NONAME ; class QString SmfPicture::title(void) const
+	?rating@SmfMusicRating@@QBEHXZ @ 260 NONAME ; int SmfMusicRating::rating(void) const
+	?sharePost@SmfPostProvider@@QAEXAAVSmfPost@@AAVSmfContact@@_N@Z @ 261 NONAME ; void SmfPostProvider::sharePost(class SmfPost &, class SmfContact &, bool)
+	?timeStamp@SmfComment@@QBE?AVQDateTime@@XZ @ 262 NONAME ; class QDateTime SmfComment::timeStamp(void) const
+	?setId@SmfPicture@@QAEXABVQString@@@Z @ 263 NONAME ; void SmfPicture::setId(class QString const &)
+	??4SmfRelationItem@@QAEAAV0@ABV0@@Z @ 264 NONAME ; class SmfRelationItem & SmfRelationItem::operator=(class SmfRelationItem const &)
+	??6@YAAAVQDataStream@@AAV0@ABVSmfLocation@@@Z @ 265 NONAME ; class QDataStream & operator<<(class QDataStream &, class SmfLocation const &)
+	??6@YAAAVQDataStream@@AAV0@ABVQContactPresence@QtMobility@@@Z @ 266 NONAME ; class QDataStream & operator<<(class QDataStream &, class QtMobility::QContactPresence const &)
+	?tags@SmfTrackInfo@@QBE?AVQStringList@@XZ @ 267 NONAME ; class QStringList SmfTrackInfo::tags(void) const
+	?title@SmfTrackInfo@@QBE?AVQString@@XZ @ 268 NONAME ; class QString SmfTrackInfo::title(void) const
+	?qt_metacast@SmfMusicEvents@@UAEPAXPBD@Z @ 269 NONAME ; void * SmfMusicEvents::qt_metacast(char const *)
+	?supportsAppearence@SmfPostProvider@@QBE_NXZ @ 270 NONAME ; bool SmfPostProvider::supportsAppearence(void) const
+	?customDataAvailable@SmfGallery@@IAEXHPAVQByteArray@@@Z @ 271 NONAME ; void SmfGallery::customDataAvailable(int, class QByteArray *)
+	?url@SmfArtists@@QBE?AVQUrl@@XZ @ 272 NONAME ; class QUrl SmfArtists::url(void) const
+	?serviceName@SmfProvider@@QBE?AVQString@@XZ @ 273 NONAME ; class QString SmfProvider::serviceName(void) const
+	?getProvider@SmfLyricsService@@QAEPAVSmfProvider@@XZ @ 274 NONAME ; class SmfProvider * SmfLyricsService::getProvider(void)
+	?qt_metacast@SmfPlaylistService@@UAEPAXPBD@Z @ 275 NONAME ; void * SmfPlaylistService::qt_metacast(char const *)
+	?creationDate@SmfPlaylist@@QBE?AVQDateTime@@XZ @ 276 NONAME ; class QDateTime SmfPlaylist::creationDate(void) const
+	?friends@SmfContactFetcher@@QAE_NHH@Z @ 277 NONAME ; bool SmfContactFetcher::friends(int, int)
+	?title@SmfUrl@@QBE?AVQString@@XZ @ 278 NONAME ; class QString SmfUrl::title(void) const
+	?owner@SmfPost@@QBE?AVSmfContact@@XZ @ 279 NONAME ; class SmfContact SmfPost::owner(void) const
+	??_ESmfContact@@QAE@I@Z @ 280 NONAME ; SmfContact::~SmfContact(unsigned int)
+	??1SmfSubtitle@@QAE@XZ @ 281 NONAME ; SmfSubtitle::~SmfSubtitle(void)
+	?trUtf8@SmfLyricsService@@SA?AVQString@@PBD0H@Z @ 282 NONAME ; class QString SmfLyricsService::trUtf8(char const *, char const *, int)
+	??1SmfRelationMgr@@UAE@XZ @ 283 NONAME ; SmfRelationMgr::~SmfRelationMgr(void)
+	?attribution@SmfPlaylist@@QBE?AV?$QList@VQUrl@@@@XZ @ 284 NONAME ; class QList<class QUrl> SmfPlaylist::attribution(void) const
+	?setInterestInfo@SmfMusicProfile@@QAEXABV?$QList@VSmfTrackInfo@@@@@Z @ 285 NONAME ; void SmfMusicProfile::setInterestInfo(class QList<class SmfTrackInfo> const &)
+	??0SmfGallery@@QAE@PAVSmfProvider@@@Z @ 286 NONAME ; SmfGallery::SmfGallery(class SmfProvider *)
+	?content@SmfActivityObject@@QBE?AVQString@@XZ @ 287 NONAME ; class QString SmfActivityObject::content(void) const
+	??_ESmfGallery@@UAE@I@Z @ 288 NONAME ; SmfGallery::~SmfGallery(unsigned int)
+	??0SmfRelationMgr@@QAE@PAVQObject@@@Z @ 289 NONAME ; SmfRelationMgr::SmfRelationMgr(class QObject *)
+	??5@YAAAVQDataStream@@AAV0@AAVSmfProvider@@@Z @ 290 NONAME ; class QDataStream & operator>>(class QDataStream &, class SmfProvider &)
+	?setImage@SmfPlaylist@@QAEXABVQUrl@@@Z @ 291 NONAME ; void SmfPlaylist::setImage(class QUrl const &)
+	??4SmfPost@@QAEAAV0@ABV0@@Z @ 292 NONAME ; class SmfPost & SmfPost::operator=(class SmfPost const &)
+	?rating@SmfTrackInfo@@QBE?AVSmfMusicRating@@XZ @ 293 NONAME ; class SmfMusicRating SmfTrackInfo::rating(void) const
+	?playListTitle@SmfPlaylist@@QBE?AVQString@@XZ @ 294 NONAME ; class QString SmfPlaylist::playListTitle(void) const
+	?id@SmfUrl@@QBE?AVQString@@XZ @ 295 NONAME ; class QString SmfUrl::id(void) const
+	??0SmfMusicService@@QAE@PAVSmfProvider@@@Z @ 296 NONAME ; SmfMusicService::SmfMusicService(class SmfProvider *)
+	??0SmfEvent@@QAE@ABV0@@Z @ 297 NONAME ; SmfEvent::SmfEvent(class SmfEvent const &)
+	?name@SmfGroup@@QBE?AVQString@@XZ @ 298 NONAME ; class QString SmfGroup::name(void) const
+	?uploadFinished@SmfGallery@@IAEXV?$QList@W4SmfError@@@@@Z @ 299 NONAME ; void SmfGallery::uploadFinished(class QList<enum SmfError>)
+	?trUtf8@SmfMusicEvents@@SA?AVQString@@PBD0@Z @ 300 NONAME ; class QString SmfMusicEvents::trUtf8(char const *, char const *)
+	??0SmfComment@@QAE@XZ @ 301 NONAME ; SmfComment::SmfComment(void)
+	??1SmfGallery@@UAE@XZ @ 302 NONAME ; SmfGallery::~SmfGallery(void)
+	??6@YAAAVQDataStream@@AAV0@ABVQContactOrganization@QtMobility@@@Z @ 303 NONAME ; class QDataStream & operator<<(class QDataStream &, class QtMobility::QContactOrganization const &)
+	??5@YAAAVQDataStream@@AAV0@AAVSmfRelationItem@@@Z @ 304 NONAME ; class QDataStream & operator>>(class QDataStream &, class SmfRelationItem &)
+	??4SmfAlbum@@QAEAAV0@ABV0@@Z @ 305 NONAME ; class SmfAlbum & SmfAlbum::operator=(class SmfAlbum const &)
+	??1SmfRelationItem@@QAE@XZ @ 306 NONAME ; SmfRelationItem::~SmfRelationItem(void)
+	?artists@SmfEvent@@QBE?AVSmfArtists@@XZ @ 307 NONAME ; class SmfArtists SmfEvent::artists(void) const
+	?setTimeStamp@SmfComment@@QAEXABVQDateTime@@@Z @ 308 NONAME ; void SmfComment::setTimeStamp(class QDateTime const &)
+	?setMaxRating@SmfMusicRating@@QAEXABH@Z @ 309 NONAME ; void SmfMusicRating::setMaxRating(int const &)
+	?trackList@SmfPlaylist@@QBE?AV?$QList@VSmfTrackInfo@@@@XZ @ 310 NONAME ; class QList<class SmfTrackInfo> SmfPlaylist::trackList(void) const
+	?description@SmfPicture@@QBE?AVQString@@XZ @ 311 NONAME ; class QString SmfPicture::description(void) const
+	?setUrl@SmfPicture@@QAEXABVQUrl@@@Z @ 312 NONAME ; void SmfPicture::setUrl(class QUrl const &)
+	??6@YAAAVQDataStream@@AAV0@ABVSmfEvent@@@Z @ 313 NONAME ; class QDataStream & operator<<(class QDataStream &, class SmfEvent const &)
+	?count@SmfRelationMgr@@QAEIVQString@@@Z @ 314 NONAME ; unsigned int SmfRelationMgr::count(class QString)
+	?setAuthor@SmfActivityEntry@@QAE_NABVSmfContact@@@Z @ 315 NONAME ; bool SmfActivityEntry::setAuthor(class SmfContact const &)
+	?searchUser@SmfMusicService@@QAEXVSmfLocation@@HH@Z @ 316 NONAME ; void SmfMusicService::searchUser(class SmfLocation, int, int)
+	?qt_metacast@SmfLyricsService@@UAEPAXPBD@Z @ 317 NONAME ; void * SmfLyricsService::qt_metacast(char const *)
+	?language@SmfSubtitle@@QBE?AVQString@@XZ @ 318 NONAME ; class QString SmfSubtitle::language(void) const
+	?link@SmfActivityObject@@QBE?AVQString@@XZ @ 319 NONAME ; class QString SmfActivityObject::link(void) const
+	??5@YAAAVQDataStream@@AAV0@AAVQContactType@QtMobility@@@Z @ 320 NONAME ; class QDataStream & operator>>(class QDataStream &, class QtMobility::QContactType &)
+	?storeSearchAvailable@SmfMusicSearch@@IAEXPAV?$QList@VSmfProvider@@@@W4SmfError@@USmfResultPage@@@Z @ 321 NONAME ; void SmfMusicSearch::storeSearchAvailable(class QList<class SmfProvider> *, enum SmfError, struct SmfResultPage)
+	??0SmfActivityObject@@QAE@XZ @ 322 NONAME ; SmfActivityObject::SmfActivityObject(void)
+	?selfActivities@SmfActivityFetcher@@QAEXHH@Z @ 323 NONAME ; void SmfActivityFetcher::selfActivities(int, int)
+	??0SmfContactFetcher@@QAE@PAVSmfProvider@@@Z @ 324 NONAME ; SmfContactFetcher::SmfContactFetcher(class SmfProvider *)
+	?metaObject@SmfContactFetcher@@UBEPBUQMetaObject@@XZ @ 325 NONAME ; struct QMetaObject const * SmfContactFetcher::metaObject(void) const
+	?setArtists@SmfEvent@@QAEXABVSmfArtists@@@Z @ 326 NONAME ; void SmfEvent::setArtists(class SmfArtists const &)
+	??6@YAAAVQDataStream@@AAV0@ABVQContactNickname@QtMobility@@@Z @ 327 NONAME ; class QDataStream & operator<<(class QDataStream &, class QtMobility::QContactNickname const &)
+	??4SmfContact@@QAEAAV0@ABV0@@Z @ 328 NONAME ; class SmfContact & SmfContact::operator=(class SmfContact const &)
+	??0SmfPicture@@QAE@XZ @ 329 NONAME ; SmfPicture::SmfPicture(void)
+	?setId@SmfPost@@QAEXVQString@@@Z @ 330 NONAME ; void SmfPost::setId(class QString)
+	?getProvider@SmfMusicEvents@@QAEPAVSmfProvider@@XZ @ 331 NONAME ; class SmfProvider * SmfMusicEvents::getProvider(void)
+	?albums@SmfGallery@@QAEXVQStringList@@PAVSmfContact@@HH@Z @ 332 NONAME ; void SmfGallery::albums(class QStringList, class SmfContact *, int, int)
+	?upload@SmfGallery@@QAEXPAV?$QList@VSmfPicture@@@@PAVSmfPictureAlbum@@@Z @ 333 NONAME ; void SmfGallery::upload(class QList<class SmfPicture> *, class SmfPictureAlbum *)
+	?setTargetObj@SmfActivityEntry@@QAE_NABVSmfActivityObject@@@Z @ 334 NONAME ; bool SmfActivityEntry::setTargetObj(class SmfActivityObject const &)
+	?customDataAvailable@SmfPostProvider@@IAEXHPAVQByteArray@@@Z @ 335 NONAME ; void SmfPostProvider::customDataAvailable(int, class QByteArray *)
+	?comments@SmfPicture@@QBE?AV?$QList@VSmfComment@@@@XZ @ 336 NONAME ; class QList<class SmfComment> SmfPicture::comments(void) const
+	?title@SmfEvent@@QBE?AVQString@@XZ @ 337 NONAME ; class QString SmfEvent::title(void) const
+	?setYear@SmfTrackInfo@@QAEXABVQDateTime@@@Z @ 338 NONAME ; void SmfTrackInfo::setYear(class QDateTime const &)
+	?setUrl@SmfPictureAlbum@@QAEXABVQUrl@@@Z @ 339 NONAME ; void SmfPictureAlbum::setUrl(class QUrl const &)
+	?trUtf8@SmfPostProvider@@SA?AVQString@@PBD0H@Z @ 340 NONAME ; class QString SmfPostProvider::trUtf8(char const *, char const *, int)
+	??1SmfMusicProfile@@QAE@XZ @ 341 NONAME ; SmfMusicProfile::~SmfMusicProfile(void)
+	?setEventDateTime@SmfEvent@@QAEXABVQDateTime@@@Z @ 342 NONAME ; void SmfEvent::setEventDateTime(class QDateTime const &)
+	??_ESmfRelationItem@@QAE@I@Z @ 343 NONAME ; SmfRelationItem::~SmfRelationItem(unsigned int)
+	??0SmfRelationItem@@QAE@ABV0@@Z @ 344 NONAME ; SmfRelationItem::SmfRelationItem(class SmfRelationItem const &)
+	??6@YAAAVQDataStream@@AAV0@ABVQContactPhoneNumber@QtMobility@@@Z @ 345 NONAME ; class QDataStream & operator<<(class QDataStream &, class QtMobility::QContactPhoneNumber const &)
+	?setAuthor@SmfPlaylist@@QAEXABVQString@@@Z @ 346 NONAME ; void SmfPlaylist::setAuthor(class QString const &)
+	?image@SmfPost@@QBE?AVQImage@@XZ @ 347 NONAME ; class QImage SmfPost::image(void) const
+	?setCity@SmfLocation@@QAEXABVQString@@@Z @ 348 NONAME ; void SmfLocation::setCity(class QString const &)
+	?setGenre@SmfTrackInfo@@QAEXABVQString@@@Z @ 349 NONAME ; void SmfTrackInfo::setGenre(class QString const &)
+	?updatePost@SmfPostProvider@@QAEXAAVSmfPost@@@Z @ 350 NONAME ; void SmfPostProvider::updatePost(class SmfPost &)
+	?setTrackList@SmfPlaylist@@QAEXABV?$QList@VSmfTrackInfo@@@@@Z @ 351 NONAME ; void SmfPlaylist::setTrackList(class QList<class SmfTrackInfo> const &)
+	?setComment@SmfTrackInfo@@QAEXABV?$QList@VSmfComment@@@@@Z @ 352 NONAME ; void SmfTrackInfo::setComment(class QList<class SmfComment> const &)
+	?setTitle@SmfEvent@@QAEXABVQString@@@Z @ 353 NONAME ; void SmfEvent::setTitle(class QString const &)
+	?setImage@SmfArtists@@QAEXABVQImage@@@Z @ 354 NONAME ; void SmfArtists::setImage(class QImage const &)
+	?trUtf8@SmfGallery@@SA?AVQString@@PBD0H@Z @ 355 NONAME ; class QString SmfGallery::trUtf8(char const *, char const *, int)
+	?setActivities@SmfActivityEntry@@QAE_NAAV?$QList@VSmfActivityObject@@@@@Z @ 356 NONAME ; bool SmfActivityEntry::setActivities(class QList<class SmfActivityObject> &)
+	?setZipCode@SmfLocation@@QAEXABVQString@@@Z @ 357 NONAME ; void SmfLocation::setZipCode(class QString const &)
+	?setProvider@SmfRelationItem@@QAEXAAVSmfProvider@@@Z @ 358 NONAME ; void SmfRelationItem::setProvider(class SmfProvider &)
+	??1SmfPluginUtil@@QAE@XZ @ 359 NONAME ; SmfPluginUtil::~SmfPluginUtil(void)
+	??6@YAAAVQDataStream@@AAV0@ABVSmfActivityObject@@@Z @ 360 NONAME ; class QDataStream & operator<<(class QDataStream &, class SmfActivityObject const &)
+	??1SmfPlaylist@@QAE@XZ @ 361 NONAME ; SmfPlaylist::~SmfPlaylist(void)
+	?tr@SmfMusicEvents@@SA?AVQString@@PBD0@Z @ 362 NONAME ; class QString SmfMusicEvents::tr(char const *, char const *)
+	??0SmfMusicEvents@@QAE@PAVSmfProvider@@@Z @ 363 NONAME ; SmfMusicEvents::SmfMusicEvents(class SmfProvider *)
+	??6@YAAAVQDataStream@@AAV0@ABVQContactGeoLocation@QtMobility@@@Z @ 364 NONAME ; class QDataStream & operator<<(class QDataStream &, class QtMobility::QContactGeoLocation const &)
+	??1SmfAlbum@@QAE@XZ @ 365 NONAME ; SmfAlbum::~SmfAlbum(void)
+	??6@YAAAVQDataStream@@AAV0@ABVQContactType@QtMobility@@@Z @ 366 NONAME ; class QDataStream & operator<<(class QDataStream &, class QtMobility::QContactType const &)
+	??_ESmfMusicProfile@@QAE@I@Z @ 367 NONAME ; SmfMusicProfile::~SmfMusicProfile(unsigned int)
+	?id@SmfLyrics@@QBE?AVQString@@XZ @ 368 NONAME ; class QString SmfLyrics::id(void) const
+	?setText@SmfComment@@QAEXABVQString@@@Z @ 369 NONAME ; void SmfComment::setText(class QString const &)
+	?parse@SmfPluginUtil@@QAE?AVQVariant@@ABVQByteArray@@PA_N@Z @ 370 NONAME ; class QVariant SmfPluginUtil::parse(class QByteArray const &, bool *)
+	??5@YAAAVQDataStream@@AAV0@AAVSmfGroup@@@Z @ 371 NONAME ; class QDataStream & operator>>(class QDataStream &, class SmfGroup &)
+	?qt_metacast@SmfMusicSearch@@UAEPAXPBD@Z @ 372 NONAME ; void * SmfMusicSearch::qt_metacast(char const *)
+	?setDuration@SmfEvent@@QAEXABVQTime@@@Z @ 373 NONAME ; void SmfEvent::setDuration(class QTime const &)
+	?setId@SmfComment@@QAEXABVQString@@@Z @ 374 NONAME ; void SmfComment::setId(class QString const &)
+	??1SmfActivityObject@@QAE@XZ @ 375 NONAME ; SmfActivityObject::~SmfActivityObject(void)
+	??1SmfPictureAlbum@@QAE@XZ @ 376 NONAME ; SmfPictureAlbum::~SmfPictureAlbum(void)
+	?trUtf8@SmfRelationMgr@@SA?AVQString@@PBD0H@Z @ 377 NONAME ; class QString SmfRelationMgr::trUtf8(char const *, char const *, int)
+	?postDirected@SmfPostProvider@@QAEXAAVSmfPost@@AAVSmfContact@@PAVSmfLocation@@@Z @ 378 NONAME ; void SmfPostProvider::postDirected(class SmfPost &, class SmfContact &, class SmfLocation *)
+	?followers@SmfContactFetcher@@QAE_NHH@Z @ 379 NONAME ; bool SmfContactFetcher::followers(int, int)
+	?setRel@SmfUrl@@QAEXABVQString@@@Z @ 380 NONAME ; void SmfUrl::setRel(class QString const &)
+	?qt_metacall@SmfGallery@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 381 NONAME ; int SmfGallery::qt_metacall(enum QMetaObject::Call, int, void * *)
+	?friendsListAvailable@SmfContactFetcher@@IAEXPAV?$QList@VSmfContact@@@@W4SmfError@@USmfResultPage@@@Z @ 382 NONAME ; void SmfContactFetcher::friendsListAvailable(class QList<class SmfContact> *, enum SmfError, struct SmfResultPage)
+	?trUtf8@SmfRelationMgr@@SA?AVQString@@PBD0@Z @ 383 NONAME ; class QString SmfRelationMgr::trUtf8(char const *, char const *)
+	??1SmfPostProvider@@UAE@XZ @ 384 NONAME ; SmfPostProvider::~SmfPostProvider(void)
+	?writeLog@SmfClient@@QBEXVQString@@@Z @ 385 NONAME ; void SmfClient::writeLog(class QString) const
+	??0SmfSubtitle@@QAE@XZ @ 386 NONAME ; SmfSubtitle::SmfSubtitle(void)
+	?upload@SmfGallery@@QAEXPAVSmfPicture@@PAVSmfPictureAlbum@@@Z @ 387 NONAME ; void SmfGallery::upload(class SmfPicture *, class SmfPictureAlbum *)
+	?setContact@SmfRelationItem@@QAEXAAVSmfContact@@@Z @ 388 NONAME ; void SmfRelationItem::setContact(class SmfContact &)
+	??5@YAAAVQDataStream@@AAV0@AAVQContactOrganization@QtMobility@@@Z @ 389 NONAME ; class QDataStream & operator>>(class QDataStream &, class QtMobility::QContactOrganization &)
+	?getNonce@SmfPluginUtil@@QAEXAAVQString@@@Z @ 390 NONAME ; void SmfPluginUtil::getNonce(class QString &)
+	?getProvider@SmfContactFetcher@@QAEPAVSmfProvider@@XZ @ 391 NONAME ; class SmfProvider * SmfContactFetcher::getProvider(void)
+	?tr@SmfMusicService@@SA?AVQString@@PBD0H@Z @ 392 NONAME ; class QString SmfMusicService::tr(char const *, char const *, int)
+	?setServiceName@SmfProvider@@QAEXAAVQString@@@Z @ 393 NONAME ; void SmfProvider::setServiceName(class QString &)
+	??5@YAAAVQDataStream@@AAV0@AAVSmfMusicFingerPrint@@@Z @ 394 NONAME ; class QDataStream & operator>>(class QDataStream &, class SmfMusicFingerPrint &)
+	??0SmfMusicProfile@@QAE@XZ @ 395 NONAME ; SmfMusicProfile::SmfMusicProfile(void)
+	?id@SmfPlaylist@@QBE?AVQString@@XZ @ 396 NONAME ; class QString SmfPlaylist::id(void) const
+	?setMembers@SmfGroup@@QAEXPAV?$QList@VSmfContact@@@@@Z @ 397 NONAME ; void SmfGroup::setMembers(class QList<class SmfContact> *)
+	?getAll@SmfRelationMgr@@QAE?AV?$QList@VSmfRelationItem@@@@AAVQString@@@Z @ 398 NONAME ; class QList<class SmfRelationItem> SmfRelationMgr::getAll(class QString &)
+	?setLanguage@SmfSubtitle@@QAEXABVQString@@@Z @ 399 NONAME ; void SmfSubtitle::setLanguage(class QString const &)
+	??0SmfPlaylist@@QAE@ABV0@@Z @ 400 NONAME ; SmfPlaylist::SmfPlaylist(class SmfPlaylist const &)
+	??_ESmfMusicSearch@@UAE@I@Z @ 401 NONAME ; SmfMusicSearch::~SmfMusicSearch(unsigned int)
+	?trUtf8@SmfGallery@@SA?AVQString@@PBD0@Z @ 402 NONAME ; class QString SmfGallery::trUtf8(char const *, char const *)
+	??1SmfClient@@QAE@XZ @ 403 NONAME ; SmfClient::~SmfClient(void)
+	?setStreet@SmfLocation@@QAEXABVQString@@@Z @ 404 NONAME ; void SmfLocation::setStreet(class QString const &)
+	??5@YAAAVQDataStream@@AAV0@AAVQContactBirthday@QtMobility@@@Z @ 405 NONAME ; class QDataStream & operator>>(class QDataStream &, class QtMobility::QContactBirthday &)
+	??0SmfPlaylistService@@QAE@PAVSmfProvider@@@Z @ 406 NONAME ; SmfPlaylistService::SmfPlaylistService(class SmfProvider *)
+	?groups@SmfContactFetcher@@QAE_NHH@Z @ 407 NONAME ; bool SmfContactFetcher::groups(int, int)
+	?setMusicFingerPrint@SmfMusicFingerPrint@@QAEXABVQByteArray@@@Z @ 408 NONAME ; void SmfMusicFingerPrint::setMusicFingerPrint(class QByteArray const &)
+	??0SmfArtists@@QAE@ABV0@@Z @ 409 NONAME ; SmfArtists::SmfArtists(class SmfArtists const &)
+	?getStaticMetaObject@SmfPostProvider@@SAABUQMetaObject@@XZ @ 410 NONAME ; struct QMetaObject const & SmfPostProvider::getStaticMetaObject(void)
+	?author@SmfPlaylist@@QBE?AVQString@@XZ @ 411 NONAME ; class QString SmfPlaylist::author(void) const
+	?metaObject@SmfMusicService@@UBEPBUQMetaObject@@XZ @ 412 NONAME ; struct QMetaObject const * SmfMusicService::metaObject(void) const
+	?language@SmfLyrics@@QBE?AVQString@@XZ @ 413 NONAME ; class QString SmfLyrics::language(void) const
+	?setSubtitle@SmfSubtitle@@QAEXABVQByteArray@@@Z @ 414 NONAME ; void SmfSubtitle::setSubtitle(class QByteArray const &)
+	??6@YAAAVQDataStream@@AAV0@ABVQContactBirthday@QtMobility@@@Z @ 415 NONAME ; class QDataStream & operator<<(class QDataStream &, class QtMobility::QContactBirthday const &)
+	??6@YAAAVQDataStream@@AAV0@ABVSmfTrackInfo@@@Z @ 416 NONAME ; class QDataStream & operator<<(class QDataStream &, class SmfTrackInfo const &)
+	?postsAvailable@SmfPostProvider@@IAEXPAV?$QList@VSmfPost@@@@W4SmfError@@USmfResultPage@@@Z @ 417 NONAME ; void SmfPostProvider::postsAvailable(class QList<class SmfPost> *, enum SmfError, struct SmfResultPage)
+	??0SmfArtists@@QAE@XZ @ 418 NONAME ; SmfArtists::SmfArtists(void)
+	??1SmfTrackInfo@@QAE@XZ @ 419 NONAME ; SmfTrackInfo::~SmfTrackInfo(void)
+	?setMinRating@SmfMusicRating@@QAEXABH@Z @ 420 NONAME ; void SmfMusicRating::setMinRating(int const &)
+	?setCreationDate@SmfPlaylist@@QAEXABVQDateTime@@@Z @ 421 NONAME ; void SmfPlaylist::setCreationDate(class QDateTime const &)
+	??0SmfPluginUtil@@AAE@XZ @ 422 NONAME ; SmfPluginUtil::SmfPluginUtil(void)
+	?userEvents@SmfMusicProfile@@QBE?AV?$QList@VSmfEvent@@@@XZ @ 423 NONAME ; class QList<class SmfEvent> SmfMusicProfile::userEvents(void) const
+	?setName@SmfLocation@@QAEXABVQString@@@Z @ 424 NONAME ; void SmfLocation::setName(class QString const &)
+	?create@SmfRelationMgr@@QAE?AVQString@@PAVSmfProvider@@PAVSmfContact@@@Z @ 425 NONAME ; class QString SmfRelationMgr::create(class SmfProvider *, class SmfContact *)
+	?setTitle@SmfTrackInfo@@QAEXABVQString@@@Z @ 426 NONAME ; void SmfTrackInfo::setTitle(class QString const &)
+	??5@YAAAVQDataStream@@AAV0@AAVQContactAddress@QtMobility@@@Z @ 427 NONAME ; class QDataStream & operator>>(class QDataStream &, class QtMobility::QContactAddress &)
+	??0SmfGroup@@QAE@ABV0@@Z @ 428 NONAME ; SmfGroup::SmfGroup(class SmfGroup const &)
+	?id@SmfGroup@@QBE?AVQString@@XZ @ 429 NONAME ; class QString SmfGroup::id(void) const
+	?setOwner@SmfPicture@@QAEXABVQString@@@Z @ 430 NONAME ; void SmfPicture::setOwner(class QString const &)
+	?setImage@SmfPost@@QAEXABVQImage@@@Z @ 431 NONAME ; void SmfPost::setImage(class QImage const &)
+	?parse@SmfPluginUtil@@QAE?AVQVariant@@PAVQIODevice@@PA_N@Z @ 432 NONAME ; class QVariant SmfPluginUtil::parse(class QIODevice *, bool *)
+	?setType@SmfActivityObject@@QAEXABW4SmfActivityObjectType@@@Z @ 433 NONAME ; void SmfActivityObject::setType(enum SmfActivityObjectType const &)
+	??0SmfUrl@@QAE@ABV0@@Z @ 434 NONAME ; SmfUrl::SmfUrl(class SmfUrl const &)
+	?getStaticMetaObject@SmfLyricsService@@SAABUQMetaObject@@XZ @ 435 NONAME ; struct QMetaObject const & SmfLyricsService::getStaticMetaObject(void)
+	?playlistsOf@SmfPlaylistService@@QAEXPAVSmfMusicProfile@@HH@Z @ 436 NONAME ; void SmfPlaylistService::playlistsOf(class SmfMusicProfile *, int, int)
+	?associate@SmfRelationMgr@@QAE?AW4SmfError@@ABVQString@@PBVSmfContact@@PAVSmfProvider@@@Z @ 437 NONAME ; enum SmfError SmfRelationMgr::associate(class QString const &, class SmfContact const *, class SmfProvider *)
+	?serviceIcon@SmfProvider@@QBE?AVQImage@@XZ @ 438 NONAME ; class QImage SmfProvider::serviceIcon(void) const
+	??_ESmfActivityFetcher@@UAE@I@Z @ 439 NONAME ; SmfActivityFetcher::~SmfActivityFetcher(unsigned int)
+	?events@SmfMusicEvents@@QAEXVQContactGeoLocation@QtMobility@@HH@Z @ 440 NONAME ; void SmfMusicEvents::events(class QtMobility::QContactGeoLocation, int, int)
+	?searchInGroup@SmfContactFetcher@@QAE_NVSmfGroup@@HH@Z @ 441 NONAME ; bool SmfContactFetcher::searchInGroup(class SmfGroup, int, int)
+	?postCurrentPlaying@SmfMusicSearch@@QAEXVSmfTrackInfo@@@Z @ 442 NONAME ; void SmfMusicSearch::postCurrentPlaying(class SmfTrackInfo)
+	?recommendations@SmfMusicSearch@@QAEXVSmfTrackInfo@@HH@Z @ 443 NONAME ; void SmfMusicSearch::recommendations(class SmfTrackInfo, int, int)
+	?staticMetaObject@SmfGallery@@2UQMetaObject@@B @ 444 NONAME ; struct QMetaObject const SmfGallery::staticMetaObject
+	??_ESmfLyricsService@@UAE@I@Z @ 445 NONAME ; SmfLyricsService::~SmfLyricsService(unsigned int)
+	?metaObject@SmfRelationMgr@@UBEPBUQMetaObject@@XZ @ 446 NONAME ; struct QMetaObject const * SmfRelationMgr::metaObject(void) const
+	??0SmfPictureAlbum@@QAE@XZ @ 447 NONAME ; SmfPictureAlbum::SmfPictureAlbum(void)
+	?extension@SmfPlaylist@@QBE?AV?$QMap@VQString@@VQVariant@@@@XZ @ 448 NONAME ; class QMap<class QString, class QVariant> SmfPlaylist::extension(void) const
+	?qt_metacast@SmfContactFetcher@@UAEPAXPBD@Z @ 449 NONAME ; void * SmfContactFetcher::qt_metacast(char const *)
+	?trackInfo@SmfMusicSearch@@QAEXVSmfMusicFingerPrint@@HH@Z @ 450 NONAME ; void SmfMusicSearch::trackInfo(class SmfMusicFingerPrint, int, int)
+	?interestInfo@SmfMusicProfile@@QBE?AV?$QList@VSmfTrackInfo@@@@XZ @ 451 NONAME ; class QList<class SmfTrackInfo> SmfMusicProfile::interestInfo(void) const
+	?tr@SmfLyricsService@@SA?AVQString@@PBD0H@Z @ 452 NONAME ; class QString SmfLyricsService::tr(char const *, char const *, int)
+	?staticMetaObject@SmfMusicSearch@@2UQMetaObject@@B @ 453 NONAME ; struct QMetaObject const SmfMusicSearch::staticMetaObject
+	?setSupportedInterfaces@SmfProvider@@QAEXAAVQStringList@@@Z @ 454 NONAME ; void SmfProvider::setSupportedInterfaces(class QStringList &)
+	?id@SmfMusicProfile@@QBE?AVQString@@XZ @ 455 NONAME ; class QString SmfMusicProfile::id(void) const
+	??1SmfMusicRating@@QAE@XZ @ 456 NONAME ; SmfMusicRating::~SmfMusicRating(void)
+	?setPlayListTitle@SmfPlaylist@@QAEXABVQString@@@Z @ 457 NONAME ; void SmfPlaylist::setPlayListTitle(class QString const &)
+	??5@YAAAVQDataStream@@AAV0@AAVQContactTimestamp@QtMobility@@@Z @ 458 NONAME ; class QDataStream & operator>>(class QDataStream &, class QtMobility::QContactTimestamp &)
+	?setDuration@SmfTrackInfo@@QAEXABVQTime@@@Z @ 459 NONAME ; void SmfTrackInfo::setDuration(class QTime const &)
+	?getInstance@SmfPluginUtil@@SAPAV1@XZ @ 460 NONAME ; class SmfPluginUtil * SmfPluginUtil::getInstance(void)
+	?subtitleAvailable@SmfLyricsService@@IAEXPAV?$QList@VSmfSubtitle@@@@W4SmfError@@USmfResultPage@@@Z @ 461 NONAME ; void SmfLyricsService::subtitleAvailable(class QList<class SmfSubtitle> *, enum SmfError, struct SmfResultPage)
+	??5@YAAAVQDataStream@@AAV0@AAVSmfActivityObject@@@Z @ 462 NONAME ; class QDataStream & operator>>(class QDataStream &, class SmfActivityObject &)
+	?getProvider@SmfRelationItem@@QBE?AVSmfProvider@@XZ @ 463 NONAME ; class SmfProvider SmfRelationItem::getProvider(void) const
+	?setId@SmfSubtitle@@QAEXABVQString@@@Z @ 464 NONAME ; void SmfSubtitle::setId(class QString const &)
+	??1SmfMusicSearch@@UAE@XZ @ 465 NONAME ; SmfMusicSearch::~SmfMusicSearch(void)
+	?qt_metacast@SmfGallery@@UAEPAXPBD@Z @ 466 NONAME ; void * SmfGallery::qt_metacast(char const *)
+	?supportedInterfaces@SmfProvider@@QBE?AV?$QList@VQString@@@@XZ @ 467 NONAME ; class QList<class QString> SmfProvider::supportedInterfaces(void) const
+	??5@YAAAVQDataStream@@AAV0@AAVQContactOnlineAccount@QtMobility@@@Z @ 468 NONAME ; class QDataStream & operator>>(class QDataStream &, class QtMobility::QContactOnlineAccount &)
+	?tr@SmfActivityFetcher@@SA?AVQString@@PBD0@Z @ 469 NONAME ; class QString SmfActivityFetcher::tr(char const *, char const *)
+	?setRating@SmfMusicRating@@QAEXABH@Z @ 470 NONAME ; void SmfMusicRating::setRating(int const &)
+	?subTypes@SmfContact@@QBE?AVQStringList@@XZ @ 471 NONAME ; class QStringList SmfContact::subTypes(void) const
+	?supportedFormats@SmfPostProvider@@QBE?AV?$QVector@VQTextFormat@@@@XZ @ 472 NONAME ; class QVector<class QTextFormat> SmfPostProvider::supportedFormats(void) const
+	??6@YAAAVQDataStream@@AAV0@ABVQContactAnniversary@QtMobility@@@Z @ 473 NONAME ; class QDataStream & operator<<(class QDataStream &, class QtMobility::QContactAnniversary const &)
+	?id@SmfTrackInfo@@QBE?AVQString@@XZ @ 474 NONAME ; class QString SmfTrackInfo::id(void) const
+	?setObjData@SmfActivityObject@@QAEXABVQVariant@@@Z @ 475 NONAME ; void SmfActivityObject::setObjData(class QVariant const &)
+	?qt_metacall@SmfActivityFetcher@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 476 NONAME ; int SmfActivityFetcher::qt_metacall(enum QMetaObject::Call, int, void * *)
+	?searchNear@SmfContactFetcher@@QAE_NPAVSmfLocation@@W4SmfLocationSearchBoundary@@HH@Z @ 477 NONAME ; bool SmfContactFetcher::searchNear(class SmfLocation *, enum SmfLocationSearchBoundary, int, int)
+	?addToPlaylist@SmfPlaylistService@@QAEHVSmfPlaylist@@PAV?$QList@VSmfTrackInfo@@@@@Z @ 478 NONAME ; int SmfPlaylistService::addToPlaylist(class SmfPlaylist, class QList<class SmfTrackInfo> *)
+	?objData@SmfActivityObject@@QBE?AVQVariant@@XZ @ 479 NONAME ; class QVariant SmfActivityObject::objData(void) const
+	?trUtf8@SmfPlaylistService@@SA?AVQString@@PBD0@Z @ 480 NONAME ; class QString SmfPlaylistService::trUtf8(char const *, char const *)
+	?setTitle@SmfPictureAlbum@@QAEXABVQString@@@Z @ 481 NONAME ; void SmfPictureAlbum::setTitle(class QString const &)
+	?postComment@SmfGallery@@QAEXVSmfPicture@@VSmfComment@@@Z @ 482 NONAME ; void SmfGallery::postComment(class SmfPicture, class SmfComment)
+	?supportedLanguages@SmfProvider@@QBE?AVQStringList@@XZ @ 483 NONAME ; class QStringList SmfProvider::supportedLanguages(void) const
+	??0SmfPost@@QAE@ABV0@@Z @ 484 NONAME ; SmfPost::SmfPost(class SmfPost const &)
+	?getProvider@SmfGallery@@QAEPAVSmfProvider@@XZ @ 485 NONAME ; class SmfProvider * SmfGallery::getProvider(void)
+	?names@SmfArtists@@QBE?AVQStringList@@XZ @ 486 NONAME ; class QStringList SmfArtists::names(void) const
+	??1SmfContact@@QAE@XZ @ 487 NONAME ; SmfContact::~SmfContact(void)
+	?id@SmfLocation@@QBE?AVQString@@XZ @ 488 NONAME ; class QString SmfLocation::id(void) const
+	??_ESmfLyrics@@QAE@I@Z @ 489 NONAME ; SmfLyrics::~SmfLyrics(unsigned int)
+	?setVisibility@SmfPictureAlbum@@QAEXABW4SmfPictureVisibility@@@Z @ 490 NONAME ; void SmfPictureAlbum::setVisibility(enum SmfPictureVisibility const &)
+	?getProvider@SmfMusicSearch@@QAEPAVSmfProvider@@XZ @ 491 NONAME ; class SmfProvider * SmfMusicSearch::getProvider(void)
+	?errorString@SmfPluginUtil@@QBE?AVQString@@XZ @ 492 NONAME ; class QString SmfPluginUtil::errorString(void) const
+	?tr@SmfGallery@@SA?AVQString@@PBD0@Z @ 493 NONAME ; class QString SmfGallery::tr(char const *, char const *)
+	?staticMetaObject@SmfMusicEvents@@2UQMetaObject@@B @ 494 NONAME ; struct QMetaObject const SmfMusicEvents::staticMetaObject
+	?setLicense@SmfPlaylist@@QAEXABVQUrl@@@Z @ 495 NONAME ; void SmfPlaylist::setLicense(class QUrl const &)
+	?setTime@SmfActivityObject@@QAEXABVQDateTime@@@Z @ 496 NONAME ; void SmfActivityObject::setTime(class QDateTime const &)
+	??4SmfLyrics@@QAEAAV0@ABV0@@Z @ 497 NONAME ; class SmfLyrics & SmfLyrics::operator=(class SmfLyrics const &)
+	??4SmfActivityObject@@QAEAAV0@ABV0@@Z @ 498 NONAME ; class SmfActivityObject & SmfActivityObject::operator=(class SmfActivityObject const &)
+	??4SmfMusicProfile@@QAEAAV0@ABV0@@Z @ 499 NONAME ; class SmfMusicProfile & SmfMusicProfile::operator=(class SmfMusicProfile const &)
+	??4SmfGroup@@QAEAAV0@ABV0@@Z @ 500 NONAME ; class SmfGroup & SmfGroup::operator=(class SmfGroup const &)
+	?getProvider@SmfMusicService@@QAEPAVSmfProvider@@XZ @ 501 NONAME ; class SmfProvider * SmfMusicService::getProvider(void)
+	??0SmfLyricsService@@QAE@PAVSmfProvider@@@Z @ 502 NONAME ; SmfLyricsService::SmfLyricsService(class SmfProvider *)
+	?searchByContact@SmfRelationMgr@@QAE?AVQString@@VSmfContact@@@Z @ 503 NONAME ; class QString SmfRelationMgr::searchByContact(class SmfContact)
+	??0SmfContact@@QAE@PAVQObject@@@Z @ 504 NONAME ; SmfContact::SmfContact(class QObject *)
+	?setId@SmfUrl@@QAEXABVQString@@@Z @ 505 NONAME ; void SmfUrl::setId(class QString const &)
+	?qt_metacall@SmfRelationMgr@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 506 NONAME ; int SmfRelationMgr::qt_metacall(enum QMetaObject::Call, int, void * *)
+	?setSupportedLanguages@SmfProvider@@QAEXAAVQStringList@@@Z @ 507 NONAME ; void SmfProvider::setSupportedLanguages(class QStringList &)
+	?setTitle@SmfPost@@QAEXABVQString@@@Z @ 508 NONAME ; void SmfPost::setTitle(class QString const &)
+	??0SmfTrackInfo@@QAE@XZ @ 509 NONAME ; SmfTrackInfo::SmfTrackInfo(void)
+	?setType@SmfUrl@@QAEXABVQString@@@Z @ 510 NONAME ; void SmfUrl::setType(class QString const &)
+	??0SmfActivityEntry@@QAE@XZ @ 511 NONAME ; SmfActivityEntry::SmfActivityEntry(void)
+	?createParameterString@SmfPluginUtil@@QAE?AVQByteArray@@ABVQString@@W4Operation@QNetworkAccessManager@@ABV2@2W4SmfSignatureMethod@@ABV?$QMultiMap@VQByteArray@@V1@@@W4SmfParsingMode@@@Z @ 512 NONAME ; class QByteArray SmfPluginUtil::createParameterString(class QString const &, enum QNetworkAccessManager::Operation, class QByteArray const &, class QByteArray const &, enum SmfSignatureMethod, class QMultiMap<class QByteArray, class QByteArray> const &, enum SmfParsingMode)
+	??5@YAAAVQDataStream@@AAV0@AAVSmfAlbum@@@Z @ 513 NONAME ; class QDataStream & operator>>(class QDataStream &, class SmfAlbum &)
+	?length@SmfUrl@@QBE?AVQString@@XZ @ 514 NONAME ; class QString SmfUrl::length(void) const
+	?qt_metacall@SmfMusicEvents@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 515 NONAME ; int SmfMusicEvents::qt_metacall(enum QMetaObject::Call, int, void * *)
+	??6@YAAAVQDataStream@@AAV0@ABVSmfMusicFingerPrint@@@Z @ 516 NONAME ; class QDataStream & operator<<(class QDataStream &, class SmfMusicFingerPrint const &)
+	?details@SmfActivityEntry@@QBE?AVSmfPost@@XZ @ 517 NONAME ; class SmfPost SmfActivityEntry::details(void) const
+	?lyrics@SmfLyrics@@QBE?AVQByteArray@@XZ @ 518 NONAME ; class QByteArray SmfLyrics::lyrics(void) const
+	?setId@SmfLyrics@@QAEXABVQString@@@Z @ 519 NONAME ; void SmfLyrics::setId(class QString const &)
+	?id@SmfAlbum@@QBE?AVQString@@XZ @ 520 NONAME ; class QString SmfAlbum::id(void) const
+	?thumbnail@SmfActivityObject@@QBE?AVQImage@@XZ @ 521 NONAME ; class QImage SmfActivityObject::thumbnail(void) const
+	??0SmfPost@@QAE@VSmfContact@@VQString@@1VQImage@@VQUrl@@@Z @ 522 NONAME ; SmfPost::SmfPost(class SmfContact, class QString, class QString, class QImage, class QUrl)
+	??1SmfPost@@QAE@XZ @ 523 NONAME ; SmfPost::~SmfPost(void)
+	?members@SmfGroup@@QBE?AV?$QList@VSmfContact@@@@XZ @ 524 NONAME ; class QList<class SmfContact> SmfGroup::members(void) const
+	?followersListAvailable@SmfContactFetcher@@IAEXPAV?$QList@VSmfContact@@@@W4SmfError@@USmfResultPage@@@Z @ 525 NONAME ; void SmfContactFetcher::followersListAvailable(class QList<class SmfContact> *, enum SmfError, struct SmfResultPage)
+	?setIndex@SmfRelationItem@@QAEXI@Z @ 526 NONAME ; void SmfRelationItem::setIndex(unsigned int)
+	?searchContactFinished@SmfContactFetcher@@IAEXPAV?$QList@VSmfContact@@@@W4SmfError@@USmfResultPage@@@Z @ 527 NONAME ; void SmfContactFetcher::searchContactFinished(class QList<class SmfContact> *, enum SmfError, struct SmfResultPage)
+	??6@YAAAVQDataStream@@AAV0@ABVSmfProvider@@@Z @ 528 NONAME ; class QDataStream & operator<<(class QDataStream &, class SmfProvider const &)
+	?posts@SmfPostProvider@@QAEXPAVSmfContact@@HH@Z @ 529 NONAME ; void SmfPostProvider::posts(class SmfContact *, int, int)
+	?visibility@SmfPicture@@QBE?AW4SmfPictureVisibility@@XZ @ 530 NONAME ; enum SmfPictureVisibility SmfPicture::visibility(void) const
+	??_ESmfProvider@@QAE@I@Z @ 531 NONAME ; SmfProvider::~SmfProvider(unsigned int)
+	?downloadFlag@SmfPicture@@QAE_NXZ @ 532 NONAME ; bool SmfPicture::downloadFlag(void)
+	?tr@SmfPostProvider@@SA?AVQString@@PBD0@Z @ 533 NONAME ; class QString SmfPostProvider::tr(char const *, char const *)
+	?postedDate@SmfPictureAlbum@@QBE?AVQDateTime@@XZ @ 534 NONAME ; class QDateTime SmfPictureAlbum::postedDate(void) const
+	??0SmfTrackInfo@@QAE@ABV0@@Z @ 535 NONAME ; SmfTrackInfo::SmfTrackInfo(class SmfTrackInfo const &)
+	?getAllRelations@SmfRelationMgr@@QAE?AV?$QList@VQString@@@@XZ @ 536 NONAME ; class QList<class QString> SmfRelationMgr::getAllRelations(void)
+	?metaObject@SmfPlaylistService@@UBEPBUQMetaObject@@XZ @ 537 NONAME ; struct QMetaObject const * SmfPlaylistService::metaObject(void) const
+	?playlistsListAvailable@SmfPlaylistService@@IAEXPAV?$QList@VSmfPlaylist@@@@W4SmfError@@USmfResultPage@@@Z @ 538 NONAME ; void SmfPlaylistService::playlistsListAvailable(class QList<class SmfPlaylist> *, enum SmfError, struct SmfResultPage)
+	??6@YAAAVQDataStream@@AAV0@ABVQContactEmailAddress@QtMobility@@@Z @ 539 NONAME ; class QDataStream & operator<<(class QDataStream &, class QtMobility::QContactEmailAddress const &)
+	??0SmfRelationItem@@QAE@PAVSmfProvider@@@Z @ 540 NONAME ; SmfRelationItem::SmfRelationItem(class SmfProvider *)
+	??1SmfGroup@@QAE@XZ @ 541 NONAME ; SmfGroup::~SmfGroup(void)
+	?getStaticMetaObject@SmfPlaylistService@@SAABUQMetaObject@@XZ @ 542 NONAME ; struct QMetaObject const & SmfPlaylistService::getStaticMetaObject(void)
+	?addComment@SmfPictureAlbum@@QAEXABVSmfComment@@@Z @ 543 NONAME ; void SmfPictureAlbum::addComment(class SmfComment const &)
+	?tracks@SmfMusicSearch@@QAEXVSmfTrackInfo@@HH@Z @ 544 NONAME ; void SmfMusicSearch::tracks(class SmfTrackInfo, int, int)
+	?license@SmfPlaylist@@QBE?AVQUrl@@XZ @ 545 NONAME ; class QUrl SmfPlaylist::license(void) const
+	?setUserEvents@SmfMusicProfile@@QAEXABV?$QList@VSmfEvent@@@@@Z @ 546 NONAME ; void SmfMusicProfile::setUserEvents(class QList<class SmfEvent> const &)
+	??6@YAAAVQDataStream@@AAV0@ABVQContactTimestamp@QtMobility@@@Z @ 547 NONAME ; class QDataStream & operator<<(class QDataStream &, class QtMobility::QContactTimestamp const &)
+	?comments@SmfTrackInfo@@QBE?AV?$QList@VSmfComment@@@@XZ @ 548 NONAME ; class QList<class SmfComment> SmfTrackInfo::comments(void) const
+	?setArtists@SmfTrackInfo@@QAEXABVSmfArtists@@@Z @ 549 NONAME ; void SmfTrackInfo::setArtists(class SmfArtists const &)
+	?setDescription@SmfProvider@@QAEXAAVQString@@@Z @ 550 NONAME ; void SmfProvider::setDescription(class QString &)
+	?setComments@SmfPlaylist@@QAEXABV?$QList@VSmfComment@@@@@Z @ 551 NONAME ; void SmfPlaylist::setComments(class QList<class SmfComment> const &)
+	?Delete@SmfRelationMgr@@QAE?AW4SmfError@@AAVQString@@@Z @ 552 NONAME ; enum SmfError SmfRelationMgr::Delete(class QString &)
+	?comments@SmfPlaylist@@QBE?AV?$QList@VSmfComment@@@@XZ @ 553 NONAME ; class QList<class SmfComment> SmfPlaylist::comments(void) const
+	??5@YAAAVQDataStream@@AAV0@AAVQContactThumbnail@QtMobility@@@Z @ 554 NONAME ; class QDataStream & operator>>(class QDataStream &, class QtMobility::QContactThumbnail &)
+	??1SmfContactFetcher@@UAE@XZ @ 555 NONAME ; SmfContactFetcher::~SmfContactFetcher(void)
+	?activities@SmfActivityEntry@@QBE?AV?$QList@VSmfActivityObject@@@@XZ @ 556 NONAME ; class QList<class SmfActivityObject> SmfActivityEntry::activities(void) const
+	?setInfo@SmfPlaylist@@QAEXABVQUrl@@@Z @ 557 NONAME ; void SmfPlaylist::setInfo(class QUrl const &)
+	??1SmfLyricsService@@UAE@XZ @ 558 NONAME ; SmfLyricsService::~SmfLyricsService(void)
+	?userInfoAvailable@SmfMusicService@@IAEXPAVSmfMusicProfile@@W4SmfError@@@Z @ 559 NONAME ; void SmfMusicService::userInfoAvailable(class SmfMusicProfile *, enum SmfError)
+	??_ESmfActivityEntry@@QAE@I@Z @ 560 NONAME ; SmfActivityEntry::~SmfActivityEntry(unsigned int)
+	??0SmfMusicFingerPrint@@QAE@ABV0@@Z @ 561 NONAME ; SmfMusicFingerPrint::SmfMusicFingerPrint(class SmfMusicFingerPrint const &)
+	?id@SmfPictureAlbum@@QBE?AVQString@@XZ @ 562 NONAME ; class QString SmfPictureAlbum::id(void) const
+	?time@SmfActivityObject@@QBE?AVQDateTime@@XZ @ 563 NONAME ; class QDateTime SmfActivityObject::time(void) const
+	??1SmfArtists@@QAE@XZ @ 564 NONAME ; SmfArtists::~SmfArtists(void)
+	??6@YAAAVQDataStream@@AAV0@ABVSmfUrl@@@Z @ 565 NONAME ; class QDataStream & operator<<(class QDataStream &, class SmfUrl const &)
+	??4SmfLocation@@QAEAAV0@ABV0@@Z @ 566 NONAME ; class SmfLocation & SmfLocation::operator=(class SmfLocation const &)
+	?setOwner@SmfPost@@QAEXABVSmfContact@@@Z @ 567 NONAME ; void SmfPost::setOwner(class SmfContact const &)
+	?comments@SmfPictureAlbum@@QBE?AV?$QList@VSmfComment@@@@XZ @ 568 NONAME ; class QList<class SmfComment> SmfPictureAlbum::comments(void) const
+	??6@YAAAVQDataStream@@AAV0@ABVSmfLyrics@@@Z @ 569 NONAME ; class QDataStream & operator<<(class QDataStream &, class SmfLyrics const &)
+	?hreflang@SmfUrl@@QBE?AVQString@@XZ @ 570 NONAME ; class QString SmfUrl::hreflang(void) const
+	??5@YAAAVQDataStream@@AAV0@AAVSmfMusicProfile@@@Z @ 571 NONAME ; class QDataStream & operator>>(class QDataStream &, class SmfMusicProfile &)
+	??1SmfPicture@@QAE@XZ @ 572 NONAME ; SmfPicture::~SmfPicture(void)
+	?friendsActivities@SmfActivityFetcher@@QAEXABVSmfContact@@HH@Z @ 573 NONAME ; void SmfActivityFetcher::friendsActivities(class SmfContact const &, int, int)
+	??4SmfPictureAlbum@@QAEAAV0@ABV0@@Z @ 574 NONAME ; class SmfPictureAlbum & SmfPictureAlbum::operator=(class SmfPictureAlbum const &)
+	??1SmfUrl@@QAE@XZ @ 575 NONAME ; SmfUrl::~SmfUrl(void)
+	?setId@SmfPlaylist@@QAEXABVQString@@@Z @ 576 NONAME ; void SmfPlaylist::setId(class QString const &)
+	??5@YAAAVQDataStream@@AAV0@AAVSmfPictureAlbum@@@Z @ 577 NONAME ; class QDataStream & operator>>(class QDataStream &, class SmfPictureAlbum &)
+	??0SmfAlbum@@QAE@ABV0@@Z @ 578 NONAME ; SmfAlbum::SmfAlbum(class SmfAlbum const &)
+	?setAttribution@SmfPlaylist@@QAEXABV?$QList@VQUrl@@@@@Z @ 579 NONAME ; void SmfPlaylist::setAttribution(class QList<class QUrl> const &)
+	??6@YAAAVQDataStream@@AAV0@ABVSmfSubtitle@@@Z @ 580 NONAME ; class QDataStream & operator<<(class QDataStream &, class SmfSubtitle const &)
+	??1SmfProvider@@QAE@XZ @ 581 NONAME ; SmfProvider::~SmfProvider(void)
+	??5@YAAAVQDataStream@@AAV0@AAVQContactPhoneNumber@QtMobility@@@Z @ 582 NONAME ; class QDataStream & operator>>(class QDataStream &, class QtMobility::QContactPhoneNumber &)
+	?metaObject@SmfGallery@@UBEPBUQMetaObject@@XZ @ 583 NONAME ; struct QMetaObject const * SmfGallery::metaObject(void) const
+	??_ESmfPostProvider@@UAE@I@Z @ 584 NONAME ; SmfPostProvider::~SmfPostProvider(unsigned int)
+	??_ESmfActivityObject@@QAE@I@Z @ 585 NONAME ; SmfActivityObject::~SmfActivityObject(unsigned int)
+	??_ESmfPlaylist@@QAE@I@Z @ 586 NONAME ; SmfPlaylist::~SmfPlaylist(unsigned int)
+	?getProvider@SmfPostProvider@@QBEPAVSmfProvider@@XZ @ 587 NONAME ; class SmfProvider * SmfPostProvider::getProvider(void) const
+	??5@YAAAVQDataStream@@AAV0@AAVSmfMusicRating@@@Z @ 588 NONAME ; class QDataStream & operator>>(class QDataStream &, class SmfMusicRating &)
+	?getProvider@SmfActivityFetcher@@QAEPAVSmfProvider@@XZ @ 589 NONAME ; class SmfProvider * SmfActivityFetcher::getProvider(void)
+	??6@YAAAVQDataStream@@AAV0@ABVSmfRelationItem@@@Z @ 590 NONAME ; class QDataStream & operator<<(class QDataStream &, class SmfRelationItem const &)
+	?groupListAvailable@SmfContactFetcher@@IAEXPAV?$QList@VSmfGroup@@@@W4SmfError@@USmfResultPage@@@Z @ 591 NONAME ; void SmfContactFetcher::groupListAvailable(class QList<class SmfGroup> *, enum SmfError, struct SmfResultPage)
+	?musicFingerPrint@SmfMusicFingerPrint@@QBE?AVQByteArray@@XZ @ 592 NONAME ; class QByteArray SmfMusicFingerPrint::musicFingerPrint(void) const
+	?qt_metacall@SmfPlaylistService@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 593 NONAME ; int SmfPlaylistService::qt_metacall(enum QMetaObject::Call, int, void * *)
+	?events@SmfMusicEvents@@QAEXVSmfLocation@@HH@Z @ 594 NONAME ; void SmfMusicEvents::events(class SmfLocation, int, int)
+	??0SmfComment@@QAE@ABV0@@Z @ 595 NONAME ; SmfComment::SmfComment(class SmfComment const &)
+	??0SmfProvider@@QAE@ABV0@@Z @ 596 NONAME ; SmfProvider::SmfProvider(class SmfProvider const &)
+	?setActionName@SmfActivityEntry@@QAEXW4SmfActivityVerb@@@Z @ 597 NONAME ; void SmfActivityEntry::setActionName(enum SmfActivityVerb)
+	?trUtf8@SmfMusicService@@SA?AVQString@@PBD0H@Z @ 598 NONAME ; class QString SmfMusicService::trUtf8(char const *, char const *, int)
+	??0SmfPicture@@QAE@ABV0@@Z @ 599 NONAME ; SmfPicture::SmfPicture(class SmfPicture const &)
+	?city@SmfLocation@@QBE?AVQString@@XZ @ 600 NONAME ; class QString SmfLocation::city(void) const
+	??4SmfArtists@@QAEAAV0@ABV0@@Z @ 601 NONAME ; class SmfArtists & SmfArtists::operator=(class SmfArtists const &)
+	??1SmfMusicFingerPrint@@QAE@XZ @ 602 NONAME ; SmfMusicFingerPrint::~SmfMusicFingerPrint(void)
+	??0SmfMusicFingerPrint@@QAE@XZ @ 603 NONAME ; SmfMusicFingerPrint::SmfMusicFingerPrint(void)
+	?qt_metacall@SmfPostProvider@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 604 NONAME ; int SmfPostProvider::qt_metacall(enum QMetaObject::Call, int, void * *)
+	??0SmfMusicSearch@@QAE@PAVSmfProvider@@@Z @ 605 NONAME ; SmfMusicSearch::SmfMusicSearch(class SmfProvider *)
+	?setTitle@SmfUrl@@QAEXABVQString@@@Z @ 606 NONAME ; void SmfUrl::setTitle(class QString const &)
+	?getStaticMetaObject@SmfMusicService@@SAABUQMetaObject@@XZ @ 607 NONAME ; struct QMetaObject const & SmfMusicService::getStaticMetaObject(void)
+	?value@SmfContact@@QBE?AVQVariant@@ABVQString@@@Z @ 608 NONAME ; class QVariant SmfContact::value(class QString const &) const
+	?setArtists@SmfAlbum@@QAEXABVSmfArtists@@@Z @ 609 NONAME ; void SmfAlbum::setArtists(class SmfArtists const &)
+	?picturesAvailable@SmfGallery@@IAEXPAV?$QList@VSmfPicture@@@@W4SmfError@@USmfResultPage@@@Z @ 610 NONAME ; void SmfGallery::picturesAvailable(class QList<class SmfPicture> *, enum SmfError, struct SmfResultPage)
+	?setTicketUrl@SmfEvent@@QAEXABVQUrl@@@Z @ 611 NONAME ; void SmfEvent::setTicketUrl(class QUrl const &)
+	?maxRating@SmfMusicRating@@QBEHXZ @ 612 NONAME ; int SmfMusicRating::maxRating(void) const
+	?setPostedDate@SmfPictureAlbum@@QAEXABVQDateTime@@@Z @ 613 NONAME ; void SmfPictureAlbum::setPostedDate(class QDateTime const &)
+	?version@SmfPlaylist@@QBE?AVQString@@XZ @ 614 NONAME ; class QString SmfPlaylist::version(void) const
+	??1SmfLocation@@QAE@XZ @ 615 NONAME ; SmfLocation::~SmfLocation(void)
+	??6@YAAAVQDataStream@@AAV0@ABVQContactId@QtMobility@@@Z @ 616 NONAME ; class QDataStream & operator<<(class QDataStream &, class QtMobility::QContactId const &)
+	??0SmfLyrics@@QAE@ABV0@@Z @ 617 NONAME ; SmfLyrics::SmfLyrics(class SmfLyrics const &)
+	??4SmfSubtitle@@QAEAAV0@ABV0@@Z @ 618 NONAME ; class SmfSubtitle & SmfSubtitle::operator=(class SmfSubtitle const &)
+	?caption@SmfActivityObject@@QBE?AVQString@@XZ @ 619 NONAME ; class QString SmfActivityObject::caption(void) const
+	??0SmfActivityObject@@QAE@ABV0@@Z @ 620 NONAME ; SmfActivityObject::SmfActivityObject(class SmfActivityObject const &)
+	?getProvider@SmfPlaylistService@@QAEPAVSmfProvider@@XZ @ 621 NONAME ; class SmfProvider * SmfPlaylistService::getProvider(void)
+	??4SmfEvent@@QAEAAV0@ABV0@@Z @ 622 NONAME ; class SmfEvent & SmfEvent::operator=(class SmfEvent const &)
+	?getStaticMetaObject@SmfGallery@@SAABUQMetaObject@@XZ @ 623 NONAME ; struct QMetaObject const & SmfGallery::getStaticMetaObject(void)
+	?setLink@SmfActivityObject@@QAEXABVQString@@@Z @ 624 NONAME ; void SmfActivityObject::setLink(class QString const &)
+	?setHhreflang@SmfUrl@@QAEXABVQString@@@Z @ 625 NONAME ; void SmfUrl::setHhreflang(class QString const &)
+	?userinfo@SmfMusicService@@QAEXXZ @ 626 NONAME ; void SmfMusicService::userinfo(void)
+	?venue@SmfEvent@@QBE?AVSmfLocation@@XZ @ 627 NONAME ; class SmfLocation SmfEvent::venue(void) const
+	??0SmfSubtitle@@QAE@ABV0@@Z @ 628 NONAME ; SmfSubtitle::SmfSubtitle(class SmfSubtitle const &)
+	?setApplicationUrl@SmfProvider@@QAEXAAVQUrl@@@Z @ 629 NONAME ; void SmfProvider::setApplicationUrl(class QUrl &)
+	?setServiceIcon@SmfProvider@@QAEXAAVQImage@@@Z @ 630 NONAME ; void SmfProvider::setServiceIcon(class QImage &)
+	?info@SmfPlaylist@@QBE?AVQUrl@@XZ @ 631 NONAME ; class QUrl SmfPlaylist::info(void) const
+	?tr@SmfContactFetcher@@SA?AVQString@@PBD0H@Z @ 632 NONAME ; class QString SmfContactFetcher::tr(char const *, char const *, int)
+	?setLyrics@SmfLyrics@@QAEXABVQByteArray@@@Z @ 633 NONAME ; void SmfLyrics::setLyrics(class QByteArray const &)
+	?setMetadata@SmfPlaylist@@QAEXABV?$QMap@VQString@@VQVariant@@@@@Z @ 634 NONAME ; void SmfPlaylist::setMetadata(class QMap<class QString, class QVariant> const &)
+	?remove@SmfRelationMgr@@QAE?AW4SmfError@@AAVQString@@PBVSmfContact@@@Z @ 635 NONAME ; enum SmfError SmfRelationMgr::remove(class QString &, class SmfContact const *)
+	?description@SmfGallery@@QAE?AVQString@@AAVSmfPicture@@@Z @ 636 NONAME ; class QString SmfGallery::description(class SmfPicture &)
+	??6@YAAAVQDataStream@@AAV0@ABVQContactGuid@QtMobility@@@Z @ 637 NONAME ; class QDataStream & operator<<(class QDataStream &, class QtMobility::QContactGuid const &)
+	?picture@SmfPicture@@QBE?AVQImage@@XZ @ 638 NONAME ; class QImage SmfPicture::picture(void) const
+	?tr@SmfContactFetcher@@SA?AVQString@@PBD0@Z @ 639 NONAME ; class QString SmfContactFetcher::tr(char const *, char const *)
+	?id@SmfActivityEntry@@QBE?AVQString@@XZ @ 640 NONAME ; class QString SmfActivityEntry::id(void) const
+	?setHref@SmfUrl@@QAEXABVQUrl@@@Z @ 641 NONAME ; void SmfUrl::setHref(class QUrl const &)
+	?setRating@SmfTrackInfo@@QAEXABVSmfMusicRating@@@Z @ 642 NONAME ; void SmfTrackInfo::setRating(class SmfMusicRating const &)
+	?setContent@SmfActivityObject@@QAEXABVQString@@@Z @ 643 NONAME ; void SmfActivityObject::setContent(class QString const &)
+	?street@SmfLocation@@QBE?AVQString@@XZ @ 644 NONAME ; class QString SmfLocation::street(void) const
+	?filtered@SmfActivityFetcher@@QAEXV?$QList@W4SmfActivityObjectType@@@@HH@Z @ 645 NONAME ; void SmfActivityFetcher::filtered(class QList<enum SmfActivityObjectType>, int, int)
+	?setId@SmfTrackInfo@@QAEXABVQString@@@Z @ 646 NONAME ; void SmfTrackInfo::setId(class QString const &)
+	?staticMetaObject@SmfContactFetcher@@2UQMetaObject@@B @ 647 NONAME ; struct QMetaObject const SmfContactFetcher::staticMetaObject
+	?title@SmfActivityEntry@@QBE?AVSmfPost@@XZ @ 648 NONAME ; class SmfPost SmfActivityEntry::title(void) const
+	??0SmfLyrics@@QAE@XZ @ 649 NONAME ; SmfLyrics::SmfLyrics(void)
+	??6@YAAAVQDataStream@@AAV0@ABVQContactGender@QtMobility@@@Z @ 650 NONAME ; class QDataStream & operator<<(class QDataStream &, class QtMobility::QContactGender const &)
+	?rel@SmfUrl@@QBE?AVQString@@XZ @ 651 NONAME ; class QString SmfUrl::rel(void) const
+	?title@SmfPost@@QBE?AVQString@@XZ @ 652 NONAME ; class QString SmfPost::title(void) const
+	?searchById@SmfRelationMgr@@QAE?AVSmfRelationItem@@ABVQString@@@Z @ 653 NONAME ; class SmfRelationItem SmfRelationMgr::searchById(class QString const &)
+	?setExtension@SmfPlaylist@@QAEXABV?$QMap@VQString@@VQVariant@@@@@Z @ 654 NONAME ; void SmfPlaylist::setExtension(class QMap<class QString, class QVariant> const &)
+	?trUtf8@SmfMusicSearch@@SA?AVQString@@PBD0@Z @ 655 NONAME ; class QString SmfMusicSearch::trUtf8(char const *, char const *)
+	?name@SmfLocation@@QBE?AVQString@@XZ @ 656 NONAME ; class QString SmfLocation::name(void) const
+	?text@SmfComment@@QBE?AVQString@@XZ @ 657 NONAME ; class QString SmfComment::text(void) const
+	?type@SmfUrl@@QBE?AVQString@@XZ @ 658 NONAME ; class QString SmfUrl::type(void) const
+	??5@YAAAVQDataStream@@AAV0@AAVQContactGeoLocation@QtMobility@@@Z @ 659 NONAME ; class QDataStream & operator>>(class QDataStream &, class QtMobility::QContactGeoLocation &)
+	?qt_metacast@SmfRelationMgr@@UAEPAXPBD@Z @ 660 NONAME ; void * SmfRelationMgr::qt_metacast(char const *)
+	?trUtf8@SmfMusicEvents@@SA?AVQString@@PBD0H@Z @ 661 NONAME ; class QString SmfMusicEvents::trUtf8(char const *, char const *, int)
+	??1SmfLyrics@@QAE@XZ @ 662 NONAME ; SmfLyrics::~SmfLyrics(void)
+	??0SmfAlbum@@QAE@XZ @ 663 NONAME ; SmfAlbum::SmfAlbum(void)
+	??_ESmfPlaylistService@@UAE@I@Z @ 664 NONAME ; SmfPlaylistService::~SmfPlaylistService(unsigned int)
+	?metaObject@SmfPostProvider@@UBEPBUQMetaObject@@XZ @ 665 NONAME ; struct QMetaObject const * SmfPostProvider::metaObject(void) const
+	?setVenue@SmfEvent@@QAEXABVSmfLocation@@@Z @ 666 NONAME ; void SmfEvent::setVenue(class SmfLocation const &)
+	?search@SmfContactFetcher@@QAEXPAVSmfContact@@HH@Z @ 667 NONAME ; void SmfContactFetcher::search(class SmfContact *, int, int)
+	??_ESmfMusicService@@UAE@I@Z @ 668 NONAME ; SmfMusicService::~SmfMusicService(unsigned int)
+	?addKeywords@SmfPictureAlbum@@QAEXABVQStringList@@@Z @ 669 NONAME ; void SmfPictureAlbum::addKeywords(class QStringList const &)
+	?setTitle@SmfPicture@@QAEXABVQString@@@Z @ 670 NONAME ; void SmfPicture::setTitle(class QString const &)
+	??5@YAAAVQDataStream@@AAV0@AAVSmfLyrics@@@Z @ 671 NONAME ; class QDataStream & operator>>(class QDataStream &, class SmfLyrics &)
+	?setUrl@SmfPost@@QAEXAAVQUrl@@@Z @ 672 NONAME ; void SmfPost::setUrl(class QUrl &)
+	??6@YAAAVQDataStream@@AAV0@ABVSmfAlbum@@@Z @ 673 NONAME ; class QDataStream & operator<<(class QDataStream &, class SmfAlbum const &)
+	?setDuration@SmfSubtitle@@QAEXABN@Z @ 674 NONAME ; void SmfSubtitle::setDuration(double const &)
+	?visibility@SmfPictureAlbum@@QBE?AW4SmfPictureVisibility@@XZ @ 675 NONAME ; enum SmfPictureVisibility SmfPictureAlbum::visibility(void) const
+	??0SmfMusicProfile@@QAE@ABV0@@Z @ 676 NONAME ; SmfMusicProfile::SmfMusicProfile(class SmfMusicProfile const &)
+	?setReleaseYear@SmfSubtitle@@QAEXABVQDateTime@@@Z @ 677 NONAME ; void SmfSubtitle::setReleaseYear(class QDateTime const &)
+	?targetObj@SmfActivityEntry@@QBE?AVSmfActivityObject@@XZ @ 678 NONAME ; class SmfActivityObject SmfActivityEntry::targetObj(void) const
+
--- a/smf/smfservermodule/smfclient/client/client.pri	Mon Jun 07 11:43:45 2010 +0100
+++ b/smf/smfservermodule/smfclient/client/client.pri	Wed Jun 23 19:51:49 2010 +0530
@@ -4,22 +4,34 @@
 PUBLIC_HEADERS += client/smfclient.h \
     client/smfcontactfetcher.h \
     client/smfpostprovider.h \
-    client/smfgallery.h
-
+    client/smfgallery.h \
+    client/smfrelationmgr.h \
+    client/smfmusic.h \
+    client/smfactivityfetcher.h
+    
 PRIVATE_HEADERS += client/smfclient_p.h \
     client/smfcontactfetcher_p.h \
     client/smfpostprovider_p.h \
-    client/smfgallery_p.h
-
-SOURCES += client/smfgallery.cpp \ 
-	client/smfgallery_p.cpp \
+    client/smfgallery_p.h \
+    client/smfrelationmgr_p.h \
+    client/smfmusic_p.h \
+    client/smfactivityfetcher_p.h
+    
+SOURCES += client/smfrelationmgr_p.cpp \
+    client/smfrelationmgr.cpp \
+    client/smfgallery.cpp \
+    client/smfgallery_p.cpp \
     client/smfpostprovider.cpp \
     client/smfpostprovider_p.cpp \
+    client/smfmusic.cpp \
     client/smfclient.cpp \
     client/smfclient_p.cpp \
     client/smfcontactfetcher.cpp \
-    client/smfcontactfetcher_p.cpp
-
+    client/smfcontactfetcher_p.cpp \
+    client/smfmusic_p.cpp \
+    client/smfactivityfetcher.cpp \
+    client/smfactivityfetcher_p.cpp 
+    
 symbian: { 
     BLD_INF_RULES.prj_exports += client/smfclient.h
     BLD_INF_RULES.prj_exports += client/smfclient_p.h
@@ -31,13 +43,19 @@
     BLD_INF_RULES.prj_exports += client/smfpostprovider_p.h
     BLD_INF_RULES.prj_exports += client/smfgallery.h
     BLD_INF_RULES.prj_exports += client/smfgallery_p.h
-
+    BLD_INF_RULES.prj_exports += client/smfrelationmgr.h
+    BLD_INF_RULES.prj_exports += client/smfrelationmgr_p.h
+    BLD_INF_RULES.prj_exports += client/smfmusic.h
+    BLD_INF_RULES.prj_exports += client/smfmusic_p.h
+    BLD_INF_RULES.prj_exports += client/smfactivityfetcher.h
+    BLD_INF_RULES.prj_exports += client/smfactivityfetcher_p.h
+	
     PUBLIC_HEADERS += client/smfclientsymbian.h \
         client/smfclientsymbiansession.h
 
     SOURCES += client/smfclientsymbian.cpp
-
-} else {
+}
+else { 
     PRIVATE_HEADERS += client/smfclientqt.h
     SOURCES += client/smfclientqt.cpp
-}
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/smf/smfservermodule/smfclient/client/smfactivityfetcher.cpp	Wed Jun 23 19:51:49 2010 +0530
@@ -0,0 +1,49 @@
+/**
+ * Copyright (c) 2010 Sasken Communication Technologies Ltd.
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of the "Eclipse Public License v1.0"
+ * which accompanies  this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html"
+ *
+ * Initial Contributors:
+ * Chandradeep Gandhi, Sasken Communication Technologies Ltd - Initial contribution
+ *
+ * Description:
+ * Represents activity in terms similar to standard activity stream http://activitystrea.ms/
+ */
+
+#include "smfactivityfetcher.h"
+#include "smfactivityfetcher_p.h"
+
+SmfActivityFetcher::SmfActivityFetcher(SmfProvider *baseprovider)
+:m_baseProvider(baseprovider)
+{
+	  //creating private impl wrapper
+	  m_private = new SmfActivityFetcherPrivate(this);
+}
+
+SmfActivityFetcher::~SmfActivityFetcher()
+{
+	
+}
+
+void SmfActivityFetcher::selfActivities(int pageNum, int perPage)
+{
+	m_private->selfActivities(pageNum,perPage);
+}
+
+SmfProvider *SmfActivityFetcher::getProvider()
+{
+	return m_baseProvider;
+}
+
+void SmfActivityFetcher::filtered(QList<SmfActivityObjectType> filters, int pageNum, int perPage)
+{
+	m_private->filtered(filters,pageNum,perPage);
+}
+
+void SmfActivityFetcher::friendsActivities(const SmfContact & aFriend, int pageNum, int perPage)
+{
+	m_private->friendsActivities(aFriend,pageNum,perPage);
+}
--- a/smf/smfservermodule/smfclient/client/smfactivityfetcher.h	Mon Jun 07 11:43:45 2010 +0100
+++ b/smf/smfservermodule/smfclient/client/smfactivityfetcher.h	Wed Jun 23 19:51:49 2010 +0530
@@ -27,7 +27,7 @@
 #include "smfactions.h"
 
 typedef QList<SmfActivityEntry> SmfActivityEntryList;
-
+class SmfActivityFetcherPrivate;
 /**
  * @ingroup smf_client_group
  * Basic activity service ("org.symbian.smf.client.activity.fetcher")
@@ -72,10 +72,13 @@
 	/**
 	 * Signals availability of the result of the previous query
 	 */
-	void resultsAvailable(SmfActivityEntryList* entries, QString error, SmfResultPage resultPage);
-
+	void resultsAvailable(SmfActivityEntryList* entries, SmfError error, SmfResultPage resultPage);
+private:
+	SmfActivityFetcherPrivate* m_private;
+	SmfProvider* m_baseProvider;
+	friend class SmfActivityFetcherPrivate;
 	};
 
-SMF_SERVICE_NAME(SmfGallery, "org.symbian.smf.client.activity.fetcher\0.2")
+SMF_SERVICE_NAME(SmfActivityFetcher, "org.symbian.smf.client.activity.fetcher\0.2")
 
 #endif /* SMFACTIVITYFETCHER_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/smf/smfservermodule/smfclient/client/smfactivityfetcher_p.cpp	Wed Jun 23 19:51:49 2010 +0530
@@ -0,0 +1,146 @@
+/**
+ * Copyright (c) 2010 Sasken Communication Technologies Ltd.
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of the "Eclipse Public License v1.0"
+ * which accompanies  this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html"
+ *
+ * Initial Contributors:
+ * Chandradeep Gandhi, Sasken Communication Technologies Ltd - Initial contribution
+ *
+ * Description:
+ * 
+ */
+#include <QDebug>
+#include "smfactivityfetcher_p.h"
+#ifdef Q_OS_SYMBIAN
+#include "smfclientsymbian.h"
+#else
+#include "SmfClientQt.h"
+#endif
+SmfActivityFetcherPrivate::SmfActivityFetcherPrivate(SmfActivityFetcher *activityFetcher)
+:m_activityFetcher(activityFetcher)
+	{
+	//private impl for symbian
+	#ifdef Q_OS_SYMBIAN
+	m_SmfClientPrivate = CSmfClientSymbian::NewL(this);
+	#else
+	//TODO:- Qt private impl
+	#endif
+	}
+
+SmfActivityFetcherPrivate::~SmfActivityFetcherPrivate()
+	{
+	if(m_SmfClientPrivate)
+		{
+		delete m_SmfClientPrivate;
+		m_SmfClientPrivate = NULL;
+		}
+	}
+
+void SmfActivityFetcherPrivate::friendsActivities(const SmfContact & aFriend, int pageNum, int perPage)
+	{
+	  m_xtraInfoSerialized.clear();
+	  m_baseProvider = m_activityFetcher->getProvider();
+	  //serialize start
+	  QDataStream write(&m_serializedDataToServer,QIODevice::WriteOnly);
+	  //SmfProvider
+	  write<<*(m_baseProvider);
+	  m_pageInfoFlag = 0;
+	  write<<m_pageInfoFlag;
+	  write<<pageNum;
+	  write<<perPage;
+	  
+	  QDataStream xtraInfoWrite(&m_xtraInfoSerialized,QIODevice::WriteOnly);
+
+	  xtraInfoWrite<<aFriend;
+	  m_xtraInfoFlag = m_xtraInfoSerialized.size();
+	  write<<m_xtraInfoFlag;
+	  //serialize end
+	  QString intfName(activityFetcherInterface);
+	  int max = MaxSmfActivityEntrySize*perPage;
+	  //call private impl's send method
+	  m_SmfClientPrivate->sendRequest(m_serializedDataToServer,intfName,SmfActivityFriendsActivities,max,m_xtraInfoSerialized);
+	}
+
+void SmfActivityFetcherPrivate::filtered(QList<SmfActivityObjectType> filters, int pageNum, int perPage)
+	{
+	  m_xtraInfoSerialized.clear();
+	  m_baseProvider = m_activityFetcher->getProvider();
+	  //serialize start
+	  QDataStream write(&m_serializedDataToServer,QIODevice::WriteOnly);
+	  //SmfProvider
+	  write<<*(m_baseProvider);
+	  m_pageInfoFlag = 0;
+	  write<<m_pageInfoFlag;
+	  write<<pageNum;
+	  write<<perPage;
+	  
+	  QDataStream xtraInfoWrite(&m_xtraInfoSerialized,QIODevice::WriteOnly);
+
+	  xtraInfoWrite<<filters;
+	  m_xtraInfoFlag = m_xtraInfoSerialized.size();
+	  write<<m_xtraInfoFlag;
+	  //serialize end
+	  QString intfName(activityFetcherInterface);
+	  int max = MaxSmfActivityEntrySize*perPage;
+	  //call private impl's send method
+	  m_SmfClientPrivate->sendRequest(m_serializedDataToServer,intfName,SmfActivityFiltered,max,m_xtraInfoSerialized);
+	}
+
+void SmfActivityFetcherPrivate::selfActivities(int pageNum, int perPage)
+	{
+	  m_xtraInfoSerialized.clear();
+	  m_baseProvider = m_activityFetcher->getProvider();
+	  //serialize start
+	  QDataStream write(&m_serializedDataToServer,QIODevice::WriteOnly);
+	  //SmfProvider
+	  write<<*(m_baseProvider);
+	  m_pageInfoFlag = 0;
+	  write<<m_pageInfoFlag;
+	  write<<pageNum;
+	  write<<perPage;
+
+	  m_xtraInfoFlag = 0;
+	  write<<m_xtraInfoFlag;
+	  //serialize end
+	  QString intfName(activityFetcherInterface);
+	  int max = MaxSmfActivityEntrySize*perPage;
+	  //call private impl's send method
+	  m_SmfClientPrivate->sendRequest(m_serializedDataToServer,intfName,SmfActivitySelfActivity,max);
+	}
+void SmfActivityFetcherPrivate::resultsAvailable(QByteArray result,SmfRequestTypeID opcode, SmfError error)
+	{
+	qDebug()<<"SmfPostProviderPrivate::resultsAvailable";
+	qDebug()<<"opcode=";
+	qDebug()<<QString::number(opcode);
+	QDataStream reader(&result,QIODevice::ReadOnly);
+	//Now de-serialize it based on opcode
+	switch(opcode)
+		{
+		case SmfActivityFriendsActivities:
+		case SmfActivityFiltered:
+		case SmfActivitySelfActivity:
+			{
+			if(m_entries)
+				{
+				delete m_entries;
+				m_entries = NULL;
+				}
+
+			m_entries = new SmfActivityEntryList;
+			reader>>*(m_entries);
+			//not incorporating paging now
+			SmfResultPage page;
+
+			emit m_activityFetcher->resultsAvailable(m_entries,error,page);
+			}
+			break;
+		default:
+			Q_ASSERT_X(1,"SmfActivityFetcherPrivate::resultsAvailable","default case");
+		}
+	}
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/smf/smfservermodule/smfclient/client/smfactivityfetcher_p.h	Wed Jun 23 19:51:49 2010 +0530
@@ -0,0 +1,91 @@
+/**
+ * Copyright (c) 2010 Sasken Communication Technologies Ltd.
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of the "Eclipse Public License v1.0"
+ * which accompanies  this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html"
+ *
+ * Initial Contributors:
+ * Chandradeep Gandhi, Sasken Communication Technologies Ltd - Initial contribution
+ *
+ * Description:
+ * 
+ */
+
+#ifndef SMFACTIVITYFETCHER_P_H_
+#define SMFACTIVITYFETCHER_P_H_
+
+#include <QObject>
+#include <QList>
+
+#include "smfactivityfetcher.h"
+#include "smfglobal.h"
+#include "smfprovider.h"
+#include "smfcontact.h"
+#include "smfevent.h"
+#include "smfactions.h"
+#include "smfobserver.h"
+
+#ifdef Q_OS_SYMBIAN
+class CSmfClientSymbian;	
+#else
+class SmfClientQt;
+#endif
+
+class SmfActivityFetcherPrivate : public smfObserver
+	{
+	Q_OBJECT
+
+public:
+
+	/**
+	 * Constructs SmfActivityFetcherPrivate.
+	 * 
+	 */
+	SmfActivityFetcherPrivate(SmfActivityFetcher* activityFetcher);
+
+	~SmfActivityFetcherPrivate();
+	/**
+	 * Emits signal resultsAvailable() when list of activities for the user is available 
+	 */
+	void selfActivities(int pageNum,int perPage);
+
+	/**
+	 * Emits signal resultsAvailable() when list of activities for other contact  is available 
+	 */
+	void friendsActivities(const SmfContact& aFriend,int pageNum,int perPage);
+	
+	/**
+	 * returns only those activities (self) which are from @arg filters
+	 */
+	void filtered(QList<SmfActivityObjectType> filters,int pageNum,int perPage);
+	/**
+	 * From smfObserver.
+	 * To notify availibility of asynchronous requests.
+	 * @param result Requested result, before using must check error param.
+	 * @param opcode Requested opcode, for which the result has arrived.
+	 * 
+	 */
+	void resultsAvailable(QByteArray result,SmfRequestTypeID opcode, SmfError error);
+private:
+	  SmfActivityFetcher* m_activityFetcher;
+	  SmfActivityEntryList* m_entries;
+#ifdef Q_OS_SYMBIAN
+	  CSmfClientSymbian* m_SmfClientPrivate;
+	  friend class CSmfClientSymbian;
+#else
+	  SmfClientQt* m_SmfClientPrivate;
+	  friend class SmfClientQt;
+#endif
+	  int m_xtraInfoFlag;
+	  int m_pageInfoFlag;
+	  SmfProvider* m_baseProvider;
+	  //serialized byte array of provider+other info to be sent to the server
+	  //The order:- SmfProvider then params in order of their appearance in fn
+	  QByteArray m_serializedDataToServer;
+	  //serialized xtra info, order of serialization follows order of param
+	  QByteArray m_xtraInfoSerialized;
+	};
+
+#endif /* SMFACTIVITYFETCHER_P_H_ */
--- a/smf/smfservermodule/smfclient/client/smfclient.h	Mon Jun 07 11:43:45 2010 +0100
+++ b/smf/smfservermodule/smfclient/client/smfclient.h	Wed Jun 23 19:51:49 2010 +0530
@@ -73,7 +73,6 @@
    */
   QList<SmfProvider>* m_providerList;
   
-
 };
 
 
--- a/smf/smfservermodule/smfclient/client/smfclient_p.cpp	Mon Jun 07 11:43:45 2010 +0100
+++ b/smf/smfservermodule/smfclient/client/smfclient_p.cpp	Wed Jun 23 19:51:49 2010 +0530
@@ -36,7 +36,8 @@
 	m_providerSerialized.clear();
 	m_client->writeLog("Before m_SmfClientPrivate->sendRequest");
 	//Getting the serialized list of SmfProvider synchronously
-	m_providerSerialized = m_SmfClientPrivate->sendRequest(intfName,SmfGetService);;
+	//TODO:- Max size for SmfProviderList 1000
+	m_providerSerialized = m_SmfClientPrivate->sendRequest(intfName,SmfGetService,1000);
 	if(m_baseProvider)
 		{
 		delete m_baseProvider;
--- a/smf/smfservermodule/smfclient/client/smfclient_p.h	Mon Jun 07 11:43:45 2010 +0100
+++ b/smf/smfservermodule/smfclient/client/smfclient_p.h	Wed Jun 23 19:51:49 2010 +0530
@@ -29,7 +29,6 @@
 #else
 #include "smfclientqt.h"
 #endif
-
 /**
  * Private Qt wrapper
  * Provided to accomodate diff facilities in diff platforms.
@@ -46,13 +45,13 @@
 
   /**
    * Constructs SmfClientPrivate
-   * @param client SmfClient instance, so that it can directly emit SmfClient's signal
+   * @param client SmfClient instance, so that it can directly emit SmfClient's signal
    */
   SmfClientPrivate(SmfClient* client=0);
   ~SmfClientPrivate(){};
 public:
   /**
-   * Corresponds to SmfClient::GetServices(const QString )
+   * Corresponds to SmfClient::GetServices(const QString )
    */
   QList<SmfProvider>* GetServices(const QString serviceName);
    /**
@@ -61,7 +60,7 @@
     * other components of Smf (specially from plugin manager).
     * @param result Parsed and serialized result.
     * @param opcode Request code.
-    * @param error Error
+    * @param error Error
     */
    void resultsAvailable(QByteArray result,SmfRequestTypeID opcode,SmfError error);
 private:
--- a/smf/smfservermodule/smfclient/client/smfclientsymbian.cpp	Mon Jun 07 11:43:45 2010 +0100
+++ b/smf/smfservermodule/smfclient/client/smfclientsymbian.cpp	Wed Jun 23 19:51:49 2010 +0530
@@ -27,7 +27,7 @@
 #include <QFile>
 //testing end
 // For starting the server process
-static TInt StartServerL();
+static TInt StartServer();
 static TInt CreateServerProcessL();
 
 CSmfClientSymbian::CSmfClientSymbian(smfObserver* aObserver)
@@ -102,59 +102,66 @@
 
         default:
         	{
-        	writeLog("RunL:-SmfContactRetrievePostsComplete");
+        	writeLog("RunL:-default");
         	//This contains error followed by actual data
         	QByteArray receivedData(reinterpret_cast<const char*>(iSession.iDataPtr.Ptr()),iSession.iDataPtr.Length());
-        	QString errStr;
+        	writeLog("receivedData size=");
+        	writeLog(QString::number(receivedData.size()));
         	SmfError errVal;
         	int errInt;
         	QByteArray data;
         	QDataStream reader(&receivedData,QIODevice::ReadOnly);
         	reader>>errInt;
+        	writeLog("errInt=");
+        	writeLog(QString::number(errInt));
         	errVal = (SmfError)errInt;
         	reader>>data;
+        	writeLog("data size=");
+        	writeLog(QString::number(data.size()));
         	SmfRequestTypeID opcode = (SmfRequestTypeID)iSession.getLastRequest();
-        	iObserver->resultsAvailable(data,opcode,errVal);
+        	if(iObserver)
+        		{
+				iObserver->resultsAvailable(data,opcode,errVal);
+        		}
         	}
         	break;
         }
 	}
 
 QByteArray CSmfClientSymbian::sendRequest(QString aInterfaceName,
-		 SmfRequestTypeID requestType)
+		 SmfRequestTypeID requestType,TInt maxSize)
 	{
 	//This will be a synchronous request
 	//note session is opened in ctor and closed in dtor
 	writeLog("CSmfClientSymbian::sendRequest=");
 	writeLog(aInterfaceName);
 	//Gets data synchronously from the server
-    TPtr8 symbianBuf(iSession.sendSyncRequest(aInterfaceName,requestType));
+    TPtr8 symbianBuf(iSession.sendSyncRequest(aInterfaceName,requestType,maxSize));
     //convert this into bytearray
     QByteArray receivedData(reinterpret_cast<const char*>(symbianBuf.Ptr()),symbianBuf.Length());
     return receivedData;
     //
 	}
-
+QByteArray CSmfClientSymbian::sendDSMSyncRequest(SmfRequestTypeID requestType,QByteArray& aSerializedData,SmfError& aErr,TInt maxSize)
+	{
+	writeLog("CSmfClientSymbian::sendDSMSyncRequest=");
+	writeLog(QString::number(requestType));
+	SmfError err;
+	//Gets data synchronously from the server
+    TPtr8 symbianBuf(iSession.sendDSMSyncRequest(requestType,aSerializedData,err,maxSize));
+    //convert this into bytearray
+    QByteArray receivedData(reinterpret_cast<const char*>(symbianBuf.Ptr()),symbianBuf.Length());
+    writeLog("receivedData size=");
+    writeLog(QString::number(receivedData.size()));
+    return receivedData;
+	}
 TInt CSmfClientSymbian::sendRequest(QByteArray& aSerializedData,
 		 QString aInterfaceName,
-		 SmfRequestTypeID requestType)
+		 SmfRequestTypeID requestType,TInt aMaxAllocation,QByteArray xtraInfo)
 	{
-	//TODO:-testing puspose only, should be removed in the release
-	if(requestType == SmfTest)
-		{
-		QString log("Before iSesson.SendAsync");
-		writeLog(log);
-		iSession.sendAsyncRequest(aSerializedData,aInterfaceName,requestType,iStatus);
+		//RSessionBase objects sendreceive is called
+		iSession.sendAsyncRequest(aSerializedData,aInterfaceName,requestType,iStatus,aMaxAllocation,xtraInfo);
 		SetActive();
-		QString log2("After setactive");
-		writeLog(log2);
-		}
-	else
-		{
-		//RSessionBase objects sendreceive is called
-		iSession.sendAsyncRequest(aSerializedData,aInterfaceName,requestType,iStatus);
-		SetActive();
-		}
 	}
 
 TInt CSmfClientSymbian::sendDummyRequest(QByteArray* provider,QString aInterfaceName,
@@ -181,7 +188,9 @@
 	}
 
 RSmfClientSymbianSession::RSmfClientSymbianSession()
-:iDataPtr(NULL, 0, 0),iDataPtr16(NULL,0),iIntfNamePtr(NULL,0),iIntfNamePtr8(NULL,0),iPtrProvider(NULL,0)
+:iDataPtr(NULL, 0, 0),iDataPtr16(NULL,0),
+ iIntfNamePtr(NULL,0),iIntfNamePtr8(NULL,0),
+ iPtrProvider(NULL,0),iPtrToSlot0(NULL,0)
     {
     // No implementation required
     }
@@ -189,14 +198,14 @@
 TInt RSmfClientSymbianSession::connectToServer()
     {
 	writeLog("RSmfClientSymbianSession::connectToServer");
-    TInt error = ::StartServerL();
+    TInt error = ::StartServer();
     writeLog("StartServerL=");
     QString err = QString::number(error);
     writeLog(err);
     if ( KErrNone == error )
         {
 		
-        error = CreateSession( KSmfServerName,
+        error = CreateSession(KSmfServerName,
                                Version(),
                                4 );
         QString crtSessionErr = QString::number(error);
@@ -217,9 +226,55 @@
     file.close();
 #endif
 	}
+/**
+ * Sends sync request to the Smf server
+ */
+TPtr8 RSmfClientSymbianSession::sendDSMSyncRequest(SmfRequestTypeID aRequestType,
+		QByteArray& aSerializedData,SmfError aErr,
+		TInt maxSize)
+	{
+	/**
+	 * Slot 0:- Data to be passed to DSM
+	 * Slot 1:- Data returned from DSM
+	 * Slot 2:- Error
+	 */
+	writeLog("RSmfClientSymbianSession::sendDSMSyncRequest");
+	iLastRequest = aRequestType;
+	if(iSlot0Buffer)
+		{
+		delete iSlot0Buffer;
+		iSlot0Buffer = NULL;
+		}
+	iSlot0Buffer = HBufC8::NewL(aSerializedData.size());
+	iPtrToSlot0.Set(iSlot0Buffer->Des());
+	if(iBuffer)
+		{
+		delete iBuffer;
+		iBuffer = NULL;
+		}
+    iBuffer = HBufC8::NewL(maxSize);
+    iDataPtr.Set(iBuffer->Des());
+    
+    TIpcArgs args;
 
+    args.Set(0, &iPtrToSlot0);
+    args.Set(1, &iDataPtr);
+    iDSMErr.Zero();
+    args.Set(2,&iDSMErr);
+    
+    TInt sendErr = SendReceive(aRequestType,args);
+    writeLog("SendReceive=");
+    writeLog(QString::number(sendErr));
+    TInt numIndex;
+    TLex iLex(iDSMErr);
+    
+    iLex.Val(numIndex);
+    aErr = (SmfError)numIndex;
+    return iDataPtr;
+	}
 TPtr8 RSmfClientSymbianSession::sendSyncRequest(QString aInterfaceName,
-		SmfRequestTypeID aRequestType)
+		SmfRequestTypeID aRequestType,
+		TInt maxSize)
 	{
 	iLastRequest = aRequestType;
 	/**
@@ -267,8 +322,14 @@
 		delete iBuffer;
 		iBuffer = NULL;
 		}
-	iMaxMessageSize = 1000 ;
-    iBuffer = HBufC8::NewL(iMaxMessageSize);
+	writeLog("Allocated for SmfProviderList=");
+	writeLog(QString::number(maxSize));
+	if(iBuffer)
+		{
+		delete iBuffer;
+		iBuffer = NULL;
+		}
+    iBuffer = HBufC8::NewL(maxSize);
     iDataPtr.Set(iBuffer->Des());
     log.clear();
     log = QString("After iDataPtr.Set");
@@ -279,7 +340,11 @@
 
     args.Set(0, &iInterfaceSymbian8);
     args.Set(1, &iDataPtr);
-    
+    if(maxSize)
+    	{
+		iMaxSize = maxSize;
+		args.Set(2,iMaxSize);
+    	}
     TInt err(KErrBadHandle);
     writeLog("Before handle");
 	log.clear();
@@ -310,114 +375,121 @@
 void RSmfClientSymbianSession::sendAsyncRequest(QByteArray& aSerializedData,
 		QString aInterfaceName,
 		SmfRequestTypeID aRequestType,
-		TRequestStatus& aStatus)
+		TRequestStatus& aStatus,
+		TInt aMaxAllocation,
+		QByteArray aXtraInfo)
 	{
-	iLastRequest = aRequestType;
 	/**
 	 * The message body consists of.- 
-	 * 1. Provider Info(SmfProvider*)+ Other common class data
-	 *  (when applicable)-serialized
-	 * 2. Interface name as string ("org.symbian.smf.client.gallery")
-	 * 3. Data pointer to be filled by serialized data
+	 * Modified,-
+	 * slot 0 = SmfProvider +PageInfo flag+ aPageNum + aPerPage + XtraInfo flag(size of xtra data) Serialized
+	 * slot 1 = Interface name serialized
+	 * slot 2 = Data pointer to filled by server
+	 * slot 3= Xtra info when required by server else empty buffer
 	 */
-	QString log("RSmfClientSymbianSession::sendAsyncRequest-start-");
-	writeLog(log);
+	writeLog("RSmfClientSymbianSession::sendAsyncRequest-start-");
+	iLastRequest = aRequestType;
 	
-	iBaseProvider= aSerializedData;
-	iInterfaceName = aInterfaceName ;
+	
+	
 	
-    int size = aSerializedData.size();
-    log.clear();
-    log = QString("aSerializedData size=")+ QString::number(size);
-    
-    writeLog(log);
-    if(iProviderBuf)
-    	{
+	if(iProviderBuf)
+		{
 		delete iProviderBuf;
 		iProviderBuf = NULL;
-    	}
-    //TODO:- KSmfProviderMaxSize
-    iProviderBuf = HBufC8::NewL(iBaseProvider.size()*2);
-    iPtrProvider.Set(iProviderBuf->Des());
-	//convert the QByteArray into TPtr
-    iPtrProvider.Copy(reinterpret_cast<const TText8*>(iBaseProvider.constData()),iBaseProvider.length());
-    
+		}
+	iProviderBuf = HBufC8::NewL(aSerializedData.size());
+	iPtrProvider.Set(iProviderBuf->Des());
+	iPtrProvider.Copy(reinterpret_cast<const TText8*>(aSerializedData.constData()),aSerializedData.length());
+	
+	
+	
 	
-    log.clear();
-    log = QString("iPtrProvider.Copy");
-    writeLog(log);
-    
-	//Convert the interface name into TPtr////////////////////////
+	//convert the QByteArray into TPtr
+    TPtrC8 ptrSlot0(reinterpret_cast<const TText8*>(aSerializedData.constData()),aSerializedData.length());
+    writeLog("ptrSlot0 size=");
+    writeLog(QString::number(ptrSlot0.Size()));
+	//Convert the interface name into TPtr
 	iInterfaceName.clear();
-	iInterfaceName = aInterfaceName ;
+	iInterfaceName.append(aInterfaceName) ;
 	writeLog(QString("iInterfaceName=")+iInterfaceName);
+	iInterfaceNamebyte.clear();
 	//Pass serialized QString for interface name
 	QDataStream intfNameStream(&iInterfaceNamebyte,QIODevice::WriteOnly);
 	intfNameStream<<iInterfaceName;
-	log.clear();
-    log = QString("iInterfaceNamebyte size=");
-    log += QString::number(iInterfaceNamebyte.size());
-    writeLog(log);
+	writeLog("iInterfaceNamebyte size=");
+	writeLog(QString::number(iInterfaceNamebyte.size()));
 	if(iIntfNameBuffer8)
 		{
 		delete iIntfNameBuffer8;
-		iIntfNameBuffer8 =NULL;
+		iIntfNameBuffer8 = NULL;
 		}
-	iIntfNameBuffer8 = HBufC8::NewL(aInterfaceName.size()*2);
+	iIntfNameBuffer8 = HBufC8::NewL(iInterfaceNamebyte.size());
 	iIntfNamePtr8.Set(iIntfNameBuffer8->Des());
-	//Convert into symbian data type
-	iIntfNamePtr8.Copy(reinterpret_cast<TUint8*>(iInterfaceNamebyte.data()),iInterfaceNamebyte.length());
-	log.clear();
-    log = QString("iIntfNamePtr8 size=")+QString::number(iIntfNamePtr8.Size());
-    writeLog(log);
-	
-
+	iIntfNamePtr8.Copy(reinterpret_cast<const TText8*>(iInterfaceNamebyte.constData()),iInterfaceNamebyte.length());
+	writeLog("After iIntfNamePtr8.Copy");
 	if(iBuffer)
 		{
 		delete iBuffer;
 		iBuffer = NULL;
 		}
-	//TODO:-KSmfMaxDataSize
-	iMaxMessageSize = 2000 ;
-    iBuffer = HBufC8::NewL(iMaxMessageSize);
+    iBuffer = HBufC8::NewL(aMaxAllocation);
     iDataPtr.Set(iBuffer->Des());
-    log.clear();
-    log = QString("After iDataPtr.Set");
-    writeLog(log);
-	
-	
+    writeLog("After iDataPtr.Set");
     TIpcArgs args;
     
-
+    //filling the slots
     args.Set(0, &iPtrProvider);
     args.Set(1, &iIntfNamePtr8);
     args.Set(2, &iDataPtr);
-    
+    writeLog("After setting 0,1,2 slots");
+    if(aXtraInfo.size())
+    	{
+		TPtrC8 ptrToXtraInfo(reinterpret_cast<const TText8*>(aXtraInfo.constData()),aXtraInfo.length());
+		writeLog("ptrToXtraInfo size=");
+		writeLog(QString::number(ptrToXtraInfo.Size()));
+		args.Set(3, &ptrToXtraInfo);
+    	}
     TInt err(KErrBadHandle);
-    log.clear();
-    log = QString("Before Handle()");
-    writeLog("Before handle");
+    writeLog("Before Handle()");
     if (Handle()) 
     	{
         err = KErrNone;
-        log.clear();
-        log = QString("Before sendreceive");
-        writeLog(log);
-       SendReceive(aRequestType, args, aStatus);
-
+        writeLog("Before sendreceive");
+        SendReceive(aRequestType, args, aStatus);
         }
 	}
 
 // -----------------------------------------------------------------------------
-// StartServerL()
-// Starts the server if it is not already running
+// CreateServerProcessL()
+// Creates a server process
 // -----------------------------------------------------------------------------
 //
-static TInt StartServerL()
+static TInt CreateServerProcessL()
+    {
+    TInt result;
+    TUid KSmfServerUID3 = { 0xE5027327 };
+    const TUidType serverUid( KNullUid, KNullUid, KSmfServerUID3 );
+
+    RProcess server;
+
+    result = server.Create( KSmfServerFilename, KNullDesC, serverUid );
+
+    if ( result != KErrNone )
+        {
+        return  result;
+        }
+
+    server.Resume();
+    server.Close();
+
+    return  KErrNone;
+    }
+static TInt StartServer()
     {
     TInt result;
 
-    TFindServer findSmfServer( KSmfServerName );
+    TFindServer findSmfServer( KSmfServerFilename );
     TFullName name;
 
     result = findSmfServer.Next( name );
@@ -427,21 +499,31 @@
         return KErrNone;
         }
 
+    RSemaphore semaphore;
+    result = semaphore.CreateGlobal( KSmfServerSemaphoreName, 0 );
+    if ( result != KErrNone )
+        {
+        return  result;
+        }
+
     result = CreateServerProcessL();
     if ( result != KErrNone )
         {
         return  result;
         }
 
+    semaphore.Wait();
+    semaphore.Close();
+
     return KErrNone;
     }
 
 // -----------------------------------------------------------------------------
-// CreateServerProcessL()
+// CreateServerProcess()
 // Creates a server process
 // -----------------------------------------------------------------------------
 //
-static TInt CreateServerProcessL()
+static TInt CreateServerProcess()
     {
     TInt result;
     //SmfServer SID
@@ -450,22 +532,15 @@
 
     RProcess server;
 
-    result = server.Create( KSmfServerFilename, KNullDesC, serverUid );
-    User::LeaveIfError(result);
-    if (KErrNone != result) {
-        return  result; 
-    }
-    else {
-		//User::WaitForRequest going for infinite loop, temporary work-around
-        //TRequestStatus status;
-        //server.Rendezvous(status);
-        server.Resume(); // logon OK - start the server
-        //Going for infinite loop
-        //User::WaitForRequest(status);// wait for start or death
-        User::After(700000);
-        server.Close();
-        return KErrNone;
-        //return status.Int(); // return the error
-    }
+    result = server.Create( KSmfServerName, KNullDesC, serverUid );
+
+    if ( result != KErrNone )
+        {
+        return  result;
+        }
+
+    server.Resume();
+    server.Close();
+
     return  KErrNone;
     }
--- a/smf/smfservermodule/smfclient/client/smfclientsymbian.h	Mon Jun 07 11:43:45 2010 +0100
+++ b/smf/smfservermodule/smfclient/client/smfclientsymbian.h	Wed Jun 23 19:51:49 2010 +0530
@@ -36,7 +36,7 @@
 	 * Two phase contruction.
 	 * @param aObserver For callback
 	 */
-     static CSmfClientSymbian* NewL(smfObserver* aObserver);
+     static CSmfClientSymbian* NewL(smfObserver* aObserver=NULL);
 
 
      static CSmfClientSymbian* NewLC(smfObserver* aObserver);
@@ -55,16 +55,29 @@
       * @param aSerializedData serialized by the caller.
       * @param aInterfaceName Interface name
       * @param requestType Opcode
+      * @param maxSize Max data size that is allocated in the client side for
+      * receiving this data
+      * @param xtraInfo XtraInfo when required by server other than smfProvider
       */
      TInt sendRequest(QByteArray& aSerializedData,
     		 QString aInterfaceName,
-    		 SmfRequestTypeID requestType);
+    		 SmfRequestTypeID requestType,TInt aMaxAllocation,QByteArray xtraInfo=QByteArray());
      /**
       * This overloaded API is for ESmfGetServices, where data should be
       * fetched synchronously
       */
      QByteArray sendRequest(QString aInterfaceName,
-    		 SmfRequestTypeID requestType);
+    		 SmfRequestTypeID requestType,TInt maxSize=10);
+     
+     /**
+      * For sending request specific to DSM. These are used by SmfRelationMngr API
+      * @param requestType Opcode
+      * @param aSerializedData Data to be passed to DSM through server, interpretation
+      * depends on Relation manager and DSM
+      * @maxSize Size to be allocated in the client side
+      * @return Data received from server, interpretation depends on SmfRelationMngr and DSM
+      */
+     QByteArray sendDSMSyncRequest(SmfRequestTypeID requestType,QByteArray& aSerializedData,SmfError& aErr,TInt maxSize=10);
      /**
       * For testing purpose only
       */
--- a/smf/smfservermodule/smfclient/client/smfclientsymbiansession.h	Mon Jun 07 11:43:45 2010 +0100
+++ b/smf/smfservermodule/smfclient/client/smfclientsymbiansession.h	Wed Jun 23 19:51:49 2010 +0530
@@ -47,15 +47,36 @@
     void Close(){};
 	bool isConnected();
 	bool connected;
+	/**
+	 * Sends async request to the Smf server
+	 * @param aSerializedData Serialized data to be sent to the server.
+	 * Consists of provider Info(SmfProvider*)+ Other common class data
+	 * (when applicable)-serialized
+	 * @param aInterfaceName Name of the interface
+	 * @param aStatus TRequestStatus
+	 * @param maxSize Size of the data to be allocated. This info is sent to the server
+	 * @param aXtraInfo When xtra common data class instances to be passed other than SmfProvider
+	 * so that it can allocate this much of memory.
+	 */
 	void sendAsyncRequest(QByteArray& aSerializedData,
 			QString aInterfaceName,
 			SmfRequestTypeID aRequestType,
-			TRequestStatus& aStatus);
+			TRequestStatus& aStatus,
+			TInt aMaxAllocation,
+			QByteArray aXtraInfo=QByteArray());
 	/**
-	 * This for getservices only
+	 * Sends sync request to the Smf server
 	 */
 	TPtr8 sendSyncRequest(QString aInterfaceName,
-			SmfRequestTypeID aRequestType);
+			SmfRequestTypeID aRequestType,
+			TInt maxSize=0);
+	/**
+	 * Sends DSM related sync request to the Smf server
+	 */
+	TPtr8 sendDSMSyncRequest(SmfRequestTypeID aRequestType,
+			QByteArray& aSerializedData,
+			SmfError aErr,
+			TInt maxSize=0);
 	void writeLog(QString log) const;
     /**
      * Returns data,used to return back the data received from server
@@ -75,6 +96,7 @@
     TBuf8<525> iProviderSymbian;
     TBuf<125> iInterfaceSymbian;
     TBuf8<125> iInterfaceSymbian8;
+    TBuf<100> iDSMErr;
 	QString iInterfaceName;
 	QByteArray iInterfaceNamebyte;
 
@@ -88,8 +110,10 @@
 	TPtr8 iPtrProvider;
 	TPtr iIntfNamePtr;
 	TPtr8 iIntfNamePtr8;
-	
+	HBufC8* iSlot0Buffer;
+	TPtr8 iPtrToSlot0;
 	TInt iMaxMessageSize;
+	TInt iMaxSize;
 	/**
 	 * Last request opcode
 	 */
--- a/smf/smfservermodule/smfclient/client/smfcontactfetcher.cpp	Mon Jun 07 11:43:45 2010 +0100
+++ b/smf/smfservermodule/smfclient/client/smfcontactfetcher.cpp	Wed Jun 23 19:51:49 2010 +0530
@@ -45,7 +45,7 @@
 		delete m_frndContact;
 		m_frndContact = NULL;
 	}
-	//TODO:- Request to unload the plugin
+	/** @TODO:- Request to unload the plugin*/
 }
 bool  SmfContactFetcher::friends(int pageNum,int perPage)
 {
--- a/smf/smfservermodule/smfclient/client/smfcontactfetcher.h	Mon Jun 07 11:43:45 2010 +0100
+++ b/smf/smfservermodule/smfclient/client/smfcontactfetcher.h	Wed Jun 23 19:51:49 2010 +0530
@@ -30,7 +30,6 @@
 class SmfProvider; //base-class for service provider
 class SmfContact; //class for Contact in a social network
 class SmfGroup; //class for a group in social network
-class SmfContactFetcherPrivate;
 
 typedef QList<SmfContact>  SmfContactList;
 typedef QList<SmfGroup> SmfGroupList;
@@ -59,7 +58,7 @@
    * @param parent base provider info
    * @param contact Used for searching friends of the given contact
    * Seeing as this is a plug-in implementation, these will realistically
-   * be generated by SMF factory of some kind
+   * be generated by SMF factory of some kind
    */
   SmfContactFetcher(SmfProvider* baseProvider);
   SmfContactFetcher(SmfProvider* baseProvider, SmfContact* contact);
@@ -93,7 +92,7 @@
    * When the list is big user can specify the page number and per page item data.
    * If not supplied by the user default values are used.
    * @param pageNum Page number to download, SMF_FIRST_PAGE denotes fresh query.
-   * @param perPage Item per page, default is SMF_ITEMS_PER_PAGE
+   * @param perPage Item per page, default is SMF_ITEMS_PER_PAGE
    */
   void search(SmfContact* contact,int pageNum=SMF_FIRST_PAGE,int perPage=SMF_ITEMS_PER_PAGE) ; // list of contact objects
 
@@ -136,14 +135,14 @@
     * @param customData Custom data to be sent
     * Note:-Interpretation of operationId and customData is upto the concerned
     * plugin and client application. service provider should provide some
-    * serializing-deserializing utilities for these custom data
+    * serializing-deserializing utilities for these custom data
     */
    void customRequest(const int& operationId,QByteArray* customData);
 
   //APIs to get/set base provider info (SmfProvider)
 
   /**
-   * Gets the base provider info
+   * Gets the base provider info
    */
    SmfProvider* getProvider() ;
 
@@ -156,7 +155,7 @@
 	 *  @param list list of friends
 	 *  @param error error value
 	 *  @param resultPage Page number info
-	 *  @see friends()
+	 *  @see friends()
 	 */
 	void friendsListAvailable(SmfContactList* list, SmfError error, SmfResultPage resultPage);
 
@@ -188,7 +187,7 @@
 	 * In that case this signal is emitted multiple times.
 	 * @param list List of filtered contacts
 	 * @param resultPage Page number info
-	 * @see search()
+	 * @see search()
 	 */
 	void searchContactFinished(SmfContactList* list,SmfError error, SmfResultPage resultPage);
 
@@ -216,7 +215,7 @@
 	/**
 	 * Emitted when custom data is available
 	 * @param operationId Requested operation id
-	 * @param customData Custom data received, interpretation is not the responsibility of Smf
+	 * @param customData Custom data received, interpretation is not the responsibility of Smf
 	 */
 	void customDataAvailable(int operationId, QByteArray* customData);
 	//so that private impl can directly call emit
--- a/smf/smfservermodule/smfclient/client/smfcontactfetcher_p.cpp	Mon Jun 07 11:43:45 2010 +0100
+++ b/smf/smfservermodule/smfclient/client/smfcontactfetcher_p.cpp	Wed Jun 23 19:51:49 2010 +0530
@@ -15,12 +15,12 @@
 #include "smfcontactfetcher_p.h"
 #ifdef WRITE_LOG
 #include <QFile>
-#include <QTextStream>
+#include <QTextstream>
 #endif
 #ifdef Q_OS_SYMBIAN
 #include "SmfClientSymbian.h"
 #else
-#include "smfclientqt.h"
+#include "SmfClientQt.h"
 #endif
  /**
    * Constructs the SmfContactFetcher.
@@ -32,14 +32,18 @@
   SmfContactFetcherPrivate::SmfContactFetcherPrivate(SmfContactFetcher* contactFetcher)
   : m_contactFetcher(contactFetcher),m_contactList(0)
 	  {
-	  //private impl for symbian
-	#ifdef Q_OS_SYMBIAN
-	m_SmfClientPrivate = CSmfClientSymbian::NewL(this);
-	#endif
+		//private impl for symbian
+		#ifdef Q_OS_SYMBIAN
+		m_SmfClientPrivate = CSmfClientSymbian::NewL(this);
+		#endif
 	  }
   SmfContactFetcherPrivate::~SmfContactFetcherPrivate()
 	  {
-
+	  if(m_SmfClientPrivate)
+		  {
+		  delete m_SmfClientPrivate;
+		  m_SmfClientPrivate = NULL;
+		  }
 	  }
 
   /**
@@ -54,18 +58,21 @@
 	  {
 	  m_providerSerialized.clear();
 	  //We need to pass Opcode and SmfProvider serialized into bytearray 
-	  
+	  m_xtraInfoFlag = 0;
+	  m_pageInfoFlag = 1;
 	  m_baseProvider = m_contactFetcher->getProvider();
 	  //serialize start
 	  QDataStream write(&m_providerSerialized,QIODevice::WriteOnly);
 	  write<<*(m_baseProvider);
+	  write<<m_pageInfoFlag;
+	  write<<pageNum;
+	  write<<perPage;
+	  write<<m_xtraInfoFlag;
 	  //serialize end
-	  
-	  
 	  QString intfName(contactFetcherInterface);
-	  
+	  int maxAllocation = MaxSmfContactSize*perPage;
 	  //call private impl's send method
-	  m_SmfClientPrivate->sendRequest(m_providerSerialized,intfName,SmfContactGetFriends);
+	  m_SmfClientPrivate->sendRequest(m_providerSerialized,intfName,SmfContactGetFriends,maxAllocation,QByteArray());
 	  }
 
   /**
@@ -85,13 +92,19 @@
 	  //serialize start
 	  QDataStream write(&m_providerSerialized,QIODevice::WriteOnly);
 	  write<<*(m_baseProvider);
+	  m_pageInfoFlag = 1;
+	  write<<m_pageInfoFlag;
+	  write<<pageNum;
+	  write<<perPage;
+	  m_xtraInfoFlag = 0;
+	  write<<m_xtraInfoFlag;
 	  //serialize end
 	  
 	  
 	  QString intfName(contactFetcherInterface);
-	  
+	  int maxAllocation = MaxSmfContactSize*perPage;
 	  //call private impl's send method
-	  m_SmfClientPrivate->sendRequest(m_providerSerialized,intfName,SmfContactGetFollowers);
+	  m_SmfClientPrivate->sendRequest(m_providerSerialized,intfName,SmfContactGetFollowers,maxAllocation);
 	  }
   /**
    * Searches for a contact The searchContactFinished() signal
@@ -106,19 +119,28 @@
 	  //We need to pass Opcode and SmfProvider+SmfContact serialized into bytearray 
 	  
 	  m_baseProvider = m_contactFetcher->getProvider();
+	  m_xtraInfoSerialized.clear();
 	  m_contact = contact;
 	  //serialize start
 	  QDataStream write(&m_providerSerialized,QIODevice::WriteOnly);
 	  write<<*(m_baseProvider);
-	  //now serialize SmfContact 
-	  write<<*(m_contact);
-	  //serialize end
+	  m_pageInfoFlag = 1;
+	  write<<m_pageInfoFlag;
+	  write<<pageNum;
+	  write<<pageNum;
+
 	  
+	  //serialize xtra info
+	  QDataStream writeXtra(&m_xtraInfoSerialized,QIODevice::WriteOnly);
+	  writeXtra<<*(m_contact);
+	  
+	  m_xtraInfoFlag = m_xtraInfoSerialized.size();
+	  write<<m_xtraInfoFlag;
 	  
 	  QString intfName(contactFetcherInterface);
-	  
+	  int maxAllocation = MaxSmfContactSize*perPage;
 	  //call private impl's send method
-	  m_SmfClientPrivate->sendRequest(m_providerSerialized,intfName,SmfContactSearch);
+	  m_SmfClientPrivate->sendRequest(m_providerSerialized,intfName,SmfContactSearch,maxAllocation,m_xtraInfoSerialized);
 	  }
 
   /**
@@ -130,11 +152,31 @@
    * @param pageNum Page number to download, SMF_FIRST_PAGE denotes fresh query.
    * @param perPage Item per page, default is SMF_ITEMS_PER_PAGE
    */
-  //TODO:-implement
-//   bool  SmfContactFetcherPrivate::searchNear(SmfPlace* location,SmfLocationSearchBoundary proximity,int pageNum,int perPage) 
-//	   {
-//	   
-//	   }
+   bool  SmfContactFetcherPrivate::searchNear(SmfLocation* location,SmfLocationSearchBoundary proximity,int pageNum,int perPage) 
+	   {
+		  m_baseProvider = m_contactFetcher->getProvider();
+		  m_xtraInfoSerialized.clear();
+		  //serialize start
+		  QDataStream write(&m_providerSerialized,QIODevice::WriteOnly);
+		  write<<*(m_baseProvider);
+		  m_pageInfoFlag = 1;
+		  write<<m_pageInfoFlag;
+		  write<<pageNum;
+		  write<<pageNum;
+		  //m_xtraInfoFlag = 1;
+		  //write<<m_xtraInfoFlag;
+		  
+		  //serialize xtra info
+		  QDataStream writeXtra(&m_xtraInfoSerialized,QIODevice::WriteOnly);
+		  writeXtra<<*(location);
+		  writeXtra<<proximity;
+		  m_xtraInfoFlag = m_xtraInfoSerialized.size();
+		  write<<m_xtraInfoFlag;
+		  QString intfName(contactFetcherInterface);
+		  int maxAllocation = MaxSmfContactSize*perPage;
+		  //call private impl's send method
+		  m_SmfClientPrivate->sendRequest(m_providerSerialized,intfName,SmfContactSearchNear,maxAllocation,m_xtraInfoSerialized);
+	   }
 
 
   /**
@@ -154,13 +196,19 @@
 		  //serialize start
 		  QDataStream write(&m_providerSerialized,QIODevice::WriteOnly);
 		  write<<*(m_baseProvider);
+		  m_pageInfoFlag = 1;
+		  write<<m_pageInfoFlag;
+		  write<<pageNum;
+		  write<<perPage;
+		  m_xtraInfoFlag = 0;
+		  write<<m_xtraInfoFlag;
 		  //serialize end
 		  
 		  
 		  QString intfName(contactFetcherInterface);
-		  
+		  int maxAllocation = MaxSmfGroupSize*perPage;
 		  //call private impl's send method
-		  m_SmfClientPrivate->sendRequest(m_providerSerialized,intfName,SmfContactGetGroups);
+		  m_SmfClientPrivate->sendRequest(m_providerSerialized,intfName,SmfContactGetGroups,maxAllocation);
 	   }
 
   /**
@@ -180,31 +228,37 @@
 	  //serialize start
 	  QDataStream write(&m_providerSerialized,QIODevice::WriteOnly);
 	  write<<*(m_baseProvider);
-	  //now serialize SmfGroup 
-	  write<<m_grp;
+	  m_pageInfoFlag = 1;
+	  write<<m_pageInfoFlag;
+	  write<<pageNum;
+	  write<<perPage;
+	  //m_xtraInfoFlag = 1;
+	  //write<<m_xtraInfoFlag;
+	  
+	  //serialize xtra info
+	  QDataStream writeXtra(&m_xtraInfoSerialized,QIODevice::WriteOnly);
+	  writeXtra<<m_grp;
+	  m_xtraInfoFlag = m_xtraInfoSerialized.size();
+	  write<<m_xtraInfoFlag;
 	  //serialize end
 	  
 	  
 	  QString intfName(contactFetcherInterface);
-	  
+	  int maxAllocation = MaxSmfContactSize*perPage;
 	  //call private impl's send method
-	  m_SmfClientPrivate->sendRequest(m_providerSerialized,intfName,SmfContactSearch);
+	  m_SmfClientPrivate->sendRequest(m_providerSerialized,intfName,SmfContactSearchInGroup,maxAllocation);
+	  return 0;
    }
-
-
 void SmfContactFetcherPrivate::resultsAvailable(QByteArray result,SmfRequestTypeID opcode,SmfError error)
    	{
 	writeLog("SmfContactFetcherPrivate::resultsAvailable");
 	
-	//note:- "result" is serialized and we need to de-serialize it as per opcode
-	//TODO:- order of serialization Error value followed by data
-	
    	QDataStream reader(&result,QIODevice::ReadOnly);
    	
    	//Now de-serialize it based on opcode
    	switch(opcode)
    		{
-   		case SmfContactGetFriendsComplete:
+   		case SmfContactGetFriends:
    			{
 
    			if(m_contactList)
@@ -213,24 +267,48 @@
 				m_contactList = NULL;
    				}
    			m_contactList = new SmfContactList;
-   			//TODO
-//   			SmfError error;
-//   			reader>>error;
-//   			writeLog("Error=");
-//   			writeLog(QString::number(error));
-//   			SmfError err = (SmfError)error;
    			m_frndist.clear();
    			reader>>m_frndist;
    			writeLog("m_frndist.count=");
    			writeLog(QString::number(m_frndist.count()));
-   			//not incorporating paging now
+   			//TODO:-After consulting with PM owner decide page serialization
    			SmfResultPage page;
 
-   			emit m_contactFetcher->friendsListAvailable(&m_frndist,SmfNoError,page);
+   			emit m_contactFetcher->friendsListAvailable(&m_frndist,error,page);
    			
    			}
    			break;
-   		case SmfContactGetFollowersComplete:
+   		case SmfContactGetFollowers:
+   			{
+   			if(m_contactList)
+   				{
+				delete m_contactList;
+				m_contactList = NULL;
+   				}
+   			m_contactList = new SmfContactList;
+   			reader>>*(m_contactList);
+   			//TODO:-After consulting with PM owner decide page serialization
+   			SmfResultPage page;
+
+   			emit m_contactFetcher->followersListAvailable(m_contactList,error,page);
+			
+   			}
+   			break;
+   		case SmfContactGetGroups:
+   			{
+   			writeLog("Before m_grpList.clear=");
+   			m_grpList.clear();
+   			writeLog("Before reader>>m_grpList=");
+   			reader>>m_grpList ;
+   			/** @TODO:-After consulting with PM owner decide page serialization */
+   			SmfResultPage page;
+   			writeLog("m_grpList.count=");
+   			writeLog(QString::number(m_grpList.count()));
+   			emit m_contactFetcher->groupListAvailable(&m_grpList,error,page);
+   			
+   			}
+   			break;
+   		case SmfContactSearch:
    			{
    			if(m_contactList)
    				{
@@ -238,32 +316,14 @@
 				m_contactList = NULL;
    				}
    			m_contactList = new SmfContactList;
-   			quint32 error;
-   			reader>>error;
-   			SmfError err = (SmfError)error;
    			reader>>*(m_contactList);
-   			//not incorporating paging now
+   			/** @TODO:-After consulting with PM owner decide page serialization */
    			SmfResultPage page;
-
-   			emit m_contactFetcher->followersListAvailable(m_contactList,err,page);
-			
+   			//searchContactFinished
+   			emit m_contactFetcher->searchContactFinished(m_contactList,error,page);
    			}
    			break;
-   		case SmfContactGetGroupsComplete:
-   			{
-   			writeLog("Before m_grpList.clear=");
-   			m_grpList.clear();
-   			writeLog("Before reader>>m_grpList=");
-   			reader>>m_grpList ;
-   			//not incorporating paging now
-   			SmfResultPage page;
-   			writeLog("m_grpList.count=");
-   			writeLog(QString::number(m_grpList.count()));
-   			emit m_contactFetcher->groupListAvailable(&m_grpList,SmfNoError,page);
-   			
-   			}
-   			break;
-   		case SmfContactSearchComplete:
+   		case SmfContactSearchNear:
    			{
    			if(m_contactList)
    				{
@@ -271,38 +331,43 @@
 				m_contactList = NULL;
    				}
    			m_contactList = new SmfContactList;
-   			quint32 error;
-   			reader>>error;
-   			SmfError err = (SmfError)error;
    			reader>>*(m_contactList);
-   			//not incorporating paging now
+   			/** @TODO:-After consulting with PM owner decide page serialization*/
    			SmfResultPage page;
    			//searchContactFinished
-   			emit m_contactFetcher->searchContactFinished(m_contactList,err,page);
+   			emit m_contactFetcher->searchNearFinished(m_contactList,error,page);
+   			}
+   			break;
+   		case SmfContactSearchInGroup:
+   			{
+   			if(m_contactList)
+   				{
+				delete m_contactList;
+				m_contactList = NULL;
+   				}
+   			m_contactList = new SmfContactList;
+   			reader>>*(m_contactList);
+   			//TODO:-After consulting with PM owner decide page serialization
+   			SmfResultPage page;
+   			//searchContactFinished
+   			emit m_contactFetcher->searchInGroupFinished(m_contactList,error,page);
    			}
    			break;
    		default:
-   			writeLog("Before m_grpList.clear=");
-   			m_grpList.clear();
-   			writeLog("Before reader>>m_grpList=");
-   			reader>>m_grpList ;
-   			//not incorporating paging now
-   			SmfResultPage page;
-   			writeLog("m_grpList.count=");
-   			writeLog(QString::number(m_grpList.count()));
-   			emit m_contactFetcher->groupListAvailable(&m_grpList,SmfNoError,page);
+   			writeLog("!!!!!!!!!!default!!!!!!!!!!!!!!");
    		}
    	
    	}
 void SmfContactFetcherPrivate::writeLog(QString log) const
 	{
+#ifdef WRITE_LOG
 	QFile file("c:\\data\\SmfClientLogs.txt");
     if (!file.open(QIODevice::Append | QIODevice::Text))
 	         return;
     QTextStream out(&file);
     out << log << "\n";
     file.close();
-
+#endif
 	}
 QDataStream &operator<<( QDataStream &aDataStream, 
 		const SmfError &err )
--- a/smf/smfservermodule/smfclient/client/smfcontactfetcher_p.h	Mon Jun 07 11:43:45 2010 +0100
+++ b/smf/smfservermodule/smfclient/client/smfcontactfetcher_p.h	Wed Jun 23 19:51:49 2010 +0530
@@ -24,9 +24,9 @@
  * Note:- only symbian client-server impl is provided at the moment
  **/
 #include "smfprovider.h"
-#include "smfclientglobal.h"
-#include "smfglobal.h"
-#include "smfobserver.h"
+#include "SmfClientGlobal.h"
+#include "smfGlobal.h"
+#include "SmfObserver.h"
 
 class SmfProvider;
 
@@ -35,10 +35,10 @@
 #include <QDateTime>
 #include <QStringList>
 
-#include "smfobserver.h"
+#include "SmfObserver.h"
 #include "smfcontactfetcher.h"
 #include "smfpostprovider.h"
-
+#include "smflocation.h"
 #ifdef Q_OS_SYMBIAN
 class CSmfClientSymbian;
 #else
@@ -97,8 +97,7 @@
    * @param pageNum Page number to download, SMF_FIRST_PAGE denotes fresh query.
    * @param perPage Item per page, default is SMF_ITEMS_PER_PAGE
    */
-  //TODO:-implement 
-  //bool searchNear(SmfPlace* location,SmfLocationSearchBoundary proximity,int pageNum=SMF_FIRST_PAGE,int perPage=SMF_ITEMS_PER_PAGE) ;
+  bool searchNear(SmfLocation* location,SmfLocationSearchBoundary proximity,int pageNum=SMF_FIRST_PAGE,int perPage=SMF_ITEMS_PER_PAGE) ;
 
 
   /**
@@ -128,10 +127,14 @@
   SmfProvider* m_baseProvider;
   //serialized byte array of provider
   QByteArray m_providerSerialized;
+  //serialized xtra info, order of serialization follows order of param
+  QByteArray m_xtraInfoSerialized;
 #ifdef Q_OS_SYMBIAN
   CSmfClientSymbian* m_SmfClientPrivate;
   friend class CSmfClientSymbian;
-#else
+  int m_xtraInfoFlag;
+  int m_pageInfoFlag;
+ #else
   SmfClientQt* m_SmfClientPrivate;
   friend class SmfClientQt;
 #endif
--- a/smf/smfservermodule/smfclient/client/smfgallery.cpp	Mon Jun 07 11:43:45 2010 +0100
+++ b/smf/smfservermodule/smfclient/client/smfgallery.cpp	Wed Jun 23 19:51:49 2010 +0530
@@ -36,24 +36,31 @@
 	  }
 
   /**
-   * Get the picture listing asynchronously.
-   * The picturesAvailable() signal is emitted with SmfPictureList once the pictures have arrived.
+ * Get the album listing asynchronously.
+ * The albumsAvailable() signal is emitted with SmfPictureAlbumList once the albums have arrived.
    * When the list is big user can specify the page number and per page item data.
    * If not supplied by the user default values are used.
+ * @param names the subject or any keywords to be used to filter albums with that name
+ * @param user the user whose albums are requested 
    * @param pageNum Page number to download, SMF_FIRST_PAGE denotes fresh query.
    * @param perPage Item per page, default is SMF_ITEMS_PER_PAGE
    */
-  void SmfGallery::pictures(int pageNum,int perPage)
+void SmfGallery::albums(QStringList names, SmfContact* user, int pageNum,int perPage)
 	  {
-	  m_private->pictures(pageNum,perPage);
+		m_private->albums(names,user, pageNum, perPage);	
 	  }
 
   /**
-   * Returns a user title/caption for the picture
+ * Get the picture listing asynchronously.
+ * The picturesAvailable() signal is emitted with SmfPictureList once the pictures have arrived.
+ * When the list is big user can specify the page number and per page item data.
+ * If not supplied by the user default values are used.
+ * @param pageNum Page number to download, SMF_FIRST_PAGE denotes fresh query.
+ * @param perPage Item per page, default is SMF_ITEMS_PER_PAGE
    */
-  QString SmfGallery::description(SmfPicture& picture)
+void SmfGallery::pictures(SmfPictureAlbumList &albums, int pageNum,int perPage)
 	  {
-	  m_private->description(picture);
+	m_private->pictures( albums, pageNum, perPage);
 	  }
 
   //APIs to get/set base provider info (SmfProvider)
@@ -71,9 +78,9 @@
 	 * uploadFinished() signal is emitted with the success value of the upload
 	 * @param image the image to be uploaded
 	 */
-   void SmfGallery::upload(SmfPicture* image) 
+void SmfGallery::upload(SmfPicture* image, SmfPictureAlbum* album)
 	   {
-	   m_private->upload(image);
+	m_private->upload(image,album);
 	   }
 
 	/**
@@ -81,9 +88,10 @@
 	 * uploadFinished() signal is emitted with the success value of the upload
 	 * @param images the list image to be uploaded
 	 */
-   void SmfGallery::upload(SmfPictureList* images) 
+
+void SmfGallery::upload(SmfPictureList* images, SmfPictureAlbum* album) 
 	   {
-	   m_private->upload(images);
+	m_private->upload(images,album);
 	   }
 
   /**
@@ -96,4 +104,22 @@
 	   {
 	   m_private->postComment(image,comment);
 	   }
-
+   
+QString SmfGallery::description(SmfPicture& picture)
+   {
+		Q_UNUSED(picture);
+   }
+/**
+ * Request for a custom operation.
+ * @param operationId OperationId
+ * @param customData Custom data to be sent
+ * Note:-Interpretation of operationId and customData is upto the concerned
+ * plugin and client application. service provider should provide some
+ * serializing-deserializing utilities for these custom data
+ */
+void SmfGallery::customRequest(const int& operationId,QByteArray* customData)
+	{
+	/*to be implemented*/
+	Q_UNUSED(operationId);
+	Q_UNUSED(customData);
+	}
--- a/smf/smfservermodule/smfclient/client/smfgallery.h	Mon Jun 07 11:43:45 2010 +0100
+++ b/smf/smfservermodule/smfclient/client/smfgallery.h	Wed Jun 23 19:51:49 2010 +0530
@@ -24,7 +24,9 @@
 #include "smfprovider.h"
 #include "smfclientglobal.h"
 #include "smfpicture.h"
+#include "smfpicturealbum.h"
 #include "smfcomment.h"
+#include "smfcontact.h"
 
 #include <QObject>
 #include <QDateTime>
@@ -64,16 +66,30 @@
   SmfGallery(SmfProvider* baseprovider);
   ~SmfGallery();
 
-public:
+	public slots:
+	/**
+	 * Get the album listing asynchronously.
+	 * The albumsAvailable() signal is emitted with SmfPictureAlbumList once the albums have arrived.
+	 * When the list is big user can specify the page number and per page item data.
+	 * If not supplied by the user default values are used.
+	 * @param names the subject or any keywords to be used to filter albums with that name
+	 * @param user the user whose albums are requested 
+	 * @param pageNum Page number to download, SMF_FIRST_PAGE denotes fresh query.
+	 * @param perPage Item per page, default is SMF_ITEMS_PER_PAGE
+	 */
+	void albums(QStringList names, SmfContact* user, int pageNum=SMF_FIRST_PAGE,int perPage=SMF_ITEMS_PER_PAGE);
+	
+	
   /**
    * Get the picture listing asynchronously.
    * The picturesAvailable() signal is emitted with SmfPictureList once the pictures have arrived.
    * When the list is big user can specify the page number and per page item data.
    * If not supplied by the user default values are used.
+	 * @param albums album(s) whose pictures are being requested
    * @param pageNum Page number to download, SMF_FIRST_PAGE denotes fresh query.
    * @param perPage Item per page, default is SMF_ITEMS_PER_PAGE
    */
-  void pictures(int pageNum=SMF_FIRST_PAGE,int perPage=SMF_ITEMS_PER_PAGE);
+	void pictures(SmfPictureAlbumList &albums, int pageNum=SMF_FIRST_PAGE,int perPage=SMF_ITEMS_PER_PAGE);
 
   /**
    * Returns a user title/caption for the picture
@@ -90,15 +106,17 @@
 	 * Upload an image.Implemented as slot to connect to UI controls more easily
 	 * uploadFinished() signal is emitted with the success value of the upload
 	 * @param image the image to be uploaded
+	 * @param album the optional destination album name 
 	 */
-   void upload(SmfPicture* image) ;
+	void upload(SmfPicture* image, SmfPictureAlbum* album=NULL) ;
 
 	/**
 	 * Upload an list image.Implemented as slot to connect to UI controls more easily
 	 * uploadFinished() signal is emitted with the success value of the upload
 	 * @param images the list image to be uploaded
+	 * @param album the optional destination album name 
 	 */
-   void upload(SmfPictureList* images) ;
+	void upload(SmfPictureList* images, SmfPictureAlbum* album=NULL) ;
 
   /**
    * Posts a comment for an image. uploadFinished() signal is emitted
@@ -115,8 +133,17 @@
 	* plugin and client application. service provider should provide some
 	* serializing-deserializing utilities for these custom data
 	*/
-   void customRequest(const int& operationId,QByteArray* customData){/*to be implemented*/};
+   void customRequest(const int& operationId,QByteArray* customData);
 signals:
+	
+	/*
+	 * Notification on arrival of list of SmfPictureAlbum as a result of call to @ref albums().
+	 * @param pics Picture list
+	 * @param error Error string
+	 * @param resultPage Page number info
+	 */
+	void albumsAvailable(SmfPictureAlbumList* albums, SmfError error, SmfResultPage resultPage);
+	
 	/*
 	 * Notification on arrival of list of SmfPicture as a result of request.
 	 * Note if number of friends is large, then it can download the list page by page.
@@ -132,13 +159,18 @@
    * Notification of the success of the uploading of image/comment
    * @param error The upload success result of each individual pictures
    */
-  void uploadFinished(QList<bool> error);
+  void uploadFinished(QList<SmfError> error);
 	/**
 	 * Emitted when custom data is available
 	 * @param operationId Requested operation id
 	 * @param customData Custom data received, interpretation is not the responsibility of Smf
 	 */
 	void customDataAvailable(int operationId, QByteArray* customData);
+
+	/** friend so that it can directly emit SmfGallery's signal*/
+	friend class SmfGalleryPrivate;
+
+
 private:
 	SmfProvider* m_baseProvider;
 	//private impl wrapper
--- a/smf/smfservermodule/smfclient/client/smfgallery_p.cpp	Mon Jun 07 11:43:45 2010 +0100
+++ b/smf/smfservermodule/smfclient/client/smfgallery_p.cpp	Wed Jun 23 19:51:49 2010 +0530
@@ -25,7 +25,7 @@
 #ifdef Q_OS_SYMBIAN
 #include "smfclientsymbian.h"
 #else
-#include "smfclientqt.h"
+#include "SmfClientQt.h"
 #endif
 
   SmfGalleryPrivate::SmfGalleryPrivate(SmfGallery* gallery)
@@ -46,89 +46,133 @@
 	  }
   
   /**
-   * Get the picture listing asynchronously.
-   * The picturesAvailable() signal is emitted with SmfPictureList once the pictures have arrived.
+ * Get the album listing asynchronously.
+ * The albumsAvailable() signal is emitted with SmfPictureAlbumList once the albums have arrived.
    * When the list is big user can specify the page number and per page item data.
    * If not supplied by the user default values are used.
+ * @param names the subject or any keywords to be used to filter albums with that name
+ * @param user the user whose albums are requested 
    * @param pageNum Page number to download, SMF_FIRST_PAGE denotes fresh query.
    * @param perPage Item per page, default is SMF_ITEMS_PER_PAGE
    */
-  void SmfGalleryPrivate::pictures(int pageNum,int perPage)
+void SmfGalleryPrivate::albums(QStringList names, SmfContact* user, int pageNum, int perPage)
 	  {
 	  //We need to pass Opcode and SmfProvider serialized into bytearray 
-	  
 	  m_baseProvider = m_gallery->getProvider();
-	  //serialize start
 	  QDataStream write(&m_serializedDataToServer,QIODevice::WriteOnly);
 	  write<<*(m_baseProvider);
-	  //serialize end
+	  m_pageInfoFlag = 1;
+	  write<<m_pageInfoFlag;
+	  write<<pageNum;
+	  write<<perPage;
+	  //TODO:- use different opcode incase post retreival is for other user
+	  //serialize SmfContact if post retrieval is for other user
+	  if(user)
+		  {
+		  //now serialize SmfContact 
+		  m_xtraInfoSerialized.clear();
+		  QDataStream Xtrawrite(&m_xtraInfoSerialized,QIODevice::WriteOnly);
+		  Xtrawrite<<*(user);
+		  m_xtraInfoFlag = m_xtraInfoSerialized.size();
+		  write<<m_xtraInfoFlag;
+		  }
+	  else
+		  {
+		  m_xtraInfoFlag = 0;
+		  write<<m_xtraInfoFlag;
+		  }	
 	  QString intfName(galleryInterface);
-	  
+	  int maxalloc = MaxSmfPictureAlbumSize*perPage;
 	  //call private impl's send method
-	  m_SmfClientPrivate->sendRequest(m_serializedDataToServer,intfName,SmfPictureGetPictures);
+	  m_SmfClientPrivate->sendRequest(m_serializedDataToServer,intfName,SmfPictureGetAlbums,maxalloc,m_xtraInfoSerialized);
 	  }
 
   /**
-   * Returns a user title/caption for the picture
+ * Get the picture listing asynchronously.
+ * The picturesAvailable() signal is emitted with SmfPictureList once the pictures have arrived.
+ * When the list is big user can specify the page number and per page item data.
+ * If not supplied by the user default values are used.
+ * @param albums album(s) whose pictures are being requested
+ * @param pageNum Page number to download, SMF_FIRST_PAGE denotes fresh query.
+ * @param perPage Item per page, default is SMF_ITEMS_PER_PAGE
    */
-  QString SmfGalleryPrivate::description(SmfPicture& picture)
+void SmfGalleryPrivate::pictures(SmfPictureAlbumList albums,int pageNum,int perPage)
 	  {
-	  //We need to pass Opcode and SmfProvider+SmfPicture serialized into bytearray 
-	  
+	  //We need to pass Opcode and SmfProvider serialized into bytearray 
 	  m_baseProvider = m_gallery->getProvider();
-	  //serialize start
 	  QDataStream write(&m_serializedDataToServer,QIODevice::WriteOnly);
 	  write<<*(m_baseProvider);
-	  write<<picture;
-	  //serialize end
+	  m_pageInfoFlag = 1;
+	  write<<m_pageInfoFlag;
+	  write<<pageNum;
+	  write<<perPage;
+	  m_xtraInfoSerialized.clear();
+	  QDataStream Xtrawrite(&m_xtraInfoSerialized,QIODevice::WriteOnly);
+	  Xtrawrite<<albums;
+	  m_xtraInfoFlag = m_xtraInfoSerialized.size();
+	  write<<m_xtraInfoFlag;
+
 	  QString intfName(galleryInterface);
-	  
+	  int maxalloc = MaxSmfPictureSize*perPage;
 	  //call private impl's send method
-	  m_SmfClientPrivate->sendRequest(m_serializedDataToServer,intfName,SmfPictureDescription);
-	  //TODO:-to be implemented
-	  return QString();
+	  m_SmfClientPrivate->sendRequest(m_serializedDataToServer,intfName,SmfPictureGetPictures,maxalloc,m_xtraInfoSerialized);
 	  }
+
   /**
 	 * Upload an image.Implemented as slot to connect to UI controls more easily
 	 * uploadFinished() signal is emitted with the success value of the upload
 	 * @param image the image to be uploaded
 	 */
-   void SmfGalleryPrivate::upload(SmfPicture* image)
+void SmfGalleryPrivate::upload(SmfPicture* image, SmfPictureAlbum* album)
 	   {
-		  //We need to pass Opcode and SmfProvider+SmfPicture serialized into bytearray 
-		  
-		  m_baseProvider = m_gallery->getProvider();
-		  //serialize start
-		  QDataStream write(&m_serializedDataToServer,QIODevice::WriteOnly);
-		  write<<*(m_baseProvider);
-		  write<<*(image);
-		  //serialize end
-		  QString intfName(galleryInterface);
-		  
-		  //call private impl's send method
-		  m_SmfClientPrivate->sendRequest(m_serializedDataToServer,intfName,SmfPictureUpload);
-		}
+	  //We need to pass Opcode and SmfProvider serialized into bytearray 
+	  m_baseProvider = m_gallery->getProvider();
+	  QDataStream write(&m_serializedDataToServer,QIODevice::WriteOnly);
+	  write<<*(m_baseProvider);
+	  m_pageInfoFlag = 0;
+	  write<<m_pageInfoFlag;
+
+	  m_xtraInfoSerialized.clear();
+	  QDataStream Xtrawrite(&m_xtraInfoSerialized,QIODevice::WriteOnly);
+	  Xtrawrite<<image;
+	  Xtrawrite<<album;
+	  m_xtraInfoFlag = m_xtraInfoSerialized.size();
+	  write<<m_xtraInfoFlag;
+
+	  QString intfName(galleryInterface);
+	  int maxalloc = 100;
+	  //call private impl's send method
+	  m_SmfClientPrivate->sendRequest(m_serializedDataToServer,intfName,SmfPictureUpload,maxalloc,m_xtraInfoSerialized);
+	  }
 
 	/**
 	 * Upload an list image.Implemented as slot to connect to UI controls more easily
 	 * uploadFinished() signal is emitted with the success value of the upload
 	 * @param images the list image to be uploaded
 	 */
-   void SmfGalleryPrivate::upload(SmfPictureList* images)
-	   {
-		  //We need to pass Opcode and SmfProvider+SmfPictureList serialized into bytearray 
-		  
-		  m_baseProvider = m_gallery->getProvider();
-		  //serialize start
-		  QDataStream write(&m_serializedDataToServer,QIODevice::WriteOnly);
-		  write<<*(m_baseProvider);
-		  write<<*(images);
-		  //serialize end
-		  QString intfName(galleryInterface);
-		  
-		  //call private impl's send method
-		  m_SmfClientPrivate->sendRequest(m_serializedDataToServer,intfName,SmfPictureMultiUpload);
-		}
+void SmfGalleryPrivate::upload(SmfPictureList* images, SmfPictureAlbum* album)
+	{
+
+	  //We need to pass Opcode and SmfProvider serialized into bytearray 
+	  m_baseProvider = m_gallery->getProvider();
+	  QDataStream write(&m_serializedDataToServer,QIODevice::WriteOnly);
+	  write<<*(m_baseProvider);
+	  m_pageInfoFlag = 0;
+	  write<<m_pageInfoFlag;
+
+	  m_xtraInfoSerialized.clear();
+	  QDataStream Xtrawrite(&m_xtraInfoSerialized,QIODevice::WriteOnly);
+	  Xtrawrite<<images;
+	  Xtrawrite<<album;
+	  m_xtraInfoFlag = m_xtraInfoSerialized.size();
+	  write<<m_xtraInfoFlag;
+
+	  QString intfName(galleryInterface);
+	  int maxalloc = 1000;
+	  //call private impl's send method
+	  m_SmfClientPrivate->sendRequest(m_serializedDataToServer,intfName,SmfPictureMultiUpload,maxalloc,m_xtraInfoSerialized);
+	  
+	}
 
   /**
    * Posts a comment for an image. uploadFinished() signal is emitted
@@ -138,65 +182,68 @@
    */
    void SmfGalleryPrivate::postComment(SmfPicture image, SmfComment comment)
 	   {
-		  //We need to pass Opcode and SmfProvider+SmfPicture+SmfComment serialized into bytearray 
-		  
+
+		  //We need to pass Opcode and SmfProvider serialized into bytearray 
 		  m_baseProvider = m_gallery->getProvider();
-		  //serialize start
 		  QDataStream write(&m_serializedDataToServer,QIODevice::WriteOnly);
 		  write<<*(m_baseProvider);
-		  write<<image;
-		  write<<comment;
-		  //serialize end
+		  m_pageInfoFlag = 0;
+		  write<<m_pageInfoFlag;
+
+		  m_xtraInfoSerialized.clear();
+		  QDataStream Xtrawrite(&m_xtraInfoSerialized,QIODevice::WriteOnly);
+		  Xtrawrite<<image;
+		  Xtrawrite<<comment;
+		  m_xtraInfoFlag = m_xtraInfoSerialized.size();
+		  write<<m_xtraInfoFlag;
+
 		  QString intfName(galleryInterface);
-		  
+		  int maxalloc = 100;
 		  //call private impl's send method
-		  m_SmfClientPrivate->sendRequest(m_serializedDataToServer,intfName,SmfPicturePostComment);
+		  m_SmfClientPrivate->sendRequest(m_serializedDataToServer,intfName,SmfPicturePostComment,maxalloc,m_xtraInfoSerialized);
+		  
 		}
    //from smfobserver
    void SmfGalleryPrivate::resultsAvailable(QByteArray result,SmfRequestTypeID opcode,SmfError error)
 	   {
-		writeLog("SmfPostProviderPrivate::resultsAvailable");
-		
-		//note:- "result" is serialized and we need to de-serialize it as per opcode
-		//TODO:- order of serialization Error value followed by data
-		
-		QDataStream reader(&result,QIODevice::ReadOnly);
-		
-		//Now de-serialize it based on opcode
-		switch(opcode)
-			{
-			case SmfPictureGetPicturesComplete:
+	writeLog("SmfPostProviderPrivate::resultsAvailable");
+	
+	//note:- "result" is serialized and we need to de-serialize it as per opcode
+	//Order of serialization Error value followed by data
+	
+	QDataStream reader(&result,QIODevice::ReadOnly);
+	
+	//Now de-serialize it based on opcode
+	switch(opcode)
+		{
+		case SmfPictureGetPicturesComplete:
 				{
 					if(m_picList)
 						{
 						delete m_picList;
 						m_picList = NULL;
 						}
-
+		
 					m_picList = new SmfPictureList;
 					reader>>*(m_picList);
 					writeLog("m_picList.count=");
 					writeLog(QString::number(m_picList->count()));
-//					foreach(SmfPicture pic,*m_picList)
-//						{
-
-//						}
 					//not incorporating paging now
 					SmfResultPage page;
-
+		
 					emit m_gallery->picturesAvailable(m_picList,error,page);
 				
 				}
 				break;
-			case SmfPictureUploadComplete:
-			case SmfPicturePostCommentComplete:
+			case SmfPictureUpload:
+			case SmfPicturePostComment:
 				{
-					bool success;
-					reader>>success;
+					
+					int errInt;
+					reader>>errInt;
 					writeLog("success=");
-					if(success)
-						writeLog("true");
-					QList<bool> successList;
+					QList<SmfError> successList;
+					SmfError success = (SmfError)errInt; 
 					successList.append(success);
 					emit m_gallery->uploadFinished(successList);
 				
@@ -204,15 +251,20 @@
 				break;
 			case SmfPictureMultiUpload:
 				{
-				QList<bool> successList;
-				reader>>successList;
+				QList<int> successListInt;
+				QList<SmfError> successList;
+				reader>>successListInt;
+				foreach(int success,successListInt)
+					{
+					successList.append((SmfError)success);
+					}
 				emit m_gallery->uploadFinished(successList);
 			
-			}
+				}
 				break;
-	//		default:
-	//			//should panic?
-	//			
-			}
-	   }
+				default:
+					User::Panic(_L("Gallerprivate="),opcode);
+					
+		}
+}
    
--- a/smf/smfservermodule/smfclient/client/smfgallery_p.h	Mon Jun 07 11:43:45 2010 +0100
+++ b/smf/smfservermodule/smfclient/client/smfgallery_p.h	Wed Jun 23 19:51:49 2010 +0530
@@ -24,11 +24,13 @@
  * QLocalserver for rest of the platforms
  * Note:- only symbian client-server impl is provided at the moment
  **/
+#ifndef SMFGALLERY_P_H
+#define SMFGALLERY_P_H
 
 #include "smfprovider.h"
-#include "smfclientglobal.h"
-#include "smfglobal.h"
-#include "smfobserver.h"
+#include "SmfClientGlobal.h"
+#include "smfGlobal.h"
+#include "SmfObserver.h"
 
 class SmfProvider;
 
@@ -37,7 +39,7 @@
 #include <QDateTime>
 #include <QStringList>
 
-#include "smfobserver.h"
+#include "SmfObserver.h"
 #include "smfgallery.h"
 #ifdef Q_OS_SYMBIAN
 class CSmfClientSymbian;
@@ -54,33 +56,44 @@
   ~SmfGalleryPrivate();
   
   /**
-   * Get the picture listing asynchronously.
-   * The picturesAvailable() signal is emitted with SmfPictureList once the pictures have arrived.
+	 * Get the album listing asynchronously.
+	 * The albumsAvailable() signal is emitted with SmfPictureAlbumList once the albums have arrived.
    * When the list is big user can specify the page number and per page item data.
    * If not supplied by the user default values are used.
+	 * @param names the subject or any keywords to be used to filter albums with that name
+	 * @param user the user whose albums are requested 
    * @param pageNum Page number to download, SMF_FIRST_PAGE denotes fresh query.
    * @param perPage Item per page, default is SMF_ITEMS_PER_PAGE
    */
-  void pictures(int pageNum=SMF_FIRST_PAGE,int perPage=SMF_ITEMS_PER_PAGE);
+	void albums(QStringList names, SmfContact* user, int pageNum=SMF_FIRST_PAGE,int perPage=SMF_ITEMS_PER_PAGE);
+
 
   /**
-   * Returns a user title/caption for the picture
+	 * Get the picture listing asynchronously.
+	 * The picturesAvailable() signal is emitted with SmfPictureList once the pictures have arrived.
+	 * When the list is big user can specify the page number and per page item data.
+	 * If not supplied by the user default values are used.
+	 * @param albums album(s) whose pictures are being requested
+	 * @param pageNum Page number to download, SMF_FIRST_PAGE denotes fresh query.
+	 * @param perPage Item per page, default is SMF_ITEMS_PER_PAGE
    */
-  QString description(SmfPicture& picture); // A user title or caption, maybe?
+	void pictures(SmfPictureAlbumList albums, int pageNum=SMF_FIRST_PAGE,int perPage=SMF_ITEMS_PER_PAGE);
 
   /**
 	 * Upload an image.Implemented as slot to connect to UI controls more easily
 	 * uploadFinished() signal is emitted with the success value of the upload
 	 * @param image the image to be uploaded
+	 * @param album the optional destination album name 
 	 */
-   void upload(SmfPicture* image) ;
+	void upload(SmfPicture* image, SmfPictureAlbum* album=NULL) ;
 
 	/**
 	 * Upload an list image.Implemented as slot to connect to UI controls more easily
 	 * uploadFinished() signal is emitted with the success value of the upload
 	 * @param images the list image to be uploaded
+	 * @param album the optional destination album name 
 	 */
-   void upload(SmfPictureList* images) ;
+	void upload(SmfPictureList* images, SmfPictureAlbum* album=NULL) ;
 
   /**
    * Posts a comment for an image. uploadFinished() signal is emitted
@@ -89,13 +102,18 @@
    * @param comment Comment to post
    */
    void postComment(SmfPicture image, SmfComment comment) ;
-   //from smfobserver
+	
+	/** from smfobserver */
    void resultsAvailable(QByteArray result,SmfRequestTypeID opcode,SmfError error);
+	
+	
 private:
 	  SmfProvider* m_baseProvider;
 	  //serialized byte array of provider+other info to be sent to the server
 	  //The order:- SmfProvider then params in order of their appearance in fn
 	  QByteArray m_serializedDataToServer;
+	  //serialized xtra info, order of serialization follows order of param
+	  QByteArray m_xtraInfoSerialized;
 	#ifdef Q_OS_SYMBIAN
 	  CSmfClientSymbian* m_SmfClientPrivate;
 	  friend class CSmfClientSymbian;
@@ -106,13 +124,15 @@
 	  bool m_connected;
 	  SmfGallery* m_gallery;
 	  SmfPictureList* m_picList;
+	  int m_xtraInfoFlag;
+	  int m_pageInfoFlag;
 	 void writeLog(QString log) const{};
 
 };
+#endif
 
 
 
 
 
 
-
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/smf/smfservermodule/smfclient/client/smfmusic.cpp	Wed Jun 23 19:51:49 2010 +0530
@@ -0,0 +1,187 @@
+
+/**
+ * Copyright (c) 2010 Sasken Communication Technologies Ltd.
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of the "Eclipse Public License v1.0"
+ * which accompanies  this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html"
+ *
+ * Initial Contributors:
+ * Chandradeep Gandhi, Sasken Communication Technologies Ltd - Initial contribution
+ *
+ * Contributors:
+ * Manasij Roy, Nalina Hariharan
+ *
+ * Description:
+ * Music related services
+ */
+
+#include "smfmusic.h"
+#include "smfmusic_p.h"
+
+//SmfMusicService start
+SmfMusicService::SmfMusicService(SmfProvider *baseProvider)
+: m_baseProvider(baseProvider)
+	{
+	m_private = new SmfMusicServicePrivate(this);
+	}
+SmfMusicService::~SmfMusicService()
+	{
+	  if(m_private)
+		  {
+		  delete m_private;
+		  m_private = NULL;
+		  }
+	}
+void SmfMusicService::userinfo()
+	{
+	m_private->userinfo();
+	}
+void SmfMusicService::searchUser(SmfLocation venue, int pageNum, int perPage)
+	{
+	m_private->searchUser(venue,pageNum,perPage);
+	}
+SmfProvider* SmfMusicService::getProvider()
+	{
+	return m_baseProvider;
+	}
+//SmfMusicService end
+
+//SmfMusicSearch start
+SmfMusicSearch::SmfMusicSearch(SmfProvider *baseProvider)
+:m_baseProvider(baseProvider)
+	{
+	m_private = new SmfMusicSearchPrivate(this);
+	}
+SmfMusicSearch::~SmfMusicSearch()
+	{
+	
+	}
+void SmfMusicSearch::recommendations(SmfTrackInfo track, int pageNum, int perPage)
+	{
+	m_private->recommendations(track,pageNum,perPage);
+	}
+void SmfMusicSearch::tracks(SmfTrackInfo track, int pageNum, int perPage)
+	{
+	m_private->tracks(track,pageNum,perPage);
+	}
+void SmfMusicSearch::trackInfo(SmfMusicFingerPrint signature, int pageNum, int perPage)
+	{
+	m_private->trackInfo(signature,pageNum,perPage);
+	}
+void SmfMusicSearch::stores(SmfTrackInfo track, int pageNum, int perPage)
+	{
+	m_private->stores(track,pageNum,perPage);
+	}
+SmfProvider* SmfMusicSearch::getProvider()
+	{
+	return m_baseProvider;
+	}
+void SmfMusicSearch::postCurrentPlaying(SmfTrackInfo track)
+	{
+	m_private->postCurrentPlaying(track);
+	}
+void SmfMusicSearch::postRating(SmfTrackInfo track, SmfMusicRating rate)
+	{
+	m_private->postRating(track,rate);
+	}
+void SmfMusicSearch::postComments(SmfTrackInfo track, SmfComment comment)
+	{
+	m_private->postComments(track,comment);
+	}
+//SmfMusicSearch end
+
+//SmfPlaylistService start
+SmfPlaylistService::SmfPlaylistService(SmfProvider *baseProvider)
+: m_baseProvider(baseProvider)
+	{
+	m_private = new SmfPlaylistServicePrivate(this);
+	
+	}
+void SmfPlaylistService::playlists(int pageNum, int perPage)
+	{
+	m_private->playlists(pageNum,perPage);
+	}
+void SmfPlaylistService::playlistsOf(SmfMusicProfile *user, int pageNum, int perPage)
+	{
+	m_private->playlistsOf(user,pageNum,perPage);
+	}
+int SmfPlaylistService::addToPlaylist(SmfPlaylist plst, SmfTrackInfoList *tracks)
+	{
+	m_private->addToPlaylist(plst,tracks);
+	}
+int SmfPlaylistService::postCurrentPlayingPlaylist(SmfPlaylist plst)
+	{
+	m_private->postCurrentPlayingPlaylist(plst);
+	}
+SmfProvider* SmfPlaylistService::getProvider()
+	{
+	return m_baseProvider;
+	}
+SmfPlaylistService::~SmfPlaylistService()
+	{
+	
+	}
+//SmfPlaylistService end
+
+//SmfMusicEvents start
+SmfMusicEvents::SmfMusicEvents(SmfProvider *baseProvider)
+:m_baseProvider(baseProvider)
+	{
+	m_private = new SmfMusicEventsPrivate(this);
+	}
+void SmfMusicEvents::events(QContactGeoLocation location, int pageNum, int perPage)
+	{
+	m_private->events(location,pageNum,perPage);
+	}
+void SmfMusicEvents::events(SmfLocation venue, int pageNum, int perPage)
+	{
+	m_private->events(venue,pageNum,perPage);
+	}
+void SmfMusicEvents::venues(QContactGeoLocation location, int pageNum, int perPage)
+	{
+	m_private->venues(location,pageNum,perPage);
+	}
+void SmfMusicEvents::postEvents(SmfEventList events)
+	{
+	m_private->postEvents(events);
+	}
+SmfProvider* SmfMusicEvents::getProvider()
+	{
+	return m_baseProvider;
+	}
+SmfMusicEvents::~SmfMusicEvents()
+	{
+	
+	}
+
+//SmfMusicEvents end
+
+
+//SmfLyricsService start
+SmfLyricsService::SmfLyricsService(SmfProvider *baseProvider)
+:m_baseProvider(baseProvider)
+	{
+	m_private = new SmfLyricsServicePrivate(this);
+	}
+void SmfLyricsService::lyrics(SmfTrackInfo track, int pageNum, int perPage)
+	{
+	m_private->lyrics(track,pageNum,perPage);
+	}
+void SmfLyricsService::subtitles(SmfTrackInfo track, SmfSubtitleSearchFilter filter, int pageNum, int perPage)
+	{
+	m_private->subtitles(track,filter,pageNum,perPage);
+	}
+SmfProvider* SmfLyricsService::getProvider()
+	{
+	return m_baseProvider;
+	}
+
+SmfLyricsService::~SmfLyricsService()
+	{
+	}
+
+//SmfLyricsService end
+
+
--- a/smf/smfservermodule/smfclient/client/smfmusic.h	Mon Jun 07 11:43:45 2010 +0100
+++ b/smf/smfservermodule/smfclient/client/smfmusic.h	Wed Jun 23 19:51:49 2010 +0530
@@ -13,43 +13,43 @@
  * Manasij Roy, Nalina Hariharan
  *
  * Description:
- * The SmfEvent class represents an event
+ * Music related services
  *
  */
 
 #ifndef SMFMUSIC_H
-#define SMMUSIC_H
-
-#include <QObject>
+#define SMFMUSIC_H
 
 #include <qmobilityglobal.h>
 #include <qgeopositioninfo.h>
-
 #include "smfglobal.h"
 #include "smfprovider.h"
 #include "smfcontact.h"
 #include "smfevent.h"
+#include "smfmusicfingerprint.h"
+#include "smfmusicrating.h"
+#include "smfcomment.h"
+#include "smfsubtitle.h"
 
-class SmfProvider; //basic Smf service Provider info
-class SmfContact; // Smf contact
-class SmfMusicRating;//rating value from 0..31 - services would map accordingly
-class SmfMusicProfile; //user profile containing music usage and interest info, extends SmfContact
-class SmfTrackInfo; //id, title, album, artist, genre, tag, director,release year, rating, comment info
-class SmfMusicFingerPrint; //generation is not in scope of smf
-class SmfVenue;
-class SmfEvent;
-class SmfPlaylist;
-class SmfLyricsService;
-class SmfLyrics;
-class SmfSubtitle;
-class SmfSubtitleSearchFilter;
+#include "smfmusicprofile.h"
+#include "smfalbum.h"
+#include "smfartists.h"
+#include "smfgroup.h"
+#include "smflyrics.h"
+#include "smfplaylist.h"
+#include "smftrackinfo.h"
+#include "smflocation.h"
+class SmfMusicServicePrivate;
+class SmfMusicSearchPrivate;
+class SmfLyricsServicePrivate;
+class SmfPlaylistServicePrivate;
+class SmfMusicEventsPrivate;
+
+using namespace QtMobility;
 
 typedef QList<SmfMusicProfile> SmfMusicProfileList;
 typedef QList<SmfTrackInfo> SmfTrackInfoList;
-typedef QList<SmfEvent> SmfEventsList;
-typedef QList<SmfProvider> SmfProviderList;
 typedef QList<SmfPlaylist> SmfPlaylistList;
-typedef QList<SmfVenue> SmfVenueList;
 typedef QList<SmfLyrics> SmfLyricsList;
 typedef QList<SmfSubtitle> SmfSubtitleList;
 /**
@@ -65,16 +65,16 @@
    * Constructs SmfMusicService.
    * @param baseProvider The base provider info
    * Seeing as this is a plug-in implementation, these will realistically
-   *  be generated by SMF factory of some kind
+   *  be generated by SMF factory of some kind
    */
    SmfMusicService(SmfProvider* baseProvider = 0);
   ~SmfMusicService();
 
-public:
+public slots:
 
   /**
    * Gets self profile information asynchronously.
-   * userInfoAvailable() signal is emitted with SmfMusicProfile when the info is arrived
+   * userInfoAvailable() signal is emitted with SmfMusicProfile when the info is arrived
    */
   void userinfo() ;
 
@@ -84,9 +84,9 @@
    * When the list is big user can specify the page number and per page item data.
    * If not supplied by the user default values are used.
    * @param pageNum Page number to download, SMF_FIRST_PAGE denotes fresh query.
-   * @param perPage Item per page, default is SMF_ITEMS_PER_PAGE
+   * @param perPage Item per page, default is SMF_ITEMS_PER_PAGE
    */
-  void searchUser(SmfVenue venue,int pageNum=SMF_FIRST_PAGE,int perPage=SMF_ITEMS_PER_PAGE) ;
+  void searchUser(SmfLocation venue,int pageNum=SMF_FIRST_PAGE,int perPage=SMF_ITEMS_PER_PAGE) ;
 
   /**
    * Gets the base provider info
@@ -97,13 +97,18 @@
 signals:
 	/**
 	 * Notification on arrival of the self profile as result of userinfo().
-	 * @param profile The self profile
+	 * @param profile The self profile
 	 */
-	void userInfoAvailable(SmfMusicProfile* profile, QString error);
-
-	void searchInfoAvailable(SmfMusicProfileList& profileList, QString error,SmfResultPage resultPage);
+	void userInfoAvailable(SmfMusicProfile* profile, SmfError error);
+	/**
+	 * Notification on arrival of search info
+	 * @param profileList List of music profiles
+	 */
+	void searchInfoAvailable(SmfMusicProfileList& profileList, SmfError error,SmfResultPage resultPage);
 private:
   SmfProvider* m_baseProvider;
+  SmfMusicServicePrivate* m_private;
+  friend class SmfMusicServicePrivate;
 };
 SMF_SERVICE_NAME(SmfMusicService, "org.symbian.smf.client.music.service\0.2")
 
@@ -119,15 +124,13 @@
   /**
    * Constructs SmfMusicSearch with base provider as arguement.
    * Seeing as this is a plug-in implementation, these will realistically
-   * be generated by SMF factory of some kind
+   * be generated by SMF factory of some kind
    */
 
   SmfMusicSearch(SmfProvider* baseProvider = 0);
   ~SmfMusicSearch();
 
 public:
-  // Get the track listing - might be made asynchrnous later
-
   /**
    * Searches for music recommendations similar to a particulartrack asynchronously.
    * The signal trackSearchAvailable() is emitted with SmfTrackInfoList
@@ -136,7 +139,7 @@
    * If not supplied by the user default values are used.
    * @param track The track for which similar recommendations need to be fetched.
    * @param pageNum Page number to download, SMF_FIRST_PAGE denotes fresh query.
-   * @param perPage Item per page, default is SMF_ITEMS_PER_PAGE
+   * @param perPage Item per page, default is SMF_ITEMS_PER_PAGE
    */
   void recommendations(SmfTrackInfo track,int pageNum=SMF_FIRST_PAGE,int perPage=SMF_ITEMS_PER_PAGE)  ; // basic list of track objects
 
@@ -148,7 +151,7 @@
    * If not supplied by the user default values are used.
    * @param track The search criteria, similar tracks are searched
    * @param pageNum Page number to download, SMF_FIRST_PAGE denotes fresh query.
-   * @param perPage Item per page, default is SMF_ITEMS_PER_PAGE
+   * @param perPage Item per page, default is SMF_ITEMS_PER_PAGE
    */
   void tracks(SmfTrackInfo track,int pageNum=SMF_FIRST_PAGE,int perPage=SMF_ITEMS_PER_PAGE)  ; // basic list of track objects
 
@@ -158,7 +161,7 @@
    * once its arrived.
    * @param signature The search criteria,signature to be searched for
    * @param pageNum Page number to download, SMF_FIRST_PAGE denotes fresh query.
-   * @param perPage Item per page, default is SMF_ITEMS_PER_PAGE
+   * @param perPage Item per page, default is SMF_ITEMS_PER_PAGE
    */
   void trackInfo(SmfMusicFingerPrint signature,int pageNum=SMF_FIRST_PAGE,int perPage=SMF_ITEMS_PER_PAGE)  ; // search by fingerprint object
 
@@ -167,7 +170,7 @@
    * The signal storeSearchAvailable() is emitted with SmfProviderList once its arrived.
    * @param track The search criteria for stores
    * @param pageNum Page number to download, SMF_FIRST_PAGE denotes fresh query.
-   * @param perPage Item per page, default is SMF_ITEMS_PER_PAGE
+   * @param perPage Item per page, default is SMF_ITEMS_PER_PAGE
    */
   void stores(SmfTrackInfo track,int pageNum=SMF_FIRST_PAGE,int perPage=SMF_ITEMS_PER_PAGE)  ;
 
@@ -184,83 +187,38 @@
 	/**
 	 * Posts currently playing track.
 	 * Success can be checked by checking the signal postFinished()
-	 * @param track Track to post
+	 * @param track Track to post
 	 */
   void postCurrentPlaying(SmfTrackInfo track)  ;
-  //int postRating(SmfTrackInfo track, SmfMusicRating rate)  ;
-  //int postComments(SmfTrackInfo track, SmfComment comment)  ;
+  void postRating(SmfTrackInfo track, SmfMusicRating rate)  ;
+  void postComments(SmfTrackInfo track, SmfComment comment)  ;
 
 signals:
 	/**
 	 * Emitted when the search result for a track is available.
 	 * Note if number of tacks in the search is large, then it can download the list page by page.
 	 * In that case this signal is emitted multiple times.
-	 * @param resultPage Page number info
+	 * @param resultPage Page number info
 	 */
-	void trackSearchAvailable(SmfTrackInfoList* result, QString error,SmfResultPage resultPage);
+	void trackSearchAvailable(SmfTrackInfoList* result, SmfError error,SmfResultPage resultPage);
 
 	/**
 	 *  Emitted when the search result for a store is available.
 	 *  Note if number of tacks in the search is large, then it can download the list page by page.
 	 *  In that case this signal is emitted multiple times.
-	 *  @param resultPage Page number info
+	 *  @param resultPage Page number info
 	 */
-	void storeSearchAvailable(SmfProviderList* result, QString error, SmfResultPage resultPage);
+	void storeSearchAvailable(SmfProviderList* result, SmfError error, SmfResultPage resultPage);
+	void postfinished(SmfError error);
 private:
   SmfProvider* m_baseProvider;
+  SmfMusicSearchPrivate* m_private;
+  friend class SmfMusicSearchPrivate;
 };
 SMF_SERVICE_NAME(SmfMusicSearch, "org.symbian.smf.client.music.search\0.2")
 
 
 /**
- * Remote playlist
- */
-class SMFCLIENT_EXPORT SmfPlaylist : public QObject
-	{
-	Q_OBJECT
-
-public:
-	SmfPlaylist();
-	~SmfPlaylist();
-
-	/**
-	 * Gets tracks in the playlist
-	 */
-	SmfTrackInfoList* getTrackList();
-
-	/**
-	 * Gets playlist title
-	 */
-	QString getPlayListTitle();
-
-	/**
-	 * Gets the creation date
-	 */
-	QDateTime getCreationDate();
-
-	/**
-	 * Sets tracks in the playlist
-	 */
-	void setTrackList(SmfTrackInfoList* trackList);
-
-	/**
-	 * Sets playlist title
-	 */
-	void setPlayListTitle(QString title);
-
-	/**
-	 * Sets creation date
-	 */
-	void setCreationDate(QDateTime time);
-
-private:
-	SmfTrackInfoList* m_trackList;
-	QString m_title;
-	QDateTime m_creationDate;
-	};
-
-
-/**
  * provides service ("org.symbian.smf.client.music.playlist")
  *
  * Interface to a remote playlist service. This class
@@ -283,7 +241,7 @@
   /**
    * Constructs SmfPlaylistService with base provider info
    * Seeing as this is a plug-in implementation, these will realistically
-   * be generated by SMF factory of some kind
+   * be generated by SMF factory of some kind
    */
   SmfPlaylistService(SmfProvider* baseProvider = 0);
   ~SmfPlaylistService();
@@ -297,7 +255,7 @@
    * When the list is big user can specify the page number and per page item data.
    * If not supplied by the user default values are used.
    * @param pageNum Page number to download, SMF_FIRST_PAGE denotes fresh query.
-   * @param perPage Item per page, default is SMF_ITEMS_PER_PAGE
+   * @param perPage Item per page, default is SMF_ITEMS_PER_PAGE
    */
   void playlists(int pageNum=SMF_FIRST_PAGE,int perPage=SMF_ITEMS_PER_PAGE)  ; // basic list of playlist objects
 
@@ -327,7 +285,7 @@
 	 * Upload currently playing track to a playlist. Signal
 	 * playlistUpdated() can be checked for success value
 	 * @param plst The playlist to be added in
-	 * @param tracks The list of tracks to uploaded
+	 * @param tracks The list of tracks to uploaded
 	 */
   int addToPlaylist(SmfPlaylist plst, SmfTrackInfoList* tracks)  ;
 
@@ -344,15 +302,17 @@
 	 * Notification of availability of list of playlists requested.
 	 * Note if number of list is large, then it can download the list page by page.
 	 * In that case this signal is emitted multiple times.
-	 * @param resultPage Page number info
+	 * @param resultPage Page number info
 	 */
-	void playlistsListAvailable(SmfPlaylistList*, QString error, SmfResultPage resultPage);
+	void playlistsListAvailable(SmfPlaylistList*, SmfError error, SmfResultPage resultPage);
 	/**
-	 * Signals remote updation of playlist with success value
+	 * Signals remote updation of playlist with success value
 	 */
-    int playlistUpdated(bool success) ;
+    void playlistUpdated(SmfError success) ;
 private:
   SmfProvider* m_baseProvider;
+  SmfPlaylistServicePrivate* m_private;
+  friend class SmfPlaylistServicePrivate;
 };
 SMF_SERVICE_NAME(SmfPlaylistService, "org.symbian.smf.client.music.playlist\0.2")
 
@@ -368,7 +328,7 @@
   /**
    * Constructs SmfMusicEvents with base provider info
    * Seeing as this is a plug-in implementation, these will realistically
-   *  be generated by SMF factory of some kind
+   *  be generated by SMF factory of some kind
    */
   SmfMusicEvents(SmfProvider* baseProvider = 0);
   ~SmfMusicEvents();
@@ -381,19 +341,19 @@
    * When the list is big user can specify the page number and per page item data.
    * If not supplied by the user default values are used.
    * @param pageNum Page number to download, SMF_FIRST_PAGE denotes fresh query.
-   * @param perPage Item per page, default is SMF_ITEMS_PER_PAGE
+   * @param perPage Item per page, default is SMF_ITEMS_PER_PAGE
    */
-  void events(QtMobility::QContactGeolocation location,int pageNum=SMF_FIRST_PAGE,int perPage=SMF_ITEMS_PER_PAGE)  ;
+  void events(QContactGeoLocation location,int pageNum=SMF_FIRST_PAGE,int perPage=SMF_ITEMS_PER_PAGE)  ;
 
   /**
    * Gets list of venues of a particular location asynchronously.
-   * venuesAvailable() signal is emitted with SmfVenueList once its arrived.
+   * venuesAvailable() signal is emitted with SmfLocationList once its arrived.
    * When the list is big user can specify the page number and per page item data.
    * If not supplied by the user default values are used.
    * @param pageNum Page number to download, SMF_FIRST_PAGE denotes fresh query.
-   * @param perPage Item per page, default is SMF_ITEMS_PER_PAGE
+   * @param perPage Item per page, default is SMF_ITEMS_PER_PAGE
    */
-  void venues(QtMobility::QContactGeolocation location,int pageNum=SMF_FIRST_PAGE,int perPage=SMF_ITEMS_PER_PAGE)  ; // basic list of venue objects
+  void venues(QContactGeoLocation location,int pageNum=SMF_FIRST_PAGE,int perPage=SMF_ITEMS_PER_PAGE)  ; // basic list of venue objects
 
   /**
    * Gets list of events in a particular venue asynchronously.
@@ -403,7 +363,7 @@
    * @param pageNum Page number to download, SMF_FIRST_PAGE denotes fresh query.
    * @param perPage Item per page, default is SMF_ITEMS_PER_PAGE
    */
-  void events(SmfVenue venue,int pageNum=SMF_FIRST_PAGE,int perPage=SMF_ITEMS_PER_PAGE)  ; // basic list of events objects
+  void events(SmfLocation venue,int pageNum=SMF_FIRST_PAGE,int perPage=SMF_ITEMS_PER_PAGE)  ; // basic list of events objects
 
 
   //APIs to get/set base provider info (SmfProvider)
@@ -419,34 +379,36 @@
 	/**
 	 * Updates events. Might not be supported by all service provider.
 	 * eventsUpdated() signal can be checked for success value.
-	 * @param SmfEventsList List of events to be posted
+	 * @param SmfEventsList List of events to be posted
 	 */
-	 void postEvents(SmfEventsList events);
+	 void postEvents(SmfEventList events);
 
 signals:
 
 	/**
-	 * Notification of the success of request to post an event
+	 * Notification of the success of request to post an event
 	 */
-	void eventsUpdated(bool success);
+	void eventsUpdated(SmfError success);
 
 	/**
 	 * Notification on arrival of event lists
 	 * Note if number of list is large, then it can download the list page by page.
 	 * In that case this signal is emitted multiple times.
-	 * @param resultPage Page number info
+	 * @param resultPage Page number info
 	 */
-	void eventsAvailable(SmfEventsList* list, QString error, SmfResultPage resultPage);
+	void eventsAvailable(SmfEventList* list, SmfError error, SmfResultPage resultPage);
 
 	/**
 	 *  Notification on arrival of venues lists
 	 * Note if number of list is large, then it can download the list page by page.
 	 * In that case this signal is emitted multiple times.
-	 * @param resultPage Page number info
+	 * @param resultPage Page number info
 	 */
-	void venuesAvailable(SmfVenueList* list, QString error, SmfResultPage resultPage);
+	void venuesAvailable(SmfLocationList* list, SmfError error, SmfResultPage resultPage);
 private:
   SmfProvider* m_baseProvider;
+  SmfMusicEventsPrivate* m_private;
+  friend class SmfMusicEventsPrivate;
 };
 SMF_SERVICE_NAME(SmfMusicEvents, "org.symbian.smf.client.music.events\0.2")
 
@@ -462,7 +424,7 @@
   /**
    * Constructs SmfLyricsService with base provider info.
    * Seeing as this is a plug-in implementation, these will realistically
-   * be generated by SMF factory of some kind
+   * be generated by SMF factory of some kind
    */
 
   SmfLyricsService(SmfProvider* baseProvider = 0);
@@ -475,7 +437,7 @@
    * lyricsAvailable() notification comes SmfLyricsList with when the data is available
    * @param track Track for which lyrics needs to be fetched.
    * @param pageNum Page number to download, SMF_FIRST_PAGE denotes fresh query.
-   * @param perPage Item per page, default is SMF_ITEMS_PER_PAGE
+   * @param perPage Item per page, default is SMF_ITEMS_PER_PAGE
    */
   void lyrics(SmfTrackInfo track,int pageNum=SMF_FIRST_PAGE,int perPage=SMF_ITEMS_PER_PAGE)  ;
 
@@ -495,30 +457,27 @@
    * Gets the base provider info
    */
   SmfProvider* getProvider()  ;
-
-
-public slots:
-
-
 signals:
 
 	/**
 	 * Notification on arrival of lyrics
 	 * Note if the list is large, then it can download the list page by page.
 	 * In that case this signal is emitted multiple times.
-	 * @param resultPage Page number info
+	 * @param resultPage Page number info
 	 */
-	void lyricsAvailable(SmfLyricsList* list, QString error, SmfResultPage resultPage);
+	void lyricsAvailable(SmfLyricsList* list, SmfError error, SmfResultPage resultPage);
 
 	/**
 	 * Notification on arrival of subtitle based on filter.
 	 * Note if the list is large, then it can download the list page by page.
 	 * In that case this signal is emitted multiple times.
-	 * @param resultPage Page number info
+	 * @param resultPage Page number info
 	 */
-	void subtitleAvailable(SmfSubtitleList* list, QString error, SmfResultPage resultPage);
+	void subtitleAvailable(SmfSubtitleList* list, SmfError error, SmfResultPage resultPage);
 private:
   SmfProvider* m_baseProvider;
+  SmfLyricsServicePrivate* m_private;
+  friend class SmfLyricsServicePrivate;
 };
 SMF_SERVICE_NAME(SmfLyricsService, "org.symbian.smf.client.music.lyrics\0.2")
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/smf/smfservermodule/smfclient/client/smfmusic_p.cpp	Wed Jun 23 19:51:49 2010 +0530
@@ -0,0 +1,791 @@
+/**
+ * Copyright (c) 2010 Sasken Communication Technologies Ltd.
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of the "Eclipse Public License v1.0" 
+ * which accompanies  this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html"
+ *
+ * Initial Contributors:
+ * Chandradeep Gandhi, Sasken Communication Technologies Ltd - Initial contribution
+ *
+ * Contributors:
+ * Manasij Roy, Nalina Hariharan
+ * 
+ * Description:
+ * 
+ */
+#include "smfmusic_p.h"
+
+
+SmfMusicServicePrivate::SmfMusicServicePrivate(SmfMusicService* aMusicService)
+:m_musicService(aMusicService)
+	{
+	//private impl for symbian
+	#ifdef Q_OS_SYMBIAN
+	m_SmfClientPrivate = CSmfClientSymbian::NewL(this);
+	#else
+	//TODO:- Use private impl for other platforms or else Qt impl
+	#endif
+	}
+
+void SmfMusicServicePrivate::searchUser(SmfLocation venue, int pageNum, int perPage)
+	{
+	  //We need to pass Opcode and SmfProvider serialized into bytearray 
+	  m_baseProvider = m_musicService->getProvider();
+	  QDataStream write(&m_serializedDataToServer,QIODevice::WriteOnly);
+	  write<<*(m_baseProvider);
+	  m_pageInfoFlag = 1;
+	  write<<m_pageInfoFlag;
+	  write<<pageNum;
+	  write<<perPage;
+	  m_xtraInfoSerialized.clear();
+	  QDataStream Xtrawrite(&m_xtraInfoSerialized,QIODevice::WriteOnly);
+	  //TODO:- provide serialization/deserialization of SmfLocation
+	  Xtrawrite<<venue;
+	  m_xtraInfoFlag = m_xtraInfoSerialized.size();
+	  write<<m_xtraInfoFlag;
+
+	  QString intfName(musicServiceInterface);
+	  int maxalloc = SmfMusicProfileMaxSize*perPage;
+	  //call private impl's send method
+	  m_SmfClientPrivate->sendRequest(m_serializedDataToServer,intfName,SmfMusicSearchUser,maxalloc,m_xtraInfoSerialized);
+	}
+void SmfMusicServicePrivate::userinfo()
+	{
+	  //We need to pass Opcode and SmfProvider serialized into bytearray 
+	  m_baseProvider = m_musicService->getProvider();
+	  QDataStream write(&m_serializedDataToServer,QIODevice::WriteOnly);
+	  write<<*(m_baseProvider);
+	  m_pageInfoFlag = 0;
+	  m_xtraInfoSerialized.clear();
+	  m_xtraInfoFlag = 0;
+	  write<<m_xtraInfoFlag;
+
+	  QString intfName(musicServiceInterface);
+	  int maxalloc = 1000;
+	  //call private impl's send method
+	  m_SmfClientPrivate->sendRequest(m_serializedDataToServer,intfName,SmfMusicGetUserInfo,maxalloc,m_xtraInfoSerialized);
+	}
+void SmfMusicServicePrivate::resultsAvailable(QByteArray result, SmfRequestTypeID opcode, SmfError error)
+	{
+	//note:- "result" is serialized and we need to de-serialize it as per opcode
+	//Order of serialization Error value followed by data
+	
+	QDataStream reader(&result,QIODevice::ReadOnly);
+	
+	//Now de-serialize it based on opcode
+	switch(opcode)
+		{
+		case SmfMusicGetUserInfo:
+				{
+					if(m_profile)
+						{
+						delete m_profile;
+						m_profile = NULL;
+						}
+		
+					m_profile = new SmfMusicProfile;
+					//TODO:- serialization/deserialization of SmfMusicProfile
+					reader>>*(m_profile);
+					//not incorporating paging now
+					SmfResultPage page;
+		
+					emit m_musicService->userInfoAvailable(m_profile,error);
+				
+				}
+				break;
+		case SmfMusicSearchUser:
+				{
+					m_profileList.clear();
+					//TODO:- serialization/deserialization of SmfMusicProfile
+					reader>>m_profileList;
+					//not incorporating paging now
+					SmfResultPage page;
+		
+					emit m_musicService->searchInfoAvailable(m_profileList,error,page);
+				
+				}
+				break;
+		}
+	}
+
+SmfMusicServicePrivate::~SmfMusicServicePrivate()
+	{
+		if(m_SmfClientPrivate)
+		{
+			delete m_SmfClientPrivate;
+			m_SmfClientPrivate = NULL;
+		}
+	}
+
+SmfMusicSearchPrivate::SmfMusicSearchPrivate(SmfMusicSearch *aMusicSearch)
+: m_musicSearch(aMusicSearch)
+	{
+		//private impl for symbian
+		#ifdef Q_OS_SYMBIAN
+		m_SmfClientPrivate = CSmfClientSymbian::NewL(this);
+		#else
+		//TODO:- Use private impl for other platforms or else Qt impl
+		#endif
+	}
+
+SmfMusicSearchPrivate::~SmfMusicSearchPrivate()
+	{
+		if(m_SmfClientPrivate)
+		{
+			delete m_SmfClientPrivate;
+			m_SmfClientPrivate = NULL;
+		}
+	}
+
+void SmfMusicSearchPrivate::stores(SmfTrackInfo track, int pageNum, int perPage)
+	{
+	  //We need to pass Opcode and SmfProvider serialized into bytearray 
+	  m_baseProvider = m_musicSearch->getProvider();
+	  QDataStream write(&m_serializedDataToServer,QIODevice::WriteOnly);
+	  write<<*(m_baseProvider);
+	  m_pageInfoFlag = 1;
+	  write<<m_pageInfoFlag;
+	  write<<pageNum;
+	  write<<perPage;
+	  m_xtraInfoSerialized.clear();
+	  QDataStream Xtrawrite(&m_xtraInfoSerialized,QIODevice::WriteOnly);
+	  //TODO:- provide serialization/deserialization of SmfTrackInfo
+	  Xtrawrite<<track;
+	  m_xtraInfoFlag = m_xtraInfoSerialized.size();
+	  write<<m_xtraInfoFlag;
+
+	  QString intfName(musicSearchInterface);
+	  /** @TODO:-revisit all the maxalloc */
+	  int maxalloc = 1000;
+	  //call private impl's send method
+	  m_SmfClientPrivate->sendRequest(m_serializedDataToServer,intfName,SmfMusicGetStores,maxalloc,m_xtraInfoSerialized);
+	}
+void SmfMusicSearchPrivate::recommendations(SmfTrackInfo track, int pageNum, int perPage)
+	{
+	  //We need to pass Opcode and SmfProvider serialized into bytearray 
+	  m_baseProvider = m_musicSearch->getProvider();
+	  QDataStream write(&m_serializedDataToServer,QIODevice::WriteOnly);
+	  write<<*(m_baseProvider);
+	  m_pageInfoFlag = 1;
+	  write<<m_pageInfoFlag;
+	  write<<pageNum;
+	  write<<perPage;
+	  m_xtraInfoSerialized.clear();
+	  QDataStream Xtrawrite(&m_xtraInfoSerialized,QIODevice::WriteOnly);
+	  //TODO:- provide serialization/deserialization of SmfTrackInfo
+	  Xtrawrite<<track;
+	  m_xtraInfoFlag = m_xtraInfoSerialized.size();
+	  write<<m_xtraInfoFlag;
+
+	  QString intfName(musicSearchInterface);
+	  //TODO:-revisit all the maxalloc
+	  int maxalloc = 1000;
+	  //call private impl's send method
+	  m_SmfClientPrivate->sendRequest(m_serializedDataToServer,intfName,SmfMusicGetRecommendations,maxalloc,m_xtraInfoSerialized);
+	}
+
+void SmfMusicSearchPrivate::tracks(SmfTrackInfo track, int pageNum, int perPage)
+	{
+	  //We need to pass Opcode and SmfProvider serialized into bytearray 
+	  m_baseProvider = m_musicSearch->getProvider();
+	  QDataStream write(&m_serializedDataToServer,QIODevice::WriteOnly);
+	  write<<*(m_baseProvider);
+	  m_pageInfoFlag = 1;
+	  write<<m_pageInfoFlag;
+	  write<<pageNum;
+	  write<<perPage;
+	  m_xtraInfoSerialized.clear();
+	  QDataStream Xtrawrite(&m_xtraInfoSerialized,QIODevice::WriteOnly);
+	  //TODO:- provide serialization/deserialization of SmfTrackInfo
+	  Xtrawrite<<track;
+	  m_xtraInfoFlag = m_xtraInfoSerialized.size();
+	  write<<m_xtraInfoFlag;
+
+	  QString intfName(musicSearchInterface);
+	  //TODO:-revisit all the maxalloc
+	  int maxalloc = 1000;
+	  //call private impl's send method
+	  m_SmfClientPrivate->sendRequest(m_serializedDataToServer,intfName,SmfMusicGetTracks,maxalloc,m_xtraInfoSerialized);
+	}
+
+void SmfMusicSearchPrivate::trackInfo(SmfMusicFingerPrint signature, int pageNum, int perPage)
+	{
+	  //We need to pass Opcode and SmfProvider serialized into bytearray 
+	  m_baseProvider = m_musicSearch->getProvider();
+	  QDataStream write(&m_serializedDataToServer,QIODevice::WriteOnly);
+	  write<<*(m_baseProvider);
+	  m_pageInfoFlag = 1;
+	  write<<m_pageInfoFlag;
+	  write<<pageNum;
+	  write<<perPage;
+	  m_xtraInfoSerialized.clear();
+	  QDataStream Xtrawrite(&m_xtraInfoSerialized,QIODevice::WriteOnly);
+	  //TODO:- provide serialization/deserialization of SmfTrackInfo
+	  Xtrawrite<<signature;
+	  m_xtraInfoFlag = m_xtraInfoSerialized.size();
+	  write<<m_xtraInfoFlag;
+
+	  QString intfName(musicSearchInterface);
+	  //TODO:-revisit all the maxalloc
+	  int maxalloc = 1000;
+	  //call private impl's send method
+	  m_SmfClientPrivate->sendRequest(m_serializedDataToServer,intfName,SmfMusicGetTrackInfo,maxalloc,m_xtraInfoSerialized);
+	}
+void SmfMusicSearchPrivate::postCurrentPlaying(SmfTrackInfo track) 
+	{
+	  //We need to pass Opcode and SmfProvider serialized into bytearray 
+	  m_baseProvider = m_musicSearch->getProvider();
+	  QDataStream write(&m_serializedDataToServer,QIODevice::WriteOnly);
+	  write<<*(m_baseProvider);
+	  m_pageInfoFlag = 0;
+	  write<<m_pageInfoFlag;
+
+	  m_xtraInfoSerialized.clear();
+	  QDataStream Xtrawrite(&m_xtraInfoSerialized,QIODevice::WriteOnly);
+	  //TODO:- provide serialization/deserialization of SmfTrackInfo
+	  Xtrawrite<<track;
+	  m_xtraInfoFlag = m_xtraInfoSerialized.size();
+	  write<<m_xtraInfoFlag;
+
+	  QString intfName(musicSearchInterface);
+	  //TODO:-revisit all the maxalloc
+	  int maxalloc = 1000;
+	  //call private impl's send method
+	  m_SmfClientPrivate->sendRequest(m_serializedDataToServer,intfName,SmfMusicPostCurrentPlaying,maxalloc,m_xtraInfoSerialized);
+	}
+void SmfMusicSearchPrivate::postRating(SmfTrackInfo track, SmfMusicRating rate) 
+	{
+	  //We need to pass Opcode and SmfProvider serialized into bytearray 
+	  m_baseProvider = m_musicSearch->getProvider();
+	  QDataStream write(&m_serializedDataToServer,QIODevice::WriteOnly);
+	  write<<*(m_baseProvider);
+	  m_pageInfoFlag = 0;
+	  write<<m_pageInfoFlag;
+
+	  m_xtraInfoSerialized.clear();
+	  QDataStream Xtrawrite(&m_xtraInfoSerialized,QIODevice::WriteOnly);
+	  //TODO:- provide serialization/deserialization of SmfTrackInfo
+	  Xtrawrite<<track;
+	  Xtrawrite<<rate;
+	  m_xtraInfoFlag = m_xtraInfoSerialized.size();
+	  write<<m_xtraInfoFlag;
+
+	  QString intfName(musicSearchInterface);
+	  //TODO:-revisit all the maxalloc
+	  int maxalloc = 1000;
+	  //call private impl's send method
+	  m_SmfClientPrivate->sendRequest(m_serializedDataToServer,intfName,SmfMusicPostRating,maxalloc,m_xtraInfoSerialized);
+	}
+void SmfMusicSearchPrivate::postComments(SmfTrackInfo track, SmfComment comment) 
+	{
+	  //We need to pass Opcode and SmfProvider serialized into bytearray 
+	  m_baseProvider = m_musicSearch->getProvider();
+	  QDataStream write(&m_serializedDataToServer,QIODevice::WriteOnly);
+	  write<<*(m_baseProvider);
+	  m_pageInfoFlag = 0;
+	  write<<m_pageInfoFlag;
+
+	  m_xtraInfoSerialized.clear();
+	  QDataStream Xtrawrite(&m_xtraInfoSerialized,QIODevice::WriteOnly);
+	  //TODO:- provide serialization/deserialization of SmfTrackInfo
+	  Xtrawrite<<track;
+	  Xtrawrite<<comment;
+	  m_xtraInfoFlag = m_xtraInfoSerialized.size();
+	  write<<m_xtraInfoFlag;
+
+	  QString intfName(musicSearchInterface);
+	  //TODO:-revisit all the maxalloc
+	  int maxalloc = 1000;
+	  //call private impl's send method
+	  m_SmfClientPrivate->sendRequest(m_serializedDataToServer,intfName,SmfMusicPostComment,maxalloc,m_xtraInfoSerialized);
+	}
+void SmfMusicSearchPrivate::resultsAvailable(QByteArray result, SmfRequestTypeID opcode, SmfError error)
+	{
+	//note:- "result" is serialized and we need to de-serialize it as per opcode
+	//Order of serialization Error value followed by data
+	
+	QDataStream reader(&result,QIODevice::ReadOnly);
+	
+	//Now de-serialize it based on opcode
+	switch(opcode)
+		{
+		case SmfMusicGetStores:
+				{
+					if(m_providers)
+						{
+						delete m_providers;
+						m_providers = NULL;
+						}
+		
+					m_providers = new SmfProviderList;
+					//TODO:- serialization/deserialization of SmfMusicProfile
+					reader>>*(m_providers);
+					//not incorporating paging now
+					SmfResultPage page;
+		
+					emit m_musicSearch->storeSearchAvailable(m_providers,error,page);
+				
+				}
+				break;
+		case SmfMusicGetRecommendations:
+		case SmfMusicGetTracks:
+		case SmfMusicGetTrackInfo:
+				{
+
+				if(m_trackInfoList)
+					{
+					delete m_trackInfoList;
+					m_trackInfoList = NULL;
+					}
+	
+				m_trackInfoList = new SmfTrackInfoList;
+				//TODO:- serialization/deserialization of SmfMusicProfile
+				reader>>*(m_trackInfoList);
+				//not incorporating paging now
+				SmfResultPage page;
+	
+				emit m_musicSearch->trackSearchAvailable(m_trackInfoList,error,page);
+			
+				//trackSearchAvailable(SmfTrackInfoList* result
+				}
+				break;
+		case SmfMusicPostCurrentPlaying:
+		case SmfMusicPostRating:
+		case SmfMusicPostComment:
+			{
+			emit m_musicSearch->postfinished(error);
+			}
+			break;
+		}
+	}
+
+SmfPlaylistServicePrivate::SmfPlaylistServicePrivate(SmfPlaylistService *aPlayLstSrvc)
+: m_playlstSrvc(aPlayLstSrvc)
+	{
+	//private impl for symbian
+	#ifdef Q_OS_SYMBIAN
+	m_SmfClientPrivate = CSmfClientSymbian::NewL(this);
+	#else
+	//TODO:- Use private impl for other platforms or else Qt impl
+	#endif
+	}
+SmfPlaylistServicePrivate::~SmfPlaylistServicePrivate()
+	{
+	
+	}
+int SmfPlaylistServicePrivate::postCurrentPlayingPlaylist(SmfPlaylist plst)
+	{
+	  //We need to pass Opcode and SmfProvider serialized into bytearray 
+	  m_baseProvider = m_playlstSrvc->getProvider();
+	  QDataStream write(&m_serializedDataToServer,QIODevice::WriteOnly);
+	  write<<*(m_baseProvider);
+	  m_pageInfoFlag = 0;
+	  write<<m_pageInfoFlag;
+	  m_xtraInfoSerialized.clear();
+	  QDataStream Xtrawrite(&m_xtraInfoSerialized,QIODevice::WriteOnly);
+	  //TODO:- provide serialization/deserialization of SmfTrackInfo
+	  Xtrawrite<<plst;
+	  m_xtraInfoFlag = m_xtraInfoSerialized.size();
+	  write<<m_xtraInfoFlag;
+
+	  QString intfName(playlistServiceInterface);
+	  //TODO:-revisit all the maxalloc
+	  int maxalloc = 1000;
+	  //call private impl's send method
+	  m_SmfClientPrivate->sendRequest(m_serializedDataToServer,intfName,SmfMusicPostCurrentPlayingPlaylist,maxalloc,m_xtraInfoSerialized);
+	}
+
+void SmfPlaylistServicePrivate::playlistsOf(SmfMusicProfile *user, int pageNum, int perPage)
+	{
+	  //We need to pass Opcode and SmfProvider serialized into bytearray 
+	  m_baseProvider = m_playlstSrvc->getProvider();
+	  QDataStream write(&m_serializedDataToServer,QIODevice::WriteOnly);
+	  write<<*(m_baseProvider);
+	  m_pageInfoFlag = 1;
+	  write<<m_pageInfoFlag;
+	  write<<pageNum;
+	  write<<perPage;
+	  m_xtraInfoSerialized.clear();
+	  QDataStream Xtrawrite(&m_xtraInfoSerialized,QIODevice::WriteOnly);
+	  //TODO:- provide serialization/deserialization of SmfTrackInfo
+	  Xtrawrite<<*(user);
+	  m_xtraInfoFlag = m_xtraInfoSerialized.size();
+	  write<<m_xtraInfoFlag;
+
+	  QString intfName(playlistServiceInterface);
+	  //TODO:-revisit all the maxalloc
+	  int maxalloc = 1000;
+	  //call private impl's send method
+	  m_SmfClientPrivate->sendRequest(m_serializedDataToServer,intfName,SmfMusicGetPlaylistsOfUser,maxalloc,m_xtraInfoSerialized);
+	}
+
+
+void SmfPlaylistServicePrivate::playlists(int pageNum, int perPage)
+	{
+	  //We need to pass Opcode and SmfProvider serialized into bytearray 
+	  m_baseProvider = m_playlstSrvc->getProvider();
+	  QDataStream write(&m_serializedDataToServer,QIODevice::WriteOnly);
+	  write<<*(m_baseProvider);
+	  m_pageInfoFlag = 1;
+	  write<<m_pageInfoFlag;
+	  write<<pageNum;
+	  write<<perPage;
+	  m_xtraInfoSerialized.clear();
+	  m_xtraInfoFlag = 0;
+	  write<<m_xtraInfoFlag;
+
+	  QString intfName(playlistServiceInterface);
+	  //TODO:-revisit all the maxalloc
+	  int maxalloc = 1000;
+	  //call private impl's send method
+	  m_SmfClientPrivate->sendRequest(m_serializedDataToServer,intfName,SmfMusicGetPlaylists,maxalloc);
+	}
+
+
+
+int SmfPlaylistServicePrivate::addToPlaylist(SmfPlaylist plst, SmfTrackInfoList *tracks)
+	{
+	  //We need to pass Opcode and SmfProvider serialized into bytearray 
+	  m_baseProvider = m_playlstSrvc->getProvider();
+	  QDataStream write(&m_serializedDataToServer,QIODevice::WriteOnly);
+	  write<<*(m_baseProvider);
+	  m_pageInfoFlag = 0;
+	  write<<m_pageInfoFlag;
+
+	  m_xtraInfoSerialized.clear();
+	  QDataStream Xtrawrite(&m_xtraInfoSerialized,QIODevice::WriteOnly);
+	  //TODO:- provide serialization/deserialization of SmfTrackInfo
+	  Xtrawrite<<plst;
+	  Xtrawrite<<*(tracks);
+	  m_xtraInfoFlag = m_xtraInfoSerialized.size();
+	  write<<m_xtraInfoFlag;
+
+	  QString intfName(playlistServiceInterface);
+	  //TODO:-revisit all the maxalloc
+	  int maxalloc = 1000;
+	  //call private impl's send method
+	  m_SmfClientPrivate->sendRequest(m_serializedDataToServer,intfName,SmfMusicAddToPlaylist,maxalloc,m_xtraInfoSerialized);
+	}
+void SmfPlaylistServicePrivate::resultsAvailable(QByteArray result, SmfRequestTypeID opcode, SmfError error)
+	{
+	//note:- "result" is serialized and we need to de-serialize it as per opcode
+	//Order of serialization Error value followed by data
+	
+	QDataStream reader(&result,QIODevice::ReadOnly);
+	
+	//Now de-serialize it based on opcode
+	switch(opcode)
+		{
+		case SmfMusicPostCurrentPlayingPlaylist:
+		case SmfMusicAddToPlaylist:
+				{
+				emit m_playlstSrvc->playlistUpdated(error);				
+				}
+				break;
+		case SmfMusicGetPlaylistsOfUser:
+		case SmfMusicGetPlaylists:
+			{
+			if(m_playlistList)
+				{
+				delete m_playlistList;
+				m_playlistList = NULL;
+				}
+
+			m_playlistList = new SmfPlaylistList;
+			//TODO:- serialization/deserialization
+			reader>>*(m_playlistList);
+			SmfResultPage page;
+			emit m_playlstSrvc->playlistsListAvailable(m_playlistList,error,page);
+			}
+			break;
+		default:
+			Q_ASSERT_X(1,"SmfPlaylistServicePrivate::resultsAvailable","default");
+		}
+	}
+
+SmfMusicEventsPrivate::SmfMusicEventsPrivate(SmfMusicEvents *aMusicEvent)
+:m_musicEvent(aMusicEvent)
+	{
+	//private impl for symbian
+	#ifdef Q_OS_SYMBIAN
+	m_SmfClientPrivate = CSmfClientSymbian::NewL(this);
+	#else
+	//TODO:- Use private impl for other platforms or else Qt impl
+	#endif
+	}
+
+SmfMusicEventsPrivate::~SmfMusicEventsPrivate()
+	{
+	
+	}
+
+void SmfMusicEventsPrivate::events(SmfLocation venue, int pageNum, int perPage)
+	{
+	  //We need to pass Opcode and SmfProvider serialized into bytearray 
+	  m_baseProvider = m_musicEvent->getProvider();
+	  QDataStream write(&m_serializedDataToServer,QIODevice::WriteOnly);
+	  write<<*(m_baseProvider);
+	  m_pageInfoFlag = 1;
+	  write<<m_pageInfoFlag;
+	  write<<pageNum;
+	  write<<perPage;
+	  m_xtraInfoSerialized.clear();
+	  QDataStream Xtrawrite(&m_xtraInfoSerialized,QIODevice::WriteOnly);
+	  //TODO:- provide serialization/deserialization of SmfTrackInfo
+	  Xtrawrite<<venue;
+	  m_xtraInfoFlag = m_xtraInfoSerialized.size();
+	  write<<m_xtraInfoFlag;
+
+	  QString intfName(musicEventServiceInterface);
+	  //TODO:-revisit all the maxalloc
+	  int maxalloc = 1000;
+	  //call private impl's send method
+	  m_SmfClientPrivate->sendRequest(m_serializedDataToServer,intfName,SmfMusicGetEventsOnVenue,maxalloc,m_xtraInfoSerialized);
+	}
+
+void SmfMusicEventsPrivate::events(QContactGeoLocation location, int pageNum, int perPage)
+{
+	  //We need to pass Opcode and SmfProvider serialized into bytearray 
+	  m_baseProvider = m_musicEvent->getProvider();
+	  QDataStream write(&m_serializedDataToServer,QIODevice::WriteOnly);
+	  write<<*(m_baseProvider);
+	  m_pageInfoFlag = 1;
+	  write<<m_pageInfoFlag;
+	  write<<pageNum;
+	  write<<perPage;
+	  m_xtraInfoSerialized.clear();
+	  QDataStream Xtrawrite(&m_xtraInfoSerialized,QIODevice::WriteOnly);
+	  //TODO:- provide serialization/deserialization of SmfTrackInfo
+	  QString latLong;
+	  latLong += QString::number(location.latitude());
+	  latLong += ",";
+	  latLong += QString::number(location.longitude());
+	  Xtrawrite<<latLong;
+	  m_xtraInfoFlag = m_xtraInfoSerialized.size();
+	  write<<m_xtraInfoFlag;
+
+	  QString intfName(musicEventServiceInterface);
+	  //TODO:-revisit all the maxalloc
+	  int maxalloc = 1000;
+	  //call private impl's send method
+	  m_SmfClientPrivate->sendRequest(m_serializedDataToServer,intfName,SmfMusicGetEventsOnLoc,maxalloc,m_xtraInfoSerialized);
+	}
+
+
+
+void SmfMusicEventsPrivate::venues(QContactGeoLocation location, int pageNum, int perPage)
+{
+	  //We need to pass Opcode and SmfProvider serialized into bytearray 
+	  m_baseProvider = m_musicEvent->getProvider();
+	  QDataStream write(&m_serializedDataToServer,QIODevice::WriteOnly);
+	  write<<*(m_baseProvider);
+	  m_pageInfoFlag = 1;
+	  write<<m_pageInfoFlag;
+	  write<<pageNum;
+	  write<<perPage;
+	  m_xtraInfoSerialized.clear();
+	  QDataStream Xtrawrite(&m_xtraInfoSerialized,QIODevice::WriteOnly);
+	  //TODO:- provide serialization/deserialization of SmfTrackInfo
+	  QString latLong;
+	  latLong += QString::number(location.latitude());
+	  latLong += ",";
+	  latLong += QString::number(location.longitude());
+	  Xtrawrite<<latLong;
+	  m_xtraInfoFlag = m_xtraInfoSerialized.size();
+	  write<<m_xtraInfoFlag;
+
+	  QString intfName(musicEventServiceInterface);
+	  //TODO:-revisit all the maxalloc
+	  int maxalloc = 1000;
+	  //call private impl's send method
+	  m_SmfClientPrivate->sendRequest(m_serializedDataToServer,intfName,SmfMusicGetVenueOnLoc,maxalloc,m_xtraInfoSerialized);
+	}
+
+void SmfMusicEventsPrivate::postEvents(SmfEventList events)
+{
+	  //We need to pass Opcode and SmfProvider serialized into bytearray 
+	  m_baseProvider = m_musicEvent->getProvider();
+	  QDataStream write(&m_serializedDataToServer,QIODevice::WriteOnly);
+	  write<<*(m_baseProvider);
+	  m_pageInfoFlag = 0;
+	  write<<m_pageInfoFlag;
+
+	  m_xtraInfoSerialized.clear();
+	  QDataStream Xtrawrite(&m_xtraInfoSerialized,QIODevice::WriteOnly);
+	  //TODO:- provide serialization/deserialization of SmfTrackInfo
+	  Xtrawrite<<events;
+	  m_xtraInfoFlag = m_xtraInfoSerialized.size();
+	  write<<m_xtraInfoFlag;
+
+	  QString intfName(musicEventServiceInterface);
+	  //TODO:-revisit all the maxalloc
+	  int maxalloc = 1000;
+	  //call private impl's send method
+	  m_SmfClientPrivate->sendRequest(m_serializedDataToServer,intfName,SmfMusicPostEvents,maxalloc,m_xtraInfoSerialized);
+	}
+void SmfMusicEventsPrivate::resultsAvailable(QByteArray result,SmfRequestTypeID opcode,SmfError error)
+	{
+	//note:- "result" is serialized and we need to de-serialize it as per opcode
+	//Order of serialization Error value followed by data
+	
+	QDataStream reader(&result,QIODevice::ReadOnly);
+	
+	//Now de-serialize it based on opcode
+	switch(opcode)
+		{
+		case SmfMusicGetEventsOnVenue:
+			{
+			if(m_events)
+				{
+				delete m_events;
+				m_events = NULL;
+				}
+			m_events = new SmfEventList;
+			reader>>*(m_events);
+			SmfResultPage page;
+			m_musicEvent->eventsAvailable(m_events,error,page);
+			}
+			break;
+		case SmfMusicGetVenueOnLoc:
+			{
+			if(m_venues)
+				{
+				delete m_venues;
+				m_venues = NULL;
+				}
+			m_venues = new SmfLocationList;
+			reader>>*(m_venues);
+			SmfResultPage page;
+			m_musicEvent->venuesAvailable(m_venues,error,page);
+			}
+			break;
+		case SmfMusicPostEvents:
+			{
+			m_musicEvent->eventsUpdated(error);
+			}
+			break;
+		case SmfMusicGetEventsOnLoc:
+			{
+			if(m_venues)
+				{
+				delete m_venues;
+				m_venues = NULL;
+				}
+			m_venues = new SmfLocationList;
+			reader>>*(m_venues);
+			SmfResultPage page;
+			m_musicEvent->venuesAvailable(m_venues,error,page);
+			}
+			break;
+		default:
+			Q_ASSERT_X(1,"SmfMusicEventsPrivate::resultsAvailable","default");
+		}
+	}
+SmfLyricsServicePrivate::SmfLyricsServicePrivate(SmfLyricsService *aLyricsSrvc)
+: m_lyricsSrvc(aLyricsSrvc)
+{
+	//private impl for symbian
+	#ifdef Q_OS_SYMBIAN
+	m_SmfClientPrivate = CSmfClientSymbian::NewL(this);
+	#else
+	//TODO:- Use private impl for other platforms or else Qt impl
+	#endif
+}
+
+SmfLyricsServicePrivate::~SmfLyricsServicePrivate()
+	{
+	
+	}
+
+
+
+void SmfLyricsServicePrivate::subtitles(SmfTrackInfo track, SmfSubtitleSearchFilter filter, int pageNum, int perPage)
+{
+	  //We need to pass Opcode and SmfProvider serialized into bytearray 
+	  m_baseProvider = m_lyricsSrvc->getProvider();
+	  QDataStream write(&m_serializedDataToServer,QIODevice::WriteOnly);
+	  write<<*(m_baseProvider);
+	  m_pageInfoFlag = 1;
+	  write<<m_pageInfoFlag;
+	  write<<pageNum;
+	  write<<perPage;
+	  m_xtraInfoSerialized.clear();
+	  QDataStream Xtrawrite(&m_xtraInfoSerialized,QIODevice::WriteOnly);
+	  //TODO:- provide serialization/deserialization of SmfTrackInfo
+	  Xtrawrite<<track;
+	  Xtrawrite<<filter;
+	  m_xtraInfoFlag = m_xtraInfoSerialized.size();
+	  write<<m_xtraInfoFlag;
+
+	  QString intfName(lyricsServiceInterface);
+	  //TODO:-revisit all the maxalloc
+	  int maxalloc = 1000;
+	  //call private impl's send method
+	  m_SmfClientPrivate->sendRequest(m_serializedDataToServer,intfName,SmfMusicGetSubtitle,maxalloc,m_xtraInfoSerialized);
+	}
+
+void SmfLyricsServicePrivate::lyrics(SmfTrackInfo track, int pageNum, int perPage)
+{
+	  //We need to pass Opcode and SmfProvider serialized into bytearray 
+	  m_baseProvider = m_lyricsSrvc->getProvider();
+	  QDataStream write(&m_serializedDataToServer,QIODevice::WriteOnly);
+	  write<<*(m_baseProvider);
+	  m_pageInfoFlag = 1;
+	  write<<m_pageInfoFlag;
+	  write<<pageNum;
+	  write<<perPage;
+	  m_xtraInfoSerialized.clear();
+	  QDataStream Xtrawrite(&m_xtraInfoSerialized,QIODevice::WriteOnly);
+	  //TODO:- provide serialization/deserialization of SmfTrackInfo
+	  Xtrawrite<<track;
+	  m_xtraInfoFlag = m_xtraInfoSerialized.size();
+	  write<<m_xtraInfoFlag;
+
+	  QString intfName(lyricsServiceInterface);
+	  //TODO:-revisit all the maxalloc
+	  int maxalloc = 1000;
+	  //call private impl's send method
+	  m_SmfClientPrivate->sendRequest(m_serializedDataToServer,intfName,SmfMusicGetLyrics,maxalloc,m_xtraInfoSerialized);
+	}
+void SmfLyricsServicePrivate::resultsAvailable(QByteArray result, SmfRequestTypeID opcode, SmfError error)
+	{
+	//note:- "result" is serialized and we need to de-serialize it as per opcode
+
+	QDataStream reader(&result,QIODevice::ReadOnly);
+	
+	//Now de-serialize it based on opcode
+	switch(opcode)
+		{
+		case SmfMusicGetLyrics:
+			{
+			if(m_lyricsList)
+				{
+				delete m_lyricsList;
+				m_lyricsList = NULL;
+				}
+			m_lyricsList = new SmfLyricsList;
+			reader>>*(m_lyricsList);
+			SmfResultPage page;
+			emit m_lyricsSrvc->lyricsAvailable(m_lyricsList,error,page);
+			}
+			break;
+		case SmfMusicGetSubtitle:
+			{
+			if(m_subList)
+				{
+				delete m_subList;
+				m_subList = NULL;
+				}
+			m_subList = new SmfSubtitleList;
+			reader>>*(m_subList);
+			SmfResultPage page;
+			emit m_lyricsSrvc->subtitleAvailable(m_subList,error,page);
+			}
+			break;
+		default:
+			Q_ASSERT_X(1,"SmfLyricsServicePrivate::resultsAvailable","default");
+		}
+	}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/smf/smfservermodule/smfclient/client/smfmusic_p.h	Wed Jun 23 19:51:49 2010 +0530
@@ -0,0 +1,381 @@
+/**
+ * Copyright (c) 2010 Sasken Communication Technologies Ltd.
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of the "Eclipse Public License v1.0" 
+ * which accompanies  this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html"
+ *
+ * Initial Contributors:
+ * Chandradeep Gandhi, Sasken Communication Technologies Ltd - Initial contribution
+ *
+ * Contributors:
+ * Manasij Roy, Nalina Hariharan
+ * 
+ * Description:
+ * 
+ */
+
+#ifndef SMFMUSICPRIVATE_H_
+#define SMFMUSICPRIVATE_H_
+
+#include "smfmusic.h"
+#include "smfglobal.h"
+#include "smfobserver.h"
+#include "smfcomment.h"
+#ifdef Q_OS_SYMBIAN
+#include "smfclientsymbian.h"
+#else
+#include "smfclientqt.h"
+#endif
+class SmfMusicService;
+class SmfMusicSearch;
+class SmfPlaylistService;
+class SmfMusicEvents;
+class SmfLyricsService;
+
+class SmfMusicServicePrivate : public smfObserver
+	{
+	Q_OBJECT
+public:
+	/**
+	 * Constructor
+	 */
+	SmfMusicServicePrivate(SmfMusicService* aMusicService);
+	~SmfMusicServicePrivate();
+	/**
+	* Gets self profile information asynchronously.
+	* userInfoAvailable() signal is emitted with SmfMusicProfile when the info is arrived
+	*/
+	void userinfo() ;
+	
+	/**
+	* Asynchronously searches information about other service users for a particular venue
+	* searchInfoAvailable() signal is emitted with SmfMusicProfileList when the info is arrived.
+	* When the list is big user can specify the page number and per page item data.
+	* If not supplied by the user default values are used.
+	* @param pageNum Page number to download, SMF_FIRST_PAGE denotes fresh query.
+	* @param perPage Item per page, default is SMF_ITEMS_PER_PAGE
+	*/
+	void searchUser(SmfLocation venue,int pageNum,int perPage) ;
+	
+	/** from smfobserver */
+   void resultsAvailable(QByteArray result,SmfRequestTypeID opcode,SmfError error);
+private:
+	  SmfProvider* m_baseProvider;
+	  //serialized byte array of provider+other info to be sent to the server
+	  //The order:- SmfProvider then params in order of their appearance in fn
+	  QByteArray m_serializedDataToServer;
+	  //serialized xtra info, order of serialization follows order of param
+	  QByteArray m_xtraInfoSerialized;
+	#ifdef Q_OS_SYMBIAN
+	  CSmfClientSymbian* m_SmfClientPrivate;
+	  friend class CSmfClientSymbian;
+	  int m_xtraInfoFlag;
+	  int m_pageInfoFlag;
+	#else
+	  SmfClientQt* m_SmfClientPrivate;
+	  friend class SmfClientQt;
+	#endif
+	  bool m_connected;
+	  SmfMusicService* m_musicService;
+	  SmfMusicProfile* m_profile;
+	  SmfMusicProfileList m_profileList;
+	};
+//SmfMusicSearch
+class SmfMusicSearchPrivate : public smfObserver
+	{
+	Q_OBJECT
+public:
+	/**
+	 * Constructor
+	 */
+	SmfMusicSearchPrivate(SmfMusicSearch* aMusicSearch);
+	~SmfMusicSearchPrivate();
+public:
+	  /**
+	   * Searches for music recommendations similar to a particulartrack asynchronously.
+	   * The signal trackSearchAvailable() is emitted with SmfTrackInfoList
+	   * once its arrived.
+	   * When the list is big user can specify the page number and per page item data.
+	   * If not supplied by the user default values are used.
+	   * @param track The track for which similar recommendations need to be fetched.
+	   * @param pageNum Page number to download, SMF_FIRST_PAGE denotes fresh query.
+	   * @param perPage Item per page, default is SMF_ITEMS_PER_PAGE
+	   */
+	  void recommendations(SmfTrackInfo track,int pageNum,int perPage)  ; // basic list of track objects
+
+	  /**
+	   * Searches for tracks similar to a given track asynchronously.
+	   * The signal trackSearchAvailable() is emitted with SmfTrackInfoList
+	   * once its arrived.
+	   * When the list is big user can specify the page number and per page item data.
+	   * If not supplied by the user default values are used.
+	   * @param track The search criteria, similar tracks are searched
+	   * @param pageNum Page number to download, SMF_FIRST_PAGE denotes fresh query.
+	   * @param perPage Item per page, default is SMF_ITEMS_PER_PAGE
+	   */
+	  void tracks(SmfTrackInfo track,int pageNum,int perPage)  ; // basic list of track objects
+
+	  /**
+	   * Searches for a track having similar finger print asynchronously.
+	   * The signal trackSearchAvailable() is emitted with SmfTrackInfoList
+	   * once its arrived.
+	   * @param signature The search criteria,signature to be searched for
+	   * @param pageNum Page number to download, SMF_FIRST_PAGE denotes fresh query.
+	   * @param perPage Item per page, default is SMF_ITEMS_PER_PAGE
+	   */
+	  void trackInfo(SmfMusicFingerPrint signature,int pageNum,int perPage)  ; // search by fingerprint object
+
+	  /**
+	   * Search information about where to buy this song from asynchronously.
+	   * The signal storeSearchAvailable() is emitted with SmfProviderList once its arrived.
+	   * @param track The search criteria for stores
+	   * @param pageNum Page number to download, SMF_FIRST_PAGE denotes fresh query.
+	   * @param perPage Item per page, default is SMF_ITEMS_PER_PAGE
+	   */
+	  void stores(SmfTrackInfo track,int pageNum,int perPage)  ;
+		/**
+		 * Posts currently playing track.
+		 * Success can be checked by checking the signal postFinished()
+		 * @param track Track to post
+		 */
+	  void postCurrentPlaying(SmfTrackInfo track) ;
+	  void postRating(SmfTrackInfo track, SmfMusicRating rate) ;
+	  void postComments(SmfTrackInfo track, SmfComment comment) ;
+		/** from smfobserver */
+	   void resultsAvailable(QByteArray result,SmfRequestTypeID opcode,SmfError error);
+private:
+	  SmfProvider* m_baseProvider;
+	  //serialized byte array of provider+other info to be sent to the server
+	  //The order:- SmfProvider then params in order of their appearance in fn
+	  QByteArray m_serializedDataToServer;
+	  //serialized xtra info, order of serialization follows order of param
+	  QByteArray m_xtraInfoSerialized;
+	#ifdef Q_OS_SYMBIAN
+	  CSmfClientSymbian* m_SmfClientPrivate;
+	  friend class CSmfClientSymbian;
+	  int m_xtraInfoFlag;
+	  int m_pageInfoFlag;
+	#else
+	  SmfClientQt* m_SmfClientPrivate;
+	  friend class SmfClientQt;
+	#endif
+	  bool m_connected;
+	  SmfMusicSearch* m_musicSearch;
+	  SmfMusicProfile* m_profile;
+	  SmfProviderList* m_providers;
+	  SmfTrackInfoList* m_trackInfoList;
+	  SmfMusicProfileList m_profileList;
+	};
+class SmfPlaylistServicePrivate : public smfObserver
+{
+  Q_OBJECT
+
+public:
+  /**
+   * Constructs SmfPlaylistService with base provider info
+   * Seeing as this is a plug-in implementation, these will realistically
+   * be generated by SMF factory of some kind
+   */
+  SmfPlaylistServicePrivate(SmfPlaylistService* aPlayLstSrvc);
+  ~SmfPlaylistServicePrivate();
+
+public:
+
+  /**
+   * Gets the list playlists for the logged-in user asynchronously.
+   * The signal playlistsListAvailable() signal is emitted with
+   * SmfPlaylistList once its arrived .
+   * When the list is big user can specify the page number and per page item data.
+   * If not supplied by the user default values are used.
+   * @param pageNum Page number to download, SMF_FIRST_PAGE denotes fresh query.
+   * @param perPage Item per page, default is SMF_ITEMS_PER_PAGE
+   */
+  void playlists(int pageNum=SMF_FIRST_PAGE,int perPage=SMF_ITEMS_PER_PAGE)  ; // basic list of playlist objects
+
+  /**
+   * Gets the list playlists for the given user asynchronously.
+   * The signal playlistsListAvailable() signal is emitted with
+   * SmfPlaylistList once its arrived.
+   * When the list is big user can specify the page number and per page item data.
+   * If not supplied by the user default values are used.
+   * @param user User for which to get the playlists
+   * @param pageNum Page number to download, SMF_FIRST_PAGE denotes fresh query.
+   * @param perPage Item per page, default is SMF_ITEMS_PER_PAGE
+   */
+  void playlistsOf(SmfMusicProfile* user,int pageNum=SMF_FIRST_PAGE,int perPage=SMF_ITEMS_PER_PAGE)  ;
+  /**
+	 * Upload currently playing track to a playlist. Signal
+	 * playlistUpdated() can be checked for success value
+	 * @param plst The playlist to be added in
+	 * @param tracks The list of tracks to uploaded
+	 */
+  int addToPlaylist(SmfPlaylist plst, SmfTrackInfoList* tracks)  ;
+
+	/**
+	 * Upload currently playing playlist . Signal
+	 * playlistUpdated() can be checked for success value
+	 * @param plst The playlist to be uploaded
+	 */
+  int postCurrentPlayingPlaylist(SmfPlaylist plst)  ;
+  /** from smfobserver */
+  void resultsAvailable(QByteArray result,SmfRequestTypeID opcode,SmfError error);
+private:
+	SmfProvider* m_baseProvider;
+	//serialized byte array of provider+other info to be sent to the server
+	//The order:- SmfProvider then params in order of their appearance in fn
+	QByteArray m_serializedDataToServer;
+	//serialized xtra info, order of serialization follows order of param
+	QByteArray m_xtraInfoSerialized;
+	#ifdef Q_OS_SYMBIAN
+	CSmfClientSymbian* m_SmfClientPrivate;
+	friend class CSmfClientSymbian;
+	int m_xtraInfoFlag;
+	int m_pageInfoFlag;
+	#else
+	SmfClientQt* m_SmfClientPrivate;
+	friend class SmfClientQt;
+	#endif
+	bool m_connected;
+	SmfPlaylistService* m_playlstSrvc;
+	SmfPlaylistList* m_playlistList;
+};
+
+class SmfMusicEventsPrivate : public smfObserver
+{
+  Q_OBJECT
+
+public:
+  /**
+   * Constructs SmfMusicEvents with base provider info
+   * Seeing as this is a plug-in implementation, these will realistically
+   *  be generated by SMF factory of some kind
+   */
+  SmfMusicEventsPrivate(SmfMusicEvents* aMusicEvent);
+  ~SmfMusicEventsPrivate();
+
+public:
+
+  /**
+   * Gets list of events in a particular location asynchronously.
+   * eventsAvailable() signal is emitted with SmfEventsList once its arrived.
+   * When the list is big user can specify the page number and per page item data.
+   * If not supplied by the user default values are used.
+   * @param pageNum Page number to download, SMF_FIRST_PAGE denotes fresh query.
+   * @param perPage Item per page, default is SMF_ITEMS_PER_PAGE
+   */
+  void events(QContactGeoLocation location,int pageNum,int perPage)  ;
+
+  /**
+   * Gets list of venues of a particular location asynchronously.
+   * venuesAvailable() signal is emitted with SmfLocationList once its arrived.
+   * When the list is big user can specify the page number and per page item data.
+   * If not supplied by the user default values are used.
+   * @param pageNum Page number to download, SMF_FIRST_PAGE denotes fresh query.
+   * @param perPage Item per page, default is SMF_ITEMS_PER_PAGE
+   */
+  void venues(QContactGeoLocation location,int pageNum,int perPage)  ; // basic list of venue objects
+
+  /**
+   * Gets list of events in a particular venue asynchronously.
+   * eventsAvailable() signal is emitted with SmfEventsList once its arrived.
+   * When the list is big user can specify the page number and per page item data.
+   * If not supplied by the user default values are used.
+   * @param pageNum Page number to download, SMF_FIRST_PAGE denotes fresh query.
+   * @param perPage Item per page, default is SMF_ITEMS_PER_PAGE
+   */
+  void events(SmfLocation venue,int pageNum,int perPage)  ; // basic list of events objects
+
+/**
+	 * Updates events. Might not be supported by all service provider.
+	 * eventsUpdated() signal can be checked for success value.
+	 * @param SmfEventsList List of events to be posted
+	 */
+	 void postEvents(SmfEventList events);
+	  /** from smfobserver */
+	  void resultsAvailable(QByteArray result,SmfRequestTypeID opcode,SmfError error);
+	private:
+		SmfProvider* m_baseProvider;
+		//serialized byte array of provider+other info to be sent to the server
+		//The order:- SmfProvider then params in order of their appearance in fn
+		QByteArray m_serializedDataToServer;
+		//serialized xtra info, order of serialization follows order of param
+		QByteArray m_xtraInfoSerialized;
+		#ifdef Q_OS_SYMBIAN
+		CSmfClientSymbian* m_SmfClientPrivate;
+		friend class CSmfClientSymbian;
+		int m_xtraInfoFlag;
+		int m_pageInfoFlag;
+		#else
+		SmfClientQt* m_SmfClientPrivate;
+		friend class SmfClientQt;
+		#endif
+		bool m_connected;
+		SmfMusicEvents* m_musicEvent;
+		SmfEventList* m_events;
+		SmfLocationList* m_venues;
+};
+
+/**
+* provides service ("org.symbian.smf.client.music.lyrics")
+*/
+class SmfLyricsServicePrivate : public smfObserver
+{
+  Q_OBJECT
+
+public:
+  /**
+   * Constructs SmfLyricsService with base provider info.
+   * Seeing as this is a plug-in implementation, these will realistically
+   * be generated by SMF factory of some kind
+   */
+
+  SmfLyricsServicePrivate(SmfLyricsService* aLyricsSrvc);
+  ~SmfLyricsServicePrivate();
+
+public:
+
+  /**
+   * Get the lyrics lists asynchrnously, it fetches texts without time info.
+   * lyricsAvailable() notification comes SmfLyricsList with when the data is available
+   * @param track Track for which lyrics needs to be fetched.
+   * @param pageNum Page number to download, SMF_FIRST_PAGE denotes fresh query.
+   * @param perPage Item per page, default is SMF_ITEMS_PER_PAGE
+   */
+  void lyrics(SmfTrackInfo track,int pageNum,int perPage)  ;
+
+  /**
+   * Get the lyrics lists asynchrnously, it fetches texts with time info.
+   * Subtitle search filter can be applied
+   * subtitleAvailable() notification comes SmfSubtitleList with when the data is available
+   * @param track Track for which subtitle needs to be fetched.
+   * @param filter Subtitle search filter
+   * @param pageNum Page number to download, SMF_FIRST_PAGE denotes fresh query.
+   * @param perPage Item per page, default is SMF_ITEMS_PER_PAGE
+   */
+  void subtitles(SmfTrackInfo track, SmfSubtitleSearchFilter filter,int pageNum,int perPage)  ; // texts with time information
+  /** from smfobserver */
+  void resultsAvailable(QByteArray result,SmfRequestTypeID opcode,SmfError error);
+private:
+	SmfProvider* m_baseProvider;
+	//serialized byte array of provider+other info to be sent to the server
+	//The order:- SmfProvider then params in order of their appearance in fn
+	QByteArray m_serializedDataToServer;
+	//serialized xtra info, order of serialization follows order of param
+	QByteArray m_xtraInfoSerialized;
+	#ifdef Q_OS_SYMBIAN
+	CSmfClientSymbian* m_SmfClientPrivate;
+	friend class CSmfClientSymbian;
+	int m_xtraInfoFlag;
+	int m_pageInfoFlag;
+	#else
+	SmfClientQt* m_SmfClientPrivate;
+	friend class SmfClientQt;
+	#endif
+	bool m_connected;
+	SmfLyricsService* m_lyricsSrvc;
+	SmfLyricsList* m_lyricsList;
+	SmfSubtitleList* m_subList;
+};
+#endif
--- a/smf/smfservermodule/smfclient/client/smfpostprovider.cpp	Mon Jun 07 11:43:45 2010 +0100
+++ b/smf/smfservermodule/smfclient/client/smfpostprovider.cpp	Wed Jun 23 19:51:49 2010 +0530
@@ -18,8 +18,6 @@
  */
 
 #include "smfpostprovider.h"
-#include "smfpostprovider_p.h"
-
 #include <QVector>
 #include <QTextFormat>
 
--- a/smf/smfservermodule/smfclient/client/smfpostprovider.h	Mon Jun 07 11:43:45 2010 +0100
+++ b/smf/smfservermodule/smfclient/client/smfpostprovider.h	Wed Jun 23 19:51:49 2010 +0530
@@ -13,7 +13,7 @@
  * Manasij Roy, Nalina Hariharan
  * 
  * Description:
- * The SmfEvent class represents an event
+ * SmfPostProvider
  *
  */
 #ifndef SMFPOSTPROVIDER_H
@@ -30,8 +30,7 @@
 #include "smfcontact.h"
 #include "smflocation.h"
 #include "smfpost.h"
-
-class SmfPostProviderPrivate;
+#include "smfpostprovider_p.h"
 
 /**
  * @ingroup smf_client_group 
@@ -51,7 +50,7 @@
 	 * Constructs SmfPostProvider.
 	 * @param baseProvider The base provider info
 	 * Seeing as this is a plug-in implementation, these will realistically
-	 * be generated by SMF factory of some kind
+	 * be generated by SMF factory of some kind
 	 */
 	SmfPostProvider(SmfProvider* baseProvider);
 	~SmfPostProvider();
@@ -60,23 +59,23 @@
 public:
 	/**
 	 * returns maximum no of chars (unicode) that service provider can post without truncation
-	 * negative value means no limit
+	 * negative value means no limit
 	 */
 	qint32 maxCharsInPost() const;
 	/**
 	 * returns maximum no of items that can be returned in a single query to getPosts
-	 * negative value means feature not supported.
+	 * negative value means feature not supported.
 	 */
 	qint32 maxItems() const;
 
 	/**
 	 * returns all the formatting of posts that this service provider supports.
-	 * May return 0 items to mean only QString is supported.
+	 * May return 0 items to mean only QString is supported.
 	 */
 	QVector<QTextFormat> supportedFormats () const;
 	
 	/**
-	 * returns whether this SP supports Appearence @see SmfAppearenceInfo
+	 * returns whether this SP supports Appearence @see SmfAppearenceInfo
 	 */
 	bool supportsAppearence () const;
 
@@ -87,7 +86,7 @@
 	 * @param user user's contact in this SP, omit for self contact
 	 * @param pageNum Page number to download, SMF_FIRST_PAGE denotes fresh query.
      * @param perPage Item per page, default is SMF_ITEMS_PER_PAGE 
-	 * @see postsAvailable()
+	 * @see postsAvailable()
 	 */
 	void posts(SmfContact* user = 0,int pageNum=SMF_FIRST_PAGE,int perPage=SMF_ITEMS_PER_PAGE);
 	
@@ -111,7 +110,7 @@
 	 * updatePostFinished() signal.
 	 * @param postData data to be posted
 	 * @param contact contact to which the post is to be directed
-	 * @param location location data
+	 * @param location location data
 	 */
 	void postDirected(SmfPost& postData,SmfContact& contact,SmfLocation* location=0);
 	
@@ -119,7 +118,7 @@
 	 * Posts appearance info of the user.e.g. appear offline, busy, do-not-disturb
 	 * @param appearence user appearance
 	 * @see SmfPresenceInfo
-	 * @return False on Failure/Not supported 
+	 * @return False on Failure/Not supported 
 	 */
 	bool postAppearence(SmfAppearenceInfo appearence); 
 	/**
@@ -154,15 +153,15 @@
 	 * In that case this signal is emitted multiple times.
 	 * @param list list of posts
 	 * @param error error string
-	 * @param resultPage Page number info
+	 * @param resultPage Page number info
 	 */
 	void postsAvailable(SmfPostList* list, SmfError error, SmfResultPage resultPage);
 	
 	/**
 	 * Emitted when update post is finished.
-	 * @param success the success of the update
+	 * @param success the success of the update
 	 */
-	void postFinished(bool success);
+	void postFinished(SmfError success);
 	/**
 	 * Emitted when custom data is available
 	 * @param operationId Requested operation id
--- a/smf/smfservermodule/smfclient/client/smfpostprovider_p.cpp	Mon Jun 07 11:43:45 2010 +0100
+++ b/smf/smfservermodule/smfclient/client/smfpostprovider_p.cpp	Wed Jun 23 19:51:49 2010 +0530
@@ -12,8 +12,6 @@
  * Contributors:
  * Manasij Roy, Nalina Hariharan
  * 
- * Description:
- * The SmfEvent class represents an event
  *
  */
 
@@ -26,12 +24,12 @@
 #ifdef Q_OS_SYMBIAN
 #include "smfclientsymbian.h"
 #else
-#include "smfclientqt.h"
+#include "SmfClientQt.h"
 #endif
 SmfPostProviderPrivate::SmfPostProviderPrivate(SmfPostProvider* postProvider)
 : m_postProvider(postProvider),m_postList(NULL)
 	{
-	  //private impl for symbian
+	//private impl for symbian
 	#ifdef Q_OS_SYMBIAN
 	m_SmfClientPrivate = CSmfClientSymbian::NewL(this);
 	#endif
@@ -61,18 +59,35 @@
 	  //serialize start
 	  QDataStream write(&m_serializedDataToServer,QIODevice::WriteOnly);
 	  write<<*(m_baseProvider);
+	  m_pageInfoFlag = 1;
+	  write<<m_pageInfoFlag;
+	  write<<pageNum;
+	  write<<perPage;
 	  //TODO:- use different opcode incase post retreival is for other user
 	  //serialize SmfContact if post retrieval is for other user
+
 	  if(user)
 		  {
+		  //m_xtraInfoFlag = 1;
+		  //write<<m_xtraInfoFlag;
 		  //now serialize SmfContact 
-		  write<<*(user);
+		  m_xtraInfoSerialized.clear();
+		  QDataStream Xtrawrite(&m_xtraInfoSerialized,QIODevice::WriteOnly);
+		  Xtrawrite<<*(user);
+		  m_xtraInfoFlag = m_xtraInfoSerialized.size();
+		  write<<m_xtraInfoFlag;
+		  }
+	  else
+		  {
+		  m_xtraInfoFlag = 0;
+		  write<<m_xtraInfoFlag;
 		  }
 	  //serialize end
-	  QString intfName(postProviderInterface);
-	  
+	  intfName.clear();
+	  intfName.append(postProviderInterface);
+	  int maxAllocation = MaxSmfPostSize*perPage;
 	  //call private impl's send method
-	  m_SmfClientPrivate->sendRequest(m_serializedDataToServer,intfName,SmfContactRetrievePosts);
+	  m_SmfClientPrivate->sendRequest(m_serializedDataToServer,intfName,SmfContactRetrievePosts,maxAllocation,m_xtraInfoSerialized);
 
 }
 	
@@ -84,21 +99,29 @@
  */
 void SmfPostProviderPrivate::post(SmfPost& postData,SmfLocation& location) 
 	{
+	  m_xtraInfoSerialized.clear();
 	  m_baseProvider = m_postProvider->getProvider();
 	  //serialize start
 	  QDataStream write(&m_serializedDataToServer,QIODevice::WriteOnly);
 	  //SmfProvider
 	  write<<*(m_baseProvider);
+	  m_pageInfoFlag = 0;
+	  write<<m_pageInfoFlag;
+	  //m_xtraInfoFlag = 1;
+	  //write<<m_xtraInfoFlag;
+	  
+	  QDataStream xtraInfoWrite(&m_xtraInfoSerialized,QIODevice::WriteOnly);
 	  //SmfPost
-	  write<<postData;
+	  xtraInfoWrite<<postData;
 	  //SmfPlace
-	  write<<location;
-	  
+	  xtraInfoWrite<<location;
+	  m_xtraInfoFlag = m_xtraInfoSerialized.size();
+	  write<<m_xtraInfoFlag;
 	  //serialize end
 	  QString intfName(postProviderInterface);
-	  
+	  //we are not mentioning the max size, as we'll receive only bool
 	  //call private impl's send method
-	  m_SmfClientPrivate->sendRequest(m_serializedDataToServer,intfName,SmfContactPost);
+	  m_SmfClientPrivate->sendRequest(m_serializedDataToServer,intfName,SmfContactPost,10,m_xtraInfoSerialized);
 	}
 /**
  * Updates the last post to own area with new data, the success of the post can be checked with signal
@@ -113,14 +136,21 @@
 	  QDataStream write(&m_serializedDataToServer,QIODevice::WriteOnly);
 	  //SmfProvider
 	  write<<*(m_baseProvider);
+	  m_pageInfoFlag = 0;
+	  write<<m_pageInfoFlag;
+	  //m_xtraInfoFlag = 1;
+	  //write<<m_xtraInfoFlag;
+	  
+	  QDataStream xtraInfoWrite(&m_xtraInfoSerialized,QIODevice::WriteOnly);
 	  //SmfPost
-	  write<<postData;
-
+	  xtraInfoWrite<<postData;
+	  m_xtraInfoFlag = m_xtraInfoSerialized.size();
+	  write<<m_xtraInfoFlag;
 	  //serialize end
 	  QString intfName(postProviderInterface);
-	  
+	  //we are not mentioning the max size, as we'll receive only bool
 	  //call private impl's send method
-	  m_SmfClientPrivate->sendRequest(m_serializedDataToServer,intfName,SmfContactUpdatePost);
+	  m_SmfClientPrivate->sendRequest(m_serializedDataToServer,intfName,SmfContactUpdatePost,10,m_xtraInfoSerialized);
 	}
 
 /**
@@ -132,23 +162,32 @@
  */
 void SmfPostProviderPrivate::postDirected(SmfPost& postData,SmfContact& contact,SmfLocation* location)
 	{
+
 	  m_baseProvider = m_postProvider->getProvider();
 	  //serialize start
 	  QDataStream write(&m_serializedDataToServer,QIODevice::WriteOnly);
 	  //SmfProvider
 	  write<<*(m_baseProvider);
+	  m_pageInfoFlag = 0;
+	  write<<m_pageInfoFlag;
+	  //m_xtraInfoFlag = 1;
+	  //write<<m_xtraInfoFlag;
+	  
+	  QDataStream xtraInfoWrite(&m_xtraInfoSerialized,QIODevice::WriteOnly);
 	  //SmfPost
-	  write<<postData;
+	  xtraInfoWrite<<postData;
 	  //SmfContact
-	  write<<contact;
+	  xtraInfoWrite<<contact;
 	  //SmfPlace
-	  write<<location;
+	  xtraInfoWrite<<location;
+	  m_xtraInfoFlag = m_xtraInfoSerialized.size();
+	  write<<m_xtraInfoFlag;
 	  //serialize end
 	  
 	  QString intfName(postProviderInterface);
-	  
+	  //we are not mentioning the max size, as we'll receive only bool
 	  //call private impl's send method
-	  m_SmfClientPrivate->sendRequest(m_serializedDataToServer,intfName,SmfContactPostDirected);
+	  m_SmfClientPrivate->sendRequest(m_serializedDataToServer,intfName,SmfContactPostDirected,10,m_xtraInfoSerialized);
 	}
 
 /**
@@ -166,11 +205,18 @@
 	  //serialize start
 	  QDataStream write(&m_serializedDataToServer,QIODevice::WriteOnly);
 	  write<<*(m_baseProvider);
-	  write<<appearence;
+	  m_pageInfoFlag = 0;
+	  write<<m_pageInfoFlag;
+	  //m_xtraInfoFlag = 1;
+	  //write<<m_xtraInfoFlag;
+	  QDataStream xtraInfoWrite(&m_xtraInfoSerialized,QIODevice::WriteOnly);
+	  xtraInfoWrite<<appearence;
+	  m_xtraInfoFlag = m_xtraInfoSerialized.size();
+	  write<<m_xtraInfoFlag;
 	  QString intfName(postProviderInterface);
-	  
+	  //we are not mentioning the max size, as we'll receive only bool
 	  //call private impl's send method
-	  m_SmfClientPrivate->sendRequest(m_serializedDataToServer,intfName,SmfContactPostAppearence);
+	  m_SmfClientPrivate->sendRequest(m_serializedDataToServer,intfName,SmfContactPostAppearence,10,m_xtraInfoSerialized);
 	}
 /**
  * Share /a contact's post to user's friends and followers (e.g. retweet in twitter, share on facebook)
@@ -185,13 +231,21 @@
 	  //serialize start
 	  QDataStream write(&m_serializedDataToServer,QIODevice::WriteOnly);
 	  write<<*(m_baseProvider);
-	  write<<postData;
-	  write<<contact;
-	  write<<edited;
+	  m_pageInfoFlag = 0;
+	  write<<m_pageInfoFlag;
+	  //m_xtraInfoFlag = 1;
+	  //write<<m_xtraInfoFlag;
+	  
+	  QDataStream xtraInfoWrite(&m_serializedDataToServer,QIODevice::WriteOnly);
+	  xtraInfoWrite<<postData;
+	  xtraInfoWrite<<contact;
+	  xtraInfoWrite<<edited;
+	  m_xtraInfoFlag = m_xtraInfoSerialized.size();
+	  write<<m_xtraInfoFlag;
 	  QString intfName(postProviderInterface);
-	  
+	  //we are not mentioning the max size, as we'll receive only bool
 	  //call private impl's send method
-	  m_SmfClientPrivate->sendRequest(m_serializedDataToServer,intfName,SmfContactSharePost);
+	  m_SmfClientPrivate->sendRequest(m_serializedDataToServer,intfName,SmfContactSharePost,10,m_serializedDataToServer);
 	}
 /**
 * From smfobserver
@@ -199,16 +253,13 @@
 void SmfPostProviderPrivate::resultsAvailable(QByteArray result,SmfRequestTypeID opcode,SmfError error)
    {
 	writeLog("SmfPostProviderPrivate::resultsAvailable");
-	
-	//note:- "result" is serialized and we need to de-serialize it as per opcode
-	//TODO:- order of serialization Error value followed by data
-	
+	writeLog("opcode=");
+	writeLog(QString::number(opcode));
 	QDataStream reader(&result,QIODevice::ReadOnly);
-	
 	//Now de-serialize it based on opcode
 	switch(opcode)
 		{
-		case SmfContactRetrievePostsComplete:
+		case SmfContactRetrievePosts:
 			{
 				if(m_postList)
 					{
@@ -217,12 +268,6 @@
 					}
 
 				m_postList = new SmfPostList;
-				//TODO
-	//   			SmfError error;
-	//   			reader>>error;
-	//   			writeLog("Error=");
-	//   			writeLog(QString::number(error));
-	//   			SmfError err = (SmfError)error;
 				reader>>*(m_postList);
 				writeLog("postList.count=");
 				writeLog(QString::number(m_postList->count()));
@@ -237,31 +282,28 @@
 			
 			}
 			break;
-		case SmfContactPostComplete:
+		case SmfContactPost:
 			{
-				bool success;
-				reader>>success;
-				writeLog("success=");
-				if(success)
-					writeLog("true");
-				emit m_postProvider->postFinished(success);
+			int errInt;
+			reader>>errInt;
+			writeLog("success=");
+			SmfError success = (SmfError)errInt; 
+			emit m_postProvider->postFinished(success);
 			
 			}
 			break;
-		case SmfContactUpdatePostComplete:
-		case SmfContactPostDirectedComplete:
-		case SmfContactSharePostComplete:
+		case SmfContactUpdatePost:
+		case SmfContactPostDirected:
+		case SmfContactSharePost:
 			{
-			bool success;
-			reader>>success;
+			int errInt;
+			reader>>errInt;
 			writeLog("success=");
-			if(success)
-				writeLog("true");
+			SmfError success = (SmfError)errInt; 
 			emit m_postProvider->postFinished(success);
 			}
-//		default:
-//			//should panic?
-//			
+		default:
+			Q_ASSERT_X(1,"SmfPostProviderPrivate::resultsAvailable","default case");
 		}
    }
 void SmfPostProviderPrivate::writeLog(QString log) const
--- a/smf/smfservermodule/smfclient/client/smfpostprovider_p.h	Mon Jun 07 11:43:45 2010 +0100
+++ b/smf/smfservermodule/smfclient/client/smfpostprovider_p.h	Wed Jun 23 19:51:49 2010 +0530
@@ -20,9 +20,9 @@
 #define SMFPOSTPROVIDER_P_H_
 
 #include "smfprovider.h"
-#include "smfclientglobal.h"
-#include "smfglobal.h"
-#include "smfobserver.h"
+#include "SmfClientGlobal.h"
+#include "smfGlobal.h"
+#include "SmfObserver.h"
 
 class SmfProvider;
 class SmfPostProvider;
@@ -40,10 +40,10 @@
 #endif
 
 /**
- * Data size limits
+ * Data size limits
  */
 /**
- * Single Post-1 MB
+ * Single Post-1 MB
  */
 const int KSmfPostMaxSize = 1000000;
 /**
@@ -121,6 +121,8 @@
 	  //serialized byte array of provider+other info to be sent to the server
 	  //The order:- SmfProvider then params in order of their appearance in fn
 	  QByteArray m_serializedDataToServer;
+	  //serialized xtra info, order of serialization follows order of param
+	  QByteArray m_xtraInfoSerialized;
 	#ifdef Q_OS_SYMBIAN
 	  CSmfClientSymbian* m_SmfClientPrivate;
 	  friend class CSmfClientSymbian;
@@ -129,8 +131,12 @@
 	  friend class SmfClientQt;
 	#endif
 	  bool m_connected;
+	  int m_xtraInfoFlag;
+	  int m_pageInfoFlag;
 	  SmfPostProvider* m_postProvider;
 	  SmfPostList* m_postList;
 	 void writeLog(QString log) const;
+	private:
+	 QString intfName;
 	};
 #endif /* SMFPOSTPROVIDER_P_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/smf/smfservermodule/smfclient/client/smfrelationmgr.cpp	Wed Jun 23 19:51:49 2010 +0530
@@ -0,0 +1,119 @@
+/**
+ * Copyright (c) 2010 Sasken Communication Technologies Ltd.
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of the "Eclipse Public License v1.0" 
+ * which accompanies  this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html"
+ *
+ * Initial Contributors:
+ * Chandradeep Gandhi, Sasken Communication Technologies Ltd - Initial contribution
+ *
+ * Contributors:
+ * Manasij Roy, Nalina Hariharan
+ */
+
+#include "smfrelationmgr.h"
+#include "smfrelationmgr_p.h"
+
+SmfRelationItem::SmfRelationItem(SmfProvider* provider)
+	{
+	m_provider = *(provider);
+	}
+SmfProvider SmfRelationItem::getProvider() const
+	{
+	return m_provider;
+	}
+void SmfRelationItem::setProvider(SmfProvider& provider)
+	{
+	m_provider = provider;
+	}
+SmfContact SmfRelationItem::getContact() const
+	{
+	return m_contact;
+	}
+void SmfRelationItem::setContact(SmfContact& contact)
+	{
+	m_contact = contact;
+	}
+quint32	SmfRelationItem::getIndex() const
+	{
+	return m_index;
+	}
+void SmfRelationItem::setIndex(quint32 index)
+	{
+	m_index = index;
+	}
+QDataStream &operator<<( QDataStream &aDataStream,const SmfRelationItem &aRelnItem )
+	{
+	aDataStream<<aRelnItem.getProvider();
+	aDataStream<<aRelnItem.getContact();
+	aDataStream<<aRelnItem.getIndex();
+	}
+
+QDataStream &operator>>( QDataStream &aDataStream,SmfRelationItem &aRelnItem)
+	{
+	SmfContact contact;
+	SmfProvider provider;
+	quint32 index;
+	
+	aDataStream>>provider;
+	aDataStream>>contact;
+	aDataStream>>index;
+	
+	aRelnItem.setProvider(provider);
+	aRelnItem.setContact(contact);
+	aRelnItem.setIndex(index);
+	}
+SmfRelationMgr::SmfRelationMgr(QObject* parent):QObject(parent)
+	{
+	m_private = new SmfRelationMgrPrivate(this);
+	}
+SmfRelationMgr::~SmfRelationMgr()
+	{
+	if(m_private)
+		{
+		delete m_private;
+		m_private = NULL;
+		}
+	}
+SmfRelationId SmfRelationMgr::create(SmfProvider *provider, SmfContact *contact)
+	{
+	return m_private->create(provider,contact);
+	}
+SmfError SmfRelationMgr::associate(const SmfRelationId& relation,const SmfContact* contact,SmfProvider* provider)
+	{
+	return m_private->associate(relation,contact,provider);
+	}
+SmfError SmfRelationMgr::remove(SmfRelationId& relation,const SmfContact* contact)
+	{
+	return m_private->remove(relation,contact);
+	}
+SmfRelationItem SmfRelationMgr::searchById(const SmfRelationId& relation)
+	{
+	return m_private->searchById(relation);
+	}
+SmfRelationId SmfRelationMgr::searchByContact( SmfContact contact)
+	{
+	return m_private->searchByContact(contact);
+	}
+uint SmfRelationMgr::count(SmfRelationId relation)
+	{
+	return m_private->count(relation);
+	}
+SmfRelationItem SmfRelationMgr::get(SmfRelationId& relation, quint32 index)
+	{
+	return m_private->get(relation,index);
+	}
+QList<SmfRelationItem> SmfRelationMgr::getAll(SmfRelationId& relation)
+	{
+	return m_private->getAll(relation);
+	}
+QList<SmfRelationId> SmfRelationMgr::getAllRelations()
+	{
+	return m_private->getAllRelations();
+	}
+SmfError SmfRelationMgr::Delete(SmfRelationId& relation)
+	{
+	return m_private->Delete(relation);
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/smf/smfservermodule/smfclient/client/smfrelationmgr.h	Wed Jun 23 19:51:49 2010 +0530
@@ -0,0 +1,164 @@
+/**
+ * Copyright (c) 2010 Sasken Communication Technologies Ltd.
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of the "Eclipse Public License v1.0"
+ * which accompanies  this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html"
+ *
+ * Initial Contributors:
+ * Chandradeep Gandhi, Sasken Communication Technologies Ltd - Initial contribution
+ *
+ * Contributors:
+ * Manasij Roy, Nalina Hariharan
+ *
+ * Description:
+ * Interface spefication for managing associations between various social contacts
+ */
+#ifndef SMFRELATIONMGR_H
+#define SMFRELATIONMGR_H
+
+#include "smfprovider.h"
+#include "smfcontact.h"
+#include "smfglobal.h"
+
+/** implementaion constants */
+const int maxSmfRelationIdSize = 500;
+const int maxSmfRelationItemSize = 1000;
+const int maxRelationItems = 1000;
+
+
+/** forward*/
+class SmfRelationMgrPrivate;
+
+/**
+ * persistent Id of a relation.
+ */
+typedef QString SmfRelationId;
+
+/**
+* One record of a contact in a relation. Index specifies their position in the relationship.
+*/
+class SMFCLIENT_EXPORT SmfRelationItem : public SmfContact
+	{
+public:
+	SmfRelationItem(SmfProvider* provider=0);
+public:
+	SmfProvider getProvider() const;
+	void setProvider(SmfProvider& provider);
+	SmfContact getContact() const;
+	void setContact(SmfContact& contact);
+	quint32	getIndex() const;
+	void setIndex(quint32 index);
+private:
+	SmfProvider m_provider;
+	SmfContact  m_contact;
+	quint32		 m_index;
+	};
+SMFCLIENT_EXPORT QDataStream &operator<<( QDataStream &aDataStream, 
+	const SmfRelationItem &aRelnItem );
+
+SMFCLIENT_EXPORT QDataStream &operator>>( QDataStream &aDataStream, 
+		SmfRelationItem &aRelnItem);
+/**
+ * All remote profiles (e.g. facebook, twitter, flicker) for a particular
+ * person (or entity) constitutes a relation. Relation Manager stores
+ * these relations in persistent memory.
+ *
+ * Relations and Items can be visualized in rows and columns.
+ * Each row is identified by a RelationId.
+ * Each column is identified by index of that Item in the relation
+ * Each Items holds necessary information for SmfProvider and SmfContact.
+ * In the diagram below C1, C2... could be local or remote contacts, which means
+ * that C1, C2 .. could be contacts from device-resident phonebook. For example, for contact C1,
+ * items at index 1,2,3.. in this relationship denotes C1's id in Facebook, Twitter, flickr,... .
+ *
+ *                                  Relation Item           Relation Item          Relation Item      Relation Item        Relation Item
+ *                                        Index1                  index2                  index3                  index4                  index5
+ *                             _______________________________________________________________________
+ *                             |                           |                             |                            |                          |                          |
+ * RelationId 1         |           C1           |        Remote        |        Remote       |         Remote    |         Remote     |
+ *                             |                           |        Contact        |        Contact       |         Contact     |         Contact     |
+ *                             ------------------------------------------------------------------------------------------------------------------
+ *                             |                           |                             |                           |                           |                          |
+ * RelationId 2         |           C2           |        Remote        |        Remote       |                          |                          |
+ *                             |                           |        Contact        |        Contact       |                          |                          |
+ *                             -----------------------------------------------------------------------------------------------------------------
+ *                             |                           |                             |                            |                          |                          |
+ * RelationId 3         |          C3            |        Remote        |                            |                          |                          |
+ *                             |                           |        Contact        |                            |                          |                          |
+ *                             -----------------------------------------------------------------------------------------------------------------
+ *                             |                           |                             |                           |                           |                          |
+ * RelationId 4         |           C4           |        Remote        |        Remote       |                          |                          |
+ *                             |                           |        Contact        |        Contact       |                          |                          |
+ *                             -----------------------------------------------------------------------------------------------------------------
+ *                             |                           |                             |                           |                           |                          |
+ * RelationId 5         |           C5           |        Remote        |                           |                           |                          |
+ *                             |                           |        Contact        |                           |                           |                          |
+ *                             -----------------------------------------------------------------------------------------------------------------
+ *
+ * Items can be added (associated) to a given relation. So this is one-to-many
+ * relationship. Typically no items be present in more than one relation.
+ *
+ * All functions are synchronous at this moment.
+ */
+class SMFCLIENT_EXPORT SmfRelationMgr : public QObject
+	{
+	Q_OBJECT
+public:
+	SmfRelationMgr(QObject* parent = 0);
+	~SmfRelationMgr();
+
+public slots:
+
+	/** create a new relation. The contact provided is the first contact in this
+	 * relation.
+	 * Please note that contact should have valid Guid @ref QtMobility::QContactGuid
+	 * (used by Smf to store the unique id of user from facebook, etc.) and valid Url
+	 * @ref QtMobility::QContactUrl
+	 *
+	 * If the contact is already stored with ContactManager (e.g. contact exists in phonebook),
+	 * then it would have QtMobility::QContactId properly filled with managerUri and localId.
+	 * These two field would also be stored in SmfRelationMgr (for easily identifying the SmfContacts).
+	 *
+	 * After successful creation, a relationId would be returned. More and more SmfContacts can
+	 * be added to this relation using this RelationId
+	 */
+	SmfRelationId create(SmfProvider *provider=NULL, SmfContact *contact=NULL);
+
+	/** assign contact to a relation */
+	SmfError associate( const SmfRelationId& relation,
+						const SmfContact* contact,
+						SmfProvider* provider);
+
+	/** remove contact from a relation */
+	SmfError remove(SmfRelationId& relation,
+					const SmfContact* conact);
+
+	/** returns first relation item in the relation when exists, NULL otherwise */
+	SmfRelationItem searchById(const SmfRelationId& relation);
+
+	/** returns relation Id for a given contacts if exists, NULL otherwise */
+	SmfRelationId searchByContact( SmfContact contact);
+
+	/** returns number of contacts in a relation*/
+	uint count(SmfRelationId relation);
+
+	/** contacts and their provider */
+	SmfRelationItem get(SmfRelationId& relation, quint32 index);
+
+	/** list of contacts and their provider */
+	QList<SmfRelationItem> getAll(SmfRelationId& relation);
+
+	/** list of all relations */
+	QList<SmfRelationId> getAllRelations();
+
+	/** delete a particular relation*/
+	SmfError Delete(SmfRelationId& relation);
+
+	private:
+	//private impl wrapper
+	SmfRelationMgrPrivate* m_private;
+	};
+
+#endif // SMFRELATIONMGR_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/smf/smfservermodule/smfclient/client/smfrelationmgr_p.cpp	Wed Jun 23 19:51:49 2010 +0530
@@ -0,0 +1,250 @@
+/**
+ * Copyright (c) 2010 Sasken Communication Technologies Ltd.
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of the "Eclipse Public License v1.0" 
+ * which accompanies  this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html"
+ *
+ * Initial Contributors:
+ * Chandradeep Gandhi, Sasken Communication Technologies Ltd - Initial contribution
+ *
+ * Contributors:
+ * Manasij Roy, Nalina Hariharan
+ * 
+ * Description:
+ *
+ */
+
+#include "smfrelationmgr_p.h"
+//logging headers
+#ifdef WRITE_LOG
+#include <QTextStream>
+#include <QFile>
+#endif
+#ifdef Q_OS_SYMBIAN
+#include "smfclientsymbian.h"
+#else
+#include "SmfClientQt.h"
+#endif
+
+SmfRelationMgrPrivate::SmfRelationMgrPrivate(SmfRelationMgr* relnMngr)
+	{
+	//private impl for symbian
+	#ifdef Q_OS_SYMBIAN
+	m_SmfClientPrivate = CSmfClientSymbian::NewL();
+	#endif
+	}
+SmfRelationMgrPrivate::~SmfRelationMgrPrivate()
+	{
+	if(m_SmfClientPrivate)
+		{
+		delete m_SmfClientPrivate;
+		m_SmfClientPrivate = NULL;
+		}
+	}
+SmfRelationId SmfRelationMgrPrivate::create(SmfProvider *provider, SmfContact *contact)
+	{
+	m_dataForDSM.clear();
+	QDataStream writeStream(&m_dataForDSM,QIODevice::WriteOnly);
+	writeStream<<*(provider);
+	writeStream<<contact;
+	m_dataFromDSM.clear();
+	SmfError err=SmfNoError;
+	m_dataFromDSM = m_SmfClientPrivate->sendDSMSyncRequest(SmfRelationCreate,m_dataForDSM,err,maxSmfRelationIdSize);
+	if(err==SmfNoError)
+		{
+		QDataStream readStream(&m_dataFromDSM,QIODevice::ReadOnly);
+		SmfRelationId relnId;
+		readStream>>relnId;
+		return relnId;
+		}
+	else
+		{
+		User::Panic(_L("DSM err="),err);
+		}
+	}
+SmfError SmfRelationMgrPrivate::associate(const SmfRelationId& relation,const SmfContact* contact,SmfProvider* provider)
+	{
+	m_dataForDSM.clear();
+	QDataStream writeStream(&m_dataForDSM,QIODevice::WriteOnly);
+	writeStream<<relation;
+	writeStream<<contact;
+	writeStream<<provider;
+	
+	m_dataFromDSM.clear();
+	SmfError err = SmfNoError;
+	int maxAlloc = 100;
+	m_dataFromDSM = m_SmfClientPrivate->sendDSMSyncRequest(SmfRelationAssociate,m_dataForDSM,err,maxAlloc);
+	if(err == SmfNoError)
+		{
+		QDataStream readStream(&m_dataFromDSM,QIODevice::ReadOnly);
+		int errInt;
+		readStream>>errInt;
+		err = (SmfError)errInt;
+		}
+	else
+		{
+		User::Panic(_L("DSM err="),err);
+		}
+	return err;
+	}
+SmfError SmfRelationMgrPrivate::remove(SmfRelationId& relation,const SmfContact* contact)
+	{
+	m_dataForDSM.clear();
+	QDataStream writeStream(&m_dataForDSM,QIODevice::WriteOnly);
+	writeStream<<relation;
+	writeStream<<*(contact);
+	
+	m_dataFromDSM.clear();
+	SmfError err = SmfNoError;
+	int maxAlloc = 100;
+	m_dataFromDSM = m_SmfClientPrivate->sendDSMSyncRequest(SmfRelationRemove,m_dataForDSM,err,maxAlloc);
+	if(err == SmfNoError)
+		{
+		QDataStream readStream(&m_dataFromDSM,QIODevice::ReadOnly);
+		int errInt;
+		readStream>>errInt;
+		err = (SmfError)errInt;
+		}
+	else
+		{
+		const QString errStr = QString::number(err);
+		Q_ASSERT_X(1,"SmfRelationMgrPrivate::remove","error");
+		}
+	return err;
+	}
+SmfRelationItem SmfRelationMgrPrivate::searchById(const SmfRelationId& relation)
+	{
+	m_dataForDSM.clear();
+	QDataStream writeStream(&m_dataForDSM,QIODevice::WriteOnly);
+	writeStream<<relation;
+	
+	m_dataFromDSM.clear();
+	int maxAlloc = MaxSmfContactSize;
+	SmfError err=SmfNoError;
+	m_dataFromDSM = m_SmfClientPrivate->sendDSMSyncRequest(SmfRelationSearchById,m_dataForDSM,err,maxAlloc);
+	if(err == SmfNoError)
+		{
+		QDataStream readStream(&m_dataFromDSM,QIODevice::ReadOnly);
+		SmfRelationItem relnItem;
+		readStream>>relnItem;
+		return relnItem;
+		}
+	else
+		{
+		User::Panic(_L("DSM err="),err);
+		}
+	}
+SmfRelationId SmfRelationMgrPrivate::searchByContact( SmfContact contact)
+	{
+	m_dataForDSM.clear();
+	QDataStream writeStream(&m_dataForDSM,QIODevice::WriteOnly);
+	writeStream<<contact;
+	
+	m_dataFromDSM.clear();
+	int maxAlloc = 1000;
+	SmfError err=SmfNoError;
+	m_dataFromDSM = m_SmfClientPrivate->sendDSMSyncRequest(SmfRelationSearchByContact,m_dataForDSM,err,maxAlloc);
+	if(err == SmfNoError)
+		{
+		QDataStream readStream(&m_dataFromDSM,QIODevice::ReadOnly);
+		SmfRelationId relnId;
+		readStream>>relnId;
+		return relnId;
+		}
+	else
+		{
+		User::Panic(_L("DSM err="),err);
+		}
+	}
+//number of contacts in a relation
+uint SmfRelationMgrPrivate::count(SmfRelationId relation)
+	{
+	m_dataForDSM.clear();
+	QDataStream writeStream(&m_dataForDSM,QIODevice::WriteOnly);
+	writeStream<<relation;
+	
+	m_dataFromDSM.clear();
+	SmfError err = SmfNoError;
+	int maxAlloc = 100;
+	m_dataFromDSM = m_SmfClientPrivate->sendDSMSyncRequest(SmfRelationCount,m_dataForDSM,err,maxAlloc);
+	if(err == SmfNoError)
+		{
+		QDataStream readStream(&m_dataForDSM,QIODevice::ReadOnly);
+		uint count;
+		readStream>>count;
+		return count;
+		}
+	else
+		{
+		User::Panic(_L("DSM err="),err);
+		}
+	}
+
+SmfRelationItem SmfRelationMgrPrivate::get(SmfRelationId& relation, quint32 index)
+	{
+	m_dataForDSM.clear();
+	QDataStream writeStream(&m_dataForDSM,QIODevice::WriteOnly);
+	writeStream<<relation;
+	
+	m_dataFromDSM.clear();
+	SmfError err = SmfNoError;
+	int maxAlloc = maxSmfRelationItemSize;
+	m_dataFromDSM = m_SmfClientPrivate->sendDSMSyncRequest(SmfRelationGet,m_dataForDSM,err,maxAlloc);
+	if(err == SmfNoError)
+		{
+		QDataStream readStream(&m_dataFromDSM,QIODevice::ReadOnly);
+		SmfRelationItem relationItem;
+		readStream>>relationItem;
+		return relationItem;
+		}
+	else
+		{
+		User::Panic(_L("DSM err="),err);
+		}
+	}
+QList<SmfRelationItem> SmfRelationMgrPrivate::getAll(SmfRelationId& relation)
+	{
+	m_dataForDSM.clear();
+	
+	m_dataFromDSM.clear();
+	SmfError err = SmfNoError;
+	int maxAlloc = maxSmfRelationItemSize*maxRelationItems;
+	m_dataFromDSM = m_SmfClientPrivate->sendDSMSyncRequest(SmfRelationGetAll,m_dataForDSM,err,maxAlloc);
+	if(err == SmfNoError)
+		{
+	QDataStream readStream(&m_dataFromDSM,QIODevice::ReadOnly);
+	QList<SmfRelationItem> relationItemList;
+	readStream>>relationItemList;
+	return relationItemList;
+		}
+	else
+		{
+		User::Panic(_L("DSM err="),err);
+		}
+	}
+QList<SmfRelationId> SmfRelationMgrPrivate::getAllRelations()
+	{
+	m_dataForDSM.clear();
+	
+	m_dataFromDSM.clear();
+	SmfError err = SmfNoError;
+	int maxAlloc = 1000*maxRelationItems;
+	m_dataFromDSM = m_SmfClientPrivate->sendDSMSyncRequest(SmfRelationGetAllRelations,m_dataForDSM,err,maxAlloc);
+	if(err == SmfNoError)
+		{
+		QDataStream readStream(&m_dataFromDSM,QIODevice::ReadOnly);
+		QList<SmfRelationId> relationIdList;
+		readStream>>relationIdList;
+		return relationIdList;
+		}
+	else
+		{
+		User::Panic(_L("DSM err="),err);
+		}
+	}
+SmfError SmfRelationMgrPrivate::Delete(SmfRelationId& relation)
+	{
+	
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/smf/smfservermodule/smfclient/client/smfrelationmgr_p.h	Wed Jun 23 19:51:49 2010 +0530
@@ -0,0 +1,79 @@
+/**
+ * Copyright (c) 2010 Sasken Communication Technologies Ltd.
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of the "Eclipse Public License v1.0" 
+ * which accompanies  this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html"
+ *
+ * Initial Contributors:
+ * Chandradeep Gandhi, Sasken Communication Technologies Ltd - Initial contribution
+ *
+ * Contributors:
+ * Manasij Roy, Nalina Hariharan
+ * 
+ * Description:
+ *
+ */
+#include "smfprovider.h"
+#include "SmfClientGlobal.h"
+#include "smfGlobal.h"
+#include "SmfObserver.h"
+
+#include <QStringList>
+#include "smfrelationmgr.h"
+class SmfProvider;
+#ifdef Q_OS_SYMBIAN
+class CSmfClientSymbian;
+#else
+class SmfClientQt;
+#endif
+class SmfRelationMgrPrivate
+	{
+public:
+	SmfRelationMgrPrivate(SmfRelationMgr* relnMngr);
+	~SmfRelationMgrPrivate();
+	//create a relation with first contact (id optional)
+	SmfRelationId create(SmfProvider *provider=NULL, SmfContact *contact=NULL);
+	/** assign contact to a relation */
+	SmfError associate( const SmfRelationId& relation,
+						const SmfContact* contact,
+						SmfProvider* provider);
+
+	/** remove contact from a relation */
+	SmfError remove(SmfRelationId& relation,
+					const SmfContact* conact);
+
+	/** returns first relation item in the relation when exists, NULL otherwise */
+	SmfRelationItem searchById(const SmfRelationId& relation);
+
+	/** returns relation Id for a given contacts if exists, NULL otherwise */
+	SmfRelationId searchByContact( SmfContact contact);
+
+	/** returns number of contacts in a relation*/
+	uint count(SmfRelationId relation);
+
+	/** contacts and their provider */
+	SmfRelationItem get(SmfRelationId& relation, quint32 index);
+
+	/** list of contacts and their provider */
+	QList<SmfRelationItem> getAll(SmfRelationId& relation);
+
+	/** list of all relations */
+	QList<SmfRelationId> getAllRelations();
+
+	/** delete a particular relation*/
+	SmfError Delete(SmfRelationId& relation);
+private:
+#ifdef Q_OS_SYMBIAN
+  CSmfClientSymbian* m_SmfClientPrivate;
+  friend class CSmfClientSymbian;
+  int m_xtraInfoFlag;
+  int m_pageInfoFlag;
+#else
+  SmfClientQt* m_SmfClientPrivate;
+  friend class SmfClientQt;
+#endif
+  QByteArray m_dataForDSM;
+  QByteArray m_dataFromDSM;
+	};
--- a/smf/smfservermodule/smfclient/common/common.pri	Mon Jun 07 11:43:45 2010 +0100
+++ b/smf/smfservermodule/smfclient/common/common.pri	Wed Jun 23 19:51:49 2010 +0530
@@ -1,103 +1,119 @@
-INCLUDEPATH += $$PWD
+INCLUDEPATH += common \
+    ./
 
 PUBLIC_HEADERS += \
-	$$PWD/smfalbum.h \
-	$$PWD/smfartists.h \
-	$$PWD/smfcomment.h \
-	$$PWD/smfcontact.h \
-	$$PWD/smfevent.h \
-	$$PWD/smfgroup.h \
-	$$PWD/smflocation.h \
-	$$PWD/smflyrics.h \
-	$$PWD/smfmusicfingerprint.h \
-	$$PWD/smfmusicprofile.h \
-	$$PWD/smfmusicrating.h \
-	$$PWD/smfpicture.h \
-	$$PWD/smfplaylist.h \
-	$$PWD/smfpluginutil.h \
-	$$PWD/smfpost.h \
-	$$PWD/smfprovider.h \
-	$$PWD/smfsubtitle.h \
-	$$PWD/smftrackinfo.h \
-	$$PWD/smfclientglobal.h \
-	$$PWD/smfglobal.h \
-	$$PWD/smfobserver.h
+	common/smfactions.h \
+	common/smfalbum.h \
+	common/smfartists.h \
+	common/smfcomment.h \
+	common/smfcontact.h \
+	common/smfevent.h \
+	common/smfgroup.h \
+	common/smflocation.h \
+	common/smflyrics.h \
+	common/smfmusicfingerprint.h \
+	common/smfmusicprofile.h \
+	common/smfmusicrating.h \
+	common/smfpicture.h \
+	common/smfpicturealbum.h \
+	common/smfplaylist.h \
+	common/smfpluginutil.h \
+	common/smfpost.h \
+	common/smfprovider.h \
+	common/smfsubtitle.h \
+	common/smftrackinfo.h \
+	common/smfurl.h \
+	common/smfclientglobal.h \
+	common/smfglobal.h \
+	common/smfobserver.h
 
 PRIVATE_HEADERS += \
-	$$PWD/smfalbum_p.h \
-	$$PWD/smfartists_p.h \
-	$$PWD/smfcomment_p.h \
-	$$PWD/smfcontact_p.h \
-	$$PWD/smfevent_p.h \
-	$$PWD/smfgroup_p.h \
-	$$PWD/smflocation_p.h \
-	$$PWD/smflyrics_p.h \
-	$$PWD/smfmusicfingerprint_p.h \
-	$$PWD/smfmusicprofile_p.h \
-	$$PWD/smfmusicrating_p.h \
-	$$PWD/smfpicture_p.h \
-	$$PWD/smfplaylist_p.h \
-	$$PWD/smfpost_p.h \
-	$$PWD/smfsubtitle_p.h \
-	$$PWD/smftrackinfo_p.h \
-	$$PWD/smfobserver.h
+	common/smfactions_p.h \
+	common/smfalbum_p.h \
+	common/smfartists_p.h \
+	common/smfcomment_p.h \
+	common/smfcontact_p.h \
+	common/smfevent_p.h \
+	common/smfgroup_p.h \
+	common/smflocation_p.h \
+	common/smflyrics_p.h \
+	common/smfmusicfingerprint_p.h \
+	common/smfmusicprofile_p.h \
+	common/smfmusicrating_p.h \
+	common/smfpicture_p.h \
+	common/smfpicturealbum_p.h \
+	common/smfplaylist_p.h \
+	common/smfpost_p.h \
+	common/smfsubtitle_p.h \
+	common/smftrackinfo_p.h \
+	common/smfurl_p.h \
+	common/smfobserver.h
 
 SOURCES += \
-	$$PWD/smfalbum.cpp \
-	$$PWD/smfartists.cpp \
-	$$PWD/smfcomment.cpp \
-	$$PWD/smfcontact.cpp \
-	$$PWD/smfevent.cpp \
-	$$PWD/smfgroup.cpp \
-	$$PWD/smflocation.cpp \
-	$$PWD/smflyrics.cpp \
-	$$PWD/smfmusicfingerprint.cpp \
-	$$PWD/smfmusicprofile.cpp \
-	$$PWD/smfmusicrating.cpp \
-	$$PWD/smfpicture.cpp \
-	$$PWD/smfplaylist.cpp \
-	$$PWD/smfpluginutil.cpp \
-	$$PWD/smfpost.cpp \
-	$$PWD/smfprovider.cpp \
-	$$PWD/smfsubtitle.cpp \
-	$$PWD/smftrackinfo.cpp
+	common/smfactions.cpp \
+	common/smfalbum.cpp \
+	common/smfartists.cpp \
+	common/smfcomment.cpp \
+	common/smfcontact.cpp \
+	common/smfevent.cpp \
+	common/smfgroup.cpp \
+	common/smflocation.cpp \
+	common/smflyrics.cpp \
+	common/smfmusicfingerprint.cpp \
+	common/smfmusicprofile.cpp \
+	common/smfmusicrating.cpp \
+	common/smfpicture.cpp \
+	common/smfpicturealbum.cpp \
+	common/smfplaylist.cpp \
+	common/smfpluginutil.cpp \
+	common/smfpost.cpp \
+	common/smfprovider.cpp \
+	common/smfsubtitle.cpp \
+	common/smftrackinfo.cpp \
+	common/smfurl.cpp
 
-symbian: {
-	BLD_INF_RULES.prj_exports += $$PWD/smfclientglobal.h
-	BLD_INF_RULES.prj_exports += $$PWD/smfglobal.h
-	BLD_INF_RULES.prj_exports += $$PWD/smfobserver.h
-	BLD_INF_RULES.prj_exports += $$PWD/smfalbum.h
-	BLD_INF_RULES.prj_exports += $$PWD/smfalbum_p.h
-	BLD_INF_RULES.prj_exports += $$PWD/smfartists.h
-	BLD_INF_RULES.prj_exports += $$PWD/smfartists_p.h
-	BLD_INF_RULES.prj_exports += $$PWD/smfcomment.h
-	BLD_INF_RULES.prj_exports += $$PWD/smfcomment_p.h
-	BLD_INF_RULES.prj_exports += $$PWD/smfcontact.h
-	BLD_INF_RULES.prj_exports += $$PWD/smfcontact_p.h
-	BLD_INF_RULES.prj_exports += $$PWD/smfevent.h
-	BLD_INF_RULES.prj_exports += $$PWD/smfevent_p.h
-	BLD_INF_RULES.prj_exports += $$PWD/smfgroup.h
-	BLD_INF_RULES.prj_exports += $$PWD/smfgroup_p.h
-	BLD_INF_RULES.prj_exports += $$PWD/smflocation.h
-	BLD_INF_RULES.prj_exports += $$PWD/smflocation_p.h
-	BLD_INF_RULES.prj_exports += $$PWD/smflyrics.h
-	BLD_INF_RULES.prj_exports += $$PWD/smflyrics_p.h
-	BLD_INF_RULES.prj_exports += $$PWD/smfmusicfingerprint.h
-	BLD_INF_RULES.prj_exports += $$PWD/smfmusicfingerprint_p.h
-	BLD_INF_RULES.prj_exports += $$PWD/smfmusicprofile.h
-	BLD_INF_RULES.prj_exports += $$PWD/smfmusicprofile_p.h
-	BLD_INF_RULES.prj_exports += $$PWD/smfmusicrating.h
-	BLD_INF_RULES.prj_exports += $$PWD/smfmusicrating_p.h
-	BLD_INF_RULES.prj_exports += $$PWD/smfpicture.h
-	BLD_INF_RULES.prj_exports += $$PWD/smfpicture_p.h
-	BLD_INF_RULES.prj_exports += $$PWD/smfplaylist.h
-	BLD_INF_RULES.prj_exports += $$PWD/smfplaylist_p.h
-	BLD_INF_RULES.prj_exports += $$PWD/smfpluginutil.h
-	BLD_INF_RULES.prj_exports += $$PWD/smfpost.h
-	BLD_INF_RULES.prj_exports += $$PWD/smfpost_p.h
-	BLD_INF_RULES.prj_exports += $$PWD/smfprovider.h
-	BLD_INF_RULES.prj_exports += $$PWD/smfsubtitle.h
-	BLD_INF_RULES.prj_exports += $$PWD/smfsubtitle_p.h
-	BLD_INF_RULES.prj_exports += $$PWD/smftrackinfo.h
-	BLD_INF_RULES.prj_exports += $$PWD/smftrackinfo_p.h
+symbian: { 
+	BLD_INF_RULES.prj_exports += common/smfclientglobal.h
+	BLD_INF_RULES.prj_exports += common/smfglobal.h
+	BLD_INF_RULES.prj_exports += common/smfobserver.h
+	BLD_INF_RULES.prj_exports += common/smfactions.h
+	BLD_INF_RULES.prj_exports += common/smfactions_p.h
+	BLD_INF_RULES.prj_exports += common/smfalbum.h
+	BLD_INF_RULES.prj_exports += common/smfalbum_p.h
+	BLD_INF_RULES.prj_exports += common/smfartists.h
+	BLD_INF_RULES.prj_exports += common/smfartists_p.h
+	BLD_INF_RULES.prj_exports += common/smfcomment.h
+	BLD_INF_RULES.prj_exports += common/smfcomment_p.h
+	BLD_INF_RULES.prj_exports += common/smfcontact.h
+	BLD_INF_RULES.prj_exports += common/smfcontact_p.h
+	BLD_INF_RULES.prj_exports += common/smfevent.h
+	BLD_INF_RULES.prj_exports += common/smfevent_p.h
+	BLD_INF_RULES.prj_exports += common/smfgroup.h
+	BLD_INF_RULES.prj_exports += common/smfgroup_p.h
+	BLD_INF_RULES.prj_exports += common/smflocation.h
+	BLD_INF_RULES.prj_exports += common/smflocation_p.h
+	BLD_INF_RULES.prj_exports += common/smflyrics.h
+	BLD_INF_RULES.prj_exports += common/smflyrics_p.h
+	BLD_INF_RULES.prj_exports += common/smfmusicfingerprint.h
+	BLD_INF_RULES.prj_exports += common/smfmusicfingerprint_p.h
+	BLD_INF_RULES.prj_exports += common/smfmusicprofile.h
+	BLD_INF_RULES.prj_exports += common/smfmusicprofile_p.h
+	BLD_INF_RULES.prj_exports += common/smfmusicrating.h
+	BLD_INF_RULES.prj_exports += common/smfmusicrating_p.h
+	BLD_INF_RULES.prj_exports += common/smfpicture.h
+	BLD_INF_RULES.prj_exports += common/smfpicture_p.h
+	BLD_INF_RULES.prj_exports += common/smfpicturealbum.h
+	BLD_INF_RULES.prj_exports += common/smfpicturealbum_p.h
+	BLD_INF_RULES.prj_exports += common/smfplaylist.h
+	BLD_INF_RULES.prj_exports += common/smfplaylist_p.h
+	BLD_INF_RULES.prj_exports += common/smfpluginutil.h
+	BLD_INF_RULES.prj_exports += common/smfpost.h
+	BLD_INF_RULES.prj_exports += common/smfpost_p.h
+	BLD_INF_RULES.prj_exports += common/smfprovider.h
+	BLD_INF_RULES.prj_exports += common/smfsubtitle.h
+	BLD_INF_RULES.prj_exports += common/smfsubtitle_p.h
+	BLD_INF_RULES.prj_exports += common/smftrackinfo.h
+	BLD_INF_RULES.prj_exports += common/smftrackinfo_p.h
+	BLD_INF_RULES.prj_exports += common/smfurl.h
+	BLD_INF_RULES.prj_exports += common/smfurl_p.h
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/smf/smfservermodule/smfclient/common/smfactions.cpp	Wed Jun 23 19:51:49 2010 +0530
@@ -0,0 +1,440 @@
+/**
+ * Copyright (c) 2010 Sasken Communication Technologies Ltd.
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of the "Eclipse Public License v1.0" 
+ * which accompanies  this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html"
+ *
+ * Initial Contributors:
+ * Chandradeep Gandhi, Sasken Communication Technologies Ltd - Initial contribution
+ *
+ * Contributors:
+ * Manasij Roy, Nalina Hariharan
+ * 
+ * Description:
+ * Represents activities in terms similar to standard activity 
+ * stream http://activitystrea.ms/
+ *
+ */
+
+#include "smfactions.h"
+#include "smfactions_p.h"
+
+
+/**
+ * Constructor
+ */
+SmfActivityObject::SmfActivityObject( )
+	{
+	d = new SmfActivityObjectPrivate;
+	}
+
+/**
+ * Copy Constructor
+ * @param aOther The reference object
+ */
+SmfActivityObject::SmfActivityObject( const SmfActivityObject &aOther )
+	: d( aOther.d )
+	{
+	}
+
+/**
+ * Overloaded = operator
+ * @param aOther The reference object
+ * @return The target reference value
+ */
+SmfActivityObject& SmfActivityObject::operator=( const SmfActivityObject &aOther )
+	{
+	d->m_id = aOther.d->m_id;
+	d->m_thumbnail = aOther.d->m_thumbnail;
+	d->m_caption = aOther.d->m_caption;
+	d->m_type = aOther.d->m_type;
+	d->m_objData = aOther.d->m_objData;
+	d->m_link = aOther.d->m_link;
+	d->m_time = aOther.d->m_time;
+	d->m_content = aOther.d->m_content;
+	return *this;
+	}
+
+/**
+ * Destructor
+ */
+SmfActivityObject::~SmfActivityObject( )
+	{
+	}
+
+
+/**
+ * @return returns service specific Id of this object in the entry 
+ */
+QString SmfActivityObject::id( ) const
+	{
+	return d->m_id;
+	}
+
+/**
+ * @return returns thumbnail if availabel for this object in the entry
+ */
+QImage SmfActivityObject::thumbnail( ) const
+	{
+	return d->m_thumbnail;
+	}
+
+/**
+ * @return Captions for this object
+ */
+QString SmfActivityObject::caption( ) const
+	{
+	return d->m_caption;
+	}
+
+/**
+ * @return retruns the type of this object
+ */
+SmfActivityObjectType SmfActivityObject::type( ) const
+	{
+	return d->m_type;
+	}
+
+/**
+ * @return returns data of the object - see type() for casting
+ */
+QVariant SmfActivityObject::objData( ) const
+	{
+	return d->m_objData;
+	}
+
+/**
+ * @return url of this object, e.g. url of the image on which somebody commented
+ */
+QString SmfActivityObject::link( ) const
+	{
+	return d->m_link;
+	}
+
+/**
+ * @return Time of creation of this object
+ */
+QDateTime SmfActivityObject::time( ) const
+	{
+	return d->m_time;
+	}
+
+/**
+ * @return Description of the content of this object
+ */
+QString SmfActivityObject::content( ) const
+	{
+	return d->m_content;
+	}
+
+/**
+ * Sets service specific id for this object
+ * @param aId The id to be set
+ */
+void SmfActivityObject::setId(const QString& aId)
+	{
+	d->m_id = aId;
+	}
+
+/**
+ * Sets thumbnail for this object , not mandatory
+ * @param aIcon The thumbnail image
+ */
+void SmfActivityObject::setThumbnail(const QImage& aIcon)
+	{
+	d->m_thumbnail = aIcon;
+	}
+
+/**
+ * Sets caption for this object
+ * @param aCaption The caption to be set
+ */
+void SmfActivityObject::setCaption(const QString& aCap)
+	{
+	d->m_caption = aCap;
+	}
+
+/**
+ * Sets type of this object - ObjData should be set next accordingly
+ * @param aObjType The activity type to be set
+ */
+void SmfActivityObject::setType(const SmfActivityObjectType& aObjType)
+	{
+	d->m_type = aObjType;
+	}
+
+/**
+ * Sets object data e,g, SmfImage, SmfComment, SmfMusic, SmfEvent etc
+ * setType() with suitable type should have been called before
+ * @param aData The object data to be set  
+ */
+void SmfActivityObject::setObjData( const QVariant& aData)
+	{
+	d->m_objData = aData;
+	}
+
+/**
+ * Sets the url for the object
+ * @param aLink The Link to be set
+ */
+void SmfActivityObject::setLink( const QString& aLink)
+	{
+	d->m_link = aLink;
+	}
+
+/**
+ * Sets the time of creation/last modification of the object
+ * @param aTime The time to be set
+ */
+void SmfActivityObject::setTime( const QDateTime& aTime)
+	{
+	d->m_time = aTime;
+	}
+
+/**
+ * Sets the description of the content of this object
+ * @param aText The content to be set
+ */
+void SmfActivityObject::setContent( const QString& aText)
+	{
+	d->m_content = aText;
+	}
+
+/**
+ * Method for Externalization. Writes the SmfActivityObject object to 
+ * the stream and returns a reference to the stream.
+ * @param aDataStream Stream to be written
+ * @param aObj The SmfActivityObject object to be externalized
+ * @return reference to the written stream
+ */
+ QDataStream &operator<<( QDataStream &aDataStream, 
+		const SmfActivityObject &aObj )
+	{
+	aDataStream<<aObj.d->m_id;
+	aDataStream<<aObj.d->m_thumbnail;
+	aDataStream<<aObj.d->m_caption;
+	aDataStream<<aObj.d->m_type;
+	aDataStream<<aObj.d->m_objData;
+	aDataStream<<aObj.d->m_link;
+	aDataStream<<aObj.d->m_time;
+	aDataStream<<aObj.d->m_content;
+		
+	return aDataStream;
+	}
+
+/**
+ * Method for Internalization. Reads a SmfActivityObject object from 
+ * the stream and returns a reference to the stream.
+ * @param aDataStream Stream to be read
+ * @param aObj The SmfActivityObject object to be internalized
+ * @return reference to the stream
+ */
+ QDataStream &operator>>( QDataStream &aDataStream, 
+		SmfActivityObject &aObj)
+	{
+	aDataStream>>aObj.d->m_id;
+	aDataStream>>aObj.d->m_thumbnail;
+	aDataStream>>aObj.d->m_caption;
+	int i;
+	aDataStream>>i;
+	aObj.d->m_type = (SmfActivityObjectType)i;
+	aDataStream>>aObj.d->m_objData;
+	aDataStream>>aObj.d->m_link;
+	aDataStream>>aObj.d->m_time;
+	aDataStream>>aObj.d->m_content;
+	
+	return aDataStream;
+	}
+
+ 
+ 
+SmfActivityEntry::SmfActivityEntry()
+ 	{
+	d = new SmfActivityEntryPrivate;
+ 	}
+SmfActivityEntry::SmfActivityEntry( const SmfActivityEntry &aOther )
+	:d( aOther.d )
+	{
+	}
+SmfActivityEntry::~SmfActivityEntry()
+	{
+	
+	}
+/**
+ * @return Returns service specific id of the of entry 
+ */
+QString SmfActivityEntry::id() const
+	{
+	return d->m_id;
+	}
+
+/**
+ * @return Returns the title of the entry - mostly be a string 
+ */
+SmfPost SmfActivityEntry::title() const
+	{
+	return d->m_title;
+	}
+
+/**
+ * @return Returns detail descriptiopn of this entry in the activity list. might be absent if title is sufficient
+ */
+SmfPost SmfActivityEntry::details() const
+	{
+	return d->m_details;
+	}
+
+/**
+ * @return Returns the author of the activity - the name and the uri field are most commonly used
+ * Other information fields might be empty
+ */
+SmfContact SmfActivityEntry::author() const
+	{
+	return d->m_author;
+	}
+
+/**
+ * @return Returns the verb of the activity ,e.g. Robin "marked" Joseph as a friend   
+ */
+SmfActivityVerb SmfActivityEntry::actionName() const
+	{
+	return d->m_actionName;
+	}
+
+/**
+ * There can be multiple objects in a single activity entry, though this may be rare - only for few verbs.
+ * @return list of activity objects (mostly one object)
+ */
+QList<SmfActivityObject> SmfActivityEntry::activities() const
+	{
+	return d->m_activities;
+	}
+
+/**
+ * @return Returns information about the target of the activity, for verbs that support a target.
+ * For example, a target is a photo album to which photos were added
+ */
+SmfActivityObject SmfActivityEntry::targetObj() const
+	{
+	return d->m_targetObj;
+	}
+
+/**
+ * Sets service specific id of the of entry 
+ * @param aId The id to be set
+ */
+bool SmfActivityEntry::setId( const QString& aId)
+	{
+	d->m_id = aId;
+	return true;
+	}
+
+/**
+ * Sets the title of the entry - mostly be a string
+ * @param aTitle The title to be set 
+ */
+bool SmfActivityEntry::setTitle(const SmfPost& aTitle)
+	{
+	d->m_title = aTitle;
+	return true;
+	}
+
+/**
+ * Sets detail description of this entry in the activity list. might be absent if title is sufficient
+ * @param aDetails The details to be set
+ */
+bool SmfActivityEntry::setDetails(const SmfPost& aDetails)
+	{
+	d->m_details = aDetails;
+	return true;
+	}
+
+/**
+ * Sets the author of the activity - the name and the uri field are most commonly used
+ * Oher information fields might be empty
+ * @param aContact The author to be set
+ */
+bool SmfActivityEntry::setAuthor(const SmfContact& aContact)
+	{
+	d->m_author = aContact;
+	return true;
+	}
+
+/**
+ * Sets the verb of the activity ,e.g. Robin "marked" Joseph as a friend
+ * @param aVerb The action name to be set   
+ */
+void SmfActivityEntry::setActionName(SmfActivityVerb  aVerb)
+	{
+	d->m_actionName = aVerb;
+	}
+
+/**
+ * Sets single or multiple objects in a single activity entry, though multiple may be rare - only for few verbs.
+ * @param list of activity objects (mostly one object)
+ */
+bool SmfActivityEntry::setActivities(QList<SmfActivityObject>& aList)
+	{
+	d->m_activities = aList;
+	return true;
+	}
+
+/**
+ * Returns information about the target of the activity, for verbs that support a target.
+ * For example, a target is a photo album to which photos were added
+ * @param aTarget The activity object to be set
+ */
+bool SmfActivityEntry::setTargetObj(const SmfActivityObject& aTarget)
+	{
+	d->m_targetObj = aTarget;
+	return true;
+	}
+
+
+/**
+ * Method for Externalization. Writes the SmfActivityEntry object to 
+ * the stream and returns a reference to the stream.
+ * @param aDataStream Stream to be written
+ * @param aObj The SmfActivityEntry object to be externalized
+ * @return reference to the written stream
+ */
+ QDataStream &operator<<( QDataStream &aDataStream, 
+		const SmfActivityEntry &aObj )
+	{
+	aDataStream<<aObj.d->m_id;
+	aDataStream<<aObj.d->m_title;
+	aDataStream<<aObj.d->m_details;
+	aDataStream<<aObj.d->m_author;
+	aDataStream<<aObj.d->m_actionName;
+	aDataStream<<aObj.d->m_activities;
+	aDataStream<<aObj.d->m_targetObj;
+		
+	return aDataStream;
+	}
+
+/**
+ * Method for Internalization. Reads a SmfActivityEntry object from 
+ * the stream and returns a reference to the stream.
+ * @param aDataStream Stream to be read
+ * @param aObj The SmfActivityEntry object to be internalized
+ * @return reference to the stream
+ */
+ QDataStream &operator>>( QDataStream &aDataStream, 
+		 SmfActivityEntry &aObj)
+	{
+	aDataStream>>aObj.d->m_id;
+	aDataStream>>aObj.d->m_title;
+	aDataStream>>aObj.d->m_details;
+	aDataStream>>aObj.d->m_author;
+	int i;
+	aDataStream>>i;
+	aObj.d->m_actionName = (SmfActivityVerb)i;
+	aDataStream>>aObj.d->m_activities;
+	aDataStream>>aObj.d->m_targetObj;
+	
+	return aDataStream;
+	}
+
+ 
--- a/smf/smfservermodule/smfclient/common/smfactions.h	Mon Jun 07 11:43:45 2010 +0100
+++ b/smf/smfservermodule/smfclient/common/smfactions.h	Wed Jun 23 19:51:49 2010 +0530
@@ -9,6 +9,9 @@
  * Initial Contributors:
  * Chandradeep Gandhi, Sasken Communication Technologies Ltd - Initial contribution
  *
+ * Contributors:
+ * Manasij Roy, Nalina Hariharan
+ *
  * Description:
  * Represents activities in terms similar to standard activity stream http://activitystrea.ms/
  */
@@ -26,7 +29,13 @@
 #include <QMetaType>
 
 #include "smfclientglobal.h"
+#include "smfpost.h"
+#include "smfcontact.h"
 
+/**
+ * Implementation const
+ */
+const int MaxSmfActivityEntrySize = 5000;
 
 /**
  * The actions in the activity based on Atom Activity Base Schema
@@ -44,7 +53,7 @@
 	SmfActivitySave,
 	SmfActivityShare,
 	SmfActivityTag,
-	SmfActivityUpdate,
+	SmfActivityUpdate
 	};
 
 /**
@@ -93,7 +102,7 @@
 	{
 public:
 	/**
-	 * Constructor with default argument
+	 * Constructor
 	 */
 	SmfActivityObject();
 
@@ -103,102 +112,122 @@
 	SmfActivityObject(const SmfActivityObject& aOther);
 	
 	/**
+	 * Overloaded = operator
+	 * @param aOther The reference object
+	 * @return The target reference value
+	 */
+	SmfActivityObject& operator=( const SmfActivityObject &aOther );
+	
+	/**
 	 * Destructor
 	 */
 	~SmfActivityObject();
 
 	/**
-	 * retruns service specific Id of this object in the entry 
+	 * @return returns service specific Id of this object in the entry 
 	 */
 	QString id() const;
 	
 	/**
-	 * returns thumbnail if availabel for this object in the entry
+	 * @return returns thumbnail if availabel for this object in the entry
 	 */
 	QImage thumbnail() const;
 	
 	/**
-	 * Captions for this object
+	 * @return Captions for this object
 	 */
 	QString caption() const;
 	
 	/**
-	 * retruns the type of this object
+	 * @return retruns the type of this object
 	 */
-	SmfActivityObjectType type() const;
+	SmfActivityObjectType type( ) const;
 	
 	/**
-	 * returns data of the object - see type() for casting
+	 * @return returns data of the object - see type() for casting
 	 */
 	QVariant objData() const;
 	
 	/**
-	 * url of this object, e.g. url of the image on which somebody commented
+	 * @return url of this object, e.g. url of the image on which somebody commented
 	 */
 	QString link() const;
 	
 	/**
-	 * Time of creation of this object
+	 * @return Time of creation of this object
 	 */
 	QDateTime time() const;
 	
 	/**
-	 * Description of the content of this object
+	 * @return Description of the content of this object
 	 */
 	QString content() const;
 
 	/**
-	 * sets service specific id for this object
+	 * Sets service specific id for this object
+	 * @param aId The id to be set
 	 */
 	void setId(const QString& aId);
 	
 	/**
-	 * sets thumbnail for this object , not mandatory
+	 * Sets thumbnail for this object , not mandatory
+	 * @param aIcon The thumbnail image
 	 */
 	void setThumbnail(const QImage& aIcon);
 	
 	/**
-	 * sets caption for this object
+	 * Sets caption for this object
+	 * @param aCaption The caption to be set
 	 */
 	void setCaption(const QString& aCap);
 	
 	/**
-	 * sets type of this object - ObjData should be set next accordingly
+	 * Sets type of this object - ObjData should be set next accordingly
+	 * @param aObjType The activity type to be set
 	 */
 	void setType(const SmfActivityObjectType& aObjType);
 	
 	/**
-	 * sets object data e,g, SmfImage, SmfComment, SmfMusic, SmfEvent etc
+	 * Sets object data e,g, SmfImage, SmfComment, SmfMusic, SmfEvent etc
 	 * setType() with suitable type should have been called before  
+	 * @param aData The object data to be set  
 	 */
 	void setObjData( const QVariant& aData);
+	
 	/**
-	 * sets the url for the object
+	 * Sets the url for the object
+	 * @param aLink The Link to be set
 	 */
 	void setLink( const QString& aLink);
+	
 	/**
-	 * sets the time of creation/last modification of the object
+	 * Sets the time of creation/last modification of the object
+	 * @param aTime The time to be set
 	 */
 	void setTime( const QDateTime& aTime);
 	
 	/**
-	 * sets the description of the content of this object
+	 * Sets the description of the content of this object
+	 * @param aText The content to be set
 	 */
 	void setContent( const QString& aText) ;
 	
 private:
 	QSharedDataPointer<SmfActivityObjectPrivate> d;
 	
-	friend QDataStream& operator >> ( QDataStream &aOut, const SmfActivityObject& aData);
+	friend QDataStream& operator >> ( QDataStream &aOut, SmfActivityObject& aData);
 	friend QDataStream& operator << ( QDataStream &aIn, const SmfActivityObject& aData);	
 	};
+
+SMFCLIENT_EXPORT QDataStream& operator >> ( QDataStream &aOut, SmfActivityObject& aData);
+SMFCLIENT_EXPORT QDataStream& operator << ( QDataStream &aIn, const SmfActivityObject& aData);	
+
 // Make the class SmfActivityObject known to QMetaType, so that as to register it.
 Q_DECLARE_METATYPE(SmfActivityObject)
 
 
 
 
-
 class SmfActivityEntryPrivate;
 /**
  * @ingroup smf_common_group
@@ -214,27 +243,27 @@
 	~SmfActivityEntry();
 	
 	/**
-	 * Returns service specific id of the of entry 
+	 * @return Returns service specific id of the of entry 
 	 */
 	QString id() const;
 	/**
-	 * returns the title of the entry - mostly be a string 
+	 * @return Returns the title of the entry - mostly be a string 
 	 */
 	SmfPost title() const;
 
 	/**
-	 * returns detail descriptiopn of this entry in the activity list. might be absent if title is sufficient
+	 * @return Returns detail descriptiopn of this entry in the activity list. might be absent if title is sufficient
 	 */
 	SmfPost details() const;
 	
 	/**
-	 * returns the author of the activity - the name and the uri field are most commonly used
+	 * @return Returns the author of the activity - the name and the uri field are most commonly used
 	 * Other information fields might be empty
 	 */
 	SmfContact author() const;
 	
 	/**
-	 * returns the verb of the activity ,e.g. Robin "marked" Joseph as a friend   
+	 * @return Returns the verb of the activity ,e.g. Robin "marked" Joseph as a friend   
 	 */
 	SmfActivityVerb actionName() const;
 
@@ -245,55 +274,65 @@
 	QList<SmfActivityObject> activities() const;
 	
 	/**
-	 * returns information about the target of the activity, for verbs that support a target.
+	 * @return Returns information about the target of the activity, for verbs that support a target.
 	 * For example, a target is a photo album to which photos were added
 	 */
 	SmfActivityObject targetObj() const;
 
 	/**
-	 * sets service specific id of the of entry 
+	 * Sets service specific id of the of entry 
+	 * @param aId The id to be set
 	 */
 	bool setId( const QString& aId);
 	
 	/**
-	 * sets the title of the entry - mostly be a string 
+	 * Sets the title of the entry - mostly be a string
+	 * @param aTitle The title to be set 
 	 */
 	bool setTitle(const SmfPost& aTitle);
 
 	/**
-	 * sets detail descriptiopn of this entry in the activity list. might be absent if title is sufficient
+	 * Sets detail description of this entry in the activity list. might be absent if title is sufficient
+	 * @param aDetails The details to be set
 	 */
 	bool setDetails(const SmfPost& aDetails);
 	
 	/**
-	 * sets the author of the activity - the name and the uri field are most commonly used
-	 * Other information fields might be empty
+	 * Sets the author of the activity - the name and the uri field are most commonly used
+	 * Oher information fields might be empty
+	 * @param aContact The author to be set
 	 */
 	bool setAuthor(const SmfContact& aContact);
 	
 	/**
-	 * sets the verb of the activity ,e.g. Robin "marked" Joseph as a friend   
+	 * Sets the verb of the activity ,e.g. Robin "marked" Joseph as a friend
+	 * @param aVerb The action name to be set   
 	 */
 	void setActionName(SmfActivityVerb  aVerb);
 
 	/**
-	 * sets single or multiple objects in a single activity entry, though multiple may be rare - only for few verbs.
+	 * Sets single or multiple objects in a single activity entry, though multiple may be rare - only for few verbs.
 	 * @param list of activity objects (mostly one object)
 	 */
 	bool setActivities(QList<SmfActivityObject>& aList);
 	
 	/**
-	 * returns information about the target of the activity, for verbs that support a target.
+	 * Returns information about the target of the activity, for verbs that support a target.
 	 * For example, a target is a photo album to which photos were added
+	 * @param aTarget The activity object to be set
 	 */
 	bool setTargetObj(const SmfActivityObject& aTarget);
 	
 private:
 	QSharedDataPointer<SmfActivityEntryPrivate> d;
 	
-	friend QDataStream& operator >> ( QDataStream &aOut, const SmfActivityEntry& aData);
+	friend QDataStream& operator >> ( QDataStream &aOut, SmfActivityEntry& aData);
 	friend QDataStream& operator << ( QDataStream &aIn, const SmfActivityEntry& aData);	
 	};
+
+SMFCLIENT_EXPORT QDataStream& operator >> ( QDataStream &aOut, const SmfActivityEntry& aData);
+SMFCLIENT_EXPORT QDataStream& operator << ( QDataStream &aIn, const SmfActivityEntry& aData);	
+
 // Make the class SmfActivityEntry known to QMetaType, so that as to register it.
 Q_DECLARE_METATYPE(SmfActivityEntry)
 
--- a/smf/smfservermodule/smfclient/common/smfactions_p.h	Mon Jun 07 11:43:45 2010 +0100
+++ b/smf/smfservermodule/smfclient/common/smfactions_p.h	Wed Jun 23 19:51:49 2010 +0530
@@ -9,6 +9,9 @@
  * Initial Contributors:
  * Chandradeep Gandhi, Sasken Communication Technologies Ltd - Initial contribution
  *
+ * Contributors:
+ * Manasij Roy, Nalina Hariharan
+ * 
  * Description:
  * Contains private implementation of the smfactions
  */
@@ -18,7 +21,7 @@
 
 #include <QDateTime>
 #include <QSharedData>
-#include <QList>
+#include <QVariant>
 #include <QImage>
 #include <QDateTime>
 #include <QStringList>
@@ -28,13 +31,31 @@
 #include <QMetaType>
 
 #include "smfactions.h"
+#include "smfpost.h"
+#include "smfcontact.h"
 
 class SmfActivityObjectPrivate: public QSharedData
 	{
 public:	
-	SmfActivityObjectPrivate();
-	SmfActivityObjectPrivate(const SmfActivityObjectPrivate& aOther);
-	~SmfActivityObjectPrivate();
+	SmfActivityObjectPrivate( ) {
+		m_id.clear();
+		m_caption.clear();
+		m_link.clear();
+		m_content.clear();
+	}
+	
+	SmfActivityObjectPrivate( const SmfActivityObjectPrivate& aOther ) :
+		QSharedData (aOther),
+		m_id (aOther.m_id),
+		m_thumbnail (aOther.m_thumbnail),
+		m_caption (aOther.m_caption),
+		m_type (aOther.m_type),
+		m_objData (aOther.m_objData),
+		m_link (aOther.m_link),
+		m_time (aOther.m_time),
+		m_content (aOther.m_content) { }
+
+	~SmfActivityObjectPrivate( ) {}
 	
 	/**
 	 * Data members
@@ -52,10 +73,25 @@
 class SmfActivityEntryPrivate: public QSharedData
 	{
 public:
-	SmfActivityEntryPrivate();
-	SmfActivityEntryPrivate(const SmfActivityEntryPrivate& aOther);
-	~SmfActivityEntryPrivate();
+	SmfActivityEntryPrivate( ) {
+		m_id.clear();
+	}
 	
+	SmfActivityEntryPrivate( const SmfActivityEntryPrivate& aOther ) :
+		QSharedData (aOther),
+		m_id (aOther.m_id),
+		m_title (aOther.m_title),
+		m_details (aOther.m_details),
+		m_author (aOther.m_author),
+		m_actionName (aOther.m_actionName),
+		m_activities (aOther.m_activities),
+		m_targetObj (aOther.m_targetObj)  { }
+
+	~SmfActivityEntryPrivate( ) { }
+	
+	/**
+	 * Data members
+	 */
 	QString m_id;
 	SmfPost m_title;
 	SmfPost m_details;
--- a/smf/smfservermodule/smfclient/common/smfclientglobal.h	Mon Jun 07 11:43:45 2010 +0100
+++ b/smf/smfservermodule/smfclient/common/smfclientglobal.h	Wed Jun 23 19:51:49 2010 +0530
@@ -1,19 +1,36 @@
-/*
- * SmfClientGlobal.h
+/**
+ * Copyright (c) 2010 Sasken Communication Technologies Ltd.
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of the "Eclipse Public License v1.0"
+ * which accompanies  this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html"
  *
- *  Created on: Mar 22, 2010
- *      Author: manasij
+ * Initial Contributors:
+ * Chandradeep Gandhi, Sasken Communication Technologies Ltd - Initial contribution
+ *
+ * Contributors:
+ * Manasij Roy, Nalina Hariharan
+ *
+ * Description:
+ * Client DLL macro and server executable name
+ *
  */
 
 #ifndef SMFCLIENTGLOBAL_H_
 #define SMFCLIENTGLOBAL_H_
 
-#include <QtCore/QtGlobal>
+ #include <QtCore/QtGlobal>
 #include <QString>
+#ifdef Q_OS_SYMBIAN
+_LIT(KSmfServerName,"smfserver");
+_LIT(KSmfServerSemaphoreName,"smfserverSemaphore");
+_LIT(KSmfServerFilename,"smfserver");
+#else
 const QString KSmfServerName("smfserver");
 const QString KSmfServerSemaphoreName("smfserverSemaphore");
 const QString KSmfServerFilename("smfserver");
-
+#endif
 //TUid KSmfServerUID3 = { 0xE37E0269 };
 
  #ifdef SMFCLIENT_LIB_EXPORT
@@ -23,7 +40,7 @@
  #endif
 
 /**
- * To be designed later
+ * To be designed later
  */
 #define SMF_GETSERVICES(INTERFACE,INTERFACESTRING) ;
 #endif /* SMFCLIENTDEFS_H_ */
--- a/smf/smfservermodule/smfclient/common/smfcomment.h	Mon Jun 07 11:43:45 2010 +0100
+++ b/smf/smfservermodule/smfclient/common/smfcomment.h	Wed Jun 23 19:51:49 2010 +0530
@@ -23,7 +23,7 @@
 #include <QDateTime>
 #include <qdatastream.h>
 #include <QSharedData>
-#include <smfclientglobal.h>
+#include "smfclientglobal.h"
 #include <QMetaType>
 
 class SmfCommentPrivate;
--- a/smf/smfservermodule/smfclient/common/smfcontact.cpp	Mon Jun 07 11:43:45 2010 +0100
+++ b/smf/smfservermodule/smfclient/common/smfcontact.cpp	Wed Jun 23 19:51:49 2010 +0530
@@ -1,157 +1,1108 @@
-/*
- * smfcontact.cpp
+/**
+ * Copyright (c) 2010 Sasken Communication Technologies Ltd.
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of the "Eclipse Public License v1.0" 
+ * which accompanies  this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html"
  *
- *  Created on: Apr 15, 2010
- *      Author: manasij
+ * Initial Contributors:
+ * Chandradeep Gandhi, Sasken Communication Technologies Ltd - Initial contribution
+ *
+ * Contributors:
+ * Manasij Roy, Nalina Hariharan
+ * 
+ * Description:
+ * The contact class represents a social contact
+ * Note: This class has dependencies on QtMobility project
+ *
  */
-#include "smfcontact.h"
+
 #include <QFile>
 #include <QTextStream>
 
+#include "smfcontact.h"
 
-	/**
-	 * Constructor with default argument
-	 * @param aParent The parent object
-	 */
-	SmfContact::SmfContact( QObject *aParent)//:QObject(aParent)
+/**
+ * Constructor with default argument
+ * @param aParent The parent object
+ */
+SmfContact::SmfContact( QObject *aParent)
+	{
+	Q_UNUSED(aParent);
+	d = new SmfContactPrivate;
+	}
+
+/**
+ * Copy Constructor
+ * @param aOther The reference object
+ */
+SmfContact::SmfContact( const SmfContact &aOther ): d (aOther.d)
+	{
+	}
+
+/**
+ * Overloaded = operator
+ * @param aOther The reference object
+ * @return The target reference value
+ */
+SmfContact& SmfContact::operator=( const SmfContact &aOther )
+	{
+	d->m_details = aOther.d->m_details;
+	return *this;
+	}
+
+/**
+ * Destructor
+ */
+SmfContact::~SmfContact( )
 	{
-	        Q_UNUSED(aParent);
-		d = new SmfContactPrivate;
+	}
+
+/**
+ * Method to get the available sub fields for contacts.
+ * The following are the available sub types of a contact
+ *   QtMobility::QContactAddress		Address;
+ *   QtMobility::QContactAnniversary	Anniversary;
+ *   QtMobility::QContactAvatar			Avatar;
+ *   QtMobility::QContactBirthday		Birthday;
+ *   QtMobility::QContactId				ContactId;
+ *   QtMobility::QContactEmailAddress	EmailAddress;
+ *   QtMobility::QContactGender			Gender;
+ *   QtMobility::QContactGeoLocation	Geolocation;
+ *   QtMobility::QContactGuid			Guid;
+ *   QtMobility::QContactName			Name;
+ *   QtMobility::QContactNickname		Nickname;
+ *   QtMobility::QContactNote			Note;
+ *   QtMobility::QContactOnlineAccount	OnlineAccount;
+ *   QtMobility::QContactOrganization	Organization;
+ *   QtMobility::QContactPhoneNumber	PhoneNumber;
+ *   QtMobility::QContactPresence		Presence;
+ *   QtMobility::QContactThumbnail		Thumbnail;
+ *   QtMobility::QContactTimestamp		Timestamp;
+ *   QtMobility::QContactType			Type;
+ *   QtMobility::QContactUrl			Url;
+ * @return The Available sub fields for this contact
+ */
+QStringList SmfContact::subTypes( ) const
+	{
+	QStringList list = d->m_details.uniqueKeys();
+	return list;
+	}
+
+/**
+ * Method to convert an SmfContact to a QContact
+ * Changes made to the returned QContact will not be reflected 
+ * in its parent SmfContact object
+ * @param aContact QContact corresponding to SmfContact 
+ */
+void SmfContact::convert( QContact &aContact ) const
+	{
+// TODO:-
+	Q_UNUSED(aContact);
 	}
+
+/**
+ * Method to get the value of a sub field for this contact
+ * @param aSubType The sub field type 
+ * @return The value of the sub field subType
+ * @see subTypes()
+ */
+QVariant SmfContact::value( const QString& aSubType ) const
+	{
+	if(d->m_details.contains(aSubType))
+		return d->m_details.value(aSubType);
+	else
+		return QString();
+	}
+
+/**
+ * Method to set value for a subtype
+ * @param aSubType The subtype string
+ * @param value Thhe value to be set for the subtype
+ */
+void SmfContact::setValue(const QString& aSubType,QVariant& value)
+	{
+	d->m_details.insert(aSubType,value);
+	}
+
+/**
+ * Method for Externalization. Writes the SmfContact object to 
+ * the stream and returns a reference to the stream.
+ * @param aDataStream Stream to be written
+ * @param aContact The SmfContact object to be externalized
+ * @return reference to the written stream
+ */
+QDataStream &operator<<( QDataStream &aDataStream, 
+		const SmfContact& aContact )
+	{
+	QContactAddress address = aContact.value("Address").value<QContactAddress>();
+	aDataStream<<address;
 	
-	/**
-	 * Copy Constructor
-	 * @param aOther The reference object
-	 */
-	SmfContact::SmfContact( const SmfContact &aOther ): d (aOther.d)
-		{
-		
-		}
+	QContactAnniversary anniver = aContact.value("Anniversary").value<QContactAnniversary>();
+	aDataStream<<anniver;
+	
+	QContactAvatar avatar = aContact.value("Avatar").value<QContactAvatar>();
+	aDataStream<<avatar;
+	
+	QContactBirthday bday = aContact.value("Birthday").value<QContactBirthday>();
+	aDataStream<<bday;
+	
+	QContactId contactId = aContact.value("ContactId").value<QContactId>();
+	aDataStream<<contactId;
+	
+	QContactEmailAddress email = aContact.value("EmailAddress").value<QContactEmailAddress>();
+	aDataStream<<email;
+	
+	QContactGender gender = aContact.value("Gender").value<QContactGender>();
+	aDataStream<<gender;
+	
+	QContactGeoLocation geoloc = aContact.value("Geolocation").value<QContactGeoLocation>();
+	aDataStream<<geoloc;
+	
+	QContactGuid guid = aContact.value("Guid").value<QContactGuid>();
+	aDataStream<<guid;
+	
+	QContactName name = aContact.value("Name").value<QContactName>();
+	aDataStream<<name;
+	
+	QContactNickname nickname = aContact.value("Nickname").value<QContactNickname>();
+	aDataStream<<nickname;
+	
+	QContactNote note = aContact.value("Note").value<QContactNote>();
+	aDataStream<<note;
+	
+	QContactOnlineAccount account = aContact.value("OnlineAccount").value<QContactOnlineAccount>();
+	aDataStream<<account;
+	
+	QContactOrganization org = aContact.value("Organization").value<QContactOrganization>();
+	aDataStream<<org;
+	
+	QContactPhoneNumber number = aContact.value("PhoneNumber").value<QContactPhoneNumber>();
+	aDataStream<<number;
+	
+	QContactPresence presence = aContact.value("Presence").value<QContactPresence>();
+	aDataStream<<presence;
+	
+	QContactThumbnail thumbnail = aContact.value("Thumbnail").value<QContactThumbnail>();
+	aDataStream<<thumbnail;
+	
+	QContactTimestamp time = aContact.value("Timestamp").value<QContactTimestamp>();
+	aDataStream<<time;
 	
-	/**
-	 * Destructor
-	 */
-	SmfContact::~SmfContact( )
-		{
-		
-		}
-	QStringList SmfContact::subTypes( ) const
-			{
-			    return QStringList();
-			}
+	QContactType type = aContact.value("Type").value<QContactType>();
+	aDataStream<<type;
+	
+	QContactUrl url = aContact.value("Url").value<QContactUrl>();
+	aDataStream<<url;
+	
+	return aDataStream;
+	}
+
+/**
+ * Method for Internalization. Reads a SmfContact object from 
+ * the stream and returns a reference to the stream.
+ * @param aDataStream Stream to be read
+ * @param aContact The SmfContact object to be internalized
+ * @return reference to the stream
+ */
+QDataStream &operator>>( QDataStream &aDataStream, 
+		SmfContact& aContact )
+	{
+	QContactAddress address;
+	aDataStream>>address;
+	QVariant var1 = QVariant::fromValue(address);
+	aContact.setValue("Address",var1);
+	
+	QContactAnniversary anniver;
+	aDataStream>>anniver;
+	QVariant var2 = QVariant::fromValue(anniver);
+	aContact.setValue("Anniversary",var2);
+	
+	QContactAvatar avatar;
+	aDataStream>>avatar;
+	QVariant var3 = QVariant::fromValue(avatar);
+	aContact.setValue("Avatar",var3);
+	
+	QContactBirthday bday;
+	aDataStream>>bday;
+	QVariant var4 = QVariant::fromValue(bday);
+	aContact.setValue("Birthday",var4);
+	
+	QContactId id;
+	aDataStream>>id;
+	QVariant var5 = QVariant::fromValue(id);
+	aContact.setValue("ContactId",var5);
+	
+	QContactEmailAddress email;
+	aDataStream>>email;
+	QVariant var6 = QVariant::fromValue(email);
+	aContact.setValue("EmailAddress",var6);
+	
+	QContactGender gender;
+	aDataStream>>gender;
+	QVariant var7 = QVariant::fromValue(gender);
+	aContact.setValue("Gender",var7);
+	
+	QContactGeoLocation geo;
+	aDataStream>>geo;
+	QVariant var8 = QVariant::fromValue(geo);
+	aContact.setValue("Geolocation",var8);
+	
+	QContactGuid guid;
+	aDataStream>>guid;
+	QVariant var9 = QVariant::fromValue(guid);
+	aContact.setValue("Guid",var9);
+	
+	QContactName name1;
+	aDataStream>>name1;
+	QVariant var10 = QVariant::fromValue(name1);
+	aContact.setValue("Name",var10);
+	
+	QContactNickname nickname;
+	aDataStream>>nickname;
+	QVariant var11 = QVariant::fromValue(nickname);
+	aContact.setValue("Nickname",var11);
+	
+	QContactNote note;
+	aDataStream>>note;
+	QVariant var12 = QVariant::fromValue(note);
+	aContact.setValue("Note",var12);
+	
+	QContactOnlineAccount account;
+	aDataStream>>account;
+	QVariant var13 = QVariant::fromValue(account);
+	aContact.setValue("OnlineAccount",var13);
 	
-	/**
-	 * Method to convert an SmfContact to a QContact
-	 * Changes made to the returned QContact will not be reflected 
-	 * in its parent SmfContact object
-	 * @param aContact QContact corresponding to SmfContact 
-	 */
-	void SmfContact::convert( QContact &aContact ) const
-			{
-			    Q_UNUSED(aContact);
-			}
+	QContactOrganization org;
+	aDataStream>>org;
+	QVariant var14 = QVariant::fromValue(org);
+	aContact.setValue("Organization",var14);
+	
+	QContactPhoneNumber number;
+	aDataStream>>number;
+	QVariant var15 = QVariant::fromValue(number);
+	aContact.setValue("PhoneNumber",var15);
+	
+	QContactPresence presence;
+	aDataStream>>presence;
+	QVariant var16 = QVariant::fromValue(presence);
+	aContact.setValue("Presence",var16);
+	
+	QContactThumbnail thumbnail;
+	aDataStream>>thumbnail;
+	QVariant var17 = QVariant::fromValue(thumbnail);
+	aContact.setValue("Thumbnail",var17);
+	
+	QContactTimestamp time;
+	aDataStream>>time;
+	QVariant var18 = QVariant::fromValue(time);
+	aContact.setValue("Timestamp",var18);
+	
+	QContactType type;
+	aDataStream>>type;
+	QVariant var19 = QVariant::fromValue(type);
+	aContact.setValue("Type",var19);
+	
+	QContactUrl url;
+	aDataStream>>url;
+	QVariant var20 = QVariant::fromValue(url);
+	aContact.setValue("Url",var20);
 	
-	/**
-	 * Method to get the value of a sub field for this contact
-	 * @param aSubType The sub field type 
-	 * @return The value of the sub field subType
-	 * @see subTypes()
-	 */
-	QVariant SmfContact::value( const QString& aSubType ) const
-			{
-			if(d->m_details.contains(aSubType))
-				return d->m_details.value(aSubType);
-			else
-				return QString("Not found");
-			}
+	return aDataStream;
+	}
+
+
+
+
+/**
+ * Serialization support for QtMobility::QContactAddress
+ */
+QDataStream& operator<<( QDataStream &aDataStream, 
+		const QContactAddress &aAddress )
+	{
+	aDataStream<<aAddress.country();
+	aDataStream<<aAddress.locality();
+	aDataStream<<aAddress.postOfficeBox();
+	aDataStream<<aAddress.postcode();
+	aDataStream<<aAddress.region();
+	aDataStream<<aAddress.street();
+	aDataStream<<aAddress.subTypes();
+
+	return aDataStream;
+	}
+
+/**
+ * Deserialization support for QtMobility::QContactAddress
+ */
+QDataStream &operator>>( QDataStream &aDataStream, 
+		QContactAddress &aAddress )
+	{
+	QString str;
+	
+	// First one to be deserialized is country
+	aDataStream>>str;
+	aAddress.setCountry(str);
+
+	// Next one to be deserialized is locality
+	str.clear();
+	aDataStream>>str;
+	aAddress.setLocality(str);
+
+	// Next one to be deserialized is postOfficeBox
+	str.clear();
+	aDataStream>>str;
+	aAddress.setPostOfficeBox(str);
+	
+	// Next one to be deserialized is postCode
+	str.clear();
+	aDataStream>>str;
+	aAddress.setPostcode(str);
+	
+	// Next one to be deserialized is region
+	str.clear();
+	aDataStream>>str;
+	aAddress.setRegion(str);
 	
-	void SmfContact::setValue(const QString& aSubType,QVariant& value)
-		{
-		d->m_details.insert(aSubType,value);
-		}
-	void SmfContact::writeLog(QString log) const
-		{
-		QFile file("c:\\data\\SmfClientLogs.txt");
-	    if (!file.open(QIODevice::Append | QIODevice::Text))
-		         return;
-	    QTextStream out(&file);
-	    out << log << "\n";
-	    file.close();
+	// Next one to be deserialized is street
+	str.clear();
+	aDataStream>>str;
+	aAddress.setStreet(str);
+	
+	// Next one to be deserialized is subtypes
+	QStringList list;
+	list.clear();
+	aDataStream>>list;
+	aAddress.setSubTypes(list);
+	
+	return aDataStream;
+	}
+
+
+/**
+ * Serialization support for QtMobility::QContactAnniversary
+ */
+QDataStream &operator<<( QDataStream &aDataStream, 
+		const QContactAnniversary &aAnniversary )
+	{
+	aDataStream<<aAnniversary.calendarId();
+	aDataStream<<aAnniversary.event();
+	aDataStream<<aAnniversary.originalDate();
+	aDataStream<<aAnniversary.subType();
+
+	return aDataStream;
+	}
+
+/**
+ * Deserialization support for QtMobility::QContactAnniversary
+ */
+QDataStream &operator>>( QDataStream &aDataStream, 
+		QContactAnniversary &aAnniversary)
+	{
+	QString str;
+	QDate date;
+	
+	// First one to be deserialized is calendarId
+	aDataStream>>str;
+	aAnniversary.setCalendarId(str);
+
+	// Next one to be deserialized is event
+	str.clear();
+	aDataStream>>str;
+	aAnniversary.setEvent(str);
+
+	// Next one to be deserialized is originalDate
+	aDataStream>>date;
+	aAnniversary.setOriginalDate(date);
+	
+	// Next one to be deserialized is subType
+	str.clear();
+	aDataStream>>str;
+	aAnniversary.setSubType(str);
+		
+	return aDataStream;
+	}
+
+
+/**
+ * Serialization support for QtMobility::QContactAvatar
+ */
+QDataStream &operator<<( QDataStream &aDataStream, 
+	const QContactAvatar &aAvatar )
+	{
+	//TODO:- QContactAvatar derives from QContactDetail,so internalization/externalization
+	//for the same should be provided
+	
+	//Qt mobility introduces API compatibility break
+#ifdef OLDER_QT_MOBILITY
+	aDataStream<<aAvatar.avatar();
+
+#else
+	aDataStream<<aAvatar.imageUrl();
+	aDataStream<<aAvatar.videoUrl();
+#endif
+	
+	return aDataStream;
+	}
 
-		}
-	/**
-	 * Method for Externalization. Writes the SmfContact object to 
-	 * the stream and returns a reference to the stream.
-	 * @param aDataStream Stream to be written
-	 * @param aContact The SmfContact object to be externalized
-	 * @return reference to the written stream
-	 */
-	//TODO:-Need to revisit
+/**
+ * Deserialization support for QtMobility::QContactAvatar
+ */
+QDataStream &operator>>( QDataStream &aDataStream, 
+	QContactAvatar &aAvatar)
+	{
+#ifdef OLDER_QT_MOBILITY
+	QString avatarPath;
+	aDataStream>>avatarPath;
+	aAvatar.setAvatar(avatarPath);
+#else
+	QUrl url;
+	aDataStream>>url;
+	aAvatar.setImageUrl(url);
+	
+	url.clear();
+	aDataStream>>url;
+	aAvatar.setVideoUrl(url);
+#endif
+	
+	return aDataStream;
+	}
+
+
+/**
+ * Serialization support for QtMobility::QContactBirthday
+ */
+QDataStream &operator<<( QDataStream &aDataStream, 
+	const QContactBirthday &aBirthday )
+	{
+	aDataStream<<aBirthday.date();
+	return aDataStream;
+	}
+
+/**
+ * Deserialization support for QtMobility::QContactBirthday
+ */
+QDataStream &operator>>( QDataStream &aDataStream, 
+		QContactBirthday &aBirthday)
+	{
+	QDate date;
+	aDataStream>>date;
+	aBirthday.setDate(date);
 
-	QDataStream &operator<<( QDataStream &aDataStream, 
-			const SmfContact& aContact )
-		{
-		aContact.writeLog("smfContact::operator<<");
-		QVariant var = aContact.value("Name");
-		QContactName cn = var.value<QContactName>();
-		aDataStream<<cn;
-		return aDataStream;
+	return aDataStream;
+	}
+
+
+/**
+ * Serialization support for QtMobility::QContactId
+ */
+QDataStream &operator<<( QDataStream &aDataStream, 
+	const QContactId &aContactId )
+	{
+	aDataStream<<aContactId.localId();
+	aDataStream<<aContactId.managerUri();
+
+	return aDataStream;
+	}
+
+/**
+ * Deserialization support for QtMobility::QContactId
+ */
+QDataStream &operator>>( QDataStream &aDataStream, 
+		QContactId &aContactId)
+	{
+	QContactLocalId localId;
+	QString str;
+	
+	// First one to be deserialized is localId
+	aDataStream>>localId;
+	aContactId.setLocalId(localId);
+
+	// Next one to be deserialized is managerUri
+	aDataStream>>str;
+	aContactId.setManagerUri(str);
 		
-		}
+	return aDataStream;
+	}
+
+
+/**
+ * Serialization support for QtMobility::QContactEmailAddress
+ */
+QDataStream &operator<<( QDataStream &aDataStream, 
+	const QContactEmailAddress &aEMail )
+	{
+	aDataStream<<aEMail.emailAddress();
+	return aDataStream;
+	}
 
-	/**
-	 * Method for Internalization. Reads a SmfContact object from 
-	 * the stream and returns a reference to the stream.
-	 * @param aDataStream Stream to be read
-	 * @param aContact The SmfContact object to be internalized
-	 * @return reference to the stream
-	 */
+/**
+ * Deserialization support for QtMobility::QContactEmailAddress
+ */
+QDataStream &operator>>( QDataStream &aDataStream, 
+		QContactEmailAddress &aEMail)
+	{
+	QString str;
+	aDataStream>>str;
+	aEMail.setEmailAddress(str);
+		
+	return aDataStream;
+	}
+
+
+/**
+ * Serialization support for QtMobility::QContactGender
+ */
+QDataStream &operator<<( QDataStream &aDataStream, 
+	const QContactGender &aGender )
+	{
+	aDataStream<<aGender.gender();
+	return aDataStream;
+	}
+
+/**
+ * Deserialization support for QtMobility::QContactGender
+ */
+QDataStream &operator>>( QDataStream &aDataStream, 
+		QContactGender &aGender)
+	{
+	QString str;
+	aDataStream>>str;
+	aGender.setGender(str);
+		
+	return aDataStream;
+	}
+
+
+/**
+ * Serialization support for QtMobility::QContactGeoLocation
+ */
+QDataStream &operator<<( QDataStream &aDataStream, 
+	const QContactGeoLocation &aGeolocation )
+	{
+	aDataStream<<aGeolocation.accuracy();
+	aDataStream<<aGeolocation.altitude();
+	aDataStream<<aGeolocation.altitudeAccuracy();
+	aDataStream<<aGeolocation.heading();
+	aDataStream<<aGeolocation.label();
+	aDataStream<<aGeolocation.latitude();
+	aDataStream<<aGeolocation.longitude();
+	aDataStream<<aGeolocation.speed();
+	aDataStream<<aGeolocation.timestamp();
+	return aDataStream;
+	}
+
+/**
+ * Deserialization support for QtMobility::QContactGeoLocation
+ */
+QDataStream &operator>>( QDataStream &aDataStream, 
+		QContactGeoLocation &aGeolocation)
+	{
+	double val;
+	QString str;
+	QDateTime date;
+	
+	// First one to be deserialized is accuracy
+	val = 0;
+	aDataStream>>val;
+	aGeolocation.setAccuracy(val);
+
+	// Next one to be deserialized is altitude
+	val = 0;
+	aDataStream>>val;
+	aGeolocation.setAltitude(val);
+
+	// Next one to be deserialized is altitudeAccuracy
+	val = 0;
+	aDataStream>>val;
+	aGeolocation.setAltitudeAccuracy(val);
+	
+	// Next one to be deserialized is heading
+	val = 0;
+	aDataStream>>val;
+	aGeolocation.setHeading(val);
 	
-	QDataStream &operator>>( QDataStream &aDataStream, 
-			SmfContact& aContact )
-		{
-		aContact.writeLog("smfContact::operator>>");
-		//explicitely adding fields for the classes that don't provide 
-		//internalizatio/externalization :(
-		QContactName name;
-		//QString name;
-		aDataStream>>name;
-		QVariant var = QVariant::fromValue(name);
-		aContact.setValue("Name",var);
-		return aDataStream;
-		}
-	QDataStream &operator<<( QDataStream &aDataStream, 
-			const QContactName &aContact )
-		{
-		//Qt mobility introduces API compatibility break
+	// First one to be deserialized is label
+	aDataStream>>str;
+	aGeolocation.setLabel(str);
+
+	// Next one to be deserialized is latitude
+	val = 0;
+	aDataStream>>val;
+	aGeolocation.setLatitude(val);
+
+	// Next one to be deserialized is longitude
+	val = 0;
+	aDataStream>>val;
+	aGeolocation.setLongitude(val);
+	
+	// Next one to be deserialized is speed
+	val = 0;
+	aDataStream>>val;
+	aGeolocation.setSpeed(val);
+	
+	// Next one to be deserialized is timestamp
+	aDataStream>>date;
+	aGeolocation.setTimestamp(date);
+		
+	return aDataStream;
+	}
+
+/**
+ * Serialization support for QtMobility::QContactGuid
+ */
+QDataStream &operator<<( QDataStream &aDataStream, 
+	const QContactGuid &aGuid )
+	{
+	aDataStream<<aGuid.guid();
+	return aDataStream;
+	}
+
+/**
+ * Deserialization support for QtMobility::QContactGuid
+ */
+QDataStream &operator>>( QDataStream &aDataStream, 
+		QContactGuid &aGuid)
+	{
+	QString str;
+	aDataStream>>str;
+	aGuid.setGuid(str);
+	
+	return aDataStream;
+	}
+
+
+/**
+ * Serialization support for QtMobility::QContactName
+ */
+QDataStream &operator<<( QDataStream &aDataStream, 
+		const QContactName &aContact )
+	{
+	//Qt mobility introduces API compatibility break
 #ifdef OLDER_QT_MOBILITY
-		aDataStream<<aContact.first();
-		aDataStream<<aContact.last();
+	aDataStream<<aContact.first();
+	aDataStream<<aContact.last();
 #else
-		
-		aDataStream<<aContact.firstName();
-		aDataStream<<aContact.lastName();
+	aDataStream<<aContact.customLabel();
+	aDataStream<<aContact.firstName();
+	aDataStream<<aContact.lastName();
+	aDataStream<<aContact.middleName();
+	aDataStream<<aContact.prefix();
+	aDataStream<<aContact.suffix();
 #endif
-		return aDataStream;
-		}
+	
+	return aDataStream;
+	}
 
-	QDataStream &operator>>( QDataStream &aDataStream, 
-			QContactName &aContact )
-		{
-		QString first;
-		QString last;
-		aDataStream>>first;
+/**
+ * Deserialization support for QtMobility::QContactName
+ */
+QDataStream &operator>>( QDataStream &aDataStream, 
+		QContactName &aContact )
+	{
+	QString str;
+	
+	// First one to be deserialized is customlabel
+	str.clear();
+	aDataStream>>str;
+	aContact.setCustomLabel(str);
+	
+	// Next one to be deserialized is firstname
+	str.clear();
+	aDataStream>>str;
 #ifdef OLDER_QT_MOBILITY
-		aContact.setFirst(first);
+	aContact.setFirst(str);
 #else
-		aContact.setFirstName(first);
+	aContact.setFirstName(str);
 #endif
 
-		aDataStream>>last;
+	// Next one to be deserialized is lastName
+	str.clear();
+	aDataStream>>str;
 #ifdef OLDER_QT_MOBILITY
-		aContact.setLast(last);
+	aContact.setLast(str);
 #else
-		aContact.setLastName(last);
+	aContact.setLastName(str);
 #endif
-		return aDataStream;
-		}
+	
+
+	
+	// Next one to be deserialized is middlename
+	str.clear();
+	aDataStream>>str;
+	aContact.setMiddleName(str);
+	
+	// Next one to be deserialized is prefix
+	str.clear();
+	aDataStream>>str;
+	aContact.setPrefix(str);
+	
+	// Next one to be deserialized is suffix
+	str.clear();
+	aDataStream>>str;
+	aContact.setSuffix(str);
+	
+	return aDataStream;
+	}
+
+
+/**
+ * Serialization support for QtMobility::QContactNickname
+ */
+QDataStream &operator<<( QDataStream &aDataStream, 
+	const QContactNickname &aNickname )
+	{
+	aDataStream<<aNickname.nickname();
+	return aDataStream;
+	}
+
+/**
+ * Deserialization support for QtMobility::QContactNickname
+ */
+QDataStream &operator>>( QDataStream &aDataStream, 
+		QContactNickname &aNickname)
+	{
+	QString str;
+	aDataStream>>str;
+	aNickname.setNickname(str);
+		
+	return aDataStream;
+	}
+
+
+/**
+ * Serialization support for QtMobility::QContactNote
+ */
+QDataStream &operator<<( QDataStream &aDataStream, 
+	const QContactNote &aNote )
+	{
+	aDataStream<<aNote.note();
+	return aDataStream;
+	}
+
+/**
+ * Deserialization support for QtMobility::QContactNote
+ */
+QDataStream &operator>>( QDataStream &aDataStream, 
+		QContactNote &aNote)
+	{
+	QString str;
+	aDataStream>>str;
+	aNote.setNote(str);
+		
+	return aDataStream;
+	}
+
+
+/**
+ * Serialization support for QtMobility::QContactOnlineAccount
+ */
+QDataStream &operator<<( QDataStream &aDataStream, 
+	const QContactOnlineAccount &aOnlineAccount )
+	{
+	aDataStream<<aOnlineAccount.accountUri();
+	aDataStream<<aOnlineAccount.capabilities();
+	aDataStream<<aOnlineAccount.serviceProvider();
+	aDataStream<<aOnlineAccount.subTypes();
+
+	return aDataStream;
+	}
+
+/**
+ * Deserialization support for QtMobility::QContactOnlineAccount
+ */
+QDataStream &operator>>( QDataStream &aDataStream, 
+		QContactOnlineAccount &aOnlineAccount)
+	{
+	QString str;
+	QStringList list;
+	
+	// First one to be deserialized is accountUri
+	aDataStream>>str;
+	aOnlineAccount.setAccountUri(str);
+
+	// Next one to be deserialized is capabilities
+	aDataStream>>list;
+	aOnlineAccount.setCapabilities(list);
+
+	// Next one to be deserialized is serviceProvider
+	str.clear();
+	aDataStream>>str;
+	aOnlineAccount.setServiceProvider(str);
+	
+	// Next one to be deserialized is subTypes
+	list.clear();
+	aDataStream>>list;
+	aOnlineAccount.setSubTypes(list);
+		
+	return aDataStream;
+	}
+
+
+/**
+ * Serialization support for QtMobility::QContactOrganization
+ */
+QDataStream &operator<<( QDataStream &aDataStream, 
+	const QContactOrganization &aOrganization )
+	{
+	aDataStream<<aOrganization.assistantName();
+	aDataStream<<aOrganization.department();
+	aDataStream<<aOrganization.location();
+	aDataStream<<aOrganization.logoUrl();
+	aDataStream<<aOrganization.name();
+	aDataStream<<aOrganization.role();
+	aDataStream<<aOrganization.title();
+
+	return aDataStream;
+	}
+
+/**
+ * Deserialization support for QtMobility::QContactOrganization
+ */
+QDataStream &operator>>( QDataStream &aDataStream, 
+		QContactOrganization &aOrganization )
+	{
+	QString str;
+	QStringList list;
+	QUrl url;
+	
+	// First one to be deserialized is assistantName
+	aDataStream>>str;
+	aOrganization.setAssistantName(str);
+
+	// Next one to be deserialized is department
+	aDataStream>>list;
+	aOrganization.setDepartment(list);
+
+	// Next one to be deserialized is location
+	str.clear();
+	aDataStream>>str;
+	aOrganization.setLocation(str);
+	
+	// Next one to be deserialized is logoUrl
+	aDataStream>>url;
+	aOrganization.setLogoUrl(url);
+	
+	// Next one to be deserialized is name
+	str.clear();
+	aDataStream>>str;
+	aOrganization.setName(str);
+
+	// Next one to be deserialized is role
+	str.clear();
+	aDataStream>>str;
+	aOrganization.setRole(str);
+	
+	// Next one to be deserialized is title
+	str.clear();
+	aDataStream>>str;
+	aOrganization.setTitle(str);
+		
+	return aDataStream;
+	}
+
+
+/**
+ * Serialization support for QtMobility::QContactPhoneNumber
+ */
+QDataStream &operator<<( QDataStream &aDataStream, 
+	const QContactPhoneNumber &aPhoneNumber )
+	{
+	aDataStream<<aPhoneNumber.number();
+	aDataStream<<aPhoneNumber.subTypes();
+
+	return aDataStream;
+	}
+
+/**
+ * Deserialization support for QtMobility::QContactPhoneNumber
+ */
+QDataStream &operator>>( QDataStream &aDataStream, 
+		QContactPhoneNumber &aPhoneNumber )
+	{
+	QString str;
+	QStringList list;
+	
+	// First one to be deserialized is number
+	aDataStream>>str;
+	aPhoneNumber.setNumber(str);
+	
+	// Next one to be deserialized is subTypes
+	aDataStream>>list;
+	aPhoneNumber.setSubTypes(list);
+		
+	return aDataStream;
+	}
+
+
+/**
+ * Serialization support for QtMobility::QContactPresence
+ */
+QDataStream &operator<<( QDataStream &aDataStream, 
+	const QContactPresence &aPresence )
+	{
+	aDataStream<<aPresence.customMessage();
+	aDataStream<<aPresence.nickname();
+	aDataStream<<aPresence.presenceState();
+	aDataStream<<aPresence.presenceStateImageUrl();
+	aDataStream<<aPresence.presenceStateText();
+	aDataStream<<aPresence.timestamp();
+
+	return aDataStream;
+	}
+
+/**
+ * Deserialization support for QtMobility::QContactPresence
+ */
+QDataStream &operator>>( QDataStream &aDataStream, 
+		QContactPresence &aPresence )
+	{
+	QString str;
+	QUrl url;
+	QDateTime date;
+	
+	// First one to be deserialized is customMessage
+	aDataStream>>str;
+	aPresence.setCustomMessage(str);
+	
+	// Next one to be deserialized is nickname
+	str.clear();
+	aDataStream>>str;
+	aPresence.setNickname(str);
+	
+	// Next one to be deserialized is presenceState
+	int val;
+	aDataStream>>val;
+	QContactPresence::PresenceState state = (QContactPresence::PresenceState)val;
+	aPresence.setPresenceState(state);
+	
+	// Next one to be deserialized is presenceStateImageUrl
+	aDataStream>>url;
+	aPresence.setPresenceStateImageUrl(url);
+	
+	// Next one to be deserialized is presenceStateText
+	str.clear();
+	aDataStream>>str;
+	aPresence.setPresenceStateText(str);
+	
+	// Next one to be deserialized is timestamp
+	aDataStream>>date;
+	aPresence.setTimestamp(date);
+		
+	return aDataStream;
+	}
+
+
+/**
+ * Serialization support for QtMobility::QContactThumbnail
+ */
+QDataStream &operator<<( QDataStream &aDataStream, 
+	const QContactThumbnail &aThumbnail )
+	{
+	aDataStream<<aThumbnail.thumbnail();
+
+	return aDataStream;
+	}
+
+/**
+ * Deserialization support for QtMobility::QContactThumbnail
+ */
+QDataStream &operator>>( QDataStream &aDataStream, 
+		QContactThumbnail &aThumbnail )
+	{
+	QImage image;
+	aDataStream>>image;
+	aThumbnail.setThumbnail(image);
+		
+	return aDataStream;
+	}
+
+
+/**
+ * Serialization support for QtMobility::QContactTimestamp
+ */
+QDataStream &operator<<( QDataStream &aDataStream, 
+	const QContactTimestamp &aTimestamp )
+	{
+	aDataStream<<aTimestamp.created();
+	aDataStream<<aTimestamp.lastModified();
+
+	return aDataStream;
+	}
+
+/**
+ * Deserialization support for QtMobility::QContactTimestamp
+ */
+QDataStream &operator>>( QDataStream &aDataStream, 
+		QContactTimestamp &aTimestamp )
+	{
+	QDateTime date1, date2;
+	
+	// First one to be deserialized is created
+	aDataStream>>date1;
+	aTimestamp.setCreated(date1);
+	
+	// Next one to be deserialized is lastModified
+	aDataStream>>date2;
+	aTimestamp.setLastModified(date2);
+		
+	return aDataStream;
+	}
+
+
+/**
+ * Serialization support for QtMobility::QContactType
+ */
+QDataStream &operator<<( QDataStream &aDataStream, 
+	const QContactType &aType )
+	{
+	aDataStream<<aType.type();
+	return aDataStream;
+	}
+
+/**
+ * Deserialization support for QtMobility::QContactType
+ */
+QDataStream &operator>>( QDataStream &aDataStream, 
+		QContactType &aType )
+	{
+	QString str;
+	aDataStream>>str;
+	aType.setType(str);
+	
+	return aDataStream;
+	}
+
+
+/**
+ * Serialization support for QtMobility::QContactUrl
+ */
+QDataStream &operator<<( QDataStream &aDataStream, 
+	const QContactUrl &aUrl )
+	{
+	aDataStream<<aUrl.subType();
+	aDataStream<<aUrl.url();
+
+	return aDataStream;
+	}
+
+/**
+ * Deserialization support for QtMobility::QContactUrl
+ */
+QDataStream &operator>>( QDataStream &aDataStream, 
+		QContactUrl &aUrl)
+	{
+	QString str;
+	
+	// First one to be deserialized is subType
+	aDataStream>>str;
+	aUrl.setSubType(str);
+	
+	// Next one to be deserialized is url
+	str.clear();
+	aDataStream>>str;
+	aUrl.setUrl(str);
+		
+	return aDataStream;
+	}
+
--- a/smf/smfservermodule/smfclient/common/smfcontact.h	Mon Jun 07 11:43:45 2010 +0100
+++ b/smf/smfservermodule/smfclient/common/smfcontact.h	Wed Jun 23 19:51:49 2010 +0530
@@ -21,29 +21,29 @@
 #ifndef SMFCONTACT_H_
 #define SMFCONTACT_H_
 
-#include "qtcontacts.h"
-#include "smfclientglobal.h"
+#include <qtcontacts.h>
 #include <qdatastream.h>
 #include <QSharedData>
 #include <QVariant>
-//#include <smfclientglobal.h>
+#include "smfclientglobal.h"
+
 #include "smfcontact_p.h"
 
 using namespace QtMobility;
 
+/**
+ * Max size for one SmfContact
+ */
+const int MaxSmfContactSize = 1000;
 
-//TODO:- For the time being we'll just store a string SmfContact 
 /**
  * @ingroup smf_common_group
  * The contact class represents a social contact
  * 
  * Note: This class has dependencies on QtMobility project
  */
-//QList<SmfContact> gives error for serialization if its derived from QObject
-class  SMFCLIENT_EXPORT SmfContact //: public QObject
+class  SMFCLIENT_EXPORT SmfContact
 	{
-	//Q_OBJECT
-
 public:
 	/**
 	 * Constructor with default argument
@@ -58,27 +58,17 @@
 	SmfContact( const SmfContact &aOther );
 	
 	/**
+	 * Overloaded = operator
+	 * @param aOther The reference object
+	 * @return The target reference value
+	 */
+	SmfContact& operator=( const SmfContact &aOther );
+	
+	/**
 	 * Destructor
 	 */
 	~SmfContact( );
-//Q_DECLARE_LATIN1_LITERAL(SubTypeAddress, "Address");
-//Q_DECLARE_LATIN1_LITERAL(SubTypeAnniversary, "Anniversary");
-//Q_DECLARE_LATIN1_LITERAL(SubTypeAvatar, "Avatar");
-//Q_DECLARE_LATIN1_LITERAL(SubTypeBirthday, "Birthday");
-//Q_DECLARE_LATIN1_LITERAL(SubTypeContactId, "ContactId");
-//Q_DECLARE_LATIN1_LITERAL(SubTypeEmailAddress, "EmailAddress");
-//Q_DECLARE_LATIN1_LITERAL(SubTypeGender, "Gender");
-//Q_DECLARE_LATIN1_LITERAL(SubTypeGeolocation, "Geolocation");
-//Q_DECLARE_LATIN1_LITERAL(SubTypeGuid, "Guid");
-//Q_DECLARE_LATIN1_LITERAL(SubTypeName, "Name");
-//Q_DECLARE_LATIN1_LITERAL(SubTypeNickname, "Nickname");
-//Q_DECLARE_LATIN1_LITERAL(SubTypeNote, "Note");
-//Q_DECLARE_LATIN1_LITERAL(SubTypeOnlineAccount, "OnlineAccount");
-//Q_DECLARE_LATIN1_LITERAL(SubTypeOrganization, "Organization");
-//Q_DECLARE_LATIN1_LITERAL(SubTypePhoneNumber, "PhoneNumber");
-//Q_DECLARE_LATIN1_LITERAL(SubTypeTimestamp, "Timestamp");
-//Q_DECLARE_LATIN1_LITERAL(SubTypeType, "Type");
-//Q_DECLARE_LATIN1_LITERAL(SubTypeUrl, "Url");
+	
 public slots:
 	/**
 	 * Method to get the available sub fields for contacts.
@@ -90,7 +80,7 @@
 	 *   QtMobility::QContactId				ContactId;
 	 *   QtMobility::QContactEmailAddress	EmailAddress;
 	 *   QtMobility::QContactGender			Gender;
-	 *   QtMobility::QContactGeolocation	Geolocation;
+	 *   QtMobility::QContactGeoLocation	Geolocation;
 	 *   QtMobility::QContactGuid			Guid;
 	 *   QtMobility::QContactName			Name;
 	 *   QtMobility::QContactNickname		Nickname;
@@ -98,12 +88,13 @@
 	 *   QtMobility::QContactOnlineAccount	OnlineAccount;
 	 *   QtMobility::QContactOrganization	Organization;
 	 *   QtMobility::QContactPhoneNumber	PhoneNumber;
+	 *   QtMobility::QContactPresence		Presence;
+	 *   QtMobility::QContactThumbnail		Thumbnail;
 	 *   QtMobility::QContactTimestamp		Timestamp;
 	 *   QtMobility::QContactType			Type;
 	 *   QtMobility::QContactUrl			Url;
 	 * @return The Available sub fields for this contact
 	 */
-
 	QStringList subTypes( ) const;
 	
 	/**
@@ -124,9 +115,11 @@
 	
 	/**
 	 * Method to set value for a subtype
+	 * @param aSubType The subtype string
+	 * @param value Thhe value to be set for the subtype
 	 */
 	void setValue(const QString& aSubType,QVariant& value);
-	void writeLog(QString log) const;
+
 private:
 	QSharedDataPointer<SmfContactPrivate> d;
 	
@@ -158,15 +151,135 @@
  */
 SMFCLIENT_EXPORT QDataStream &operator>>( QDataStream &aDataStream, 
 		SmfContact &aContact );
+
+
 typedef QList<SmfContact> SmfContactList;
+
+
 /**
- * Serialization support for Qt mobility contact
+ * Serialization support for QtMobility QContact classes
  */
 SMFCLIENT_EXPORT QDataStream &operator<<( QDataStream &aDataStream, 
-		const QContactName &aContact );
+	const QContactAddress &aAddress );
+
+SMFCLIENT_EXPORT QDataStream &operator>>( QDataStream &aDataStream, 
+		QContactAddress &aAddress );
+
+SMFCLIENT_EXPORT QDataStream &operator<<( QDataStream &aDataStream, 
+	const QContactAnniversary &aAnniversary );
+
+SMFCLIENT_EXPORT QDataStream &operator>>( QDataStream &aDataStream, 
+		QContactAnniversary &aAnniversary );
+
+SMFCLIENT_EXPORT QDataStream &operator<<( QDataStream &aDataStream, 
+	const QContactAvatar &aAvatar );
+
+SMFCLIENT_EXPORT QDataStream &operator>>( QDataStream &aDataStream, 
+		QContactAvatar &aAvatar );
+
+SMFCLIENT_EXPORT QDataStream &operator<<( QDataStream &aDataStream, 
+	const QContactBirthday &aBirthday );
+
+SMFCLIENT_EXPORT QDataStream &operator>>( QDataStream &aDataStream, 
+		QContactBirthday &aBirthday );
+
+SMFCLIENT_EXPORT QDataStream &operator<<( QDataStream &aDataStream, 
+	const QContactEmailAddress &aEMail );
+
+SMFCLIENT_EXPORT QDataStream &operator>>( QDataStream &aDataStream, 
+		QContactEmailAddress &aEMail );
+
+SMFCLIENT_EXPORT QDataStream &operator<<( QDataStream &aDataStream, 
+	const QContactGender &aGender );
+
+SMFCLIENT_EXPORT QDataStream &operator>>( QDataStream &aDataStream, 
+		QContactGender &aGender );
+
+SMFCLIENT_EXPORT QDataStream &operator<<( QDataStream &aDataStream, 
+	const QContactGeoLocation &aGeolocation );
+
+SMFCLIENT_EXPORT QDataStream &operator>>( QDataStream &aDataStream, 
+		QContactGeoLocation &aGeolocation );
+
+SMFCLIENT_EXPORT QDataStream &operator<<( QDataStream &aDataStream, 
+	const QContactGuid &aGuid );
+
+SMFCLIENT_EXPORT QDataStream &operator>>( QDataStream &aDataStream, 
+		QContactGuid &aGuid );
+
+SMFCLIENT_EXPORT QDataStream &operator<<( QDataStream &aDataStream, 
+	const QContactId &aContactId );
+
+SMFCLIENT_EXPORT QDataStream &operator>>( QDataStream &aDataStream, 
+		QContactId &aContactId );
+
+SMFCLIENT_EXPORT QDataStream &operator<<( QDataStream &aDataStream, 
+	const QContactName &aName );
 
 SMFCLIENT_EXPORT QDataStream &operator>>( QDataStream &aDataStream, 
-		QContactName &aContact );
+		QContactName &aName );
+
+SMFCLIENT_EXPORT QDataStream &operator<<( QDataStream &aDataStream, 
+	const QContactNickname &aNickname );
+
+SMFCLIENT_EXPORT QDataStream &operator>>( QDataStream &aDataStream, 
+		QContactNickname &aNickname );
+
+SMFCLIENT_EXPORT QDataStream &operator<<( QDataStream &aDataStream, 
+	const QContactNote &aNote );
+
+SMFCLIENT_EXPORT QDataStream &operator>>( QDataStream &aDataStream, 
+		QContactNote &aNote );
+
+SMFCLIENT_EXPORT QDataStream &operator<<( QDataStream &aDataStream, 
+	const QContactOnlineAccount &aOnlineAccount );
+
+SMFCLIENT_EXPORT QDataStream &operator>>( QDataStream &aDataStream, 
+		QContactOnlineAccount &aOnlineAccount );
+
+SMFCLIENT_EXPORT QDataStream &operator<<( QDataStream &aDataStream, 
+	const QContactOrganization &aOrganization );
+
+SMFCLIENT_EXPORT QDataStream &operator>>( QDataStream &aDataStream, 
+		QContactOrganization &aOrganization );
+
+SMFCLIENT_EXPORT QDataStream &operator<<( QDataStream &aDataStream, 
+	const QContactPhoneNumber &aPhoneNumber );
+
+SMFCLIENT_EXPORT QDataStream &operator>>( QDataStream &aDataStream, 
+		QContactPhoneNumber &aPhoneNumber );
+
+SMFCLIENT_EXPORT QDataStream &operator<<( QDataStream &aDataStream, 
+	const QContactPresence &aPresence );
+
+SMFCLIENT_EXPORT QDataStream &operator>>( QDataStream &aDataStream, 
+		QContactPresence &aPresence );
+
+SMFCLIENT_EXPORT QDataStream &operator<<( QDataStream &aDataStream, 
+	const QContactThumbnail &aThumbnail );
+
+SMFCLIENT_EXPORT QDataStream &operator>>( QDataStream &aDataStream, 
+		QContactThumbnail &aThumbnail );
+
+SMFCLIENT_EXPORT QDataStream &operator<<( QDataStream &aDataStream, 
+	const QContactTimestamp &aTimestamp );
+
+SMFCLIENT_EXPORT QDataStream &operator>>( QDataStream &aDataStream, 
+		QContactTimestamp &aTimestamp );
+
+SMFCLIENT_EXPORT QDataStream &operator<<( QDataStream &aDataStream, 
+	const QContactType &aType );
+
+SMFCLIENT_EXPORT QDataStream &operator>>( QDataStream &aDataStream, 
+		QContactType &aType );
+
+SMFCLIENT_EXPORT QDataStream &operator<<( QDataStream &aDataStream, 
+	const QContactUrl &aUrl );
+
+SMFCLIENT_EXPORT QDataStream &operator>>( QDataStream &aDataStream, 
+		QContactUrl &aUrl );
+
+
 // Make the class SmfContact known to QMetaType, so that as to register it.
 Q_DECLARE_METATYPE(SmfContact)
 Q_DECLARE_METATYPE(QList<SmfContact>)
@@ -179,6 +292,7 @@
 Q_DECLARE_METATYPE(QContactId)
 Q_DECLARE_METATYPE(QContactEmailAddress)
 Q_DECLARE_METATYPE(QContactGender)
+Q_DECLARE_METATYPE(QContactGeoLocation)
 Q_DECLARE_METATYPE(QContactGuid)
 Q_DECLARE_METATYPE(QContactName)
 Q_DECLARE_METATYPE(QContactNickname)
@@ -186,6 +300,8 @@
 Q_DECLARE_METATYPE(QContactOnlineAccount)
 Q_DECLARE_METATYPE(QContactOrganization)
 Q_DECLARE_METATYPE(QContactPhoneNumber)
+Q_DECLARE_METATYPE(QContactPresence)
+Q_DECLARE_METATYPE(QContactThumbnail)
 Q_DECLARE_METATYPE(QContactTimestamp)
 Q_DECLARE_METATYPE(QContactType)
 Q_DECLARE_METATYPE(QContactUrl)
--- a/smf/smfservermodule/smfclient/common/smfevent.h	Mon Jun 07 11:43:45 2010 +0100
+++ b/smf/smfservermodule/smfclient/common/smfevent.h	Wed Jun 23 19:51:49 2010 +0530
@@ -20,12 +20,12 @@
 #ifndef SMFEVENT_H_
 #define SMFEVENT_H_
 
-#include <smflocation.h>
-#include <smfartists.h>
+#include "smflocation.h"
+#include "smfartists.h"
 #include <QStringList>
-#include <qdatastream.h>
+#include <QDatastream>
 #include <QSharedData>
-#include <smfclientglobal.h>
+#include "smfclientglobal.h"
 #include <QMetaType>
 
 class SmfEventPrivate;
--- a/smf/smfservermodule/smfclient/common/smfglobal.h	Mon Jun 07 11:43:45 2010 +0100
+++ b/smf/smfservermodule/smfclient/common/smfglobal.h	Wed Jun 23 19:51:49 2010 +0530
@@ -47,11 +47,11 @@
  * Default value for per page item for web queries
  */
 const int SMF_ITEMS_PER_PAGE=10;
-
-
+#ifdef Q_OS_SYMBIAN
 class SmfServerSymbianSession;
+#else
 class SmfServerQtSession;
-
+#endif
 
 /**
  * The enumeration used to denote errors reported by plugin
@@ -71,7 +71,12 @@
 	SmfPluginErrServiceTemporaryUnavailable,
 	SmfPluginErrFormatNotSupported, 
 	SmfPluginErrDataSizeExceeded,
-	SmfPluginErrParsingFailed
+	SmfPluginErrServiceNotSupported,
+	SmfPluginErrInvalidArguments,
+	SmfPluginErrRequestNotCreated,
+	SmfPluginErrParsingFailed,
+	SmfPluginErrNetworkError,
+	SmfPluginErrCancelComplete
 	};
 
 /**
@@ -100,6 +105,7 @@
 	SmfContactSearchNear,
 	SmfContactGetGroups,
 	SmfContactSearchInGroup,
+	SmfContactCustomRequest,
 	SmfContactRetrievePosts,
 	SmfContactPost,
 	SmfContactUpdatePost,
@@ -107,28 +113,42 @@
 	SmfContactCommentOnAPost,
 	SmfContactPostAppearence,
 	SmfContactSharePost,
+	SmfContactPostCustomRequest,
 	SmfMusicGetLyrics,
 	SmfMusicGetSubtitle,
+	SmfMusicLyricsCustomRequest,
 	SmfMusicGetEventsOnLoc,
 	SmfMusicGetVenueOnLoc,
 	SmfMusicGetEventsOnVenue,
 	SmfMusicPostEvents,
+	SmfMusicEventsCustomRequest,
 	SmfMusicGetRecommendations,
 	SmfMusicGetTracks,
 	SmfMusicGetTrackInfo,
 	SmfMusicGetStores,
 	SmfMusicPostCurrentPlaying,
+	SmfMusicPostRating,
+	SmfMusicPostComment,
+	SmfMusicSearchCustomRequest,
 	SmfMusicGetUserInfo,
 	SmfMusicSearchUser,
+	SmfMusicServiceCustomRequest,
 	SmfMusicGetPlaylists,
 	SmfMusicGetPlaylistsOfUser,
 	SmfMusicAddToPlaylist,
 	SmfMusicPostCurrentPlayingPlaylist,
+	SmfMusicPlaylistCustomRequest,
+	SmfPictureGetAlbums,
 	SmfPictureGetPictures,
 	SmfPictureDescription,
 	SmfPictureUpload,
 	SmfPictureMultiUpload,
 	SmfPicturePostComment,
+	SmfPictureCustomRequest,
+	SmfActivityFriendsActivities, //SmfActivityFetcher start
+	SmfActivityFiltered,
+	SmfActivitySelfActivity,
+	SmfActivityCustomRequest,//SmfActivityFetcher end
 	SmfContactGetFriendsComplete,
 	SmfContactGetFollowersComplete,
 	SmfContactSearchComplete,
@@ -163,7 +183,16 @@
 	SmfPictureDescriptionComplete,
 	SmfPictureUploadComplete,
 	SmfPictureMultiUploadComplete,
-	SmfPicturePostCommentComplete
+	SmfPicturePostCommentComplete,
+	SmfRelationCreate,//SmfRelationMngr start
+	SmfRelationAssociate,
+	SmfRelationRemove,
+	SmfRelationSearchById,
+	SmfRelationSearchByContact,
+	SmfRelationCount,
+	SmfRelationGet,
+	SmfRelationGetAll,
+	SmfRelationGetAllRelations//SmfRelationMngr end
 	
 	};
 
@@ -197,7 +226,9 @@
 	SmfTransportOpProtocolFailure,
 	SmfTransportOpUnknownError,
 	SmfTransportOpIAPChanged,
-	SmfTransportOpCancelled
+	SmfTransportOpCancelled,
+	SmfTransportOpUnsupportedContentEncodingFormat,
+	SmfTransportOpGzipError
 	};
 
 /**
@@ -267,120 +298,79 @@
 	
 	};
 
-/*enum SmfRequestTypeID
-	{
-	ESmfTest,
-	ESmfTestComplete,
-	ESmfGetService,
-	ESmfGetServiceComplete,
-	ESmfGetContact,
-	ESmfGetContactComplete,
-	ESmfGetFriend,
-	ESmfGetFriendComplete,
-	ESmfGetFollower,
-	ESmfGetFollowerComplete,
-	ESmfSearchFriend,
-	ESmfSearchFriendComplete,
-	ESmfGetGroup,
-	ESmfGetGroupComplete,
-	ESmfSearchGroup,
-	ESmfSearchGroupComplete,
-	ESmfGetPost,
-	ESmfGetPostComplete,
-	ESmfGetPicture,	//required for SmfGallery interface implementation
-	ESmfGetPictureComplete,
-	ESmfUploadPicture,
-	ESmfUploadPictureComplete,
-	ESmfPostComments,
-	ESmfPostCommentsComplete,
-	ESmfGetLyrics,	//required for music related implementations
-	ESmfGetLyricsComplete,
-	ESmfGetSubtitles,
-	ESmfGetSubtitlesComplete,
-	ESmfGetPlayList,
-	ESmfGetPlayListComplete,
-	ESmfaddToPlayList,
-	ESmfaddToPlayListComplete,
-	ESmfGetEvents,
-	ESmfGetEventsComplete,
-	ESmfGetVenues,
-	ESmfGetVenuesComplete,
-	ESmfPostEvent,
-	ESmfPostEventComplete,
-	ESmfGetMusicRecommendation,
-	ESmfGetMusicRecommendationComplete,
-	ESmfGetTrack,
-	ESmfGetTrackComplete,
-	ESmfSearchMusicUser,
-	ESmfSearchMusicUserComplete,
-	ESmfQueryAuthKeys,
-	ESmfQueryAuthKeysComplete,
-	ESmfAuthKeyExpired,
-	ESmfAuthKeyExpiredComplete
-	};*/
 /**
- * Smf wide errors
+ * Smf wide errors
  */
 enum SmfError
 	{
-	SmfNoError,
-	SmfInvalidInterface,
-	SmfNoAuthorizedPlugin,
-	SmfClientAuthFailed,
-	SmfPluginErrorTooManyRequest,
-	SmfPluginErrorRequestQuotaExceeded,
-	SmfPluginErrorInvalidRequest,
-	SmfPluginErrorUserNotLoggedIn,
-	SmfPluginErrorAuthenticationExpired,
-	SmfPluginErrorPermissionDenied,
-	SmfPluginErrorInvalidApplication,
-	SmfPluginErrorServiceUnavailable,
-	SmfPluginErrorServiceTemporaryUnavailable,
-	SmfPluginErrorFormatNotSupported, 
-	SmfPluginErrorDataSizeExceeded ,
-	SmfpluginNotFound,
-	SmfpluginNotLoaded,
-	SmfpluginLoaded,
-	SmfpluginLoadError,
-	SmfpluginAuthorised,
-	SmfpluginNotAuthorised,
-	SmfpluginRequestCreated,
-	SmfpluginRequestCreationFailed,
-	SmfpluginUnknownService,
-	SmfpluginRequestSendingFailed,
-	SmfpluginSOPCheckFailed,
-	SmfpluginServiceError,
-	SmfpluginResponseParsed,
-	SmfpluginResponseParseFailure,
-	SmfpluginSendRequestAgain,
-	SmfpluginUnknownError,
-	SmftransportOpConnectionRefusedError,
-	SmftransportOpRemoteHostClosedError,
-	SmftransportOpHostNotFoundError,
-	SmftransportOpTimeoutError,
-	SmftransportOpOperationCanceledError,
-	SmftransportOpSslHandshakeFailedError,
-	SmftransportOpProxyConnectionRefusedError,
-	SmftransportOpProxyConnectionClosedError,
-	SmftransportOpProxyNotFoundError,
-	SmftransportOpProxyTimeoutError,
-	SmftransportOpProxyAuthenticationRequiredError,
-	SmftransportOpContentAccessDenied,
-	SmftransportOpContentOperationNotPermittedError,
-	SmftransportOpContentNotFoundError,
-	SmftransportOpAuthenticationRequiredError,
-	SmftransportOpContentReSendError,
-	SmftransportOpProtocolUnknownError,
-	SmftransportOpProtocolInvalidOperationError,
-	SmftransportOpUnknownNetworkError,
-	SmftransportOpUnknownProxyError,
-	SmftransportOpUnknownContentError,
-	SmftransportOpProtocolFailure,
-	SmftransportOpUnknownError,
-	SmftransportOpIAPChanged,
-	SmftransportOpCancelled,
-	SmftransportInitNetworkNotAvailable ,
-	SmftransportInitRoamingNetworkUsageNotEnabled	
+	SmfNoError = 0,
+	SmfInvalidInterface,						//1
+	SmfNoAuthorizedPlugin,						//2
+	SmfClientAuthFailed,						//3
+	SmfPMPluginNotFound,						//4
+	SmfPMPluginNotLoaded,						//5
+	SmfPMPluginLoadError,						//6
+	SmfPMPluginNotAuthorised,					//7
+	SmfPMPluginRequestCreationFailed,			//8
+	SmfPMPluginUnknownPluginService,			//9
+	SmfPMPluginUnknownHttpService,				//10
+	SmfPMPluginRequestSendingFailed,			//11
+	SmfPMPluginSOPCheckFailed,					//12
+	SmfPMPluginSendRequestAgain,				//13
+	SmfPluginErrorTooManyRequest,				//14
+	SmfPluginErrorRequestQuotaExceeded,			//15
+	SmfPluginErrorInvalidRequest,				//16
+	SmfPluginErrorUserNotLoggedIn,				//17
+	SmfPluginErrorAuthenticationExpired,		//18
+	SmfPluginErrorPermissionDenied,				//19
+	SmfPluginErrorInvalidApplication,			//20
+	SmfPluginErrorServiceUnavailable,			//21
+	SmfPluginErrorServiceTemporaryUnavailable,	//22
+	SmfPluginErrorFormatNotSupported, 			//23
+	SmfPluginErrorDataSizeExceeded ,			//24
+	SmfPluginErrorInvalidArguments,				//25
+	SmfPluginErrorParsingFailed,				//26
+	SmfPluginErrorNetworkError,					//27
+	SmfPluginErrorCancelComplete,				//28
+	SmfTMConnectionRefusedError,				//29
+	SmfTMRemoteHostClosedError,					//30
+	SmfTMHostNotFoundError,						//31
+	SmfTMTimeoutError,							//32
+	SmfTMOperationCanceledError,				//33
+	SmfTMSslHandshakeFailedError,				//34
+	SmfTMProxyConnectionRefusedError,			//35
+	SmfTMProxyConnectionClosedError,			//36
+	SmfTMProxyNotFoundError,					//37
+	SmfTMProxyTimeoutError,						//38
+	SmfTMProxyAuthenticationRequiredError,		//39
+	SmfTMContentAccessDenied,					//40
+	SmfTMContentOperationNotPermittedError,		//41
+	SmfTMContentNotFoundError,					//42
+	SmfTMAuthenticationRequiredError,			//43
+	SmfTMContentReSendError,					//44
+	SmfTMProtocolUnknownError,					//45
+	SmfTMProtocolInvalidOperationError,			//46
+	SmfTMUnknownNetworkError,					//47
+	SmfTMUnknownProxyError,						//48
+	SmfTMUnknownContentError,					//49
+	SmfTMProtocolFailure,						//50
+	SmfTMUnknownError,							//51
+	SmfTMIAPChanged,							//52
+	SmfTMCancelled,								//53
+	SmfTMUnsupportedContentEncodingFormat,		//54
+	SmfTMInitNetworkNotAvailable ,				//55
+	SmfTMInitRoamingNetworkUsageNotEnabled,		//56
+	SmfTMGzipMemoryError,						//57
+	SmfTMGzipStreamError,						//58
+	SmfTMGzipDataError,							//59
+	SmfMemoryAllocationFailure,					//60
+	SmfDbOpeningError,                          //61
+	SmfDbQueryExecutonError,					//61
+	SmfDbContactNotExist,						//63
+	SmfErrItemNotInRelation,                    //64
+	SmfErrInvalidRelation,                      //65  
+	SmfUnknownError								//66
+
 	};
 
 /**
@@ -390,13 +380,16 @@
 	{
 	SmfRequestPending//to allow one outstanding request per session
 	};
+
 //interface names
-const QString contactFetcherInterface("org.symbian.smf.client.contact.fetcher");
-//TODO:- changed to match PM for the time being, PM must change later
-const QString postProviderInterface("posts");
-//const QString postProviderInterface("org.symbian.smf.client.contact.posts");
-const QString galleryInterface("org.symbian.smf.client.gallery");
-
-
+const QString contactFetcherInterface("org.symbian.smf.plugin.contact.fetcher\0.2");
+const QString postProviderInterface("org.symbian.smf.plugin.contact.posts\0.2");
+const QString galleryInterface("org.symbian.smf.plugin.gallery\0.2");
+const QString musicServiceInterface("org.symbian.smf.plugin.music.service\0.2");
+const QString musicSearchInterface("org.symbian.smf.client.music.search\0.2");
+const QString playlistServiceInterface("org.symbian.smf.plugin.music.playlist\0.2");
+const QString musicEventServiceInterface("org.symbian.smf.plugin.music.events\0.2");
+const QString lyricsServiceInterface("org.symbian.smf.plugin.music.lyrics\0.2");
+const QString activityFetcherInterface("org.symbian.smf.plugin.activity.fetcher\0.2");
 
 #endif /* SMFGLOBAL_H_ */
--- a/smf/smfservermodule/smfclient/common/smfgroup.cpp	Mon Jun 07 11:43:45 2010 +0100
+++ b/smf/smfservermodule/smfclient/common/smfgroup.cpp	Wed Jun 23 19:51:49 2010 +0530
@@ -14,9 +14,6 @@
  * 
  * Description:
  * The group class represents an instance of a group as per SN site terminolgy
- *
- *  Created on: Apr 16, 2010
- *      Author: manasij
  */
 	
 #include "smfgroup.h"
--- a/smf/smfservermodule/smfclient/common/smfgroup.h	Mon Jun 07 11:43:45 2010 +0100
+++ b/smf/smfservermodule/smfclient/common/smfgroup.h	Wed Jun 23 19:51:49 2010 +0530
@@ -20,20 +20,26 @@
 #ifndef SMFGROUP_H_
 #define SMFGROUP_H_
 
-#include <smfcontact.h>
+#include "smfcontact.h"
 #include <qdatastream.h>
 #include <QSharedData>
 #include "smfclientglobal.h"
 #include <QMetaType>
 #include "smfgroup_p.h"
 
-
+/**
+ * Max number of members per group
+ */
+const int MaxMemberPerGroup = 1000;
+/**
+ * Max size for one SmfGroup
+ */
+const int MaxSmfGroupSize = MaxSmfContactSize*MaxMemberPerGroup;
 /**
  * @ingroup smf_common_group
  * The group class represents an instance of a group as per SN site terminolgy
  */
 
-//QList<SmfGroup> gives error for serialization if its derived from QObject
 class  SMFCLIENT_EXPORT SmfGroup //: public QObject
 	{
 	//Q_OBJECT
--- a/smf/smfservermodule/smfclient/common/smfmusicfingerprint.h	Mon Jun 07 11:43:45 2010 +0100
+++ b/smf/smfservermodule/smfclient/common/smfmusicfingerprint.h	Wed Jun 23 19:51:49 2010 +0530
@@ -20,9 +20,9 @@
 #ifndef SMFMUSICFINGERPRINT_H_
 #define SMFMUSICFINGERPRINT_H_
 
-#include <qdatastream.h>
+#include <QDataStream>
 #include <QSharedData>
-#include <smfclientglobal.h>
+#include "smfclientglobal.h"
 #include <QMetaType>
 
 class SmfMusicFingerPrintPrivate;
--- a/smf/smfservermodule/smfclient/common/smfmusicprofile.h	Mon Jun 07 11:43:45 2010 +0100
+++ b/smf/smfservermodule/smfclient/common/smfmusicprofile.h	Wed Jun 23 19:51:49 2010 +0530
@@ -20,15 +20,18 @@
 #ifndef SMFMUSICPROFILE_H_
 #define SMFMUSICPROFILE_H_
 
-#include <smftrackinfo.h>
-#include <smfevent.h>
+#include "smftrackinfo.h"
+#include "smfevent.h"
 #include <qdatastream.h>
 #include <QSharedData>
-#include <smfclientglobal.h>
+#include "smfclientglobal.h"
 #include <QMetaType>
 
 class SmfMusicProfilePrivate;
-
+/**
+ * Implementation constants
+ */
+const int SmfMusicProfileMaxSize = 20000;
 /**
  * @ingroup smf_common_group
  * The music profile class represents a user's profile in music site
--- a/smf/smfservermodule/smfclient/common/smfmusicrating.cpp	Mon Jun 07 11:43:45 2010 +0100
+++ b/smf/smfservermodule/smfclient/common/smfmusicrating.cpp	Wed Jun 23 19:51:49 2010 +0530
@@ -18,8 +18,8 @@
  *
  */
 
-#include <smfmusicrating.h>
-#include <smfmusicrating_p.h>
+#include "smfmusicrating.h"
+#include "smfmusicrating_p.h"
 
 /**
  * Constructor with default argument
@@ -27,6 +27,7 @@
  */
 SmfMusicRating::SmfMusicRating( SmfTrackInfo *aParent )
 	{
+	Q_UNUSED(aParent)
 	d = new SmfMusicRatingPrivate();
 	}
 
--- a/smf/smfservermodule/smfclient/common/smfmusicrating.h	Mon Jun 07 11:43:45 2010 +0100
+++ b/smf/smfservermodule/smfclient/common/smfmusicrating.h	Wed Jun 23 19:51:49 2010 +0530
@@ -22,7 +22,7 @@
 #define SMFMUSICRATING_H_
 
 #include <QSharedData>
-#include <smfclientglobal.h>
+#include "smfclientglobal.h"
 #include <QMetaType>
 
 class SmfTrackInfo;
--- a/smf/smfservermodule/smfclient/common/smfobserver.h	Mon Jun 07 11:43:45 2010 +0100
+++ b/smf/smfservermodule/smfclient/common/smfobserver.h	Wed Jun 23 19:51:49 2010 +0530
@@ -1,9 +1,21 @@
 
-/*
- * SmfObserver.h
+/**
+ * Copyright (c) 2010 Sasken Communication Technologies Ltd.
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of the "Eclipse Public License v1.0"
+ * which accompanies  this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html"
  *
- *  Created on: Mar 17, 2010
- *      Author: manasij
+ * Initial Contributors:
+ * Chandradeep Gandhi, Sasken Communication Technologies Ltd - Initial contribution
+ *
+ * Contributors:
+ * Manasij Roy, Nalina Hariharan
+ *
+ * Description:
+ * Observer class to notify availability of asynchronous requests
+ *
  */
 
 #ifndef SMFOBSERVER_H_
@@ -11,9 +23,18 @@
 class QByteArray;
 #include "smfglobal.h"
 #include <QObject>
+/**
+ * Observer class to notify availability of asynchronous requests
+ */
 class smfObserver : public QObject
 	{
 public:
+	/**
+	 * To notify availibility of asynchronous requests.
+	 * @param result Requested result, before using must check error param.
+	 * @param opcode Requested opcode, for which the result has arrived.
+	 * 
+	 */
 	virtual void resultsAvailable(QByteArray result,SmfRequestTypeID opcode, SmfError error)= 0;
 	};
 
--- a/smf/smfservermodule/smfclient/common/smfpicture.cpp	Mon Jun 07 11:43:45 2010 +0100
+++ b/smf/smfservermodule/smfclient/common/smfpicture.cpp	Wed Jun 23 19:51:49 2010 +0530
@@ -17,15 +17,16 @@
  *
  */
 
-#include <smfpicture.h>
-#include <smfpicture_p.h>
+#include "smfpicture.h"
+#include "smfpicture_p.h"
 
 /**
  * Constructor with default argument
  */
-SmfPicture::SmfPicture( )
+SmfPicture::SmfPicture(/*bool aDownloaded*/)
 	{
 	d = new SmfPicturePrivate;
+	//d->isDownloaded = aDownloaded;
 	}
 
 /**
@@ -162,7 +163,10 @@
 	{
 	return d->m_photoId;
 	}
-
+bool SmfPicture::downloadFlag()
+	{
+	return d->isDownloaded;
+	}
 /**
  * Method to set a picture owner
  * @param aOwner The owner of the picture
@@ -321,9 +325,9 @@
 	aDataStream>>aPic.d->m_description;
 	
 	// Deserialize d->m_picVisibility
-	quint32 val = aPic.d->m_picVisibility;
+	quint32 val = 0;
 	aDataStream>>val;
-	//aPic.d->m_picVisibility = val;
+	aPic.d->m_picVisibility = (SmfPictureVisibility)val;
 
 	// Deserialize d->m_postedOn
 	aDataStream>>aPic.d->m_postedOn;
--- a/smf/smfservermodule/smfclient/common/smfpicture.h	Mon Jun 07 11:43:45 2010 +0100
+++ b/smf/smfservermodule/smfclient/common/smfpicture.h	Wed Jun 23 19:51:49 2010 +0530
@@ -31,7 +31,10 @@
 #include <smfcomment.h>
 
 class SmfPicturePrivate;
-
+/**
+ * Max size for one SmfPicture
+ */
+const int MaxSmfPictureSize = 1000;
 /**
  * SmfPictureVisibility enumeration
  */
@@ -52,9 +55,12 @@
 	{
 public:
 	/**
-	 * Constructor with default argument
+	 * Constructor with default argument.
+	 * @param aDownloaded This flag is to know whether the content is downloaded
+	 * in the device(if true). If false it signifies that SmfPicture contains
+	 * a link/url to the location of the content
 	 */
-	SmfPicture( );
+	SmfPicture(/*bool aDownloaded = false*/ );
 	
 	/**
 	 * Copy Constructor
@@ -139,7 +145,14 @@
 	 * @return The ID value 
 	 */
 	QString id( ) const;
-		
+	
+	/**
+	 * Gets download flag. This flag is to know whether the content is downloaded
+	 * in the device(if true). If false it signifies that SmfPicture contains
+	 * a link/url to the location of the content
+	 */
+	bool downloadFlag();
+			
 	/**
 	 * Method to set a picture owner
 	 * @param aOwner The owner of the picture
--- a/smf/smfservermodule/smfclient/common/smfpicture_p.h	Mon Jun 07 11:43:45 2010 +0100
+++ b/smf/smfservermodule/smfclient/common/smfpicture_p.h	Wed Jun 23 19:51:49 2010 +0530
@@ -42,6 +42,7 @@
 		m_comments.clear();
 		m_tags.clear();
 		m_url.clear();
+		isDownloaded = false;
 	}
 	/**
 	 * Constructor
@@ -55,6 +56,8 @@
 		m_tags.clear();
 		m_url.clear();
 		m_picture = aImage;
+		//false by default
+		isDownloaded = false;
 	}
 	
 	/**
@@ -72,7 +75,11 @@
 		m_comments ( aOther.m_comments ),
 		m_tags ( aOther.m_tags ),
 		m_url ( aOther.m_url ),
-		m_picture ( aOther.m_picture )	{ }
+		m_picture ( aOther.m_picture ),
+		isDownloaded(aOther.isDownloaded)
+			{
+		
+			}
 	
 	/**
 	 * Destructor
@@ -91,7 +98,13 @@
 	QStringList m_tags;		// tags
 	QUrl m_url;				// url
 	QImage m_picture;		// picture data as bytearray
-	
+	/**
+	 * Flag whether the content is actually available in device - 
+	 * if this is false then only the url/link to the media is available 
+	 * in the class - clients can use the link to download the content/visit 
+	 * the site.
+	 */
+	bool isDownloaded;
 };
 
 #endif /* SMFPICTURE_P_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/smf/smfservermodule/smfclient/common/smfpicturealbum.cpp	Wed Jun 23 19:51:49 2010 +0530
@@ -0,0 +1,323 @@
+/**
+ * Copyright (c) 2010 Sasken Communication Technologies Ltd.
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of the "Eclipse Public License v1.0" 
+ * which accompanies  this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html"
+ *
+ * Initial Contributors:
+ * Chandradeep Gandhi, Sasken Communication Technologies Ltd - Initial contribution
+ *
+ * Contributors:
+ * Manasij Roy, Nalina Hariharan
+ * 
+ * Description:
+ * The album to contain a set pf pictures
+ *
+ */
+
+#include <smfpicturealbum.h>
+#include <smfpicturealbum_p.h>
+
+/**
+ * Constructor with default argument
+ */
+SmfPictureAlbum::SmfPictureAlbum( )
+	{
+	d = new SmfPictureAlbumPrivate;
+	}
+
+/**
+ * Copy Constructor
+ * @param aOther The reference object
+ */
+SmfPictureAlbum::SmfPictureAlbum( const SmfPictureAlbum &aOther )
+	: d( aOther.d )
+	{
+	}
+
+/**
+ * Overloaded = operator
+ * @param aOther The reference object
+ * @return The target reference value
+ */
+SmfPictureAlbum& SmfPictureAlbum::operator=( const SmfPictureAlbum &aOther )
+	{
+	d->m_albumId = aOther.d->m_albumId;
+	d->m_title = aOther.d->m_title;
+	d->m_description = aOther.d->m_description;
+	d->m_albumVisibility = aOther.d->m_albumVisibility;
+	d->m_postedOn = aOther.d->m_postedOn;
+	d->m_comments = aOther.d->m_comments;
+	d->m_keywords = aOther.d->m_keywords;
+	d->m_url = aOther.d->m_url;
+	d->m_picCount =aOther.d->m_picCount;
+	d->m_thumbnail = aOther.d->m_thumbnail ;	
+	return *this;
+	}
+
+/**
+ * Destructor
+ */
+SmfPictureAlbum::~SmfPictureAlbum( )
+	{
+	
+	}
+
+
+/**
+ * Method to get a album title
+ * @return The title of the album
+ */
+QString SmfPictureAlbum::title( ) const
+	{
+	return d->m_title;
+	}
+
+/**
+ * Method to get a album description
+ * @return The description of the album
+ */
+QString SmfPictureAlbum::description( ) const
+	{
+	return d->m_description;
+	}
+
+/**
+ * Method to get a visibility of a album for public
+ * @return The visibility mode of this album for others
+ */
+SmfPictureVisibility SmfPictureAlbum::visibility( ) const
+	{
+	return d->m_albumVisibility;
+	}
+
+/**
+ * Method to get the date of posting the album
+ * @return The posted date of the album
+ */
+QDateTime SmfPictureAlbum::postedDate( ) const
+	{
+	return d->m_postedOn;
+	}
+
+/**
+ * Method to get the comments for the album
+ * @return The comments for the album
+ */
+QList<SmfComment> SmfPictureAlbum::comments( ) const
+	{
+	return d->m_comments;
+	}
+
+/**
+ * Method to get the tags for the album
+ * @return The tags for the album
+ */
+QStringList SmfPictureAlbum::keywords( ) const
+	{
+	return d->m_keywords;
+	}
+
+/**
+ * Method to get the url of the album
+ * @return The url of the album
+ */
+QUrl SmfPictureAlbum::url( ) const
+	{
+	return d->m_url;
+	}
+
+/**
+ * Method to get the album data as QImage
+ * @return The album as QImage
+ */
+qint32 SmfPictureAlbum::pictureCount( ) const
+	{
+	return d->m_picCount;
+	}
+	
+/**
+ * Method to get the id of the album
+ * @return The ID value 
+ */
+QString SmfPictureAlbum::id( ) const
+	{
+	return d->m_albumId;
+	}
+
+
+/**
+ * Method to set a album title
+ * @param aTitle The title of the album
+ */
+void SmfPictureAlbum::setTitle( const QString &aTitle )
+	{
+	d->m_title = aTitle;
+	}
+
+/**
+ * Method to set a album description
+ * @param aDescription The description of the album
+ */
+void SmfPictureAlbum::setDescription( const QString &aDescription )
+	{
+	d->m_description = aDescription;
+	}
+
+/**
+ * Method to set a visibility of a album for public
+ * @param aVisibility aVisibility The visibility mode of 
+ * this album for others
+ */
+void SmfPictureAlbum::setVisibility( const SmfPictureVisibility &aVisibility )
+	{
+	d->m_albumVisibility = aVisibility;
+	}
+
+/**
+ * Method to set the date of posting the album
+ * @param aDate The post date of the album
+ */
+void SmfPictureAlbum::setPostedDate( const QDateTime &aDate )
+	{
+	d->m_postedOn = aDate;
+	}
+
+/**
+ * Method to add comment on the album
+ * @param aComment The comment for the album
+ */
+void SmfPictureAlbum::addComment( const SmfComment &aComment )
+	{
+	d->m_comments.append(aComment);
+	}
+
+/**
+ * Method to add tags for the album
+ * @param aTag The tag for the album
+ */
+void SmfPictureAlbum::addKeywords(const QStringList &aKeywords )
+	{
+	d->m_keywords = aKeywords;
+	}
+
+/**
+ * Method to set the url of the album
+ * @param aUrl The url of the album
+ */
+void SmfPictureAlbum::setUrl( const QUrl &aUrl )
+	{
+	d->m_url = aUrl;
+	}
+
+/**
+ * Method to set the album data as QImage
+ * @param aData The album as QImage
+ */
+void SmfPictureAlbum::setThumbnail( const QImage &aData )
+	{
+	d->m_thumbnail = aData;
+	}
+
+/**
+ * Method to set the id of the album
+ * @param aId The ID value 
+ */
+void SmfPictureAlbum::setId( const QString &aId )
+	{
+	d->m_albumId = aId;
+	}
+
+
+/**
+ * Method for Externalization. Writes the SmfPictureAlbum object to 
+ * the stream and returns a reference to the stream.
+ * @param aDataStream Stream to be written
+ * @param aPic The SmfPictureAlbum object to be externalized
+ * @return reference to the written stream
+ */
+QDataStream& operator<<( QDataStream &aDataStream, 
+		const SmfPictureAlbum &aAlbm )
+	{
+	//serialize d->m_albumId;
+	aDataStream << aAlbm.d->m_albumId;
+
+	//serialize d->m_title;
+	aDataStream << aAlbm.d->m_title;
+
+	//serialize d->m_description;
+	aDataStream << aAlbm.d->m_description;
+
+	//serialize d->m_albumVisibility;
+	quint32 val = aAlbm.d->m_albumVisibility;
+	aDataStream << val;
+
+	//serialize d->m_postedOn;
+	aDataStream << aAlbm.d->m_postedOn;
+
+	//serialize d->m_comments;
+	aDataStream << aAlbm.d->m_comments;
+
+	//serialize d->m_keywords;
+	aDataStream << aAlbm.d->m_keywords;
+
+	//serialize d->m_url;
+	aDataStream << aAlbm.d->m_url;
+
+	//serialize d->m_picCount;
+	aDataStream << aAlbm.d->m_picCount;
+
+	//serialize d->m_thumbnail ;	
+	aDataStream << aAlbm.d->m_thumbnail ;	
+
+
+	
+	return aDataStream;
+	}
+
+/**
+ * Method for Internalization. Reads a SmfPictureAlbum object from 
+ * the stream and returns a reference to the stream.
+ * @param aDataStream Stream to be read
+ * @param aPic The SmfPictureAlbum object to be internalized
+ * @return reference to the stream
+ */
+QDataStream& operator>>( QDataStream &aDataStream, 
+		SmfPictureAlbum &aAlbm)
+	{
+	//deserialize d->m_albumId;
+	aDataStream >> aAlbm.d->m_albumId;
+
+	//deserialize d->m_title;
+	aDataStream >> aAlbm.d->m_title;
+
+	//deserialize d->m_description;
+	aDataStream >> aAlbm.d->m_description;
+
+	//deserialize d->m_albumVisibility;
+	quint32 val =  0;
+	aDataStream >>val;
+	aAlbm.d->m_albumVisibility = (SmfPictureVisibility)val;
+
+	//deserialize d->m_postedOn;
+	aDataStream >> aAlbm.d->m_postedOn;
+
+	//deserialize d->m_comments;
+	aDataStream >> aAlbm.d->m_comments;
+
+	//deserialize d->m_keywords;
+	aDataStream >> aAlbm.d->m_keywords;
+
+	//deserialize d->m_url;
+	aDataStream >> aAlbm.d->m_url;
+
+	//deserialize d->m_picCount;
+	aDataStream >> aAlbm.d->m_picCount;
+
+	//deserialize d->m_thumbnail ;	
+	aDataStream >> aAlbm.d->m_thumbnail ;	
+
+	return aDataStream;
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/smf/smfservermodule/smfclient/common/smfpicturealbum.h	Wed Jun 23 19:51:49 2010 +0530
@@ -0,0 +1,226 @@
+/**
+ * Copyright (c) 2010 Sasken Communication Technologies Ltd.
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of the "Eclipse Public License v1.0" 
+ * which accompanies  this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html"
+ *
+ * Initial Contributors:
+ * Chandradeep Gandhi, Sasken Communication Technologies Ltd - Initial contribution
+ *
+ * Contributors:
+ * Manasij Roy, Nalina Hariharan
+ * 
+ * Description:
+ * The album class represents an online picture album (collection/gallery)
+ *
+ */
+
+#ifndef SMFPICTUREALBUM_H_
+#define SMFPICTUREALBUM_H_
+
+#include <QImage>
+#include <QDateTime>
+#include <QStringList>
+#include <QUrl>
+#include <qdatastream.h>
+#include <QSharedData>
+#include <smfclientglobal.h>
+#include <QMetaType>
+#include <smfcomment.h>
+#include <smfpicture.h>
+
+class SmfPictureAlbumPrivate;
+/**Implementation const */
+const int MaxSmfPictureAlbumSize = 20000;//20KB
+/**
+ * @ingroup smf_common_group
+ * album class represents an online picture album (collection)
+ */
+class SMFCLIENT_EXPORT SmfPictureAlbum
+	{
+public:
+	/**
+	 * Constructor with default argument
+	 */
+	SmfPictureAlbum( );
+	
+	/**
+	 * Copy Constructor
+	 * @param aOther The reference object
+	 */
+	SmfPictureAlbum( const SmfPictureAlbum &aOther );
+	
+	/**
+	 * Overloaded = operator
+	 * @param aOther The reference object
+	 * @return The current object reference
+	 */
+	SmfPictureAlbum& operator=(const SmfPictureAlbum &aOther);
+	
+	/**
+	 * Destructor
+	 */
+	~SmfPictureAlbum( );
+	
+	/**
+	 * Method to get a album title
+	 * @return The title of the album
+	 */
+	QString title( ) const;
+	
+	/**
+	 * Method to get a album description
+	 * @return The description of the album
+	 */
+	QString description( ) const;
+	
+	/**
+	 * Method to get a visibility of a album for public
+	 * @return The visibility mode of this album for others
+	 */
+	SmfPictureVisibility visibility( ) const;
+	
+	/**
+	 * Method to get the date of posting the album
+	 * @return The posted date of the album
+	 */
+	QDateTime postedDate( ) const;
+	
+	/**
+	 * Method to get the comments for the album
+	 * @return The comments for the album
+	 */
+	QList<SmfComment> comments( ) const;
+	
+	/**
+	 * Method to get the keywords for the album
+	 * @return The keywords for the album
+	 */
+	QStringList keywords( ) const;
+	
+	/**
+	 * Method to get the url of the album
+	 * @return The url of the album
+	 */
+	QUrl url( ) const;
+	
+	/**
+	 * Method to get the thumbnail for this album as QImage
+	 * @return The picture as QImage
+	 */
+	QImage thumbnail( ) const;
+
+	/**
+	 * Method to get the number of pictures in this album
+	 * @return number of pictures in this album
+	 */
+	qint32 pictureCount( ) const;
+
+	/**
+	 * Method to get the id of the album
+	 * @return The ID value 
+	 */
+	QString id( ) const;
+		
+	/**
+	 * Method to set a album title
+	 * @param aTitle The title of the album
+	 */
+	void setTitle( const QString &aTitle );
+	
+	/**
+	 * Method to set a album description
+	 * @param aDescription The description of the album
+	 */
+	void setDescription( const QString &aDescription );
+	
+	/**
+	 * Method to set a visibility of a album for public
+	 * @param aVisibility aVisibility The visibility mode of 
+	 * this album for others
+	 */
+	void setVisibility( const SmfPictureVisibility &aVisibility );
+	
+	/**
+	 * Method to set the date of posting the album
+	 * @param aDate The post date of the album
+	 */
+	void setPostedDate( const QDateTime &aDate );
+	
+	/**
+	 * Method to add comment on the album
+	 * @param aComment The comment for the album
+	 */
+	void addComment( const SmfComment &aComment );
+	
+	/**
+	 * Method to add keywords for the album
+	 * @param aTag The tag for the album
+	 */
+	void addKeywords( const QStringList &aWords );
+	
+	/**
+	 * Method to set the url of the album
+	 * @param aUrl The url of the album
+	 */
+	void setUrl( const QUrl &aUrl );
+
+	/**
+	 * Method to set the thumbnail for this album as QImage
+	 * @return The picture as QImage
+	 */
+	void setThumbnail(const QImage &aImage );
+	
+	/**
+	 * Method to get the number of pictures in this album
+	 * @return number of pictures in this album
+	 */
+	 void setPictureCount( const qint32 aCount);
+
+	/**
+	 * Method to set the id of the album
+	 * @param aId The ID value 
+	 */
+	void setId( const QString &aId );
+	
+private:
+	QSharedDataPointer<SmfPictureAlbumPrivate> d;
+	
+	friend QDataStream& operator<<( QDataStream &aDataStream, 
+			const SmfPictureAlbum &aAlbm );
+
+	friend QDataStream& operator>>( QDataStream &aDataStream, 
+			SmfPictureAlbum &aAlbm );
+	
+	};
+
+
+/**
+ * Method for Externalization. Writes the SmfPictureAlbum object to 
+ * the stream and returns a reference to the stream.
+ * @param aDataStream Stream to be written
+ * @param aAlbm The SmfPictureAlbum object to be externalized
+ * @return reference to the written stream
+ */
+SMFCLIENT_EXPORT QDataStream& operator<<( QDataStream &aDataStream, 
+		const SmfPictureAlbum &aAlbm );
+
+/**
+ * Method for Internalization. Reads a SmfPictureAlbum object from 
+ * the stream and returns a reference to the stream.
+ * @param aDataStream Stream to be read
+ * @param aAlbm The SmfPictureAlbum object to be internalized
+ * @return reference to the stream
+ */
+SMFCLIENT_EXPORT QDataStream& operator>>( QDataStream &aDataStream, 
+		SmfPictureAlbum &aAlbm);
+
+typedef QList<SmfPictureAlbum> SmfPictureAlbumList;
+
+// Make the class SmfPictureAlbum known to QMetaType, so that as to register it.
+Q_DECLARE_METATYPE(SmfPictureAlbum)
+Q_DECLARE_METATYPE(QList<SmfPictureAlbum>)
+
+#endif /* SMFPICTUREALBUM_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/smf/smfservermodule/smfclient/common/smfpicturealbum_p.h	Wed Jun 23 19:51:49 2010 +0530
@@ -0,0 +1,88 @@
+/**
+ * Copyright (c) 2010 Sasken Communication Technologies Ltd.
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of the "Eclipse Public License v1.0" 
+ * which accompanies  this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html"
+ *
+ * Initial Contributors:
+ * Chandradeep Gandhi, Sasken Communication Technologies Ltd - Initial contribution
+ *
+ * Contributors:
+ * Manasij Roy, Nalina Hariharan
+ * 
+ * Description:
+ * Private class implemented for implicit sharing of SmfPictureAlbum class
+ *
+ */
+
+#ifndef SMFPICTUREALBUM_P_H_
+#define SMFPICTUREALBUM_P_H_
+
+
+#include <QDateTime>
+#include <QStringList>
+#include <QUrl>
+#include <QSharedData>
+#include <smfclientglobal.h>
+#include <smfpicturealbum.h>
+
+class SmfPictureAlbumPrivate : public QSharedData
+{
+public:
+	/**
+	 * Constructor
+	 */
+	SmfPictureAlbumPrivate( ) { 
+		m_title.clear();		// album title
+		m_description.clear();	// description
+		m_albumVisibility = SMFVisibilityPublic;// album visibility
+		m_comments.clear();		 // comments
+		m_keywords.clear();		// tags
+		m_url.clear();				// url
+		m_picCount=0;	//count of pictures
+		m_albumId.clear();		// unique ID of the album, service provider specific	
+	}
+	
+
+	/**
+	 * Copy Consturctor
+	 * @param aOther The reference object to be copy constructed
+	 */
+	SmfPictureAlbumPrivate( const SmfPictureAlbumPrivate &aOther ) : 
+		QSharedData ( aOther ), 
+		m_albumId ( aOther.m_albumId),
+		m_title ( aOther.m_title ),
+		m_description ( aOther.m_description ),
+		m_albumVisibility ( aOther.m_albumVisibility ),
+		m_postedOn ( aOther.m_postedOn ),
+		m_comments ( aOther.m_comments ),
+		m_keywords ( aOther.m_keywords ),
+		m_url ( aOther.m_url ),
+		m_picCount (aOther.m_picCount),
+		m_thumbnail ( aOther.m_thumbnail )	{ }
+	
+	/**
+	 * Destructor
+	 */
+	~SmfPictureAlbumPrivate( )
+		{
+		}
+  
+	/**
+	 * Member variables
+	 */
+	QString m_title;		// album title
+	QString m_description;	// description
+	SmfPictureVisibility m_albumVisibility;// album visibility
+	QDateTime m_postedOn;	// date posted
+	QList<SmfComment> m_comments;		 // comments
+	QStringList m_keywords;		// tags
+	QUrl m_url;				// url
+	QImage m_thumbnail;		// thumbnail data
+	quint32	 m_picCount;	//count of pictures
+	QString m_albumId;		// unique ID of the album, service provider specific	
+};
+
+#endif /* SMFPICTUREALBUM_P_H_ */
--- a/smf/smfservermodule/smfclient/common/smfplaylist.cpp	Mon Jun 07 11:43:45 2010 +0100
+++ b/smf/smfservermodule/smfclient/common/smfplaylist.cpp	Wed Jun 23 19:51:49 2010 +0530
@@ -13,7 +13,9 @@
  * Manasij Roy, Nalina Hariharan
  * 
  * Description:
- * The playlist class represents an instance of a playlist
+ * The playlist class represents an instance of a playlist.
+ * SmfPlaylist class is in accordance with the XML Shareable Playlist Format (XSPF)
+ * as mentioned in http://xspf.org/xspf-v1.html
  *
  */
 
@@ -44,10 +46,20 @@
  */
 SmfPlaylist& SmfPlaylist::operator=( const SmfPlaylist &aOther )
 	{
-	d->m_trackList = aOther.d->m_trackList;
+	d->m_version = aOther.d->m_version;
 	d->m_title = aOther.d->m_title;
+	d->m_author = aOther.d->m_author;
+	d->m_comments = aOther.d->m_comments;
+	d->m_info = aOther.d->m_info;
+	d->m_location = aOther.d->m_location;
+	d->m_playlistId = aOther.d->m_playlistId;
+	d->m_image = aOther.d->m_image;
 	d->m_creationDate = aOther.d->m_creationDate;
-	d->m_playlistId = aOther.d->m_playlistId;
+	d->m_license = aOther.d->m_license;
+	d->m_attribution = aOther.d->m_attribution;
+	d->m_metadata = aOther.d->m_metadata;
+	d->m_extension = aOther.d->m_extension;
+	d->m_trackList = aOther.d->m_trackList;
 	return *this;
 	}
 
@@ -59,12 +71,12 @@
 	}
 
 /**
- * Method to get the list of tracks in the playlist
- * @return The list of tracks in the playlist
+ * Method to get the version of the playlist
+ * @return The version of the playlist
  */
-QList<SmfTrackInfo> SmfPlaylist::trackList( ) const
+QString SmfPlaylist::version( ) const
 	{
-	return d->m_trackList;
+	return d->m_version;
 	}
 
 /**
@@ -77,6 +89,61 @@
 	}
 
 /**
+ * Method to get the author of the playlist
+ * @return The author of the playlist
+ */
+QString SmfPlaylist::author( ) const
+	{
+	return d->m_author;
+	}
+
+/**
+ * Method to get the comments on the playlist
+ * @return The comments on the playlist
+ */
+QList<SmfComment> SmfPlaylist::comments( ) const
+	{
+	return d->m_comments;
+	}
+
+/**
+ * Method to get the URI of a web page to find out more about this playlist
+ * @return The info Url
+ */
+QUrl SmfPlaylist::info( ) const
+	{
+	return d->m_info;
+	}
+		
+/**
+ * Method to get the Source URI for this playlist
+ * @return The Source URI for this playlist
+ */
+QUrl SmfPlaylist::location( ) const
+	{
+	return d->m_location;
+	}
+
+/**
+ * Method to get the id of the playlist
+ * @return The ID value 
+ */
+QString SmfPlaylist::id( ) const
+	{
+	return d->m_playlistId;
+	}
+
+/**
+ * Method to get the URI of an image to display in the absence 
+ * of an image for playlist's tracks
+ * @return The deafult image Url
+ */
+QUrl SmfPlaylist::image( ) const
+	{
+	return d->m_image;
+	}
+
+/**
  * Method to get the creation date of the playlist
  * @return The date and time of creation of the playlist
  */
@@ -84,13 +151,174 @@
 	{
 	return d->m_creationDate;
 	}
+
 /**
- * Method to get the id of the playlist
- * @return The ID value 
+ * Method to get the URI of a resource that describes the license 
+ * under which this playlist was released
+ * @return The license Url
+ */
+QUrl SmfPlaylist::license( ) const
+	{
+	return d->m_license;
+	}
+
+/**
+ * Method to get the ordered list of URIs. The purpose is to satisfy 
+ * licenses allowing modification but requiring attribution
+ * @return The list of license Urls
+ */
+QList<QUrl> SmfPlaylist::attribution( ) const
+	{
+	return d->m_attribution;
+	}
+
+/**
+ * Method to get the meta element that allows metadata fields to be added to XSPF
+ * @return The meta elements as a QVarintMap
+ */
+QVariantMap SmfPlaylist::metadata( ) const
+	{
+	return d->m_metadata;
+	}
+
+/**
+ * Method to get the extension element that allows non-XSPF XML 
+ * to be included in XSPF documents
+ * @return The extension elements as a QVarintMap
+ */
+QVariantMap SmfPlaylist::extension( ) const
+	{
+	return d->m_extension;
+	}
+
+/**
+ * Method to get the list of tracks in the playlist
+ * @return The list of tracks in the playlist
+ */
+QList<SmfTrackInfo> SmfPlaylist::trackList( ) const
+	{
+	return d->m_trackList;
+	}
+
+/**
+ * Method to set the version of the playlist
+ * @param aVersion The version of the playlist
+ */
+void SmfPlaylist::setVersion( const QString& aVersion )
+	{
+	d->m_version = aVersion;
+	}
+
+/**
+ * Method to set the playlist title
+ * @param aTitle The title of the playlist
+ */
+void SmfPlaylist::setPlayListTitle( const QString &aTitle )
+	{
+	d->m_title = aTitle;
+	}
+
+/**
+ * Method to set the author of the playlist
+ * @param aAuthor The author of the playlist
+ */
+void SmfPlaylist::setAuthor( const QString& aAuthor )
+	{
+	d->m_author = aAuthor;
+	}
+
+/**
+ * Method to set the comments on the playlist
+ * @param aComments The comments on the playlist
  */
-QString SmfPlaylist::id( ) const
+void SmfPlaylist::setComments( const QList<SmfComment>& aComments )
+	{
+	d->m_comments = aComments;
+	}
+
+/**
+ * Method to set the URI of a web page to find out more about this playlist
+ * @param aInfoUrl The info Url
+ */
+void SmfPlaylist::setInfo( const QUrl& aInfoUrl )
+	{
+	d->m_info = aInfoUrl;
+	}
+
+/**
+ * Method to set the Source URI for this playlist
+ * @param aLocation The Source URI for this playlist
+ */
+void SmfPlaylist::setLocation( const QUrl& aLocation )
+	{
+	d->m_location = aLocation;
+	}
+
+/**
+ * Method to set the id of the playlist
+ * @param aId The ID value 
+ */
+void SmfPlaylist::setId( const QString &aId)
+	{
+	d->m_playlistId = aId;
+	}
+
+/**
+ * Method to set the URI of an image to display in the absence 
+ * of an image for playlist's tracks
+ * @param aImage The default image Url
+ */
+void SmfPlaylist::setImage( const QUrl& aImage )
 	{
-	return d->m_playlistId;
+	d->m_image = aImage;
+	}
+
+/**
+ * Method to set the creation date of the playlist
+ * @param aDate The date and time of creation of the playlist
+ */
+void SmfPlaylist::setCreationDate( const QDateTime& aDate )
+	{
+	d->m_creationDate = aDate;
+	}
+
+/**
+ * Method to set the URI of a resource that describes the license 
+ * under which this playlist was released
+ * @param aLicense The license Url
+ */
+void SmfPlaylist::setLicense( const QUrl& aLicense )
+	{
+	d->m_license = aLicense;
+	}
+
+/**
+ * Method to set the ordered list of URIs. The purpose is to satisfy 
+ * licenses allowing modification but requiring attribution
+ * @param aAttribution The list of license Urls
+ */
+void SmfPlaylist::setAttribution( const QList<QUrl>& aAttribution )
+	{
+	d->m_attribution = aAttribution;
+	}
+
+/**
+ * Method to set the meta element that allows metadata fields to be added to XSPF
+ * @param aMetaData The meta elements as a QVarintMap
+ */
+void SmfPlaylist::setMetadata( const QVariantMap& aMetaData )
+	{
+	d->m_metadata = aMetaData;
+	}
+
+/**
+ * Method to set the extension element that allows non-XSPF XML 
+ * to be included in XSPF documents
+ * @param aExtension The extension elements as a QVarintMap
+ */
+void SmfPlaylist::setExtension( const QVariantMap& aExtension )
+	{
+	d->m_extension = aExtension;
 	}
 
 /**
@@ -103,34 +331,6 @@
 	}
 
 /**
- * Method to set the playlist title
- * @param aTitle The new title of the playlist
- */
-void SmfPlaylist::setPlayListTitle( const QString &aTitle )
-	{
-	d->m_title = aTitle;
-	}
-
-/**
- * Method to set the creation date of the playlist
- * @param aDate The new date and time of creation of the playlist
- */
-void SmfPlaylist::setCreationDate( const QDateTime &aDate )
-	{
-	d->m_creationDate = aDate;
-	}
-
-/**
- * Method to set the id of the playlist
- * @param aId The ID value 
- */
-void SmfPlaylist::setId( const QString &aId)
-	{
-	d->m_playlistId = aId;
-	}
-
-
-/**
  * Method for Externalization. Writes the SmfPlaylist object to 
  * the stream and returns a reference to the stream.
  * @param aDataStream Stream to be written
@@ -140,17 +340,47 @@
  QDataStream &operator<<( QDataStream &aDataStream, 
 		const SmfPlaylist &aPlaylist )
 	{
-	// Serialize d->m_trackList
-	aDataStream<<aPlaylist.d->m_trackList;
+	// Serialize d->m_version
+	aDataStream<<aPlaylist.d->m_version;
 	
 	// Serialize d->m_title
 	aDataStream<<aPlaylist.d->m_title;
 	
+	// Serialize d->m_author
+	aDataStream<<aPlaylist.d->m_author;
+	
+	// Serialize d->m_comments
+	aDataStream<<aPlaylist.d->m_comments;
+	
+	// Serialize d->m_info
+	aDataStream<<aPlaylist.d->m_info;
+	
+	// Serialize d->m_location
+	aDataStream<<aPlaylist.d->m_location;
+	
+	// Serialize d->m_playlistId
+	aDataStream<<aPlaylist.d->m_playlistId;
+	
+	// Serialize d->m_image
+	aDataStream<<aPlaylist.d->m_image;
+	
 	// Serialize d->m_creationDate
 	aDataStream<<aPlaylist.d->m_creationDate;
 	
-	// Serialize d->m_playlistId
-	aDataStream<<aPlaylist.d->m_playlistId;
+	// Serialize d->m_license
+	aDataStream<<aPlaylist.d->m_license;
+	
+	// Serialize d->m_attribution
+	aDataStream<<aPlaylist.d->m_attribution;
+	
+	// Serialize d->m_metadata
+	aDataStream<<aPlaylist.d->m_metadata;
+	
+	// Serialize d->m_extension
+	aDataStream<<aPlaylist.d->m_extension;
+	
+	// Serialize d->m_trackList
+	aDataStream<<aPlaylist.d->m_trackList;
 	
 	return aDataStream;
 	}
@@ -165,17 +395,47 @@
 QDataStream &operator>>( QDataStream &aDataStream, 
 		SmfPlaylist &aPlaylist)
 	{
-	// Deserialize d->m_trackList
-	aDataStream>>aPlaylist.d->m_trackList;
+	// Deserialize d->m_version
+	aDataStream>>aPlaylist.d->m_version;
 	
 	// Deserialize d->m_title
 	aDataStream>>aPlaylist.d->m_title;
 	
-	// Deserialize d->m_creationDate
-	aDataStream>>aPlaylist.d->m_creationDate;
+	// Deserialize d->m_author
+	aDataStream>>aPlaylist.d->m_author;
+	
+	// Deserialize d->m_comments
+	aDataStream>>aPlaylist.d->m_comments;
+	
+	// Deserialize d->m_info
+	aDataStream>>aPlaylist.d->m_info;
+	
+	// Deserialize d->m_location
+	aDataStream>>aPlaylist.d->m_location;
 	
 	// Deserialize d->m_playlistId
 	aDataStream>>aPlaylist.d->m_playlistId;
 	
+	// Deserialize d->m_image
+	aDataStream>>aPlaylist.d->m_image;
+	
+	// Deserialize d->m_creationDate
+	aDataStream>>aPlaylist.d->m_creationDate;
+	
+	// Deserialize d->m_license
+	aDataStream>>aPlaylist.d->m_license;
+	
+	// Deserialize d->m_attribution
+	aDataStream>>aPlaylist.d->m_attribution;
+	
+	// Deserialize d->m_metadata
+	aDataStream>>aPlaylist.d->m_metadata;
+	
+	// Deserialize d->m_extension
+	aDataStream>>aPlaylist.d->m_extension;
+	
+	// Deserialize d->m_trackList
+	aDataStream>>aPlaylist.d->m_trackList;
+	
 	return aDataStream;
 	}
--- a/smf/smfservermodule/smfclient/common/smfplaylist.h	Mon Jun 07 11:43:45 2010 +0100
+++ b/smf/smfservermodule/smfclient/common/smfplaylist.h	Wed Jun 23 19:51:49 2010 +0530
@@ -13,24 +13,31 @@
  * Manasij Roy, Nalina Hariharan
  * 
  * Description:
- * The playlist class represents an instance of a playlist
+ * The playlist class represents an instance of a playlist.
+ * SmfPlaylist class is in accordance with the XML Shareable Playlist Format (XSPF)
+ * as mentioned in http://xspf.org/xspf-v1.html
  *
  */
 
 #ifndef SMFPLAYLIST_H_
 #define SMFPLAYLIST_H_
 
-#include <smftrackinfo.h>
 #include <qdatastream.h>
 #include <QSharedData>
-#include <smfclientglobal.h>
 #include <QMetaType>
+#include <QVariant>
+
+#include "smfclientglobal.h"
+#include "smftrackinfo.h"
+#include "smfcomment.h"
 
 class SmfPlaylistPrivate;
 
 /**
  * @ingroup smf_common_group
- * The playlist class represents an instance of a playlist
+ * The playlist class represents an instance of a playlist.
+ * SmfPlaylist class is in accordance with the XML Shareable Playlist Format (XSPF)
+ * as mentioned in http://xspf.org/xspf-v1.html
  */
 class SMFCLIENT_EXPORT SmfPlaylist
 	{
@@ -58,10 +65,10 @@
 	~SmfPlaylist( );
 	
 	/**
-	 * Method to get the list of tracks in the playlist
-	 * @return The list of tracks in the playlist
+	 * Method to get the version of the playlist
+	 * @return The version of the playlist
 	 */
-	QList<SmfTrackInfo> trackList( ) const;
+	QString version( ) const;
 	
 	/**
 	 * Method to get the playlist title
@@ -70,16 +77,162 @@
 	QString playListTitle( ) const;
 	
 	/**
+	 * Method to get the author of the playlist
+	 * @return The author of the playlist
+	 */
+	QString author( ) const;
+	
+	/**
+	 * Method to get the comments on the playlist
+	 * @return The comments on the playlist
+	 */
+	QList<SmfComment> comments( ) const;
+	
+	/**
+	 * Method to get the URI of a web page to find out more about this playlist
+	 * @return The info Url
+	 */
+	QUrl info( ) const;
+	
+	/**
+	 * Method to get the Source URI for this playlist
+	 * @return The Source URI for this playlist
+	 */
+	QUrl location( ) const;
+	
+	/**
+	 * Method to get the id of the playlist
+	 * @return The ID value 
+	 */
+	QString id( ) const;
+	
+	/**
+	 * Method to get the URI of an image to display in the absence 
+	 * of an image for playlist's tracks
+	 * @return The deafult image Url
+	 */
+	QUrl image( ) const;
+	
+	/**
 	 * Method to get the creation date of the playlist
 	 * @return The date and time of creation of the playlist
 	 */
 	QDateTime creationDate( ) const;
 	
 	/**
-	 * Method to get the id of the playlist
-	 * @return The ID value 
+	 * Method to get the URI of a resource that describes the license 
+	 * under which this playlist was released
+	 * @return The license Url
+	 */
+	QUrl license( ) const;
+	
+	/**
+	 * Method to get the ordered list of URIs. The purpose is to satisfy 
+	 * licenses allowing modification but requiring attribution
+	 * @return The list of license Urls
+	 */
+	QList<QUrl> attribution( ) const;
+	
+	/**
+	 * Method to get the meta element that allows metadata fields to be added to XSPF
+	 * @return The meta elements as a QVarintMap
+	 */
+	QVariantMap metadata( ) const;
+	
+	/**
+	 * Method to get the extension element that allows non-XSPF XML 
+	 * to be included in XSPF documents
+	 * @return The extension elements as a QVarintMap
+	 */
+	QVariantMap extension( ) const;
+	
+	/**
+	 * Method to get the list of tracks in the playlist
+	 * @return The list of tracks in the playlist
+	 */
+	QList<SmfTrackInfo> trackList( ) const;
+	
+	/**
+	 * Method to set the version of the playlist
+	 * @param aVersion The version of the playlist
+	 */
+	void setVersion( const QString& aVersion );
+	
+	/**
+	 * Method to set the playlist title
+	 * @param aTitle The title of the playlist
+	 */
+	void setPlayListTitle( const QString &aTitle );
+	
+	/**
+	 * Method to set the author of the playlist
+	 * @param aAuthor The author of the playlist
+	 */
+	void setAuthor( const QString& aAuthor );
+	
+	/**
+	 * Method to set the comments on the playlist
+	 * @param aComments The comments on the playlist
 	 */
-	QString id( ) const;
+	void setComments( const QList<SmfComment>& aComments );
+	
+	/**
+	 * Method to set the URI of a web page to find out more about this playlist
+	 * @param aInfoUrl The info Url
+	 */
+	void setInfo( const QUrl& aInfoUrl );
+	
+	/**
+	 * Method to set the Source URI for this playlist
+	 * @param aLocation The Source URI for this playlist
+	 */
+	void setLocation( const QUrl& aLocation );
+	
+	/**
+	 * Method to set the id of the playlist
+	 * @param aId The ID value 
+	 */
+	void setId( const QString &aId);
+	
+	/**
+	 * Method to set the URI of an image to display in the absence 
+	 * of an image for playlist's tracks
+	 * @param aImage The default image Url
+	 */
+	void setImage( const QUrl& aImage );
+	
+	/**
+	 * Method to set the creation date of the playlist
+	 * @param aDate The date and time of creation of the playlist
+	 */
+	void setCreationDate( const QDateTime& aDate );
+	
+	/**
+	 * Method to set the URI of a resource that describes the license 
+	 * under which this playlist was released
+	 * @param aLicense The license Url
+	 */
+	void setLicense( const QUrl& aLicense );
+	
+	/**
+	 * Method to set the ordered list of URIs. The purpose is to satisfy 
+	 * licenses allowing modification but requiring attribution
+	 * @param aAttribution The list of license Urls
+	 */
+	void setAttribution( const QList<QUrl>& aAttribution );
+	
+	/**
+	 * Method to set the meta element that allows metadata fields to be added to XSPF
+	 * @param aMetaData The meta elements as a QVarintMap
+	 */
+	void setMetadata( const QVariantMap& aMetaData );
+	
+	/**
+	 * Method to set the extension element that allows non-XSPF XML 
+	 * to be included in XSPF documents
+	 * @param aExtension The extension elements as a QVarintMap
+	 */
+	void setExtension( const QVariantMap& aExtension );
 	
 	/**
 	 * Method to set the list of tracks in the playlist
@@ -87,24 +240,6 @@
 	 */
 	void setTrackList( const QList<SmfTrackInfo> &aList );
 	
-	/**
-	 * Method to set the playlist title
-	 * @param aTitle The new title of the playlist
-	 */
-	void setPlayListTitle( const QString &aTitle );
-	
-	/**
-	 * Method to set the creation date of the playlist
-	 * @param aDate The new date and time of creation of the playlist
-	 */
-	void setCreationDate( const QDateTime &aDate );
-	
-	/**
-	 * Method to set the id of the playlist
-	 * @param aId The ID value 
-	 */
-	void setId( const QString &aId);
-	
 private:
 	QSharedDataPointer<SmfPlaylistPrivate> d;
 	
@@ -144,3 +279,4 @@
 Q_DECLARE_METATYPE(QList<SmfPlaylist>)
 
 #endif /* SMFPLAYLIST_H_ */
+
--- a/smf/smfservermodule/smfclient/common/smfplaylist_p.h	Mon Jun 07 11:43:45 2010 +0100
+++ b/smf/smfservermodule/smfclient/common/smfplaylist_p.h	Wed Jun 23 19:51:49 2010 +0530
@@ -30,9 +30,17 @@
 	 * Constructor
 	 */
 	SmfPlaylistPrivate( ) { 
-		m_trackList.clear(); 
+		m_version.clear();
 		m_title.clear();
+		m_author.clear();
+		m_comments.clear();
+		m_info.clear();
+		m_location.clear();
 		m_playlistId.clear();
+		m_image.clear();
+		m_license.clear();
+		m_attribution.clear();
+		m_trackList.clear();
 	}
 	
 	/**
@@ -41,10 +49,20 @@
 	 */
 	SmfPlaylistPrivate( const SmfPlaylistPrivate &aOther ) : 
 		QSharedData ( aOther ), 
-		m_trackList ( aOther.m_trackList ), 
+		m_version ( aOther.m_version ), 
 		m_title ( aOther.m_title ),
+		m_author ( aOther.m_author ),
+		m_comments ( aOther.m_comments ), 
+		m_info ( aOther.m_info ),
+		m_location ( aOther.m_location ),
+		m_playlistId ( aOther.m_playlistId ), 
+		m_image ( aOther.m_image ),
 		m_creationDate ( aOther.m_creationDate ),
-		m_playlistId ( aOther.m_playlistId ) 	{ }
+		m_license ( aOther.m_license ), 
+		m_attribution ( aOther.m_attribution ),
+		m_metadata ( aOther.m_metadata ),
+		m_extension ( aOther.m_extension ),
+		m_trackList ( aOther.m_trackList ) { }
 	
 	/**
 	 * Destructor
@@ -53,10 +71,27 @@
 		{
 		}
   
-	QList<SmfTrackInfo> m_trackList;// list of tracks
-	QString m_title;				// playlist name
-	QDateTime m_creationDate;		// creation date
-	QString m_playlistId;
+	/**
+	 * Data members
+	 */
+	QString m_version;				// playlist version
+	QString m_title;				// playlist title
+	QString m_author;				// playlist creator
+	QList<SmfComment> m_comments;	// comments about the playlist
+	QUrl m_info;					// URI of a web page to find out more about this playlist
+	QUrl m_location;				// The Source URI for this playlist
+	QString m_playlistId;			// The playlist ID
+	QUrl m_image;					// URI of an image to display in the absence of an 
+									// image for playlist's tracks
+	QDateTime m_creationDate;		// creation date of the playlist
+	QUrl m_license;					// URI of a resource that describes the license under 
+									// which this playlist was released
+	QList<QUrl> m_attribution;		// An ordered list of URIs. The purpose is to satisfy licenses 
+									// allowing modification but requiring attribution
+	QVariantMap m_metadata;			// The meta element allows metadata fields to be added to XSPF
+	QVariantMap m_extension; 		// The extension element allows non-XSPF XML 
+									// to be included in XSPF documents
+	QList<SmfTrackInfo> m_trackList;// list of tracks in the playlist
 	
 };
 
--- a/smf/smfservermodule/smfclient/common/smfpluginutil.cpp	Mon Jun 07 11:43:45 2010 +0100
+++ b/smf/smfservermodule/smfclient/common/smfpluginutil.cpp	Wed Jun 23 19:51:49 2010 +0530
@@ -54,13 +54,47 @@
 		delete m_myInstance;
 	}
 	
+
 /**
- * Method called by plugins to get the handle to QJson library 
- * @return The QJson handle
+* Read JSON string from the I/O Device and converts it to a QVariant object
+* @param io Input output device
+* @param ok if a conversion error occurs, *ok is set to false; otherwise *ok is set to true.
+* @returns a QVariant object generated from the JSON string
+*/
+QVariant SmfPluginUtil::parse ( QIODevice* io, bool* ok )
+	{
+	return m_jsonParser->parse(io, ok);
+	}
+
+/**
+* This is a method provided for convenience.
+* @param jsonData data containing the JSON object representation
+* @param ok if a conversion error occurs, *ok is set to false; otherwise *ok is set to true.
+* @returns a QVariant object generated from the JSON string
+* @sa errorString
+* @sa errorLine
+*/
+QVariant SmfPluginUtil::parse ( const QByteArray& jsonData, bool* ok )
+	{
+	return m_jsonParser->parse(jsonData, ok);
+	}
+
+/**
+* This method returns the error message tha ocuured during last parsing
+* @returns a QString object containing the error message of the last parse operation
+*/
+QString SmfPluginUtil::errorString ( ) const
+	{
+	return m_jsonParser->errorString();
+	}
+
+/**
+* This method returns line number where the last QJson parsing error occurred
+* @returns the line number where the error occurred
  */
-QJson::Parser* SmfPluginUtil::getJsonHandle( void )
+int SmfPluginUtil::errorLine ( ) const
 	{
-	return m_jsonParser;
+	return m_jsonParser->errorLine();
 	}
 
 /**
@@ -75,6 +109,9 @@
 		const QString aRegToken, 
 		const QString aPluginID )
 	{
+	Q_UNUSED(aKeys)
+	Q_UNUSED(aRegToken)
+	Q_UNUSED(aPluginID)
 	//// Call Credential manager function to get the keys passing the 
 	//// registration token and the plugin
 	}
@@ -85,6 +122,7 @@
  */
 void SmfPluginUtil::getNonce( QString &aNonceString )
 	{
+	Q_UNUSED(aNonceString)
 	//// Call Credential manager function to get the nonce string
 	}
 
@@ -108,6 +146,14 @@
 		const QMultiMap<QByteArray, QByteArray> &aParams, 
 		const SmfParsingMode aMode)
 	{
+	Q_UNUSED(aRequestUrl)
+	Q_UNUSED(aOperation)
+	Q_UNUSED(aToken)
+	Q_UNUSED(aTokenSecret)
+	Q_UNUSED(aSignatureMethod)
+	Q_UNUSED(aParams)
+	Q_UNUSED(aMode)
+	return QByteArray();
 	//// Call Credential manager function to create and sign the parameter string
 	}
 
--- a/smf/smfservermodule/smfclient/common/smfpluginutil.h	Mon Jun 07 11:43:45 2010 +0100
+++ b/smf/smfservermodule/smfclient/common/smfpluginutil.h	Wed Jun 23 19:51:49 2010 +0530
@@ -23,6 +23,7 @@
 
 #include <QNetworkAccessManager>
 #include <QMap>
+#include <QVariant>
 #include <parser.h>
 #include <smfclientglobal.h>
 
@@ -60,10 +61,34 @@
 	~SmfPluginUtil ( );
 	
 	/**
-	 * Method called by plugins to get the handle to QJson library 
-	 * @return The QJson handle
+    * Read JSON string from the I/O Device and converts it to a QVariant object
+    * @param io Input output device
+    * @param ok if a conversion error occurs, *ok is set to false; otherwise *ok is set to true.
+    * @returns a QVariant object generated from the JSON string
 	 */
-	QJson::Parser* getJsonHandle( void );
+    QVariant parse ( QIODevice* io, bool* ok = 0 );
+
+    /**
+    * This is a method provided for convenience.
+    * @param jsonData data containing the JSON object representation
+    * @param ok if a conversion error occurs, *ok is set to false; otherwise *ok is set to true.
+    * @returns a QVariant object generated from the JSON string
+    * @sa errorString
+    * @sa errorLine
+    */
+    QVariant parse ( const QByteArray& jsonData, bool* ok = 0 );
+    
+    /**
+    * This method returns the error message tha ocuured during last parsing
+    * @returns a QString object containing the error message of the last parse operation
+    */
+    QString errorString ( ) const;
+
+    /**
+    * This method returns line number where the last QJson parsing error occurred
+    * @returns the line number where the error occurred
+    */
+    int errorLine ( ) const;
 	
 	/**
 	 * Method called by plugins to get the OAuth Keys. The PM sends the 
--- a/smf/smfservermodule/smfclient/common/smfpost.cpp	Mon Jun 07 11:43:45 2010 +0100
+++ b/smf/smfservermodule/smfclient/common/smfpost.cpp	Wed Jun 23 19:51:49 2010 +0530
@@ -35,9 +35,9 @@
  * @param aImage The post's image
  * @param aUrl The post's url
  */
-SmfPost::SmfPost( QString aTitle, QString aDesc, QImage aImage, QUrl aUrl )
+SmfPost::SmfPost( SmfContact aOwner,QString aTitle, QString aDesc, QImage aImage, QUrl aUrl )
 	{
-	d = new SmfPostPrivate(aTitle, aDesc, aImage, aUrl);
+	d = new SmfPostPrivate(aOwner,aTitle, aDesc, aImage, aUrl);
 	}
 
 /**
@@ -69,15 +69,18 @@
 SmfPost::~SmfPost( )
 	{
 	}
-
+SmfContact SmfPost::owner() const
+	{
+	return d->m_owner;
+	}
 /**
  * Method to get the title of the post
  * @return The post's title
  */
 QString SmfPost::title( ) const
-		{
+	{
 	return d->m_title;
-		}
+	}
 
 /**
  * Method to get the description of the post
@@ -105,7 +108,10 @@
 		{
 	return d->m_url;
 		}
-
+void SmfPost::setOwner(const SmfContact& aOwner)
+	{
+	d->m_owner = aOwner;
+	}
 /**
  * Method to get the id of the post
  * @return The ID value 
@@ -166,6 +172,7 @@
 QDataStream &operator<<( QDataStream &aDataStream, 
 		const SmfPost &aPost )
 	{
+	aDataStream<<aPost.owner();
 	aDataStream<<aPost.title();
 	aDataStream<<aPost.description();
 	aDataStream<<aPost.image();
@@ -184,6 +191,9 @@
 QDataStream &operator>>( QDataStream &aDataStream, 
 		SmfPost &aPost)
 	{
+	SmfContact owner;
+	aDataStream>>owner;
+	aPost.setOwner(owner);
 	QString title;
 	aDataStream>>title;
 	aPost.setTitle(title);
--- a/smf/smfservermodule/smfclient/common/smfpost.h	Mon Jun 07 11:43:45 2010 +0100
+++ b/smf/smfservermodule/smfclient/common/smfpost.h	Wed Jun 23 19:51:49 2010 +0530
@@ -29,7 +29,7 @@
 #include <smfclientglobal.h>
 
 #include "smfpost_p.h"
-
+const int MaxSmfPostSize=1000;
 /**
  *  Presence info of the user
  */
@@ -60,11 +60,12 @@
 	
 	/**
 	 * Constructor
+	 * @param aOwner Owner of the post(who posted this message) of type SmfContact
 	 * @param aText The post's text
 	 * @param aImage The post's image
 	 * @param aUrl The post's url
 	 */
-	SmfPost( QString aTitle, QString aDesc, QImage aImage, QUrl aUrl );
+	SmfPost(SmfContact aOwner, QString aTitle, QString aDesc, QImage aImage, QUrl aUrl );
 
 	/**
 	 * Copy Constructor
@@ -83,7 +84,10 @@
 	 * Destructor
 	 */
 	~SmfPost( );
-	
+	/**
+	 * Returns the owner(who posted this message)
+	 */
+	SmfContact owner() const;
 	/**
 	 * Method to get the title of the post
 	 * @return The post's title
@@ -113,7 +117,10 @@
 	 * @return The ID value 
 	 */
 	QString id( ) const;
-	
+	/**
+	 * sets the owner of the post
+	 */
+	void setOwner(const SmfContact& aOwner);
 	/**
 	 * Method to set the title of the post
 	 * @param aTitle The post's new title
@@ -178,6 +185,6 @@
 
 // Make the class SmfPost known to QMetaType, so that as to register it.
 Q_DECLARE_METATYPE(SmfPost)
-Q_DECLARE_METATYPE(QList<SmfPost>)
+Q_DECLARE_METATYPE(SmfPostList)
 
 #endif /* SMFPOST_H_ */
--- a/smf/smfservermodule/smfclient/common/smfpost_p.h	Mon Jun 07 11:43:45 2010 +0100
+++ b/smf/smfservermodule/smfclient/common/smfpost_p.h	Wed Jun 23 19:51:49 2010 +0530
@@ -21,7 +21,7 @@
 #define SMFPOST_P_H_
 
 #include <QSharedData>
-
+#include "smfcontact.h"
 class SmfPostPrivate : public QSharedData
 {
 public:
@@ -33,8 +33,9 @@
 	/**
 	 * Constructor
 	 */
-	SmfPostPrivate( QString aTitle, QString aDesc, QImage aImage, QUrl aUrl ) 
+	SmfPostPrivate(SmfContact aOwner, QString aTitle, QString aDesc, QImage aImage, QUrl aUrl ) 
 		{
+		m_owner = aOwner;
 		m_title = aTitle; 
 		m_desc = aDesc;
 		m_image = aImage;
@@ -60,7 +61,7 @@
 	~SmfPostPrivate( )
 		{
 		}
-  
+	SmfContact m_owner; //owner of the post(who posted this message)
 	QString m_title;	// title
 	QString m_desc;		// description
 	QImage m_image;		// image
--- a/smf/smfservermodule/smfclient/common/smfprovider.cpp	Mon Jun 07 11:43:45 2010 +0100
+++ b/smf/smfservermodule/smfclient/common/smfprovider.cpp	Wed Jun 23 19:51:49 2010 +0530
@@ -1,162 +1,113 @@
-/*
- * smfprovider.cpp
+/**
+ * Copyright (c) 2010 Sasken Communication Technologies Ltd.
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of the "Eclipse Public License v1.0" 
+ * which accompanies  this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html"
  *
- *  Created on: Apr 15, 2010
- *      Author: manasij
+ * Initial Contributors:
+ * Chandradeep Gandhi, Sasken Communication Technologies Ltd - Initial contribution
+ *
+ * Contributors:
+ * Manasij Roy, Nalina Hariharan
+ * 
+ * Description:
+ * Interface for a base service provider
+ *
  */
 #include "smfprovider.h"
 
-  SmfProvider::SmfProvider(QObject* parent)//:QObject(parent)
-	  {
-	  
-	  }
-  SmfProvider::~SmfProvider()
-	  {
-	  
-	  }
-
-  /**
-   * Localizable name of the service 
-   * @return service name
-   */
-  QString SmfProvider::serviceName() const
+ SmfProvider::SmfProvider()
   {
-	  return m_serviceName;
+  
   }
-  
-  /**
-   * Logo of the service
-   * @return logo image of the service
-   */
-  QImage SmfProvider::serviceIcon() const
-		  {
-			  return m_serviceIcon;
-		  }
+ SmfProvider::~SmfProvider()
+  {
   
-  /**
-   * Readable service description
-   * @return service description
-   */
-  QString SmfProvider::description() const
-		  {
-	  return m_description;
-		  }
-  
-  /*
-   * Website of the service
-   */
-  QUrl SmfProvider::serviceUrl() const
-		  {
-	  return m_serviceUrl;
-		  }
-  
-  /**
-   * URL of the application providing this service
-   */
-  QUrl SmfProvider::applicationUrl() const  //
-		  {
+  }
+QString SmfProvider::serviceName() const
+ {
+	return m_serviceName;
+ }
+QImage SmfProvider::serviceIcon() const
+ {
+	return m_serviceIcon;
+ }
+QString SmfProvider::description() const
+ {
+	 return m_description;
+ }
+QUrl SmfProvider::serviceUrl() const
+ {
+	 return m_serviceUrl;
+ }
+QUrl SmfProvider::applicationUrl() const  
+ {
 	  return m_appUrl;
-		  }
-  
-  /**
-   * service types - list of interfaces that this provider support
-   */
-  QList<QString> SmfProvider::serviceTypes() const
-		  {
-	  return m_serviceTypes;
-		  }
-  
-  /////////////////////////////////////////set APIs
-  /**
-   * Localizable name of the service 
-   * 
-   */
-  void SmfProvider::serviceName(QString& name)
+ }
+QList<QString> SmfProvider::supportedInterfaces() const
+ {
+	return m_serviceTypes;
+ }
+/**
+ * List of languages supported by this service provider
+ * @return a QStringList of languages supported by this service 
+ * provider in 2 letter ISO 639-1 format.
+ */
+QStringList SmfProvider::supportedLanguages() const
+	{
+	return m_supportedLanguages;
+	}
+void SmfProvider::setServiceName(QString& name)
 	  {
 	  m_serviceName = name;
 	  }
-  
-  /**
-   * Logo of the service
-   * 
-   */
-  void SmfProvider::serviceIcon(QImage& image)
+void SmfProvider::setServiceIcon(QImage& image)
 	  {
 	  m_serviceIcon = image;
 	  }
-  
-  /**
-   * Readable service description
-   * 
-   */
-  void SmfProvider::description(QString& desc)
+void SmfProvider::setDescription(QString& desc)
 	  {
 	  m_description = desc;
 	  }
-  
-  /*
-   * Website of the service
-   */
-  void SmfProvider::serviceUrl(QUrl& url)
+void SmfProvider::setServiceUrl(QUrl& url)
 	  {
 	  m_serviceUrl = url;
 	  }
-  
-  /**
-   * URL of the application providing this service
-   */
-  void SmfProvider::applicationUrl(QUrl& url)
+void SmfProvider::setApplicationUrl(QUrl& url)
 	  {
 	  m_appUrl = url;
 	  }
-  
-  /**
-   * service types - list of interfaces that this provider support
-   */
- void SmfProvider::serviceTypes( QStringList& types)
+void SmfProvider::setSupportedInterfaces( QStringList& types)
 	 {
 	 m_serviceTypes = types;
 	 }
- /**
-  * Externalization
-  */
- QDataStream &operator<<(QDataStream& out, const SmfProvider& base)
+/**
+ * Sets the list of languages supported by this service provider
+ * @param lang A QStringList of languages supported by this service 
+ * provider in 2 letter ISO 639-1 format.
+ */
+void SmfProvider::setSupportedLanguages( QStringList& lang )
+	{
+	m_supportedLanguages = lang;
+	}
+
+QDataStream &operator<<(QDataStream& out, const SmfProvider& base)
  	{
-// 	base.writeLog("operator<<");
-// 	base.writeLog("base info:-");
-// 	base.writeLog(base.m_serviceName);
- //	base.writeLog(base.m_serviceIcon);
-// 	base.writeLog(base.m_description);
-// 	base.writeLog(base.m_serviceUrl);
-// 	base.writeLog(base.m_appUrl);
-// 	
- 	
- 	out<<base.m_serviceName;
+	out<<base.m_serviceName;
  	out<<base.m_serviceIcon;
  	out<<base.m_description;
  	out<<base.m_serviceUrl;
  	out<<base.m_appUrl;
  	return out; 
  	}
-
- /**
-  * Internalization
-  */
- QDataStream &operator>>(QDataStream& in, SmfProvider& base)
+QDataStream &operator>>(QDataStream& in, SmfProvider& base)
  	{
-// 	base.writeLog("operator>>");
-
- 	
  	in>>base.m_serviceName;
  	in>>base.m_serviceIcon;
  	in>>base.m_description;
  	in>>base.m_serviceUrl;
  	in>>base.m_appUrl;
-// 	base.writeLog("After writing,base info:-");
-// 	base.writeLog(base.m_serviceName);
-// //	base.writeLog(base.m_serviceIcon);
-// 	base.writeLog(base.m_description);
-// 	base.writeLog(base.m_serviceUrl);
-// 	base.writeLog(base.m_appUrl);
  	return in; 
  	}
--- a/smf/smfservermodule/smfclient/common/smfprovider.h	Mon Jun 07 11:43:45 2010 +0100
+++ b/smf/smfservermodule/smfclient/common/smfprovider.h	Wed Jun 23 19:51:49 2010 +0530
@@ -13,7 +13,7 @@
  * Manasij Roy, Nalina Hariharan
  * 
  * Description:
- * The SmfEvent class represents an event
+ * Interface for a base service provider
  *
  */
 
@@ -27,7 +27,6 @@
 #include <QMetaType>
 
 #include "smfclientglobal.h"
-
 /**
  * @ingroup smf_client_group 
  * Interface for a base service provider. Other service provider classes contains 
@@ -36,96 +35,109 @@
  * All of the functionality described here should be implemented by a service
  * specific plug-in object.
  */
-//TODO:- put SMFCLIENT_EXPORT
-//TODO:- QList<SmfProvider> gives error if its derived from QObject
-class SMFCLIENT_EXPORT SmfProvider //: public QObject
+class SMFCLIENT_EXPORT SmfProvider
 {
-  //Q_OBJECT
 
 public:
-  /**
-   *  Seeing as this is a plug-in implementation, these will realistically be generated by SMF factory of some kind
-   */
-   
-  SmfProvider(QObject* parent = 0);
-  ~SmfProvider();
+	
+	/**
+	 * Constructor
+	 */
+	SmfProvider();
+	/**
+	 * Destructor
+	 */
+	~SmfProvider();
 
 public:
   /**
    * Localizable name of the service 
-   * @return service name
+   * @return service name
    */
   QString serviceName() const; 
   
   /**
    * Logo of the service
-   * @return logo image of the service
+   * @return logo image of the service
    */
   QImage serviceIcon() const; 
   
   /**
    * Readable service description
-   * @return service description
+   * @return service description
    */
   QString description() const; 
   
   /*
-   * Website of the service
+   * Website of the service
    */
   QUrl serviceUrl() const;
   
   /**
-   * URL of the application providing this service
+   * URL of the application providing this service
    */
   QUrl applicationUrl() const; //
   
   /**
-   * service types - list of interfaces that this provider support
+   * List of interfaces that this provider support
    */
-  QList<QString> serviceTypes() const;
+  QList<QString> supportedInterfaces() const;
   
-  /////////////////////////////////////////set APIs
   /**
-   * Localizable name of the service 
+   * List of languages supported by this service provider
+   * @return a QStringList of languages supported by this service 
+   * provider in 2 letter ISO 639-1 format.
+   */
+  QStringList supportedLanguages() const;
+  
+  /**
+   * Sets Localizable name of the service 
    * 
    */
-  void serviceName(QString& name); 
+  void setServiceName(QString& name); 
   
   /**
-   * Logo of the service
+   * Sets Logo of the service
    * 
    */
-  void serviceIcon(QImage& image) ; 
+  void setServiceIcon(QImage& image) ; 
   
   /**
-   * Readable service description
+   * Sets Readable service description
    * 
    */
-  void description(QString& desc) ; 
+  void setDescription(QString& desc) ; 
   
   /*
-   * Website of the service
+   * Sets Website of the service
    */
-  void serviceUrl(QUrl& url) ;
+  void setServiceUrl(QUrl& url) ;
   
   /**
-   * URL of the application providing this service
+   * Sets URL of the application providing this service
    */
-  void applicationUrl(QUrl& url) ; 
+  void setApplicationUrl(QUrl& url) ; 
   
   /**
-   * service types - list of interfaces that this provider support
+   * Sets list of interfaces that this provider supports
    */
- void serviceTypes( QStringList& types);
- //TODO:- making data mems public just for testing, later provide set apis
-//private:
-public:
+ void setSupportedInterfaces( QStringList& types);
+ 
+ /**
+  * Sets the list of languages supported by this service provider
+  * @param lang A QStringList of languages supported by this service 
+  * provider in 2 letter ISO 639-1 format.
+  */
+ void setSupportedLanguages( QStringList& lang );
+ 
+private:
   QString m_serviceName;
   QImage m_serviceIcon;
   QString m_description;
   QUrl m_serviceUrl;
   QUrl m_appUrl;
   QStringList m_serviceTypes;
+  QStringList m_supportedLanguages;
   friend QDataStream &operator<<(QDataStream &, const SmfProvider&);
   friend QDataStream &operator>>(QDataStream &, SmfProvider&);
 };
--- a/smf/smfservermodule/smfclient/common/smfsubtitle.h	Mon Jun 07 11:43:45 2010 +0100
+++ b/smf/smfservermodule/smfclient/common/smfsubtitle.h	Wed Jun 23 19:51:49 2010 +0530
@@ -23,7 +23,7 @@
 #include <qdatastream.h>
 #include <QDateTime>
 #include <QSharedData>
-#include <smfclientglobal.h>
+#include "smfclientglobal.h"
 #include <QMetaType>
 
 enum SmfSubtitleSearchFilter
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/smf/smfservermodule/smfclient/common/smfurl.cpp	Wed Jun 23 19:51:49 2010 +0530
@@ -0,0 +1,259 @@
+/**
+ * Copyright (c) 2010 Sasken Communication Technologies Ltd.
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of the "Eclipse Public License v1.0" 
+ * which accompanies  this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html"
+ *
+ * Initial Contributors:
+ * Chandradeep Gandhi, Sasken Communication Technologies Ltd - Initial contribution
+ *
+ * Contributors:
+ * Manasij Roy, Nalina Hariharan
+ * 
+ * Description:
+ * The SmfUrl class represents an URL. This class has been constructed based on 
+ * the link element of the The Atom Syndication Format 
+ * (refer http://tools.ietf.org/html/rfc4287)
+ * For detailed description about atom link relations, refer 
+ * "http://www.iana.org/assignments/link-relations/link-relations.xhtml"
+ *
+ */
+
+#include <QUrl>
+
+#include "smfurl.h"
+#include "smfurl_p.h"
+
+/**
+ * Constructor with default argument
+ */
+SmfUrl::SmfUrl( )
+	{
+	d = new SmfUrlPrivate;
+	}
+
+/**
+ * Copy Constructor
+ * @param aOther The reference object
+ */
+SmfUrl::SmfUrl( const SmfUrl &aOther )
+	: d( aOther.d )
+	{
+	}
+
+/**
+ * Overloaded = operator
+ * @param aOther The reference object
+ * @return The target reference value
+ */
+SmfUrl& SmfUrl::operator=( const SmfUrl &aOther )
+	{
+	d->m_id = aOther.d->m_id;
+	return *this;
+	}
+
+/**
+ * Destructor
+ */
+SmfUrl::~SmfUrl( )
+	{
+	}
+
+
+/**
+ * Method to get the href attribute of the link
+ * @return The href attribute of the link
+ */
+QUrl SmfUrl::href( ) const
+	{
+	return d->m_href;
+	}
+
+/**
+ * Method to get the rel attribute of the link
+ * @return The rel attribute of the link
+ */
+QString SmfUrl::rel( ) const
+	{
+	return d->m_rel;
+	}
+
+/**
+ * Method to get the type attribute of the link
+ * @return The type attribute of the link
+ */
+QString SmfUrl::type( ) const
+	{
+	return d->m_type;
+	}
+
+/**
+ * Method to get the hreflang attribute of the link
+ * @return The hreflang attribute of the link
+ */
+QString SmfUrl::hreflang( ) const
+	{
+	return d->m_hreflang;
+	}
+
+/**
+ * Method to get the title attribute of the link
+ * @return The title attribute of the link
+ */
+QString SmfUrl::title( ) const
+	{
+	return d->m_title;
+	}
+
+/**
+ * Method to get the length attribute of the link
+ * @return The length attribute of the link
+ */
+QString SmfUrl::length( ) const
+	{
+	return d->m_length;
+	}
+
+/**
+ * Method to get the id of the URL
+ * @return The ID of the URL
+ */
+QString SmfUrl::id( ) const
+	{
+	return d->m_id;
+	}
+
+/**
+ * Method to set the href attribute of the link
+ * @param aData The href attribute of the link
+ */
+void SmfUrl::setHref( const QUrl& aData )
+	{
+	d->m_href = aData;
+	}
+
+/**
+ * Method to set the rel attribute of the link
+ * @param aData The rel attribute of the link
+ */
+void SmfUrl::setRel( const QString &aData )
+	{
+	d->m_rel = aData;
+	}
+
+/**
+ * Method to set the type attribute of the link
+ * @param aData The type attribute of the link
+ */
+void SmfUrl::setType( const QString &aData )
+	{
+	d->m_type = aData;
+	}
+
+/**
+ * Method to set the hreflang attribute of the link
+ * @param aData The hreflang attribute of the link
+ */
+void SmfUrl::setHhreflang( const QString &aData )
+	{
+	d->m_hreflang = aData;
+	}
+
+/**
+ * Method to set the title attribute of the link
+ * @param aData The title attribute of the link
+ */
+void SmfUrl::setTitle( const QString &aData )
+	{
+	d->m_title = aData;
+	}
+
+/**
+ * Method to set the length attribute of the link
+ * @param aData The length attribute of the link
+ */
+void SmfUrl::setLength( const QString &aData )
+	{
+	d->m_length = aData;
+	}
+
+/**
+ * Method to set the id of the URL
+ * @param aId The ID of the URL
+ */
+void SmfUrl::setId( const QString &aId )
+	{
+	d->m_id = aId;
+	}
+
+
+/**
+ * Method for Externalization. Writes the SmfUrl object to 
+ * the stream and returns a reference to the stream.
+ * @param aDataStream Stream to be written
+ * @param aUrl The SmfUrl object to be externalized
+ * @return reference to the written stream
+ */
+ QDataStream &operator<<( QDataStream &aDataStream, 
+		const SmfUrl &aUrl )
+	{
+	// Serialize d->m_href
+	aDataStream<<aUrl.d->m_href;
+	
+	// Serialize d->m_rel
+	aDataStream<<aUrl.d->m_rel;
+	
+	// Serialize d->m_type
+	aDataStream<<aUrl.d->m_type;
+	
+	// Serialize d->m_hreflang
+	aDataStream<<aUrl.d->m_hreflang;
+	
+	// Serialize d->m_title
+	aDataStream<<aUrl.d->m_title;
+	
+	// Serialize d->m_length
+	aDataStream<<aUrl.d->m_length;
+	
+	// Serialize d->m_id
+	aDataStream<<aUrl.d->m_id;
+	
+	return aDataStream;
+	}
+
+/**
+ * Method for Internalization. Reads a SmfUrl object from 
+ * the stream and returns a reference to the stream.
+ * @param aDataStream Stream to be read
+ * @param aUrl The SmfUrl object to be internalized
+ * @return reference to the stream
+ */
+QDataStream &operator>>( QDataStream &aDataStream, 
+		SmfUrl &aUrl)
+	{
+	// Deserialize d->m_href
+	aDataStream>>aUrl.d->m_href;
+	
+	// Deserialize d->m_rel
+	aDataStream>>aUrl.d->m_rel;
+	
+	// Deserialize d->m_type
+	aDataStream>>aUrl.d->m_type;
+	
+	// Deserialize d->m_hreflang
+	aDataStream>>aUrl.d->m_hreflang;
+	
+	// Deserialize d->m_title
+	aDataStream>>aUrl.d->m_title;
+	
+	// Deserialize d->m_length
+	aDataStream>>aUrl.d->m_length;
+	
+	// Deserialize d->m_id
+	aDataStream>>aUrl.d->m_id;
+	
+	return aDataStream;
+	}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/smf/smfservermodule/smfclient/common/smfurl.h	Wed Jun 23 19:51:49 2010 +0530
@@ -0,0 +1,190 @@
+/**
+ * Copyright (c) 2010 Sasken Communication Technologies Ltd.
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of the "Eclipse Public License v1.0" 
+ * which accompanies  this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html"
+ *
+ * Initial Contributors:
+ * Chandradeep Gandhi, Sasken Communication Technologies Ltd - Initial contribution
+ *
+ * Contributors:
+ * Manasij Roy, Nalina Hariharan
+ * 
+ * Description:
+ * The SmfUrl class represents an URL. This class has been constructed based on 
+ * the link element of the The Atom Syndication Format 
+ * (refer http://tools.ietf.org/html/rfc4287).
+ * For detailed description about atom link relations, refer 
+ * "http://www.iana.org/assignments/link-relations/link-relations.xhtml"
+ *
+ */
+
+#ifndef SMFURL_H_
+#define SMFURL_H_
+
+#include <qdatastream.h>
+#include <QSharedData>
+#include <smfclientglobal.h>
+#include <QMetaType>
+
+class SmfUrlPrivate;
+
+/**
+ * @ingroup smf_common_group
+ * The SmfUrl class represents an URL. This class has been constructed based on 
+ * the link element of the The Atom Syndication Format 
+ * (refer http://tools.ietf.org/html/rfc4287)
+ * For detailed description about atom link relations, refer 
+ * "http://www.iana.org/assignments/link-relations/link-relations.xhtml"
+ */
+class SMFCLIENT_EXPORT SmfUrl
+	{
+public:
+	/**
+	 * Constructor with default argument
+	 */
+	SmfUrl( );
+	
+	/**
+	 * Copy Constructor
+	 * @param aOther The reference object
+	 */
+	SmfUrl( const SmfUrl &aOther );
+	
+	/**
+	 * Overloaded = operator
+	 * @param aOther The reference object
+	 */
+	SmfUrl& operator=( const SmfUrl &aOther );
+	
+	/**
+	 * Destructor
+	 */
+	~SmfUrl( );
+	
+	/**
+	 * Method to get the href attribute of the link
+	 * @return The href attribute of the link
+	 */
+	QUrl href( ) const;
+	
+	/**
+	 * Method to get the rel attribute of the link
+	 * @return The rel attribute of the link
+	 */
+	QString rel( ) const;
+	
+	/**
+	 * Method to get the type attribute of the link
+	 * @return The type attribute of the link
+	 */
+	QString type( ) const;
+	
+	/**
+	 * Method to get the hreflang attribute of the link
+	 * @return The hreflang attribute of the link
+	 */
+	QString hreflang( ) const;
+	
+	/**
+	 * Method to get the title attribute of the link
+	 * @return The title attribute of the link
+	 */
+	QString title( ) const;
+	
+	/**
+	 * Method to get the length attribute of the link
+	 * @return The length attribute of the link
+	 */
+	QString length( ) const;
+	
+	/**
+	 * Method to get the id of the URL
+	 * @return The ID of the URL
+	 */
+	QString id( ) const;
+	
+	/**
+	 * Method to set the href attribute of the link
+	 * @param aData The href attribute of the link
+	 */
+	void setHref( const QUrl& aData );
+	
+	/**
+	 * Method to set the rel attribute of the link
+	 * @param aData The rel attribute of the link
+	 */
+	void setRel( const QString &aData );
+	
+	/**
+	 * Method to set the type attribute of the link
+	 * @param aData The type attribute of the link
+	 */
+	void setType( const QString &aData );
+	
+	/**
+	 * Method to set the hreflang attribute of the link
+	 * @param aData The hreflang attribute of the link
+	 */
+	void setHhreflang( const QString &aData );
+	
+	/**
+	 * Method to set the title attribute of the link
+	 * @param aData The title attribute of the link
+	 */
+	void setTitle( const QString &aData );
+	
+	/**
+	 * Method to set the length attribute of the link
+	 * @param aData The length attribute of the link
+	 */
+	void setLength( const QString &aData );
+	
+	/**
+	 * Method to set the id of the URL
+	 * @param aId The ID of the URL
+	 */
+	void setId( const QString &aId );
+	
+private:
+	QSharedDataPointer<SmfUrlPrivate> d;
+	
+	friend QDataStream &operator<<( QDataStream &aDataStream, 
+			const SmfUrl &aUrl );
+
+	friend QDataStream &operator>>( QDataStream &aDataStream, 
+			SmfUrl &aUrl );
+	
+	};
+
+
+/**
+ * Method for Externalization. Writes the SmfUrl object to 
+ * the stream and returns a reference to the stream.
+ * @param aDataStream Stream to be written
+ * @param aUrl The SmfUrl object to be externalized
+ * @return reference to the written stream
+ */
+SMFCLIENT_EXPORT QDataStream &operator<<( QDataStream &aDataStream, 
+		const SmfUrl &aUrl );
+
+/**
+ * Method for Internalization. Reads a SmfUrl object from 
+ * the stream and returns a reference to the stream.
+ * @param aDataStream Stream to be read
+ * @param aUrl The SmfUrl object to be internalized
+ * @return reference to the stream
+ */
+SMFCLIENT_EXPORT QDataStream &operator>>( QDataStream &aDataStream, 
+		SmfUrl &aUrl);
+
+typedef QList<SmfUrl> SmfUrlList;
+
+// Make the class SmfUrl known to QMetaType, so that as to register it.
+Q_DECLARE_METATYPE(SmfUrl)
+Q_DECLARE_METATYPE(QList<SmfUrl>)
+
+#endif /* SMFURL_H_ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/smf/smfservermodule/smfclient/common/smfurl_p.h	Wed Jun 23 19:51:49 2010 +0530
@@ -0,0 +1,68 @@
+/**
+ * Copyright (c) 2010 Sasken Communication Technologies Ltd.
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of the "Eclipse Public License v1.0" 
+ * which accompanies  this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html"
+ *
+ * Initial Contributors:
+ * Chandradeep Gandhi, Sasken Communication Technologies Ltd - Initial contribution
+ *
+ * Contributors:
+ * Manasij Roy, Nalina Hariharan
+ * 
+ * Description:
+ * Private class implemented for implicit sharing of SmfUrl class
+ *
+ */
+
+#ifndef SMFURL_P_H_
+#define SMFURL_P_H_
+
+#include <QSharedData>
+#include <QUrl>
+
+class SmfUrlPrivate : public QSharedData
+	{
+public:
+	/**
+	 * Constructor
+	 */
+	SmfUrlPrivate( ) { 
+		m_id.clear();
+	}
+	
+	/**
+	 * Copy Consturctor
+	 * @param aOther The reference object to be copy constructed
+	 */
+	SmfUrlPrivate( const SmfUrlPrivate &aOther ) : 
+		QSharedData ( aOther ), 
+		m_id ( aOther.m_id ) { }
+	
+	/**
+	 * Destructor
+	 */
+	~SmfUrlPrivate( )
+		{
+		}
+
+	/**
+	 * Data members
+	 */
+	QUrl 	m_href;		// The href attribute of an Atom link element, contains the link's IRI
+	QString m_rel;		// The rel attribute that indicates the link relation type
+	QString m_type;		// The type attribute. It is a hint about the type of the 
+						// representation that is expected to be returned when the 
+						// value of the href attribute is dereferenced
+	QString m_hreflang;	// The hreflang attribute describes the language of the resource 
+						// pointed to by the href attribute
+	QString m_title;	// The title attribute conveys human-readable information about the link
+	QString m_length;	// The length attribute indicates an advisory length 
+						// of the linked content in octets
+	QString m_id;		// The url ID
+	
+	};
+
+#endif /* SMFURL_P_H_ */
--- a/smf/smfservermodule/smfclient/smfclient.pro	Mon Jun 07 11:43:45 2010 +0100
+++ b/smf/smfservermodule/smfclient/smfclient.pro	Wed Jun 23 19:51:49 2010 +0530
@@ -4,11 +4,10 @@
     gui \
     network
 CONFIG += mobility
-MOBILITY = contacts \
+MOBILITY += contacts \
     location
 DEFINES += WRITE_LOG \
-    SMFCLIENT_LIB_EXPORT #\
-#    OLDER_QT_MOBILITY
+    SMFCLIENT_LIB_EXPORT 
 
 include(client/client.pri)
 include(common/common.pri)
@@ -18,20 +17,17 @@
     LIBS += -lqjson
 }
 
-# Private Headers
 HEADERS += $$PUBLIC_HEADERS \
     $$PRIVATE_HEADERS
-SOURCES += main.cpp
-
 symbian: { 
     TARGET.UID3 = 0xE08059D4
-    TARGET.CAPABILITY = ReadUserData \
+    TARGET.CAPABILITY = NetworkServices \
+    	ReadUserData \
         WriteUserData \
         LocalServices \
-        NetworkServices \
-        UserEnvironment
+        UserEnvironment \
+        ReadDeviceData \
+        WriteDeviceData
     TARGET.EPOCALLOWDLLDATA = 1
-    SOURCES += smfclient_reg.rss
     LIBS += -lqjson.dll
-} 
-
+}
--- a/smf/smfservermodule/smfserver/datastoremgr/datastoremgr.pri	Mon Jun 07 11:43:45 2010 +0100
+++ b/smf/smfservermodule/smfserver/datastoremgr/datastoremgr.pri	Wed Jun 23 19:51:49 2010 +0530
@@ -1,22 +1,5 @@
 INCLUDEPATH += datastoremgr \
     ./
-
-CONFIG += console \
-    qt \
-    debug \
-    warn_on
+PUBLIC_HEADERS += datastoremgr/dsm.h 
 
-PUBLIC_HEADERS += \
-	datastoremgr/smfSns.h \
-    datastoremgr/smfUserProfile.h \
-    datastoremgr/smfSocialProfile.h \
-    datastoremgr/dsm.h
-
-PRIVATE_HEADERS += 
-
-SOURCES += \
-	datastoremgr/smfSns.cpp \
-#    datastoremgr/test.cpp \
-    datastoremgr/smfUserProfile.cpp \
-    datastoremgr/smfSocialProfile.cpp \
-    datastoremgr/dsm.cpp
+SOURCES += datastoremgr/dsm.cpp
--- a/smf/smfservermodule/smfserver/datastoremgr/dsm.cpp	Mon Jun 07 11:43:45 2010 +0100
+++ b/smf/smfservermodule/smfserver/datastoremgr/dsm.cpp	Wed Jun 23 19:51:49 2010 +0530
@@ -1,25 +1,24 @@
-/*! \file
-    \brief File containing class description for DataStoreManager class.
-
-    Copyright (c) 2010 Sasken Communication Technologies Ltd.
-    All rights reserved.
-    This component and the accompanying materials are made available
-    under the terms of the "{License}"
-    which accompanies  this distribution, and is available
-    at the URL "{LicenseUrl}".
-
-    \author Jaspinder Singh, Sasken Communication Technologies Ltd - Initial contribution
-
-    \version 0.1
-
-*/
+/**
+ * Copyright (c) 2010 Sasken Communication Technologies Ltd.
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of the "Eclipse Public License v1.0" 
+ * which accompanies  this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html"
+ *
+ * Initial Contributors:
+ * Chandradeep Gandhi, Sasken Communication Technologies Ltd - Initial contribution
+ *
+ * Contributors:
+ * 
+ */
 
 #include <dsm.h>
 #include <QDebug>
 
 // Static data initialization
-DataStoreManager* DataStoreManager::m_dsm_instance = NULL;
-const QString DataStoreManager::db_name = "dsm.db";
+DataStoreManager* DataStoreManager::dsmInstance = NULL;
+const QString DataStoreManager::dbName = "dsm.db";
 DataStoreManagerState DataStoreManager::state = CLOSED;
 
 //! \fn getDataStoreManager()
@@ -31,15 +30,13 @@
     \return Pointer to the current instantiation of DataStoreManager.
 */
 DataStoreManager* DataStoreManager::getDataStoreManager(){
-    if(m_dsm_instance == NULL){
-        m_dsm_instance = new DataStoreManager(DataStoreManager::db_name);
-        if(!(m_dsm_instance->InitializeDataBase())){
+    if(dsmInstance == NULL){
+    dsmInstance = new DataStoreManager(DataStoreManager::dbName);
+        if(!(dsmInstance->InitializeDataBase())){
             return NULL;
         }
-
     }
-
-    return  m_dsm_instance;
+    return  dsmInstance;
 }
 
 //! \fn ~DataStoreManager()
@@ -51,7 +48,7 @@
 DataStoreManager::~DataStoreManager(){
     db.close();
     state = CLOSED;
-    delete m_dsm_instance;
+    delete dsmInstance;
 }
 
 //! \fn getState()
@@ -68,536 +65,928 @@
     \brief  Get the last error message from the DataStoreManager object.
     \return The last error message string of the DSM object.
 */
-QString DataStoreManager::getError() const{
-    return m_last_msg;
+QString DataStoreManager::getErrorText() const{
+    return lastMsg;
+}
+
+SmfRelationId DataStoreManager::create(SmfProvider *aProvider, SmfContact *aContact){
+
+	QString userId, contactUrl, localId, managerUri, presenceState, presenceText, statusText;
+	QDateTime dateTime;
+	Int64 timeStampInSeconds;
+	
+	QContactGuid guid = aContact->value("Guid").value<QContactGuid>();
+	userId = guid.guid();
+	
+	QContactUrl url = aContact->value("Url").value<QContactUrl>();
+	contactUrl = url.url();
+	
+	QContactId contactId = aContact->value("ContactId").value<QContactId>();
+	localId =  contactId.localId() ;
+	managerUri = contactId.managerUri();
+	
+	QContactTimestamp time = aContact->value("Timestamp").value<QContactTimestamp>();
+	dateTime = time.created();
+	//Returns the datetime as the number of seconds that have passed since 1970-01-01T00:00:00, Coordinated Universal Time (Qt::UTC).
+	timeStampInSeconds =  dateTime.toTime_t() ;
+		
+	QContactPresence presence = aContact->value("Presence").value<QContactPresence>();	
+	presenceState = QString::number( (int)presence.presenceState() );
+	presenceText = presence.presenceStateText();
+	statusText = presence.customMessage();
+	
+	QString snsName = aProvider->serviceName();
+	QString snsUrl = (aProvider->serviceUrl()).toString();
+	QString snsDesc = aProvider->description();
+		
+	
+	const int contactID = addContactToTable( userId, contactUrl, localId, managerUri, snsName, snsDesc, snsUrl, presenceState, presenceText , statusText, timeStampInSeconds);
+	return QString::number( addRelationToTable( contactID ) );
+}
+
+SmfError DataStoreManager::associate( 	SmfRelationId aRelation,	
+										const SmfContact* aContact, 
+										SmfProvider* aProvider){
+	
+	if( ! relationIfExist( aRelation.toInt()) )
+		return SmfErrInvalidRelation;
+		
+	QString userId, contactUrl, localId, managerUri, presenceState, presenceText, statusText;
+	QDateTime dateTime;
+	Int64 timeStampInSeconds;
+	
+	QContactGuid guid = aContact->value("Guid").value<QContactGuid>();
+	userId = guid.guid();
+	
+	QContactUrl url = aContact->value("Url").value<QContactUrl>();
+	contactUrl = url.url();
+	
+	QContactId contactId = aContact->value("ContactId").value<QContactId>();
+	localId =  contactId.localId() ;
+	managerUri = contactId.managerUri();
+	
+	QContactTimestamp time = aContact->value("Timestamp").value<QContactTimestamp>();
+	dateTime = time.created();
+	//Returns the datetime as the number of seconds that have passed since 1970-01-01T00:00:00, Coordinated Universal Time (Qt::UTC).
+	timeStampInSeconds =  dateTime.toTime_t() ;
+		
+	QContactPresence presence = aContact->value("Presence").value<QContactPresence>();	
+	presenceState = presence.presenceState();
+	presenceText = presence.presenceStateText();
+	statusText = presence.customMessage();
+	
+	QString snsName = aProvider->serviceName();
+	QString snsUrl = (aProvider->serviceUrl()).toString();
+	QString snsDesc = aProvider->description();
+		
+	const int contactID = addContactToTable( userId, contactUrl, localId, managerUri, snsName, snsDesc, snsUrl, presenceState, presenceText , statusText, timeStampInSeconds);
+	if( socialProfileBaseID <= addRelationToTable( contactID,  aRelation.toInt() )  )
+		return  SmfNoError ;
+	else
+		return SmfDbOpeningError;
+}
+
+/** remove contact from a relation */
+SmfError DataStoreManager::remove(SmfRelationId aRelation, const SmfContact* aContact){
+	
+	int contactId, relationId;
+	QString userId, contactUrl, localId, managerUri;
+	
+	relationId = aRelation.toInt();
+	 
+	if(SmfDbOpeningError == openDB())
+			return SmfDbOpeningError;
+
+	QSqlQuery qry;
+			
+	QContactGuid guid = aContact->value("Guid").value<QContactGuid>();
+	userId = guid.guid();
+	
+	if ( ! userId.isNull() )
+	{
+		QContactUrl url = aContact->value("Url").value<QContactUrl>();
+		contactUrl = url.url();				
+		
+	qry.prepare("SELECT contactId FROM contact where userId=:userId AND contactUrl=:contactUrl");	
+	qry.bindValue(":userId", userId);
+	qry.bindValue(":contactUrl", contactUrl);
+	}
+	else
+	{
+		QContactId contactId = aContact->value("ContactId").value<QContactId>();
+		localId =  contactId.localId() ;
+		managerUri = contactId.managerUri();
+		
+		qry.prepare("SELECT contactId FROM contact where localId=:localId AND managerUri=:managerUri");	
+		qry.bindValue(":localId", localId);
+		qry.bindValue(":managerUri", managerUri);
+	}
+	
+	if(SmfDbQueryExecutonError == executeQuery(qry))
+		return SmfDbQueryExecutonError; 
+
+	if(qry.next())
+		contactId = qry.value(0).toInt();
+		
+	deleteContactFromTable(relationId, contactId);
+	
+	qry.finish();
+	db.close();
+	return 	SmfNoError;		
+		
+}
+
+/** returns first relation item in the relation when exists, NULL otherwise */
+SmfRelationItem* DataStoreManager::searchById(const SmfRelationId aRelation){
+
+	const int relationId = aRelation.toInt();
+	int contactId, contactIndex;
+	
+	if(SmfDbOpeningError == openDB())
+			return NULL;
+
+	QSqlQuery qry;
+	qry.prepare("SELECT contactId, contactIndex FROM relation where relationId=:relationId LIMIT 1");	
+	qry.bindValue(":relationId", relationId);
+		
+	if(SmfDbQueryExecutonError == executeQuery(qry))
+		return NULL; 
+
+	if(qry.next()){
+		contactId = qry.value(0).toInt();
+		contactIndex = qry.value(1).toInt();
+	}
+	
+	qry.prepare("SELECT * FROM contact where contactId=:contactId");
+	qry.bindValue(":contactId", contactId);
+	
+	if(SmfDbQueryExecutonError == executeQuery(qry))
+			return NULL; 
+
+	if(qry.next())
+		createRelationItem(qry, contactIndex);	
+		
+	qry.finish();
+	db.close();
+	return iSmsfRelationItem;
+	
+}
+
+SmfRelationItem* DataStoreManager::getContact(SmfRelationId aRelation, quint32 aIndex){
+	
+	const int relationId = aRelation.toInt();
+	int contactId;
+	
+	if(SmfDbOpeningError == openDB())
+			return NULL;
+
+	QSqlQuery qry;
+	qry.prepare("SELECT contactId FROM relation where relationId=:relationId AND contactIndex=:contactIndex");	
+	qry.bindValue(":relationId", relationId);
+	qry.bindValue(":contactIndex", aIndex);
+	
+	if(SmfDbQueryExecutonError == executeQuery(qry))
+		return NULL; 
+
+	if(qry.next()){
+		contactId = qry.value(0).toInt();
+	}
+	
+	qry.prepare("SELECT * FROM contact where contactId=:contactId");
+	qry.bindValue(":contactId", contactId);
+	
+	if(SmfDbQueryExecutonError == executeQuery(qry))
+			return NULL; 
+
+	if(qry.next())
+		createRelationItem(qry, aIndex);	
+		
+	qry.finish();
+	db.close();
+	return iSmsfRelationItem;	
 }
 
-/* Refactor this. Think Signals. */
-QList <SMFSocialProfile> DataStoreManager::getAllRelated(const SMFUserProfile& user_profile) {
-    QList <SMFSocialProfile> related_profiles;
-    int usr_id = user_profile.userID();
+/** returns relation Id for a given contacts if exists, NULL otherwise */
+SmfRelationId DataStoreManager::searchByContact( SmfContact aContact){
+
+	int contactId, relationId;
+	QString userId, contactUrl, localId, managerUri;
+	 
+	if(SmfDbOpeningError == openDB())
+			return QString();
+
+	QSqlQuery qry;
+	
+	QContactGuid guid = aContact.value("Guid").value<QContactGuid>();
+	userId = guid.guid();
+	
+	if ( ! userId.isNull() )
+	{
+		QContactUrl url = aContact.value("Url").value<QContactUrl>();
+		contactUrl = url.url();				
+		
+	qry.prepare("SELECT contactId FROM contact where userId=:userId AND contactUrl=:contactUrl");	
+	qry.bindValue(":userId", userId);
+	qry.bindValue(":contactUrl", contactUrl);
+	}
+	else
+	{
+		QContactId contactId = aContact.value("ContactId").value<QContactId>();
+		localId =  contactId.localId() ;
+		managerUri = contactId.managerUri();
+		
+		qry.prepare("SELECT contactId FROM contact where localId=:localId AND managerUri=:managerUri");	
+		qry.bindValue(":localId", localId);
+		qry.bindValue(":managerUri", managerUri);
+	}
+	
+	if(SmfDbQueryExecutonError == executeQuery(qry))
+		return QString(); 
+
+	if(qry.next())
+		contactId = qry.value(0).toInt();
+		
+	qry.prepare("SELECT relationId FROM relation where contactId=:contactId");	
+		qry.bindValue(":contactId", contactId);	
+		
+	if(SmfDbQueryExecutonError == executeQuery(qry))
+			return QString(); 
+
+	if(qry.next()){
+		relationId = qry.value(0).toInt();	
+	}
+	
+	qry.finish();
+	db.close();
+	return QString::number( relationId );			
+	
+}
 
-    if (!(db.isOpen())){
-        if(!(db.open())){
-            state = ERROR;
-            m_last_msg = db.lastError().text();
-            return related_profiles;
-            /* Do something to signal an error. Just returning an empty list is NOT ok */
-        }
-    }
+/** contacts and their provider */
+DSMContactPckg* DataStoreManager::get(SmfRelationId aRelation, quint32 aIndex){
+	
+	const int relationId = aRelation.toInt();
+	int contactId;
+	
+	if(SmfDbOpeningError == openDB())
+			return NULL;
+
+	QSqlQuery qry;
+	qry.prepare("SELECT contactId FROM relation where relationId=:relationId AND contactIndex=:contactIndex");	
+	qry.bindValue(":relationId", relationId);
+	qry.bindValue(":contactIndex", aIndex);
+	
+	if(SmfDbQueryExecutonError == executeQuery(qry))
+		return NULL; 
+
+	if(qry.next()){
+		contactId = qry.value(0).toInt();
+	}
+	
+	qry.prepare("SELECT * FROM contact where contactId=:contactId");
+	qry.bindValue(":contactId", contactId);
+	
+	if(SmfDbQueryExecutonError == executeQuery(qry))
+			return NULL; 
 
-    QSqlQuery qry;
-    qry.prepare("SELECT social_profiles.social_profile_id , social_profiles.user_id , social_profiles.sns_id , "
-                " social_profiles.profile_url , social_profiles.screen_alias"
-                " FROM social_profiles JOIN user_profiles WHERE user_profiles.user_id = social_profiles.user_id"
-                " AND social_profiles.user_id = :user_id");
-    qry.bindValue(":user_id", usr_id);
+	if(qry.next()){
+		iDSMContactPckgItem = new DSMContactPckg;
+		
+		iDSMContactPckgItem->userId = qry.value(0).toString(); 
+		iDSMContactPckgItem->contactUrl = qry.value(1).toString(); 
+		iDSMContactPckgItem->localId = qry.value(2).toString(); 
+		iDSMContactPckgItem->managerUri = qry.value(3).toString(); 
+		iDSMContactPckgItem->snsName = qry.value(4).toString(); 
+		iDSMContactPckgItem->snsDesc = qry.value(5).toString();  
+		iDSMContactPckgItem->snsUrl = qry.value(6).toString(); 
+		iDSMContactPckgItem->presenceState = qry.value(7).toString(); 
+		iDSMContactPckgItem->presenceText = qry.value(8).toString(); 
+		iDSMContactPckgItem->statusText = qry.value(9).toString(); 
+		iDSMContactPckgItem->timeStamp = qry.value(10).toLongLong(); 
+		iDSMContactPckgItem->contactIndex = relationId;
+		iDSMContactPckgItem->relationId = aIndex;
+	}
+	
+	qry.finish();
+	db.close();
+	return iDSMContactPckgItem;
+}
+
+/** list of contacts and their provider */
+QList<SmfRelationItem> DataStoreManager::getAll(SmfRelationId aRelation){
+	QList<SmfRelationItem> relationItemList;
+	const int relationId = aRelation.toInt();
+	int contactId, contactIndex;
+	
+	if(SmfDbOpeningError == openDB())
+			return relationItemList;
+
+	QSqlQuery qry;
+	qry.prepare("SELECT contactId, contactIndex FROM relation where relationId=:relationId");	
+	qry.bindValue(":relationId", relationId);
+		
+	if(SmfDbQueryExecutonError == executeQuery(qry))
+		return relationItemList; 
 
-    if(!(qry.exec())){
-        m_last_msg = qry.lastError().text();
-        qry.finish();
-        /* Do something to signal an error. Just returning an empty list is NOT ok */
-        return related_profiles;
-    }
+	while(qry.next()){
+		contactId = qry.value(0).toInt();
+		contactIndex = qry.value(1).toInt();
+		
+		QSqlQuery innerqry;
+		innerqry.prepare("SELECT * FROM contact where contactId=:contactId");
+		innerqry.bindValue(":contactId", contactId);
+		
+		if(SmfDbQueryExecutonError == executeQuery(innerqry))
+				return relationItemList; 
+
+		if(innerqry.next()){
+			createRelationItem(innerqry, contactIndex);
+			relationItemList << *iSmsfRelationItem;
+		}
+		innerqry.finish();
+	}// end while
+	
+	qry.finish();
+	db.close();
+	return relationItemList;	
+}
 
-    while(qry.next())
-    {
-        SMFSocialProfile _profile(qry.value(2).toInt()/* sns ID*/,
-                                  qry.value(1).toInt() /* user ID */,
-                                  qry.value(3).toString()/* url */,
-                                  qry.value(4).toString()/* alias */);
-        related_profiles << _profile;
+void DataStoreManager::createRelationItem( QSqlQuery & aQry, int aIndex){
+			
+	SmfContact * smfContact;
+	SmfProvider * smfProvider;
+	QString snsName, snsDesc;
+	QUrl snsUrl;
+	
+	QVariant userId = QVariant::fromValue( aQry.value(0).toString() );
+	QVariant contactUrl = QVariant::fromValue(aQry.value(1).toString() ); 
+	
+	QString StrLocalId =  aQry.value(2).toString() ;
+	QString StrManagerUri = aQry.value(3).toString() ;	
+	QContactId qContactId;
+	qContactId.setLocalId( StrLocalId.toInt() );
+	qContactId.setManagerUri( StrManagerUri );	    
+	QVariant contactId = QVariant::fromValue(qContactId);	
+	
+	int presenceState = aQry.value(7).toInt() ; 	
+	QString presenceStateText = aQry.value(8).toString() ;
+	QString statusText = aQry.value(9).toString();
+	QContactPresence qContactPresence;
+	qContactPresence.setPresenceState(static_cast<QContactPresence::PresenceState>(presenceState));
+	qContactPresence.setPresenceStateText(presenceStateText);
+	qContactPresence.setCustomMessage(statusText);
+	QVariant contactPresence  = QVariant::fromValue(qContactPresence);
+	
+	QDateTime dateTime;	
+	dateTime.setTime_t ( aQry.value(10).toLongLong() ) ;
+	QContactTimestamp qContactTimestamp;
+	qContactTimestamp.setCreated(dateTime);
+	QVariant timeStamp = QVariant::fromValue( qContactTimestamp );
+	
+	smfContact = new SmfContact;
+	smfContact->setValue("Guid", userId);
+	smfContact->setValue("Url", contactUrl);
+	smfContact->setValue("ContactId", contactId);
+	smfContact->setValue("Presence", contactPresence);	
+	smfContact->setValue("Timestamp", timeStamp);
+	
+	smfProvider = new SmfProvider;
+	snsName = aQry.value(4).toString();
+	snsDesc = aQry.value(5).toString();;
+	snsUrl = aQry.value(6).toUrl();
+	
+	smfProvider->setServiceName( snsName );
+	smfProvider->setDescription( snsDesc );
+	smfProvider->setServiceUrl( snsUrl );
+	
+	iSmsfRelationItem = new SmfRelationItem;	
+	iSmsfRelationItem->setIndex( aIndex );
+	iSmsfRelationItem->setProvider(*(smfProvider) );
+	iSmsfRelationItem->setContact(*( smfContact ));	
+}
+uint DataStoreManager::count(SmfRelationId relation){
+	
+	const int relationId = relation.toInt();
+	return count( relationId );
+}
 
-    }
-/*
-    for( int i = 0; i < related_profiles.size(); i++){
-        qDebug() << related_profiles.at(i).associatedSnsID() << ", " << related_profiles.at(i).associatedUserID()
-                << related_profiles.at(i).profileURL() << related_profiles.at(i).screenAlias() ;
-    }
-*/
-    qry.finish();
-    db.close();
+SmfError DataStoreManager::deleteRelation(SmfRelationId relation){
+	const int relationId = relation.toInt();
+	return deleteRelationFromTable( relationId );
+}
+
+QList<SmfRelationId> DataStoreManager::getAllRelations(){
+	QList<SmfRelationId> relationList;
+					
+	if(SmfDbOpeningError == openDB())
+		return relationList;
+
+	QSqlQuery qry;
+	qry.prepare("SELECT DISTINCT relationId FROM relation");	
+	
+	if(SmfDbQueryExecutonError == executeQuery(qry))
+		return relationList; 
+
+	while(qry.next()){
+		relationList << qry.value(0).toString();
+	}
 
-    return related_profiles;
+	qry.finish();
+	db.close();
+	return relationList;			
+}
 
+int DataStoreManager::openDB(){
+	if (!(db.isOpen())){
+		if(!(db.open())){
+			state = ERROR;
+			lastMsg = db.lastError().text();
+			return SmfDbOpeningError;
+		}
+	}
+	return SmfNoError;	
+}
+
+int DataStoreManager::executeQuery(QSqlQuery& qry){
+	 if(!(qry.exec())){
+		lastMsg = qry.lastError().text();
+		qry.finish();
+		return SmfDbQueryExecutonError;
+	}
+	return SmfNoError;
 }
 
 
-SMFSocialProfile DataStoreManager::getRelatedByService(const SMFUserProfile& user_profile, const SMFSocialNetworkingSite& sns){
 
-    SMFSocialProfile _profile;
-    int usr_id = user_profile.userID();
-    int sns_id = sns.snsID();
-
-    if (!(db.isOpen())){
-        if(!(db.open())){
-            state = ERROR;
-            m_last_msg = db.lastError().text();
-            return _profile;
-            /* Do something to signal an error. Just returning an empty list is NOT ok */
-        }
-    }
-
-    QSqlQuery qry;
-    qry.prepare("SELECT social_profiles.social_profile_id , social_profiles.user_id , social_profiles.sns_id , "
-                " social_profiles.profile_url , social_profiles.screen_alias"
-                " FROM social_profiles JOIN user_profiles WHERE user_profiles.user_id = social_profiles.user_id"
-                " AND social_profiles.user_id = :user_id AND social_profiles.sns_id = :sns_id");
-    qry.bindValue(":user_id", usr_id);
-    qry.bindValue(":sns_id", sns_id);
-
-    if(!(qry.exec())){
-        m_last_msg = qry.lastError().text();
-        qry.finish();
-        /* Do something to signal an error. Just returning an empty list is NOT ok */
-        return _profile;
-    }
-
-    if(qry.next()) {
-        _profile.setAssociatedSnsID(qry.value(2).toInt());
-        _profile.setAssociatedUserID(qry.value(1).toInt());
-        _profile.setProfileURL(qry.value(3).toString());
-        _profile.setScreenAlias(qry.value(4).toString());
-    }
-/*
-    qDebug() << _profile.associatedSnsID() << ", " << _profile.associatedUserID() << ", "
-            << _profile.profileURL() << ", "<< _profile.screenAlias() ;
-*/
-    qry.finish();
-    db.close();
-
-    return _profile;
-}
-
-/* Cannot return something like this. Make this async */
-SMFUserProfile DataStoreManager::getUserProfile(const QString& name, const QString& contact_id){    
-    SMFUserProfile _profile;
-
-    if (!(db.isOpen())){
-        if(!(db.open())){
-            state = ERROR;
-            m_last_msg = db.lastError().text();
-            return _profile;
-            /* Do something to signal an error. Just returning an empty list is NOT ok */
-        }
-    }
-
-    QSqlQuery qry;
-    qry.prepare("SELECT user_id , name , contact_id FROM user_profiles WHERE name=:name  AND contact_id=:contact_id");
-    qry.bindValue(":name", name);
-    qry.bindValue(":contact_id", contact_id);
-
-    if(!(qry.exec())){
-        m_last_msg = qry.lastError().text();
-        qry.finish();
-        /* Do something to signal an error. Just returning an empty list is NOT ok */
-        return _profile;
-    }
-
-    if(qry.next()){
-        _profile.setName(qry.value(1).toString());
-        _profile.setContactID(qry.value(2).toString());
-        _profile.setUserID(qry.value(0).toInt());
-    }
-
-    qry.finish();
-    db.close();
-
-    return _profile;
-}
-
-/*! Fetches the Social Networking site identified by \a name */
-SMFSocialNetworkingSite DataStoreManager::getSNSEntry(const QString& name){
-    SMFSocialNetworkingSite sns;
-
-    if (!(db.isOpen())){
-        if(!(db.open())){
-            state = ERROR;
-            m_last_msg = db.lastError().text();
-            return sns;
-            /* Do something to signal an error. Just returning an empty list is NOT ok */
-        }
-    }
-
-    QSqlQuery qry;
-    qry.prepare("SELECT sns_id, sns_name, sns_url FROM sns_base WHERE sns_name=:name");
-    qry.bindValue(":name", name);
-
-    if(!qry.exec()){
-        m_last_msg = qry.lastError().text();
-        qry.finish();
-        return sns;
-    }
-
-    if(qry.next()){
-        sns.setSnsID(qry.value(0).toInt());
-        sns.setSnsName(qry.value(1).toString());
-        sns.setSnsURL(qry.value(2).toString());
-    }
-
-    qry.finish();
-    db.close();
-
-    return sns;
-}
-
-/* Actually all these 'save' functions can be written as a template */
-void DataStoreManager::saveUserProfile(const SMFUserProfile& user_profile){
-
-    if (!(db.isOpen())){
-        if(!(db.open())){
-            state = ERROR;
-            m_last_msg = db.lastError().text();
-        }
-    }
-
-    QSqlQuery qry;
-    qry.prepare("UPDATE user_profiles"
-                " SET name=:name , contact_id=:contact_id"
-                " WHERE user_id=:user_id");
-    qry.bindValue(":name", user_profile.name());
-    qry.bindValue(":contact_id", user_profile.contactID());
-    qry.bindValue(":user_id", user_profile.userID());
-
-    if(!(qry.exec())){
-        m_last_msg = qry.lastError().text();
-        qry.finish();
-    }
-
-    qry.finish();
-    db.close();
-}
-
-void DataStoreManager::saveSocialProfile(const SMFSocialProfile& social_profile){
-
-    if (!(db.isOpen())){
-        if(!(db.open())){
-            state = ERROR;
-            m_last_msg = db.lastError().text();
-        }
-    }
-
-    QSqlQuery qry;
-    qry.prepare("UPDATE social_profiles"
-                " SET user_id=:user_id, sns_id=:sns_id, profile_url=:profile_url, screen_alias=:screen_alias"
-                " WHERE social_profile_id=:social_profile_id");
-    qry.bindValue(":user_id", social_profile.associatedUserID());
-    qry.bindValue(":sns_id", social_profile.associatedSnsID());
-    qry.bindValue(":profile_url", social_profile.profileURL());
-    qry.bindValue(":screen_alias", social_profile.screenAlias());
-    qry.bindValue(":social_profile_id", social_profile.profileID());
-
-    if(!(qry.exec())){
-        m_last_msg = qry.lastError().text();
-        qry.finish();
-    }
-
-    qry.finish();
-    db.close();
-}
-
-void DataStoreManager::saveSNSEntry(const SMFSocialNetworkingSite& sns){
-
-    if (!(db.isOpen())){
-        if(!(db.open())){
-            state = ERROR;
-            m_last_msg = db.lastError().text();
-        }
-    }
-
-    QSqlQuery qry;
-    qry.prepare("UPDATE sns_base"
-                " SET sns_name=:sns_name, sns_url=:sns_url"
-                " WHERE sns_id=:sns_id");
-    qry.bindValue(":sns_name", sns.snsName());
-    qry.bindValue(":sns_url", sns.snsURL());
-    qry.bindValue(":sns_id", sns.snsID());
-
-    if(!(qry.exec())){
-        m_last_msg = qry.lastError().text();
-        qry.finish();
-    }
-
-    qry.finish();
-    db.close();
-
-}
-
-void DataStoreManager::modifyRelation(SMFSocialProfile& sns, SMFUserProfile& new_user_profile){
-    sns.setAssociatedUserID(new_user_profile.userID());
-}
-
-
-int DataStoreManager::addUserProfile(SMFUserProfile& user_profile){
-    int user_id = user_profile.userID();
-
-    /* Check Required to identify multiple Entries */
-
-    if (!(db.isOpen())){
-        if(!(db.open())){
-            state = ERROR;
-            m_last_msg = db.lastError().text();
-            return user_id;
-        }
-    }
-
-    QSqlQuery qry;
-    qry.prepare("INSERT INTO user_profiles (name, contact_id) VALUES (:name, :contact_id)");
-    qry.bindValue(":name", user_profile.name());
-    qry.bindValue(":contact_id", user_profile.contactID());
-
-    if(!(qry.exec())){
-        m_last_msg = qry.lastError().text();
-        qry.finish();
-        return user_id;
-    }
-
-    qry.prepare("SELECT user_id FROM user_profiles WHERE name=:name AND contact_id=:contact_id");
-    qry.bindValue(":name", user_profile.name());
-    qry.bindValue(":contact_id", user_profile.contactID());
-
-    if(!(qry.exec())){
-        m_last_msg = qry.lastError().text();
-        qry.finish();
-        return user_id;
-    }
-
-    if(qry.next()){
-        user_id = qry.value(0).toInt();
-        user_profile.setUserID(user_id);
-    }
-
-    qry.finish();
-    db.close();
-
-    return user_id;
-
-
-}
-
-int DataStoreManager::deleteUserProfile( SMFUserProfile& user_profile){
-
-    if (!(db.isOpen())){
-        if(!(db.open())){
-            state = ERROR;
-            m_last_msg = db.lastError().text();
-            return -1;
-        }
-    }
-
-    QSqlQuery qry;
-    qry.prepare("DELETE FROM user_profiles WHERE user_id=:user_id");
-    qry.bindValue(":user_id", user_profile.userID());
-
-    if(!(qry.exec())){
-        m_last_msg = qry.lastError().text();
-        qry.finish();
-        return -1;
-    }
-
-    qry.finish();
-    db.close();
-
-    return 0;
-}
-
-int DataStoreManager::addSocialProfile(SMFSocialProfile& social_profile){
-    int social_prof_id = social_profile.profileID();
-
-    /* Check Required to identify multiple entries */
-
-    if (!(db.isOpen())){
-        if(!(db.open())){
-            state = ERROR;
-            m_last_msg = db.lastError().text();
-            return social_prof_id;
-        }
-    }
-
-    /*  There might be a request to add a social profile with either user and/or sns profile(s)
-        not stored in the database. What to do in that case? Automatically store the other profiles too?
-    */
-    QSqlQuery qry;
-    qry.prepare("INSERT INTO social_profiles (user_id, sns_id, profile_url, screen_alias) "
-                "VALUES (:user_id, :sns_id, :profile_url, :screen_alias)");
-    qry.bindValue(":user_id", social_profile.associatedUserID());
-    qry.bindValue(":sns_id", social_profile.associatedSnsID());
-    qry.bindValue(":profile_url", social_profile.profileURL());
-    qry.bindValue(":screen_alias", social_profile.screenAlias());
-
-    if(!(qry.exec())){
-        m_last_msg = qry.lastError().text();
-        qry.finish();
-        return social_prof_id;
-    }
-
-    qry.prepare("SELECT social_profile_id FROM social_profiles  "
-                "WHERE user_id=:user_id AND sns_id=:sns_id AND profile_url=:profile_url AND screen_alias=:screen_alias");
-    qry.bindValue(":user_id", social_profile.associatedUserID());
-    qry.bindValue(":sns_id", social_profile.associatedSnsID());
-    qry.bindValue(":profile_url", social_profile.profileURL());
-    qry.bindValue(":screen_alias", social_profile.screenAlias());
-
-    if(!(qry.exec())){
-        m_last_msg = qry.lastError().text();
-        qry.finish();
-        return social_prof_id;
-    }
-
-    if(qry.next()){
-        social_prof_id = qry.value(0).toInt();
-        social_profile.setProfileID(social_prof_id);
-    }
-
-    qry.finish();
-    db.close();
-
-    return social_prof_id;
-}
-
-int DataStoreManager::deleteSocialProfile(SMFSocialProfile& social_profile){
-
-    if (!(db.isOpen())){
-        if(!(db.open())){
-            state = ERROR;
-            m_last_msg = db.lastError().text();
-            return -1;
-        }
-    }
-
-    QSqlQuery qry;
-    qry.prepare("DELETE FROM social_profiles WHERE social_profile_id=:social_profile_id");
-    qry.bindValue(":social_profile_id", social_profile.profileID());
-
-    if(!(qry.exec())){
-        m_last_msg = qry.lastError().text();
-        qry.finish();
-        return -1;
-    }
-
-    qry.finish();
-    db.close();
-
-    return 0;
-}
-
-int DataStoreManager::addSNSEntry( SMFSocialNetworkingSite& sns){
-    int sns_id = sns.snsID();
-
-    if (!(db.isOpen())){
-        if(!(db.open())){
-            state = ERROR;
-            m_last_msg = db.lastError().text();
-            return sns_id;
-        }
-    }
-
-    QSqlQuery qry;
-    qry.prepare("INSERT INTO sns_base (sns_name, sns_url) VALUES (:sns_name, :sns_url)");
-    qry.bindValue(":sns_name", sns.snsName());
-    qry.bindValue(":sns_url", sns.snsURL());
-
-    if(!(qry.exec())){
-        m_last_msg = qry.lastError().text();
-        qry.finish();
-        return sns_id;
-    }
-
-    qry.prepare("SELECT sns_id FROM sns_base WHERE sns_name=:sns_name AND sns_url=:sns_url");
-    qry.bindValue(":sns_name", sns.snsName());
-    qry.bindValue(":sns_url", sns.snsURL());
-
-    if(!(qry.exec())){
-        m_last_msg = qry.lastError().text();
-        qry.finish();
-        return sns_id;
-    }
-
-    if(qry.next()){
-        sns_id = qry.value(0).toInt();
-        sns.setSnsID(sns_id);
-    }
-
-    qry.finish();
-    db.close();
-
-    return sns_id;
-}
-
-int DataStoreManager::deleteSNSEntry(SMFSocialNetworkingSite& sns){
-
-    if (!(db.isOpen())){
-        if(!(db.open())){
-            state = ERROR;
-            m_last_msg = db.lastError().text();
-            return -1;
-        }
-    }
-
-    QSqlQuery qry;
-    qry.prepare("DELETE FROM sns_base WHERE sns_id=:sns_id");
-    qry.bindValue(":sns_id", sns.snsID());
-
-    if(!(qry.exec())){
-        m_last_msg = qry.lastError().text();
-        qry.finish();
-        return -1;
-    }
-
-    qry.finish();
-    db.close();
-
-    return 0;
-}
-
-int DataStoreManager::createRelation(const SMFUserProfile& user_profile, SMFSocialProfile& social_profile){
-    social_profile.setAssociatedUserID(user_profile.userID());
-    /* Save the socialProfile */
-    //saveSocialProfile(social_profile);
-    return 0;
-}
-
-int DataStoreManager::deleteRelation(const SMFUserProfile&,  SMFSocialProfile& social_profile){
-    social_profile.setAssociatedUserID(-1);
-    /* Save the profile */
-    //saveSocialProfile(social_profile);
-    return 0;
-}
-
-
-DataStoreManager::DataStoreManager(const QString& db_name, QObject* parent):QObject(parent){
+DataStoreManager::DataStoreManager(const QString& dbName, QObject* parent):QObject(parent){
     db = QSqlDatabase::addDatabase("QSQLITE");
-    db.setDatabaseName(db_name);
+    db.setDatabaseName(dbName);
 }
 
 bool DataStoreManager::InitializeDataBase(){
 
     if(!db.open()){
         state = ERROR;
-        m_last_msg = db.lastError().text();
+        lastMsg = db.lastError().text();
         return FALSE;
     }
     else
         state = READY;
-
-    QSqlQuery create_tables[3];
+    
+    const int tableCount = 2;
 
-    create_tables[0].prepare("CREATE TABLE IF NOT EXISTS user_profiles (user_id INTEGER PRIMARY KEY AUTOINCREMENT , name TEXT, contact_id TEXT)");
-    create_tables[1].prepare("CREATE TABLE IF NOT EXISTS sns_base (sns_id INTEGER PRIMARY KEY AUTOINCREMENT , sns_name TEXT, sns_url TEXT)");
-    create_tables[2].prepare("CREATE TABLE IF NOT EXISTS social_profiles (social_profile_id INTEGER PRIMARY KEY AUTOINCREMENT , user_id INTEGER, sns_id INTEGER, profile_url TEXT, screen_alias TEXT)");
+    QSqlQuery smfDsmTables[tableCount];
 
-
+    smfDsmTables[0].prepare("CREATE TABLE IF NOT EXISTS contact (contactId INTEGER PRIMARY KEY AUTOINCREMENT,"
+																  "contactGuid TEXT,"	 
+																  "contactUrl TEXT,"
+																  "localId TEXT,"
+																  "managerUri TEXT,"
+																  "snsName TEXT,"
+																  "snsDesc TEXT,"
+																  "snsUrl TEXT),"
+																  "presenceState INTEGER,"
+																  "presenceText TEXT,"
+																  "timeStamp INTEGER )");
+    
+    smfDsmTables[1].prepare("CREATE TABLE IF NOT EXISTS relation (relationId INTEGER,"
+																 " contactId INTEGER,"
+																 " contactIndex INTEGER)" );
+    
 
-    for(int i = 0; i < 3; i++){
-        if(!create_tables[i].exec()){
+    for(int i = 0; i < tableCount; i++){
+        if(!smfDsmTables[i].exec()){
             state = ERROR;
-            m_last_msg = create_tables[i].lastError().text();
+            lastMsg = smfDsmTables[i].lastError().text();
             return FALSE;
         }
-        create_tables[i].finish();
+        smfDsmTables[i].finish();
     }
 
     db.close();
     state = CLOSED;
     return TRUE;
 }
+
+
+int DataStoreManager::addContactToTable( 	const QString &aLocalId, 
+												const QString &aManagerUri,
+												const QString &aSnsName,
+												const QString &aSnsDesc,
+												const QString &aSnsUrl){
+	
+	int contactId;
+	
+	if(SmfDbOpeningError == openDB())
+		return SmfDbOpeningError;
+
+	QSqlQuery qry;
+	qry.prepare("INSERT INTO contact (userId, contactUrl, localId , managerUri, snsName,"
+									" snsDesc, snsUrl, presenceState, presenceText, statusText, timeStamp )"
+									" VALUES (:userId, :contactUrl, :localId , :managerUri, :snsName,"
+									" :snsDesc, :snsUrl, :presenceState, :presenceText, :statusText, :timeStamp )");
+	qry.bindValue(":userId", NULL);
+	qry.bindValue(":contactUrl", NULL);
+	qry.bindValue(":localId", aLocalId);
+	qry.bindValue(":managerUri", aManagerUri);
+	qry.bindValue(":snsName", aSnsName);
+	qry.bindValue(":snsDesc", aSnsDesc);
+	qry.bindValue(":snsUrl", aSnsUrl);
+	qry.bindValue(":presenceState", NULL);
+	qry.bindValue(":presenceText", NULL);
+	qry.bindValue(":statusText", NULL);
+	qry.bindValue(":timeStamp", 0);
+	
+	if(SmfDbQueryExecutonError == executeQuery(qry))
+		return SmfDbQueryExecutonError; 
+
+	qry.prepare("SELECT contactId FROM contact WHERE localId=:localId AND managerUri=:managerUri");
+	qry.bindValue(":localId", aLocalId);
+	qry.bindValue(":managerUri", aManagerUri);
+
+	if(SmfDbQueryExecutonError == executeQuery(qry))
+		return SmfDbQueryExecutonError; 
+
+	if(qry.next()){
+		contactId = qry.value(0).toInt();
+	}
+
+	qry.finish();
+	db.close();
+	return contactId;
+	
+}
+
+int DataStoreManager::addContactToTable( const QString &aUserId, 
+									const QString &aContactUrl,
+									const QString &aLocalId,
+									const QString &aManagerUri,
+									const QString &aSnsName,
+									const QString &aSnsDesc, 
+									const QString &aSnsUrl,
+									const QString &aPresenceState,
+									const QString &aPresenceText,
+									const QString &aStatusText,
+									const Int64 aTimeStamp ){
+	
+	int contactId;
+		
+	if(SmfDbOpeningError == openDB())
+		return SmfDbOpeningError;
+
+	QSqlQuery qry;
+	qry.prepare("INSERT INTO contact (userId, contactUrl, localId , managerUri, snsName,"
+									" snsDesc, snsUrl, PresenceState, PresenceText, statusText, timeStamp )"
+									" VALUES (:userId, :contactUrl, :localId , :managerUri, :snsName,"
+									" :snsDesc, :snsUrl, :PresenceState, :PresenceText, statusText, :timeStamp )");
+	
+	qry.bindValue(":userId", aUserId);		qry.bindValue(":contactUrl", aContactUrl);
+	qry.bindValue(":localId", aLocalId);				qry.bindValue(":managerUri", aManagerUri);
+	qry.bindValue(":snsName", aSnsName);				qry.bindValue(":snsDesc", aSnsDesc);
+	qry.bindValue(":snsUrl", aSnsUrl);					qry.bindValue(":PresenceState", aPresenceState);
+	qry.bindValue(":PresenceText", aPresenceText);		qry.bindValue(":statusText", aStatusText);
+	qry.bindValue(":timeStamp", aTimeStamp);
+	
+	if(SmfDbQueryExecutonError == executeQuery(qry))
+		return SmfDbQueryExecutonError; 
+
+	qry.prepare("SELECT contactId FROM contact WHERE (localId=:localId AND managerUri=:managerUri) "
+												"OR (aContactGuid=:aContactGuid AND aContactUrl=:aContactUrl)");
+	qry.bindValue(":localId", aLocalId);				qry.bindValue(":managerUri", aManagerUri);
+	qry.bindValue(":userId", aUserId);		qry.bindValue(":aContactUrl", aContactUrl);
+
+	if(SmfDbQueryExecutonError == executeQuery(qry))
+		return SmfDbQueryExecutonError; 
+
+	if(qry.next()){
+		contactId = qry.value(0).toInt();
+	}
+
+	qry.finish();
+	db.close();
+	return contactId;	
+}
+
+SmfError DataStoreManager::removeContactFromTable(const int aContactId){
+	
+	if(SmfDbOpeningError == openDB())
+		return SmfDbOpeningError;
+
+	QSqlQuery qry;
+	qry.prepare("DELETE FROM contact WHERE contactId=:contactId");
+	qry.bindValue(":contactId", aContactId);
+
+	if(SmfDbQueryExecutonError == executeQuery(qry))
+		return SmfDbQueryExecutonError; 
+
+	qry.finish();
+	db.close();
+
+	return SmfNoError;
+}
+
+
+
+TBool DataStoreManager::contactIfExist( const int aContactId){
+	
+	TBool contactExist = EFalse;
+	if(SmfDbOpeningError == openDB())
+		return EFalse;
+
+	QSqlQuery qry;
+	qry.prepare("SELECT contactId FROM contact WHERE contactId=:contactId");
+	qry.bindValue(":contactId", aContactId);
+
+	if(SmfDbQueryExecutonError == executeQuery(qry))
+		return EFalse; 
+
+	if( qry.first() )
+		contactExist = ETrue;
+		
+	qry.finish();
+	db.close();
+
+	return contactExist;
+}
+
+TBool DataStoreManager::relationIfExist( const int aRelationId){
+	
+	TBool contactExist = EFalse;
+	if(SmfDbOpeningError == openDB())
+		return EFalse;
+
+	QSqlQuery qry;
+	qry.prepare("SELECT relationId FROM relation WHERE relationId=:relationId");
+	qry.bindValue(":relationId", aRelationId);
+
+	if(SmfDbQueryExecutonError == executeQuery(qry))
+		return EFalse; 
+
+	if( qry.first() )
+		contactExist = ETrue;
+		
+	qry.finish();
+	db.close();
+
+	return contactExist;
+}
+
+
+const int DataStoreManager::findMaxIndexValue(const int aRelationId ){
+	
+	int contactIndex = 0;
+	
+	if(SmfDbOpeningError == openDB())
+		return SmfDbOpeningError;
+
+	QSqlQuery qry;
+	qry.prepare("SELECT MAX( contactIndex ) FROM ("
+							"SELECT contactIndex FROM relation WHERE (relationId=:relationId ))");
+	qry.bindValue(":relationId", aRelationId);
+	
+	if(SmfDbQueryExecutonError == executeQuery(qry))
+		return SmfDbQueryExecutonError; 
+
+	if(qry.next()){
+		contactIndex = qry.value(0).toInt();
+	}
+
+	qry.finish();
+	db.close();
+	return contactIndex;	
+}
+
+const int DataStoreManager::findMaxRelationId( ){
+	
+	int maxRelationId = socialProfileBaseID;
+	
+	if(SmfDbOpeningError == openDB())
+		return SmfDbOpeningError;
+
+	QSqlQuery qry;
+	qry.prepare("SELECT MAX( relationId ) FROM relation");
+		
+	if(SmfDbQueryExecutonError == executeQuery(qry))
+		return SmfDbQueryExecutonError; 
+
+	if(qry.next()){
+		maxRelationId = qry.value(0).toInt();
+	}
+
+	qry.finish();
+	db.close();
+	return maxRelationId;	
+}
+
+const int DataStoreManager::addRelationToTable(const int aContactId, int aRelationId ){
+	
+	int relationId, contactIndex;
+	
+	if( aRelationId == ENewRelation ){
+			relationId = findMaxRelationId() + 1;
+			contactIndex = 0;
+		}
+	else{
+			relationId = aRelationId;
+			contactIndex = 1 + ( findMaxIndexValue( aRelationId ) ) ;
+		}
+	
+	if(SmfDbOpeningError == openDB())
+		return SmfDbOpeningError;
+
+	QSqlQuery qry;
+	qry.prepare("INSERT INTO relation (relationId, contactId, contactIndex )"
+									" VALUES (:relationId, :contactId, :contactIndex )");
+	qry.bindValue(":relationId", relationId);
+	qry.bindValue(":contactId", aContactId);
+	qry.bindValue(":contactIndex", contactIndex);
+		
+	if(SmfDbQueryExecutonError == executeQuery(qry))
+		return SmfDbQueryExecutonError; 
+
+	qry.finish();
+	db.close();
+	return relationId;	
+}
+
+int DataStoreManager::searchContactId(const int aRelationId, const int aIndex){
+	
+	int contactId = SmfDbQueryExecutonError;
+		
+	if(SmfDbOpeningError == openDB())
+		return SmfDbOpeningError;
+
+	QSqlQuery qry;
+	qry.prepare("SELECT contactId FROM relation WHERE (relationId=:relationId AND contactIndex = :contactIndex)");
+	
+	qry.bindValue(":relationId", aRelationId);
+	qry.bindValue(":contactIndex", aIndex);
+	
+	if(SmfDbQueryExecutonError == executeQuery(qry))
+		return SmfDbQueryExecutonError; 
+
+	if(qry.next()){
+		contactId = qry.value(0).toInt();
+	}
+
+	qry.finish();
+	db.close();
+	return contactId;		
+}
+
+
+int DataStoreManager::searchRelationId(const int aContactId){
+
+	int relationId = SmfDbQueryExecutonError;
+			
+	if(SmfDbOpeningError == openDB())
+		return SmfDbOpeningError;
+
+	QSqlQuery qry;
+	qry.prepare("SELECT relationId FROM relation WHERE ( contactId = :contactId)");	
+	qry.bindValue(":contactId", aContactId);
+	
+	if(SmfDbQueryExecutonError == executeQuery(qry))
+		return SmfDbQueryExecutonError; 
+
+	if(qry.next()){
+		relationId = qry.value(0).toInt();
+	}
+
+	qry.finish();
+	db.close();
+	return relationId;		
+}
+
+
+QList<int> DataStoreManager::searchContactIdList(const int aRelationId){
+	
+	QList<int> contactList;
+				
+	if(SmfDbOpeningError == openDB())
+		return contactList;
+
+	QSqlQuery qry;
+	qry.prepare("SELECT contactId FROM relation WHERE ( relationId = :relationId)");	
+	qry.bindValue(":relationId", aRelationId);
+	
+	if(SmfDbQueryExecutonError == executeQuery(qry))
+		return contactList; 
+
+	while(qry.next()){
+		contactList << qry.value(0).toInt();
+	}
+
+	qry.finish();
+	db.close();
+	return contactList;		
+}
+
+
+SmfError DataStoreManager::deleteRelationFromTable(const int aRelationId){
+
+	int contactIndex;
+	if(SmfDbOpeningError == openDB())
+		return SmfDbOpeningError;
+
+	QSqlQuery qry;
+	qry.prepare("SELECT contactId FROM relation WHERE relationId = :relationId ");	
+	qry.bindValue(":relationId", aRelationId);
+	
+	if(SmfDbQueryExecutonError == executeQuery(qry))
+		return SmfDbQueryExecutonError; 
+	
+	while(qry.next()){
+		contactIndex = qry.value(0).toInt();
+		QSqlQuery innerQry;
+		innerQry.prepare("DELETE FROM contact WHERE  contactId=:contactId ");	
+		innerQry.bindValue(":contactId", contactIndex);
+		
+		if(SmfDbQueryExecutonError == executeQuery(innerQry))
+			return SmfDbQueryExecutonError; 
+		innerQry.finish();
+	}
+	
+	qry.prepare("DELETE FROM relation WHERE ( relationId = :relationId)");	
+	qry.bindValue(":relationId", aRelationId);
+	
+	if(SmfDbQueryExecutonError == executeQuery(qry))
+		return SmfDbQueryExecutonError; 
+
+	qry.finish();
+	db.close();
+	return SmfNoError;		
+}
+
+SmfError DataStoreManager::deleteContactFromTable(const int aRelationId, const int aContactId){
+	
+	int contactIndex = SmfDbContactNotExist;
+	
+	if(SmfDbOpeningError == openDB())
+		return SmfDbOpeningError;
+
+	QSqlQuery qry;
+	qry.prepare("SELECT contactIndex FROM relation WHERE ( relationId = :relationId AND contactId=:contactId)");	
+	qry.bindValue(":relationId", aRelationId);
+	qry.bindValue(":contactId", aContactId);
+	
+	if(SmfDbQueryExecutonError == executeQuery(qry))
+		return SmfDbQueryExecutonError; 
+	
+	if(qry.next()){
+		contactIndex = qry.value(0).toInt();
+		
+		qry.prepare("DELETE FROM relation WHERE ( relationId = :relationId AND contactId=:contactId)");	
+		qry.bindValue(":relationId", aRelationId);
+		qry.bindValue(":contactId", aContactId);
+		
+		if(SmfDbQueryExecutonError == executeQuery(qry))
+			return SmfDbQueryExecutonError;
+		
+		qry.prepare("DELETE FROM contact WHERE  contactId=:contactId ");	
+		qry.bindValue(":contactId", aContactId);
+		
+		if(SmfDbQueryExecutonError == executeQuery(qry))
+			return SmfDbQueryExecutonError; 
+	}
+	
+	manageContactIndex(aRelationId, contactIndex );
+	
+	qry.finish();
+	db.close();
+	return SmfNoError;	
+}
+
+
+void DataStoreManager::manageContactIndex(const int aRelationId, const int aContactIndex ){
+	
+	QSqlQuery qry;
+	qry.prepare("UPDATE relation SET contactIndex = contactIndex - 1 "
+				"WHERE ( relationId = :relationId AND contactIndex > :contactIndex )");	
+	qry.bindValue(":relationId", aRelationId);
+	qry.bindValue(":contactIndex", aContactIndex);	
+	executeQuery(qry);
+	qry.finish();		
+}
+
+uint DataStoreManager::count(const int aRelationId){
+	uint count = -1;
+	
+	if(SmfDbOpeningError == openDB())
+		return count;
+
+	QSqlQuery qry;
+	qry.prepare("SELECT count(*) FROM relation WHERE ( relationId = :relationId)");	
+	qry.bindValue(":relationId", aRelationId);
+	
+	if(SmfDbQueryExecutonError == executeQuery(qry))
+		return count; 
+
+	if(qry.next()){
+		count = qry.value(0).toInt();
+	}
+
+	qry.finish();
+	db.close();
+	return count;			
+}
--- a/smf/smfservermodule/smfserver/datastoremgr/dsm.h	Mon Jun 07 11:43:45 2010 +0100
+++ b/smf/smfservermodule/smfserver/datastoremgr/dsm.h	Wed Jun 23 19:51:49 2010 +0530
@@ -1,86 +1,238 @@
-/*!	\file 
-	\brief File containing class description for DataStoreManager class.
+/**
+ * Copyright (c) 2010 Sasken Communication Technologies Ltd.
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of the "Eclipse Public License v1.0" 
+ * which accompanies  this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html"
+ *
+ * Initial Contributors:
+ * Chandradeep Gandhi, Sasken Communication Technologies Ltd - Initial contribution
+ *
+ * Contributors:
+ * 
+ */
+
+	
+ /*	 DataStoreManager table description
+	 --------------------------------------------
 	
-	Copyright (c) 2010 Sasken Communication Technologies Ltd.
-	All rights reserved.
-	This component and the accompanying materials are made available
-	under the terms of the "{License}"
-	which accompanies  this distribution, and is available
-	at the URL "{LicenseUrl}".
-
-	\author Jaspinder Singh, Sasken Communication Technologies Ltd - Initial contribution
-
-	\version 0.1
-
+	 contact (contactId INTEGER PRIMARY KEY AUTOINCREMENT,
+			  userId TEXT,	 
+			  contactUrl TEXT,
+			  localId TEXT,
+			  managerUri TEXT,
+			  snsName TEXT,
+			  snsDesc TEXT,
+			  snsUrl TEXT),
+			  presenceState INTEGER,
+			  presenceText TEXT,
+			  StatusText TEXT,
+			  timeStamp INTEGER");			
+			  
+--------------------------------------------********-------------------------------------------------	
+		relation table constitue of relationId, contactId and contactIndex fields.
+		
+		relation (relationId INTEGER ,
+			   	  contactId INTEGER,
+			   	  contactIndex INTEGER);	
+		
+		if more than one contactId exist for a relation,
+		contactIndex will be assigned in incremental order to the contactId's (0, 1, 2, 3........).
+	
+	Eg.			
+		Row	|	relationId | contactId | contactIndex
+		-----------------------------------------------
+		R1	|	1000	   |  1234     |    0
+		R2	|	1000       |  1235     |    1
+		R3	|	1001       |  4567     |    0
+		R4	|	1000       |  1236     |    2
+				
+				
+		On deletion Row2: Deleting Relation Contact
+		Row	|	relationId | contactId | contactIndex
+		-----------------------------------------------
+		R1	|	1000	   |  1234     |    0		
+		R2	|	1001       |  4567     |    0
+		R3	|	1000       |  1236     |    1
+				
+			  
 */
 
 #ifndef DATASTOREMANAGER_H
 #define DATASTOREMANAGER_H
 
+#define socialProfileBaseID 1000
+
 #include <QString>
 #include <QObject>
 #include <QtSql>
-#include "smfSns.h"
-#include "smfSocialProfile.h"
-#include "smfUserProfile.h"
+
+#include "smfprovider.h"
+#include "smfcontact.h"
+#include "smfrelationmgr.h"
+#include "smfglobal.h"
 
 enum DataStoreManagerState{READY, BUSY, CLOSED, ERROR};
 
-//!	\class 	DataStoreManager
-/*!
-	\brief 	Data Store Manager
-	\brief 	Data Store Manager provides the functional interface between the data store and the outside world. 
-			It manages access to the data store and encapsulates prebuilt queries for relation management and makes sure 
-			that the data in persistent storage is always in a consistent state.
-			The DSM implements the Singleton Pattern, which means that only one instance of DSM will be available throughout the system.
-	
-	\warning	Not Thread Safe
-	\warning	Do not subclass
-*/
+struct DSMContactPckg
+{
+public:
+	 QString userId; 
+	 QString contactUrl;
+	 QString localId;
+	 QString managerUri;
+	 QString snsName;
+	 QString snsDesc; 
+	 QString snsUrl;
+	 QString presenceState;
+	 QString presenceText;
+	 QString statusText;
+	 Int64 timeStamp;
+	 int contactIndex;
+	 int relationId;
+};
+
 class DataStoreManager : public QObject
 {
 	Q_OBJECT
 	
 	public:
-        static DataStoreManager* getDataStoreManager();
-        ~DataStoreManager();
-
-        QList <SMFSocialProfile> getAllRelated(const SMFUserProfile&);
-        SMFSocialProfile getRelatedByService(const SMFUserProfile&, const SMFSocialNetworkingSite&);
-
-        DataStoreManagerState getState() const;
-        QString getError() const;
-
-
-
-        SMFUserProfile getUserProfile(const QString& name, const QString& contact_id);
-        SMFSocialNetworkingSite getSNSEntry(const QString& name);
-        void saveUserProfile(const SMFUserProfile& user_profile);
-        void saveSocialProfile(const SMFSocialProfile& social_profile);
-        void saveSNSEntry(const SMFSocialNetworkingSite& sns);
-        void modifyRelation(SMFSocialProfile& sns, SMFUserProfile& new_user_profile);
-
-
+	
+		static DataStoreManager* getDataStoreManager();
+		~DataStoreManager();			
+		DataStoreManagerState getState() const;
+		QString getErrorText() const;
+    
 	public slots:
-        int addUserProfile( SMFUserProfile&);
-        int deleteUserProfile( SMFUserProfile&);
-        int addSocialProfile( SMFSocialProfile&);
-		int deleteSocialProfile(SMFSocialProfile&);
-        int addSNSEntry( SMFSocialNetworkingSite&);
-		int deleteSNSEntry(SMFSocialNetworkingSite&);
-        int createRelation(const SMFUserProfile&, SMFSocialProfile&);
-        int deleteRelation(const SMFUserProfile&, SMFSocialProfile&);
+        SmfRelationId create(SmfProvider *aProvider=NULL, SmfContact *aContact=NULL);
+
+		/** assign contact to a relation */
+		SmfError associate( SmfRelationId aRelation,
+							const SmfContact* aContact,
+							SmfProvider* aProvider);				
+
+		/** remove contact from a relation */
+		SmfError remove(SmfRelationId aRelation,
+						const SmfContact* aConact);			
+
+		/** returns first relation item in the relation when exists, NULL otherwise */
+		SmfRelationItem* searchById(const SmfRelationId aRelation);
+
+		/** returns relation Id for a given contacts if exists, NULL otherwise */
+		SmfRelationId searchByContact( SmfContact aContact);		
 
+		/** list of contacts and their provider */
+		QList<SmfRelationItem> getAll(SmfRelationId aRelation);
+		
+		/**contacts and their provider */
+		SmfRelationItem* getContact(SmfRelationId aRelation, quint32 aIndex);
+
+		/** delete a particular relation*/
+		SmfError deleteRelation(SmfRelationId aRelation);
+		
+		/** list of all relations */
+		QList<SmfRelationId> getAllRelations();
+		
+		/** returns number of contacts in a relation*/
+		uint count(SmfRelationId aRelation);
+		
+		/** get DSMContactPckg */
+		DSMContactPckg* get(SmfRelationId aRelation, quint32 aIndex);
+      
+ 			
+	private:
+		int openDB();
+		int executeQuery(QSqlQuery&);
+		DataStoreManager(const QString& dbName, QObject* parent = 0); 
+		bool InitializeDataBase();	// Initialization code to be called once while lazy construction of the instance
+		        
 	private:
-        static DataStoreManager* m_dsm_instance;		// Unique Instance for DSM (Singleton Implementation)
-        static const QString db_name;
-        int m_dsm_instance_count; 				// Track references to the DSM
-        static DataStoreManagerState state;				// Current state of DSM
-        QString m_last_msg;					// Last message/error generated by the database.
+        /*create and initialize a SmfRelationItem*/
+		void createRelationItem(QSqlQuery & aQry, int aIndex);
+		
+		enum{
+			ENewRelation = -1
+		};
+        /*------------------Operation on Contact Table-------------------*/
+        /**insert a row in the contact table */        
+        int addContactToTable( const QString &localId, 
+									const QString &managerUri,
+									const QString &snsName,
+									const QString &snsDesc,
+									const QString &snsUrl);
+        
+        int addContactToTable( const QString &userId, 
+									const QString &contactUrl,
+									const QString &localId,
+									const QString &managerUri,
+									const QString &snsName,
+									const QString &snsDesc, 
+									const QString &snsUrl,
+									const QString &presenceState,
+									const QString &presenceText,
+									const QString &statusText,
+									const Int64 timeStamp	
+									);
+  
+        
+        /**delete a row in the contact table */
+        SmfError removeContactFromTable(const int aContactId);
+        
+        /**search for relation item ( contact ) */
+        SmfRelationItem* searchContact(const int aContactId);
+        
+        /**search for contact if exist, return True/False*/
+        TBool contactIfExist( const int aContactId);
+        
+        
+        /*------------------Operation on Relation Table-------------------*/ 
+        /**insert a row in relation table and return relationId */
+        const int addRelationToTable(const int aContactId, int aRelationId = ENewRelation);
+        
+        /**delete a relation table*/
+        SmfError deleteRelationFromTable(const int aRelationId);
+        
+        /**delete a row in relation table*/
+		SmfError deleteContactFromTable(const int aRelationId, const int aContactId);	
+        
+        /**search for list of contactId */
+        QList<int> searchContactIdList(const int aRelationId);
+        
+        /**search for a contactId */
+        int searchContactId(const int aRelationId, const int aIndex);
+        
+        /**search for relation id*/
+        int searchRelationId(const int aContactId);
+        
+        /**search for a reation contact having highest index value*/
+        const int findMaxIndexValue(const int aRelationId );
+        
+        /**search for a reationId highest value*/
+        const int findMaxRelationId();
+        
+        /**On deletion of a contact it decrease index of all contacts 
+         * having index greater than it in that relation.
+         * */
+        void manageContactIndex(const int aRelationId, const int aContactIndex );
+        
+        /** returns number of contacts in a relation*/
+        uint count(const int aRelationId);
+                
+        /**search for relation if exist, return True/False*/
+        TBool relationIfExist( const int aRelationId);
+                
+	private:
+               
+        static DataStoreManager* dsmInstance;		// Unique Instance for DSM (Singleton Implementation)
+        static const QString dbName;
+        int dsmInstanceCount; 						// Track references to the DSM
+        static DataStoreManagerState state;			// Current state of DSM
+        QString lastMsg;							// Last message/error generated by the database.
         QSqlDatabase db;
-
-        DataStoreManager(const QString& db_name, QObject* parent = 0); 			// Private Constructor.
-        bool InitializeDataBase();				// Initialization code to be called once while lazy construction of the instance
+        SmfRelationItem * iSmsfRelationItem;
+        DSMContactPckg	*iDSMContactPckgItem;
+       
 };
 
 #endif
--- a/smf/smfservermodule/smfserver/main.cpp	Mon Jun 07 11:43:45 2010 +0100
+++ b/smf/smfservermodule/smfserver/main.cpp	Wed Jun 23 19:51:49 2010 +0530
@@ -31,18 +31,82 @@
 #include <QtCore>
 #include <QCoreApplication>
 #include "smfserver.h"
+#ifdef SETTINGS_TEST
+#include "smfsettingshandler.h"
+#include <QFile>
+#include <QTextStream>
+#include <QMap>
+#endif
+
+void debugOutput(QtMsgType type, const char *msg)
+	{
+	QFile logFile("c://data//SmfLog.txt");
+	Q_ASSERT(logFile.open( QIODevice::WriteOnly | QIODevice::Text | QIODevice::Append ));
+	QTextStream stream(&logFile);
+	
+	switch (type)
+		{
+		case QtDebugMsg:
+			stream<<msg<<"\n";
+			break;
+
+		case QtWarningMsg:
+			stream<<"Warning: ";
+			stream<<msg<<"\n";
+			break;
+			
+		case QtCriticalMsg:
+			stream<<"Critical: ";
+			stream<<msg<<"\n";
+			break;
+			
+		case QtFatalMsg:
+			stream<<"Fatal: ";
+			stream<<msg<<"\n";
+			break;
+			
+		default:;
+		}
+	}
+
 
 int main(int argc, char *argv[])
 {
+	qInstallMsgHandler(debugOutput);
+	
     QCoreApplication a(argc, argv);
-    SmfServer* server = new SmfServer(&a);
-    int status = -1;
-
-    if (server)
-    {
-        server->startServer();
-        status = a.exec();
-    }
-
-    return status;
+#ifndef SETTINGS_TEST
+	SmfServer* server = new SmfServer();
+	server->startServer();
+#else	
+	SmfSettingsHandler* settingsHandler = new SmfSettingsHandler();
+	////////////////////test1//////////////////////////////////////
+	//100 MB
+	QString maxData = QString::number(100000000);
+	settingsHandler->SetMaxDataTransferLimit(maxData);
+	
+	QString getmaxData = settingsHandler->GetMaxDataTransferLimit();
+	////////////////////test1//////////////////////////////////////
+	
+	////////////////////test2//////////////////////////////////////
+	QString pluginname = "SamplePlugin";
+	QString pluginstatus = "Authorized";
+	settingsHandler->SetPluginDetails(pluginname,pluginstatus);
+	
+	QMap<QString,QString> getData;
+	settingsHandler->GetPluginDetails(getData);
+	QString pluginstatus2 = getData.value(pluginname);
+	////////////////////test2//////////////////////////////////////
+	
+	QFile file("c:\\data\\getCRKeys.txt");
+    if (!file.open(QIODevice::Append | QIODevice::Text))
+	         ;
+    QTextStream out(&file);
+    out << getmaxData << "\n";
+    out << pluginstatus2 << "\n";
+    file.close();
+	a.exit(0);
+#endif
+	
+    return a.exec();
 }
--- a/smf/smfservermodule/smfserver/pluginmgr/smfpluginmanager.cpp	Mon Jun 07 11:43:45 2010 +0100
+++ b/smf/smfservermodule/smfserver/pluginmgr/smfpluginmanager.cpp	Wed Jun 23 19:51:49 2010 +0530
@@ -18,6 +18,7 @@
  */
 
 #include <QDir>
+#include <QDebug>
 #include <QLibraryInfo>
 #include <QFileSystemWatcher>
 #include <QPluginLoader>
@@ -26,7 +27,6 @@
 #include <smfpluginutil.h>
 #include <smfprovider.h>
 
-#include "smfpluginutil.h"
 #include "smfpluginmanager.h"
 #include "smfpluginmanagerutil.h"
 #include "smftransportmanagerutil.h"
@@ -57,7 +57,7 @@
 	// Save the server instance
 	m_server = aServer;
 	
-	m_server->writeLog("Inside SmfPluginManager::SmfPluginManager()");
+	qDebug()<<"Inside SmfPluginManager::SmfPluginManager()";
 	
 	// initialize the file watcher to monitor plugin addition/upgradation/removal
 	initializeFileWatcher ( );
@@ -78,31 +78,38 @@
  */
 SmfPluginManager::~SmfPluginManager ( )
 	{
-	m_server->writeLog("Inside SmfPluginManager::~SmfPluginManager()");
+	qDebug()<<"Inside SmfPluginManager::~SmfPluginManager()";
+	
+	// delete file watcher
 	if(m_fileWatcher)
 		delete m_fileWatcher;
 	
 	if(m_tempStruct)
 		delete m_tempStruct;
 	
+	// delete the plugin information hash
 	if(m_waitingPluginHash.count() > 0)
 		{
 		foreach(SmfWaitingPluginInfoStruc *str, m_waitingPluginHash.values())
 			delete str;
 		}
 	
+	// delete the SmfPluginManagerUtil class instance
 	if(m_util)
 		delete m_util;
 	
+	// Close the database
 	if(m_pluginDataBase.isOpen())
 		{
 		m_pluginDataBase.close();
 		m_pluginDataBase.removeDatabase("SmfPluginsInfoDatabase");
+		QFile::remove("SmfPluginsInfoDatabase");
 		}
 	
 	// unload all loaded plugins
 	unload(m_pluginLoaderHash.keys());
 	
+	// Finally remove the existing singleton instance of plugin manager itself
 	if(m_myInstance)
 		delete m_myInstance;
 	}
@@ -118,25 +125,32 @@
  * @param aPluginID The plugin ID that need to perform this operation
  * @param aOperation The type of operation to be performed
  * @param aInputData The data required to create the web query
- * @return SmfPluginManagerResult The result of the operation
- * @see smfglobal.h
+ * @return SmfError The result of the operation. It can be :-
+ * SmfPluginNoError (if the request is sent successfully) or 
+ * SmfPluginLoadError (if plugin could not be loaded) or
+ * SmfPluginNotAuthorised (if the plugin is not authorised) or
+ * SmfPluginUnknownPluginService (if the requested service is not known or unsupported) or
+ * SmfPluginRequestCreationFailed (if request creation has failed) or
+ * SmfPluginSOPCheckFailed (if plugins request doesnot comply to the Same Origin Policy) or
+ * SmfPluginRequestSendingFailed (if request could not be sent) or 
+ * SmfPluginUnknownHttpService (if the plugin requested any unknown http 
+ * method other than get, post, put, head or delete)  
  */
-SmfPluginManagerResult SmfPluginManager::createRequest ( const quint32& aSessionID, 
+SmfError SmfPluginManager::createRequest ( const quint32& aSessionID, 
 		const QString& aPluginID, 
 		const SmfRequestTypeID& aOperation, 
 		QByteArray& aInputData )
 	{
-	m_server->writeLog("Inside SmfPluginManager::createRequest()");
+	qDebug()<<"Inside SmfPluginManager::createRequest()";
 	
-	SmfPluginManagerResult result = SmfPluginUnknownError;
+	SmfError result = SmfUnknownError;
 
 	// Load the plugin
 	QObject *plugin = load(aPluginID, result);
 	
 	// Check if plugin is loaded
-	if(plugin && (SmfPluginLoaded == result))
+	if(plugin && (SmfNoError == result))
 		{
-		m_server->writeLog("Plugin loaded");
 		SmfPluginBase* instance = qobject_cast<SmfPluginBase *>(plugin);
 		
 		if(instance)
@@ -149,50 +163,51 @@
 		// check if the plugin is authorised (with CSM)
 		if( authorisePlugin(regToken, urlList ))
 			{
-			m_server->writeLog("Plugin authorised");
+			qDebug()<<"Plugin authorised";
 			
 			// call the utility method to create plugin specific request
+			result = SmfUnknownError;
 			m_util->createRequest(plugin, aOperation, aInputData, reqData, result);
 
 			// If the request is created successfully, call the TM method to send the request
-			if( SmfPluginRequestCreated == result )
+			if( SmfNoError == result )
 				{
-				m_server->writeLog("Plugin request creation successful");
+				qDebug()<<"Plugin request creation successful";
 				m_tempStruct = new SmfWaitingPluginInfoStruc();
 				m_tempStruct->iSessionID = aSessionID;
 				m_tempStruct->iPluginId = aPluginID;
 				m_tempStruct->iInstance = instance;
 				m_tempStruct->iOperation = aOperation;
 				m_tempStruct->iInputData = aInputData;
-				m_tempStruct->iUrlList = urlList;
 			
 				// send the request
 				sendRequest ( reqData, result, urlList );
 				}
+				else
+					qDebug()<<"Plugin request creation failed!!!, error = "<<result;
 			}
 		
 		else
 			{
 			// plugin not authorised, so unload
-			m_server->writeLog("Plugin not authorised!!!");
+			qDebug()<<"Plugin not authorised!!!";
 			unload(instance);
-			result = SmfPluginNotAuthorised;
+				result = SmfPMPluginNotAuthorised;
 			}
 		}
 		else
 			{
 			// plugin instance cannot be casted, so unload
-			m_server->writeLog("Plugin instance cannot be casted to SmfPluginBase*!!!");
+			qDebug()<<"Plugin instance cannot be casted to SmfPluginBase*!!!";
 			unload(instance);
-			result = SmfPluginLoadError;
+			result = SmfPMPluginLoadError;
 			}
 		}
 
 	else
 		{
 		// plugin not loaded
-		m_server->writeLog("Plugin not loaded!!!");
-		result = SmfPluginLoadError;
+		qDebug()<<"Plugin not loaded!!!";
 		}
 	
 	return result;
@@ -211,16 +226,14 @@
 		QNetworkReply *aReply,
 		QByteArray *aResponse )
 	{
-	m_server->writeLog("Inside SmfPluginManager::responseAvailable()");
+	qDebug()<<"Inside SmfPluginManager::responseAvailable()";
 		
-	// For request success or For request cancellation
-	if((SmfTransportOpNoError == aTransportResult) || 
-			(SmfTransportOpOperationCanceledError == aTransportResult))
+	// get the details of the plugin which made this request
+	SmfWaitingPluginInfoStruc* info = NULL;
+	info = m_waitingPluginHash.value(aReply);
+	
+	if(info)
 			{
-		m_server->writeLog("no transport error/ cancellation");
-
-			// get the details of the plugin which made this request
-			SmfWaitingPluginInfoStruc* info = m_waitingPluginHash.value(aReply);
 			quint32 sessionId = m_waitingPluginHash.value(aReply)->iSessionID;
 			QString pluginId = m_waitingPluginHash.value(aReply)->iPluginId;
 			SmfRequestTypeID operation = m_waitingPluginHash.value(aReply)->iOperation;
@@ -230,107 +243,81 @@
 			SmfPluginRetType retType = SmfRequestError;
 			SmfResultPage pageResult;
 			
-			m_server->writeLog("Before m_util->responseAvailable");
+			// call the utility method to send response to appropriate plugins
+			SmfError retValue = m_util->responseAvailable( info->iInstance, operation, 
+					aTransportResult, aResponse, &result, retType, pageResult );
 			
-			// call the utility method to send response to appropriate plugins
-			SmfPluginManagerResult retValue = m_util->responseAvailable( info->iInstance, operation, 
-				aTransportResult, aResponse, &result, retType, pageResult );
-			
+			qDebug()<<"m_util->responseAvailable() return = "<<retValue;
+		
 			// remove the plugin from the waiting list
 			delete m_waitingPluginHash.value(aReply);
 			m_waitingPluginHash.remove(aReply);
 		
 			QByteArray arr;
 			QDataStream stream(&arr, QIODevice::ReadWrite);
-			if( SmfPluginResponseParsed == retValue )
+		
+			if( SmfNoError == retValue )
 				{
-				m_server->writeLog("Parsing successful");
+				qDebug()<<"Parsing of response is successful";
 				
 				// serialize the response to suitable class and pass the data to server
 				serializeResult(operation, &result, stream);
 			
-				////TODO:- send error in enums-by manasij
 				// Send the response data to the server
-				m_server->resultsAvailable(sessionId, &arr, SmfNoError);
+				m_server->resultsAvailable(sessionId, &arr, retValue);
 				}
 		
 			// Send the request again
-			else if( SmfPluginSendRequestAgain == retValue )
+			else if( SmfPMPluginSendRequestAgain == retValue )
 				{
-				m_server->writeLog("Send request again");
-				
-				// create the request again (with same paramaters)
+				qDebug()<<"Send request again";
 				retValue = createRequest( sessionId, pluginId, operation, inputData );
 				}
 			
 			// Error
 			else
 				{
-				m_server->writeLog("Parsing failed!!");
+				qDebug()<<"Plugin responseAvailable() failed!!!, error = "<<retValue;
 				
 				// Error in parsing, sent to server
-				m_server->resultsAvailable(sessionId, &arr, SmfpluginResponseParseFailure);
-				}
-		
-			// delete aReply later, when event loop is re-entered
-			aReply->deleteLater();
+// ToDo :- For testing:-
+				stream<<result.toString();
+				m_server->resultsAvailable(sessionId, &arr, retValue);
 			}
-	
-	// Any other error
+		}
 	else
-		{
-		m_server->writeLog("Error in SmfPluginManager::responseAvailable, Transport failure code : ");
-		QString err = QString::number(aTransportResult);
-		m_server->writeLog(err);
+		qDebug()<<"No outstanding requests for this QNetworkReply!!!";
 		
-		//Added by manasij, send all kind of errors to the server
-		//TODO:- to be refined by PM owner
-		quint32 sessionId = m_waitingPluginHash.value(aReply)->iSessionID;
-		QByteArray arr;
-		m_server->resultsAvailable(sessionId, &arr, SmftransportInitNetworkNotAvailable);
-		}
+	// delete aReply later, when event loop is re-entered
+	aReply->deleteLater();
 	}
-
+	
 
 /**
  * Method to cancel the service request
- * @param aPluginId The plugin whose current operation 
- * is to be cancelled
+ * @param aPluginId The plugin whose current operation is 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 retValue = false;
-	m_server->writeLog("Inside SmfPluginManager::cancelRequest()");
+	bool retValue = true;
+	qDebug()<<"Inside SmfPluginManager::cancelRequest()";
 	
 	// Get the plugin for which cancel is requested
 	foreach(SmfWaitingPluginInfoStruc* iPluginInfo, m_waitingPluginHash.values())
 		{
 		if( 0 == iPluginInfo->iPluginId.compare(aPluginId))
 			{
-			m_server->writeLog("Plugin to be cancelled found in the waiting list");
+			qDebug()<<"Plugin to be cancelled found in the waiting list";
 			
 			// Notify Transport Manager
 			m_transMngrUtil->cancelRequest(m_waitingPluginHash.key(iPluginInfo));
 			
-			// Notify the plugin that the request has been cancelled
-			SmfPluginRetType retType;
-			SmfResultPage pageResult;
-			SmfPluginError ret = iPluginInfo->iInstance->responseAvailable( SmfTransportOpCancelled, 
-					NULL, NULL, retType, pageResult );
-			
-			// Remove that plugin from the waiting list
-			delete (m_waitingPluginHash.value(m_waitingPluginHash.key(iPluginInfo)));
-			m_waitingPluginHash.remove(m_waitingPluginHash.key(iPluginInfo));
-			
-			if(SmfPluginErrNone == ret)
-				retValue = true;
 			}
-		//else , cancel requested for a plugin which is not loaded, do nothing
 		else
-			{
-			m_server->writeLog("Plugin to be cancelled not found in the waiting list!!! - do nothing");
-			retValue =  false;
-		}
+			retValue =  true;
 		}
 	return retValue;
 	}
@@ -342,7 +329,7 @@
  */
 void SmfPluginManager::initializeFileWatcher ( )
 	{
-	m_server->writeLog("Inside SmfPluginManager::initializeFileWatcher()");
+	qDebug()<<"Inside SmfPluginManager::initializeFileWatcher()";
 	
 	// Create the file watcher for the plugins in /Smf folder of the Qt plugin directory
 	m_fileWatcher = new QFileSystemWatcher(this);
@@ -363,6 +350,12 @@
 		}
 	else
 		m_fileWatcher->addPath(dir.absolutePath());
+	
+	connect(m_fileWatcher, SIGNAL(directoryChanged(const QString&)), 
+			this, SLOT (directoryChanged(const QString&)));
+	
+	connect(m_fileWatcher, SIGNAL(fileChanged(const QString&)), 
+				this, SLOT (directoryChanged(const QString&)));
 	}
 
 
@@ -373,22 +366,27 @@
  * the Plugin Manager is instantiated.
  * This method creates and updates m_pluginIdPathHash member 
  * of this class
+ * @return Returns true the database is successfully created and updated, 
+ * else returns false
  */
 bool SmfPluginManager::initializeSmfPluginDataBase ( )
 	{
-	m_server->writeLog("Inside SmfPluginManager::initializeSmfPluginDataBase()");
+	qDebug()<<"Inside SmfPluginManager::initializeSmfPluginDataBase()";
 	
 	// Find QSQLite driver and create a connection to database
-	m_pluginDataBase.removeDatabase("SmfPluginsInfoDatabase");
+	QFile::remove("SmfPluginsInfoDatabase");
 	m_pluginDataBase = QSqlDatabase::addDatabase("QSQLITE");
 	m_pluginDataBase.setDatabaseName("SmfPluginsInfoDatabase");
 	
 	// Open the database
 	bool opened = m_pluginDataBase.open();
 	if(!opened)
+		{
+		qDebug()<<"Database could not be opened, returning !!!";	
 		return false;
+		}
 	
-	m_server->writeLog("Database opened");
+	qDebug()<<"Database opened";
 	
 	// Create a query to create the DB table for Plugin Manager (if it doesn't exists)
 	QSqlQuery query;
@@ -401,11 +399,14 @@
 	// Error - table not created, Plugin Manager might not work properly
 	if(!tableCreated)
 		{
-		m_server->writeLog("Table not created, error = "+query.lastError().text());
+		qDebug()<<"Table not created!!!, error = "<<query.lastError().text();
+		
+		// Close the database
+		m_pluginDataBase.close();
 		return false;
 		}
 	
-	m_server->writeLog("Table created");
+	qDebug()<<"Table created";
 	
 	// Get the directory having the Qt plugin stubs
 	QDir dir(QLibraryInfo::location(QLibraryInfo::PluginsPath));
@@ -413,28 +414,28 @@
 	// If Smf folder exists
 	if(dir.cd("smf/plugin"))
 		{
-		m_server->writeLog("Smf/plugin folder exists");
+		qDebug()<<"Smf/plugin folder exists";
 		// Get each interface folders names
 		foreach(QString intfName, dir.entryList(QDir::AllDirs))
 			{
 			dir.cd(intfName);
-			m_server->writeLog("Interface name : "+dir.dirName());
+			qDebug()<<"Interface name : "<<dir.dirName();
 			
 			// Get each plugin in this folder
 			foreach(QString pluginName, dir.entryList(QDir::Files))
 				{
-				m_server->writeLog("plugins for this Interface : "+pluginName);
+				qDebug()<<"plugins for this Interface : "<<pluginName;
 				
 				// load this plugin
 				QPluginLoader pluginLoader(dir.absoluteFilePath(pluginName));
 				QObject *instance = pluginLoader.instance();
 				if (instance)
 					{
-					m_server->writeLog("instance found");
+					qDebug()<<"instance found";
 					SmfPluginBase* plugin = qobject_cast<SmfPluginBase *>(instance);
 				    if (plugin)
 				    	{
-						m_server->writeLog("SmfPluginBase found");
+						qDebug()<<"SmfPluginBase found";
 						plugin->initialize(SmfPluginUtil::getInstance());
 				    
 						// get the plugin id
@@ -443,8 +444,7 @@
 						// get the interface implemented by the plugin
 						QString intfImplemented = dir.dirName();
 						intfImplemented.prepend("org.symbian.smf.plugin.");
-						m_server->writeLog("intfImplemented=");
-						m_server->writeLog(intfImplemented);
+						qDebug()<<"intfImplemented = "<<intfImplemented;
 						
 						// get the service provider
 						QString serProv = plugin->getProviderInfo()->serviceName();
@@ -472,14 +472,15 @@
 								.arg(desc).arg(servURL).arg(authAppId));
 						
 						if(rowInserted)
-							m_server->writeLog("This Plugin's information is added to database : "+id+""
-									", "+intfImplemented+", "+serProv);
+							qDebug()<<QString("This Plugin's information is added to database : '%1' '%2' '%3'")
+											.arg(id).arg(intfImplemented).arg(serProv);
 						else
-							m_server->writeLog("plugins data not written to database, error = "+query.lastError().text());
+							if(0 != query.lastError().text().size())
+								qDebug()<<"plugins data not written to database!!!, error = "<<query.lastError().text();
 				    	}
 				    else
 				    	{
-						m_server->writeLog("Plugin could not be converted to SmfpluginBase* - returning");
+						qDebug()<<"Plugin could not be converted to SmfpluginBase* - returning!!!";
 						
 						// Close the database
 						m_pluginDataBase.close();
@@ -491,19 +492,19 @@
 					}
 				else
 					{
-					m_server->writeLog("Plugin could not be loaded - returning");
+					qDebug()<<"Plugin could not be loaded - returning!!!, error = "<<pluginLoader.errorString();
 					
 					// Close the database
 					m_pluginDataBase.close();
 										
 					return false;
-				}
+					}
 				}
 			dir.cdUp();
 			}
 		}
 	else
-		m_server->writeLog("No Smf plugins installed!!!");
+		qDebug()<<"No Smf plugins installed!!!";
 	
 	// Close the database
 	m_pluginDataBase.close();
@@ -517,15 +518,16 @@
  * Method to load a plugin using its Plugin Id.
  * @param aPluginId The unique ID of the plugin 
  * @param aLoadResult [out] Output paramater indicating the result 
- * of the loading
+ * of the loading. It can be:-
+ * SmfPluginNoError (if plugin was loaded successfully) or
+ * SmfPluginNotFound (if plugin with the given id could not be found) 
+ * SmfPluginNotLoaded (if plugin could not be loaded) or 
  * @return The instance of the loaded plugin if loaded, else NULL
  */
 QObject* SmfPluginManager::load ( const QString &aPluginId,
-		SmfPluginManagerResult &aLoadResult)
+		SmfError &aLoadResult)
 	{
-	m_server->writeLog("Inside SmfPluginManager::load()");
-	
-	QPluginLoader *pluginLoader = 0;
+	qDebug()<<"Inside SmfPluginManager::load()";
 	
 	// Find the plugin Path
 	QString pluginPath = m_pluginIdPathHash.value(aPluginId);
@@ -533,7 +535,16 @@
 	if(!pluginPath.isEmpty())
 		{
 		// create the plugin loader and load the plugin
+		QPluginLoader *pluginLoader = NULL;
 		pluginLoader = new QPluginLoader(pluginPath);
+		if(!pluginLoader)
+			{
+			// Plugin loader could not be created, error
+			qDebug()<<"QPluginLoader allocation failed!!!";
+			aLoadResult = SmfPMPluginNotLoaded;
+			return NULL;
+			}
+		
 		SmfPluginBase *plugin = qobject_cast<SmfPluginBase *>(pluginLoader->instance());
 		
 		// If the plugin is loaded
@@ -544,26 +555,25 @@
 			
 			// update the plugin loader and the loaded plugin lists
 			m_pluginLoaderHash.insertMulti(plugin, pluginLoader);
-			aLoadResult = SmfPluginLoaded;
-			m_server->writeLog("Plugin loaded");
+			aLoadResult = SmfNoError;
+			qDebug()<<"Plugin loaded";
+			return pluginLoader->instance();
 			}
 		else
 			{
-			m_server->writeLog("Plugin not loaded");
-		
 			// Plugin could not be loaded, error
-			aLoadResult = SmfPluginNotLoaded;
+			qDebug()<<"Plugin not loaded!!!, error = "<<pluginLoader->errorString();
+			aLoadResult = SmfPMPluginNotLoaded;
+			return NULL;
 		}
 		}
 	else
 		{
-		m_server->writeLog("Plugin not found");
-		
-		// plugin not found in hash
-		aLoadResult = SmfPluginNotFound;
+		// plugin could not be found in the hash maintained by PM
+		qDebug()<<"Plugin not found!!!";
+		aLoadResult = SmfPMPluginNotFound;
+		return NULL;
 		}
-	
-	return pluginLoader->instance();
 	}
 
 
@@ -571,54 +581,70 @@
  * Method to unload a loaded plugin. Returns true if success, else 
  * returns false.
  * @param aPlugin The plugin instance to be unloaded
- * @return Returns true if success, else returns false
+ * @return Returns true if the mentioned plugin could be unloaded. Returns 
+ * false, if the plugin instance is NULL, or if it could not be unloaded.
  */
 bool SmfPluginManager::unload ( SmfPluginBase *aPlugin )
 	{
-	m_server->writeLog("Inside SmfPluginManager::unload()");
+	qDebug()<<"Inside SmfPluginManager::unload()";
+	bool unloadResult = true;
 	
-	// Get all the loaders for this plugin
-	QList<QPluginLoader*> loaderList = m_pluginLoaderHash.values(aPlugin);
-	bool unloaded = false;
-
-	foreach(QPluginLoader *loader, loaderList)
+	if(aPlugin)
 		{
-		// for each loader unload the plugin
-		unloaded = loader->unload();
-		
-		// delete the instance of the loader
-		delete loader;
-		loader = NULL;
+		// Get all the loaders for this plugin
+		QList<QPluginLoader*> loaderList = m_pluginLoaderHash.values(aPlugin);
+		if(loaderList.size())
+			{
+			foreach(QPluginLoader *loader, loaderList)
+				{
+				// for each loader unload the plugin
+				unloadResult = loader->unload();
+				
+				// delete the instance of the loader
+				delete loader;
+				loader = NULL;
+				}
+			
+			// Remove the plugin and its associated loaders from the Hash
+			m_pluginLoaderHash.remove(aPlugin);
+			return unloadResult;
+			}
+		}
+	else
+		{
+		qDebug()<<"Plugin  instance is NULL!!!";
+		unloadResult = false;
 		}
 	
-	// Remove the plugin and its associated loaders from the Hash
-	m_pluginLoaderHash.remove(aPlugin);
-	return unloaded;
+	return unloadResult;
 	}
 
 
 /**
- * Method to unload the list of loaded plugins. Returns true if all are 
- * success, else returns false if any one fails.
+ * Method to unload the list of loaded plugins. Returns true if all unload 
+ * are success, else returns false if any one fails.
  * @param aPluginList The list of instances for all plugins that are 
- * to be unloaded
+ * to be unloaded. This method does nothing and returns false if the list is empty.
  * @return Returns true if all are success, else returns false if any 
- * one fails.
+ * one fails. Also returns false if the input list is empty.
  */
 bool SmfPluginManager::unload ( const QList<SmfPluginBase *> &aPluginList)
 	{
-	m_server->writeLog("Inside SmfPluginManager::unload() - overloaded fn");
-	//unload all the required plugins
-	bool unloaded = true;
+	qDebug()<<"Inside SmfPluginManager::unload() - overloaded fn";
+	bool unloaded = false;
 	
-	foreach(SmfPluginBase *plugin, aPluginList)
+	if(aPluginList.size())
 		{
-		// unload individual plugins in the list
-		bool ret = unload(plugin);
-		
-		// indicate error if any one of the plugin failed to unload
-		if(!ret)
-			unloaded = ret;
+		//unload all the required plugins
+		foreach(SmfPluginBase *plugin, aPluginList)
+			{
+			// unload individual plugins in the list
+			bool ret = unload(plugin);
+			
+			// indicate error if any one of the plugin failed to unload
+			if(!ret)
+				unloaded = ret;
+			}
 		}
 	return unloaded;
 	}
@@ -629,15 +655,20 @@
  * send the request created by the plugins over the network
  * @param aReqData The request data created by the plugin
  * @param aResult [out] The output parameter indicating the result 
- * of this method
+ * of this method. This can be :-
+ * SmfPluginNoError (if the request is sent successfully) or 
+ * SmfPluginSOPCheckFailed (if plugins request doesnot comply to 
+ * the Same Origin Policy) or 
+ * SmfPluginRequestSendingFailed (if request could not be sent) or 
+ * SmfPluginUnknownHttpService (if the plugin requested any unknown http 
+ * method other than get, post, put, head or delete)  
  * @param aUrlList The list of accessible Urls for this plugin
- * @see smfglobal.h
  */
 void SmfPluginManager::sendRequest ( SmfPluginRequestData &aReqData, 
-		SmfPluginManagerResult &aResult,
+		SmfError &aResult,
 		const QList<QUrl> &aUrlList )
 	{
-	m_server->writeLog("Inside SmfPluginManager::sendRequest()");
+	qDebug()<<"Inside SmfPluginManager::sendRequest()";
 	
 	QNetworkReply* reply;
 	bool sopCompliant = false;
@@ -647,31 +678,39 @@
 		{
 		// Http HEAD
 		case QNetworkAccessManager::HeadOperation:
+			qDebug()<<"http::head Operation requested";
 			reply = m_transMngrUtil->head(aReqData.iNetworkRequest, aUrlList, sopCompliant);
 			break;
 		
 		// Http GET
 		case QNetworkAccessManager::GetOperation:
+			qDebug()<<"http::get Operation requested";
 			reply = m_transMngrUtil->get(aReqData.iNetworkRequest, aUrlList, sopCompliant);
 			break;
 			
 		// Http PUT	
 		case QNetworkAccessManager::PutOperation:
+			qDebug()<<"http::put Operation requested";
 			reply = m_transMngrUtil->put(aReqData.iNetworkRequest, aReqData.iPostData->buffer(), aUrlList, sopCompliant);
+			delete aReqData.iPostData;
 			break;
 			
 		// Http POST
 		case QNetworkAccessManager::PostOperation:
+			qDebug()<<"http::post Operation requested";
 			reply = m_transMngrUtil->post(aReqData.iNetworkRequest, aReqData.iPostData->buffer(), aUrlList, sopCompliant);
+			delete aReqData.iPostData;
 			break;
 			
 		// Http DELETE
 		case QNetworkAccessManager::DeleteOperation:
+			qDebug()<<"http::delete Operation requested";
 			reply = m_transMngrUtil->deleteResource(aReqData.iNetworkRequest, aUrlList, sopCompliant);
 			break;
 			
 		default:
-			aResult = SmfPluginUnknownService;
+			qDebug()<<"unknown http Operation requested!!!";
+			aResult = SmfPMPluginUnknownHttpService;
 			return;
 		}
 	
@@ -680,27 +719,25 @@
 		if( reply )
 			{
 			// SOP compliant, sending successful
+			qDebug()<<"No error, request sent";
 			m_waitingPluginHash.insert(reply, m_tempStruct);
 			m_tempStruct = NULL;
-			aResult = SmfPluginNoError;
-			
-			m_server->writeLog("No error, request sent");
-			
+			aResult = SmfNoError;
 			}
-		// reply is NULL, sending failed
 		else
 			{
-			m_server->writeLog("QNEtrworkReply returned error - not sent");
-			aResult = SmfPluginRequestSendingFailed;
-		}
+			// reply is NULL, sending failed
+			qDebug()<<"QNetworkReply returned NULL - request not sent";
+			aResult = SmfPMPluginRequestSendingFailed;
+			}
 		}
 	
-	// SOP violation
 	else
 		{
-		m_server->writeLog("SOP checking failed");
-		aResult = SmfPluginSOPCheckFailed;
-	}
+		// SOP violation
+		qDebug()<<"SOP checking failed";
+		aResult = SmfPMPluginSOPCheckFailed;
+		}
 	}
 
 
@@ -711,23 +748,27 @@
  * the valid url list if available for this plugin.
  * @param aRegToken The registration token given by the plugin
  * @param aUrlList [out] The list of Urls that the plugin can send 
- * request to (to be filled by CSM)
+ * request to (to be filled by CSM). This list will be empty if 
+ * aRegToken is empty
  * @return Returns true if plugin is authorised, else returns false.
+ * Also returns false if aRegToken is empty.
  */
 bool SmfPluginManager::authorisePlugin( const QString &aRegToken, 
 		QList<QUrl> &aUrlList )
 	{
 	Q_UNUSED(aRegToken)
-	m_server->writeLog("Inside SmfPluginManager::authorisePlugin()");
+	qDebug()<<"Inside SmfPluginManager::authorisePlugin()";
 	
 #ifdef CSM_INTEGRATED
+	aUrlList.clear();
+	
 // Get the valid URL list from CSM, giving the reg token
-	if(m_server->authorisePlugin(aRegToken, aUrlList))
-		return true;
+	if(aRegToken.size())
+		return m_server->authorisePlugin(aRegToken, aUrlList);
 	else
 		return false;
+#else
 	
-#else
 // CSM STUBBING - start
 	QUrl url1 ("http://www.example.com");
 	QUrl url2 ("http://api.facebook.com");
@@ -748,15 +789,15 @@
  * Method to serialize the result of parsing (which is done by the 
  * plugins) to QByteArray to be sent to Smf server.
  * @param aOperation The type of operation to be performed
- * @param aResult The data to be serialized
- * @param aDataStream Stream to be written
+ * @param aResult The data to be serialized (should not be NULL)
+ * @param aDataStream Stream to be written to
  */
 void SmfPluginManager::serializeResult ( 
 		const SmfRequestTypeID &aOperation, 
 		QVariant* aResult,
 		QDataStream &aDataStream )
 	{
-	m_server->writeLog("Inside SmfPluginManager::serializeResult()");
+	qDebug()<<"Inside SmfPluginManager::serializeResult()";
 	
 	// Call the utlity class method to serialize the result
 	m_util->serializeResult(aOperation, aResult, aDataStream);
@@ -771,7 +812,8 @@
  */
 void SmfPluginManager::directoryChanged ( const QString &aPath )
 	{
-	m_server->writeLog("Inside SmfPluginManager::directoryChanged()");
+	qDebug()<<"Inside SmfPluginManager::directoryChanged()";
+	qDebug()<<"Changed path = "<<aPath;
 	
 	// Create a QDir instance with the given path
 	QDir dir(aPath);
@@ -785,19 +827,26 @@
 	QStringList newPlugins = dir.entryList(QDir::Files, QDir::Name);
 	QStringList::const_iterator newListIterator = newPlugins.constBegin();
 	
+	foreach(QString name, newPlugins)
+		qDebug()<<"New plugin = "<<name;
+	
 	// Get all plugins who were in this path, before this directory was changed
 	QStringList availablePlugins = m_pluginIdPathHash.keys(aPath);
 	availablePlugins.sort();
 	QStringList::const_iterator oldListIterator = availablePlugins.constBegin();
 	
+	foreach(QString name, availablePlugins)
+		qDebug()<<"Old plugin = "<<name;
+	
 	// Open the database
 	bool opened = m_pluginDataBase.open();
 	if(!opened)
-        {}//return;
+		return;
 	
 	// If plugin is changed
 	if( newPlugins.count() == availablePlugins.count() )
 		{
+		qDebug()<<"Plugin upgraded...";
 		// Check for equality
 		while( newListIterator != newPlugins.constEnd() )
 			{
@@ -820,18 +869,18 @@
 	    bool updated = updateQuery.exec(QString("UPDATE pluginDetails SET pluginId = '%1' "
 	    		"WHERE pluginId = '%2'").arg(*newListIterator).arg(*oldListIterator));
 	    if (!updated)
-	    	m_server->writeLog("Database table not updated, error = "+updateQuery.lastError().text());
-		
+	    	if(0 != updateQuery.lastError().text().size())
+	    		qDebug()<<"Database table not updated, error = "<<updateQuery.lastError().text();
 		
 		// Get the new and old plugin Ids
 		pluginId = *newListIterator;
 		oldpluginId = *oldListIterator;
 		
 		// Load the plugin and get its service provider name
-		SmfPluginManagerResult result;
+		SmfError result;
 		SmfPluginBase* instance = qobject_cast<SmfPluginBase *>(load(pluginId, result));
 		
-		if(instance && (SmfPluginLoaded == result))
+		if(instance && (SmfNoError == result))
 			{
 			instance->initialize(SmfPluginUtil::getInstance());
 			serviceProv = instance->getProviderInfo()->serviceName();
@@ -839,16 +888,21 @@
 			}
 		
 		unload(instance);
+		
+		qDebug()<<QString("Upgraded plugin details are : '%1' '%2' '%3' '%4'").arg(oldpluginId)
+				.arg(pluginId).arg(interfaceName).arg(serviceProv);
+		
 		// Inform server that plugin has been changed
 #ifdef CSM_INTEGRATED
 		//Remove after Server Integration
-		m_server->pluginChanged(oldPluginId, newPluginId, interfaceName, serviceProv);
+		m_server->pluginChanged(oldPluginId, pluginId, interfaceName, serviceProv);
 #endif
 		}
 		
 	// If plugin is added
 	else if(newPlugins.count() > availablePlugins.count())
 		{
+		qDebug()<<"Plugin Added...";
 		// Check for equality
 		while( oldListIterator != availablePlugins.constEnd() )
 			{
@@ -867,10 +921,10 @@
 		pluginId = *newListIterator;
 		
 		// Load the plugin and get its service provider name
-		SmfPluginManagerResult result;
+		SmfError result;
 		SmfPluginBase* instance = qobject_cast<SmfPluginBase *>(load(pluginId, result));
 		
-		if(instance && (SmfPluginLoaded == result))
+		if(instance && (SmfNoError == result))
 			{
 			instance->initialize(SmfPluginUtil::getInstance());
 			serviceProv = instance->getProviderInfo()->serviceName();
@@ -890,7 +944,10 @@
 
 		 // Error
 		if (!rowInserted)
-			m_server->writeLog("Database table not inserted, error = "+insertRowQuery.lastError().text());
+			qDebug()<<"Database table not inserted, error = "<<insertRowQuery.lastError().text();
+		
+		qDebug()<<QString("Added plugin detailes are : '%1' '%2' '%3'").arg(pluginId)
+				.arg(interfaceName).arg(serviceProv);
 		
 		// Inform server that plugin has been added
 #ifdef CSM_INTEGRATED
@@ -902,6 +959,8 @@
 	// If plugin is removed
 	else //for newPlugins.count() < availablePlugins.count()
 		{
+		qDebug()<<"Plugin removed...";
+		
 		// Check for equality
 		while( newListIterator != newPlugins.constEnd() )
 			{
@@ -923,16 +982,16 @@
 		 
 		// Error
 		if (!rowDeleted)
-			m_server->writeLog("Database table row not deleted, error = "+deleteRowQuery.lastError().text());
+			qDebug()<<"Database table row not deleted, error = "<<deleteRowQuery.lastError().text();
 		
 		// Get the plugin Id
 		pluginId = *oldListIterator;
 		
 		// Load the plugin and get its service provider name
-		SmfPluginManagerResult result;
+		SmfError result;
 		SmfPluginBase* instance = qobject_cast<SmfPluginBase *>(load(pluginId, result));
 		
-		if(instance && (SmfPluginLoaded == result))
+		if(instance && (SmfNoError == result))
 			{
 			instance->initialize(SmfPluginUtil::getInstance());
 			serviceProv = instance->getProviderInfo()->serviceName();
@@ -940,6 +999,10 @@
 			}
 		
 		unload(instance);
+		
+		qDebug()<<QString("Added plugin detailes are : '%1' '%2' '%3'").arg(pluginId)
+				.arg(interfaceName).arg(serviceProv);
+		
 		// Inform server that plugin has removed
 #ifdef CSM_INTEGRATED
 		//Remove after Server Integration
@@ -955,56 +1018,76 @@
  * Method to get the list of the SmfProvider for all the plugins that implement 
  * the mentioned Interface 
  * @param aInterface The interface for which list of plugins is required 
- * @param aMap The map of pluginID and its corresponding SmfProvider
+ * @param aMap The map of pluginID and its corresponding SmfProvider. The Map 
+ * will be empty if no plugins for the given interface could be found.
  */
 void SmfPluginManager::getPlugins(const QString& aInterface, QMap<QString,SmfProvider>& aMap)
 	{
-	m_server->writeLog("Inside SmfPluginManager::getPlugins()");
+	qDebug()<<"Inside SmfPluginManager::getPlugins()";
+	qDebug()<<"Argument, intf name = "<<aInterface;
+	
+	aMap.clear();
+	
+	if(aInterface.isEmpty())
+		{
+		qDebug()<<"Interface name is empty!!!";
+		return;
+		}
 	
 	// Open the database
 	bool opened = m_pluginDataBase.open();
 	if(!opened)
 		{
-		m_server->writeLog("Data base not opened, exiting getplugins()");
+		qDebug()<<"Data base not opened, exiting getplugins()!!!";
 		return;
 		}
 	
-	m_server->writeLog("Data base opened");
+	qDebug()<<"Data base opened";
 	
 	// Query the database for all pluginIDs that implement the given interface
 	QSqlQuery query(QString("SELECT pluginId, interfaceName, serviceProvider, description, "
 			"serviceUrl FROM pluginDetails where interfaceName = '%1'").arg(aInterface));
 	
-	if (query.next())
+	while(query.next())
 		{
-		m_server->writeLog("Query is success");
+		qDebug()<<"Query is success";
 
 		SmfProvider prov;
 		
 		// get the pluginId
 		QString pluginId = query.value(0).toString();
+		qDebug()<<"Found Plugin Id = "<<pluginId;
 		
 		// get the service type / interface name
 		QStringList servicetypes;
 		servicetypes.insert(0, query.value(1).toString());
-		prov.serviceTypes(servicetypes);
+		prov.setSupportedInterfaces(servicetypes);
+		qDebug()<<"  Its interface = "<<servicetypes.at(0);
 		
 		// Get the serv provider
 		QString servName = query.value(2).toString();
-		prov.serviceName(servName);
+		prov.setServiceName(servName);
+		qDebug()<<"  Its serv prov = "<<servName;
 		
 		// Get the description
 		QString desc = query.value(3).toString();
-		prov.description(desc);
+		prov.setDescription(desc);
+		qDebug()<<"  Its description = "<<desc;
 		
 		// Get the service URL
 		QUrl url(query.value(4).toString());
-	prov.serviceUrl(url);
+		prov.setServiceUrl(url);
+		qDebug()<<"  Its url = "<<url.toString();
 
 		aMap.insert(pluginId, prov);
 		}
+	
+	if(0 != query.lastError().text().size())
+		qDebug()<<"Data base query->next() exited, error = "<<query.lastError().text();
 	else
-		m_server->writeLog("Data base query->next() returned false, error = "+query.lastError().text());
+		qDebug()<<"Data base query->next() exited";
+	
+	qDebug()<<"Count of SmfProvider returned = "<<aMap.count();
 	
 	// Close the database
 	m_pluginDataBase.close();
@@ -1015,21 +1098,29 @@
  * Method to get the pluginID for the mentioned interface and service provider 
  * @param aInterface The interface implemented by the plugin
  * @param aProv The plugin's service provider
- * @param aPluginId The required pluginID
+ * @param aPluginId The required pluginID. This argument will be empty if no plugin
+ * for the given interface and service provider could be found.
  */
 void SmfPluginManager::getPluginId(const QString& aInterface, const SmfProvider& aProv, QString& aPluginId)
 	{
-	m_server->writeLog("SmfPluginManager::getPluginId");
+	qDebug()<<"SmfPluginManager::getPluginId()";
+	aPluginId.clear();
+	
+	if(aInterface.isEmpty())
+		{
+		qDebug()<<"Interface name is empty!!!";
+		return;
+		}
 	
 	// Open the database
 	bool opened = m_pluginDataBase.open();
 	if(!opened)
 		{
-		m_server->writeLog("Data base not opened, exiting");
+		qDebug()<<"Data base not opened, exiting!!!";
 		return;
 		}
 	
-	m_server->writeLog("Data base opened");
+	qDebug()<<"Data base opened";
 
 	// Query the database for a pluginID with given interface name and service provider
 	QSqlQuery query(QString("SELECT pluginId FROM pluginDetails where interfaceName = '%1' AND "
@@ -1037,15 +1128,19 @@
 	
 	if (query.next())
 		{
-		m_server->writeLog("Query is success");
+		qDebug()<<"Query is success";
 		
 		// get the pluginId
 		aPluginId = query.value(0).toString();
+		qDebug()<<"returned pluginID = "<<aPluginId;
 		}
 	else
-		m_server->writeLog("Data base query->next() returned false, error = "+query.lastError().text());
-	
-	m_server->writeLog("returned pluginID = "+aPluginId);
+		{		
+		if(0 != query.lastError().text().size())
+			qDebug()<<"Data base query->next() returned false, error = "<<query.lastError().text();
+		else
+			qDebug()<<"Data base query->next() returned false";
+		}
 	
 	// Close the database
 	m_pluginDataBase.close();
--- a/smf/smfservermodule/smfserver/pluginmgr/smfpluginmanager.h	Mon Jun 07 11:43:45 2010 +0100
+++ b/smf/smfservermodule/smfserver/pluginmgr/smfpluginmanager.h	Wed Jun 23 19:51:49 2010 +0530
@@ -22,7 +22,7 @@
 
 #include <QtSql>
 #include <smfglobal.h>
-#include <smfserverglobal.h>
+#include "smfserverglobal.h"
 #include "smfserver.h"
 
 // Forward declaration
@@ -64,11 +64,6 @@
 	 */
 	QByteArray iInputData;
 	
-	/**
-	 * The list of valid Urls accessible for this plugin
-	 */
-	QList<QUrl> iUrlList;
-
 	};
 
 
@@ -108,21 +103,28 @@
 	 * @param aPluginID The plugin ID that need to perform this operation
 	 * @param aOperation The type of operation to be performed
 	 * @param aInputData The data required to create the web query
-	 * @return SmfPluginManagerResult The result of the operation
-	 * @see smfglobal.h
+	 * @return SmfError The result of the operation. It can be :-
+	 * SmfPluginNoError (if the request is sent successfully) or 
+	 * SmfPluginLoadError (if plugin could not be loaded) or
+	 * SmfPluginNotAuthorised (if the plugin is not authorised) or
+	 * SmfPluginUnknownPluginService (if the requested service is not known or unsupported) or
+	 * SmfPluginRequestCreationFailed (if request creation has failed) or
+	 * SmfPluginSOPCheckFailed (if plugins request doesnot comply to the Same Origin Policy) or
+	 * SmfPluginRequestSendingFailed (if request could not be sent) or 
+	 * SmfPluginUnknownHttpService (if the plugin requested any unknown http 
+	 * method other than get, post, put, head or delete)  
 	 */
-	SmfPluginManagerResult createRequest ( const quint32& aSessionID, 
+	SmfError createRequest ( const quint32& aSessionID, 
 			const QString& aPluginID, 
 			const SmfRequestTypeID& aOperation, 
 			QByteArray& aInputData );
 	
 	/**
-	 * Method called by Transport Manager when network response 
-	 * is available
+	 * Method called by Transport Manager when network response is available
 	 * @param aTransportResult The result of Transport Operation
 	 * @param aReply The QNetworkReply instance that requested 
 	 * this transaction
-	 * @param aResponse The network response data
+	 * @param aResponse The network response data, may be NULL for error
 	 */
 	void responseAvailable ( const SmfTransportResult &aTransportResult, 
 			QNetworkReply *aReply,
@@ -130,8 +132,10 @@
 	
 	/**
 	 * Method to cancel the service request
-	 * @param aPluginId The plugin whose current operation 
-	 * is to be cancelled
+	 * @param aPluginId The plugin whose current operation is 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 cancelRequest ( const QString& aPluginId );
 	
@@ -139,7 +143,8 @@
 	 * Method to get the list of the SmfProvider for all the plugins that implement 
 	 * the mentioned Interface 
 	 * @param aInterface The interface for which list of plugins is required 
-	 * @param aMap The map of pluginID and its corresponding SmfProvider
+	 * @param aMap The map of pluginID and its corresponding SmfProvider. The Map 
+	 * will be empty if no plugins for the given interface could be found.
 	 */
 	void getPlugins ( const QString& aInterface, 
 			QMap<QString,SmfProvider>& aMap );
@@ -148,7 +153,8 @@
 	 * Method to get the pluginID for the mentioned interface and service provider 
 	 * @param aInterface The interface implemented by the plugin
 	 * @param aProv The plugin's service provider
-	 * @param aPluginId The required pluginID
+	 * @param aPluginId The required pluginID. This argument will be empty if no plugin
+	 * for the given interface and service provider could be found.
 	 */
 	void getPluginId ( const QString& aInterface, 
 			const SmfProvider& aProv, QString& aPluginId );
@@ -164,9 +170,10 @@
 	 * Method called to initialize the database holding the plugin 
 	 * directory sructure information. This is called only once when 
 	 * the Plugin Manager is instantiated.
-	 * This method creates and updates iPluginIdPathHash member 
+	 * This method creates and updates m_pluginIdPathHash member 
 	 * of this class
-	 * @return Retuns true if success else false
+	 * @return Returns true the database is successfully created and updated, 
+	 * else returns false
 	 */
 	bool initializeSmfPluginDataBase ( );
 	
@@ -174,27 +181,31 @@
 	 * Method to load a plugin using its Plugin Id.
 	 * @param aPluginId The unique ID of the plugin 
 	 * @param aLoadResult [out] Output paramater indicating the result 
-	 * of the loading
+	 * of the loading. It can be:-
+	 * SmfPluginNoError (if plugin was loaded successfully) or 
+	 * SmfPluginNotLoaded (if plugin could not be loaded) or 
+	 * SmfPluginNotFound (if plugin with the given id could not be found)
 	 * @return The instance of the loaded plugin if loaded, else NULL
 	 */
 	QObject* load ( const QString &aPluginId, 
-			SmfPluginManagerResult &aLoadResult);
+			SmfError &aLoadResult);
 	
 	/**
 	 * Method to unload a loaded plugin. Returns true if success, else 
 	 * returns false.
 	 * @param aPlugin The plugin instance to be unloaded
-	 * @return Returns true if success, else returns false
+	 * @return Returns true if the mentioned plugin could be unloaded. Returns 
+	 * false, if the plugin instance is NULL, or if it could not be unloaded.
 	 */
 	bool unload ( SmfPluginBase *aPlugin ); 
 	
 	/**
-	 * Method to unload the list of loaded plugins. Returns true if all are 
-	 * success, else returns false if any one fails.
+	 * Method to unload the list of loaded plugins. Returns true if all unload 
+	 * are success, else returns false if any one fails.
 	 * @param aPluginList The list of instances for all plugins that are 
-	 * to be unloaded
+	 * to be unloaded. This method does nothing and returns false if the list is empty.
 	 * @return Returns true if all are success, else returns false if any 
-	 * one fails.
+	 * one fails. Also returns false if the input list is empty.
 	 */
 	bool unload ( const QList<SmfPluginBase*> &aPluginList);
 	
@@ -203,12 +214,17 @@
 	 * send the request created by the plugins over the network
 	 * @param aReqData The request data created by the plugin
 	 * @param aResult [out] The output parameter indicating the result 
-	 * of this method
+	 * of this method. This can be :-
+	 * SmfPluginNoError (if the request is sent successfully) or 
+	 * SmfPluginSOPCheckFailed (if plugins request doesnot comply to 
+	 * the Same Origin Policy) or 
+	 * SmfPluginRequestSendingFailed (if request could not be sent) or 
+	 * SmfPluginUnknownHttpService (if the plugin requested any unknown http 
+	 * method other than get, post, put, head or delete)  
 	 * @param aUrlList The list of accessible Urls for this plugin
-	 * @see smfglobal.h
 	 */
 	void sendRequest ( SmfPluginRequestData &aReqData, 
-			SmfPluginManagerResult &aResult,
+			SmfError &aResult,
 			const QList<QUrl> &aUrlList );
 	
 	/**
@@ -218,8 +234,10 @@
 	 * the valid url list if available for this plugin.
 	 * @param aRegToken The registration token given by the plugin
 	 * @param aUrlList [out] The list of Urls that the plugin can send 
-	 * request to (to be filled by CSM)
+	 * request to (to be filled by CSM). This list will be empty if 
+	 * aRegToken is empty
 	 * @return Returns true if plugin is authorised, else returns false.
+	 * Also returns false if aRegToken is empty.
 	 */
 	bool authorisePlugin( const QString &aRegToken, 
 			QList<QUrl> &aUrlList );
@@ -228,8 +246,8 @@
 	 * Method to serialize the result of parsing (which is done by the 
 	 * plugins) to QByteArray to be sent to Smf server.
 	 * @param aOperation The type of operation to be performed
-	 * @param aResult The data to be serialized
-	 * @param aDataStream Stream to be written
+	 * @param aResult The data to be serialized (should not be NULL)
+	 * @param aDataStream Stream to be written to
 	 */
 	void serializeResult ( const SmfRequestTypeID &aOperation, 
 			QVariant* aResult,
--- a/smf/smfservermodule/smfserver/pluginmgr/smfpluginmanagerutil.cpp	Mon Jun 07 11:43:45 2010 +0100
+++ b/smf/smfservermodule/smfserver/pluginmgr/smfpluginmanagerutil.cpp	Wed Jun 23 19:51:49 2010 +0530
@@ -19,6 +19,7 @@
  */
 
 // plugin interfaces
+#include <smfactivityfetcherplugin.h>
 #include <smfcontactfetcherplugin.h>
 #include <smfpostproviderplugin.h>
 #include <smflyricsserviceplugin.h>
@@ -53,8 +54,9 @@
  * Constructor with default argument
  * @param aParent The parent object
  */
-SmfPluginManagerUtil::SmfPluginManagerUtil ( QObject */*aParent*/ )
+SmfPluginManagerUtil::SmfPluginManagerUtil ( QObject *aParent )
 	{
+	Q_UNUSED(aParent)
 	}
 
 
@@ -76,30 +78,43 @@
  * @param aOperation The type of operation to be performed
  * @param aInputData The data required to create the web query
  * @param aReqData [out] The request data created by the plugin
- * @param aResult [out] SmfPluginManagerResult, The result of the operation
- * @see smfglobal.h
+ * @param aResult [out] SmfError, The result of the operation
+ * It can be :-
+ * SmfPluginNoError (if plugin has created the request successfully)
+ * SmfPluginUnknownPluginService (if plugin service is not known or unsupported)
+ * SmfPluginRequestCreationFailed (if request creation has failed)
  */
 void SmfPluginManagerUtil::createRequest ( QObject* aInstance, 
 		const SmfRequestTypeID &aOperation, 
 		QByteArray &aInputData,
 		SmfPluginRequestData &aReqData,
-		SmfPluginManagerResult &aResult )
+		SmfError &aResult )
 	{
-	SmfPluginManager::getInstance()->server()->writeLog("SmfPluginManagerUtil::createRequest");
-	SmfPluginError pluginErrorVal = SmfPluginErrNone;
+	qDebug()<<"SmfPluginManagerUtil::createRequest()";
+	SmfPluginError pluginErrorVal = SmfPluginErrServiceNotSupported;
 	
 	// Find the type of service required
 	switch(aOperation)
 		{
+		case SmfActivitySelfActivity:
+		case SmfActivityFriendsActivities:
+		case SmfActivityFiltered:
+		case SmfActivityCustomRequest:
+			// Authorise the plugin and call create request methods
+			pluginErrorVal = createActivityFetcherRequest(aInstance, aOperation, 
+					aInputData, aReqData);
+			break;
+			
 		case SmfContactGetFriends:
 		case SmfContactGetFollowers:
 		case SmfContactSearch:
 		case SmfContactSearchNear:
 		case SmfContactGetGroups:
 		case SmfContactSearchInGroup:
+		case SmfContactCustomRequest:
 			// Authorise the plugin and call create request methods
 			pluginErrorVal = createContactFetcherRequest(aInstance, aOperation, 
-					aInputData, aReqData, aResult);
+					aInputData, aReqData);
 			break;
 			
 		case SmfContactRetrievePosts:
@@ -109,25 +124,28 @@
 		case SmfContactCommentOnAPost:
 		case SmfContactPostAppearence:
 		case SmfContactSharePost:
+		case SmfContactPostCustomRequest:
 			// Authorise the plugin and call create request methods
 			pluginErrorVal = createContactPostRequest(aInstance, aOperation, 
-					aInputData, aReqData, aResult);
+					aInputData, aReqData);
 			break;
 			
 		case SmfMusicGetLyrics:
 		case SmfMusicGetSubtitle:
+		case SmfMusicLyricsCustomRequest:
 			// Authorise the plugin and call create request methods
 			pluginErrorVal = createMusicLyricsRequest(aInstance, aOperation, 
-					aInputData, aReqData, aResult);
+					aInputData, aReqData);
 			break;
 	
 		case SmfMusicGetEventsOnLoc:
 		case SmfMusicGetVenueOnLoc:
 		case SmfMusicGetEventsOnVenue:
 		case SmfMusicPostEvents:
+		case SmfMusicEventsCustomRequest:
 			// Authorise the plugin and call create request methods
 			pluginErrorVal = createMusicEventsRequest(aInstance, aOperation, 
-					aInputData, aReqData, aResult);
+					aInputData, aReqData);
 			break;
 			
 		case SmfMusicGetRecommendations:
@@ -135,25 +153,28 @@
 		case SmfMusicGetTrackInfo:
 		case SmfMusicGetStores:
 		case SmfMusicPostCurrentPlaying:
+		case SmfMusicSearchCustomRequest:
 			// Authorise the plugin and call create request methods
 			pluginErrorVal = createMusicSearchRequest(aInstance, aOperation, 
-					aInputData, aReqData, aResult);
+					aInputData, aReqData);
 			break;
 			
 		case SmfMusicGetUserInfo:
 		case SmfMusicSearchUser:
+		case SmfMusicServiceCustomRequest:
 			// Authorise the plugin and call create request methods
 			pluginErrorVal = createMusicServiceRequest(aInstance, aOperation, 
-					aInputData, aReqData, aResult);
+					aInputData, aReqData);
 			break;
 			
 		case SmfMusicGetPlaylists:
 		case SmfMusicGetPlaylistsOfUser:
 		case SmfMusicAddToPlaylist:
 		case SmfMusicPostCurrentPlayingPlaylist:
+		case SmfMusicPlaylistCustomRequest:
 			// Authorise the plugin and call create request methods
 			pluginErrorVal = createMusicPlaylistRequest(aInstance, aOperation, 
-					aInputData, aReqData, aResult);
+					aInputData, aReqData);
 			break;
 			
 		case SmfPictureGetPictures:
@@ -161,19 +182,110 @@
 		case SmfPictureUpload:
 		case SmfPictureMultiUpload:
 		case SmfPicturePostComment:
+		case SmfPictureCustomRequest:
 			// Authorise the plugin and call create request methods
 			pluginErrorVal = createGalleryRequest(aInstance, aOperation, 
-					aInputData, aReqData, aResult);
+					aInputData, aReqData);
 			break;
 			
 		default:
-			SmfPluginManager::getInstance()->server()->writeLog("Unknown service type!!!");
-			aResult = SmfPluginUnknownService;
+			qDebug()<<"Unknown service type!!!";
+			aResult = SmfPMPluginUnknownPluginService;
 		}
-	if(SmfPluginErrNone == pluginErrorVal)
-		aResult = SmfPluginRequestCreated;
+	qDebug()<<"return value = "<<pluginErrorVal;
+	
+	// Convert the SmfPluginError error type to SmfError type
+	convertPluginErrorType(pluginErrorVal, aResult);
+	}
+
+
+/**
+ * Method to create a web query to fetch activities
+ * @param aPlugin The instance of the loaded plugin that performs the 
+ * contact fetch operation.
+ * @param aOperation The type of operation to be performed
+ * @param aInputData The data required to create the web query
+ * @param aReqData [out] The request data created by the plugin
+ * @return SmfPluginError
+ */
+SmfPluginError SmfPluginManagerUtil::createActivityFetcherRequest ( QObject *aPlugin, 
+		const SmfRequestTypeID &aOperation, 
+		QByteArray &aInputData,
+		SmfPluginRequestData &aReqData )
+	{
+	qDebug()<<"SmfPluginManagerUtil::createActivityFetcherRequest()";
+	
+	// typecast instance to the activity - fetcher type, here SmfActivityFetcherPlugin
+	SmfActivityFetcherPlugin *plugin = qobject_cast<SmfActivityFetcherPlugin *>(aPlugin);
+	SmfPluginError pluginErrorVal = SmfPluginErrServiceNotSupported;
+	
+	if(plugin)
+		{
+		QDataStream stream(aInputData);
+		int pageNum, itemPerPage;
+
+		switch(aOperation)
+			{
+			case SmfActivitySelfActivity:
+				qDebug()<<"Plugin Operation requested : selfactivities()";
+				stream>>pageNum;
+				stream>>itemPerPage;
+				pluginErrorVal = plugin->selfActivities(aReqData, pageNum, itemPerPage);
+				break;
+				
+			case SmfActivityFriendsActivities:
+				{
+				qDebug()<<"Plugin Operation requested : friendsActivities()";
+				SmfContact contact;
+				stream>>contact;
+				stream>>pageNum;
+				stream>>itemPerPage;
+				pluginErrorVal = plugin->friendsActivities(aReqData, contact, pageNum, itemPerPage);
+				break;
+				}
+				
+			case SmfActivityFiltered:
+				{
+				qDebug()<<"Plugin Operation requested : filtered()";
+				QList<SmfActivityObjectType> list;
+				QList<int> intList;
+				stream>>intList;
+				list.clear();
+				foreach(int val, intList)
+					{
+					SmfActivityObjectType type = (SmfActivityObjectType)val;
+					list.append(type);
+					}
+				
+				stream>>pageNum;
+				stream>>itemPerPage;
+				pluginErrorVal = plugin->filtered(aReqData, list, pageNum, itemPerPage);
+				break;
+				}
+				
+			case SmfActivityCustomRequest:
+				{
+				qDebug()<<"Plugin Operation requested : customRequest()";
+				int operationType;
+				stream>>operationType;
+				QByteArray data;
+				stream>>data;
+				pluginErrorVal = plugin->customRequest(aReqData, operationType, &data);
+				break;
+				}
+				
+			default:
+				// do nothing, unknown service
+				qDebug()<<"No API found for this operation type!!!";
+			}
+		}
 	else
-		aResult = SmfPluginRequestCreationFailed;
+		{
+		qDebug()<<"Plugin instance couldn't be typecasted!!!";
+		pluginErrorVal = SmfPluginErrRequestNotCreated; 
+		}
+	
+	return pluginErrorVal;
 	}
 
 
@@ -184,21 +296,22 @@
  * @param aOperation The type of operation to be performed
  * @param aInputData The data required to create the web query
  * @param aReqData [out] The request data created by the plugin
- * @param aResult [out] SmfPluginManagerResult, The result of the operation
- * @return SmfPluginError
- * @see smfglobal.h
+ * @return SmfPluginError, it can be :-
+ * SmfPluginErrNone (if request is created successfully) or
+ * SmfPluginErrServiceNotSupported (if the service requested is not known or unsupported) or
+ * SmfPluginErrInvalidArguments (if the arguments are invalid) or 
+ * SmfPluginErrRequestNotCreated (if request could not be created) 
  */
 SmfPluginError SmfPluginManagerUtil::createContactFetcherRequest ( QObject *aPlugin, 
 		const SmfRequestTypeID &aOperation, 
 		QByteArray &aInputData,
-		SmfPluginRequestData &aReqData,
-		SmfPluginManagerResult &aResult )
+		SmfPluginRequestData &aReqData )
 	{
-	SmfPluginManager::getInstance()->server()->writeLog("SmfPluginManagerUtil::createContactFetcherRequest");
+	qDebug()<<"SmfPluginManagerUtil::createContactFetcherRequest()";
 	
 	// typecast instance to the contact - fetcher type, here SmfContactFetcherPlugin
 	SmfContactFetcherPlugin *plugin = qobject_cast<SmfContactFetcherPlugin *>(aPlugin);
-	SmfPluginError pluginErrorVal = SmfPluginErrNone;
+	SmfPluginError pluginErrorVal = SmfPluginErrServiceNotSupported;
 	
 	if(plugin)
 		{
@@ -208,12 +321,14 @@
 		switch(aOperation)
 			{
 			case SmfContactGetFriends:
+				qDebug()<<"Plugin Operation requested : friends()";
 				stream>>pageNum;
 				stream>>itemPerPage;
 				pluginErrorVal = plugin->friends(aReqData, pageNum, itemPerPage);
 				break;
 				
 			case SmfContactGetFollowers:
+				qDebug()<<"Plugin Operation requested : followers()";
 				stream>>pageNum;
 				stream>>itemPerPage;
 				pluginErrorVal = plugin->followers(aReqData, pageNum, itemPerPage);
@@ -221,6 +336,7 @@
 				
 			case SmfContactSearch:
 				{
+				qDebug()<<"Plugin Operation requested : search()";
 				SmfContact searchContact;
 				stream>>searchContact;
 				stream>>pageNum;
@@ -231,6 +347,7 @@
 				
 			case SmfContactSearchNear:
 				{
+				qDebug()<<"Plugin Operation requested : searchNear()";
 				SmfLocation location;
 				int i;
 				stream>>i;
@@ -242,13 +359,17 @@
 				}
 				
 			case SmfContactGetGroups:
+				{
+				qDebug()<<"Plugin Operation requested : groups()";
 				stream>>pageNum;
 				stream>>itemPerPage;
 				pluginErrorVal = plugin->groups(aReqData, pageNum, itemPerPage);
 				break;
+				}
 				
 			case SmfContactSearchInGroup:
 				{
+				qDebug()<<"Plugin Operation requested : searchInGroup()";
 				SmfGroup group;
 				stream>>group;
 				stream>>pageNum;
@@ -257,20 +378,27 @@
 				break;
 				}
 				
+			case SmfContactCustomRequest:
+				{
+				qDebug()<<"Plugin Operation requested : customRequest()";
+				int operationType;
+				stream>>operationType;
+				QByteArray data;
+				stream>>data;
+				pluginErrorVal = plugin->customRequest(aReqData, operationType, &data);
+				break;
+				}
+				
 			default:
 				// do nothing, unknown service
-				aResult = SmfPluginUnknownService;
-				SmfPluginManager::getInstance()->server()->writeLog("No API found for this operation type!!!");
-				return SmfPluginErrInvalidRequest;
+				qDebug()<<"No API found for this operation type!!!";
 			}
-
-			if(SmfPluginErrNone == pluginErrorVal)
-				aResult = SmfPluginRequestCreated;
-			else
-				aResult = SmfPluginServiceError;
 		}
-		else
-			aResult = SmfPluginLoadError;
+	else
+		{
+		qDebug()<<"Plugin instance couldn't be typecasted!!!";
+		pluginErrorVal = SmfPluginErrRequestNotCreated; 
+		}
 	
 	return pluginErrorVal;
 	}
@@ -284,21 +412,22 @@
  * @param aOperation The type of operation to be performed
  * @param aInputData The data required to create the web query
  * @param aReqData [out] The request data created by the plugin
- * @param aResult [out] SmfPluginManagerResult, The result of the operation
- * @return SmfPluginError
- * @see smfglobal.h
+ * @return SmfPluginError, it can be :-
+ * SmfPluginErrNone (if request is created successfully) or
+ * SmfPluginErrServiceNotSupported (if the service requested is not known or unsupported) or
+ * SmfPluginErrInvalidArguments (if the arguments are invalid) or 
+ * SmfPluginErrRequestNotCreated (if request could not be created) 
  */
 SmfPluginError SmfPluginManagerUtil::createContactPostRequest ( QObject *aPlugin, 
 		const SmfRequestTypeID &aOperation, 
 		QByteArray &aInputData,
-		SmfPluginRequestData &aReqData,
-		SmfPluginManagerResult &aResult )
+		SmfPluginRequestData &aReqData )
 	{
-	SmfPluginManager::getInstance()->server()->writeLog("SmfPluginManagerUtil::createContactPostRequest");
+	qDebug()<<"SmfPluginManagerUtil::createContactPostRequest";
 	
 	// typecast instance to SmfPostProviderPlugin
 	SmfPostProviderPlugin *plugin = qobject_cast<SmfPostProviderPlugin *>(aPlugin);
-	SmfPluginError pluginErrorVal = SmfPluginErrNone;	
+	SmfPluginError pluginErrorVal = SmfPluginErrServiceNotSupported;	
 	
 	if(plugin)
 		{
@@ -311,6 +440,7 @@
 		switch(aOperation)
 			{
 			case SmfContactRetrievePosts:
+				qDebug()<<"Plugin Operation requested : retrieve()";
 				stream>>contact;
 				stream>>pageNum;
 				stream>>itemPerPage;
@@ -318,25 +448,31 @@
 				break;
 				
 			case SmfContactPost:
+				qDebug()<<"Plugin Operation requested : post()";
 				stream>>post;
 				stream>>location;
 				pluginErrorVal = plugin->post(aReqData, post, location);
 				break;
 				
 			case SmfContactUpdatePost:
+				qDebug()<<"Plugin Operation requested : updatePost()";
 				stream>>post;
 				pluginErrorVal = plugin->updatePost(aReqData, post);
 				break;
 				
 			case SmfContactPostDirected:
+				qDebug()<<"Plugin Operation requested : postDirected()";
 				stream>>post;
 				stream>>contact;
 				stream>>location;
+				qDebug()<<"Post data = "<<post.description();
+				qDebug()<<"Contact ID = "<<contact.value("Guid").value<QContactGuid>().guid();
 				pluginErrorVal = plugin->postDirected(aReqData, post, contact, &location);
 				break;
 				
 			case SmfContactCommentOnAPost:
 				{
+				qDebug()<<"Plugin Operation requested : commentOnAPost()";
 				SmfPost post2;
 				stream>>post;
 				stream>>post2;
@@ -347,6 +483,7 @@
 				
 			case SmfContactPostAppearence:
 				{
+				qDebug()<<"Plugin Operation requested : postAppearence()";
 				QString status;
 				int i;
 				stream>>i;
@@ -358,6 +495,7 @@
 				
 			case SmfContactSharePost:
 				{
+				qDebug()<<"Plugin Operation requested : sharePost()";
 				bool edited;
 				stream>>post;
 				stream>>contact;
@@ -366,20 +504,27 @@
 				break;
 				}
 				
+			case SmfContactPostCustomRequest:
+				{
+				qDebug()<<"Plugin Operation requested : customRequest()";
+				int operationType;
+				stream>>operationType;
+				QByteArray data;
+				stream>>data;
+				pluginErrorVal = plugin->customRequest(aReqData, operationType, &data);
+				break;
+				}
+				
 			default:
 				// do nothing, unknown service
-				aResult = SmfPluginUnknownService;
-				SmfPluginManager::getInstance()->server()->writeLog("No API found for this operation type!!!");
-				return SmfPluginErrInvalidRequest;
+				qDebug()<<"No API found for this operation type!!!";
 			}
-	
-			if(SmfPluginErrNone == pluginErrorVal)
-				aResult = SmfPluginRequestCreated;
-			else
-				aResult = SmfPluginServiceError;
 		}
-		else
-			aResult = SmfPluginLoadError;
+	else
+		{
+		qDebug()<<"Plugin instance couldn't be typecasted!!!";
+		pluginErrorVal = SmfPluginErrRequestNotCreated; 
+		}
 	
 	return pluginErrorVal;
 	}
@@ -393,21 +538,22 @@
  * @param aOperation The type of operation to be performed
  * @param aInputData The data required to create the web query
  * @param aReqData [out] The request data created by the plugin
- * @param aResult [out] SmfPluginManagerResult, The result of the operation
- * @return SmfPluginError
- * @see smfglobal.h
+ * @return SmfPluginError, it can be :-
+ * SmfPluginErrNone (if request is created successfully) or
+ * SmfPluginErrServiceNotSupported (if the service requested is not known or unsupported) or
+ * SmfPluginErrInvalidArguments (if the arguments are invalid) or 
+ * SmfPluginErrRequestNotCreated (if request could not be created) 
  */
 SmfPluginError SmfPluginManagerUtil::createMusicLyricsRequest ( QObject *aPlugin, 
 		const SmfRequestTypeID &aOperation, 
 		QByteArray &aInputData,
-		SmfPluginRequestData &aReqData,
-		SmfPluginManagerResult &aResult )
+		SmfPluginRequestData &aReqData )
 	{
-	SmfPluginManager::getInstance()->server()->writeLog("SmfPluginManagerUtil::createMusicLyricsRequest");
+	qDebug()<<"SmfPluginManagerUtil::createMusicLyricsRequest";
 	
 	// typecast instance to SmfLyricsServicePlugin
 	SmfLyricsServicePlugin *plugin = qobject_cast<SmfLyricsServicePlugin *>(aPlugin);
-	SmfPluginError pluginErrorVal = SmfPluginErrNone;
+	SmfPluginError pluginErrorVal = SmfPluginErrServiceNotSupported;
 	
 	if(plugin)
 		{
@@ -418,6 +564,7 @@
 		switch(aOperation)
 			{
 			case SmfMusicGetLyrics:
+				qDebug()<<"Plugin Operation requested : lyrics()";
 				stream>>trackInfo;
 				stream>>pageNum;
 				stream>>itemPerPage;
@@ -426,6 +573,7 @@
 				
 			case SmfMusicGetSubtitle:
 				{
+				qDebug()<<"Plugin Operation requested : subtitles()";
 				stream>>trackInfo;
 				int i;
 				stream>>i;
@@ -436,20 +584,27 @@
 				break;
 				}
 				
+			case SmfMusicLyricsCustomRequest:
+				{
+				qDebug()<<"Plugin Operation requested : customRequest()";
+				int operationType;
+				stream>>operationType;
+				QByteArray data;
+				stream>>data;
+				pluginErrorVal = plugin->customRequest(aReqData, operationType, &data);
+				break;
+				}
+				
 			default:
 				// do nothing, unknown service
-				aResult = SmfPluginUnknownService;
-				SmfPluginManager::getInstance()->server()->writeLog("No API found for this operation type!!!");
-				return SmfPluginErrInvalidRequest;
+				qDebug()<<"No API found for this operation type!!!";
 			}
-
-			if(SmfPluginErrNone == pluginErrorVal)
-				aResult = SmfPluginRequestCreated;
-			else
-				aResult = SmfPluginServiceError;
 		}
-		else
-			aResult = SmfPluginLoadError;
+	else
+		{
+		qDebug()<<"Plugin instance couldn't be typecasted!!!";
+		pluginErrorVal = SmfPluginErrRequestNotCreated; 
+		}
 	
 	return pluginErrorVal;
 	}
@@ -462,21 +617,22 @@
  * @param aOperation The type of operation to be performed
  * @param aInputData The data required to create the web query
  * @param aReqData [out] The request data created by the plugin
- * @param aResult [out] SmfPluginManagerResult, The result of the operation
- * @return SmfPluginError
- * @see smfglobal.h
+ * @return SmfPluginError, it can be :-
+ * SmfPluginErrNone (if request is created successfully) or
+ * SmfPluginErrServiceNotSupported (if the service requested is not known or unsupported) or
+ * SmfPluginErrInvalidArguments (if the arguments are invalid) or 
+ * SmfPluginErrRequestNotCreated (if request could not be created) 
  */
 SmfPluginError SmfPluginManagerUtil::createMusicEventsRequest ( QObject *aPlugin, 
 		const SmfRequestTypeID &aOperation, 
 		QByteArray &aInputData,
-		SmfPluginRequestData &aReqData,
-		SmfPluginManagerResult &aResult )
+		SmfPluginRequestData &aReqData )
 	{
-	SmfPluginManager::getInstance()->server()->writeLog("SmfPluginManagerUtil::createMusicEventsRequest");
+	qDebug()<<"SmfPluginManagerUtil::createMusicEventsRequest";
 	
 	// typecast instance to SmfMusicEventsPlugin
 	SmfMusicEventsPlugin *plugin = qobject_cast<SmfMusicEventsPlugin *>(aPlugin);
-	SmfPluginError pluginErrorVal = SmfPluginErrNone;
+	SmfPluginError pluginErrorVal = SmfPluginErrServiceNotSupported;
 	
 	if(plugin)
 		{
@@ -487,6 +643,7 @@
 		switch(aOperation)
 			{
 			case SmfMusicGetEventsOnLoc:
+				qDebug()<<"Plugin Operation requested : events() OnLoc";
 				stream>>location;
 				stream>>pageNum;
 				stream>>itemPerPage;
@@ -494,6 +651,7 @@
 				break;
 				
 			case SmfMusicGetVenueOnLoc:
+				qDebug()<<"Plugin Operation requested : venues()";
 				stream>>location;
 				stream>>pageNum;
 				stream>>itemPerPage;
@@ -502,6 +660,7 @@
 				
 			case SmfMusicGetEventsOnVenue:
 				{
+				qDebug()<<"Plugin Operation requested : events() OnVenue";
 				SmfLocation venue;
 				stream>>venue;
 				stream>>pageNum;
@@ -512,26 +671,34 @@
 				
 			case SmfMusicPostEvents:
 				{
+				qDebug()<<"Plugin Operation requested : postEvents()";
 				QList<SmfEvent> list;
 				stream>>list;
 				pluginErrorVal = plugin->postEvents(aReqData, list);
 				break;
 				}
 				
+			case SmfMusicEventsCustomRequest:
+				{
+				qDebug()<<"Plugin Operation requested : customRequest()";
+				int operationType;
+				stream>>operationType;
+				QByteArray data;
+				stream>>data;
+				pluginErrorVal = plugin->customRequest(aReqData, operationType, &data);
+				break;
+				}
+				
 			default:
 				// do nothing, unknown service
-				aResult = SmfPluginUnknownService;
-				SmfPluginManager::getInstance()->server()->writeLog("No API found for this operation type!!!");
-				return SmfPluginErrInvalidRequest;
+				qDebug()<<"No API found for this operation type!!!";
 			}
-
-			if(SmfPluginErrNone == pluginErrorVal)
-				aResult = SmfPluginRequestCreated;
-			else
-				aResult = SmfPluginServiceError;
 		}
-		else
-			aResult = SmfPluginLoadError;
+	else
+		{
+		qDebug()<<"Plugin instance couldn't be typecasted!!!";
+		pluginErrorVal = SmfPluginErrRequestNotCreated; 
+		}
 	
 	return pluginErrorVal;
 	}
@@ -545,21 +712,22 @@
  * @param aOperation The type of operation to be performed
  * @param aInputData The data required to create the web query
  * @param aReqData [out] The request data created by the plugin
- * @param aResult [out] SmfPluginManagerResult, The result of the operation
- * @return SmfPluginError
- * @see smfglobal.h
+ * @return SmfPluginError, it can be :-
+ * SmfPluginErrNone (if request is created successfully) or
+ * SmfPluginErrServiceNotSupported (if the service requested is not known or unsupported) or
+ * SmfPluginErrInvalidArguments (if the arguments are invalid) or 
+ * SmfPluginErrRequestNotCreated (if request could not be created) 
  */
 SmfPluginError SmfPluginManagerUtil::createMusicSearchRequest ( QObject *aPlugin, 
 		const SmfRequestTypeID &aOperation, 
 		QByteArray &aInputData,
-		SmfPluginRequestData &aReqData,
-		SmfPluginManagerResult &aResult )
+		SmfPluginRequestData &aReqData )
 	{
-	SmfPluginManager::getInstance()->server()->writeLog("SmfPluginManagerUtil::createMusicSearchRequest");
+	qDebug()<<"SmfPluginManagerUtil::createMusicSearchRequest";
 	
 	// typecast instance to SmfMusicSearchPlugin
 	SmfMusicSearchPlugin *plugin = qobject_cast<SmfMusicSearchPlugin *>(aPlugin);
-	SmfPluginError pluginErrorVal = SmfPluginErrNone;
+	SmfPluginError pluginErrorVal = SmfPluginErrServiceNotSupported;
 	
 	if(plugin)
 		{
@@ -570,6 +738,7 @@
 		switch(aOperation)
 			{
 			case SmfMusicGetRecommendations:
+				qDebug()<<"Plugin Operation requested : recommendations()";
 				stream>>trackInfo;
 				stream>>pageNum;
 				stream>>itemPerPage;
@@ -577,6 +746,7 @@
 				break;
 				
 			case SmfMusicGetTracks:
+				qDebug()<<"Plugin Operation requested : tracks()";
 				stream>>trackInfo;
 				stream>>pageNum;
 				stream>>itemPerPage;
@@ -585,6 +755,7 @@
 				
 			case SmfMusicGetTrackInfo:
 				{
+				qDebug()<<"Plugin Operation requested : trackInfo()";
 				SmfMusicFingerPrint fp;
 				stream>>fp;
 				stream>>pageNum;
@@ -594,6 +765,7 @@
 				}
 				
 			case SmfMusicGetStores:
+				qDebug()<<"Plugin Operation requested : stores()";
 				stream>>trackInfo;
 				stream>>pageNum;
 				stream>>itemPerPage;
@@ -601,24 +773,52 @@
 				break;
 				
 			case SmfMusicPostCurrentPlaying:
+				qDebug()<<"Plugin Operation requested : postCurrentPlaying()";
 				stream>>trackInfo;
 				pluginErrorVal = plugin->postCurrentPlaying(aReqData, trackInfo);
 				break;
 				
+			case SmfMusicPostRating:
+				{
+				qDebug()<<"Plugin Operation requested : postRating()";
+				stream>>trackInfo;
+				SmfMusicRating rating;
+				stream>>rating;
+				pluginErrorVal = plugin->postRating(aReqData, trackInfo, rating);
+				break;
+				}
+				
+			case SmfMusicPostComment:
+				{
+				qDebug()<<"Plugin Operation requested : postComment()";
+				stream>>trackInfo;
+				SmfComment comment;
+				stream>>comment;
+				pluginErrorVal = plugin->postComments(aReqData, trackInfo, comment);
+				break;
+				}
+				
+			case SmfMusicSearchCustomRequest:
+				{
+				qDebug()<<"Plugin Operation requested : customRequest()";
+				int operationType;
+				stream>>operationType;
+				QByteArray data;
+				stream>>data;
+				pluginErrorVal = plugin->customRequest(aReqData, operationType, &data);
+				break;
+				}
+				
 			default:
 				// do nothing, unknown service
-				aResult = SmfPluginUnknownService;
-				SmfPluginManager::getInstance()->server()->writeLog("No API found for this operation type!!!");
-				return SmfPluginErrInvalidRequest;
+				qDebug()<<"No API found for this operation type!!!";
 			}
-
-			if(SmfPluginErrNone == pluginErrorVal)
-				aResult = SmfPluginRequestCreated;
-			else
-				aResult = SmfPluginServiceError;
 		}
-		else
-			aResult = SmfPluginLoadError;
+	else
+		{
+		qDebug()<<"Plugin instance couldn't be typecasted!!!";
+		pluginErrorVal = SmfPluginErrRequestNotCreated; 
+		}
 	
 	return pluginErrorVal;
 	}
@@ -632,21 +832,22 @@
  * @param aOperation The type of operation to be performed
  * @param aInputData The data required to create the web query
  * @param aReqData [out] The request data created by the plugin
- * @param aResult [out] SmfPluginManagerResult, The result of the operation
- * @return SmfPluginError
- * @see smfglobal.h
+ * @return SmfPluginError, it can be :-
+ * SmfPluginErrNone (if request is created successfully) or
+ * SmfPluginErrServiceNotSupported (if the service requested is not known or unsupported) or
+ * SmfPluginErrInvalidArguments (if the arguments are invalid) or 
+ * SmfPluginErrRequestNotCreated (if request could not be created) 
  */
 SmfPluginError SmfPluginManagerUtil::createMusicServiceRequest ( QObject *aPlugin, 
 		const SmfRequestTypeID &aOperation, 
 		QByteArray &aInputData,
-		SmfPluginRequestData &aReqData,
-		SmfPluginManagerResult &aResult )
+		SmfPluginRequestData &aReqData )
 	{
-	SmfPluginManager::getInstance()->server()->writeLog("SmfPluginManagerUtil::createMusicServiceRequest");
+	qDebug()<<"SmfPluginManagerUtil::createMusicServiceRequest";
 	
 	// typecast instance to SmfMusicServicePlugin
 	SmfMusicServicePlugin *plugin = qobject_cast<SmfMusicServicePlugin *>(aPlugin);
-	SmfPluginError pluginErrorVal = SmfPluginErrNone;
+	SmfPluginError pluginErrorVal = SmfPluginErrServiceNotSupported;
 	
 	if(plugin)
 		{
@@ -656,11 +857,13 @@
 		switch(aOperation)
 			{
 			case SmfMusicGetUserInfo:
+				qDebug()<<"Plugin Operation requested : userInfo()";
 				pluginErrorVal = plugin->userInfo(aReqData);
 				break;
 				
 			case SmfMusicSearchUser:
 				{
+				qDebug()<<"Plugin Operation requested : serachNear() for Music";
 				SmfLocation place;
 				stream>>place;
 				stream>>pageNum;
@@ -669,20 +872,27 @@
 				break;
 				}
 				
+			case SmfMusicServiceCustomRequest:
+				{
+				qDebug()<<"Plugin Operation requested : customRequest()";
+				int operationType;
+				stream>>operationType;
+				QByteArray data;
+				stream>>data;
+				pluginErrorVal = plugin->customRequest(aReqData, operationType, &data);
+				break;
+				}
+				
 			default:
 				// do nothing, unknown service
-				aResult = SmfPluginUnknownService;
-				SmfPluginManager::getInstance()->server()->writeLog("No API found for this operation type!!!");
-				return SmfPluginErrInvalidRequest;
+				qDebug()<<"No API found for this operation type!!!";
 			}
-
-			if(SmfPluginErrNone == pluginErrorVal)
-				aResult = SmfPluginRequestCreated;
-			else
-				aResult = SmfPluginServiceError;
 		}
-		else
-			aResult = SmfPluginLoadError;
+	else
+		{
+		qDebug()<<"Plugin instance couldn't be typecasted!!!";
+		pluginErrorVal = SmfPluginErrRequestNotCreated; 
+		}
 	
 	return pluginErrorVal;
 	}
@@ -696,21 +906,22 @@
  * @param aOperation The type of operation to be performed
  * @param aInputData The data required to create the web query
  * @param aReqData [out] The request data created by the plugin
- * @param aResult [out] SmfPluginManagerResult, The result of the operation
- * @return SmfPluginError
- * @see smfglobal.h
+ * @return SmfPluginError, it can be :-
+ * SmfPluginErrNone (if request is created successfully) or
+ * SmfPluginErrServiceNotSupported (if the service requested is not known or unsupported) or
+ * SmfPluginErrInvalidArguments (if the arguments are invalid) or 
+ * SmfPluginErrRequestNotCreated (if request could not be created) 
  */
 SmfPluginError SmfPluginManagerUtil::createMusicPlaylistRequest ( QObject *aPlugin, 
 		const SmfRequestTypeID &aOperation, 
 		QByteArray &aInputData,
-		SmfPluginRequestData &aReqData,
-		SmfPluginManagerResult &aResult )
+		SmfPluginRequestData &aReqData )
 	{
-	SmfPluginManager::getInstance()->server()->writeLog("SmfPluginManagerUtil::createMusicPlaylistRequest");
+	qDebug()<<"SmfPluginManagerUtil::createMusicPlaylistRequest";
 	
 	// typecast instance to SmfPlaylistServicePlugin
 	SmfPlaylistServicePlugin *plugin = qobject_cast<SmfPlaylistServicePlugin *>(aPlugin);
-	SmfPluginError pluginErrorVal = SmfPluginErrNone;
+	SmfPluginError pluginErrorVal = SmfPluginErrServiceNotSupported;
 	
 	if(plugin)
 		{
@@ -721,6 +932,7 @@
 		switch(aOperation)
 			{
 			case SmfMusicGetPlaylists:
+				qDebug()<<"Plugin Operation requested : playlists()";
 				stream>>pageNum;
 				stream>>itemPerPage;
 				pluginErrorVal = plugin->playlists(aReqData, pageNum, itemPerPage);
@@ -728,6 +940,7 @@
 				
 			case SmfMusicGetPlaylistsOfUser:
 				{
+				qDebug()<<"Plugin Operation requested : playlistsOf()";
 				SmfMusicProfile user;
 				stream>>user;
 				stream>>pageNum;
@@ -738,6 +951,7 @@
 				
 			case SmfMusicAddToPlaylist:
 				{
+				qDebug()<<"Plugin Operation requested : addToPlaylist()";
 				QList<SmfTrackInfo> list;
 				stream>>playlist;
 				stream>>list;
@@ -746,24 +960,32 @@
 				}
 				
 			case SmfMusicPostCurrentPlayingPlaylist:
+				qDebug()<<"Plugin Operation requested : postCurrentPlayingPlaylist()";
 				stream>>playlist;
 				pluginErrorVal = plugin->postCurrentPlayingPlaylist(aReqData, playlist);
 				break;
 				
+			case SmfMusicPlaylistCustomRequest:
+				{
+				qDebug()<<"Plugin Operation requested : customRequest()";
+				int operationType;
+				stream>>operationType;
+				QByteArray data;
+				stream>>data;
+				pluginErrorVal = plugin->customRequest(aReqData, operationType, &data);
+				break;
+				}
+				
 			default:
 				// do nothing, unknown service
-				aResult = SmfPluginUnknownService;
-				SmfPluginManager::getInstance()->server()->writeLog("No API found for this operation type!!!");
-				return SmfPluginErrInvalidRequest;
+				qDebug()<<"No API found for this operation type!!!";
 			}
-
-			if(SmfPluginErrNone == pluginErrorVal)
-				aResult = SmfPluginRequestCreated;
-			else
-				aResult = SmfPluginServiceError;
 		}
-		else
-			aResult = SmfPluginLoadError;
+	else
+		{
+		qDebug()<<"Plugin instance couldn't be typecasted!!!";
+		pluginErrorVal = SmfPluginErrRequestNotCreated; 
+		}
 	
 	return pluginErrorVal;
 	}
@@ -776,21 +998,22 @@
  * @param aOperation The type of operation to be performed
  * @param aInputData The data required to create the web query
  * @param aReqData [out] The request data created by the plugin
- * @param aResult [out] SmfPluginManagerResult, The result of the operation
- * @return SmfPluginError
- * @see smfglobal.h
+ * @return SmfPluginError, it can be :-
+ * SmfPluginErrNone (if request is created successfully) or
+ * SmfPluginErrServiceNotSupported (if the service requested is not known or unsupported) or
+ * SmfPluginErrInvalidArguments (if the arguments are invalid) or 
+ * SmfPluginErrRequestNotCreated (if request could not be created) 
  */
 SmfPluginError SmfPluginManagerUtil::createGalleryRequest ( QObject *aPlugin, 
 		const SmfRequestTypeID &aOperation, 
 		QByteArray &aInputData,
-		SmfPluginRequestData &aReqData,
-		SmfPluginManagerResult &aResult )
+		SmfPluginRequestData &aReqData )
 	{
-	SmfPluginManager::getInstance()->server()->writeLog("SmfPluginManagerUtil::createGalleryRequest");
+	qDebug()<<"SmfPluginManagerUtil::createGalleryRequest";
 	
 	// typecast instance to SmfGalleryPlugin
 	SmfGalleryPlugin *plugin = qobject_cast<SmfGalleryPlugin *>(aPlugin);
-	SmfPluginError pluginErrorVal = SmfPluginErrNone;
+	SmfPluginError pluginErrorVal = SmfPluginErrServiceNotSupported;
 	
 	if(plugin)
 		{
@@ -799,35 +1022,63 @@
 		
 		switch(aOperation)
 			{
+			
+			case SmfPictureGetAlbums:
+				{
+				qDebug()<<"Plugin Operation requested : albums()";
+				QStringList names;
+				SmfContact contact;
+				int pageNum, itemPerPage;
+				stream>>names;
+				stream>>contact;
+				stream>>pageNum;
+				stream>>itemPerPage;
+				pluginErrorVal = plugin->albums(aReqData, names, &contact, pageNum, itemPerPage);
+				break;
+				}
+			
 			case SmfPictureGetPictures:
 				{
+				qDebug()<<"Plugin Operation requested : pictures()";
 				int pageNum, itemPerPage;
+				SmfPictureAlbumList albumList;
+				stream>>albumList;
 				stream>>pageNum;
 				stream>>itemPerPage;
-				pluginErrorVal = plugin->pictures(aReqData, pageNum, itemPerPage);
+				pluginErrorVal = plugin->pictures(aReqData, albumList, pageNum, itemPerPage);
 				break;
 				}
 				
 			case SmfPictureDescription:
+				qDebug()<<"Plugin Operation requested : description()";
 				stream>>picture;
 				pluginErrorVal = plugin->description(aReqData, picture);
 				break;
 				
 			case SmfPictureUpload:
+				{
+				qDebug()<<"Plugin Operation requested : upload() single";
+				SmfPictureAlbum album;
 				stream>>picture;
-				pluginErrorVal = plugin->upload(aReqData, picture);
+				stream>>album;
+				pluginErrorVal = plugin->upload(aReqData, picture, &album);
 				break;
+				}
 				
 			case SmfPictureMultiUpload:
 				{
+				qDebug()<<"Plugin Operation requested : upload() Multiple";
 				QList<SmfPicture> list;
+				SmfPictureAlbum album;
 				stream>>list;
-				pluginErrorVal = plugin->upload(aReqData, list);
+				stream>>album;
+				pluginErrorVal = plugin->upload(aReqData, list, &album);
 				break;
 				}
 				
 			case SmfPicturePostComment:
 				{
+				qDebug()<<"Plugin Operation requested : postComment()";
 				SmfComment comment;
 				stream>>picture;
 				stream>>comment;
@@ -835,20 +1086,27 @@
 				break;
 				}
 				
+			case SmfPictureCustomRequest:
+				{
+				qDebug()<<"Plugin Operation requested : customRequest()";
+				int operationType;
+				stream>>operationType;
+				QByteArray data;
+				stream>>data;
+				pluginErrorVal = plugin->customRequest(aReqData, operationType, &data);
+				break;
+				}
+				
 			default:
 				// do nothing, unknown service
-				aResult = SmfPluginUnknownService;
-				SmfPluginManager::getInstance()->server()->writeLog("No API found for this operation type!!!");
-				return SmfPluginErrInvalidRequest;
+				qDebug()<<"No API found for this operation type!!!";
 			}
-
-			if(SmfPluginErrNone == pluginErrorVal)
-				aResult = SmfPluginRequestCreated;
-			else
-				aResult = SmfPluginServiceError;
 		}
-		else
-			aResult = SmfPluginLoadError;
+	else
+		{
+		qDebug()<<"Plugin instance couldn't be typecasted!!!";
+		pluginErrorVal = SmfPluginErrRequestNotCreated; 
+		}
 	
 	return pluginErrorVal;
 	}
@@ -865,10 +1123,9 @@
  * containing the data parsed by the plugins
  * @param aRetType [out] The Plugin return value
  * @param aPageResult [out] The page information filled by the plugins
- * @return SmfPluginManagerResult, The result of the operation
- * @see smfglobal.h
+ * @return SmfError, The result of the operation
  */	
-SmfPluginManagerResult SmfPluginManagerUtil::responseAvailable ( 
+SmfError SmfPluginManagerUtil::responseAvailable ( 
 		SmfPluginBase *aInstance,
 		const SmfRequestTypeID &aOperation,
 		const SmfTransportResult &aTransportResult, 
@@ -877,10 +1134,10 @@
 		SmfPluginRetType &aRetType,
 		SmfResultPage &aPageResult )
 	{
-	SmfPluginManager::getInstance()->server()->writeLog("SmfPluginManagerUtil::responseAvailable");
+	qDebug()<<"Inside SmfPluginManagerUtil::responseAvailable()";
 	
-	SmfPluginError pluginRet;
-	SmfPluginManagerResult result = SmfPluginUnknownError;
+	SmfPluginError pluginRet = SmfPluginErrServiceNotSupported;
+	SmfError result = SmfPMPluginUnknownPluginService;
 
 	switch(aOperation)
 		{
@@ -920,7 +1177,7 @@
 		case SmfPictureMultiUpload:
 		case SmfPicturePostComment:
 			{
-			pluginRet = aInstance->responseAvailable(aTransportResult, aResponse, 
+			pluginRet = aInstance->responseAvailable(aOperation, aTransportResult, aResponse, 
 					aResult, aRetType, aPageResult );
 			
 			// When plugin returns no error
@@ -928,24 +1185,36 @@
 				{
 				// Request is complete, parsed data available with aResult
 				if( SmfRequestComplete == aRetType )
-					result =  SmfPluginResponseParsed;
+					{
+					qDebug()<<"Parsing successful";
+					result =  SmfNoError;
+					}
 				
 				// Send the request again
 				else if(SmfSendRequestAgain == aRetType )
-					result = SmfPluginSendRequestAgain;
+					{
+					qDebug()<<"Send request again";
+					result = SmfPMPluginSendRequestAgain;
+					}
 				else
-					result = SmfPluginResponseParseFailure;
+					convertPluginErrorType(pluginRet, result);
 				}
-			// Parsing failed
+
+			// Plugin returns error
 			else
-				result =  SmfPluginResponseParseFailure;
+				{
+				qDebug()<<"Plugin returned error!!!";
+				convertPluginErrorType(pluginRet, result);
+				if(SmfPluginErrorNetworkError == result)
+					convertNetworkErrorType(aTransportResult, result);
+				}
 			
 			break;
 			}
 			
 		default:
 			// Unknown service, saved data in Plugin manager is corrupted
-			SmfPluginManager::getInstance()->server()->writeLog("No operation type found!!!");
+			qDebug()<<"No operation type found!!!";
 		}
 	
 	return result;
@@ -964,7 +1233,7 @@
 		QVariant* aResult,
 		QDataStream &aDataStream )
 	{
-	SmfPluginManager::getInstance()->server()->writeLog("SmfPluginManagerUtil::serializeResult");
+	qDebug()<<"SmfPluginManagerUtil::serializeResult";
 	switch(aOperation)
 		{
 		// FOR CONTACT - FETCHER
@@ -974,6 +1243,7 @@
 		case SmfContactSearchNear:
 		case SmfContactSearchInGroup:
 			{
+			qDebug()<<"Serializing to : QList<SmfContact>";
 			QList<SmfContact> contactList;
 			if( aResult->canConvert<SmfContactList>() )
 				contactList = aResult->value<SmfContactList>();
@@ -983,6 +1253,7 @@
 
 		case SmfContactGetGroups:
 			{
+			qDebug()<<"Serializing to : QList<SmfGroup>";
 			QList<SmfGroup> groupList;
 			if( aResult->canConvert<SmfGroupList>() )
 				groupList = aResult->value<SmfGroupList>();
@@ -994,7 +1265,8 @@
 		// FOR CONTACT - POSTS
 		case SmfContactRetrievePosts:
 			{
-			SmfPluginManager::getInstance()->server()->writeLog("Serialize - retrieveposts() result");
+			qDebug()<<"Serializing to : QList<SmfPost>";
+			qDebug()<<"Serialize - retrieveposts() result";
 			
 			QList<SmfPost> postList;
 			if( aResult->canConvert<SmfPostList>() )
@@ -1010,6 +1282,7 @@
 		case SmfContactPostAppearence:
 		case SmfContactSharePost:
 			{
+			qDebug()<<"Serializing to : bool";
 			bool value;
 			if( QVariant::Bool == aResult->type() )
 				value = aResult->toBool();
@@ -1020,6 +1293,7 @@
 		// FOR MUSIC - LYRICS SERVICE
 		case SmfMusicGetLyrics:
 			{
+			qDebug()<<"Serializing to : QList<SmfLyrics>";
 			QList<SmfLyrics> lyricsList;
 			if( aResult->canConvert<SmfLyricsList>() )
 				lyricsList = aResult->value<SmfLyricsList>();
@@ -1030,6 +1304,7 @@
 
 		case SmfMusicGetSubtitle:
 			{
+			qDebug()<<"Serializing to : QList<SmfSubtitle>";
 			QList<SmfSubtitle> subtitleList;
 			if( aResult->canConvert<SmfSubtitleList>() )
 				subtitleList = aResult->value<SmfSubtitleList>();
@@ -1042,6 +1317,7 @@
 		case SmfMusicGetEventsOnLoc:
 		case SmfMusicGetEventsOnVenue:
 			{
+			qDebug()<<"Serializing to : QList<SmfEvent>";
 			QList<SmfEvent> eventList;
 			if( aResult->canConvert<SmfEventList>() )
 				eventList = aResult->value<SmfEventList>();
@@ -1052,6 +1328,7 @@
 			
 		case SmfMusicGetVenueOnLoc:
 			{
+			qDebug()<<"Serializing to : QList<SmfLocation>";
 			QList<SmfLocation> venueList;
 			if( aResult->canConvert<SmfLocationList>() )
 				venueList = aResult->value<SmfLocationList>();
@@ -1061,6 +1338,7 @@
 		
 		case SmfMusicPostEvents:
 			{
+			qDebug()<<"Serializing to : bool";
 			bool value;
 			if( QVariant::Bool == aResult->type() )
 				value = aResult->toBool();
@@ -1073,6 +1351,7 @@
 		case SmfMusicGetTracks:
 		case SmfMusicGetTrackInfo:
 			{
+			qDebug()<<"Serializing to : QList<SmfTrackInfo>";
 			QList<SmfTrackInfo> trackList;
 			if( aResult->canConvert<SmfTrackInfoList>() )
 				trackList = aResult->value<SmfTrackInfoList>();
@@ -1083,6 +1362,7 @@
 			
 		case SmfMusicGetStores:
 			{
+			qDebug()<<"Serializing to : QList<SmfProvider>";
 			QList<SmfProvider> storeList;
 			if( aResult->canConvert<SmfProviderList>() )
 				storeList = aResult->value<SmfProviderList>();
@@ -1092,6 +1372,7 @@
 			
 		case SmfMusicPostCurrentPlaying:
 			{
+			qDebug()<<"Serializing to : bool";
 			bool value;
 			if( QVariant::Bool == aResult->type() )
 				value = aResult->toBool();
@@ -1103,6 +1384,7 @@
 		// FOR MUSIC - SERVICE
 		case SmfMusicGetUserInfo:
 			{
+			qDebug()<<"Serializing to : SmfMusicProfile";
 			SmfMusicProfile user;
 			if(aResult->canConvert<SmfMusicProfile>())
 				user = aResult->value<SmfMusicProfile>();
@@ -1112,6 +1394,7 @@
 			
 		case SmfMusicSearchUser:
 			{
+			qDebug()<<"Serializing to : QList<SmfMusicProfile>";
 			QList<SmfMusicProfile> userList;
 			if( aResult->canConvert<SmfMusicProfileList>() )
 				userList = aResult->value<SmfMusicProfileList>();
@@ -1123,6 +1406,7 @@
 		case SmfMusicGetPlaylists:
 		case SmfMusicGetPlaylistsOfUser:
 			{
+			qDebug()<<"Serializing to : QList<SmfPlaylist>";
 			QList<SmfPlaylist> playlists;
 			if( aResult->canConvert<SmfPlaylistList>() )
 				playlists = aResult->value<SmfPlaylistList>();
@@ -1133,6 +1417,7 @@
 		case SmfMusicAddToPlaylist:
 		case SmfMusicPostCurrentPlayingPlaylist:
 			{
+			qDebug()<<"Serializing to : bool";
 			bool value;
 			if( QVariant::Bool == aResult->type() )
 				value = aResult->toBool();
@@ -1143,6 +1428,7 @@
 			// FOR PICTURES - GALLERY SERVICES
 		case SmfPictureGetPictures:
 			{
+			qDebug()<<"Serializing to : QList<SmfPicture>";
 			QList<SmfPicture> picList;
 			if( aResult->canConvert<SmfPictureList>() )
 				picList = aResult->value<SmfPictureList>();
@@ -1152,6 +1438,7 @@
 			
 		case SmfPictureDescription:
 			{
+			qDebug()<<"Serializing to : QString";
 			QString str;
 			if( QVariant::String == aResult->type() )
 				str = aResult->toString();
@@ -1163,6 +1450,7 @@
 		case SmfPictureMultiUpload:
 		case SmfPicturePostComment:
 			{
+			qDebug()<<"Serializing to : bool";
 			bool value;
 			if( QVariant::Bool == aResult->type() )
 				value = aResult->toBool();
@@ -1172,7 +1460,222 @@
 			
 		default:
 			// Unknown service, saved data in Plugin manager is corrupted
-			SmfPluginManager::getInstance()->server()->writeLog("No operation type found!!!");
+			qDebug()<<"No operation type found!!!";
+		}
+	}
+
+
+/**
+ * Method to convert SmfPluginError Error to the type SmfError 
+ * @param aPluginError The Error code returned by the plugin
+ * @param aSMFError [out] The Smf specific common error code
+ */
+void SmfPluginManagerUtil::convertPluginErrorType( 
+		const SmfPluginError &aPluginError,  
+		SmfError &aSMFError )
+	{
+	qDebug()<<"Converting Plugin error code to SmfError";
+	switch(aPluginError)
+		{
+		case SmfPluginErrNone:
+			aSMFError = SmfNoError;
+			break;
+			
+		case SmfPluginErrTooManyRequest:
+			aSMFError = SmfPluginErrorTooManyRequest;
+			break;
+			
+		case SmfPluginErrRequestQuotaExceeded:
+			aSMFError = SmfPluginErrorRequestQuotaExceeded;
+			break;
+			
+		case SmfPluginErrInvalidRequest:
+			aSMFError = SmfPluginErrorInvalidRequest;
+			break;
+			
+		case SmfPluginErrUserNotLoggedIn:
+			aSMFError = SmfPluginErrorUserNotLoggedIn;
+			break;
+			
+		case SmfPluginErrAuthenticationExpired:
+			aSMFError = SmfPluginErrorAuthenticationExpired;
+			break;
+			
+		case SmfPluginErrPermissionDenied:
+			aSMFError = SmfPluginErrorPermissionDenied;
+			break;
+			
+		case SmfPluginErrInvalidApplication:
+			aSMFError = SmfPluginErrorInvalidApplication;
+			break;
+			
+		case SmfPluginErrServiceUnavailable:
+			aSMFError = SmfPluginErrorServiceUnavailable;
+			break;
+			
+		case SmfPluginErrServiceTemporaryUnavailable:
+			aSMFError = SmfPluginErrorServiceTemporaryUnavailable;
+			break;
+			
+		case SmfPluginErrFormatNotSupported:
+			aSMFError = SmfPluginErrorFormatNotSupported;
+			break;
+			
+		case SmfPluginErrDataSizeExceeded:
+			aSMFError = SmfPluginErrorDataSizeExceeded;
+			break;
+			
+		case SmfPluginErrServiceNotSupported:
+			aSMFError = SmfPMPluginUnknownPluginService;
+			break;
+			
+		case SmfPluginErrInvalidArguments:
+			aSMFError = SmfPluginErrorInvalidArguments;
+			break;
+			
+		case SmfPluginErrRequestNotCreated:
+			aSMFError = SmfPMPluginRequestCreationFailed;
+			break;
+			
+		case SmfPluginErrParsingFailed:
+			aSMFError = SmfPluginErrorParsingFailed;
+			break;
+			
+		case SmfPluginErrNetworkError:
+			aSMFError = SmfPluginErrorNetworkError;
+			break;
+			
+		case SmfPluginErrCancelComplete:
+			aSMFError = SmfPluginErrorCancelComplete;
+			break;
+			
+		default:
+			aSMFError = SmfUnknownError;
 		}
 	}
 
+/**
+ * Method to convert SmfTransportResult Error to the type SmfError 
+ * @param aTMError The Error code returned by the TM
+ * @param aSMFError [out] The Smf specific common error code
+ */
+void SmfPluginManagerUtil::convertNetworkErrorType( 
+		const SmfTransportResult &aTMError,  
+		SmfError &aSMFError )
+	{
+	qDebug()<<"Converting Transport error code to SmfError";
+	switch(aTMError)
+		{
+		case SmfTransportOpNoError:
+			aSMFError = SmfNoError;
+			break;
+			
+		case SmfTransportOpConnectionRefusedError:
+			aSMFError = SmfTMConnectionRefusedError;
+			break;
+			
+		case SmfTransportOpRemoteHostClosedError:
+			aSMFError = SmfTMRemoteHostClosedError;
+			break;
+			
+		case SmfTransportOpHostNotFoundError:
+			aSMFError = SmfTMHostNotFoundError;
+			break;
+			
+		case SmfTransportOpTimeoutError:
+			aSMFError = SmfTMTimeoutError;
+			break;
+			
+		case SmfTransportOpOperationCanceledError:
+			aSMFError = SmfTMOperationCanceledError;
+			break;
+			
+		case SmfTransportOpSslHandshakeFailedError:
+			aSMFError = SmfTMSslHandshakeFailedError;
+			break;
+			
+		case SmfTransportOpProxyConnectionRefusedError:
+			aSMFError = SmfTMProxyConnectionRefusedError;
+			break;
+			
+		case SmfTransportOpProxyConnectionClosedError:
+			aSMFError = SmfTMProxyConnectionClosedError;
+			break;
+			
+		case SmfTransportOpProxyNotFoundError:
+			aSMFError = SmfTMProxyNotFoundError;
+			break;
+			
+		case SmfTransportOpProxyTimeoutError:
+			aSMFError = SmfTMProxyTimeoutError;
+			break;
+			
+		case SmfTransportOpProxyAuthenticationRequiredError:
+			aSMFError = SmfTMProxyAuthenticationRequiredError;
+			break;
+			
+		case SmfTransportOpContentAccessDenied:
+			aSMFError = SmfTMContentAccessDenied;
+			break;
+			
+		case SmfTransportOpContentOperationNotPermittedError:
+			aSMFError = SmfTMContentOperationNotPermittedError;
+			break;
+			
+		case SmfTransportOpContentNotFoundError:
+			aSMFError = SmfTMContentNotFoundError;
+			break;
+			
+		case SmfTransportOpAuthenticationRequiredError:
+			aSMFError = SmfTMAuthenticationRequiredError;
+			break;
+			
+		case SmfTransportOpContentReSendError:
+			aSMFError = SmfTMContentReSendError;
+			break;
+			
+		case SmfTransportOpProtocolUnknownError:
+			aSMFError = SmfTMProtocolUnknownError;
+			break;
+			
+		case SmfTransportOpProtocolInvalidOperationError:
+			aSMFError = SmfTMProtocolInvalidOperationError;
+			break;
+			
+		case SmfTransportOpUnknownNetworkError:
+			aSMFError = SmfTMUnknownNetworkError;
+			break;
+			
+		case SmfTransportOpUnknownProxyError:
+			aSMFError = SmfTMUnknownProxyError;
+			break;
+			
+		case SmfTransportOpUnknownContentError:
+			aSMFError = SmfTMUnknownContentError;
+			break;
+			
+		case SmfTransportOpProtocolFailure:
+			aSMFError = SmfTMProtocolFailure;
+			break;
+			
+		case SmfTransportOpUnknownError:
+			aSMFError = SmfTMUnknownError;
+			break;
+			
+		case SmfTransportOpIAPChanged:
+			aSMFError = SmfTMIAPChanged;
+			break;
+			
+		case SmfTransportOpCancelled:
+			aSMFError = SmfTMCancelled;
+			break;
+			
+		case SmfTransportOpUnsupportedContentEncodingFormat:
+			aSMFError = SmfTMUnsupportedContentEncodingFormat;
+			break;
+			
+		default:
+			aSMFError = SmfUnknownError;
+		}
+	}
+
--- a/smf/smfservermodule/smfserver/pluginmgr/smfpluginmanagerutil.h	Mon Jun 07 11:43:45 2010 +0100
+++ b/smf/smfservermodule/smfserver/pluginmgr/smfpluginmanagerutil.h	Wed Jun 23 19:51:49 2010 +0530
@@ -21,8 +21,8 @@
 #ifndef SMFPLUGINMANAGERUTIL_H_
 #define SMFPLUGINMANAGERUTIL_H_
 
-#include <smfpluginbase.h>
-#include <smfserverglobal.h>
+#include "smfpluginbase.h"
+#include "smfserverglobal.h"
 
 // Forward declaration
 class SmfPluginManager;
@@ -64,14 +64,31 @@
 	 * @param aOperation The type of operation to be performed
 	 * @param aInputData The data required to create the web query
 	 * @param aReqData [out] The request data created by the plugin
-	 * @param aResult [out] SmfPluginManagerResult, The result of the operation
-	 * @see smfglobal.h
+	 * @param aResult [out] SmfError, The result of the operation
+	 * It can be :-
+	 * SmfPluginNoError (if plugin has created the request successfully)
+	 * SmfPluginUnknownPluginService (if plugin service is not known or unsupported)
+	 * SmfPluginRequestCreationFailed (if request creation has failed)
 	 */
 	void createRequest ( QObject* aInstance, 
 			const SmfRequestTypeID &aOperation, 
 			QByteArray &aInputData,
 			SmfPluginRequestData &aReqData,
-			SmfPluginManagerResult &aResult );
+			SmfError &aResult );
+	
+	/**
+	 * Method to create a web query to fetch activities
+	 * @param aPlugin The instance of the loaded plugin that performs the 
+	 * contact fetch operation.
+	 * @param aOperation The type of operation to be performed
+	 * @param aInputData The data required to create the web query
+	 * @param aReqData [out] The request data created by the plugin
+	 * @return SmfPluginError
+	 */
+	SmfPluginError createActivityFetcherRequest ( QObject *aPlugin, 
+			const SmfRequestTypeID &aOperation, 
+			QByteArray &aInputData,
+			SmfPluginRequestData &aReqData );
 
 	/**
 	 * Method to create a web query to fetch contact details.
@@ -80,15 +97,12 @@
 	 * @param aOperation The type of operation to be performed
 	 * @param aInputData The data required to create the web query
 	 * @param aReqData [out] The request data created by the plugin
-	 * @param aResult [out] SmfPluginManagerResult, The result of the operation
 	 * @return SmfPluginError
-	 * @see smfglobal.h
 	 */
 	SmfPluginError createContactFetcherRequest ( QObject *aPlugin, 
 			const SmfRequestTypeID &aOperation, 
 			QByteArray &aInputData,
-			SmfPluginRequestData &aReqData,
-			SmfPluginManagerResult &aResult );
+			SmfPluginRequestData &aReqData );
 	
 	/**
 	 * Method to create a web query to do post operation on contacts 
@@ -98,15 +112,12 @@
 	 * @param aOperation The type of operation to be performed
 	 * @param aInputData The data required to create the web query
 	 * @param aReqData [out] The request data created by the plugin
-	 * @param aResult [out] SmfPluginManagerResult, The result of the operation
 	 * @return SmfPluginError
-	 * @see smfglobal.h
 	 */
 	SmfPluginError createContactPostRequest ( QObject *aPlugin, 
 			const SmfRequestTypeID &aOperation, 
 			QByteArray &aInputData,
-			SmfPluginRequestData &aReqData,
-			SmfPluginManagerResult &aResult );
+			SmfPluginRequestData &aReqData );
 
 	/**
 	 * Method to create a web query to do music lyrics or subtitle search
@@ -115,15 +126,12 @@
 	 * @param aOperation The type of operation to be performed
 	 * @param aInputData The data required to create the web query
 	 * @param aReqData [out] The request data created by the plugin
-	 * @param aResult [out] SmfPluginManagerResult, The result of the operation
 	 * @return SmfPluginError
-	 * @see smfglobal.h
 	 */
 	SmfPluginError createMusicLyricsRequest ( QObject *aPlugin, 
 			const SmfRequestTypeID &aOperation, 
 			QByteArray &aInputData,
-			SmfPluginRequestData &aReqData,
-			SmfPluginManagerResult &aResult );
+			SmfPluginRequestData &aReqData );
 
 
 	/**
@@ -133,15 +141,12 @@
 	 * @param aOperation The type of operation to be performed
 	 * @param aInputData The data required to create the web query
 	 * @param aReqData [out] The request data created by the plugin
-	 * @param aResult [out] SmfPluginManagerResult, The result of the operation
 	 * @return SmfPluginError
-	 * @see smfglobal.h
 	 */
 	SmfPluginError createMusicEventsRequest ( QObject *aPlugin, 
 			const SmfRequestTypeID &aOperation, 
 			QByteArray &aInputData,
-			SmfPluginRequestData &aReqData,
-			SmfPluginManagerResult &aResult );
+			SmfPluginRequestData &aReqData );
 
 	/**
 	 * Method to create a web query to do music search operation 
@@ -150,15 +155,12 @@
 	 * @param aOperation The type of operation to be performed
 	 * @param aInputData The data required to create the web query
 	 * @param aReqData [out] The request data created by the plugin
-	 * @param aResult [out] SmfPluginManagerResult, The result of the operation
 	 * @return SmfPluginError
-	 * @see smfglobal.h
 	 */
 	SmfPluginError createMusicSearchRequest ( QObject *aPlugin, 
 			const SmfRequestTypeID &aOperation, 
 			QByteArray &aInputData,
-			SmfPluginRequestData &aReqData,
-			SmfPluginManagerResult &aResult );
+			SmfPluginRequestData &aReqData );
 
 
 	/**
@@ -169,15 +171,12 @@
 	 * @param aOperation The type of operation to be performed
 	 * @param aInputData The data required to create the web query
 	 * @param aReqData [out] The request data created by the plugin
-	 * @param aResult [out] SmfPluginManagerResult, The result of the operation
 	 * @return SmfPluginError
-	 * @see smfglobal.h
 	 */
 	SmfPluginError createMusicServiceRequest ( QObject *aPlugin, 
 			const SmfRequestTypeID &aOperation, 
 			QByteArray &aInputData,
-			SmfPluginRequestData &aReqData,
-			SmfPluginManagerResult &aResult );
+			SmfPluginRequestData &aReqData );
 
 
 	/**
@@ -187,15 +186,12 @@
 	 * @param aOperation The type of operation to be performed
 	 * @param aInputData The data required to create the web query
 	 * @param aReqData [out] The request data created by the plugin
-	 * @param aResult [out] SmfPluginManagerResult, The result of the operation
 	 * @return SmfPluginError
-	 * @see smfglobal.h
 	 */
 	SmfPluginError createMusicPlaylistRequest ( QObject *aPlugin, 
 			const SmfRequestTypeID &aOperation, 
 			QByteArray &aInputData,
-			SmfPluginRequestData &aReqData,
-			SmfPluginManagerResult &aResult );
+			SmfPluginRequestData &aReqData );
 
 	/**
 	 * Method to create a web query to do gallery related operation
@@ -204,15 +200,12 @@
 	 * @param aOperation The type of operation to be performed
 	 * @param aInputData The data required to create the web query
 	 * @param aReqData [out] The request data created by the plugin
-	 * @param aResult [out] SmfPluginManagerResult, The result of the operation
 	 * @return SmfPluginError
-	 * @see smfglobal.h
 	 */
 	SmfPluginError createGalleryRequest ( QObject *aPlugin, 
 			const SmfRequestTypeID &aOperation, 
 			QByteArray &aInputData,
-			SmfPluginRequestData &aReqData,
-			SmfPluginManagerResult &aResult );
+			SmfPluginRequestData &aReqData );
 	
 	/**
 	 * Method called by Plugin Manager when network response is available
@@ -225,10 +218,9 @@
 	 * containing the data parsed by the plugins
 	 * @param aRetType [out] The Plugin return value
 	 * @param aPageResult [out] The page information filled by the plugins
-	 * @return SmfPluginManagerResult, The result of the operation
-	 * @see smfglobal.h
+	 * @return SmfError, The result of the operation
 	 */
-	SmfPluginManagerResult responseAvailable ( SmfPluginBase *aInstance,
+	SmfError responseAvailable ( SmfPluginBase *aInstance,
 			const SmfRequestTypeID &aOperation,
 			const SmfTransportResult &aTransportResult, 
 			QByteArray *aResponse,
@@ -246,6 +238,22 @@
 	void serializeResult ( const SmfRequestTypeID &aOperation, 
 			QVariant* aResult,
 			QDataStream &aDataStream );
+	
+	/**
+	 * Method to convert SmfPluginError Error to the type SmfError 
+	 * @param aPluginError The Error code returned by the plugin
+	 * @param aSMFError [out] The Smf specific common error code
+	 */
+	void convertPluginErrorType( const SmfPluginError &aPluginError,  
+			SmfError &aSMFError );
+	
+	/**
+	 * Method to convert SmfTransportResult Error to the type SmfError 
+	 * @param aTMError The Error code returned by the TM
+	 * @param aSMFError [out] The Smf specific common error code
+	 */
+	void convertNetworkErrorType( const SmfTransportResult &aTMError,  
+			SmfError &aSMFError );
 
 	friend class SmfPluginManager;
 	
--- a/smf/smfservermodule/smfserver/server/server.pri	Mon Jun 07 11:43:45 2010 +0100
+++ b/smf/smfservermodule/smfserver/server/server.pri	Wed Jun 23 19:51:49 2010 +0530
@@ -2,16 +2,21 @@
     ./
 
 PUBLIC_HEADERS += \
-	server/smfserver.h 
+	server/smfserver.h \
+	server/smfsettingshandler.h
 
-SOURCES += server/smfserver.cpp
+SOURCES += server/smfserver.cpp \
+           server/smfsettingshandler.cpp
 
-symbian {
-    PRIVATE_HEADERS += server/smfserversymbian_p.h 
-    SOURCES += server/smfserversymbian.cpp
+symbian { 
+	#Settings handler is currently for only CR keys, QSettings will be provided later
+    PRIVATE_HEADERS += server/smfserversymbian_p.h #\
+                       #server/smfsettingshandler_symbian.h
+    SOURCES += server/smfserversymbian.cpp #\
+               #server/smfsettingshandler_symbian.cpp
 } else {
     PRIVATE_HEADERS += server/smfserverqt_p.h \
-                       server/smfserverqtsession.h
+        server/smfserverqtsession.h
     SOURCES += server/smfserverqt.cpp \
-               server/smfserverqtsession.cpp
+        server/smfserverqtsession.cpp
 }
--- a/smf/smfservermodule/smfserver/server/smfserver.cpp	Mon Jun 07 11:43:45 2010 +0100
+++ b/smf/smfservermodule/smfserver/server/smfserver.cpp	Wed Jun 23 19:51:49 2010 +0530
@@ -16,6 +16,7 @@
 #include "smfserver.h"
 #include "smfpluginmanager.h"
 #include "smftransportmanager.h"
+#include "dsm.h"
 #include "smfclientglobal.h"
 #include <smfprovider.h>
 #include <smfpost.h>
@@ -23,13 +24,15 @@
 #include <smfcontact.h>
 #include <smfpicture.h>
 #include <smfcomment.h>
-//#ifdef NO_OTHER_MODULES
+#include <SmfCredMgrClient.h>
+#include <smfrelationmgr.h>
+#include <smfclientglobal.h> 
 #include <QImage>
 #include <QUrl>
 #include <smfgroup.h>
 #include <QTextStream>
 #include <QFile>
-//#endif
+
 #ifdef Q_OS_SYMBIAN
 #include "smfserversymbian_p.h"
 #else
@@ -44,101 +47,75 @@
 
 SmfServer::~SmfServer()
 {
-    delete m_SmfServerPrivate;
+	if(m_SmfServerPrivate)
+		{
+		delete m_SmfServerPrivate;
+		m_SmfServerPrivate = NULL;
+		}
+    
 }
 
 bool SmfServer::startServer()
 	{
 	bool success = false;
 	//Initialize all the component handles
-	writeLog("Not doing SmfTransportManager::getInstance");
-	//m_transportManager = SmfTransportManager::getInstance();
-	writeLog("Not doing m_transportManager->initializeTransport");
-	//checking the network status, no need to proceed if not permitted
-	//SmfTransportInitializeResult networkStatus = m_transportManager->initializeTransport();
-	writeLog("Before networkStatus");
-	//TODO:-check this
-	if(1/*networkStatus == SmfTransportInitNoError*/)
+	
+	SmfTransportInitializeResult networkStatus = prepareTransport();
+	qDebug()<<("Before m_pluginManager construction");
+	m_pluginManager = SmfPluginManager::getInstance(this);
+	qDebug()<<("After m_pluginManager construction");
+	//	m_dataStoreManager = new SmfDataStoreManager();
+	//Initialize private implementation
+	#ifdef Q_OS_SYMBIAN
+	TRAPD(err, m_SmfServerPrivate = SmfServerSymbian::NewL(CActive::EPriorityStandard,this));
+	QString log("SmfServer::startServer=");
+	int errorQ = err ;
+	log += errorQ;
+	 qDebug()<<(log);
+	if( KErrNone != err )
 		{
-		writeLog("Before m_pluginManager construction");
-		m_pluginManager = SmfPluginManager::getInstance(this);
-		writeLog("After m_pluginManager construction");
-		//	m_dataStoreManager = new SmfDataStoreManager();
-		//Initialize private implementation
-		#ifdef Q_OS_SYMBIAN
-		TRAPD(err, m_SmfServerPrivate = SmfServerSymbian::NewL(CActive::EPriorityStandard,this));
-		QString log("SmfServer::startServer=");
-		int errorQ = err ;
-		log += errorQ;
-		 writeLog(log);
-		if( KErrNone != err )
-			{
-			return success;
-			}
-		TInt error = m_SmfServerPrivate->Start( KSmfServerName );
-		errorQ = error ;
-		log.clear();
-		log = QString("m_SmfServerPrivate->Start=");
-		log += QString::number(error);
-		 writeLog(log);
-		if( KErrNone == error ) 
-			{
-			success = true;
-			}
-		else 
-			{
-			//error
-			return success;
-			}
-		#else
-                m_SmfServerPrivate = new SmfServerQt(this);
-		success = m_SmfServerPrivate->start();
-		if (!success) 
-			{
-			return success;
-			}
-		#endif
-		//request CM server for auth expiry info, note:- we should resend the request everytime we get expiry
-		//notification
-		//TODO:- Do it after CM implementation
-		//CMclient->requestAuthExpiryNotify();
-		//connect(CMClient,SIGNAL(authExpiryNotify(NotificationType,SmfPluginID),this,SLOT(NotificationType,SmfPluginID));
+		return success;
 		}
+	TInt error = m_SmfServerPrivate->Start( KSmfServerName );
+    RSemaphore semaphore;
+    User::LeaveIfError( semaphore.OpenGlobal( KSmfServerSemaphoreName ) );
+    // Semaphore opened ok
+    semaphore.Signal();
+    semaphore.Close();
+	errorQ = error ;
+	log.clear();
+	log = QString("m_SmfServerPrivate->Start=");
+	log += QString::number(error);
+	 qDebug()<<(log);
+	if( KErrNone == error ) 
+		{
+		success = true;
+		}
+	else 
+		{
+		//error
+		return success;
+		}
+	#else
+			m_SmfServerPrivate = new SmfServerQt(this);
+	success = m_SmfServerPrivate->start();
+	if (!success) 
+		{
+		return success;
+		}
+	#endif
+	
+	m_credentialMngr = new SmfCredMgrClient();
     return success;
 	}
 //Note:- Almost all the following APIs are called by private impl via the handle
 /**
- * This called first once a session is created by the private impl
- * @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)
-	{
-	//TODO:- once CM is complete do it properly
-	Q_UNUSED(clientID);
-	return true;
-	}
-/**
- * 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.
- */
-void SmfServer::authorizeClient(SmfClientAuthID clientID)
-	{
-	//TODO:- once CM is complete, do it properly
-	//CMclient->authorizeClient(clientID)
-	//connect(CMClient,SIGNAL(clientAuthorizationFinished(bool,SmfClientAuthID)),this,SLOT(clientAuthorizationFinished(bool,SmfClientAuthID)));
-	Q_UNUSED(clientID);	
-	}
-/**
  * This API is called by the private impl when client is authorized
  * @param interfaceID Interface id, provided by the private impl (it gets it from client)
  * @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<SmfPluginID,SmfProvider>& pluginIDMap)
 	{
@@ -166,219 +143,177 @@
  */
 void SmfServer::getAuthorizedPlugins(QList<SmfPluginID>& list,QList<SmfPluginID>& authList)
 	{
-	//TODO:- do it properly as per CMclient implementation
-	//CMclient->getAuthorizedPlugins(list,authList);
-	//testing purpose only
-#ifdef NO_OTHER_MODULES
+	//TODO:-Uncomment the following once authorization flow of plugin is implemented 
+/*	authList.clear();
+	for(int i=0;i<list.count();i++)
+		{
+		bool isAuthorized = m_credentialMngr->CheckPluginAuthentication(list[i]);
+		if(isAuthorized)
+			{
+			authList.append(list[i]);
+			}
+		}*/
 	authList = list;
-#endif
+	}
+SmfTransportInitializeResult SmfServer::prepareTransport()
+	{
+	qDebug()<<("Before SmfTransportManager::getInstance");
+	m_transportManager = SmfTransportManager::getInstance();
+	qDebug()<<("Before m_transportManager->initializeTransport");
+	//checking the network status
+	SmfTransportInitializeResult networkStatus = m_transportManager->initializeTransport();
+	qDebug()<<("m_transportManager->initializeTransport return = ")<<networkStatus;
+	return networkStatus;
 	}
-/**
- * This API is called by the private impl to request the PM to do the actual request/parsing asynchronously
- * Note:- the sever private impl (SmfServerSymbian for symbian platform) maintains a map of session ptr and some randomely
- * generated number.For the time being we are allowing only one outstanding request per session, so no need to store
- * both session and msg ptr, but in future we may need to.
- * @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
- */
-void SmfServer::getRequestedData(int requestID,SmfPluginID pluginID,SmfInterfaceID interfaceID, SmfRequestTypeID requestTypeID,QByteArray dataForPlugin)
+void SmfServer::sendToPluginManager(int requestID,SmfPluginID pluginID,SmfInterfaceID interfaceID,SmfRequestTypeID requestTypeID,QByteArray dataForPlugin ,int pageno,int perpage)
+	{
+	qDebug()<<("SmfServer::delegateToPluginManager");
+	qDebug()<<(QString::number(requestID));
+	qDebug()<<(pluginID);
+	qDebug()<<(interfaceID);
+	qDebug()<<(QString::number(requestTypeID));
+	//TODO:-PM should take page info too
+	m_pluginManager->createRequest(requestID,pluginID,requestTypeID,dataForPlugin);
+	}
+SmfError SmfServer::sendToDSM(QByteArray qtdataForDSM,SmfRequestTypeID opcode,QByteArray& qtdataFromDSM)
 	{
-		//TODO:- cross check the params with PM owner
-		//PM->getData(requestID,pluginID,interfaceID,requestTypeID);
-		m_SmfServerPrivate->writeLog("SmfServer::getRequestedData");
-		m_SmfServerPrivate->writeLog(QString::number(requestID));
-		m_SmfServerPrivate->writeLog(pluginID);
-		m_SmfServerPrivate->writeLog(interfaceID);
-		m_SmfServerPrivate->writeLog(QString::number(requestTypeID));
-		bool defaultCase = false;
-		//serializedInfo contains base provider info+ other data depending on requestTypeID
-		QDataStream reader(&dataForPlugin,QIODevice::ReadOnly);
-		QByteArray dataTobeSent;
-		switch(requestTypeID)
+	DataStoreManager* dsm = DataStoreManager::getDataStoreManager();
+	//Note:- deserialization and formation of user profile and social profile are done by server
+	QDataStream readStream(&qtdataForDSM,QIODevice::ReadOnly);
+	QDataStream writeStream(&qtdataFromDSM,QIODevice::ReadOnly);
+	switch(opcode)
+		{
+		case SmfRelationCreate:
+			{
+			//read the incoming data
+			SmfProvider provider;
+			SmfContact contact;
+			readStream>>provider;
+			readStream>>contact;
+
+			SmfRelationId relnId = dsm->create(&provider,&contact);
+			writeStream<<relnId;
+			}
+			break;
+		case SmfRelationAssociate:
 			{
-			case SmfContactPost:
-				{
-				SmfProvider provider;
-				SmfPost post;
-				SmfLocation loc;
-				reader>>provider;
-				reader>>post;
-				reader>>loc;
-				//now form the serialized bytearray with only SmfPost and SmfPlace
-				QDataStream writer(&dataTobeSent,QIODevice::WriteOnly);
-				writer<<post;
-				writer<<loc;
-				}
-				break;
-			case SmfContactUpdatePost:
-				{
-				SmfProvider provider;
-				SmfPost post;
-				reader>>provider;
-				reader>>post;
-				//now form the serialized bytearray with only SmfPost
-				QDataStream writer(&dataTobeSent,QIODevice::WriteOnly);
-				writer<<post;
-				}
-				break;
-			case SmfContactPostDirected:
-				{
-				SmfProvider provider;
-				SmfPost post;
-				SmfContact contact;
-				SmfLocation place;
-				reader>>provider;
-				reader>>post;
-				reader>>contact;
-				reader>>place;
-				QDataStream writer(&dataTobeSent,QIODevice::WriteOnly);
-				writer<<post;
-				writer<<contact;
-				writer<<place;
-				}
-				break;
-			case SmfContactSharePost:
-				{
-				SmfProvider provider;
-				SmfPost post;
-				SmfContact contact;
-				bool edited;
-				reader>>provider;
-				reader>>post;
-				reader>>contact;
-				reader>>edited;
-				//now form the serialized bytearray with only SmfPost
-				QDataStream writer(&dataTobeSent,QIODevice::WriteOnly);
-				writer<<post;
-				writer<<contact;
-				writer<<edited;
-				}
-				break;
-			case SmfPictureDescription:
-			case SmfPictureUpload:
-				{
-				SmfProvider provider;
-				SmfPicture picture;
-				reader>>provider;
-				reader>>picture;
-				//now form the serialized bytearray with only SmfPicture
-				QDataStream writer(&dataTobeSent,QIODevice::WriteOnly);
-				writer<<picture;
-				}
-				break;
-			case SmfPictureMultiUpload:
-				{
-				SmfProvider provider;
-				SmfPictureList pictureList;
-				reader>>provider;
-				reader>>pictureList;
-				//now form the serialized bytearray with only SmfPicture
-				QDataStream writer(&dataTobeSent,QIODevice::WriteOnly);
-				writer<<pictureList;
-				}
-				break;
-			case SmfPicturePostComment:
-				{
-				SmfProvider provider;
-				SmfPicture picture;
-				SmfComment comment;
-				reader>>provider;
-				reader>>picture;
-				reader>>comment;
-				//now form the serialized bytearray with only SmfPicture
-				QDataStream writer(&dataTobeSent,QIODevice::WriteOnly);
-				writer<<picture;
-				writer<<comment;
-				}
-				break;
-			default:
-				defaultCase = true;
-				break;
+			SmfRelationId relnId;
+			SmfContact contact;
+			SmfProvider provider;
+			readStream>>relnId;
+			readStream>>contact;
+			readStream>>provider;
+
+			SmfError err = dsm->associate(relnId,&contact,&provider);
+			int errInt = err;
+			writeStream<<errInt;
+			}
+			break;
+		case SmfRelationSearchById:
+			{
+			SmfRelationId relnId;
+			readStream>>relnId;
+
+			SmfRelationItem* relnItem = dsm->searchById(relnId);
+			writeStream<<*(relnItem);
+			}
+			break;
+		case SmfRelationCount:
+			{
+			SmfRelationId relationId;
+			readStream>>relationId;
+			int cnt = dsm->count(relationId);
+			writeStream<<cnt;
 			}
-		//When xtra info to be sent to plugin manager
-		if(!defaultCase)
+			break;
+		case SmfRelationGet:
 			{
-				m_pluginManager->createRequest(requestID,pluginID,requestTypeID,dataTobeSent);
+			SmfRelationId relationId;
+			quint32 index;
+			readStream>>relationId;
+			readStream>>index;
+			SmfRelationItem* relnItem = dsm->getContact(relationId,index);
+			writeStream<<relnItem;
 			}
-		//when plugin manager needs to xtra info
-		else
+			break;
+		case SmfRelationGetAll:
 			{
-			QByteArray arr;
-			m_pluginManager->createRequest(requestID,pluginID,requestTypeID,arr);
+			SmfRelationId relationId;
+			readStream>>relationId;
+
+			QList<SmfRelationItem> relnIditemList = dsm->getAll(relationId);
+			writeStream<<relnIditemList;
 			}
+			break;
+		case SmfRelationGetAllRelations:
+			{
+			QList<SmfRelationId> relnIdList = dsm->getAllRelations();
+			writeStream<<relnIdList;
+			}
+			break;
+		default:
+			break;
+		}
+	return SmfNoError;
 	}
 /**
  * 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 )
 	{
 	//TODO:- implement this api in session class
 	//note:- in case success is false client completes the request with SmfErrClientAuthFailed
 	//TODO:- define set of smf wide error after consulting with other module owners
-	authID.session->clientAuthorizationFinished(success);
+	authID.session->clientathorizationFinished(success);
 	}
 /**
  * This API is called by PM once its done with request and parsing
  * @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)
 	{
-	m_SmfServerPrivate->writeLog("SmfServer::resultsAvailable");
-	m_SmfServerPrivate->writeLog("requestID=");
-	m_SmfServerPrivate->writeLog(QString::number(requestID));
-	m_SmfServerPrivate->writeLog("parsedData->size()=");
-	m_SmfServerPrivate->writeLog(QString::number(parsedData->size()));
-	m_SmfServerPrivate->writeLog("Error=");
-	m_SmfServerPrivate->writeLog(QString::number(error));
+	qDebug()<<("SmfServer::resultsAvailable");
+	qDebug()<<("requestID=");
+	qDebug()<<(QString::number(requestID));
+	qDebug()<<("parsedData->size()=");
+	qDebug()<<(QString::number(parsedData->size()));
+	qDebug()<<("Error=");
+	qDebug()<<(QString::number(error));
 	//Serialize error followed by actual data
 	QByteArray dataWithError;
 	QDataStream writer(&dataWithError,QIODevice::WriteOnly);
 	writer<<error;
-	writer<<*(parsedData);
+	if(parsedData->size())
+		{
+		writer<<*(parsedData);
+		}
 	//find out the appropriate session and request id and service that
 	m_SmfServerPrivate->findAndServiceclient(requestID,&dataWithError,error);
 	}
 /**
- * Seems reduntant in symbian as client is served with RMessage2::Complete()
+ * Seems reduntant
  */
 void SmfServer::serviceClient(QByteArray* parsedData)
 	{
-	Q_UNUSED(parsedData);
+	Q_UNUSED(parsedData)
 	}
 /**
- * Used by PM to get a list of tokens
- * TODO:- cross check the params
- */
-void SmfServer::getAuthenticationKeys(int pluginID,QStringList& keys,QStringList& urls)
-	{
-	//SMF-CM communication will be via CM client
-	//TODO:- do it properly as per CM client impl
-	//CMclient->getKeys(pluginID,keys,urls);
-	Q_UNUSED(pluginID);
-	Q_UNUSED(keys);
-	Q_UNUSED(urls);
-	}
-
-/**
  * 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)
 	{
+	Q_UNUSED(type)
+	Q_UNUSED(id)
 	//resend the notify request
 	//CMclient->requestAuthExpiryNotify();
-	Q_UNUSED(type);
-	Q_UNUSED(id);
 	}
-
-void SmfServer::writeLog(QString log) const
+/*void SmfServer::writeLog(QString log) const
 	{
 #ifdef WRITE_LOG
 	QFile file("c:\\data\\SmfServerLogs.txt");
@@ -388,6 +323,29 @@
     out << log << "\n";
     file.close();
 #else
-    Q_UNUSED(log);
+    Q_UNUSED(log)
 #endif
+	}*/
+//#ifdef CLIENT_SERVER_TEST
+dummyPM::dummyPM(SmfServer* server,QObject* parent)
+: m_server(server),QObject(parent)
+	{
+	m_timer = new QTimer(this);
+	connect(m_timer, SIGNAL(timeout()), this, SLOT(responseAvailable()));
 	}
+SmfError dummyPM::createRequest ( const quint32& aSessionID, 
+		const QString& aPluginID, 
+		const SmfRequestTypeID& aOperation, 
+		QByteArray& aInputData )
+	{
+	qDebug()<<QString::number(aSessionID);
+	qDebug()<<aPluginID;
+	qDebug()<<QString::number(aOperation);
+	qDebug()<<QString::number(aInputData.size());
+	m_timer->start(1000);
+	}
+void dummyPM::responseAvailable()
+	{
+	
+	}
+//#endif
--- a/smf/smfservermodule/smfserver/server/smfserver.h	Mon Jun 07 11:43:45 2010 +0100
+++ b/smf/smfservermodule/smfserver/server/smfserver.h	Wed Jun 23 19:51:49 2010 +0530
@@ -24,6 +24,7 @@
 #include "smfglobal.h"
 #include "smfprovider.h"
 #include "smftransportmanager.h" // Transport Manager
+#include <SmfCredMgrClientGlobal.h>
 /*
 * Forward declarations
 * Other components of the SMF
@@ -33,7 +34,7 @@
 class SmfDataStoreManager;
 class SmfSettingsAuthManager;
 class SmfClient;
-
+class SmfCredMgrClient;
 //For the time being, need to change later
 typedef QString SmfInterfaceID;
 //For the time being, need to change later
@@ -72,7 +73,7 @@
    *simply return
    *else
    *it'll start the server exe and initialize all other SMF components
-   *returns whether server is started successfully or not  
+   *returns whether server is started successfully or not  
    */
   bool startServer();
   
@@ -80,81 +81,59 @@
 
 public:
   /*
-   * Request the Credential and Settings manager to check whether client has
-   * been authorized previously.
-   * SmfClientAuthID may be same as SID of the client which can be retrieved
-   * if using Symbian Client-Server private implementation. Not supported for
-   * other platforms
-   */
-  bool isClientAuthorized(SmfClientAuthID clientID);
-  
-  /*
-   * In case the client is yet to be authorized, it starts the authorization
-   * process by triggering Credential Manager.
-   * The SLOT clientAuthorizationFinished is called once its done.
-   * SmfClientAuthID may be same as SID of the client which can be retrieved
-   * if using Symbian Client-Server private implementation. Not supported for
-   * other platforms.
-   */
-  void authorizeClient(SmfClientAuthID clientID);
-  
-  /*
    * Requests Plugin Manager to get a list of plugin IDs who implement
    * the interface interfaceID.
-   * This is used got SmfClient::GetServices () where we need a list of plugins
+   * This is used got SmfClient::GetServices () where we need a list of plugins
    */
   void getPlugins(SmfInterfaceID interfaceID, QMap<SmfPluginID,SmfProvider>& pluginIDMap);
   /**
    * Same as above, except this is used for rest of the requests where we need
-   * a particular plugin
+   * a particular plugin
    */
   SmfPluginID getPlugin(SmfInterfaceID interfaceID,SmfProvider provider);
   
   /*
    * Requests the Credential Manager to filter out non-authorized plugin IDs
-   * from the list and get authorized plugins into authList. 
+   * from the list and get authorized plugins into authList. 
    */
   void getAuthorizedPlugins(QList<SmfPluginID>& list,QList<SmfPluginID>& authList);
-  
-  /*
-   * Prepares the transport.
-   * What it'll do is not yet clear
-   */
-  void prepareTransport();
+
   /**
-   * DEbugging purpose only
+   * Request CM API to get the list of authenticated plugins
+   * @see SmfCredMgrClient::authenticatedPluginList()
    */
-  void writeLog(QString log) const;
-  /*
-   * Delegates the request of the client (to get the data from SN sites)
-   * to the Plugin Manager.
-   * Once the Plugin Manager gets parsed response data it calls the SLOT
-   * resultsAvailable(). 
-   * pluginID is the Plugin to be used.
-   * requestTypeID is the function codes(opcodes) used for message passing 
-   * betn clien-server.
-   * Note:- Should there be an overloaded function which takes
-   * list of SmfPluginID ?
-   * Note:- SmfPluginManager will invoke resultsAvailable on session object once
-   * it receives parsed data.
+  QStringList getAuthenticatedPluginList(QString RegistrationToken);
+
+
+  SmfTransportInitializeResult prepareTransport();
+  /**
+   * DEbugging purpose only
    */
+  //void writeLog(QString log) const;
   /**
    * Request the Plugin manager to get the data.
    * @param requestID Corresponds to a client's session
    * @param pluginID Plugin for which the request is intended
    * @param interfaceID Interface name
    * @param dataForPlugin Data to be sent for this request
-   * 
+   * 
    */
-  void getRequestedData(int requestID,SmfPluginID pluginID,SmfInterfaceID interfaceID, SmfRequestTypeID requestTypeID,QByteArray dataForPlugin = QByteArray());
-  
+  void sendToPluginManager(int requestID,SmfPluginID pluginID,SmfInterfaceID interfaceID,SmfRequestTypeID requestTypeID,QByteArray dataForPlugin = QByteArray(), int pageNo=-1,int perpage=-1);
+  /**
+   * Delegates the request to DSM and receives data synshronously.
+   * @param qtdataForDSM Data to be passed to DSM
+   * @param opcode Opcode
+   * @param qtdataFromDSM Data received from DSM
+   * @return Error value returned from DSM
+   */
+  SmfError sendToDSM(QByteArray qtdataForDSM,SmfRequestTypeID opcode,QByteArray& qtdataFromDSM);
 public slots:
 
 	/*
 	 * This slot is called when Credential Manager is done with the autherizing
 	 * the client for the first time. See isClientAuthorized() and authorizeClient().
 	 * success specifies the success of the authorization, authID is the authentication
-	 * ID in case its not same as SID of the client.
+	 * ID in case its not same as SID of the client.
 	 */
 	void clientAuthorizationFinished(bool success,SmfClientAuthID authID );
 
@@ -162,20 +141,20 @@
 	 * This slot is called as a result of trigger from Plugin manager when the 
 	 * parsed data is available.
 	 * @param requestID The request ID for which result is available
-	 * @param parsedData Serialized data
+	 * @param parsedData Serialized data
 	 */
 	void resultsAvailable(int requestID,QByteArray* parsedData,SmfError error);
 
 	/*
 	 * Services the client request by sending the requested data.
-	 * Note:- This will be handled by private implementation.
+	 * Note:- This will be handled by private implementation.
 	 */
 	void serviceClient(QByteArray* parsedData);
 	
 	
 	/*
 	 * This slot is called for every cleanup timer expiry, in this slot, we need
-	 * to call SmfDataStoreManager's API to refresh data store
+	 * to call SmfDataStoreManager's API to refresh data store
 	 */
 	void timerExpired(){};
 	
@@ -183,38 +162,25 @@
 	 * This method is called every time timerExpired slot is trigerred
 	 * Fetches the last saved requests through Transport Manager and Plugin Manager
 	 * Who will save the last request (Tranport Manager or Data Store Manager) TBD later
-	 * 
+	 * 
 	 */
 	void runSavedRequest(){};
 	
 	/*
 	 * This slot is called when the data store updates are available as a result of
 	 * "runSavedRequest()".
-	 * Note:- The "10.4.1.11	updateDatastore" can be merged with this 
+	 * Note:- The "10.4.1.11	updateDatastore" can be merged with this 
 	 */
 	void dataStoreUpdateAvailable(QByteArray* respData){Q_UNUSED(respData)};
 	
 	/**
-	 * Request the CM to get the authentication keys for the given pluginID
-	 */
-	void getAuthenticationKeys(int pluginID,QStringList& keys,QStringList& urls);
-	
-	/**
 	 * Server calls this method when it receives message from the CM
-	 * that authentication keys for the pluginID has expired
+	 * that authentication keys for the pluginID has expired
 	 */
 	void authenticationKeysExpired(NotificationType type,SmfPluginID id);
 signals:
   //None at the moment
 private:
-/*
- * Starts the clean-up timer for data store refresh, called from the "startServer()"
- * timeOutValue should be picked out from SmfSettingsAuthManager's API
- */
-bool startCleanupTimer(int timeOutValue){Q_UNUSED(timeOutValue) return true;};
-
-
-private:
 	//private impl
 #ifdef Q_OS_SYMBIAN
 	SmfServerSymbian* m_SmfServerPrivate;
@@ -227,7 +193,25 @@
 	SmfDataStoreManager* m_dataStoreManager;
 	SmfSettingsAuthManager* m_settingsAuthManager;
 	SmfClient* m_smfClient;
+	SmfCredMgrClient* m_credentialMngr;
 };
-
+#ifdef CLIENT_SERVER_TEST
+class dummyPM : public QObject
+	{
+		Q_OBJECT
+public:
+		dummyPM(SmfServer* server,QObject* parent=0);
+		~dummyPM();
+		SmfError createRequest ( const quint32& aSessionID, 
+				const QString& aPluginID, 
+				const SmfRequestTypeID& aOperation, 
+				QByteArray& aInputData );
+public slots:
+	void responseAvailable();
+private:
+		QTimer* m_timer;
+		SmfServer* m_server;
+	};
+#endif
 
 #endif // SMFSERVER_H
--- a/smf/smfservermodule/smfserver/server/smfserverqt.cpp	Mon Jun 07 11:43:45 2010 +0100
+++ b/smf/smfservermodule/smfserver/server/smfserverqt.cpp	Wed Jun 23 19:51:49 2010 +0530
@@ -45,13 +45,13 @@
     const QString KServerName("SmfServerQt");
     if (m_server->listen(KServerName))
     {
-        writeLog(QString(m_server->serverName() + ": listening for connections."));
+        qDebug()<<(QString(m_server->serverName() + ": listening for connections."));
         return true;
     }
     else
     {
-        writeLog(QString(KServerName + ": failed to start"));
-        writeLog(QString(m_server->errorString()));
+        qDebug()<<(QString(KServerName + ": failed to start"));
+        qDebug()<<(QString(m_server->errorString()));
         return false;
     }
 }
@@ -64,10 +64,10 @@
     return m_sessions.count();
 }
 
-void SmfServerQt::writeLog(QString log) const
+/*void SmfServerQt::writeLog(QString log) const
 {
     qDebug() << log.toAscii().constData();
-}
+}*/
 
 /**
  * Called by the SmfServer when client authorization finishes.
@@ -86,12 +86,12 @@
     QLocalSocket *client(m_server->nextPendingConnection());
     if (!client)
     {
-        writeLog("SmfServerQt::newClientConnected(): no socket - client may have dropped.");
+        qDebug()<<("SmfServerQt::newClientConnected(): no socket - client may have dropped.");
         return;
     }
 
     // Create a new session for this client.
-    writeLog("Client connected.");
+    qDebug()<<("Client connected.");
 
     m_sessions.append(new SmfServerQtSession(client, this));
 }
--- a/smf/smfservermodule/smfserver/server/smfserverqt_p.h	Mon Jun 07 11:43:45 2010 +0100
+++ b/smf/smfservermodule/smfserver/server/smfserverqt_p.h	Wed Jun 23 19:51:49 2010 +0530
@@ -11,11 +11,11 @@
  *
  * Contributors:
  * Manasij Roy, Nalina Hariharan
- * Description:
- * SMF Server implementation for platforms other than Symbian.
- * Uses  QLocalServer-QLocalSocket classes
- *
- */
+* Description:
+* SMF Server implementation for platforms other than Symbian.
+* Uses  QLocalServer-QLocalSocket classes
+*
+*/
 
 #ifndef SMFSERVERQT_P_H
 #define SMFSERVERQT_P_H
@@ -39,10 +39,13 @@
 
     bool start();
     int sessionListCount() const;
-    void writeLog(QString log) const;
+    //void writeLog(QString log) const;
     void clientAuthorizationFinished(bool success);
     int findAndServiceclient(int requestID,QByteArray* parsedData,SmfError error);
 
+    ~SmfServerQt() {}
+    bool start() {return false;}
+    int sessionListCount() const {return 0;}
 private slots:
     void newClientConnected();
     void removeFromList();
@@ -57,6 +60,11 @@
 {
     return m_generic;
 }
+    
+private:
+    SmfServerQt *iServer;
+    QLocalSocket *iClientConnection;
 
+};
 
 #endif // SMFSERVERQT_P_H
--- a/smf/smfservermodule/smfserver/server/smfserversymbian.cpp	Mon Jun 07 11:43:45 2010 +0100
+++ b/smf/smfservermodule/smfserver/server/smfserversymbian.cpp	Wed Jun 23 19:51:49 2010 +0530
@@ -23,7 +23,7 @@
 #include <QDataStream>
 #include <QStringList>
 #include <QString>
-
+#include <smfrelationmgr.h>
 #include "smfserversymbian_p.h"
 
 
@@ -35,23 +35,17 @@
 	CleanupStack::Pop(); // self
 	return self;
 	}
-
 void SmfServerSymbian::ConstructL()
 	{
 	}
-
-
 SmfServerSymbian::SmfServerSymbian( CActive::TPriority aActiveObjectPriority,SmfServer* aWrapper )
 : CPolicyServer(0,myPolicy, ESharableSessions), iWrapper(aWrapper)
 	{
-	Q_UNUSED(aActiveObjectPriority);
+	Q_UNUSED(aActiveObjectPriority)
 	}
-
-
-
 TInt SmfServerSymbian::addToSessionMap(SmfServerSymbianSession* aSession,const RMessage2& aMsg)
 	{
-	writeLog("SmfServerSymbian::addToSessionMap");
+	qDebug()<<("SmfServerSymbian::addToSessionMap");
 	if(iSessionCount)
 		{
 		//The key generation 
@@ -72,17 +66,16 @@
 	
 	return (-1);
 	}
-
-
 TInt SmfServerSymbian::removeFromSessionMap(SmfServerSymbianSession* aSession,RMessage2& aMsg)
 	{
-	Q_UNUSED(aSession);
-	Q_UNUSED(aMsg);
+	Q_UNUSED(aSession)
+Q_UNUSED(aMsg)
+//To be implemented
 	return 0;
 	}
 
 //TODO - change this to a macro using qdebug  to avoid file opening and closing
-void SmfServerSymbian::writeLog(QString log) const
+/*void SmfServerSymbian::writeLog(QString log) const
 	{
 #ifdef WRITE_LOG
 	QFile file("c:\\data\\SmfServerLogs.txt");
@@ -94,53 +87,45 @@
 #else
 	Q_UNUSED(log)
 #endif
-	}
-
-
+	}*/
 SmfServerSymbian::~SmfServerSymbian()
 	{
 
 	}
-
 SmfServer* SmfServerSymbian::wrapper()
 	{
 	return iWrapper;
 	}
-
-
 CSession2* SmfServerSymbian::NewSessionL(const TVersion& aVersion, const RMessage2& /*aMessage*/) const
 	{
-
+	Q_UNUSED(aVersion)
 	// Check that the version is OK
 	//    TVersion v( 0, 1, 0 );
 	//    if (!User::QueryVersionSupported( v, aVersion ))
 	//        User::Leave( KErrNotSupported );  
 	// Create the session.
-	Q_UNUSED(aVersion);
 	QString log("New session created");
-	writeLog(log);
+	qDebug()<<(log);
 	return new (ELeave) SmfServerSymbianSession( const_cast<SmfServerSymbian*>(this) );
 	}
-
 SmfServerSymbianSession* SmfServerSymbian::findSession(TInt id)
 	{
-	writeLog("SmfServerSymbian::findSession");
+	qDebug()<<("SmfServerSymbian::findSession");
 	CSessionStruct* sessionStruct = iMap.Find(id);	
 	if(sessionStruct)
 		{
-		writeLog("Session id found");
+		qDebug()<<("Session id found");
 		return sessionStruct->iSession;
 		}
 	else
 		{
-		writeLog("Session id not found");
+		qDebug()<<("Session id not found");
 		return NULL;
 		}
 	}
-
 TInt SmfServerSymbian::findAndServiceclient(TInt requestID,QByteArray* parsedData,SmfError error)
 	{
-	writeLog("SmfServerSymbian::findAndServiceclient");
+	qDebug()<<("SmfServerSymbian::findAndServiceclient");
 	SmfServerSymbianSession* sessionToservice = findSession(requestID);
 	if(sessionToservice)
 		{
@@ -148,13 +133,14 @@
 		}
 	return 0;
 	}
-
 SmfServerSymbianSession::SmfServerSymbianSession(SmfServerSymbian* aServer):
-			iServer(aServer),iPtrToBuf(NULL,0) ,iIntfNmaeSymbian(NULL,0), iProviderSymbian(NULL,0),iIntfNameSymbian16(NULL,0)     
+			iServer(aServer),iPtrToBuf(NULL,0) ,
+			iIntfNmaeSymbian(NULL,0), iProviderSymbian(NULL,0),
+			iIntfNameSymbian16(NULL,0) ,iXtraDataPtr(NULL,0),
+			iPtrToDataForClient(NULL,0) ,iPtrDataForDSM(NULL,0),iPtrDataFromDSM(NULL,0)  
 	{
 	iServer->iSessionCount++;
 	}
-
 SmfServerSymbianSession::~SmfServerSymbianSession()
 	{
 	//cleanup of client resources
@@ -162,7 +148,7 @@
 	}
 
 
-void SmfServerSymbianSession::clientAuthorizationFinished(bool success)
+void SmfServerSymbianSession::clientathorizationFinished(bool success)
 	{
 	//Client authorization failed
 	if(!success)
@@ -175,64 +161,51 @@
 		HandleClientMessageL(iMessage);
 		}
 	}
-
-
 void SmfServerSymbianSession::resultsAvailable(QByteArray* parsedData,SmfError error)
 	{
 
 	//Note:- The order of serialization of parsedData - Error value followed by the data
 	//parsedData is already serialized by PM
-	iServer->writeLog("SmfServerSymbianSession::resultsAvailable");
+	qDebug()<<("SmfServerSymbianSession::resultsAvailable");
 	//We should remove the request from the map as soon its no longer outstanding
 	iServer->removeFromSessionMap(this,iMessage);
 	
-	byteArrayToClnt.clear();
-	byteArrayToClnt.append(*(parsedData));
-	iPtrToBuf.Copy(reinterpret_cast<TUint8*>(byteArrayToClnt.data()),byteArrayToClnt.length());
+	//Note:- Session must take the ownership of the data being passed to the client session
+	if(iDataForClient)
+		{
+		delete iDataForClient;
+		iDataForClient = NULL;
+		}
+	iDataForClient = HBufC8::NewL(parsedData->size());
+	iPtrToDataForClient.Set(iDataForClient->Des());
+	iPtrToDataForClient.Copy(reinterpret_cast<const TText8*>(parsedData->constData()),parsedData->length());
 
-	TInt writeErr = iMessage.Write(2,iPtrToBuf);
-	
-	iServer->writeLog("Write=");
+	TInt writeErr = iMessage.Write(2,iPtrToDataForClient);
+	qDebug()<<("Write=");
 	QString wrErr = QString::number(writeErr);
-	iServer->writeLog(wrErr);
-	
+	qDebug()<<(wrErr);
 	//signal completion for the last request
 	iMessage.Complete(error);
 	}
-
-
 void SmfServerSymbianSession::ServiceL(const RMessage2& aMessage)
 	{    
 
-	iServer->writeLog("SmfServerSymbianSession::ServiceL=");
+	qDebug()<<("SmfServerSymbianSession::ServiceL=");
 	iMessage = aMessage ;
-	
 	QString log;
 	log = QString::number(iMessage.Function());
-	iServer->writeLog(log);
-	
+	qDebug()<<(log);
+	//construct the client auth id
 	SmfClientAuthID clientAuthID;
 	clientAuthID.pid = aMessage.SecureId();
 	clientAuthID.session = this;
-	//check whether the client is authorized
-	if(!iServer->wrapper()->isClientAuthorized(clientAuthID))
-		{
-		//Client is yet to be authorized
-		//It should start authorization or simply return err value is yet TBD, so the following code may change
-		//start authorization of client, session will be blocked untill its authorized
-		//HandleclientMessageL will be called in that fn
-		iServer->wrapper()->authorizeClient(clientAuthID);
-		}
-	else
-		{
-		//client is authorized, so proceed
-		HandleClientMessageL(iMessage);		
-		}
+	//TODO:- No client pid checking?No capability? So why symbian client-server?
+	HandleClientMessageL(iMessage);
+
 	}
-
 void SmfServerSymbianSession::HandleClientMessageL(const RMessage2& aMessage)
 	{
-	iServer->writeLog("HandleClientMessageL");
+	qDebug()<<("HandleClientMessageL");
 	iLastRequest = aMessage.Function();
 	
 	
@@ -251,33 +224,137 @@
 		{
 		HandleGetService(aMessage);
 		}
+	else if(iLastRequest == SmfRelationCreate ||
+			iLastRequest == SmfRelationAssociate || 
+			iLastRequest == SmfRelationSearchById ||
+			iLastRequest == SmfRelationSearchByContact ||
+			iLastRequest == SmfRelationCount ||
+			iLastRequest == SmfRelationGet ||
+			iLastRequest == SmfRelationGetAll ||
+			iLastRequest == SmfRelationGetAllRelations
+			)
+		{
+		HandleDSMServiceL(aMessage);
+		}
 	else
 		{
 		HandleCommonServiceL(aMessage);
 		}
 	}
+void SmfServerSymbianSession::HandleDSMServiceL(const RMessage2 & aMessage)
+	{
+	//TODO:-If DSM takes care of deserialization and formation of User and social 
+	//profile from the params then switch case can be removed
+	if(iDataForDSM)
+		{
+		delete iDataForDSM;
+		iDataForDSM = NULL;
+		}
+	
+	switch(iLastRequest)
+		{
+		case SmfRelationCreate:
+			{
+			iDataForDSM = HBufC8::New(maxSmfRelationIdSize);
+			iPtrDataForDSM.Set(iDataForDSM->Des());
+			TInt readerr0 = aMessage.Read(0,iPtrDataForDSM); 
 
+			}
+			break;
+		case SmfRelationAssociate:
+			{
+			int maxAlloc = 100;
+			iDataForDSM = HBufC8::New(maxAlloc);
+			iPtrDataForDSM.Set(iDataForDSM->Des());
+			TInt readerr0 = aMessage.Read(0,iPtrDataForDSM); 
+			}
+			break;
+		case SmfRelationSearchById:
+			{
+			int maxAlloc = MaxSmfContactSize;
+			iDataForDSM = HBufC8::New(maxAlloc);
+			iPtrDataForDSM.Set(iDataForDSM->Des());
+			TInt readerr0 = aMessage.Read(0,iPtrDataForDSM); 
+			}
+			break;
+		case SmfRelationCount:
+			{
+			int maxAlloc = 100;
+			iDataForDSM = HBufC8::New(maxAlloc);
+			iPtrDataForDSM.Set(iDataForDSM->Des());
+			TInt readerr0 = aMessage.Read(0,iPtrDataForDSM);
+			}
+			break;
+		case SmfRelationGet:
+			{
+			int maxAlloc = maxSmfRelationItemSize*maxRelationItems;
+			iDataForDSM = HBufC8::New(maxAlloc);
+			iPtrDataForDSM.Set(iDataForDSM->Des());
+			TInt readerr0 = aMessage.Read(0,iPtrDataForDSM); 
+			}
+			break;
+		case SmfRelationGetAll:
+			{
+			int maxAlloc = maxSmfRelationItemSize*maxRelationItems;
+			iDataForDSM = HBufC8::New(maxAlloc);
+			iPtrDataForDSM.Set(iDataForDSM->Des());
+			TInt readerr0 = aMessage.Read(0,iPtrDataForDSM); 
+			}
+			break;
+		default:
+			break;
+		}
+	//Convert into QByteArray
+	QByteArray qtdataForDSM(reinterpret_cast<const char*>(iPtrDataForDSM.Ptr()),iPtrDataForDSM.Length()) ;
+	QByteArray qtdataFromDSM;
+	SmfRequestTypeID opcode = (SmfRequestTypeID)iLastRequest;
+	SmfError dsmErr = iServer->wrapper()->sendToDSM(qtdataForDSM,opcode,qtdataFromDSM);
+	if(dsmErr == SmfNoError)
+		{
+		if(qtdataFromDSM.size())
+			{
+			if(iDataFromDSM)
+				{
+				delete iDataFromDSM;
+				iDataFromDSM = NULL;
+				}
+			iDataFromDSM = HBufC8::NewL(qtdataFromDSM.size());
+			iPtrDataFromDSM.Set(iDataFromDSM->Des());
+			iPtrDataFromDSM.Copy(reinterpret_cast<const TText8*>(qtdataFromDSM.constData()),qtdataFromDSM.length());
+			TInt writeErr = aMessage.Write(1,iPtrDataFromDSM);
+			}
+		}
+	else
+		{
+		iDSMErr.Zero();
+		TInt errInt = dsmErr;
+		iDSMErr.AppendNum(errInt);
+		TInt writeErr = aMessage.Write(2,iDSMErr);
+		}
+	}
 void SmfServerSymbianSession::HandleGetService(const RMessage2 & aMessage)
 	{
-	iServer->writeLog("SmfServerSymbianSession::HandleGetService");
+	qDebug()<<("SmfServerSymbianSession::HandleGetService");
+	
 	/**
 	 * Note:- client sends message for this opcode in the following format,-
 	 * Slot 0:- Interface Name buffer
 	 * Slot 1:- Ptr to data block to be filled with SmfProvideList* serialized into QByteArray
+	 * Slot 2:- Max data size allocated in the client side
+	 * TODO:- What if size of SmfProviderList to be passed to client is greater than
+	 * this size???
 	 */
+	
 	iInterfaceNametbuf.Zero();
-
 	TInt readerr = aMessage.Read(0,iInterfaceNametbuf);
-	
-	iServer->writeLog(QString::number(readerr));
-	
+	qDebug()<<(QString::number(readerr));
 	QByteArray bytearray(reinterpret_cast<const char*>(iInterfaceNametbuf.Ptr()),iInterfaceNametbuf.Length()) ;
 	QDataStream stream3(&bytearray,QIODevice::ReadOnly);
 	stream3>>iInterfaceID;
-	
-	iServer->writeLog("iInterfaceID=");
-	iServer->writeLog(iInterfaceID);
-	
+	qDebug()<<("iInterfaceID=");
+	qDebug()<<(iInterfaceID);
+	//Interface names are diff in client and plugin, replacing *.client.* with *.plugin.*
+	iInterfaceID.replace(QString(".client"),QString(".plugin"));
 	iServer->wrapper()->getPlugins(iInterfaceID,iPluginIDMap);
 	//form the plugin id list from the map
 	QMapIterator<SmfPluginID, SmfProvider> iter(iPluginIDMap);
@@ -287,7 +364,6 @@
 	iter.next();
 	iPluginIDList<<iter.key();
 		}
-	
 	//iAuthList will be filled by credential manager
 	iServer->wrapper()->getAuthorizedPlugins(iPluginIDList,iAuthList);
 
@@ -295,7 +371,6 @@
 	//No need to add this to session map, as we are not requesting PM for this
 	QMap<SmfPluginID, SmfProvider> tempMap;
 	QMapIterator<SmfPluginID, SmfProvider> i(iPluginIDMap);
-	
 	while (i.hasNext()) 
 		{
 		i.next();
@@ -304,10 +379,9 @@
 			tempMap.insert(i.key(),i.value());
 			}
 		}
-
+	//now tempMapcontains the info to be passed to the client
 	iPluginIDMap.clear();
 	iPluginIDMap = tempMap;
-	
 	//form list of smfprovider from this map,-
 	QList<SmfProvider> providerList;
 	i = iPluginIDMap;
@@ -316,47 +390,52 @@
 		i.next();
 		providerList.append(i.value());
 		}
-
+	//now serialize this list into bytearray
 	byteArrayToClnt.clear();
 	QDataStream stream(&byteArrayToClnt,QIODevice::WriteOnly);
 	stream<<providerList;
-
-	iPtrToBuf.Copy(reinterpret_cast<TUint8*>(byteArrayToClnt.data()),byteArrayToClnt.length());
-	TInt writeErr = aMessage.Write(1,iPtrToBuf);
-	
-	iServer->writeLog("Write=");
+	qDebug()<<("providerList.count()=");
+	qDebug()<<(QString::number(providerList.count()));
+	qDebug()<<("Before providerListSymbian");
+	//now convert it into TPtr8
+	TPtrC8 providerListSymbian(reinterpret_cast<const TText8*>(byteArrayToClnt.constData()),byteArrayToClnt.length());
+	qDebug()<<("After providerListSymbian");
+	TInt writeErr = aMessage.Write(1,providerListSymbian);
+	qDebug()<<("Write=");
 	QString wrErr = QString::number(writeErr);
-	iServer->writeLog(wrErr);
+	qDebug()<<(wrErr);
 	//signal completion
-	
 	TInt completion = SmfGetServiceComplete ;
 	aMessage.Complete(completion);
 	}
-
 void SmfServerSymbianSession::HandleCommonServiceL(const RMessage2& aMessage)
 	{
 	/**
 	 * Note:- client sends message in the following format,-
-	 * Slot 0:- SmfProvider* serialized
+	 * Slot 0:- SmfProvider* serialized+Page info flag+page number+per page (if page info flag)+xtra info flag
 	 * Slot 1:- Interface Name buffer
 	 * Slot 2:- Ptr to data block to be filled
+	 * Slot 3 :- Xtra Data if xtra data flag
 	 */
+	//TODO:- Use macro instead, shared betn client-server
+	TInt maxProvidersize = 1000;
+	TInt maxOtherInfoSize = 300;
 	TInt providerSize = aMessage.GetDesLength(0);
 	if(iProviderBuf)
 		{
-	delete iProviderBuf;
-	iProviderBuf = NULL;
+		delete iProviderBuf;
+		iProviderBuf = NULL;
 		}
-	iProviderBuf = HBufC8::NewL(providerSize);
+	iProviderBuf = HBufC8::NewL(maxProvidersize + maxOtherInfoSize);
 	iProviderSymbian.Set(iProviderBuf->Des());
 
 	TInt intfNameSize = aMessage.GetDesLength(1);
 	if(iIntfNameBuf)
 		{
-	delete iIntfNameBuf;
-	iIntfNameBuf = NULL;
+		delete iIntfNameBuf;
+		iIntfNameBuf = NULL;
 		}
-	iIntfNameBuf = HBufC8::NewL(intfNameSize*2);//for safeside
+	iIntfNameBuf = HBufC8::NewL(1000);//for safeside
 	iIntfNmaeSymbian.Set(iIntfNameBuf->Des());
 
 
@@ -364,33 +443,55 @@
 	aMessage.ReadL(0,iProviderSymbian);
 	//read it into iIntfNmaeSymbian
 	aMessage.ReadL(1,iIntfNmaeSymbian);
-
+	
 	//convert SmfProvider info from Symbian into bytearray
 	QByteArray providerBufQt(reinterpret_cast<const char*>(iProviderSymbian.Ptr()),iProviderSymbian.Length());
-	iServer->writeLog("After providerBufQt");
+	qDebug()<<("providerBufQt.size=");
+	qDebug()<<(QString::number(providerBufQt.size()));
 
 	//now de-serialize it
 	QDataStream stream(&providerBufQt,QIODevice::ReadOnly);
 	SmfProvider provider;
 	stream>>provider ;
+	TInt pageinfoFlag=0;
+	stream>>pageinfoFlag;
+	TInt pageNo=-1;
+	TInt perpage=-1;
+	if(pageinfoFlag)
+		{
+		stream>>pageNo;
+		stream>>perpage;
+		qDebug()<<("pageNo=");
+		qDebug()<<(QString::number(pageNo));
+		qDebug()<<("perpage=");
+		qDebug()<<(QString::number(perpage));
+		}
+	TInt XtraInfoFlag = 0;
+	TBool isXtraData = EFalse;
+	stream>>XtraInfoFlag;
+	if(XtraInfoFlag)
+		{
+		isXtraData = ETrue;
+		qDebug()<<("XtraInfoFlag=");
+		qDebug()<<(QString::number(XtraInfoFlag));
+		}
+	qDebug()<<("iIntfNmaeSymbian.Size=");
+	qDebug()<<(QString::number(iIntfNmaeSymbian.Size()));
 	QByteArray bytearray(reinterpret_cast<const char*>(iIntfNmaeSymbian.Ptr()),iIntfNmaeSymbian.Length()) ;
 	QDataStream intfNameStream(&bytearray,QIODevice::ReadOnly);
 	iInterfaceID.clear();
 	intfNameStream>>iInterfaceID;
-
-	iServer->writeLog("After de-serializing into iInterfaceID=");
-	iServer->writeLog(iInterfaceID);
-	
+	qDebug()<<("After de-serializing into iInterfaceID=");
+	qDebug()<<(iInterfaceID);
+	//Interface names are diff in client and plugin, replacing *.client.* with *.plugin.*
+	iInterfaceID.replace(QString(".client"),QString(".plugin"));
 	//Get the plugin ID who matches provider info for a given intf name
 	SmfPluginID pluginID = iServer->wrapper()->getPlugin(iInterfaceID,provider);
-	
-	iServer->writeLog("pluginID from PM=");
-	iServer->writeLog(pluginID);
-	
+	qDebug()<<("pluginID from PM=");
+	qDebug()<<(pluginID);
 	iPluginIDList.clear();
-	//we need to check only this pluginID is authorized
+	//we need to check only this pluginID is authorized?
 	iPluginIDList<<pluginID;
-	
 	//iAuthList will contain pluginID for a successfull case
 	iAuthList.clear();
 	iServer->wrapper()->getAuthorizedPlugins(iPluginIDList,iAuthList);
@@ -401,10 +502,32 @@
 		TInt id = iServer->addToSessionMap(this,aMessage);
 		//request PM to get the data
 		SmfRequestTypeID opcode = (SmfRequestTypeID)iLastRequest;
-		iServer->wrapper()->getRequestedData(id,pluginID,iInterfaceID,opcode,providerBufQt);
+		if(isXtraData)
+			{
+			if(iXtraDataBuf)
+				{
+				delete iXtraDataBuf;
+				iXtraDataBuf = NULL;	
+				}
+			iXtraDataBuf = HBufC8::NewL(XtraInfoFlag);
+			iXtraDataPtr.Set(iXtraDataBuf->Des());
+			QByteArray XtraBufQt(reinterpret_cast<const char*>(iXtraDataPtr.Ptr()),iXtraDataPtr.Length());
+			qDebug()<<("XtraBufQt size=");
+			qDebug()<<(QString::number(XtraBufQt.size()));
+			iServer->wrapper()->sendToPluginManager(id,pluginID,iInterfaceID,opcode,XtraBufQt);
+			}
+		else
+			{
+			iServer->wrapper()->sendToPluginManager(id,pluginID,iInterfaceID,opcode);
+			}
 		}
 	else
 		{
-		//TODO:-Plugin ID is not authorized, throw some error
+		SmfError err = SmfNoAuthorizedPlugin;
+		iErrBuf.Zero();
+		iErrBuf.AppendNum(err);
+		iMessage.Write(2,iErrBuf);
 		}
+
+
 	}
--- a/smf/smfservermodule/smfserver/server/smfserversymbian_p.h	Mon Jun 07 11:43:45 2010 +0100
+++ b/smf/smfservermodule/smfserver/server/smfserversymbian_p.h	Wed Jun 23 19:51:49 2010 +0530
@@ -1,267 +1,282 @@
-/**
- * Copyright (c) 2010 Sasken Communication Technologies Ltd.
- * All rights reserved.
- * This component and the accompanying materials are made available
- * under the terms of the "Eclipse Public License v1.0" 
- * which accompanies  this distribution, and is available
- * at the URL "http://www.eclipse.org/legal/epl-v10.html"
- *
- * Initial Contributors:
- * Chandradeep Gandhi, Sasken Communication Technologies Ltd - Initial contribution
- *
- * Contributors:
- * Manasij Roy, Nalina Hariharan*
- * Description:
- * SMF Server private implementation for Symbian
- *
- **/
-
-#ifndef SMFSERVERSYMBIAN_H
-#define SMFSERVERSYMBIAN_H
-#include <QObject>
-#include <e32hashtab.h>
-#include <e32base.h>
-#include <QByteArray>
-#include <QString>
-//testing -start
-#include "smfprovider.h"
-//end
-//SMF wide global const and macros, to be shared among SMF components as well as SMF aware apps
-//#include <smf/smfGlobal.h>
-
-//#include "clientGlobal.h"
-
-#include "SmfServer.h"
-//Forward declarations
-class SmfServerSymbianSession;
-
-/**
- * Stores session and request information.
+/**
+ * Copyright (c) 2010 Sasken Communication Technologies Ltd.
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of the "Eclipse Public License v1.0" 
+ * which accompanies  this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html"
+ *
+ * Initial Contributors:
+ * Chandradeep Gandhi, Sasken Communication Technologies Ltd - Initial contribution
+ *
+ * Contributors:
+ * Manasij Roy, Nalina Hariharan*
+ * Description:
+ * SMF Server private implementation for Symbian
+ *
+ **/
+
+#ifndef SMFSERVERSYMBIAN_H
+#define SMFSERVERSYMBIAN_H
+#include <QObject>
+#include <e32hashtab.h>
+#include <e32base.h>
+#include <QByteArray>
+#include <QString>
+//testing -start
+#include "smfprovider.h"
+//end
+//SMF wide global const and macros, to be shared among SMF components as well as SMF aware apps
+//#include <smf/smfGlobal.h>
+
+//#include "clientGlobal.h"
+
+#include "SmfServer.h"
+//Forward declarations
+class SmfServerSymbianSession;
+
+/**
+ * Stores session and request information.
  * For now storing RMessage2 is reduntant as we are allowing only one outstanding request per session
- */
-struct CSessionStruct
-	{
-	SmfServerSymbianSession* iSession;
-	RMessage2 iMsg;
-	};
-
-
-
-//Policy table---start
-//note capabilities are yet to be finalized
-//46 services as of 15th apr
-const TUint myRangeCount = 1/*7*/; 
-
-//Passing everything for the time being
-const TInt myRanges[myRangeCount] = 
-        {
-        0/*, //ERequestPass
-        1, //ERequestFail
-        2, //ERequestNotSupported
-        3, //ERequestDrmService
-        4, //ERequestUserEnvironmentService  
-        5, //ERequestCustomCheckPass
-        6  //ERequestCustomCheckFail*/ 
-        };
-        
-        
-/* bis: each element of this array actually indexes to a particular element of
-TPolicyElement. For eg. element 0 of this array maps element 0 of myRanges to 
-a particular element of TpolicyElement array which is in this case element 0
-of TPolicyElement       
-*/
-const TUint8 myElementsIndex[myRangeCount] = 
-        {
-        CPolicyServer::EAlwaysPass, //passing everything for now  
-        };
-
-
-/* bis: Policies used by the server to check messages from the client 
-for each message, the server will carry out security check according 
-to this policy. 
-*/        
-const CPolicyServer::TPolicyElement myElements[] = 
-        {
-        {_INIT_SECURITY_POLICY_PASS, CPolicyServer::EFailClient}     
-        };
-
-/* bis: TPolicy used by the server to check messages from the client 
-for each message. This structure is passed to the server at its creation.
-The Symbian client-server architecture will make sure that each client request
-passes through the security test as indicated by myPolicy before it is handled
-by myPolciyServer */        
-const CPolicyServer::TPolicy myPolicy =
-        {
-        //bis:
-        //the connection policy (CPolicyServer::EAlwaysPass) should be changed if the 
-        //server wants to check for a particular policy before grating any connection
-        //to the client. For eg. DRM manager server should only allow clients having DRM
-        //capability to connect to it. To do so, change CPolicyserver::EAlwaysPass,
-        //to the index no. of myElements which checks for ECapabilityDRM i.e index 2
-        //in this case. For EACM server, the server should allow only clients having
-        //ECapabilityUserEnvironment to connect to it.
-        CPolicyServer::EAlwaysPass, //specifies all connect attempts should pass 
-        myRangeCount,                                   
-        myRanges,
-        myElementsIndex,
-        myElements,
-        };
-//Policy table---end
-/**
-* Our server class - an active object - and therefore derived ultimately from CActive.
-* It accepts requests from client threads and forwards
-* them to the client session to be dealt with. It also handles the creation
-* of the server-side client session.
-**/
-class SmfServerSymbian : public CPolicyServer
-{
-  
-public:
-	/**
-	 * Creates a new session with the server; the function
-	 * implements the pure virtutal function
-	 * defined in class CServer2
-	 */
-	SmfServerSymbian(CActive::TPriority aActiveObjectPriority,SmfServer* aWrapper);
-    static SmfServerSymbian * NewL(CActive::TPriority aActiveObjectPriority,SmfServer* aWrapper);
-    ~SmfServerSymbian();
-    CSession2 * NewSessionL(const TVersion& aVersion, const RMessage2& aMessage) const;
-  
-    /**
+ */
+struct CSessionStruct
+	{
+	SmfServerSymbianSession* iSession;
+	RMessage2 iMsg;
+	};
+
+
+
+//Policy table---start
+//note capabilities are yet to be finalized
+//46 services as of 15th apr
+const TUint myRangeCount = 1/*7*/; 
+
+//Passing everything for the time being
+const TInt myRanges[myRangeCount] = 
+        {
+        0/*, //ERequestPass
+        1, //ERequestFail
+        2, //ERequestNotSupported
+        3, //ERequestDrmService
+        4, //ERequestUserEnvironmentService  
+        5, //ERequestCustomCheckPass
+        6  //ERequestCustomCheckFail*/ 
+        };
+        
+        
+/* bis: each element of this array actually indexes to a particular element of
+TPolicyElement. For eg. element 0 of this array maps element 0 of myRanges to 
+a particular element of TpolicyElement array which is in this case element 0
+of TPolicyElement       
+*/
+const TUint8 myElementsIndex[myRangeCount] = 
+        {
+        CPolicyServer::EAlwaysPass, //passing everything for now  
+        };
+
+
+/* bis: Policies used by the server to check messages from the client 
+for each message, the server will carry out security check according 
+to this policy. 
+*/        
+const CPolicyServer::TPolicyElement myElements[] = 
+        {
+        {_INIT_SECURITY_POLICY_PASS, CPolicyServer::EFailClient}     
+        };
+
+/* bis: TPolicy used by the server to check messages from the client 
+for each message. This structure is passed to the server at its creation.
+The Symbian client-server architecture will make sure that each client request
+passes through the security test as indicated by myPolicy before it is handled
+by myPolciyServer */        
+const CPolicyServer::TPolicy myPolicy =
+        {
+        //bis:
+        //the connection policy (CPolicyServer::EAlwaysPass) should be changed if the 
+        //server wants to check for a particular policy before grating any connection
+        //to the client. For eg. DRM manager server should only allow clients having DRM
+        //capability to connect to it. To do so, change CPolicyserver::EAlwaysPass,
+        //to the index no. of myElements which checks for ECapabilityDRM i.e index 2
+        //in this case. For EACM server, the server should allow only clients having
+        //ECapabilityUserEnvironment to connect to it.
+        CPolicyServer::EAlwaysPass, //specifies all connect attempts should pass 
+        myRangeCount,                                   
+        myRanges,
+        myElementsIndex,
+        myElements,
+        };
+//Policy table---end
+/**
+* Our server class - an active object - and therefore derived ultimately from CActive.
+* It accepts requests from client threads and forwards
+* them to the client session to be dealt with. It also handles the creation
+* of the server-side client session.
+**/
+class SmfServerSymbian : public CPolicyServer
+{
+  
+public:
+	/**
+	 * Creates a new session with the server; the function
+	 * implements the pure virtutal function
+	 * defined in class CServer2
+	 */
+	SmfServerSymbian(CActive::TPriority aActiveObjectPriority,SmfServer* aWrapper);
+    static SmfServerSymbian * NewL(CActive::TPriority aActiveObjectPriority,SmfServer* aWrapper);
+    ~SmfServerSymbian();
+    CSession2 * NewSessionL(const TVersion& aVersion, const RMessage2& aMessage) const;
+  
+    /**
      * Returns SmfServer
-     */
-    SmfServer* wrapper();
-    /**
-     * Adds session info to the currently active session map iMap. This map is used to
-     * retreive the corresponding session to be serviced. The keys for this map is sent
-     * alongwith the request to other components
-     * @param aSession Session to be added
+     */
+    SmfServer* wrapper();
+    /**
+     * Adds session info to the currently active session map iMap. This map is used to
+     * retreive the corresponding session to be serviced. The keys for this map is sent
+     * alongwith the request to other components
+     * @param aSession Session to be added
      * @param aMsg Currently redundant
-     */
-    TInt addToSessionMap(SmfServerSymbianSession* aSession,const RMessage2& aMsg);
-    /**
-     * Removes the session from the active list of session map
-     * @param aSession Session to be removed.
+     */
+    TInt addToSessionMap(SmfServerSymbianSession* aSession,const RMessage2& aMsg);
+    /**
+     * Removes the session from the active list of session map
+     * @param aSession Session to be removed.
      * @param aMsg Currently redundant
-     */
-    TInt removeFromSessionMap(SmfServerSymbianSession* aSession,RMessage2& aMsg);
-    /**
-     * Returns a symbian session for the given key from the iMap.
+     */
+    TInt removeFromSessionMap(SmfServerSymbianSession* aSession,RMessage2& aMsg);
+    /**
+     * Returns a symbian session for the given key from the iMap.
      * @param id Session ID in the SmfServer Session map
-     */
-    SmfServerSymbianSession* findSession(TInt id);
-    /**
-     * Finds the given session and services it with the data.
-     * @param requestID Session ID
-     * @param parsedData Parsed and serialized data to be sent to client.
+     */
+    SmfServerSymbianSession* findSession(TInt id);
+    /**
+     * Finds the given session and services it with the data.
+     * @param requestID Session ID
+     * @param parsedData Parsed and serialized data to be sent to client.
      * @param error Error code
-     */
-    TInt findAndServiceclient(TInt requestID,QByteArray* parsedData,SmfError error);
-	/**
+     */
+    TInt findAndServiceclient(TInt requestID,QByteArray* parsedData,SmfError error);
+	/**
 	 * Debugging
-	 */
-	void writeLog(QString log)const;
-//private:
-    void ConstructL();
-    SmfServer* iWrapper;
-    
-	/**
+	 */
+	//void writeLog(QString log)const;
+//private:
+    void ConstructL();
+    SmfServer* iWrapper;
+    
+	/**
 	 * Keeps track of the requests sent by each session
-	 */
-    RHashMap<TInt,CSessionStruct> iMap;
-    
-    /**
-     * The key in the iMap.
+	 */
+    RHashMap<TInt,CSessionStruct> iMap;
+    
+    /**
+     * The key in the iMap.
      * Its sent to the wrapper
-     */
-    TInt iRequestID;
-    
-    TInt iSessionCount;
-};
-
-/**
-This class represents a session with the  Smf server.
-Functions are provided to respond appropriately to client messages.
-*/
-class SmfServerSymbianSession : public CSession2
-{
-public:
-	/**
-	 * Creates a session.
+     */
+    TInt iRequestID;
+    
+    TInt iSessionCount;
+};
+
+/**
+This class represents a session with the  Smf server.
+Functions are provided to respond appropriately to client messages.
+*/
+class SmfServerSymbianSession : public CSession2
+{
+public:
+	/**
+	 * Creates a session.
 	 * @param aServer The server handle
-	 */
-	SmfServerSymbianSession(SmfServerSymbian* aServer);
-    ~SmfServerSymbianSession();
-    /**
+	 */
+	SmfServerSymbianSession(SmfServerSymbian* aServer);
+    ~SmfServerSymbianSession();
+    /**
      * From CSession2
-     */
-    void ServiceL(const RMessage2 & aMessage);
-    /**
-     * Called by the SmfServerSymbian when results are available
-     * @param parsedData Parsed serialized data
+     */
+    void ServiceL(const RMessage2 & aMessage);
+    /**
+     * Called by the SmfServerSymbian when results are available
+     * @param parsedData Parsed serialized data
      * @param error Smf Error code
-     */
-	void resultsAvailable(QByteArray* parsedData,SmfError error);
-	/**
-	 * Called by the SmfServer when client authorization finishes.
+     */
+	void resultsAvailable(QByteArray* parsedData,SmfError error);
+	/**
+	 * Called by the SmfServer when client authorization finishes.
 	 * @param success success of the authorization
-	 */
-	void clientAuthorizationFinished(bool success);
-protected:
-    //TMessageParams ReadMessageAndRetrieveParams (const RMessage2 & aMessage);
-    void PanicClient(const RMessage2 & aMessage, TInt aPanic) const;
-    /**
-     * Called by ServiceL()
-     * It tests the function code and then delegates to
-     * the appropriate function.
-     */
-    void HandleClientMessageL(const RMessage2 & aMessage);
-    
-    //Following are for handling specific client requests
-    /**
+	 */
+	void clientathorizationFinished(bool success);
+protected:
+    //TMessageParams ReadMessageAndRetrieveParams (const RMessage2 & aMessage);
+    void PanicClient(const RMessage2 & aMessage, TInt aPanic) const;
+    /**
+     * Called by ServiceL()
+     * It tests the function code and then delegates to
+     * the appropriate function.
+     */
+    void HandleClientMessageL(const RMessage2 & aMessage);
+    
+    //Following are for handling specific client requests
+    /**
      * ESmfGetService
-     */
-    void HandleGetService(const RMessage2 & aMessage);
-    
-    /**
+     */
+    void HandleGetService(const RMessage2 & aMessage);
+    
+    /**
      * Handles all the opcodes except ESmfGetService
-     */
-    void HandleCommonServiceL(const RMessage2 & aMessage);
-    
-    
-//private:
-    SmfServerSymbian* iServer;
-    RMessage2 iMessage;
-
-	//this interface id will be provided by Smf client, will map Smf Client 
-	// interface hierarchy
-	SmfInterfaceID iInterfaceID;
-	TPtr8 iIntfNmaeSymbian;
-	TPtr iIntfNameSymbian16;
-	TBuf8<125> iInterfaceNametbuf;
-	TPtr8 iProviderSymbian;
-	HBufC8* iProviderBuf;
-	HBufC8* iIntfNameBuf;
-	QMap<SmfPluginID,SmfProvider> iPluginIDMap;
-	QList<SmfPluginID> iPluginIDList;
-	QList<SmfPluginID> iAuthList;
-	
-	/**
-	 * To keep track of the requests sent by this session,not required for now, as only one
+     */
+    void HandleCommonServiceL(const RMessage2 & aMessage);
+    
+    /**
+     * Handles all DSM related messages
+     */
+    void HandleDSMServiceL(const RMessage2 & aMessage);
+    
+    
+//private:
+    SmfServerSymbian* iServer;
+    RMessage2 iMessage;
+    TBuf<100> iErrBuf;
+	//this interface id will be provided by Smf client, will map Smf Client 
+	// interface hierarchy
+	SmfInterfaceID iInterfaceID;
+	TPtr8 iIntfNmaeSymbian;
+	TPtr iIntfNameSymbian16;
+	TBuf8<125> iInterfaceNametbuf;
+	TPtr8 iProviderSymbian;
+	TPtr8 iXtraDataPtr;
+	HBufC8* iDataForDSM;
+	TPtr8 iPtrDataForDSM;
+	HBufC8* iDataFromDSM;
+	TPtr8 iPtrDataFromDSM;
+	TBuf<100> iDSMErr;
+	TBuf<100> iMaxSize;
+	HBufC8* iProviderBuf;
+	HBufC8* iXtraDataBuf;
+	HBufC8* iIntfNameBuf;
+	QMap<SmfPluginID,SmfProvider> iPluginIDMap;
+	QList<SmfPluginID> iPluginIDList;
+	QList<SmfPluginID> iAuthList;
+	
+	/**
+	 * To keep track of the requests sent by this session,not required for now, as only one
 	 * outstanding request per session is required
-	 */
-	RArray<RMessage2> iRequestList;
-	/**
+	 */
+	RArray<RMessage2> iRequestList;
+	/**
 	 * Last request opcode
-	 */
-	TInt iLastRequest;
-	//testing
-	TBuf<525> dataToPass;
-	HBufC8* iBuf;
-	HBufC* iBuf16;
-	TPtr8 iPtrToBuf;
-	QByteArray byteArrayToClnt;
-	SmfProvider* providerToClnt;
-	TInt iError;
-};
-#endif // SMFSERVERSYMBIAN_H
+	 */
+	TInt iLastRequest;
+	//testing
+	TBuf<525> dataToPass;
+	HBufC8* iBuf;
+	HBufC* iBuf16;
+	TPtr8 iPtrToBuf;
+	TPtr8 iPtrToDataForClient;
+	HBufC8* iDataForClient;
+	QByteArray byteArrayToClnt;
+	SmfProvider* providerToClnt;
+	TInt iError;
+};
+#endif // SMFSERVERSYMBIAN_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/smf/smfservermodule/smfserver/server/smfsettingshandler.cpp	Wed Jun 23 19:51:49 2010 +0530
@@ -0,0 +1,89 @@
+/**
+ * Copyright (c) 2010 Sasken Communication Technologies Ltd.
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of the "Eclipse Public License v1.0"
+ * which accompanies  this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html"
+ *
+ * Initial Contributors:
+ * Chandradeep Gandhi, Sasken Communication Technologies Ltd - Initial contribution
+ *
+ * Contributors:
+ * Manasij Roy, Nalina Hariharan
+ *
+ * Description:
+ * Reads/Writes settings key in a platform independent way
+ */
+#include "smfsettingshandler.h"
+#ifdef Q_OS_SYMBIAN
+#include "smfsettingshandler_symbian.h"
+#else
+#include "smfsettingshandler_qt.h"
+#endif
+SmfSettingsHandler::SmfSettingsHandler(QObject *parent)
+{
+#ifdef Q_OS_SYMBIAN
+	m_repository = CSettingsRepository::NewL();
+#else
+	m_repository = new SettingsRepositoryQt(this);
+#endif
+}
+SmfSettingsHandler::~SmfSettingsHandler()
+{
+	if(m_repository)
+		{
+		delete m_repository;
+		m_repository = NULL;
+		}
+}
+void SmfSettingsHandler::SetAuthExpirationValue(QString & aVal)
+{
+	
+	m_repository->SetAuthExpirationValue(aVal);
+}
+
+void SmfSettingsHandler::SetRoamingStatusforDataTransfer(QString & aStatus)
+{
+	m_repository->SetAuthExpirationValue(aStatus);
+}
+
+QString SmfSettingsHandler::GetMaxDataTransferLimit() const
+{
+	return m_repository->GetMaxDataTransferLimit();
+}
+
+void SmfSettingsHandler::SetUploadFileType(QString & aFileType)
+{
+	m_repository->SetUploadFileType(aFileType);
+}
+
+QString SmfSettingsHandler::GetUploadFileType() const
+{
+	return m_repository->GetUploadFileType();
+}
+
+void SmfSettingsHandler::SetMaxDataTransferLimit(QString & aVal)
+{
+	m_repository->SetMaxDataTransferLimit(aVal);
+}
+
+void SmfSettingsHandler::GetPluginDetails(QMap<QString,QString>& aDetails) const
+{
+	m_repository->GetPluginDetails(aDetails);
+}
+
+QString SmfSettingsHandler::GetAuthExpirationValue() const
+{
+	return m_repository->GetAuthExpirationValue();
+}
+
+void SmfSettingsHandler::SetPluginDetails(QString & aPluginName, QString & aPluginStatus)
+{
+	m_repository->SetPluginDetails(aPluginName,aPluginStatus);
+}
+
+QString SmfSettingsHandler::GetRoamingStatusforDataTransfer() const
+{
+	return m_repository->GetRoamingStatusforDataTransfer();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/smf/smfservermodule/smfserver/server/smfsettingshandler.h	Wed Jun 23 19:51:49 2010 +0530
@@ -0,0 +1,91 @@
+/**
+ * Copyright (c) 2010 Sasken Communication Technologies Ltd.
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of the "Eclipse Public License v1.0"
+ * which accompanies  this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html"
+ *
+ * Initial Contributors:
+ * Chandradeep Gandhi, Sasken Communication Technologies Ltd - Initial contribution
+ *
+ * Contributors:
+ * Manasij Roy, Nalina Hariharan
+ *
+ * Description:
+ * Reads/Writes settings key in a platform independent way
+ */
+#ifndef SMFSETTINGSHANDLER_H
+#define SMFSETTINGSHANDLER_H
+
+#include <QObject>
+#include <QStringList>
+#include <QMap>
+#ifdef Q_OS_SYMBIAN
+class CSettingsRepository;
+#else
+//TODO:- Implement
+class SettingsRepositoryQt;
+#endif
+class SmfSettingsHandler : public QObject
+	{
+	Q_OBJECT
+public:
+	SmfSettingsHandler(QObject* parent=0);
+	~SmfSettingsHandler();
+
+public slots:
+	/*
+	 * Method to set the PluginDetails to Smf repository
+	 * Parm - @aPluginName,Name of the plugin
+	 * Param - @aPluginStatus,holds the Plgugin Status.
+	 */
+	void SetPluginDetails(QString& aPluginName,QString& aPluginStatus);
+	/*
+	 * Method to set the Auth Expiry Value to Repository
+	 * Param - @aVal,Auth Expiry Value
+	 */
+	void SetAuthExpirationValue(QString& aVal);
+	/*
+	 * Method to set the Max. Data Transfer Limit to Repository
+	 * Param - @aVal,Max. Data Transfer Limit Value
+	 */
+	void SetMaxDataTransferLimit(QString& aVal);
+	/*
+	 * Method to set the Roaming Status for Data Transfer to Repository
+	 * Param - @aStatus,Rpaming Status value for Data Transfer
+	 */
+	void SetRoamingStatusforDataTransfer(QString& aStatus);
+	/*
+	 * Method to set the Upload File Type to Repository
+	 * Param - @aStatus,Upload File Type Value
+	 */
+	void SetUploadFileType(QString& aFileType);
+	/*
+	 * Method to Get the PluginDetails from Repository
+	 */
+	void GetPluginDetails(QMap<QString,QString>& aDetails ) const;
+	/*
+	 * Method to Get the Auth Expiry Value from Repository
+	 */
+	QString GetAuthExpirationValue() const;
+	/*
+	 * Method to Get the Max. Data Transfer Limit from Repository
+	 */
+	QString GetMaxDataTransferLimit() const;
+	/*
+	 * Method to Get the Roaming Status for Data Transfer from Repository
+	 */
+	QString GetRoamingStatusforDataTransfer() const;
+	/*
+	 * Method to Get the Upload File Type from Repository
+	 */
+	QString GetUploadFileType() const;
+private:
+	#ifdef Q_OS_SYMBIAN
+	CSettingsRepository* m_repository;
+	#else
+	SettingsRepositoryQt* m_repository;
+	#endif
+	};
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/smf/smfservermodule/smfserver/server/smfsettingshandler_symbian.cpp	Wed Jun 23 19:51:49 2010 +0530
@@ -0,0 +1,219 @@
+/**
+ * Copyright (c) 2010 Sasken Communication Technologies Ltd.
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of the "Eclipse Public License v1.0" 
+ * which accompanies  this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html"
+ *
+ * Initial Contributors:
+ * Chandradeep Gandhi, Sasken Communication Technologies Ltd - Initial contribution
+ *
+ * Contributors:
+ * 
+ * Description:
+ * Settings Repository class of SMF
+ */
+
+#include <e32base.h>
+#include "smfsettingshandler_symbian.h"
+#include <SettingsConstants.h>
+
+// Standard construction sequence
+CSettingsRepository* CSettingsRepository::NewL()
+    {
+   	 CSettingsRepository* self = CSettingsRepository::NewLC();
+     CleanupStack::Pop( self );
+     return self;
+    }
+
+CSettingsRepository* CSettingsRepository::NewLC()
+    {
+     CSettingsRepository* self = new ( ELeave ) CSettingsRepository;
+     CleanupStack::PushL( self );
+     self->ConstructL();
+     return self;
+    }
+CSettingsRepository::CSettingsRepository()
+    {
+
+    }
+
+CSettingsRepository::~CSettingsRepository()
+    {
+	 if(iRepository)
+		{
+			delete iRepository;
+			iRepository = NULL;
+		}
+    }
+
+void CSettingsRepository::ConstructL()
+    {
+   	  User::LeaveIfNull(iRepository= CRepository::NewL(KCRUidSettings));
+    }
+void CSettingsRepository::SetPluginDetails(QString& aPluginName,QString& aPluginStatus)
+	{
+	TPtrC pluginNameSymbian(static_cast<const TUint16*>(aPluginName.utf16()), aPluginName.length());
+	TPtrC pluginStatusSymbian(static_cast<const TUint16*>(aPluginStatus.utf16()), aPluginStatus.length());
+	SetPluginDetails(pluginNameSymbian,pluginStatusSymbian);
+	}
+
+void CSettingsRepository::SetAuthExpirationValue(QString& aVal)
+	{
+	TPtrC valSymbian(static_cast<const TUint16*>(aVal.utf16()), aVal.length());
+	SetAuthExpirationValue(valSymbian);
+	}
+
+void CSettingsRepository::SetMaxDataTransferLimit(QString& aVal)
+	{
+	TPtrC valSymbian(static_cast<const TUint16*>(aVal.utf16()), aVal.length());
+	SetMaxDataTransferLimit(valSymbian);
+	}
+
+void CSettingsRepository::SetRoamingStatusforDataTransfer(QString& aStatus)
+	{
+	TPtrC valSymbian(static_cast<const TUint16*>(aStatus.utf16()), aStatus.length());
+	SetRoamingStatusforDataTransfer(valSymbian);
+	}
+
+void CSettingsRepository::SetUploadFileType(QString& aFileType)
+	{
+	TPtrC valSymbian(static_cast<const TUint16*>(aFileType.utf16()), aFileType.length());
+	SetRoamingStatusforDataTransfer(valSymbian);
+	}
+
+void CSettingsRepository::GetPluginDetails(QMap<QString,QString>& aDetails) 
+	{
+	TBuf<KMaxSettingValue> name ;
+	TBuf<KMaxSettingValue> details;
+	GetPluginDetailsInternal(name,details);
+
+	QString nameQt = QString::fromUtf16((name.Ptr()),name.Length());
+	QString statusQt = QString::fromUtf16((details.Ptr()),details.Length());
+	aDetails.insert(nameQt,statusQt);
+
+	}
+
+QString CSettingsRepository::GetAuthExpirationValue() const
+	{
+	TBuf<125> valSymbian;
+	GetAuthExpirationValueInternal(valSymbian);
+	QString valQt = QString::fromUtf16((valSymbian.Ptr()),valSymbian.Length());
+	return valQt;
+	}
+
+QString CSettingsRepository::GetMaxDataTransferLimit()const
+	{
+
+	TBuf<125> buf;
+	GetMaxDataTransferLimitInternal(buf);
+	QString str;
+	str = QString::fromUtf16((buf.Ptr()),buf.Length());
+	return str;
+
+	}
+
+QString CSettingsRepository::GetRoamingStatusforDataTransfer() const
+	{
+	TBuf<125> valSymbian ;
+	GetRoamingStatusforDataTransferInternal(valSymbian);
+	QString valQt;
+	valQt = QString::fromUtf16((valSymbian.Ptr()),valSymbian.Length());
+	return valQt;
+	}
+
+QString CSettingsRepository::GetUploadFileType() const
+	{
+	TBuf<125> valSymbian;
+	GetUploadFileTypeInternal(valSymbian);
+	QString valQt = QString::fromUtf16((valSymbian.Ptr()),valSymbian.Length());
+	return valQt;
+	}
+/*
+
+ * Method to set the PluginDetails to Repository
+ * Param - @aPluginStatus,holds the Plgugin Status.
+ */
+void CSettingsRepository::SetPluginDetails(TDesC& aPluginName,TDesC& aPluginStatus)
+	{
+		User::LeaveIfError(iRepository->Set(KSettingsUIPluginNameKey,aPluginName));
+		User::LeaveIfError(iRepository->Set(KSettingsUIPluginStausKey,aPluginStatus));
+	}
+/*
+ * Method to set the Auth Expiry Value to Repository
+ * Param - @aVal,Auth Expiry Value
+ */
+void CSettingsRepository::SetAuthExpirationValue(TDesC& aVal)
+	{
+		User::LeaveIfError(iRepository->Set(KSettingsUIAuthExpLimitKey,aVal));
+	}
+/*
+ * Method to set the Max. Data Transfer Limit to Repository
+ * Param - @aVal,Max. Data Transfer Limit Value
+ */
+void CSettingsRepository::SetMaxDataTransferLimit(TDesC& aVal)
+	{
+		User::LeaveIfError(iRepository->Set(KSettingsUIMaxDataTransferLimitKey,aVal));
+	}
+/*
+ * Method to set the Roaming Status for Data Transfer to Repository
+ * Param - @aStatus,Rpaming Status value for Data Transfer
+ */
+void CSettingsRepository::SetRoamingStatusforDataTransfer(TDesC& aStatus)
+	{
+		User::LeaveIfError(iRepository->Set(KSettingsUIRoamingStatusKey,aStatus));
+	}
+/*
+ * Method to set the Upload File Type to Repository
+ * Param - @aStatus,Upload File Type Value
+ */
+void CSettingsRepository::SetUploadFileType(TDesC& aFileType)
+	{
+		User::LeaveIfError(iRepository->Set(KSettingsUIUploadFileTypeKey,aFileType));
+	}
+/*
+ * Method to Get the PluginDetails from Repository
+ */
+void CSettingsRepository::GetPluginDetailsInternal(TDes& aName , TDes& aDetails) const
+	{
+
+		User::LeaveIfError(iRepository->Get(KSettingsUIPluginNameKey,aName));
+		
+		User::LeaveIfError(iRepository->Get(KSettingsUIPluginStausKey,aDetails));
+	}
+/*
+ * Method to Get the Auth Expiry Value from Repository
+ */
+void CSettingsRepository::GetAuthExpirationValueInternal(TDes& aExp) const
+	{
+		
+		User::LeaveIfError(iRepository->Get(KSettingsUIAuthExpLimitKey,aExp));
+		
+	}
+/*
+ * Method to Get the Max. Data Transfer Limit from Repository
+ */
+void CSettingsRepository::GetMaxDataTransferLimitInternal(TDes& aMax) const
+	{
+		TBuf<125> Value;
+		User::LeaveIfError(iRepository->Get(KSettingsUIMaxDataTransferLimitKey,aMax));
+		
+	}
+/*
+ * Method to Get the Roaming Status for Data Transfer from Repository
+ */
+void CSettingsRepository::GetRoamingStatusforDataTransferInternal(TDes& aRoam) const
+	{
+		User::LeaveIfError(iRepository->Get(KSettingsUIRoamingStatusKey,aRoam));
+
+	}
+/*
+ * Method to Get the Upload File Type from Repository
+ */
+void CSettingsRepository::GetUploadFileTypeInternal(TDes& aFtype) const
+	{
+		User::LeaveIfError(iRepository->Get(KSettingsUIUploadFileTypeKey,aFtype));
+	}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/smf/smfservermodule/smfserver/server/smfsettingshandler_symbian.h	Wed Jun 23 19:51:49 2010 +0530
@@ -0,0 +1,185 @@
+/**
+ * Copyright (c) 2010 Sasken Communication Technologies Ltd.
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of the "Eclipse Public License v1.0" 
+ * which accompanies  this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html"
+ *
+ * Initial Contributors:
+ * Chandradeep Gandhi, Sasken Communication Technologies Ltd - Initial contribution
+ *
+ * Contributors:
+ * 
+ * Description:
+ * Settings Repository class of SMF
+ */
+
+#ifndef SETTINGSREPOSITORY_H_
+#define SETTINGSREPOSITORY_H_
+
+const TInt KMaxSettingValue = 50;
+
+#include <centralrepository.h>
+#include <QStringList>
+#include <QMap>
+//#include <BADESCA.H> 
+/*!
+  @class CSettingsRepository
+
+  @discussion An instance Settings Repository class 
+  to set/get setting values to/from symbian repository.
+  */
+class CSettingsRepository : public CBase
+    {
+public:
+
+/*!
+  @function NewL
+
+  @discussion Create a CSettingsRepository object
+  @result a pointer to the created instance of CSettingsRepository
+  */
+    static CSettingsRepository* NewL();
+
+/*!
+  @function NewLC
+
+  @discussion Create a CSettingsRepository object
+  @result a pointer to the created instance of CSettingsRepository
+  */
+    static CSettingsRepository* NewLC();
+
+
+/*!
+  @function ~CSettingsRepository
+
+  @discussion Destroy the object and release all memory objects
+  */
+     ~CSettingsRepository();
+
+
+public:
+	
+
+	/*!
+	  @function CSettingsRepository
+
+	  @discussion Perform the first phase of two phase construction
+	  */
+
+	    CSettingsRepository();
+	/*
+	 * Method to set the PluginDetails to Smf repository
+	 * Parm - @aPluginName,Name of the plugin
+	 * Param - @aPluginStatus,holds the Plgugin Status.
+	 */
+	void SetPluginDetails(QString& aPluginName,QString& aPluginStatus);
+	/*
+	 * Method to set the Auth Expiry Value to Repository
+	 * Param - @aVal,Auth Expiry Value
+	 */
+	void SetAuthExpirationValue(QString& aVal);
+	/*
+	 * Method to set the Max. Data Transfer Limit to Repository
+	 * Param - @aVal,Max. Data Transfer Limit Value
+	 */
+	void SetMaxDataTransferLimit(QString& aVal);
+	/*
+	 * Method to set the Roaming Status for Data Transfer to Repository
+	 * Param - @aStatus,Rpaming Status value for Data Transfer
+	 */
+	void SetRoamingStatusforDataTransfer(QString& aStatus);
+	/*
+	 * Method to set the Upload File Type to Repository
+	 * Param - @aStatus,Upload File Type Value
+	 */
+	void SetUploadFileType(QString& aFileType);
+	/*
+	 * Method to Get the PluginDetails from Repository
+	 * Key-Plugin name
+	 * Value-Plugin status
+	 */
+	void GetPluginDetails(QMap<QString,QString>& aDetails);
+	/*
+	 * Method to Get the Auth Expiry Value from Repository
+	 */
+	QString GetAuthExpirationValue() const;
+	/*
+	 * Method to Get the Max. Data Transfer Limit from Repository
+	 */
+	QString GetMaxDataTransferLimit()const;
+	/*
+	 * Method to Get the Roaming Status for Data Transfer from Repository
+	 */
+	QString GetRoamingStatusforDataTransfer() const;
+	/*
+	 * Method to Get the Upload File Type from Repository
+	 */
+	QString GetUploadFileType() const;
+private:
+	/*
+	 * Method to set the PluginDetails to Symbian Repository
+	 * Parm - @aPluginName,Name of the plugin
+	 * Param - @aPluginStatus,holds the Plgugin Status.
+	 */
+	void SetPluginDetails(TDesC& aPluginName,TDesC& aPluginStatus);
+	/*
+	 * Method to set the Auth Expiry Value to Repository
+	 * Param - @aVal,Auth Expiry Value
+	 */
+	void SetAuthExpirationValue(TDesC& aVal);
+	/*
+	 * Method to set the Max. Data Transfer Limit to Repository
+	 * Param - @aVal,Max. Data Transfer Limit Value
+	 */
+	void SetMaxDataTransferLimit(TDesC& aVal);
+	/*
+	 * Method to set the Roaming Status for Data Transfer to Repository
+	 * Param - @aStatus,Rpaming Status value for Data Transfer
+	 */
+	void SetRoamingStatusforDataTransfer(TDesC& aStatus);
+	/*
+	 * Method to set the Upload File Type to Repository
+	 * Param - @aStatus,Upload File Type Value
+	 */
+	void SetUploadFileType(TDesC& aFileType);
+	/*
+	 * Method to Get the PluginDetails from Repository
+	 */
+	void GetPluginDetailsInternal(TDes& aName , TDes& aDetails) const;
+	/*
+	 * Method to Get the Auth Expiry Value from Repository
+	 */
+	void GetAuthExpirationValueInternal(TDes& aExp) const;
+	/*
+	 * Method to Get the Max. Data Transfer Limit from Repository
+	 */
+	void GetMaxDataTransferLimitInternal(TDes& aMax) const;
+	/*
+	 * Method to Get the Roaming Status for Data Transfer from Repository
+	 */
+	void GetRoamingStatusforDataTransferInternal(TDes& aRoam) const;
+	/*
+	 * Method to Get the Upload File Type from Repository
+	 */
+	void GetUploadFileTypeInternal(TDes& aFtype) const;
+
+private:
+
+/*!
+  @function ConstructL
+
+  @discussion  Perform the second phase construction of a CSettingsRepository object
+  */
+    void ConstructL();
+
+    /*!
+     Pointer to the Centra Repository class object.
+      */
+   CRepository*  iRepository;
+
+    };
+
+
+#endif /* SETTINGSREPOSITORY_H_ */
--- a/smf/smfservermodule/smfserver/smfplugins/smfactivityfetcherplugin.h	Mon Jun 07 11:43:45 2010 +0100
+++ b/smf/smfservermodule/smfserver/smfplugins/smfactivityfetcherplugin.h	Wed Jun 23 19:51:49 2010 +0530
@@ -9,6 +9,9 @@
  * Initial Contributors:
  * Chandradeep Gandhi, Sasken Communication Technologies Ltd - 
  *
+ * Contributors:
+ * Manasij Roy, Nalina Hariharan
+ * 
  * Description:
  * Interface specification for plugins that implements social activity related services
  *
@@ -17,10 +20,10 @@
 #define SMFACTIVITYFETCHERPLUGIN_H_
 
 #include <smfpluginbase.h>
-#include <smfactivity.h>
+#include <smfactions.h>
 
 // Forward declaration
-class SmfPluginManagerUtil;
+class SmfContact;
 
 /**
  * @ingroup smf_plugin_group
@@ -36,23 +39,13 @@
 	{
 public:
 	/**
-	 * Constructor 	
-	 * @param aUtil The SmfPluginManagerUtil instance. The plugins can 
-	 * call the method getAuthKeys() of this class, with its pluginID to 
-	 * get the OAuth keys, keys are returned only if this plugin is 
-	 * authorised by Smf franework
-	 * 
-	 */
-	SmfActivityFetcherPlugin( SmfPluginManagerUtil* aUtil);
-
-	/**
 	 * Destructor
 	 */
-	~SmfActivityFetcherPlugin();
+	virtual ~SmfActivityFetcherPlugin( ) {}
 
 	/**
 	 * Method to get the list of self activities, e.g. shown in own wall
-	 * @param aRequest [out] The request data plugin generated (to be sent to network)
+	 * @param aRequest [out] The request data that plugin generates (to be sent to network)
 	 * @param aPageNum[in] The page to be extracted
 	 * @param aItemsPerPage[in] Number of items per page
 	 * @return SmfPluginError Plugin error if any, else SmfPluginErrNone
@@ -87,6 +80,18 @@
 			const int aPageNum = SMF_FIRST_PAGE, 
 			const int aItemsPerPage = SMF_ITEMS_PER_PAGE ) = 0;
 	
+	/**
+	 * Customised method for SmfActivityFetcherPlugin interface
+	 * @param aRequest [out] The request data to be sent to network
+	 * @param aOperation The operation type (should be known between 
+	 * the client interface and the plugin)
+	 * @param aData The data required to form the request (The type 
+	 * of data should be known between client and the plugin)
+	 * @return SmfPluginError Plugin error if any, else SmfPluginErrNone
+	 */
+	virtual SmfPluginError customRequest( SmfPluginRequestData &aRequest, 
+			const int &aOperation, QByteArray *aData ) = 0;
+	
 	};
 
 Q_DECLARE_INTERFACE( SmfActivityFetcherPlugin, "org.symbian.smf.plugin.activity.fetcher/v0.2" );
--- a/smf/smfservermodule/smfserver/smfplugins/smfcontactfetcherplugin.h	Mon Jun 07 11:43:45 2010 +0100
+++ b/smf/smfservermodule/smfserver/smfplugins/smfcontactfetcherplugin.h	Wed Jun 23 19:51:49 2010 +0530
@@ -131,6 +131,6 @@
 			const int &aOperation, QByteArray *aData ) = 0;
 	};
 
-Q_DECLARE_INTERFACE( SmfContactFetcherPlugin, "org.symbian.smf.plugin.contact.fetcher/v1.0" );
+Q_DECLARE_INTERFACE( SmfContactFetcherPlugin, "org.symbian.smf.plugin.contact.fetcher/v0.2" );
 
 #endif /* SMFCONTACTFETCHERPLUGIN_H_ */
--- a/smf/smfservermodule/smfserver/smfplugins/smfgalleryplugin.h	Mon Jun 07 11:43:45 2010 +0100
+++ b/smf/smfservermodule/smfserver/smfplugins/smfgalleryplugin.h	Wed Jun 23 19:51:49 2010 +0530
@@ -23,6 +23,7 @@
 #include <smfpluginbase.h>
 #include <smfpicture.h>
 #include <smfcomment.h>
+#include <smfpicturealbum.h>
 
 /**
  * @ingroup smf_plugin_group
@@ -59,15 +60,32 @@
 	 * Destructor
 	 */
 	virtual ~SmfGalleryPlugin( ) {}
+
+	/**
+	 * Method to get a list of albums
+	 * @param aRequest [out] The request data to be sent to network
+	 * @param aNames The subject or any keywords to be used to filter albums with that name
+	 * @param aUser The user whose albums are requested
+	 * @param aPageNum The page to be extracted
+	 * @param aItemsPerPage Number of items per page
+	 * @return SmfPluginError Plugin error if any, else SmfPluginErrNone
+	 */
+	virtual SmfPluginError albums( SmfPluginRequestData &aRequest, 
+			const QStringList &aNames, 
+			const SmfContact *aUser, 
+			const int aPageNum = SMF_FIRST_PAGE,
+			const int aItemsPerPage = SMF_ITEMS_PER_PAGE ) = 0;
 	
 	/**
 	 * Method to get a list of pictures
 	 * @param aRequest [out] The request data to be sent to network
+	 * @param aAlbums The album(s) whose pictures are being requested
 	 * @param aPageNum The page to be extracted
 	 * @param aItemsPerPage Number of items per page
 	 * @return SmfPluginError Plugin error if any, else SmfPluginErrNone
 	 */
 	virtual SmfPluginError pictures( SmfPluginRequestData &aRequest, 
+			const SmfPictureAlbumList &aAlbums, 
 			const int aPageNum = SMF_FIRST_PAGE, 
 			const int aItemsPerPage = SMF_ITEMS_PER_PAGE ) = 0;
 	
@@ -84,19 +102,23 @@
 	 * Method to upload a picture
 	 * @param aRequest [out] The request data to be sent to network
 	 * @param aImage The image to be uploaded
+	 * @param aAlbum the optional destination album name
 	 * @return SmfPluginError Plugin error if any, else SmfPluginErrNone
 	 */
 	virtual SmfPluginError upload( SmfPluginRequestData &aRequest,
-			const SmfPicture &aImage ) = 0;
+			const SmfPicture &aImage,
+			const SmfPictureAlbum* aAlbum = NULL ) = 0;
 	
 	/**
 	 * Method to upload a list of pictures
 	 * @param aRequest [out] The request data to be sent to network
 	 * @param aImages The list of images to be uploaded
+	 * @param aAlbum the optional destination album name
 	 * @return SmfPluginError Plugin error if any, else SmfPluginErrNone
 	 */
 	virtual SmfPluginError upload( SmfPluginRequestData &aRequest,
-			const QList<SmfPicture> &aImages ) = 0;
+			const QList<SmfPicture> &aImages, 
+			const SmfPictureAlbum* aAlbum = NULL ) = 0;
 	
 	/**
 	 * Method to post comment on a picture is available
@@ -123,6 +145,6 @@
 		
 	};
 
-Q_DECLARE_INTERFACE( SmfGalleryPlugin, "org.symbian.smf.plugin.gallery/v1.0" );
+Q_DECLARE_INTERFACE( SmfGalleryPlugin, "org.symbian.smf.plugin.gallery/v0.2" );
 
 #endif /* SMFGALLERYPLUGIN_H_ */
--- a/smf/smfservermodule/smfserver/smfplugins/smflyricsserviceplugin.h	Mon Jun 07 11:43:45 2010 +0100
+++ b/smf/smfservermodule/smfserver/smfplugins/smflyricsserviceplugin.h	Wed Jun 23 19:51:49 2010 +0530
@@ -85,6 +85,6 @@
 	
 	};
 
-Q_DECLARE_INTERFACE( SmfLyricsServicePlugin, "org.symbian.smf.plugin.music.lyrics/v1.0" );
+Q_DECLARE_INTERFACE( SmfLyricsServicePlugin, "org.symbian.smf.plugin.music.lyrics/v0.2" );
 
 #endif /* SMFLYRICSSERVICEPLUGIN_H_ */
--- a/smf/smfservermodule/smfserver/smfplugins/smfmusiceventsplugin.h	Mon Jun 07 11:43:45 2010 +0100
+++ b/smf/smfservermodule/smfserver/smfplugins/smfmusiceventsplugin.h	Wed Jun 23 19:51:49 2010 +0530
@@ -109,6 +109,6 @@
 	
 	};
 
-Q_DECLARE_INTERFACE( SmfMusicEventsPlugin, "org.symbian.smf.plugin.music.events/v1.0" );
+Q_DECLARE_INTERFACE( SmfMusicEventsPlugin, "org.symbian.smf.plugin.music.events/v0.2" );
 
 #endif /* SMFMUSICEVENTSPLUGIN_H_ */
--- a/smf/smfservermodule/smfserver/smfplugins/smfmusicsearchplugin.h	Mon Jun 07 11:43:45 2010 +0100
+++ b/smf/smfservermodule/smfserver/smfplugins/smfmusicsearchplugin.h	Wed Jun 23 19:51:49 2010 +0530
@@ -110,6 +110,30 @@
 			const SmfTrackInfo &aTrack ) = 0;
 	
 	/**
+	 * Method to post the rating on a track
+	 * @param aRequest [out] The request data to be sent to network
+	 * @param aTrack The track on which rating should be posted
+	 * @param aRating The rating values
+	 * @return SmfPluginError Plugin error if any, else SmfPluginErrNone
+	 */
+	virtual SmfPluginError postRating( 
+			SmfPluginRequestData &aRequest, 
+			const SmfTrackInfo &aTrack, 
+			const SmfMusicRating &aRating ) = 0;
+	
+	/**
+	 * Method to post comment on a track
+	 * @param aRequest [out] The request data to be sent to network
+	 * @param aTrack The track on which comment should be posted
+	 * @param aComment The comment content
+	 * @return SmfPluginError Plugin error if any, else SmfPluginErrNone
+	 */
+	virtual SmfPluginError postComments( 
+			SmfPluginRequestData &aRequest, 
+			const SmfTrackInfo &aTrack, 
+			const SmfComment &aComment ) = 0;
+		
+	/**
 	 * Customised method for SmfMusicSearchPlugin interface
 	 * @param aRequest [out] The request data to be sent to network
 	 * @param aOperation The operation type (should be known between 
@@ -123,6 +147,6 @@
 	
 	};
 
-Q_DECLARE_INTERFACE( SmfMusicSearchPlugin, "org.symbian.smf.plugin.music.search/v1.0" );
+Q_DECLARE_INTERFACE( SmfMusicSearchPlugin, "org.symbian.smf.plugin.music.search/v0.2" );
 
 #endif /* SMFMUSICSEARCHPLUGIN_H_ */
--- a/smf/smfservermodule/smfserver/smfplugins/smfmusicserviceplugin.h	Mon Jun 07 11:43:45 2010 +0100
+++ b/smf/smfservermodule/smfserver/smfplugins/smfmusicserviceplugin.h	Wed Jun 23 19:51:49 2010 +0530
@@ -78,6 +78,6 @@
 	
 	};
 
-Q_DECLARE_INTERFACE( SmfMusicServicePlugin, "org.symbian.smf.plugin.music.service/v1.0" );
+Q_DECLARE_INTERFACE( SmfMusicServicePlugin, "org.symbian.smf.plugin.music.service/v0.2" );
 
 #endif /* SMFMUSICSERVICEPLUGIN_H_ */
--- a/smf/smfservermodule/smfserver/smfplugins/smfplaylistserviceplugin.h	Mon Jun 07 11:43:45 2010 +0100
+++ b/smf/smfservermodule/smfserver/smfplugins/smfplaylistserviceplugin.h	Wed Jun 23 19:51:49 2010 +0530
@@ -103,6 +103,6 @@
 	
 	};
 
-Q_DECLARE_INTERFACE( SmfPlaylistServicePlugin, "org.symbian.smf.plugin.music.playlist/v1.0" );
+Q_DECLARE_INTERFACE( SmfPlaylistServicePlugin, "org.symbian.smf.plugin.music.playlist/v0.2" );
 
 #endif /* SMFPLAYLISTSERVICEPLUGIN_H_ */
--- a/smf/smfservermodule/smfserver/smfplugins/smfpluginbase.h	Mon Jun 07 11:43:45 2010 +0100
+++ b/smf/smfservermodule/smfserver/smfplugins/smfpluginbase.h	Wed Jun 23 19:51:49 2010 +0530
@@ -53,6 +53,7 @@
 	
 	/**
 	 * Method to get the result for a network request.
+	 * @param aOperation The type of operation to be requested
 	 * @param aTransportResult The result of transport operation
 	 * @param aReply The QByteArray instance containing the network response.
 	 * The plugins should delete this instance once they have read the 
@@ -97,6 +98,7 @@
 	 * @param aPageResult [out] The SmfResultPage structure variable
 	 */
 	virtual SmfPluginError responseAvailable( 
+			const SmfRequestTypeID aOperation,
 			const SmfTransportResult &aTransportResult, 
 			QByteArray *aReply, 
 			QVariant* aResult, 
@@ -105,6 +107,6 @@
 	
 	};
 
-Q_DECLARE_INTERFACE( SmfPluginBase, "org.symbian.smf.plugin.smfpluginbase/v1.0" );
+Q_DECLARE_INTERFACE( SmfPluginBase, "org.symbian.smf.plugin.smfpluginbase/v0.2" );
 
 #endif /* SMFPLUGINBASE_H_ */
--- a/smf/smfservermodule/smfserver/smfplugins/smfplugins.pri	Mon Jun 07 11:43:45 2010 +0100
+++ b/smf/smfservermodule/smfserver/smfplugins/smfplugins.pri	Wed Jun 23 19:51:49 2010 +0530
@@ -3,6 +3,7 @@
 PUBLIC_HEADERS += \
 	smfplugins/smfpluginbase.h \
 	smfplugins/smfproviderbase.h \
+	smfplugins/smfactivityfetcherplugin.h \
 	smfplugins/smfcontactfetcherplugin.h \
 	smfplugins/smfpostproviderplugin.h \
 	smfplugins/smflyricsserviceplugin.h \
@@ -16,6 +17,7 @@
 symbian: {
     BLD_INF_RULES.prj_exports += smfplugins/smfpluginbase.h
     BLD_INF_RULES.prj_exports += smfplugins/smfproviderbase.h
+    BLD_INF_RULES.prj_exports += smfplugins/smfactivityfetcherplugin.h
     BLD_INF_RULES.prj_exports += smfplugins/smfcontactfetcherplugin.h
     BLD_INF_RULES.prj_exports += smfplugins/smfpostproviderplugin.h
     BLD_INF_RULES.prj_exports += smfplugins/smflyricsserviceplugin.h
--- a/smf/smfservermodule/smfserver/smfplugins/smfpostproviderplugin.h	Mon Jun 07 11:43:45 2010 +0100
+++ b/smf/smfservermodule/smfserver/smfplugins/smfpostproviderplugin.h	Wed Jun 23 19:51:49 2010 +0530
@@ -192,6 +192,6 @@
 	
 	};
 
-Q_DECLARE_INTERFACE( SmfPostProviderPlugin, "org.symbian.smf.plugin.contact.posts/v1.0" );
+Q_DECLARE_INTERFACE( SmfPostProviderPlugin, "org.symbian.smf.plugin.contact.posts/v0.2" );
 
 #endif /* SMFPOSTPROVIDERPLUGIN_H_ */
--- a/smf/smfservermodule/smfserver/smfplugins/smfproviderbase.h	Mon Jun 07 11:43:45 2010 +0100
+++ b/smf/smfservermodule/smfserver/smfplugins/smfproviderbase.h	Wed Jun 23 19:51:49 2010 +0530
@@ -80,6 +80,21 @@
 	 */
 	virtual QImage applicationIcon( ) const = 0;
 	
+	
+	/**
+	* Method to get the list of interfaces that this provider support
+	* @return List of supported Interafces
+	*/
+	virtual QList<QString> supportedInterfaces( ) const = 0;
+	
+	/**
+	* Method to get the list of languages supported by this service provider
+	* @return a QStringList of languages supported by this service 
+	* provider in 2 letter ISO 639-1 format.
+	*/
+	virtual QStringList supportedLanguages( ) const = 0;
+	
+	
 	/**
 	 * Method to get the Plugin specific ID
 	 * @return The Plugin specific ID
@@ -106,6 +121,6 @@
 	virtual QString smfRegistrationId( ) const = 0;
 	};
 
-Q_DECLARE_INTERFACE( SmfProviderBase, "org.symbian.smf.plugin.smfproviderbase/v1.0" );
+Q_DECLARE_INTERFACE( SmfProviderBase, "org.symbian.smf.plugin.smfproviderbase/v0.2" );
 
 #endif /* SMFPROVIDERBASE_H_ */
--- a/smf/smfservermodule/smfserver/smfserver.loc	Mon Jun 07 11:43:45 2010 +0100
+++ b/smf/smfservermodule/smfserver/smfserver.loc	Wed Jun 23 19:51:49 2010 +0530
@@ -1,5 +1,5 @@
 // ============================================================================
-// * Generated by qmake (2.01a) (Qt 4.6.1) on: 2010-05-18T15:52:55
+// * Generated by qmake (2.01a) (Qt 4.6.3) on: 2010-06-22T14:10:39
 // * This file is generated by qmake and should not be modified by the
 // * user.
 // ============================================================================
--- a/smf/smfservermodule/smfserver/smfserver.pro	Mon Jun 07 11:43:45 2010 +0100
+++ b/smf/smfservermodule/smfserver/smfserver.pro	Wed Jun 23 19:51:49 2010 +0530
@@ -1,7 +1,8 @@
 TEMPLATE = app
 TARGET = smfserver 
 
-DEFINES += NO_OTHER_MODULES
+DEFINES += NO_OTHER_MODULES \
+		   CLIENT_SERVER_TEST
 QT += core \
     gui \
     network \
@@ -15,7 +16,7 @@
     bearer \
     systeminfo
     
-#include(datastoremgr/datastoremgr.pri)
+include(datastoremgr/datastoremgr.pri)
 include(pluginmgr/pluginmgr.pri)
 include(server/server.pri)
 include(smfplugins/smfplugins.pri)
@@ -36,18 +37,19 @@
     $$PRIVATE_HEADERS
     
 SOURCES += \
-	main.cpp
+	main.cpp \
+	smfserver_reg.rss
 
 symbian: { 
     TARGET.UID3 = 0xE5027327
-
-    TARGET.CAPABILITY = ReadUserData \
+	TARGET.CAPABILITY = NetworkServices \
+    	ReadUserData \
         WriteUserData \
         LocalServices \
-        NetworkServices \
-        UserEnvironment
-
-    LIBS += -lsmfclient.dll
-    
-    SOURCES += smfserver_reg.rss
+        UserEnvironment \
+    ReadDeviceData \
+    WriteDeviceData
+	LIBS += -lsmfclient.dll \
+	        -lsmfcredmgrclient.dll \
+	        -lcentralrepository 
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/smf/smfservermodule/smfserver/smfserver.rss	Wed Jun 23 19:51:49 2010 +0530
@@ -0,0 +1,21 @@
+// ============================================================================
+// * Generated by qmake (2.01a) (Qt 4.6.3) on: 2010-06-22T14:10:39
+// * This file is generated by qmake and should not be modified by the
+// * user.
+// ============================================================================
+
+#include <appinfo.rh>
+#include "smfserver.loc"
+
+RESOURCE LOCALISABLE_APP_INFO r_localisable_app_info
+	{
+	short_caption = STRING_r_short_caption;
+	caption_and_icon =
+	CAPTION_AND_ICON_INFO
+		{
+		caption = STRING_r_caption;
+		number_of_icons = 0;
+		icon_file = "";
+		};
+	}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/smf/smfservermodule/smfserver/smfserver_reg.rss	Wed Jun 23 19:51:49 2010 +0530
@@ -0,0 +1,18 @@
+// ============================================================================
+// * Generated by qmake (2.01a) (Qt 4.6.3) on: 2010-06-22T14:10:39
+// * This file is generated by qmake and should not be modified by the
+// * user.
+// ============================================================================
+
+#include <smfserver.rsg>
+#include <appinfo.rh>
+
+UID2 KUidAppRegistrationResourceFile
+UID3 0xE5027327
+
+RESOURCE APP_REGISTRATION_INFO
+	{
+	app_file="smfserver";
+	localisable_resource_file="\\resource\\apps\\smfserver";
+
+	}
--- a/smf/smfservermodule/smfserver/smfserver_template.pkg	Mon Jun 07 11:43:45 2010 +0100
+++ b/smf/smfservermodule/smfserver/smfserver_template.pkg	Wed Jun 23 19:51:49 2010 +0530
@@ -1,10 +1,11 @@
-; smfserver_template.pkg generated by qmake at 2010-05-18T15:52:55
+; smfserver_template.pkg generated by qmake at 2010-06-22T14:10:39
 ; This file is generated by qmake and should not be modified by the user
 ;
 
 ; Language
 &EN
 
+
 ; SIS header: name, uid, version
 #{"smfserver"},(0xE5027327),1,0,0
 
@@ -14,21 +15,22 @@
 ; Unique Vendor name
 :"Vendor"
 
+
 ; Manual PKG pre-rules from PRO files
+; Default dependency to Qt libraries
+(0x2001E61C), 4, 6, 3, {"Qt"}
 ; Default HW/platform dependencies
 [0x101F7961],0,0,0,{"S60ProductID"}
 [0x102032BE],0,0,0,{"S60ProductID"}
 [0x102752AE],0,0,0,{"S60ProductID"}
 [0x1028315F],0,0,0,{"S60ProductID"}
  
-; Default dependency to Qt libraries
-(0x2001E61C), 4, 6, 1, {"Qt"}
 ; Default dependency to QtMobility libraries
-(0x2002AC89), 0, 2, 0, {"QtMobility"}
+(0x2002AC89), 1, 0, 0, {"QtMobility"}
 
 ; Executable and default resource files
-"/S60/devices/S60_5th_Edition_SDK_v0.9/epoc32/release/$(PLATFORM)/$(TARGET)/smfserver.exe"    - "!:\sys\bin\smfserver.exe"
-"/S60/devices/S60_5th_Edition_SDK_v0.9/epoc32/data/z/resource/apps/smfserver.rsc"    - "!:\resource\apps\smfserver.rsc"
-"/S60/devices/S60_5th_Edition_SDK_v0.9/epoc32/data/z/private/10003a3f/import/apps/smfserver_reg.rsc"    - "!:\private\10003a3f\import\apps\smfserver_reg.rsc"
+"/Nokia/devices/Nokia_Symbian3_SDK_v0.8/epoc32/release/$(PLATFORM)/$(TARGET)/smfserver.exe"    - "!:\sys\bin\smfserver.exe"
+"/Nokia/devices/Nokia_Symbian3_SDK_v0.8/epoc32/data/z/resource/apps/smfserver.rsc"    - "!:\resource\apps\smfserver.rsc"
+"/Nokia/devices/Nokia_Symbian3_SDK_v0.8/epoc32/data/z/private/10003a3f/import/apps/smfserver_reg.rsc"    - "!:\private\10003a3f\import\apps\smfserver_reg.rsc"
 
 ; Manual PKG post-rules from PRO files
--- a/smf/smfservermodule/smfserver/smfserverglobal.h	Mon Jun 07 11:43:45 2010 +0100
+++ b/smf/smfservermodule/smfserver/smfserverglobal.h	Wed Jun 23 19:51:49 2010 +0530
@@ -21,6 +21,7 @@
 #define SMFSERVERGLOBAL_H_
 
 #include <QString>
+
 /**
  * Enum declaration for Network status information
  */
@@ -43,29 +44,6 @@
 	SmfTransportInitNoError							// value = 2
 	};
 
-/**
- * The enumeration used to indicate result of plugin manager operations
- */
-enum SmfPluginManagerResult
-	{
-	SmfPluginNoError = 0,
-	SmfPluginNotFound,
-	SmfPluginNotLoaded,
-	SmfPluginLoaded,
-	SmfPluginLoadError,
-	SmfPluginAuthorised,
-	SmfPluginNotAuthorised,
-	SmfPluginRequestCreated,
-	SmfPluginRequestCreationFailed,
-	SmfPluginUnknownService,
-	SmfPluginRequestSendingFailed,
-	SmfPluginSOPCheckFailed,
-	SmfPluginServiceError,
-	SmfPluginResponseParsed,
-	SmfPluginResponseParseFailure,
-	SmfPluginSendRequestAgain,
-	SmfPluginUnknownError
-	};
 
 /**
  * The structure used to track the data usage of each plugins
--- a/smf/smfservermodule/smfserver/transportmgr/smftransportmanager.cpp	Mon Jun 07 11:43:45 2010 +0100
+++ b/smf/smfservermodule/smfserver/transportmgr/smftransportmanager.cpp	Wed Jun 23 19:51:49 2010 +0530
@@ -26,13 +26,13 @@
 // Static data initialisation
 SmfTransportManager* SmfTransportManager::m_myInstance = NULL;
 
-
 /**
  * Method to get the instance of SmfTransportManager class
  * @return The instance of SmfTransportManager class
  */
 SmfTransportManager* SmfTransportManager::getInstance ( )
 	{
+	qDebug()<<("Inside SmfTransportManager::getInstance()");
 	if(NULL == m_myInstance)
 		m_myInstance = new SmfTransportManager( );
 	return m_myInstance;
@@ -43,16 +43,21 @@
  * @param aParent The parent object
  */
 SmfTransportManager::SmfTransportManager ( )
-		: m_netwConfigMngr(this), m_systemInfo(this)
 	{
+	qDebug()<<("Inside SmfTransportManager::SmfTransportManager()");
+
+	m_systemInfo = new QSystemNetworkInfo(this);
+	
+	m_netwConfigMngr = new QNetworkConfigurationManager(this);
+	
 	// Register for monitoring changes in IAPs (network configurations)
-	connect(&m_netwConfigMngr, SIGNAL(configurationAdded(const QNetworkConfiguration &)), 
+	connect(m_netwConfigMngr, SIGNAL(configurationAdded(const QNetworkConfiguration &)), 
 			this, SLOT(configurationAdded(const QNetworkConfiguration &)));
 	
-	connect(&m_netwConfigMngr, SIGNAL(configurationChanged(const QNetworkConfiguration &)), 
+	connect(m_netwConfigMngr, SIGNAL(configurationChanged(const QNetworkConfiguration &)), 
 			this, SLOT(configurationChanged(const QNetworkConfiguration &)));
 	
-	connect(&m_netwConfigMngr, SIGNAL(configurationRemoved(const QNetworkConfiguration &)), 
+	connect(m_netwConfigMngr, SIGNAL(configurationRemoved(const QNetworkConfiguration &)), 
 			this, SLOT(configurationRemoved(const QNetworkConfiguration &)));
 	}
 
@@ -62,8 +67,16 @@
  */
 SmfTransportManager::~SmfTransportManager ( )
 	{
+	if(m_netwConfigMngr)
+		delete m_netwConfigMngr;
+	
+	if(m_systemInfo)
+		delete m_systemInfo;
+	
 	if(m_myInstance)
 		delete m_myInstance;
+	
+	m_myInstance = NULL;
 	}
 
 
@@ -71,19 +84,20 @@
  * Method to initialize the transport component before 
  * executing a web query
  * @return SmfTransportInitializeResult
- * @see smfglobal.h
  */
 SmfTransportInitializeResult SmfTransportManager::initializeTransport ( )
 	{
+	qDebug()<<"Inside SmfTransportManager::initializeTransport()";
 	SmfTransportInitializeResult retVal = SmfTransportInitNetworkNotAvailable;
 	
 	if(getNetworkAvailabilty())
 		{
+		qDebug()<<"getNetworkAvailabilty() returned true";
 		retVal = SmfTransportInitNoError;
 		
 		SmfNetworkStatus status;
 		getCurrentNetworkStatus(status);
-		
+		qDebug()<<("getCurrentNetworkStatus() returned = "+QString::number(status));
 		switch(status)
 			{
 			// homenetwork
@@ -108,6 +122,10 @@
 				retVal = SmfTransportInitNetworkNotAvailable;
 			}
 		}
+	else
+		qDebug()<<"getNetworkAvailabilty() returned false!!!";
+	
+	qDebug()<<"Return value of SmfTransportManager::initializeTransport() = "<<retVal;
 	return retVal;
 	}
 
@@ -117,7 +135,58 @@
  */
 bool SmfTransportManager::getNetworkAvailabilty ( )
 	{
-	return m_netwConfigMngr.isOnline();
+	qDebug()<<"Inside SmfTransportManager::getNetworkAvailabilty()";
+
+/*	QSystemNetworkInfo::NetworkStatus ret2 = m_systemInfo->networkStatus(QSystemNetworkInfo::GsmMode);
+	qDebug()<<"gsm = "<<ret2;
+	
+	ret2 = m_systemInfo->networkStatus(QSystemNetworkInfo::CdmaMode);
+	qDebug()<<"cdma = "<<ret2;
+	
+	ret2 = m_systemInfo->networkStatus(QSystemNetworkInfo::WcdmaMode);
+	qDebug()<<"wcdma = "<<ret2;
+	
+	ret2 = m_systemInfo->networkStatus(QSystemNetworkInfo::WlanMode);
+	qDebug()<<"wlan = "<<ret2;
+	
+	ret2 = m_systemInfo->networkStatus(QSystemNetworkInfo::EthernetMode);
+	qDebug()<<"ethernet = "<<ret2;
+	
+	ret2 = m_systemInfo->networkStatus(QSystemNetworkInfo::BluetoothMode);
+	qDebug()<<"bluetooth = "<<ret2;
+	
+	ret2 = m_systemInfo->networkStatus(QSystemNetworkInfo::WimaxMode);
+	qDebug()<<"wimax = "<<ret2;
+	
+	bool ret1 = m_netwConfigMngr->isOnline();
+	qDebug()<<"m_netwConfigMngr->isOnline() = "<<ret1;*/
+		
+	bool retVal = false;
+	
+	// Get all the defined and undefined configurations
+	QList<QNetworkConfiguration> list = m_netwConfigMngr->allConfigurations();
+	qDebug()<<"list count = "<<list.count();
+	
+	if(list.count())
+		{
+		foreach(QNetworkConfiguration conf, list)
+			{
+			qDebug()<<"Configuration name = "<<conf.name();
+			qDebug()<<"Configuration bearer name = "<<conf.bearerName();
+			qDebug()<<"Configuration state = "<<conf.state();
+
+			// If the stateflgag is any one other than QNetworkConfiguration::Undefined or 
+			// QNetworkConfiguration::Defined, means a defined configuration is available
+			if( (QNetworkConfiguration::Discovered == conf.state()) ||
+					(QNetworkConfiguration::Active == conf.state()) )
+				{
+				retVal = true;
+				break;
+				}
+			}
+		}
+
+	return retVal;
 	}
 
 
@@ -125,33 +194,37 @@
  * Method that checks if the phone is in home network or in roaming.
  * @param aStatus [out] An output parameter indicating the current network 
  * status as SmfNetworkStatus
- * @see smfglobal.h
  */
 void SmfTransportManager::getCurrentNetworkStatus ( 
 		SmfNetworkStatus &aStatus )
 	{
-	QSystemNetworkInfo::NetworkStatus status = m_systemInfo.networkStatus ( QSystemNetworkInfo::GsmMode );
+	QSystemNetworkInfo::NetworkStatus status = m_systemInfo->networkStatus ( QSystemNetworkInfo::GsmMode );
+	qDebug()<<"m_systemInfo->networkStatus ( QSystemNetworkInfo::GsmMode ) = "<<status;
 	
 	switch(status)
 		{
 		// homenetwork
 		case QSystemNetworkInfo::HomeNetwork:
 			aStatus = SmfNetworkConnectedHome;
+			qDebug()<<"Home network";
 			break;
 		
 		// connected
 		case QSystemNetworkInfo::Connected:
 			aStatus = SmfNetworkConnected;
+			qDebug()<<"network connected";
 			break;
 		
 		// roaming	
 		case QSystemNetworkInfo::Roaming:
 			aStatus = SmfNetworkConnectedRoaming;
+			qDebug()<<"roaming";
 			break;
 			
 		// unknown state			
 		case QSystemNetworkInfo::Searching:
 		case QSystemNetworkInfo::Busy:
+			qDebug()<<"network state unknown";
 			aStatus = SmfNetworkStateNotKnown;
 			break;
 
@@ -161,6 +234,7 @@
 		case QSystemNetworkInfo::EmergencyOnly:
 		case QSystemNetworkInfo::Denied:
 		default :
+			qDebug()<<"not connected";
 			aStatus = SmfNetworkNotConnected;
 		}
 	}
@@ -174,7 +248,7 @@
 void SmfTransportManager::configurationAdded ( 
 		const QNetworkConfiguration &aConfig )
 	{
-	Q_UNUSED(aConfig);
+	Q_UNUSED(aConfig)
 	SmfTransportManagerUtil::getInstance()->configurationAdded(SmfTransportOpIAPChanged);
 	}
 
@@ -185,7 +259,7 @@
 void SmfTransportManager::configurationChanged ( 
 		const QNetworkConfiguration &aConfig )
 	{
-	if( aConfig == m_netwConfigMngr.defaultConfiguration() )
+	if( aConfig == m_netwConfigMngr->defaultConfiguration() )
 		SmfTransportManagerUtil::getInstance()->configurationChanged(SmfTransportOpIAPChanged);
 	}
 
@@ -197,7 +271,7 @@
 void SmfTransportManager::configurationRemoved ( 
 		const QNetworkConfiguration &aConfig )
 	{
-	if( aConfig == m_netwConfigMngr.defaultConfiguration() )
+	if( aConfig == m_netwConfigMngr->defaultConfiguration() )
 		SmfTransportManagerUtil::getInstance()->configurationRemoved(SmfTransportOpIAPChanged);
 	}
 
--- a/smf/smfservermodule/smfserver/transportmgr/smftransportmanager.h	Mon Jun 07 11:43:45 2010 +0100
+++ b/smf/smfservermodule/smfserver/transportmgr/smftransportmanager.h	Wed Jun 23 19:51:49 2010 +0530
@@ -23,7 +23,7 @@
 #define SMFTRANSPORTMANAGER_H_
 
 // Include files
-#include <smfserverglobal.h>
+#include "smfserverglobal.h"
 
 // Qt mobility classes
 #include <qnetworkconfigmanager.h>
@@ -58,7 +58,6 @@
 	 * Method to initialize the transport component before 
 	 * executing a web query
 	 * @return SmfTransportInitializeResult
-	 * @see smfglobal.h
 	 */
 	SmfTransportInitializeResult initializeTransport ( );
 	
@@ -91,7 +90,6 @@
 	 * Method that checks if the phone is in home network or in roaming.
 	 * @param aStatus [out] An output parameter indicating the current network 
 	 * status as SmfNetworkStatus
-	 * @see smfglobal.h
 	 */
 	void getCurrentNetworkStatus ( SmfNetworkStatus &aStatus );
 	
@@ -116,12 +114,13 @@
 	/*
 	 * Member variable - QNetworkConfigurationManager instance
 	 */
-	QNetworkConfigurationManager m_netwConfigMngr;
+	QNetworkConfigurationManager *m_netwConfigMngr;
 	
 	/*
 	 * Member variable - QSystemNetworkInfo instance
 	 */
-	QSystemNetworkInfo m_systemInfo;
+	QSystemNetworkInfo *m_systemInfo;
+	
 	};
 
 #endif /* SMFTRANSPORTMANAGER_H_ */
--- a/smf/smfservermodule/smfserver/transportmgr/smftransportmanagerutil.cpp	Mon Jun 07 11:43:45 2010 +0100
+++ b/smf/smfservermodule/smfserver/transportmgr/smftransportmanagerutil.cpp	Wed Jun 23 19:51:49 2010 +0530
@@ -19,12 +19,16 @@
  */
 
 // Include files
+#define EMULATORTESTING
+
 #include <QNetworkAccessManager>
 #include <QNetworkReply>
 #include <QSettings>
 #include <zlib.h>
+#ifdef EMULATORTESTING
 // For proxy settings on emulator only - REMOVE for device
 #include <QNetworkProxy>
+#endif
 
 #include "smftransportmanagerutil.h"
 #include "smfpluginmanager.h"
@@ -63,6 +67,43 @@
 		m_settings->setValue("Sent Data", 0);
 	if( !m_settings->contains("Received Data") )
 		m_settings->setValue("Received Data", 0);
+	
+#ifdef EMULATORTESTING
+	qDebug()<<"Using PROXY SETTINGS!!!, change for device settings";
+	
+	// Reading the keys, CSM Stubbed - START
+	QFile file("c:\\data\\DoNotShare.txt");
+	if (!file.open(QIODevice::ReadOnly))
+		{
+		qDebug()<<"File to read the windows username and password could not be opened, returning!!!";
+		return;
+		}
+	
+	QByteArray arr = file.readAll();
+	QList<QByteArray> list = arr.split(' ');
+	file.close();
+	
+	QString username(list[0]);
+	QString password(list[1]);
+
+    // For proxy settings on emulator only - REMOVE for device
+    QString httpProxy = "10.1.0.224";
+    QString httpPort = "3148";
+    
+	QString httpUser(username);
+	QString httpPass(password);
+
+    //==Classes used from Network Module==
+    QNetworkProxy proxy;
+
+    proxy.setType(QNetworkProxy::HttpProxy);
+    proxy.setHostName(httpProxy);
+    proxy.setPort(httpPort.toInt());
+    proxy.setUser(httpUser);
+    proxy.setPassword(httpPass);
+		
+    QNetworkProxy::setApplicationProxy(proxy);
+#endif
 	}
 
 
@@ -97,6 +138,7 @@
 		const QList<QUrl> &aUrlList,
 		bool &aSOPCompliant )
 	{
+	qDebug()<<"Inside SmfTransportManagerUtil::get()";;
 	bool found = false;
 	QString hostName = aRequest.url().host();
 	
@@ -115,7 +157,7 @@
 	if(found)
 		{
 		aSOPCompliant = true;
-		
+
 		// Set header to accept gzip encoded data
 		aRequest.setRawHeader("Accept-encoding", kSmfAcceptEncoding);
 		
@@ -126,6 +168,7 @@
 		aRequest.setRawHeader("User-Agent", kSmfUserAgent);
 		
 		QNetworkReply* reply = m_networkAccessManager.get(aRequest);
+		qDebug()<<"QNetworkReply of get() = "<<(long)reply;
 	
 		connect(&m_networkAccessManager, SIGNAL(finished(QNetworkReply *)), 
 				this, SLOT(networkReplyFinished(QNetworkReply *)));
@@ -141,6 +184,7 @@
 		{
 		// Error :: SAME ORIGIN POLICY violation!!!
 		aSOPCompliant = false;
+		qDebug()<<"SOP violation";
 		return NULL;
 		}
 	}
@@ -164,6 +208,7 @@
 		const QList<QUrl> &aUrlList,
 		bool &aSOPCompliant )
 	{
+	qDebug()<<"Inside SmfTransportManagerUtil::post()";
 	bool found = false;
 	QString hostName = aRequest.url().host();
 	
@@ -182,6 +227,9 @@
 	if(found)
 		{
 		aSOPCompliant = true;
+
+		// Set header to accept gzip encoded data
+		aRequest.setRawHeader("Accept-encoding", kSmfAcceptEncoding);
 		
 		// Set the cache control
 		aRequest.setRawHeader("Cache-Control", kSmfCacheControl);
@@ -189,7 +237,13 @@
 		// Put the same user agent for all requests sent by Smf
 		aRequest.setRawHeader("User-Agent", kSmfUserAgent);
 		
+#ifdef DETAILEDDEBUGGING
+		qDebug()<<"post data size is = "<<aPostData.size();
+		qDebug()<<"post data is = "<<QString(aPostData);
+#endif
+		
 		QNetworkReply* reply = m_networkAccessManager.post(aRequest, aPostData);
+		qDebug()<<"QNetworkReply of post() = "<<(long)reply;
 	
 		connect(&m_networkAccessManager, SIGNAL(finished(QNetworkReply *)), 
 				this, SLOT(networkReplyFinished(QNetworkReply *)));
@@ -205,6 +259,7 @@
 		{
 		// Error :: SAME ORIGIN POLICY violation!!!
 		aSOPCompliant = false;
+		qDebug()<<"SOP violation";
 		return NULL;
 		}
 	}
@@ -226,6 +281,7 @@
 		const QList<QUrl> &aUrlList,
 		bool &aSOPCompliant )
 	{
+	qDebug()<<"Inside SmfTransportManagerUtil::head()";
 	bool found = false;
 	QString hostName = aRequest.url().host();
 
@@ -244,6 +300,10 @@
 	if(found)
 		{
 		aSOPCompliant = true;
+		
+		// Set header to accept gzip encoded data
+		aRequest.setRawHeader("Accept-encoding", kSmfAcceptEncoding);
+		
 		// Set the cache control
 		aRequest.setRawHeader("Cache-Control", kSmfCacheControl);
 		
@@ -251,6 +311,7 @@
 		aRequest.setRawHeader("User-Agent", kSmfUserAgent);
 		
 		QNetworkReply* reply = m_networkAccessManager.head(aRequest);
+		qDebug()<<"QNetworkReply of head() = "<<(long)reply;
 	
 		connect(&m_networkAccessManager, SIGNAL(finished(QNetworkReply *)), 
 				this, SLOT(networkReplyFinished(QNetworkReply *)));
@@ -266,6 +327,7 @@
 		{
 		// Error :: SAME ORIGIN POLICY violation!!!
 		aSOPCompliant = false;
+		qDebug()<<"SOP violation";
 		return NULL;
 		}
 	}
@@ -289,6 +351,7 @@
 		const QList<QUrl> &aUrlList,
 		bool &aSOPCompliant )
 	{
+	qDebug()<<"Inside SmfTransportManagerUtil::put()";
 	bool found = false;
 	QString hostName = aRequest.url().host();
 
@@ -307,6 +370,10 @@
 	if(found)
 		{
 		aSOPCompliant = true;
+		
+		// Set header to accept gzip encoded data
+		aRequest.setRawHeader("Accept-encoding", kSmfAcceptEncoding);
+		
 		// Set the cache control
 		aRequest.setRawHeader("Cache-Control", kSmfCacheControl);
 		
@@ -314,6 +381,7 @@
 		aRequest.setRawHeader("User-Agent", kSmfUserAgent);
 		
 		QNetworkReply* reply = m_networkAccessManager.put(aRequest, aPostData);
+		qDebug()<<"QNetworkReply of put() = "<<(long)reply;
 	
 		connect(&m_networkAccessManager, SIGNAL(finished(QNetworkReply *)), 
 				this, SLOT(networkReplyFinished(QNetworkReply *)));
@@ -329,6 +397,7 @@
 		{
 		// Error :: SAME ORIGIN POLICY violation!!!
 		aSOPCompliant = false;
+		qDebug()<<"SOP violation";
 		return NULL;
 		}
 	}
@@ -350,6 +419,7 @@
 		const QList<QUrl> &aUrlList,
 		bool &aSOPCompliant )
 	{
+	qDebug()<<"Inside SmfTransportManagerUtil::deleteResource()";
 	bool found = false;
 	QString hostName = aRequest.url().host();
 
@@ -368,6 +438,10 @@
 	if(found)
 		{
 		aSOPCompliant = true;
+		
+		// Set header to accept gzip encoded data
+		aRequest.setRawHeader("Accept-encoding", kSmfAcceptEncoding);
+		
 		// Set the cache control
 		aRequest.setRawHeader("Cache-Control", kSmfCacheControl);
 		
@@ -375,6 +449,7 @@
 		aRequest.setRawHeader("User-Agent", kSmfUserAgent);
 		
 		QNetworkReply* reply = m_networkAccessManager.deleteResource(aRequest);
+		qDebug()<<"QNetworkReply of deleteResource() = "<<(long)reply;
 	
 		connect(&m_networkAccessManager, SIGNAL(finished(QNetworkReply *)), 
 				this, SLOT(networkReplyFinished(QNetworkReply *)));
@@ -390,6 +465,7 @@
 		{
 		// Error :: SAME ORIGIN POLICY violation!!!
 		aSOPCompliant = false;
+		qDebug()<<"SOP violation";
 		return NULL;
 		}
 	}
@@ -405,6 +481,8 @@
 bool SmfTransportManagerUtil::cancelRequest ( 
 		QNetworkReply *aCancelReply )
 	{
+	qDebug()<<"Inside SmfTransportManagerUtil::cancelRequest()";
+	
 	// Checks if this transaction is running
 	if( aCancelReply->isRunning() )
 		{
@@ -464,6 +542,10 @@
  */
 void SmfTransportManagerUtil::networkReplyFinished ( QNetworkReply *aNetworkReply )
 	{
+	qDebug()<<"Inside SmfTransportManagerUtil::networkReplyFinished()";
+	qDebug()<<"QNetworkReply = "<<(long)aNetworkReply;
+	qDebug()<<"QNetworkReply error code = "<<aNetworkReply->error();
+	
 	// remove the QNetworkReply instance from the list of outstanding transactions
 	int index = m_activeNetwReplyList.indexOf(aNetworkReply);
 	if( index >= 0 )
@@ -473,73 +555,132 @@
 	SmfTransportResult trResult;
 	convertErrorType(aNetworkReply->error(), trResult);
 	
-	// Store the data received
+	// Read the response from the device
+	QByteArray response = aNetworkReply->readAll();
+	qDebug()<<"Response size is = "<<response.size();
+#ifdef DETAILEDDEBUGGING
+	qDebug()<<"Response is = "<<QString(response);
+#endif
+
+	// Store the number of bytes of data received
 	bool converted = false;
 	quint64 data = m_settings->value("Received Data").toULongLong(&converted);
 	if(converted)
 		{
-		data += aNetworkReply->readBufferSize();
+		data += response.size();
 		m_settings->setValue("Received Data", data);
 		}
 
-	int error = 0;
+	SmfError error = SmfUnknownError;
 	QByteArray *arr = NULL;
 	
-	// Read the response from the device
-	QByteArray response = aNetworkReply->readAll();
+#ifdef DETAILEDDEBUGGING
+	foreach(QByteArray arr, aNetworkReply->rawHeaderList())
+			qDebug()<<QString(arr)<<" = "<<QString(aNetworkReply->rawHeader(arr));
+#endif
 	
 	// Check if the http response header has the raw header "Content-Encoding:gzip"
-	// If so, inflate the gzip deflated data
+	bool gzipEncoded = false;
 	QByteArray headerKey("Content-Encoding");
 	if(aNetworkReply->hasRawHeader(headerKey))
 		{
-		SmfPluginManager::getInstance()->server()->writeLog("Response is gzip encoded!!!");
+		qDebug()<<"Content-Encoding:"<<QString(aNetworkReply->rawHeader(headerKey));
+		
+		// If http response header has the raw header "Content-Encoding:gzip"
 		if( "gzip" == QString(aNetworkReply->rawHeader(headerKey)))
+			{
+			QByteArray firstByte(1, response[0]);
+			QByteArray secondByte(1, response[1]);
+			
+#ifdef DETAILEDDEBUGGING
+			qDebug()<<"first byte : "<<QString(firstByte.toHex());
+			qDebug()<<"second byte : "<<QString(secondByte.toHex());
+#endif
+			
+			// And the header says the response is a valid gzip data. 
+			// If so, inflate the gzip deflated data
+			if((QString("1f") == QString(firstByte.toHex())) && (QString("8b") == QString(secondByte.toHex())) )
+				{
+				gzipEncoded = true;
+				qDebug()<<"Response is gzip encoded!!!";
 			arr = inflateResponse(response, error);
+				if(!arr)
+					trResult = SmfTransportOpGzipError;
+			}
 		else
-			SmfPluginManager::getInstance()->server()->writeLog("Unsupported encoding format!!! - error");
+			{
+				qDebug()<<"Header says gzip encoded, but response is not a valid data, so ignoring the header!!!";
+				arr = new QByteArray(response);
+				}
+			}
+		else
+			{
+			qDebug()<<"Unsupported encoding format!!! - error";
+			trResult = SmfTransportOpUnsupportedContentEncodingFormat;
+			}
 		}
+	
 	else
-		SmfPluginManager::getInstance()->server()->writeLog("Response is not gzip encoded");
+		{
+		qDebug()<<"Response is not gzip encoded";
+		arr = new QByteArray(response);
+		}
 	
+	// Write the uncompressed data to a file
+#ifdef DETAILEDDEBUGGING
+	if(arr)
+		{
+		QFile file1("c:\\data\\networkResponse.txt");
+		if (!file1.open(QIODevice::WriteOnly))
+			qDebug()<<"File to write the network response could not be opened";
+		file1.write(*arr);
+		file1.close();
+		}
+#endif
 
 	SmfPluginManager::getInstance()->responseAvailable ( trResult, aNetworkReply, arr );
 	}
 
 
 /**
- * Method to deflate a gzipped network response. Once this method is called, 
- * QNetworkReply internal buffer for holding network response is emptied.
- * @param aResponse The QByteArray instance holding the gzip encoded data
+ * Method to inflate a gzipped network response.
+ * @param aResponse The QByteArray holding the gzip encoded data
  * @param aError Argument indicating error
- * @return a QByteArray* containing the deflated data. If deflating fails, 
- * the encoded data itself without deflation is returned.
+ * @return a QByteArray* containing the inflated data. If inflation fails, 
+ * NULL is returned
  */
-QByteArray* SmfTransportManagerUtil::inflateResponse ( QByteArray &aResponse, int& aError )
+QByteArray* SmfTransportManagerUtil::inflateResponse ( QByteArray &aResponse, SmfError& aError )
 	{
-	Q_UNUSED(aError)
+	qDebug()<<"Inside SmfTransportManagerUtil::inflateResponse()";
+	
 	// Read the response from the device
-	SmfPluginManager::getInstance()->server()->writeLog("Encoded response content = "+QString(aResponse.toHex()));
-	SmfPluginManager::getInstance()->server()->writeLog("Encoded response content size = "+QString::number(aResponse.size(), 10));
+	qDebug()<<"Encoded response content size = "<<aResponse.size();
+	
+	if(aResponse.size() <= 0)
+		{
+		aError = SmfTMUnknownContentError;
+		return NULL;
+		}
 	
 	// Get the uncompressed size of the response (last 4 bytes of the compressed data as per GZIP format spec)
 	QByteArray sizeStr;
 	for(int count = 1 ; count <= 4 ; count++)
 		sizeStr.append(aResponse[aResponse.size()-count]);
-	SmfPluginManager::getInstance()->server()->writeLog("Size string as a string = "+QString(sizeStr.toHex()));
+	qDebug()<<"Size string as a string = "<<QString(sizeStr.toHex());
 	bool ok = false;
 	int uncomSize = sizeStr.toHex().toInt(&ok, 16);
-	SmfPluginManager::getInstance()->server()->writeLog("Size of uncompressed data = "+QString::number(uncomSize, 10));
+	qDebug()<<"Size of uncompressed data = "<<uncomSize;
 
 	// Initialize the data required for zlib method call
 	z_stream stream;
 	unsigned char *out = new unsigned char[uncomSize];
 	if(out)
-		SmfPluginManager::getInstance()->server()->writeLog("Memory allocated for output buffer");
+		qDebug()<<"Memory allocated for output buffer";
 	else
 		{
 		//Error
-		SmfPluginManager::getInstance()->server()->writeLog("Memory not allocated for output buffer!!!");
+		qDebug()<<"Memory not allocated for output buffer!!!";
+		aError = SmfMemoryAllocationFailure;
 		return NULL;
 		}
 	stream.zalloc = Z_NULL;
@@ -549,11 +690,19 @@
 	stream.next_in = Z_NULL;
 	
 	int ret = inflateInit2(&stream, 16+MAX_WBITS);
-	SmfPluginManager::getInstance()->server()->writeLog("return value of inflateInit2() = "+QString::number(ret, 10));
+	qDebug()<<"return value of inflateInit2() = "<<ret;
 	if(Z_OK != ret)
 		{
-		SmfPluginManager::getInstance()->server()->writeLog("Error in inflateInit2, returning...");
+		qDebug()<<"Error in inflateInit2, returning...";
 		delete[] out;
+		if(Z_STREAM_ERROR == ret)
+			aError = SmfTMGzipStreamError;
+		else if(Z_MEM_ERROR == ret)
+			aError = SmfTMGzipMemoryError;
+		else if(Z_DATA_ERROR == ret)
+			aError = SmfTMGzipDataError;
+		else
+			aError = SmfUnknownError;
 		return NULL;
 		}
 
@@ -564,7 +713,7 @@
 	stream.next_out = out;
 	
 	ret = inflate(&stream, Z_NO_FLUSH);
-	SmfPluginManager::getInstance()->server()->writeLog("return value of inflate() = "+QString::number(ret, 10));
+	qDebug()<<"return value of inflate() = "<<ret;
 	
 	switch (ret) 
 		{
@@ -575,42 +724,209 @@
 			{
 			(void)inflateEnd(&stream);
 			delete[] out;
+			aError = SmfTMGzipDataError;
 			return NULL;
 			}
 		}
 
-	SmfPluginManager::getInstance()->server()->writeLog("total bytes read so far = "+QString::number(stream.total_in, 10));
-	SmfPluginManager::getInstance()->server()->writeLog("total bytes output so far = "+QString::number(stream.total_out, 10));
+	qDebug()<<"total bytes read so far = "<<stream.total_in;
+	qDebug()<<"total bytes output so far = "<<stream.total_out;
 
 	// Write the inflated data to a QByteArray
-	QByteArray *uncompressedData = new QByteArray((char *)out);
+	QByteArray *uncompressedData = new QByteArray((char *)out, stream.total_out);
 	delete[] out;
 	
 	// If there is some unwanted data at the end of uncompressed data, chop them
 	int chopLength = uncompressedData->size() - uncomSize;
-	SmfPluginManager::getInstance()->server()->writeLog("uncompressedData before chopping = "+QString(uncompressedData->toHex()));
-	SmfPluginManager::getInstance()->server()->writeLog("old size of uncompressed data = "+QString::number(uncompressedData->size(), 10));
+	qDebug()<<"old size of uncompressed data = "<<uncompressedData->size();
 	uncompressedData->chop(chopLength);
-	SmfPluginManager::getInstance()->server()->writeLog("new size of uncompressed data = "+QString::number(uncompressedData->size(), 10));
-	SmfPluginManager::getInstance()->server()->writeLog("uncompressedData after chopping = "+QString(uncompressedData->toHex()));
-
-	// Write the uncompressed data to a file
-	QFile file1("c:\\data\\uncompressedflickrresponse.txt");
-	if (!file1.open(QIODevice::WriteOnly))
-		SmfPluginManager::getInstance()->server()->writeLog("File to write the uncompressed response could not be opened");
-	file1.write(uncompressedData->data());
-	file1.close();
-	SmfPluginManager::getInstance()->server()->writeLog("uncompressed data written to c:\\data\\uncompressedflickrresponse.txt");
+	qDebug()<<"new size of uncompressed data = "<<uncompressedData->size();
 	
 	return uncompressedData;
 	}
 
+
+/**
+ * Method to deflate a network request to gzip format.
+ * @param aResponse The QByteArray that has to be gzipped
+ * @param aError Argument indicating error
+ * @return a QByteArray* containing the deflated data. If deflation fails, 
+ * NULL is returned
+ */
+QByteArray* SmfTransportManagerUtil::deflateRequest( QByteArray &aResponse, SmfError& aError )
+	{
+	qDebug()<<"Inside SmfTransportManagerUtil::deflateRequest()";
+	
+	if(aResponse.size() <= 0)
+		{
+		aError = SmfTMUnknownContentError;
+		return NULL;
+		}
+	
+	// Initialize the data required for zlib initialize method call
+	z_stream stream;
+	stream.zalloc = Z_NULL;
+	stream.zfree = Z_NULL;
+	stream.opaque = Z_NULL;
+	stream.next_in = (unsigned char *)aResponse.data();
+	stream.avail_in = aResponse.size();
+	stream.total_out = 0;
+
+	int level = Z_DEFAULT_COMPRESSION;
+	int method = Z_DEFLATED;
+	int windowBits = 16+MAX_WBITS;
+	int mem_level = 8;
+	int strategy = Z_DEFAULT_STRATEGY;
+	
+	// Call deflateInit2 for gzip compression initialization
+	int initError = deflateInit2(&stream, level, method, windowBits, mem_level, strategy);
+	qDebug()<<"Return value of deflateInit2() = "<<initError;
+	qDebug()<<"Error msg if any = "<<QString(zError(initError));
+	
+	if(Z_OK != initError)
+		{
+		qDebug()<<"deflateInit2() failed, returning error = "<<QString(zError(initError));
+		
+		if(Z_STREAM_ERROR == initError)
+			aError = SmfTMGzipStreamError;
+		else if(Z_MEM_ERROR == initError)
+			aError = SmfTMGzipMemoryError;
+		else if(Z_DATA_ERROR == initError)
+			aError = SmfTMGzipDataError;
+		else
+			aError = SmfUnknownError;
+		return NULL;
+		}
+
+	// Initialize the data required for inflate() method call
+	int out_size = (int)((aResponse.size()*1.01)+17);
+	unsigned char *out = new unsigned char[out_size];
+	if(out)
+		{
+		qDebug()<<"Memory allocated for output buffer with size = "<<out_size;
+		memset(out, 0, out_size);
+		}
+	else
+		{
+		//Error
+		qDebug()<<"Memory not allocated for output buffer!!!";
+		
+		deflateEnd(&stream);
+		aError = SmfTMGzipDataError;
+		return NULL;
+		}
+
+	stream.next_out = out;
+	stream.avail_out = out_size;
+	
+#ifdef DETAILEDDEBUGGING
+	qDebug()<<"Before calling deflate()";
+	qDebug()<<"next_in = "<<(long)stream.next_in;
+	qDebug()<<"avail_in = "<<stream.avail_in;
+	qDebug()<<"next_out = "<<(long)stream.next_out;
+	qDebug()<<"avail_out = "<<stream.avail_out;
+	qDebug()<<"total_in = "<<stream.total_in;
+	qDebug()<<"total_out = "<<stream.total_out;
+#endif
+	
+	int deflateStatus;
+	do
+		{
+		stream.next_out = out + stream.total_out;
+		stream.avail_out = out_size - stream.total_out;
+		
+		deflateStatus = deflate(&stream, Z_FINISH);
+		qDebug()<<"Return value of deflate() is = "<<deflateStatus;
+		qDebug()<<"Error msg if any = "<<QString(zError(deflateStatus));
+		
+#ifdef DETAILEDDEBUGGING
+		qDebug()<<"avail_in = "<<stream.avail_in;
+		qDebug()<<"avail_out = "<<stream.avail_out;
+		qDebug()<<"total_in = "<<stream.total_in;
+		qDebug()<<"total_out = "<<stream.total_out;
+#endif
+		
+		}while(Z_OK == deflateStatus);
+	
+     if (Z_STREAM_END != deflateStatus)  
+     {  
+         QString errorMsg;  
+         switch (deflateStatus)  
+         {  
+             case Z_ERRNO:  
+                 errorMsg.append("Error occured while reading file.");
+                 aError = SmfUnknownError;
+                 break;  
+             case Z_STREAM_ERROR:  
+                 errorMsg.append("The stream state was inconsistent (e.g., next_in or next_out was NULL).");
+                 aError = SmfTMGzipStreamError;
+                 break;  
+             case Z_DATA_ERROR:  
+                 errorMsg.append("The deflate data was invalid or incomplete.");
+                 aError = SmfTMGzipDataError;
+                 break;  
+             case Z_MEM_ERROR:  
+                 errorMsg.append("Memory could not be allocated for processing.");
+                 aError = SmfTMGzipMemoryError;
+                 break;  
+             case Z_BUF_ERROR:  
+                 errorMsg.append("Ran out of output buffer for writing compressed bytes.");
+                 aError = SmfTMGzipMemoryError;
+                 break;  
+             case Z_VERSION_ERROR:  
+                 errorMsg.append("The version of zlib.h and the version of the library linked do not match.");
+                 aError = SmfUnknownError;
+                 break;  
+             default:  
+                 errorMsg.append("Unknown error code.");
+                 aError = SmfUnknownError;
+         }  
+   
+         qDebug()<<"Error string for deflate() is = "<<errorMsg;
+         
+         // Free data structures that were dynamically created for the stream.  
+         deflateEnd(&stream);  
+   
+         return NULL;  
+     } 
+			
+     int retVal = deflateEnd(&stream);
+	qDebug()<<"Return value of deflateEnd() = "<<retVal;
+	qDebug()<<"Error msg if any = "<<QString(zError(retVal));
+
+#ifdef DETAILEDDEBUGGING
+	/*QByteArray byteArray;
+	for (int i=0; i<stream.total_out;i++)
+		{
+		QString str(out[i]);
+		byteArray.clear();
+		byteArray.append(str.toAscii());
+		qDebug()<<QString("out[%1] = '%2'").arg(i).arg(QString(byteArray.toHex()));
+		}*/
+#endif
+	
+	// Write the inflated data to a QByteArray
+	QByteArray *compressedData = new QByteArray((char*)out, stream.total_out);
+	delete[] out;
+	qDebug()<<"Number of bytes of compressed data = "<<compressedData->size();
+	
+#ifdef DETAILEDDEBUGGING
+	qDebug()<<"compressed data = "<<QString(compressedData->toHex());
+#endif
+	
+	return compressedData;
+	}
+
+
+
 /**
  * Method called when the QNetworkReply detects an error in processing.
  * @param aError The QNetworkReply error code 
  */
 void SmfTransportManagerUtil::networkReplyError ( QNetworkReply::NetworkError aError )
 	{
+	qDebug()<<"Inside SmfTransportManagerUtil::networkReplyError()";
+	
 	// indicate the error to the plugin manager
 	SmfTransportResult trResult;
 	convertErrorType(aError, trResult);
--- a/smf/smfservermodule/smfserver/transportmgr/smftransportmanagerutil.h	Mon Jun 07 11:43:45 2010 +0100
+++ b/smf/smfservermodule/smfserver/transportmgr/smftransportmanagerutil.h	Wed Jun 23 19:51:49 2010 +0530
@@ -185,14 +185,22 @@
 			SmfTransportResult &aResult );
 	
 	/**
-	 * Method to deflate a gzipped network response. Once this method is called, 
-	 * QNetworkReply internal buffer for holding network response is emptied.
-	 * @param aResponse The QByteArray instance holding the gzip encoded data
+	 * Method to inflate a gzipped network response.
+	 * @param aResponse The QByteArray holding the gzip encoded data
 	 * @param aError Argument indicating error
-	 * @return a QByteArray* containing the deflated data. If deflating fails, 
-	 * the encoded data itself without deflation is returned.
+	 * @return a QByteArray* containing the inflated data. If inflation fails, 
+	 * NULL is returned
 	 */
-	QByteArray* inflateResponse ( QByteArray &aResponse, int& aError );
+	QByteArray* inflateResponse ( QByteArray &aResponse, SmfError& aError );
+	
+	/**
+	 * Method to deflate a network request to gzip format.
+	 * @param aResponse The QByteArray that has to be gzipped
+	 * @param aError Argument indicating error
+	 * @return a QByteArray* containing the deflated data. If deflation fails, 
+	 * NULL is returned
+	 */
+	QByteArray* deflateRequest( QByteArray &aResponse, SmfError& aError );
 	
 private:
 	/**
--- a/smf/smfservermodule/smfservermodule.pro	Mon Jun 07 11:43:45 2010 +0100
+++ b/smf/smfservermodule/smfservermodule.pro	Wed Jun 23 19:51:49 2010 +0530
@@ -1,6 +1,7 @@
 TEMPLATE  = 	subdirs
 
 SUBDIRS   =	util \
-                smfserver \
-                smfclient \
-                tests
+		smfclient \
+		smfserver \
+		tests
+CONFIG += ordered
--- a/smf/smfservermodule/util/qjson/qjson.pro	Mon Jun 07 11:43:45 2010 +0100
+++ b/smf/smfservermodule/util/qjson/qjson.pro	Wed Jun 23 19:51:49 2010 +0530
@@ -1,6 +1,2 @@
 TEMPLATE = subdirs
-SUBDIRS = sub_src # sub_unittest
-
-sub_src.subdir = src
-sub_unittest.subdir = tests
-sub_unittest.depends = sub_src
+SUBDIRS = src
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/smf/smfservermodule/util/qjson/src/bwins/qjsonu.def	Wed Jun 23 19:51:49 2010 +0530
@@ -0,0 +1,46 @@
+EXPORTS
+	??0Parser@QJson@@QAE@XZ @ 1 NONAME ; QJson::Parser::Parser(void)
+	??0ParserRunnable@QJson@@QAE@PAVQObject@@@Z @ 2 NONAME ; QJson::ParserRunnable::ParserRunnable(class QObject *)
+	??0QObjectHelper@QJson@@QAE@XZ @ 3 NONAME ; QJson::QObjectHelper::QObjectHelper(void)
+	??0Serializer@QJson@@QAE@XZ @ 4 NONAME ; QJson::Serializer::Serializer(void)
+	??0SerializerRunnable@QJson@@QAE@PAVQObject@@@Z @ 5 NONAME ; QJson::SerializerRunnable::SerializerRunnable(class QObject *)
+	??1Parser@QJson@@QAE@XZ @ 6 NONAME ; QJson::Parser::~Parser(void)
+	??1ParserRunnable@QJson@@UAE@XZ @ 7 NONAME ; QJson::ParserRunnable::~ParserRunnable(void)
+	??1QObjectHelper@QJson@@QAE@XZ @ 8 NONAME ; QJson::QObjectHelper::~QObjectHelper(void)
+	??1Serializer@QJson@@QAE@XZ @ 9 NONAME ; QJson::Serializer::~Serializer(void)
+	??1SerializerRunnable@QJson@@UAE@XZ @ 10 NONAME ; QJson::SerializerRunnable::~SerializerRunnable(void)
+	??_EParserRunnable@QJson@@UAE@I@Z @ 11 NONAME ; QJson::ParserRunnable::~ParserRunnable(unsigned int)
+	??_ESerializerRunnable@QJson@@UAE@I@Z @ 12 NONAME ; QJson::SerializerRunnable::~SerializerRunnable(unsigned int)
+	?errorLine@Parser@QJson@@QBEHXZ @ 13 NONAME ; int QJson::Parser::errorLine(void) const
+	?errorString@Parser@QJson@@QBE?AVQString@@XZ @ 14 NONAME ; class QString QJson::Parser::errorString(void) const
+	?getStaticMetaObject@ParserRunnable@QJson@@SAABUQMetaObject@@XZ @ 15 NONAME ; struct QMetaObject const & QJson::ParserRunnable::getStaticMetaObject(void)
+	?getStaticMetaObject@SerializerRunnable@QJson@@SAABUQMetaObject@@XZ @ 16 NONAME ; struct QMetaObject const & QJson::SerializerRunnable::getStaticMetaObject(void)
+	?metaObject@ParserRunnable@QJson@@UBEPBUQMetaObject@@XZ @ 17 NONAME ; struct QMetaObject const * QJson::ParserRunnable::metaObject(void) const
+	?metaObject@SerializerRunnable@QJson@@UBEPBUQMetaObject@@XZ @ 18 NONAME ; struct QMetaObject const * QJson::SerializerRunnable::metaObject(void) const
+	?parse@Parser@QJson@@QAE?AVQVariant@@ABVQByteArray@@PA_N@Z @ 19 NONAME ; class QVariant QJson::Parser::parse(class QByteArray const &, bool *)
+	?parse@Parser@QJson@@QAE?AVQVariant@@PAVQIODevice@@PA_N@Z @ 20 NONAME ; class QVariant QJson::Parser::parse(class QIODevice *, bool *)
+	?parsingFinished@ParserRunnable@QJson@@IAEXABVQVariant@@_NABVQString@@@Z @ 21 NONAME ; void QJson::ParserRunnable::parsingFinished(class QVariant const &, bool, class QString const &)
+	?parsingFinished@SerializerRunnable@QJson@@IAEXABVQByteArray@@_NABVQString@@@Z @ 22 NONAME ; void QJson::SerializerRunnable::parsingFinished(class QByteArray const &, bool, class QString const &)
+	?qobject2qvariant@QObjectHelper@QJson@@SA?AV?$QMap@VQString@@VQVariant@@@@PBVQObject@@ABVQStringList@@@Z @ 23 NONAME ; class QMap<class QString, class QVariant> QJson::QObjectHelper::qobject2qvariant(class QObject const *, class QStringList const &)
+	?qt_metacall@ParserRunnable@QJson@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 24 NONAME ; int QJson::ParserRunnable::qt_metacall(enum QMetaObject::Call, int, void * *)
+	?qt_metacall@SerializerRunnable@QJson@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 25 NONAME ; int QJson::SerializerRunnable::qt_metacall(enum QMetaObject::Call, int, void * *)
+	?qt_metacast@ParserRunnable@QJson@@UAEPAXPBD@Z @ 26 NONAME ; void * QJson::ParserRunnable::qt_metacast(char const *)
+	?qt_metacast@SerializerRunnable@QJson@@UAEPAXPBD@Z @ 27 NONAME ; void * QJson::SerializerRunnable::qt_metacast(char const *)
+	?qvariant2qobject@QObjectHelper@QJson@@SAXABV?$QMap@VQString@@VQVariant@@@@PAVQObject@@@Z @ 28 NONAME ; void QJson::QObjectHelper::qvariant2qobject(class QMap<class QString, class QVariant> const &, class QObject *)
+	?run@ParserRunnable@QJson@@UAEXXZ @ 29 NONAME ; void QJson::ParserRunnable::run(void)
+	?run@SerializerRunnable@QJson@@UAEXXZ @ 30 NONAME ; void QJson::SerializerRunnable::run(void)
+	?serialize@Serializer@QJson@@QAE?AVQByteArray@@ABVQVariant@@@Z @ 31 NONAME ; class QByteArray QJson::Serializer::serialize(class QVariant const &)
+	?serialize@Serializer@QJson@@QAEXABVQVariant@@PAVQIODevice@@PA_N@Z @ 32 NONAME ; void QJson::Serializer::serialize(class QVariant const &, class QIODevice *, bool *)
+	?setData@ParserRunnable@QJson@@QAEXABVQByteArray@@@Z @ 33 NONAME ; void QJson::ParserRunnable::setData(class QByteArray const &)
+	?setJsonObject@SerializerRunnable@QJson@@QAEXABVQVariant@@@Z @ 34 NONAME ; void QJson::SerializerRunnable::setJsonObject(class QVariant const &)
+	?tr@ParserRunnable@QJson@@SA?AVQString@@PBD0@Z @ 35 NONAME ; class QString QJson::ParserRunnable::tr(char const *, char const *)
+	?tr@ParserRunnable@QJson@@SA?AVQString@@PBD0H@Z @ 36 NONAME ; class QString QJson::ParserRunnable::tr(char const *, char const *, int)
+	?tr@SerializerRunnable@QJson@@SA?AVQString@@PBD0@Z @ 37 NONAME ; class QString QJson::SerializerRunnable::tr(char const *, char const *)
+	?tr@SerializerRunnable@QJson@@SA?AVQString@@PBD0H@Z @ 38 NONAME ; class QString QJson::SerializerRunnable::tr(char const *, char const *, int)
+	?trUtf8@ParserRunnable@QJson@@SA?AVQString@@PBD0@Z @ 39 NONAME ; class QString QJson::ParserRunnable::trUtf8(char const *, char const *)
+	?trUtf8@ParserRunnable@QJson@@SA?AVQString@@PBD0H@Z @ 40 NONAME ; class QString QJson::ParserRunnable::trUtf8(char const *, char const *, int)
+	?trUtf8@SerializerRunnable@QJson@@SA?AVQString@@PBD0@Z @ 41 NONAME ; class QString QJson::SerializerRunnable::trUtf8(char const *, char const *)
+	?trUtf8@SerializerRunnable@QJson@@SA?AVQString@@PBD0H@Z @ 42 NONAME ; class QString QJson::SerializerRunnable::trUtf8(char const *, char const *, int)
+	?staticMetaObject@SerializerRunnable@QJson@@2UQMetaObject@@B @ 43 NONAME ; struct QMetaObject const QJson::SerializerRunnable::staticMetaObject
+	?staticMetaObject@ParserRunnable@QJson@@2UQMetaObject@@B @ 44 NONAME ; struct QMetaObject const QJson::ParserRunnable::staticMetaObject
+
--- a/smf/smfservermodule/util/qjson/src/src.pro	Mon Jun 07 11:43:45 2010 +0100
+++ b/smf/smfservermodule/util/qjson/src/src.pro	Wed Jun 23 19:51:49 2010 +0530
@@ -4,6 +4,7 @@
 TEMPLATE = lib
 QT      -= gui
 TARGET   = qjson
+DESTDIR  = $$QJSON_BASE/lib
 CONFIG += create_prl
 
 # SMF dest directory for desktop builds
@@ -61,7 +62,13 @@
 
   # uid for the dll
   TARGET.UID3=0xEe29a5ee
-  TARGET.CAPABILITY = ReadDeviceData WriteDeviceData
+  TARGET.CAPABILITY = ReadUserData \
+        WriteUserData \
+        LocalServices \
+        NetworkServices \
+        UserEnvironment \
+    ReadDeviceData \
+    WriteDeviceData
 
   # do not freeze api-> no libs produced. Comment when freezing!
   # run "abld freeze winscw" to create def files
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/smf/smfsettingsui/PlatfromIndependentSettings.cpp	Wed Jun 23 19:51:49 2010 +0530
@@ -0,0 +1,132 @@
+/**
+* Copyright (c) 2010 Sasken Communication Technologies Ltd.
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the "{License}"
+* which accompanies  this distribution, and is available
+* at the URL "{LicenseUrl}".
+*
+* Initial Contributors:
+* Narasimhulu Kavadapu, Sasken Communication Technologies Ltd - Initial contribution
+*
+* Contributors:
+*
+* Description:
+* Platform Independent Settings Class
+*/
+
+#include "PlatfromIndependentSettings.h"
+
+#ifndef __FOR_SYMBIAN__
+
+#include "SettingsConstants.h"
+
+CPFIndSettings::CPFIndSettings()
+    {
+		iSettings = new QSettings(QSettings::SystemScope,"Sasken","SMF");
+    }
+
+CPFIndSettings::~CPFIndSettings()
+    {
+	 if(iSettings)
+		{
+			delete iSettings;
+			iSettings = NULL;
+		}
+    }
+/*
+
+ * Method to set the PluginDetails to  QSettings
+ * Param - @aPluginStatus,holds the Plgugin Status.
+ */
+void CPFIndSettings::SetPluginDetails(QString& aPluginName,QString& aPluginStatus)
+	{
+		iSettings->setValue(KSettingsUIPluginNameKey,aPluginName);
+		iSettings->setValue(KSettingsUIPluginStausKey,aPluginStatus);
+	}
+/*
+ * Method to set the Auth Expiry Value to  QSettings
+ * Param - @aVal,Auth Expiry Value
+ */
+void CPFIndSettings::SetAuthExpirationValue(QString& aVal)
+	{
+		iSettings->setValue(KSettingsUIAuthExpLimitKey,aVal);
+	}
+/*
+ * Method to set the Max. Data Transfer Limit to  QSettings
+ * Param - @aVal,Max. Data Transfer Limit Value
+ */
+void CPFIndSettings::SetMaxDataTransferLimit(QString& aVal)
+	{
+		iSettings->setValue(KSettingsUIMaxDataTransferLimitKey,aVal);
+	}
+/*
+ * Method to set the Roaming Status for Data Transfer to  QSettings
+ * Param - @aStatus,Rpaming Status value for Data Transfer
+ */
+void CPFIndSettings::SetRoamingStatusforDataTransfer(QString& aStatus)
+	{
+		iSettings->setValue(KSettingsUIRoamingStatusKey,aStatus);
+	}
+/*
+ * Method to set the Upload File Type to  QSettings
+ * Param - @aStatus,Upload File Type Value
+ */
+void CPFIndSettings::SetUploadFileType(QString& aFileType)
+	{
+		iSettings->setValue(KSettingsUIUploadFileTypeKey,aFileType);
+	}
+/*
+ * Method to Get the PluginDetails from  QSettings
+ */
+QStringList CPFIndSettings::GetPluginDetails() const
+	{
+		QVariant Value;
+		QStringList PluginDetails;
+
+		Value = iSettings->value(KSettingsUIPluginNameKey,Value);
+		PluginDetails.append(Value.toString());
+		
+		Value =  iSettings->value(KSettingsUIPluginStausKey,Value);
+		PluginDetails.append(Value.toString());
+		
+		return PluginDetails;
+	}
+/*
+ * Method to Get the Auth Expiry Value from  QSettings
+ */
+QString CPFIndSettings::GetAuthExpirationValue() const
+	{
+		QVariant Value;
+		Value = iSettings->value(KSettingsUIAuthExpLimitKey,Value);
+		return Value.toString();
+	}
+/*
+ * Method to Get the Max. Data Transfer Limit from  QSettings
+ */
+QString CPFIndSettings::GetMaxDataTransferLimit() const
+	{
+		QVariant Value;
+		Value = iSettings->value(KSettingsUIMaxDataTransferLimitKey,Value);
+		return Value.toString();
+	}
+/*
+ * Method to Get the Roaming Status for Data Transfer from QSettings
+ */
+QString CPFIndSettings::GetRoamingStatusforDataTransfer() const
+	{
+		QVariant Value;
+		Value = iSettings->value(KSettingsUIRoamingStatusKey,Value);
+		return Value.toString();
+	}
+/*
+ * Method to Get the Upload File Type from QSettings
+ */
+QString CPFIndSettings::GetUploadFileType() const
+	{
+		QVariant Value;
+		Value = iSettings->value(KSettingsUIUploadFileTypeKey,Value);
+		return Value.toString();
+	}
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/smf/smfsettingsui/PlatfromIndependentSettings.h	Wed Jun 23 19:51:49 2010 +0530
@@ -0,0 +1,108 @@
+/**
+* Copyright (c) 2010 Sasken Communication Technologies Ltd.
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the "{License}"
+* which accompanies  this distribution, and is available
+* at the URL "{LicenseUrl}".
+*
+* Initial Contributors:
+* Narasimhulu Kavadapu, Sasken Communication Technologies Ltd - Initial contribution
+*
+* Contributors:
+*
+* Description:
+* Platform Independent Settings Class
+*/
+#include "SettingsConstants.h"
+
+#ifndef __FOR_SYMBIAN__
+
+#ifndef PLATFROMINDEPENDENTSETTINGS_H_
+#define PLATFROMINDEPENDENTSETTINGS_H_
+
+#include <qsettings.h>
+#include <qstringlist.h>
+/*!
+  @class CPFIndSettings
+
+  @discussion An instance Platform Independent Settings class 
+  to set/get setting values to/from symbian repository.
+  */
+class CPFIndSettings : public QObject
+    {
+public:
+
+
+/*!
+  @function ~CPFIndSettings
+
+  @discussion Destroy the object and release all memory objects
+  */
+     ~CPFIndSettings();
+
+	/*!
+	  @function CPFIndSettings
+
+	  @discussion Construct the Settings Object
+	  */
+
+	    CPFIndSettings();
+	/*
+	 * Method to set the PluginDetails to QSettings
+	 * Parm - @aPluginName,Name of the plugin
+	 * Param - @aPluginStatus,holds the Plgugin Status.
+	 */
+	void SetPluginDetails(QString& aPluginName,QString& aPluginStatus);
+	/*
+	 * Method to set the Auth Expiry Value to QSettings
+	 * Param - @aVal,Auth Expiry Value
+	 */
+	void SetAuthExpirationValue(QString& aVal);
+	/*
+	 * Method to set the Max. Data Transfer Limit to QSettings
+	 * Param - @aVal,Max. Data Transfer Limit Value
+	 */
+	void SetMaxDataTransferLimit(QString& aVal);
+	/*
+	 * Method to set the Roaming Status for Data Transfer to QSettings
+	 * Param - @aStatus,Rpaming Status value for Data Transfer
+	 */
+	void SetRoamingStatusforDataTransfer(QString& aStatus);
+	/*
+	 * Method to set the Upload File Type to QSettings
+	 * Param - @aStatus,Upload File Type Value
+	 */
+	void SetUploadFileType(QString& aFileType);
+	/*
+	 * Method to Get the PluginDetails from QSettings
+	 */
+	QStringList GetPluginDetails() const;
+	/*
+	 * Method to Get the Auth Expiry Value from QSettings
+	 */
+	QString GetAuthExpirationValue() const;
+	/*
+	 * Method to Get the Max. Data Transfer Limit from QSettings
+	 */
+	QString GetMaxDataTransferLimit() const;
+	/*
+	 * Method to Get the Roaming Status for Data Transfer from QSettings
+	 */
+	QString GetRoamingStatusforDataTransfer() const;
+	/*
+	 * Method to Get the Upload File Type from QSettings
+	 */
+	QString GetUploadFileType() const;
+
+private:
+    /*!
+     Pointer to the QSettings Object
+      */
+    QSettings*  iSettings;
+
+    };
+
+#endif /* PLATFROMINDEPENDENTSETTINGS_H_ */
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/smf/smfsettingsui/SMFSettings.cpp	Wed Jun 23 19:51:49 2010 +0530
@@ -0,0 +1,321 @@
+/**
+* Copyright (c) 2010 Sasken Communication Technologies Ltd.
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the "{License}"
+* which accompanies  this distribution, and is available
+* at the URL "{LicenseUrl}".
+*
+* Initial Contributors:
+* Narasimhulu Kavadapu, Sasken Communication Technologies Ltd - Initial contribution
+*
+* Contributors:
+*
+* Description:
+* Settings UI class of SMF 
+*/
+
+#include "SMFSettings.h"
+#include "qmessagebox.h"
+#include "qdesktopwidget.h"
+#include "qmenubar.h"	//menubar
+
+/*
+ * Constructor
+ * param@Qwidget - Parenet widget
+ */
+SMFSettings::SMFSettings(/*QWidget *parent*/)
+    
+{
+	ui = new Ui::SMFSettingsClass;
+	QWidget *widget = new QWidget;
+	setCentralWidget(widget);
+	//Set up UI 
+	ui->setupUi(widget);
+	QDesktopWidget *desktop = QApplication::desktop();
+	//get client rect.
+	QRect clientRect = desktop->availableGeometry(); 
+	widget->setGeometry(clientRect);
+	
+	//createActions();
+	createMenuActions();
+	
+	//Instance of CSettingsRepository
+	#ifdef __FOR_SYMBIAN__
+		iSettingsRepository = CSettingsRepository::NewL();
+	#else
+		iSettingsRepository = new CPFIndSettings;
+	#endif
+		
+	//Call method to get default/initial settings
+	GetDefaultSettings();
+	//make a connection for savebutton,on click it should call SaveSettings slot.
+	//connect(ui->SaveButton,SIGNAL(clicked()),this,SLOT(SaveSettings()));
+	//make a connection for Cancelebutton,on click it should clear the settings in UI.
+	//connect(ui->CancelButton,SIGNAL(clicked()),this,SLOT(ClearData()));
+}
+
+/*
+ * Destructor
+ */
+SMFSettings::~SMFSettings()
+{
+	//delete the ui object.
+	delete ui;
+	
+	if(iSettingsRepository){
+		delete iSettingsRepository;
+		iSettingsRepository = NULL;
+	}
+}
+void SMFSettings::createMenuActions()
+{
+    QAction *saveAct = new QAction(tr("&Save"), this);
+    saveAct->setShortcut(tr("Ctrl+S", "Save"));
+    menuBar()->addAction(saveAct);
+    connect(saveAct, SIGNAL(triggered()), this, SLOT(SaveSettings()));
+
+    QAction *resetAct = new QAction(tr("&Reset"), this);
+    menuBar()->addAction(resetAct);
+    connect(resetAct, SIGNAL(triggered()), this, SLOT(ClearData()));
+
+}
+/*void SMFSettings::createMenus()
+{
+    QMenu *saveMenu = menuBar()->addMenu(tr("&Save"));
+    //saveMenu->addAction(saveAct);
+    connect(saveMenu->activeAction(), SIGNAL(triggered()), this, SLOT(SaveSettings()));
+
+    menuBar()->addSeparator();
+
+    QMenu *resetMenu = menuBar()->addMenu(tr("&Reset"));
+    connect(resetMenu->activeAction(), SIGNAL(triggered()), this, SLOT(ClearData()));
+    //resetMenu->addAction(resetAct);
+}*/
+/*
+ * Method to set the PluginDetails to UI
+ * Param - @aPluginStatus,holds the Plgugin Status.
+ */
+void SMFSettings::SetPluginDetails(QString aPluginName,QString aPluginStatus)
+{
+	int indice;
+	
+	indice = ui->PluginlistboxBox->findText(aPluginName);
+	if(indice == -1)
+		ui->PluginlistboxBox->setCurrentIndex(0) ;
+	else
+		ui->PluginlistboxBox->setCurrentIndex(indice) ;
+	
+	indice = ui->pluginstatusbox->findText(aPluginStatus);
+	if(indice == -1)
+		ui->pluginstatusbox->setCurrentIndex(0) ;
+	else
+		ui->pluginstatusbox->setCurrentIndex(indice) ;
+	
+}
+/*
+ * Method to set the Auth Expiry Value to UI
+ * Param - @aVal,Auth Expiry Value
+ */
+void SMFSettings::SetAuthExpirationValue(QString aVal)
+{
+	int indice = ui->AuthExplimitbox->findText(aVal);
+	if(indice == -1)
+		ui->AuthExplimitbox->setCurrentIndex(0) ;
+	else
+		ui->AuthExplimitbox->setCurrentIndex(indice) ;
+}
+/*
+ * Method to set the Max. Data Transfer Limit to UI
+ * Param - @aVal,Max. Data Transfer Limit Value
+ */
+void SMFSettings::SetMaxDataTransferLimit(QString aVal)
+{
+	int indice = ui->MaxDataTransferlimitBox->findText(aVal);
+	if(indice == -1)
+		ui->MaxDataTransferlimitBox->setCurrentIndex(0) ;
+	else
+		ui->MaxDataTransferlimitBox->setCurrentIndex(indice) ;
+}
+/*
+ * Method to set the Roaming Status for Data Transfer to UI
+ * Param - @aStatus,Rpaming Status value for Data Transfer
+ */
+void SMFSettings::SetRoamingStatusforDataTransfer(QString aStatus)
+{
+	int indice = ui->RoamingStatusBox->findText(aStatus);
+	if(indice == -1)
+		ui->RoamingStatusBox->setCurrentIndex(0) ;
+	else
+		ui->RoamingStatusBox->setCurrentIndex(indice) ;
+}
+/*
+ * Method to set the Upload File Type to UI
+ * Param - @aStatus,Upload File Type Value
+ */
+void SMFSettings::SetUploadFileType(QString aFileType)
+{
+	int indice = ui->Uploadfiletypebox->findText(aFileType);
+	if(indice == -1)
+		ui->Uploadfiletypebox->setCurrentIndex(0) ;
+	else
+		ui->Uploadfiletypebox->setCurrentIndex(indice) ;
+}
+/*
+ * Method to Get the PluginDetails from UI
+ */
+QStringList SMFSettings::GetPluginDetails() const
+{
+	QStringList PluginDetails;
+	PluginDetails.append(ui->PluginlistboxBox->currentText());
+	PluginDetails.append(ui->pluginstatusbox->currentText());
+	return PluginDetails;
+}
+/*
+ * Method to Get the Auth Expiry Value from UI
+ */
+QString SMFSettings::GetAuthExpirationValue() const
+{
+	return ui->AuthExplimitbox->currentText();
+}
+/*
+ * Method to Get the Max. Data Transfer Limit from UI
+ */
+QString SMFSettings::GetMaxDataTransferLimit() const
+{
+	return ui->MaxDataTransferlimitBox->currentText();
+}
+/*
+ * Method to Get the Roaming Status for Data Transfer from UI
+ */
+QString SMFSettings::GetRoamingStatusforDataTransfer() const
+{
+	return ui->RoamingStatusBox->currentText();
+}
+/*
+ * Method to Get the Upload File Type from UI
+ */
+QString SMFSettings::GetUploadFileType() const
+{
+	return ui->Uploadfiletypebox->currentText();
+}
+/*
+ * Method to Reset the UI settings.
+ */
+void SMFSettings::ClearData()
+{
+	//Reset the 
+	ui->PluginlistboxBox->setCurrentIndex(0) ;
+	ui->pluginstatusbox->setCurrentIndex(0) ;
+	ui->AuthExplimitbox->setCurrentIndex(0) ;
+	ui->MaxDataTransferlimitBox->setCurrentIndex(0) ;
+	ui->RoamingStatusBox->setCurrentIndex(0) ;
+	ui->Uploadfiletypebox->setCurrentIndex(0) ;
+}
+
+/*
+ * slot written to set/Save the User input/settings to xml.
+ */
+void SMFSettings::SaveSettings()
+{
+	QStringList PLuginDetails = GetPluginDetails();
+
+	#ifdef __FOR_SYMBIAN__
+		//conversion from QString to Descriptor
+		TPtrC PluginName(static_cast<const TUint16*>(PLuginDetails[0].utf16()), PLuginDetails[0].length());
+		TPtrC PluginStatus(static_cast<const TUint16*>(PLuginDetails[1].utf16()), PLuginDetails[1].length());
+	#else
+		QString PluginName(PLuginDetails[0]);
+		QString PluginStatus(PLuginDetails[1]);
+	#endif
+		
+	iSettingsRepository->SetPluginDetails(PluginName,PluginStatus);
+	
+	
+	#ifdef __FOR_SYMBIAN__
+		//conversion from QString to Descriptor
+		TPtrC AthExpValue(static_cast<const TUint16*>(GetAuthExpirationValue().utf16()), GetAuthExpirationValue().length());
+	#else
+		QString AthExpValue = GetAuthExpirationValue();
+	#endif
+	
+	iSettingsRepository->SetAuthExpirationValue(AthExpValue);
+	
+	#ifdef __FOR_SYMBIAN__
+		//conversion from QString to Descriptor
+		TPtrC MaxDataTrValue(static_cast<const TUint16*>(GetMaxDataTransferLimit().utf16()), GetMaxDataTransferLimit().length());
+	#else
+		QString MaxDataTrValue = GetMaxDataTransferLimit();
+	#endif
+	iSettingsRepository->SetMaxDataTransferLimit(MaxDataTrValue);
+	
+	#ifdef __FOR_SYMBIAN__
+		//conversion from QString to Descriptor
+		TPtrC RoamingStatus(static_cast<const TUint16*>(GetRoamingStatusforDataTransfer().utf16()), GetRoamingStatusforDataTransfer().length());
+	#else
+		QString RoamingStatus = GetRoamingStatusforDataTransfer();
+	#endif
+		
+	iSettingsRepository->SetRoamingStatusforDataTransfer(RoamingStatus);
+	
+	#ifdef __FOR_SYMBIAN__
+	//conversion from QString to Descriptor
+	TPtrC UploadFileType(static_cast<const TUint16*>(GetUploadFileType().utf16()), GetUploadFileType().length());
+	#else
+		QString UploadFileType = GetUploadFileType();
+	#endif
+	iSettingsRepository->SetUploadFileType(UploadFileType);
+	
+	
+	//Create information message box 
+	QMessageBox::information(this, "Information", "Settings Saved!"); 
+	
+
+}
+/*
+ * Method to get the default/initial settings from xml.
+ */
+void SMFSettings::GetDefaultSettings()
+{
+	
+	
+	#ifdef __FOR_SYMBIAN__
+		QString myString;
+		TBuf<KMaxSettingValue> Buf;
+		//conversion from Descriptor to QString
+		myString = QString::fromUtf16(iSettingsRepository->GetPluginDetails()[0].Ptr(), iSettingsRepository->GetPluginDetails()[0].Length());
+		QString PluginStatus = QString::fromUtf16(iSettingsRepository->GetPluginDetails()[1].Ptr(), iSettingsRepository->GetPluginDetails()[1].Length());
+		//Reset the Plugin Details array 
+		iSettingsRepository->GetPluginDetails().Close();
+		SetPluginDetails(myString,PluginStatus);
+		
+		Buf.Copy(iSettingsRepository->GetAuthExpirationValue());
+		//conversion from Descriptor to QString
+		myString = QString::fromUtf16(Buf.Ptr(), Buf.Length());
+		SetAuthExpirationValue(myString);
+		
+		Buf.Copy(iSettingsRepository->GetMaxDataTransferLimit());
+		//conversion from Descriptor to QString
+		myString = QString::fromUtf16(Buf.Ptr(), Buf.Length());
+		SetMaxDataTransferLimit(myString);
+		
+		Buf.Copy(iSettingsRepository->GetRoamingStatusforDataTransfer());
+		//conversion from Descriptor to QString
+		myString = QString::fromUtf16(Buf.Ptr(), Buf.Length());
+		SetRoamingStatusforDataTransfer(myString);
+		
+		Buf.Copy(iSettingsRepository->GetUploadFileType());
+		//conversion from Descriptor to QString
+		myString = QString::fromUtf16(Buf.Ptr(), Buf.Length());
+	SetUploadFileType(myString);
+	#else
+	
+		SetPluginDetails(iSettingsRepository->GetPluginDetails()[0],iSettingsRepository->GetPluginDetails()[1]);
+
+		SetAuthExpirationValue(iSettingsRepository->GetAuthExpirationValue());
+		SetMaxDataTransferLimit(iSettingsRepository->GetMaxDataTransferLimit());
+		SetRoamingStatusforDataTransfer(iSettingsRepository->GetRoamingStatusforDataTransfer());
+		SetUploadFileType(iSettingsRepository->GetUploadFileType());
+	#endif
+	
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/smf/smfsettingsui/SMFSettings.h	Wed Jun 23 19:51:49 2010 +0530
@@ -0,0 +1,128 @@
+/**
+* Copyright (c) 2010 Sasken Communication Technologies Ltd.
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the "{License}"
+* which accompanies  this distribution, and is available
+* at the URL "{LicenseUrl}".
+*
+* Initial Contributors:
+* Narasimhulu Kavadapu, Sasken Communication Technologies Ltd - Initial contribution
+*
+* Contributors:
+*
+* Description:
+* Settings UI class of SMF 
+*/
+
+#ifndef SMFSETTINGS_H
+#define SMFSETTINGS_H
+
+//#include <QtGui/QWidget>
+#include <qmainwindow.h>
+#include "ui_SMFSettings.h"	//for SMFSettingsClass
+#include "SettingsRepository.h"
+#include "PlatfromIndependentSettings.h"
+#include "qlist.h"		//for QList
+#include "qstring.h"	//for QString
+#include "SettingsConstants.h"
+
+/* 
+ * SMFSettings UI Class
+ */
+class SMFSettings : public /*QWidget*/	QMainWindow
+{
+    Q_OBJECT
+
+public:
+	/*
+	 * Constructor
+	 */
+	SMFSettings(/*QWidget *parent = 0*/);
+	/*
+	 * Destructor
+	 */
+    ~SMFSettings();
+    
+public slots:
+	/*
+	 * slot written to set/Save the User input/settings to xml.
+	 */
+    void SaveSettings();
+	/*
+	 * slot written to Reset the UI settings.
+	 */
+	void ClearData();
+private:
+	/*
+	 * Method to get the default/initial settings from xml.
+	 */
+	void GetDefaultSettings();
+	
+	//void createActions();
+	void createMenuActions();
+	
+//Set & Get Methods
+public:
+	/*
+	 * Method to set the PluginDetails to UI
+	 * Param - @aPluginStatus,holds the Plgugin Status.
+	 */
+	void SetPluginDetails(QString aPluginName,QString aPluginStatus);
+	/*
+	 * Method to set the Auth Expiry Value to UI
+	 * Param - @aVal,Auth Expiry Value
+	 */
+	void SetAuthExpirationValue(QString aVal);
+	/*
+	 * Method to set the Max. Data Transfer Limit to UI
+	 * Param - @aVal,Max. Data Transfer Limit Value
+	 */
+	void SetMaxDataTransferLimit(QString aVal);
+	/*
+	 * Method to set the Roaming Status for Data Transfer to UI
+	 * Param - @aStatus,Rpaming Status value for Data Transfer
+	 */
+	void SetRoamingStatusforDataTransfer(QString aStatus);
+	/*
+	 * Method to set the Upload File Type to UI
+	 * Param - @aStatus,Upload File Type Value
+	 */
+	void SetUploadFileType(QString aFileType);
+	/*
+	 * Method to Get the PluginDetails from UI
+	 */
+	QStringList GetPluginDetails() const;
+	/*
+	 * Method to Get the Auth Expiry Value from UI
+	 */
+	QString GetAuthExpirationValue() const;
+	/*
+	 * Method to Get the Max. Data Transfer Limit from UI
+	 */
+	QString GetMaxDataTransferLimit() const;
+	/*
+	 * Method to Get the Roaming Status for Data Transfer from UI
+	 */
+	QString GetRoamingStatusforDataTransfer() const;
+	/*
+	 * Method to Get the Upload File Type from UI
+	 */
+	QString GetUploadFileType() const;
+	
+private:
+	/*
+	 * pointer to Settings UI class.
+	 */
+    Ui::SMFSettingsClass *ui;
+    
+	#ifdef __FOR_SYMBIAN__
+		CSettingsRepository* iSettingsRepository;
+	#else
+		CPFIndSettings* iSettingsRepository;
+	#endif
+ 
+
+};
+
+#endif // SMFSETTINGS_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/smf/smfsettingsui/SMFSettings.loc	Wed Jun 23 19:51:49 2010 +0530
@@ -0,0 +1,13 @@
+// ============================================================================
+// * Generated by qmake (2.01a) (Qt 4.6.3) on: 2010-06-22T14:10:38
+// * This file is generated by qmake and should not be modified by the
+// * user.
+// ============================================================================
+
+#ifdef LANGUAGE_SC
+#define STRING_r_short_caption "SMFSettings"
+#define STRING_r_caption "SMFSettings"
+#else
+#define STRING_r_short_caption "SMFSettings"
+#define STRING_r_caption "SMFSettings"
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/smf/smfsettingsui/SMFSettings.rss	Wed Jun 23 19:51:49 2010 +0530
@@ -0,0 +1,21 @@
+// ============================================================================
+// * Generated by qmake (2.01a) (Qt 4.6.3) on: 2010-06-22T14:10:38
+// * This file is generated by qmake and should not be modified by the
+// * user.
+// ============================================================================
+
+#include <appinfo.rh>
+#include "SMFSettings.loc"
+
+RESOURCE LOCALISABLE_APP_INFO r_localisable_app_info
+	{
+	short_caption = STRING_r_short_caption;
+	caption_and_icon =
+	CAPTION_AND_ICON_INFO
+		{
+		caption = STRING_r_caption;
+		number_of_icons = 0;
+		icon_file = "";
+		};
+	}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/smf/smfsettingsui/SMFSettings_reg.rss	Wed Jun 23 19:51:49 2010 +0530
@@ -0,0 +1,18 @@
+// ============================================================================
+// * Generated by qmake (2.01a) (Qt 4.6.3) on: 2010-06-22T14:10:38
+// * This file is generated by qmake and should not be modified by the
+// * user.
+// ============================================================================
+
+#include <SMFSettings.rsg>
+#include <appinfo.rh>
+
+UID2 KUidAppRegistrationResourceFile
+UID3 0xE6313AF5
+
+RESOURCE APP_REGISTRATION_INFO
+	{
+	app_file="SMFSettings";
+	localisable_resource_file="\\resource\\apps\\SMFSettings";
+
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/smf/smfsettingsui/SettingsConstants.h	Wed Jun 23 19:51:49 2010 +0530
@@ -0,0 +1,46 @@
+/*
+ * SettingsInternalCRKeys.h
+ *
+ *  Created on: Mar 30, 2010
+ *      Author: kavadapu
+ */
+
+#ifndef SETTINGSCONSTANTS_H_
+#define SETTINGSCONSTANTS_H_
+
+//#define __FOR_SYMBIAN__
+
+#ifdef __FOR_SYMBIAN__
+	#include <e32base.h>
+	//UID of the Setting Application
+	static const TUid KCRUidSettings = { 0xE6313AF5 };
+	//Settings Key value to set/identify the Plugin Name
+	const TUint32 KSettingsUIPluginNameKey = 0x01;
+	//Settings Key value to set/identify the Plugin Status
+	const TUint32 KSettingsUIPluginStausKey = 0x02;
+	//Settings Key value used to set/identify the Authentication Expiry Limit
+	const TUint32 KSettingsUIAuthExpLimitKey = 0x03;
+	//Settings key value used to set/identify the Max. Data Transfer Limit value
+	const TUint32 KSettingsUIMaxDataTransferLimitKey = 0x04;
+	//Settings key value used to set/identify the Roaming status Value.
+	const TUint32 KSettingsUIRoamingStatusKey = 0x05;
+	//Settings key value used to set/identify the Upload file type value.
+	const TUint32 KSettingsUIUploadFileTypeKey = 0x06;
+#else
+	#include "qsettings.h"
+	
+	//Settings Key value to set/identify the Plugin Name
+	const QString KSettingsUIPluginNameKey = "PluginName";
+	//Settings Key value to set/identify the Plugin Status
+	const QString KSettingsUIPluginStausKey = "PluginStatus";
+	//Settings Key value used to set/identify the Authentication Expiry Limit
+	const QString KSettingsUIAuthExpLimitKey = "AuthExpLmt";
+	//Settings key value used to set/identify the Max. Data Transfer Limit value
+	const QString KSettingsUIMaxDataTransferLimitKey = "MaxDataTrLmt";
+	//Settings key value used to set/identify the Roaming status Value.
+	const QString KSettingsUIRoamingStatusKey = "RoamingStatus";
+	//Settings key value used to set/identify the Upload file type value.
+	const QString KSettingsUIUploadFileTypeKey = "UploadFileType";
+#endif
+
+#endif /* SETTINGSCONSTANTS_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/smf/smfsettingsui/SettingsRepository.cpp	Wed Jun 23 19:51:49 2010 +0530
@@ -0,0 +1,156 @@
+/**
+* Copyright (c) 2010 Sasken Communication Technologies Ltd.
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the "{License}"
+* which accompanies  this distribution, and is available
+* at the URL "{LicenseUrl}".
+*
+* Initial Contributors:
+* Narasimhulu Kavadapu, Sasken Communication Technologies Ltd - Initial contribution
+*
+* Contributors:
+*
+* Description:
+* Settings Repository class of SMF
+*/
+
+#include "SettingsRepository.h"
+
+#ifdef __FOR_SYMBIAN__
+
+
+#include <e32base.h>
+#include "SettingsRepository.h"
+
+// Standard construction sequence
+CSettingsRepository* CSettingsRepository::NewL()
+    {
+   	 CSettingsRepository* self = CSettingsRepository::NewLC();
+     CleanupStack::Pop( self );
+     return self;
+    }
+
+CSettingsRepository* CSettingsRepository::NewLC()
+    {
+     CSettingsRepository* self = new ( ELeave ) CSettingsRepository;
+     CleanupStack::PushL( self );
+     self->ConstructL();
+     return self;
+    }
+CSettingsRepository::CSettingsRepository()
+    {
+
+    }
+
+CSettingsRepository::~CSettingsRepository()
+    {
+	 if(iRepository)
+		{
+			delete iRepository;
+			iRepository = NULL;
+		}
+    }
+
+void CSettingsRepository::ConstructL()
+    {
+   	  User::LeaveIfNull(iRepository= CRepository::NewL(KCRUidSettings));
+    }
+
+/*
+
+ * Method to set the PluginDetails to Repository
+ * Param - @aPluginStatus,holds the Plgugin Status.
+ */
+void CSettingsRepository::SetPluginDetails(TDesC& aPluginName,TDesC& aPluginStatus)
+	{
+		User::LeaveIfError(iRepository->Set(KSettingsUIPluginNameKey,aPluginName));
+		User::LeaveIfError(iRepository->Set(KSettingsUIPluginStausKey,aPluginStatus));
+	}
+/*
+ * Method to set the Auth Expiry Value to Repository
+ * Param - @aVal,Auth Expiry Value
+ */
+void CSettingsRepository::SetAuthExpirationValue(TDesC& aVal)
+	{
+		User::LeaveIfError(iRepository->Set(KSettingsUIAuthExpLimitKey,aVal));
+	}
+/*
+ * Method to set the Max. Data Transfer Limit to Repository
+ * Param - @aVal,Max. Data Transfer Limit Value
+ */
+void CSettingsRepository::SetMaxDataTransferLimit(TDesC& aVal)
+	{
+		User::LeaveIfError(iRepository->Set(KSettingsUIMaxDataTransferLimitKey,aVal));
+	}
+/*
+ * Method to set the Roaming Status for Data Transfer to Repository
+ * Param - @aStatus,Rpaming Status value for Data Transfer
+ */
+void CSettingsRepository::SetRoamingStatusforDataTransfer(TDesC& aStatus)
+	{
+		User::LeaveIfError(iRepository->Set(KSettingsUIRoamingStatusKey,aStatus));
+	}
+/*
+ * Method to set the Upload File Type to Repository
+ * Param - @aStatus,Upload File Type Value
+ */
+void CSettingsRepository::SetUploadFileType(TDesC& aFileType)
+	{
+		User::LeaveIfError(iRepository->Set(KSettingsUIUploadFileTypeKey,aFileType));
+	}
+/*
+ * Method to Get the PluginDetails from Repository
+ */
+RArray<TBuf<KMaxSettingValue> >& CSettingsRepository::GetPluginDetails() const
+	{
+		TBuf<KMaxSettingValue> Value;
+		RArray<TBuf<KMaxSettingValue> > PluginDetails;
+
+		User::LeaveIfError(iRepository->Get(KSettingsUIPluginNameKey,Value));
+		PluginDetails.AppendL(Value);
+		
+		User::LeaveIfError(iRepository->Get(KSettingsUIPluginStausKey,Value));
+		PluginDetails.AppendL(Value);
+		
+		return PluginDetails;
+	}
+/*
+ * Method to Get the Auth Expiry Value from Repository
+ */
+TDesC& CSettingsRepository::GetAuthExpirationValue() const
+	{
+		TBuf<KMaxSettingValue> Value;
+		User::LeaveIfError(iRepository->Get(KSettingsUIAuthExpLimitKey,Value));
+		return Value;
+	}
+/*
+ * Method to Get the Max. Data Transfer Limit from Repository
+ */
+TDesC& CSettingsRepository::GetMaxDataTransferLimit() const
+	{
+		TBuf<KMaxSettingValue> Value;
+		User::LeaveIfError(iRepository->Get(KSettingsUIMaxDataTransferLimitKey,Value));
+		return Value;
+	}
+/*
+ * Method to Get the Roaming Status for Data Transfer from Repository
+ */
+TDesC& CSettingsRepository::GetRoamingStatusforDataTransfer() const
+	{
+		TBuf<KMaxSettingValue> Value;
+		User::LeaveIfError(iRepository->Get(KSettingsUIRoamingStatusKey,Value));
+		return Value;
+	}
+/*
+ * Method to Get the Upload File Type from Repository
+ */
+TDesC& CSettingsRepository::GetUploadFileType() const
+	{
+		TBuf<KMaxSettingValue> Value;
+		User::LeaveIfError(iRepository->Get(KSettingsUIUploadFileTypeKey,Value));
+		return Value;
+	}
+
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/smf/smfsettingsui/SettingsRepository.h	Wed Jun 23 19:51:49 2010 +0530
@@ -0,0 +1,140 @@
+/**
+* Copyright (c) 2010 Sasken Communication Technologies Ltd.
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the "{License}"
+* which accompanies  this distribution, and is available
+* at the URL "{LicenseUrl}".
+*
+* Initial Contributors:
+* Narasimhulu Kavadapu, Sasken Communication Technologies Ltd - Initial contribution
+*
+* Contributors:
+*
+* Description:
+* Settings Repository class of SMF
+*/
+
+#include "SettingsConstants.h"
+
+#ifdef __FOR_SYMBIAN__
+
+#ifndef SETTINGSREPOSITORY_H_
+#define SETTINGSREPOSITORY_H_
+
+const TInt KMaxSettingValue = 50;
+
+#include <centralrepository.h>
+//#include <BADESCA.H> 
+/*!
+  @class CSettingsRepository
+
+  @discussion An instance Settings Repository class 
+  to set/get setting values to/from symbian repository.
+  */
+class CSettingsRepository : public CBase
+    {
+public:
+
+/*!
+  @function NewL
+
+  @discussion Create a CSettingsRepository object
+  @result a pointer to the created instance of CSettingsRepository
+  */
+    static CSettingsRepository* NewL();
+
+/*!
+  @function NewLC
+
+  @discussion Create a CSettingsRepository object
+  @result a pointer to the created instance of CSettingsRepository
+  */
+    static CSettingsRepository* NewLC();
+
+
+/*!
+  @function ~CSettingsRepository
+
+  @discussion Destroy the object and release all memory objects
+  */
+     ~CSettingsRepository();
+
+
+public:
+	
+
+	/*!
+	  @function CSettingsRepository
+
+	  @discussion Perform the first phase of two phase construction
+	  */
+
+	    CSettingsRepository();
+	/*
+	 * Method to set the PluginDetails to Symbian Repository
+	 * Parm - @aPluginName,Name of the plugin
+	 * Param - @aPluginStatus,holds the Plgugin Status.
+	 */
+	void SetPluginDetails(TDesC& aPluginName,TDesC& aPluginStatus);
+	/*
+	 * Method to set the Auth Expiry Value to Repository
+	 * Param - @aVal,Auth Expiry Value
+	 */
+	void SetAuthExpirationValue(TDesC& aVal);
+	/*
+	 * Method to set the Max. Data Transfer Limit to Repository
+	 * Param - @aVal,Max. Data Transfer Limit Value
+	 */
+	void SetMaxDataTransferLimit(TDesC& aVal);
+	/*
+	 * Method to set the Roaming Status for Data Transfer to Repository
+	 * Param - @aStatus,Rpaming Status value for Data Transfer
+	 */
+	void SetRoamingStatusforDataTransfer(TDesC& aStatus);
+	/*
+	 * Method to set the Upload File Type to Repository
+	 * Param - @aStatus,Upload File Type Value
+	 */
+	void SetUploadFileType(TDesC& aFileType);
+	/*
+	 * Method to Get the PluginDetails from Repository
+	 */
+	RArray<TBuf<KMaxSettingValue> >& GetPluginDetails() const;
+	/*
+	 * Method to Get the Auth Expiry Value from Repository
+	 */
+	TDesC& GetAuthExpirationValue() const;
+	/*
+	 * Method to Get the Max. Data Transfer Limit from Repository
+	 */
+	TDesC& GetMaxDataTransferLimit() const;
+	/*
+	 * Method to Get the Roaming Status for Data Transfer from Repository
+	 */
+	TDesC& GetRoamingStatusforDataTransfer() const;
+	/*
+	 * Method to Get the Upload File Type from Repository
+	 */
+	TDesC& GetUploadFileType() const;
+
+private:
+
+/*!
+  @function ConstructL
+
+  @discussion  Perform the second phase construction of a CSettingsRepository object
+  */
+    void ConstructL();
+
+    /*!
+     Pointer to the Centra Repository class object.
+      */
+   CRepository*  iRepository;
+
+    };
+
+
+#endif /* SETTINGSREPOSITORY_H_ */
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/smf/smfsettingsui/main.cpp	Wed Jun 23 19:51:49 2010 +0530
@@ -0,0 +1,52 @@
+/****************************************************************************
+**
+** Trolltech hereby grants a license to use the Qt/Eclipse Integration
+** plug-in (the software contained herein), in binary form, solely for the
+** purpose of creating code to be used with Trolltech's Qt software.
+**
+** Qt Designer is licensed under the terms of the GNU General Public
+** License versions 2.0 and 3.0 ("GPL License"). Trolltech offers users the
+** right to use certain no GPL licensed software under the terms of its GPL
+** Exception version 1.2 (http://trolltech.com/products/qt/gplexception).
+**
+** THIS SOFTWARE IS PROVIDED BY TROLLTECH AND ITS CONTRIBUTORS (IF ANY) "AS
+** IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+** TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+** PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
+** OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+** EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+** PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+** PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+** LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+** NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+** SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** Since we now have the GPL exception I think that the "special exception
+** is no longer needed. The license text proposed above (other than the
+** special exception portion of it) is the BSD license and we have added
+** the BSD license as a permissible license under the exception.
+**
+****************************************************************************/
+
+#include "SMFSettings.h"
+
+#include <QtGui>
+#include <QApplication>
+#include <qtranslator.h>
+
+int main(int argc, char *argv[])
+{
+    QApplication app(argc, argv);
+    
+    //Enable the Translation to support multiple languages
+    QTranslator myappTranslator;
+    myappTranslator.load("SMFSettingsClass_la.qm",app.applicationDirPath());
+   	app.installTranslator(&myappTranslator);
+
+    //create object for SMFSettings to create & disaply the UI
+    SMFSettings w;
+    //Display the UI to fit to the screen.
+    w.showMaximized();
+    
+    return app.exec();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/smf/smfsettingsui/smfsettingsui.pro	Wed Jun 23 19:51:49 2010 +0530
@@ -0,0 +1,25 @@
+TEMPLATE = app
+TARGET = SMFSettings
+QT += core \
+    gui
+HEADERS += SettingsConstants.h \
+    PlatfromIndependentSettings.h \
+    SettingsRepository.h \
+    SMFSettings.h
+SOURCES += PlatfromIndependentSettings.cpp \
+    SettingsRepository.cpp \
+    SMFSettings_reg.rss \
+    main.cpp \
+    SMFSettings.cpp
+FORMS += SMFSettings.ui
+TRANSLATIONS += SMFSettingsClass_la.ts
+RESOURCES += 
+symbian:
+ { 
+    TARGET.UID3 = 0xE6313AF5
+    BLD_INF_RULES.prj_exports += SettingsConstants.h
+    LIBS += -lcentralrepository \
+        -leuser
+    TARGET.CAPABILITY = "WriteUserData CommDD WriteDeviceData ReadDeviceData ReadUserData NetworkServices"
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/smf/smfsettingsui/ui_SMFSettings.h	Wed Jun 23 19:51:49 2010 +0530
@@ -0,0 +1,178 @@
+/********************************************************************************
+** Form generated from reading UI file 'SMFSettings.ui'
+**
+** Created: Tue Jun 22 13:44:11 2010
+**      by: Qt User Interface Compiler version 4.6.3
+**
+** WARNING! All changes made in this file will be lost when recompiling UI file!
+********************************************************************************/
+
+#ifndef UI_SMFSETTINGS_H
+#define UI_SMFSETTINGS_H
+
+#include <QtCore/QVariant>
+#include <QtGui/QAction>
+#include <QtGui/QApplication>
+#include <QtGui/QButtonGroup>
+#include <QtGui/QComboBox>
+#include <QtGui/QHBoxLayout>
+#include <QtGui/QHeaderView>
+#include <QtGui/QLabel>
+#include <QtGui/QVBoxLayout>
+#include <QtGui/QWidget>
+
+QT_BEGIN_NAMESPACE
+
+class Ui_SMFSettingsClass
+{
+public:
+    QVBoxLayout *verticalLayout;
+    QHBoxLayout *horizontalLayout;
+    QLabel *label;
+    QComboBox *PluginlistboxBox;
+    QComboBox *pluginstatusbox;
+    QLabel *label_2;
+    QComboBox *AuthExplimitbox;
+    QLabel *label_3;
+    QComboBox *MaxDataTransferlimitBox;
+    QLabel *label_4;
+    QComboBox *RoamingStatusBox;
+    QLabel *label_5;
+    QComboBox *Uploadfiletypebox;
+
+    void setupUi(QWidget *SMFSettings)
+    {
+        if (SMFSettings->objectName().isEmpty())
+            SMFSettings->setObjectName(QString::fromUtf8("SMFSettings"));
+        SMFSettings->resize(198, 255);
+        verticalLayout = new QVBoxLayout(SMFSettings);
+        verticalLayout->setSpacing(6);
+        verticalLayout->setContentsMargins(11, 11, 11, 11);
+        verticalLayout->setObjectName(QString::fromUtf8("verticalLayout"));
+        horizontalLayout = new QHBoxLayout();
+        horizontalLayout->setSpacing(6);
+        horizontalLayout->setObjectName(QString::fromUtf8("horizontalLayout"));
+        label = new QLabel(SMFSettings);
+        label->setObjectName(QString::fromUtf8("label"));
+
+        horizontalLayout->addWidget(label);
+
+        PluginlistboxBox = new QComboBox(SMFSettings);
+        PluginlistboxBox->setObjectName(QString::fromUtf8("PluginlistboxBox"));
+
+        horizontalLayout->addWidget(PluginlistboxBox);
+
+        pluginstatusbox = new QComboBox(SMFSettings);
+        pluginstatusbox->setObjectName(QString::fromUtf8("pluginstatusbox"));
+
+        horizontalLayout->addWidget(pluginstatusbox);
+
+
+        verticalLayout->addLayout(horizontalLayout);
+
+        label_2 = new QLabel(SMFSettings);
+        label_2->setObjectName(QString::fromUtf8("label_2"));
+
+        verticalLayout->addWidget(label_2);
+
+        AuthExplimitbox = new QComboBox(SMFSettings);
+        AuthExplimitbox->setObjectName(QString::fromUtf8("AuthExplimitbox"));
+
+        verticalLayout->addWidget(AuthExplimitbox);
+
+        label_3 = new QLabel(SMFSettings);
+        label_3->setObjectName(QString::fromUtf8("label_3"));
+
+        verticalLayout->addWidget(label_3);
+
+        MaxDataTransferlimitBox = new QComboBox(SMFSettings);
+        MaxDataTransferlimitBox->setObjectName(QString::fromUtf8("MaxDataTransferlimitBox"));
+
+        verticalLayout->addWidget(MaxDataTransferlimitBox);
+
+        label_4 = new QLabel(SMFSettings);
+        label_4->setObjectName(QString::fromUtf8("label_4"));
+
+        verticalLayout->addWidget(label_4);
+
+        RoamingStatusBox = new QComboBox(SMFSettings);
+        RoamingStatusBox->setObjectName(QString::fromUtf8("RoamingStatusBox"));
+
+        verticalLayout->addWidget(RoamingStatusBox);
+
+        label_5 = new QLabel(SMFSettings);
+        label_5->setObjectName(QString::fromUtf8("label_5"));
+
+        verticalLayout->addWidget(label_5);
+
+        Uploadfiletypebox = new QComboBox(SMFSettings);
+        Uploadfiletypebox->setObjectName(QString::fromUtf8("Uploadfiletypebox"));
+
+        verticalLayout->addWidget(Uploadfiletypebox);
+
+
+        retranslateUi(SMFSettings);
+
+        QMetaObject::connectSlotsByName(SMFSettings);
+    } // setupUi
+
+    void retranslateUi(QWidget *SMFSettings)
+    {
+        SMFSettings->setWindowTitle(QApplication::translate("SMFSettingsClass", "SMFSettings", 0, QApplication::UnicodeUTF8));
+        label->setText(QApplication::translate("SMFSettingsClass", "Plugins", 0, QApplication::UnicodeUTF8));
+        PluginlistboxBox->clear();
+        PluginlistboxBox->insertItems(0, QStringList()
+         << QApplication::translate("SMFSettingsClass", "Facebook", 0, QApplication::UnicodeUTF8)
+         << QApplication::translate("SMFSettingsClass", "Flicker", 0, QApplication::UnicodeUTF8)
+         << QApplication::translate("SMFSettingsClass", "Orkut", 0, QApplication::UnicodeUTF8)
+        );
+        pluginstatusbox->clear();
+        pluginstatusbox->insertItems(0, QStringList()
+         << QApplication::translate("SMFSettingsClass", "Enable", 0, QApplication::UnicodeUTF8)
+         << QApplication::translate("SMFSettingsClass", "Disable", 0, QApplication::UnicodeUTF8)
+        );
+        label_2->setText(QApplication::translate("SMFSettingsClass", "Auth. Exp. Limit", 0, QApplication::UnicodeUTF8));
+        AuthExplimitbox->clear();
+        AuthExplimitbox->insertItems(0, QStringList()
+         << QApplication::translate("SMFSettingsClass", "0", 0, QApplication::UnicodeUTF8)
+         << QApplication::translate("SMFSettingsClass", "1", 0, QApplication::UnicodeUTF8)
+         << QApplication::translate("SMFSettingsClass", "2", 0, QApplication::UnicodeUTF8)
+         << QApplication::translate("SMFSettingsClass", "3", 0, QApplication::UnicodeUTF8)
+         << QApplication::translate("SMFSettingsClass", "4", 0, QApplication::UnicodeUTF8)
+         << QApplication::translate("SMFSettingsClass", "5", 0, QApplication::UnicodeUTF8)
+         << QApplication::translate("SMFSettingsClass", "6", 0, QApplication::UnicodeUTF8)
+         << QApplication::translate("SMFSettingsClass", "7", 0, QApplication::UnicodeUTF8)
+         << QApplication::translate("SMFSettingsClass", "8", 0, QApplication::UnicodeUTF8)
+         << QApplication::translate("SMFSettingsClass", "9", 0, QApplication::UnicodeUTF8)
+         << QApplication::translate("SMFSettingsClass", "10", 0, QApplication::UnicodeUTF8)
+        );
+        label_3->setText(QApplication::translate("SMFSettingsClass", "Max. Data Transfer Limit", 0, QApplication::UnicodeUTF8));
+        MaxDataTransferlimitBox->clear();
+        MaxDataTransferlimitBox->insertItems(0, QStringList()
+         << QApplication::translate("SMFSettingsClass", "100", 0, QApplication::UnicodeUTF8)
+         << QApplication::translate("SMFSettingsClass", "200", 0, QApplication::UnicodeUTF8)
+        );
+        label_4->setText(QApplication::translate("SMFSettingsClass", "Network access in roaming", 0, QApplication::UnicodeUTF8));
+        RoamingStatusBox->clear();
+        RoamingStatusBox->insertItems(0, QStringList()
+         << QApplication::translate("SMFSettingsClass", "Enable", 0, QApplication::UnicodeUTF8)
+         << QApplication::translate("SMFSettingsClass", "Disable", 0, QApplication::UnicodeUTF8)
+        );
+        label_5->setText(QApplication::translate("SMFSettingsClass", "Upload File Type", 0, QApplication::UnicodeUTF8));
+        Uploadfiletypebox->clear();
+        Uploadfiletypebox->insertItems(0, QStringList()
+         << QApplication::translate("SMFSettingsClass", "Video", 0, QApplication::UnicodeUTF8)
+         << QApplication::translate("SMFSettingsClass", "Image", 0, QApplication::UnicodeUTF8)
+         << QApplication::translate("SMFSettingsClass", "Audio", 0, QApplication::UnicodeUTF8)
+        );
+    } // retranslateUi
+
+};
+
+namespace Ui {
+    class SMFSettingsClass: public Ui_SMFSettingsClass {};
+} // namespace Ui
+
+QT_END_NAMESPACE
+
+#endif // UI_SMFSETTINGS_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/smfrepo.pro	Wed Jun 23 19:51:49 2010 +0530
@@ -0,0 +1,5 @@
+TEMPLATE  = 	subdirs
+
+SUBDIRS   =	smf \
+		example
+CONFIG += ordered