Revision: 201019
authorDremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Thu, 27 May 2010 12:52:25 +0300
changeset 15 cc79acdc26cb
parent 14 23411a3be0db
child 17 4a9568303383
Revision: 201019 Kit: 2010121
controlpanelplugins/themeplugin/src/cpthemechanger_p.cpp
controlpanelplugins/themeplugin/src/cpthemeclientsymbian_p.cpp
controlpanelplugins/themeplugin/src/cpthemeclientsymbian_p.h
controlpanelplugins/themeplugin/src/cpthemesymbiancommon_p.h
controlpanelui/rom/controlpanelui.iby
controlpanelui/rom/controlpanelui_resources.iby
controlpanelui/src/cpplugins/personalizationplugin/src/cpprofilesettingform.cpp
controlpanelui/src/cpplugins/privacyplugin/data/cpprivacyplugin.cpcfg
controlpanelui/src/cpplugins/volumeplugin/src/cpvolumecontroller.cpp
controlpanelui/src/cpprofilewrapper/src/cpprofilemodel_p.cpp
controlpanelui/src/cpringtoneview/src/cpringtoneview.cpp
controlpanelui/src/inc/cpuids.h
controlpanelui/src/tonefetcher/src/tonefetcher.cpp
controlpanelui/src/tonefetcher/src/tonefetcher.h
controlpanelui/src/tonefetcher/tsrc/tonetestapp.cpp
--- a/controlpanelplugins/themeplugin/src/cpthemechanger_p.cpp	Fri May 14 15:53:07 2010 +0300
+++ b/controlpanelplugins/themeplugin/src/cpthemechanger_p.cpp	Thu May 27 12:52:25 2010 +0300
@@ -38,9 +38,7 @@
     static const char* KThemePathKey = "HB_THEMES_DIR";
 #endif
 
-    static const QString KDefaultTheme = "hbdefault";
-    static const char* KSettingsCategory = "currenttheme";
-   
+    static const QString KDefaultTheme = "hbdefault";   
 }
 
 CpThemeChangerPrivate::CpThemeChangerPrivate(CpThemeChanger* qq):
@@ -77,8 +75,12 @@
     #endif
 
     // Get our current state
-    QSettings settings(QLatin1String(ORGANIZATION), QLatin1String(THEME_COMPONENT));
-    mCurrentTheme.name = settings.value(KSettingsCategory).toString();
+    if (HbInstance::instance()) {
+        HbTheme *hbTheme = HbInstance::instance()->theme();
+        if (hbTheme) {
+            mCurrentTheme.name = hbTheme->name();
+        }
+    }
     updateThemeList(mCurrentTheme.name);
 
     // Watch for changes to the theme directory in flash.
--- a/controlpanelplugins/themeplugin/src/cpthemeclientsymbian_p.cpp	Fri May 14 15:53:07 2010 +0300
+++ b/controlpanelplugins/themeplugin/src/cpthemeclientsymbian_p.cpp	Thu May 27 12:52:25 2010 +0300
@@ -17,18 +17,13 @@
 
 #include "cpthemeclientsymbian_p.h"
 #include "cpthemesymbiancommon_p.h"
+#include <e32property.h>
 
-#include <QFile>
-#include <QDebug>
-#include <QTime>
-
-const TUint KDefaultMessageSlots = 4;
 
 /**
 * constructor
 */
-CpThemeClientPrivate::CpThemeClientPrivate():
-    clientConnected(false)
+CpThemeClientPrivate::CpThemeClientPrivate()
 {
 }
 
@@ -39,11 +34,7 @@
 */
 bool CpThemeClientPrivate::connectToServer()
 {
-   
-    TInt error; 
-    
-    error = CreateSession(KThemeServerName, Version(), KDefaultMessageSlots);
-    return( clientConnected = (KErrNone == error ) );
+    return true;
 }
 
 /**
@@ -51,19 +42,7 @@
 */
 bool CpThemeClientPrivate::isConnected()
 {
-    return connected;
-}
-
-
-
-/**
-Returns the version number
-*/  
-TVersion CpThemeClientPrivate::Version(void) const
-{
-    return(TVersion(KThemeServerMajorVersionNumber,
-                    KThemeServerMinorVersionNumber,
-                    KThemeServerBuildVersionNumber));
+    return true;
 }
 
 /**
@@ -71,53 +50,6 @@
  */
 CpThemeClientPrivate::~CpThemeClientPrivate()
 {
-    RSessionBase::Close();
-}
-
-/**
- * StartServer
- */
-TInt CpThemeClientPrivate::StartServer()
-{
-    TFindServer findThemeServer(KThemeServerName);
-    TFullName name;
-    if ( KErrNone == findThemeServer.Next( name ) ) {
-        // Server already running
-        return KErrNone;
-    }
-    return CreateServerProcess();
-}
-
-/**
- * CreateServerProcess
- */
-TInt CpThemeClientPrivate::CreateServerProcess()
-{
-    TInt result;
-    const TUid KServerUid2={0x100039CE};
-    const TUidType serverUid( KNullUid, KServerUid2, KServerUid3 );
-    RProcess server;
-    _LIT(KThemeServerExe,"hbthemeserver.exe");
-    
-    result = server.Create( KThemeServerExe, KNullDesC, EOwnerProcess );
-    
-    if (KErrNone != result) {
-        return  result; 
-    }
-    else {
-        TRequestStatus status;
-        server.Rendezvous(status);
-        if (status!=KRequestPending) {
-            server.Kill(0); // abort startup
-        }
-        else {
-            server.Resume(); // logon OK - start the server
-        }
-        User::WaitForRequest(status);// wait for start or death
-        server.Close();
-        connected == status.Int() == KErrNone ? true : false;
-        return status.Int(); // return the error
-    }
 }
 
 /**
@@ -125,8 +57,16 @@
  */
 bool CpThemeClientPrivate::changeTheme(const QString& aString )
 {
-    TPtrC themeName(reinterpret_cast<const TUint16 *>(aString.constData()));
-    TIpcArgs args(&themeName);
-    TInt err = SendReceive(EThemeSelection, args);
-    return KErrNone == err;
+    TInt err = KErrGeneral;
+    RProperty themeRequestProp;
+    
+    User::LeaveIfError( themeRequestProp.Attach( KServerUid3, KNewThemeForThemeChanger ) );
+    
+    TBuf<256> newThemenameChangeRequest;
+    _LIT(KThemeRequestFormatter, "%d:%S");
+    TBuf<256> newThemename(aString.utf16());
+    newThemenameChangeRequest.Format( KThemeRequestFormatter, EThemeSelection, &newThemename);
+    err = themeRequestProp.Set(newThemenameChangeRequest);
+    themeRequestProp.Close();
+    return (err == KErrNone);
 }
--- a/controlpanelplugins/themeplugin/src/cpthemeclientsymbian_p.h	Fri May 14 15:53:07 2010 +0300
+++ b/controlpanelplugins/themeplugin/src/cpthemeclientsymbian_p.h	Thu May 27 12:52:25 2010 +0300
@@ -18,43 +18,23 @@
 #ifndef CPTHEMECLIENTSYMBIAN_P_H
 #define CPTHEMECLIENTSYMBIAN_P_H
 
-
-#include <QIcon>
-// TODO Do we need this?
-//#include "hbthemecommon_p.h"
-//ToDo: replace this with forward declaration
+#include <QString>
 #if !defined(__E32BASE_H__)
 #include <e32base.h>
 #endif
 
-class CThemeListenerPrivate;
-class QSizeF;
-class HbEffectFxmlData;
-struct MeshItem;
-
-class CpThemeClientPrivate : public RSessionBase
+class CpThemeClientPrivate
 {
 public:
     CpThemeClientPrivate();
 
     bool connectToServer();
+    
+    bool changeTheme(const QString& newtheme);
+    
     bool isConnected();
 
-    bool changeTheme(const QString& newtheme);
     ~CpThemeClientPrivate();
-    
-public:
-    bool clientConnected;
-
-private:
-    TVersion Version() const;
-    TInt StartServer();
-    TInt CreateServerProcess();
-    
-private:
-    CThemeListenerPrivate *themelistener;
-    QString themeName;
-    bool connected;
 };
 
 #endif /* CPTHEMECLIENTSYMBIAN_P_H */
--- a/controlpanelplugins/themeplugin/src/cpthemesymbiancommon_p.h	Fri May 14 15:53:07 2010 +0300
+++ b/controlpanelplugins/themeplugin/src/cpthemesymbiancommon_p.h	Thu May 27 12:52:25 2010 +0300
@@ -52,6 +52,8 @@
 // server name
 _LIT(KThemeServerName,"hbthemeserver");
 const TUid KServerUid3={0x20022E82};
+// Common unique ID for Pub/Sub
+const TInt KNewThemeForThemeChanger = 9;
 
 // A version must be specifyed when creating a session with the server
 
--- a/controlpanelui/rom/controlpanelui.iby	Fri May 14 15:53:07 2010 +0300
+++ b/controlpanelui/rom/controlpanelui.iby	Thu May 27 12:52:25 2010 +0300
@@ -25,11 +25,9 @@
 
 file=ABI_DIR\BUILD_DIR\controlpanel.exe         			 SHARED_LIB_DIR\controlpanel.exe 
 CP_UPGRADABLE_APP_REG_RSC(controlpanel)    
-S60_APP_RESOURCE(controlpanel)   
 
 file=ABI_DIR\BUILD_DIR\cpserviceprovider.exe         			 SHARED_LIB_DIR\cpserviceprovider.exe 
 CP_UPGRADABLE_APP_REG_RSC(cpserviceprovider)    
-S60_APP_RESOURCE(cpserviceprovider)  
 
 file=ABI_DIR\BUILD_DIR\cpcategorymodel.dll			  	 SHARED_LIB_DIR\cpcategorymodel.dll
 file=ABI_DIR\BUILD_DIR\seccodeui.dll                 SHARED_LIB_DIR\seccodeui.dll
--- a/controlpanelui/rom/controlpanelui_resources.iby	Fri May 14 15:53:07 2010 +0300
+++ b/controlpanelui/rom/controlpanelui_resources.iby	Thu May 27 12:52:25 2010 +0300
@@ -24,7 +24,6 @@
 data=DATAZ_\QT_TRANSLATIONS_DIR\control_panel.qm QT_TRANSLATIONS_DIR\control_panel.qm
 data=DATAZ_\APP_RESOURCE_DIR\ControlPanel.RSC APP_RESOURCE_DIR\ControlPanel.rsc
 
-#data=DATAZ_\QT_TRANSLATIONS_DIR\cpserviceprovider.qm QT_TRANSLATIONS_DIR\cpserviceprovider.qm
-#data=DATAZ_\APP_RESOURCE_DIR\cpserviceprovider.RSC APP_RESOURCE_DIR\cpserviceprovider.rsc
+data=DATAZ_\APP_RESOURCE_DIR\cpserviceprovider.RSC APP_RESOURCE_DIR\cpserviceprovider.rsc
 
 #endif // CONTROLPANELUI_RESOURCES
\ No newline at end of file
--- a/controlpanelui/src/cpplugins/personalizationplugin/src/cpprofilesettingform.cpp	Fri May 14 15:53:07 2010 +0300
+++ b/controlpanelui/src/cpplugins/personalizationplugin/src/cpprofilesettingform.cpp	Thu May 27 12:52:25 2010 +0300
@@ -30,7 +30,7 @@
 #include <QModelIndex>
 #include <QMap>
 
-#include <XQSettingsManager.h>
+#include <xqsettingsmanager.h>
 #include <ProfileEngineInternalCRKeys.h>
 
 CpProfileSettingForm::CpProfileSettingForm()
--- a/controlpanelui/src/cpplugins/privacyplugin/data/cpprivacyplugin.cpcfg	Fri May 14 15:53:07 2010 +0300
+++ b/controlpanelui/src/cpplugins/privacyplugin/data/cpprivacyplugin.cpcfg	Thu May 27 12:52:25 2010 +0300
@@ -3,11 +3,11 @@
     <desc></desc>
   </plugin> 
   
-  <plugin displayname = "Device lock" id = "0X2002E683"  dll = "cpdevicelockplugin.dll">
+  <plugin displayname = "Device lock" id = "0X2002E683"  dll = "devicelockplugin.dll">
     <desc></desc>
   </plugin> 
   
-  <plugin displayname = "Advanced security" id = "0X0"  dll = "TBD">
+  <plugin displayname = "Advanced security" id = "0X2002E684"  dll = "cpadvancedsecplugin.dll">
     <desc></desc>
   </plugin> 
   
--- a/controlpanelui/src/cpplugins/volumeplugin/src/cpvolumecontroller.cpp	Fri May 14 15:53:07 2010 +0300
+++ b/controlpanelui/src/cpplugins/volumeplugin/src/cpvolumecontroller.cpp	Thu May 27 12:52:25 2010 +0300
@@ -27,7 +27,7 @@
 //#include <hbslider.h>
 //#include <hbpushbutton.h>
 
-#include <XQSettingsManager.h>
+#include <xqsettingsmanager.h>
 #include <ProfileEngineInternalCRKeys.h>
 #include <ProfileInternal.hrh>
 
--- a/controlpanelui/src/cpprofilewrapper/src/cpprofilemodel_p.cpp	Fri May 14 15:53:07 2010 +0300
+++ b/controlpanelui/src/cpprofilewrapper/src/cpprofilemodel_p.cpp	Thu May 27 12:52:25 2010 +0300
@@ -33,14 +33,14 @@
 #include <MProfileFeedbackSettings.h>
 #include <MProfileSetFeedbackSettings.h>
 #include <MProfilesNamesArray.h>
-#include <SettingsInternalCRKeys.h>
+#include <settingsinternalcrkeys.h>
 #include <hbglobal.h>
 #include <QtCore/QStringList>
 #include <MProfileExtended2.h>
 #include <MProfileSetExtraTones2.h>
 #include <MProfileExtraTones2.h>
 #include <MProfileVibraSettings.h>
-#include <MPRofileSetVibraSettings.h>
+#include <MProfileSetVibraSettings.h>
 #include <TProfileToneSettings.h>
 #include <hwrmvibrasdkcrkeys.h>
 #include <centralrepository.h>
--- a/controlpanelui/src/cpringtoneview/src/cpringtoneview.cpp	Fri May 14 15:53:07 2010 +0300
+++ b/controlpanelui/src/cpringtoneview/src/cpringtoneview.cpp	Thu May 27 12:52:25 2010 +0300
@@ -72,10 +72,10 @@
                 emit aboutToClose();
                 break;
         case 1:         //tone
-        //        launchMediaFetcher( "com.nokia.symbian.IToneFetch", "fetch(QString)" );
+                launchMediaFetcher( "com.nokia.symbian.IToneFetch", "fetch()" );
                 break;
         case 2:         //music
-                launchMediaFetcher("com.nokia.symbian.IMusicFetch", "fetch(void)" );
+                launchMediaFetcher("com.nokia.symbian.IMusicFetch", "fetch()" );
                 break;
         case 3:         //recording
         case 4:         //get more tones
@@ -110,7 +110,7 @@
         mReq = 0;
     }
         //launch media fetcher
-    mReq = mAppMgr.create( strService, strItface, true);
+    mReq = mAppMgr.create(strService, strItface, true);
     if (!mReq)
     {
       CPFW_LOG("CpRingToneView::launchMediaFetcher, Mediafetcher start failed");
@@ -121,12 +121,10 @@
         connect(mReq, SIGNAL( requestOk( const QVariant&)), SLOT( handleOk(const QVariant&)) );
         connect(mReq, SIGNAL( requestError( int,const QString&)), SLOT(handleError(int,const QString&)) );
     }
-
-    // Set arguments for request (music fetcher application title)
-    //QList<QVariant> args;
-    //args << QVariant( strTitle );
-    //mReq->setArguments(args);
-
+    
+    QList<QVariant> args;
+    args << QVariant(QString("<app_name>"));
+    mReq->setArguments(args);
     // Make the request
     if (!mReq->send())
     {
--- a/controlpanelui/src/inc/cpuids.h	Fri May 14 15:53:07 2010 +0300
+++ b/controlpanelui/src/inc/cpuids.h	Thu May 27 12:52:25 2010 +0300
@@ -47,8 +47,8 @@
 #define QUID_RINGTONE 0X20028738
 #define QUID_PROFILEACTIVATOR  0X20028739
 #define QUID_RINGTONESELVIEW  0X2002873A
-#define QUID_RESERVED8  0X2002873B
-#define QUID_RESERVED9  0X2002873C
+#define QUID_CPPLUGIN_ABOUT  0X2002873B
+#define QUID_CPPLUGIN_LANGUAGE  0X2002873C
 #define QUID_RESERVED10 0X2002873D
 #define QUID_RESERVED11 0X2002873E
 #define QUID_CPSERVICEPROVIDER 0X2002873F
--- a/controlpanelui/src/tonefetcher/src/tonefetcher.cpp	Fri May 14 15:53:07 2010 +0300
+++ b/controlpanelui/src/tonefetcher/src/tonefetcher.cpp	Thu May 27 12:52:25 2010 +0300
@@ -39,7 +39,7 @@
 
 }
 
-void ToneFetcher::fetch(QString)
+void ToneFetcher::fetch()
 {
     mAsyncRequestIndex = setCurrentRequestAsync();    
     if (mMainWindow) {
--- a/controlpanelui/src/tonefetcher/src/tonefetcher.h	Fri May 14 15:53:07 2010 +0300
+++ b/controlpanelui/src/tonefetcher/src/tonefetcher.h	Thu May 27 12:52:25 2010 +0300
@@ -39,7 +39,7 @@
     bool isActive();
         
 public slots:
-    void fetch(QString);
+    void fetch();
     
 private slots:
     void setSelectedPath(const QString &tonePath);
--- a/controlpanelui/src/tonefetcher/tsrc/tonetestapp.cpp	Fri May 14 15:53:07 2010 +0300
+++ b/controlpanelui/src/tonefetcher/tsrc/tonetestapp.cpp	Thu May 27 12:52:25 2010 +0300
@@ -136,7 +136,7 @@
     
     if (!mReq)
    {
-        mReq = mAppMgr.create("com.nokia.symbian.IToneFetch", "fetch(QString)", true);
+        mReq = mAppMgr.create("com.nokia.symbian.IToneFetch", "fetch()", true);
      //   XQServiceRequest snd("com.nokia.services.toneserviceprovider.tone", "queryTone()", true);
        // QVariant retValue;