Revision: 201025
authorDremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Tue, 06 Jul 2010 14:17:10 +0300
changeset 25 19394c261aa5
parent 24 f5dfdd5e4a1b
child 27 848a3adde87f
child 31 e79ce701c376
Revision: 201025 Kit: 2010127
controlpanelplugins/themeplugin/src/cpthemechanger.cpp
controlpanelplugins/themeplugin/src/cpthemechanger.h
controlpanelplugins/themeplugin/src/cpthemechanger_p.cpp
controlpanelplugins/themeplugin/src/cpthemechanger_p.h
controlpanelplugins/themeplugin/src/cpthemeclient_p.cpp
controlpanelplugins/themeplugin/src/cpthemeclient_p.h
controlpanelplugins/themeplugin/src/cpthemeclient_p_p.h
controlpanelplugins/themeplugin/src/cpthemeclientqt_p.cpp
controlpanelplugins/themeplugin/src/cpthemeclientsymbian_p.cpp
controlpanelplugins/themeplugin/src/cpthemecommon_p.h
controlpanelplugins/themeplugin/src/cpthemecontrol.cpp
controlpanelplugins/themeplugin/src/cpthemecontrol.h
controlpanelplugins/themeplugin/src/cpthemeinfo.cpp
controlpanelplugins/themeplugin/src/cpthemeinfo.h
controlpanelplugins/themeplugin/src/cpthemelistmodel.cpp
controlpanelplugins/themeplugin/src/cpthemelistmodel.h
controlpanelplugins/themeplugin/src/cpthemepreview.cpp
controlpanelplugins/themeplugin/src/cpthemepreview.h
controlpanelplugins/themeplugin/src/cpthemesymbiancommon_p.h
controlpanelplugins/themeplugin/src/cpthemeutil.cpp
controlpanelplugins/themeplugin/src/cpthemeutil.h
controlpanelplugins/themeplugin/themeplugin.pri
controlpanelplugins/themeplugin/themeplugin.pro
controlpanelui/examples/groupplugin/src/cpsamplegroup.cpp
controlpanelui/examples/pluginlauncherclient/src/main.cpp
controlpanelui/examples/pluginlauncherclient/src/mainview.cpp
controlpanelui/examples/pluginlauncherclient/src/mainview.h
controlpanelui/examples/viewplugin/src/cpsampleview.cpp
controlpanelui/rom/controlpanelui.iby
controlpanelui/src/bwins/cpcategorymodelu.def
controlpanelui/src/bwins/cpprofilewrapperu.def
controlpanelui/src/bwins/cpringtoneviewu.def
controlpanelui/src/bwins/seccodeuiu.def
controlpanelui/src/cpapplication/cpapplication.pro
controlpanelui/src/cpapplication/cpapplication.qrc
controlpanelui/src/cpapplication/data/controlpanellog.conf
controlpanelui/src/cpapplication/resources/qtg_large_settings.svg
controlpanelui/src/cpapplication/src/cpmainwindow.cpp
controlpanelui/src/cpapplication/src/main.cpp
controlpanelui/src/cpcategorymodel/bwins/cpcategorymodelu.def
controlpanelui/src/cpcategorymodel/eabi/cpcategorymodelu.def
controlpanelui/src/cpcategorymodel/src/cpcategorymodelutility.cpp
controlpanelui/src/cpplugins/communicationplugin/data/cpcommunicationplugin.cpcfg
controlpanelui/src/cpplugins/communicationplugin/src/cpcommunicationgroupitemdata.cpp
controlpanelui/src/cpplugins/deviceplugin/data/cpdeviceplugin.cpcfg
controlpanelui/src/cpplugins/keytouchfdbkplugin/src/cpkeyscreenplugin.cpp
controlpanelui/src/cpplugins/keytouchfdbkplugin/src/cpkeyscreenview.cpp
controlpanelui/src/cpplugins/personalizationplugin/src/cppersonalizationgroupitemdata.cpp
controlpanelui/src/cpplugins/personalizationplugin/src/cppersonalizationplugin.cpp
controlpanelui/src/cpplugins/personalizationplugin/src/cpprofilesettingform.cpp
controlpanelui/src/cpplugins/personalizationplugin/src/cpprofilesettingform.h
controlpanelui/src/cpplugins/profileactivatorplugin/src/cpprofileactivatorentryitem.cpp
controlpanelui/src/cpplugins/profileactivatorplugin/src/cpprofileactivatorentryitem.h
controlpanelui/src/cpplugins/profileactivatorplugin/src/cpprofileactivatorplugin.cpp
controlpanelui/src/cpplugins/ringtoneplugin/src/cppersonalizationentryitemdata.cpp
controlpanelui/src/cpplugins/ringtoneplugin/src/cppersonalizationentryitemdata.h
controlpanelui/src/cpplugins/ringtoneplugin/src/cpringtoneplugin.cpp
controlpanelui/src/cpplugins/volumeplugin/src/cpvolumegroupitemdata.cpp
controlpanelui/src/cpprofilewrapper/bwins/cpprofilewrapperu.def
controlpanelui/src/cpprofilewrapper/eabi/cpprofilewrapperu.def
controlpanelui/src/cpprofilewrapper/src/cpprofilemodel_p.cpp
controlpanelui/src/cpringtoneview/bwins/cpringtoneviewu.def
controlpanelui/src/cpringtoneview/eabi/cpringtoneviewu.def
controlpanelui/src/cpringtoneview/src/cpringtoneview.cpp
controlpanelui/src/cpserviceprovider/src/cplauncherservice.cpp
controlpanelui/src/cpserviceprovider/src/cplauncherservice.h
controlpanelui/src/cpserviceprovider/src/cpservicemainwindow.cpp
controlpanelui/src/cpserviceprovider/src/cpservicemainwindow.h
controlpanelui/src/cpserviceprovider/src/main.cpp
controlpanelui/src/eabi/cpcategorymodelu.def
controlpanelui/src/eabi/cpprofilewrapperu.def
controlpanelui/src/eabi/cpringtoneviewu.def
controlpanelui/src/eabi/seccodeuiu.def
controlpanelui/src/inc/cpringtoneview.h
controlpanelui/src/tonefetcher/inc/tonefetcherlog.conf
controlpanelui/src/tonefetcher/inc/tonefetcherlogger.h
controlpanelui/src/tonefetcher/inc/tonefetcherutils.cpp
controlpanelui/src/tonefetcher/inc/tonefetcherutils.h
controlpanelui/src/tonefetcher/src/main.cpp
controlpanelui/src/tonefetcher/src/tonefetcher.cpp
controlpanelui/src/tonefetcher/src/tonefetcher.h
controlpanelui/src/tonefetcher/src/tonefetchermainwindow.cpp
controlpanelui/src/tonefetcher/src/tonefetchermainwindow.h
controlpanelui/src/tonefetcher/src/tonefetchermodel.cpp
controlpanelui/src/tonefetcher/src/tonefetchermodel.h
controlpanelui/src/tonefetcher/src/tonefetcherview.cpp
controlpanelui/src/tonefetcher/src/tonefetcherview.h
controlpanelui/src/tonefetcher/src/tonefetcherwidget.cpp
controlpanelui/src/tonefetcher/src/tonefetcherwidget.h
controlpanelui/src/tonefetcher/tonefetcher.pri
controlpanelui/src/tonefetcher/tonefetcher.pro
controlpanelui/src/tonefetcher/tonefetcherengine/private/CTonePlayer.cpp
controlpanelui/src/tonefetcher/tonefetcherengine/private/CTonePlayer.h
controlpanelui/src/tonefetcher/tonefetcherengine/private/CToneSelection.cpp
controlpanelui/src/tonefetcher/tonefetcherengine/private/CToneSelection.h
controlpanelui/src/tonefetcher/tonefetcherengine/private/MTonePlayingWatcher.h
controlpanelui/src/tonefetcher/tonefetcherengine/private/MToneSelectionWatcher.h
controlpanelui/src/tonefetcher/tonefetcherengine/private/symbian/tonepreviewprivate.cpp
controlpanelui/src/tonefetcher/tonefetcherengine/private/symbian/tonepreviewprivate.h
controlpanelui/src/tonefetcher/tonefetcherengine/private/symbian/toneselectionengine_p.cpp
controlpanelui/src/tonefetcher/tonefetcherengine/private/symbian/toneselectionengine_p.h
controlpanelui/src/tonefetcher/tonefetcherengine/private/tonefetcherengine_stub.cpp
controlpanelui/src/tonefetcher/tonefetcherengine/private/tonefetcherengine_stub.h
controlpanelui/src/tonefetcher/tonefetcherengine/private/tonefetcherengine_symbian.cpp
controlpanelui/src/tonefetcher/tonefetcherengine/private/tonefetcherengine_symbian.h
controlpanelui/src/tonefetcher/tonefetcherengine/tonefetcherengine.cpp
controlpanelui/src/tonefetcher/tonefetcherengine/tonefetcherengine.h
--- a/controlpanelplugins/themeplugin/src/cpthemechanger.cpp	Wed Jun 23 18:13:38 2010 +0300
+++ b/controlpanelplugins/themeplugin/src/cpthemechanger.cpp	Tue Jul 06 14:17:10 2010 +0300
@@ -14,19 +14,20 @@
  * Description:  
  *   
  */
+#include <QString>
 
 #include "cpthemechanger.h"
-#include "cpthemechanger_p.h"
-#include "cpthemelistmodel.h"
+#include "cpthemeutil.h"
+#include "cpthemeinfo.h"
+
+#include <hbinstance.h>
+#include <restricted/hbthemeservices_r.h>
 
 /*!
-  @alpha
   \class CpThemeChanger
 
   \brief CpThemeChanger provides an interface for changing the current
-  theme and enumerating the available themes (e.g., for the UI to provide 
-  a list of themes to show).
-
+  theme.
   This API is only for use with the control panel and its theme
   changing plugin.
 */
@@ -36,75 +37,76 @@
 */
 CpThemeChanger::CpThemeChanger(QObject* p) :
     QObject(p),
-    d_ptr(new CpThemeChangerPrivate(this))
+    mCurrentTheme(0)
 {
+    connect(hbInstance->theme(),SIGNAL(changeFinished()), this, SLOT(changeFinished()));
+       
+    setCurrentTheme();
+}
+
+/*!
+    Returns a ThemeInfo object containing the current theme name and
+    corresponding icons.
+
+    If no repersentative icons exist, the HbIcon returned will be
+    uninitialized.
+*/
+const CpThemeInfo* CpThemeChanger::currentTheme() const
+{
+    return mCurrentTheme;
 }
 
 /*!
-    Provides a list of themes as a const QAbstractItemModel*.
-*/
-QAbstractItemModel& CpThemeChanger::model()
+ * Private helper function that gets the current theme from hbinstance and s
+ * ets class' current theme.  
+ */
+void CpThemeChanger::setCurrentTheme()
 {
-    Q_D(CpThemeChanger);
-
-    return d->mModel;
+    QString themeName = "";
+    if (HbInstance::instance()) {
+        HbTheme *hbTheme = HbInstance::instance()->theme();
+        if(hbTheme) {
+            themeName = hbTheme->name();
+        }
+         
+    }
+       
+    if(mCurrentTheme && mCurrentTheme->name() == themeName) {
+        return;
+    }
+    else {
+        //buildThemeInfo creates new theme info.
+        CpThemeInfo* tmpTheme = CpThemeUtil::buildThemeInfo(HbThemeServices::themePath(), themeName);
+         
+        //delete old value. set the new value.
+        if(tmpTheme) {
+            if(mCurrentTheme){
+                delete mCurrentTheme;
+            }
+            mCurrentTheme = tmpTheme;
+        }
+    }
 }
 
 
 /*!
-  Creates a connection to the theme server for the purpose of 
-  changing the theme.
- */
-bool CpThemeChanger::connectToServer()
-{
-    Q_D(CpThemeChanger);
-
-    return d->connectToServer();
-}
-
-/*!
-  Indicates if the client is connected to the theme server.
-*/
-bool CpThemeChanger::isConnected() const
-{
-    Q_D(const CpThemeChanger);
-
-    return d->isConnected();
-}
-
-
-/*!
-    Returns a ThemeInfo struct containing the current theme name and
-    a repersentative HbIcon.
-
-    If no repersentative icon exists, the HbIcon returned will be
-    uninitialized.
-*/
-const CpThemeChanger::ThemeInfo& CpThemeChanger::currentTheme() const
-{
-    Q_D(const CpThemeChanger);
-    
-    return d->currentTheme();
-}
-
-/*
- *  Returns index of theme from the theme list (not the model).
- */
-int CpThemeChanger::indexOf(const ThemeInfo& theme) const
-{
-    Q_D(const CpThemeChanger);
-    
-    return d->indexOf(theme);
-}
-
-/*!
  Change a theme. Returns true on success, false otherwise.
  */
-bool CpThemeChanger::changeTheme(const QString& newtheme)
+bool CpThemeChanger::changeTheme(const QString& newTheme)
 {
-    Q_D(CpThemeChanger);
+    bool result = false;
+    // Skip doing this if the request is for the current theme
+    if (newTheme.isEmpty() || newTheme == mCurrentTheme->name()) {
+        return result;
+    }
 
-    return d->changeTheme(newtheme);
+    QString themePath = CpThemeUtil::themePath(newTheme);
+    
+    if(!themePath.isEmpty()) {
+        HbThemeServices::setTheme(themePath);
+        result = true;
+    }
+    return result;
 }
 
 /*!
@@ -112,11 +114,21 @@
  */
 CpThemeChanger::~CpThemeChanger()
 {
-    delete d_ptr;
-    d_ptr = 0;
+    delete mCurrentTheme;
+    mCurrentTheme = 0;
 }
 
-#include "moc_cpthemechanger.cpp"
+/*!
+ *  Slot to handle notification from theme server that theme change
+ *  is done.  Notify the owner.
+ */
+void CpThemeChanger::changeFinished()
+{
+  
+    setCurrentTheme();
+    
+    emit themeChangeFinished();
+}
 
 // End of file
 
--- a/controlpanelplugins/themeplugin/src/cpthemechanger.h	Wed Jun 23 18:13:38 2010 +0300
+++ b/controlpanelplugins/themeplugin/src/cpthemechanger.h	Tue Jul 06 14:17:10 2010 +0300
@@ -24,6 +24,7 @@
 #include <hbglobal.h>
 
 class CpThemeChangerPrivate;
+class CpThemeInfo;
 
 QT_BEGIN_NAMESPACE
 class QAbstractItemModel;
@@ -32,43 +33,25 @@
 class CpThemeChanger : public QObject
 {
     Q_OBJECT
-
+    
 public:
      explicit CpThemeChanger(QObject* parent=0);
     ~CpThemeChanger();
-
-    enum ThemeListUserRole {
-           PortraitPreviewRole = Qt::UserRole,
-           LandscapePreviewRole
-    };
-      
-    struct ThemeInfo{
-        QString name;
-        HbIcon  icon;
-        HbIcon portraitPreviewIcon;
-        HbIcon landscapePreviewIcon;
-        bool operator < (const struct ThemeInfo &other) const   {			
-            return name.localeAwareCompare(other.name) < 0;
-        }	
-        bool operator == (const struct ThemeInfo &other) const {
-            return name.localeAwareCompare(other.name) == 0;
-        }
-    };
+    
+    const CpThemeInfo* currentTheme() const;
+    bool changeTheme(const QString& newtheme);
+    
+signals:
+    void themeChangeFinished();
     
-    QAbstractItemModel& model();
-
-    const ThemeInfo& currentTheme() const;
-    int indexOf(const ThemeInfo& theme) const;
-
-    bool changeTheme(const QString& newtheme);
+public slots:
+    void changeFinished();
 	
-	bool connectToServer();
-	bool isConnected() const;
-
 private:
-    CpThemeChangerPrivate* d_ptr;
-    Q_DECLARE_PRIVATE(CpThemeChanger)
-    Q_PRIVATE_SLOT(d_func(), void _q_themeDirectoryChanged(const QString&))
+    void setCurrentTheme();
+    
+    CpThemeInfo* mCurrentTheme;
 };
 
+
 #endif /* CPTHEMECHANGER_H */
--- a/controlpanelplugins/themeplugin/src/cpthemechanger_p.cpp	Wed Jun 23 18:13:38 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,342 +0,0 @@
-/*
- * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
- * All rights reserved.
- * This component and the accompanying materials are made available
- * under the terms of "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:
- * Nokia Corporation - initial contribution.
- *
- * Contributors:
- *
- * Description:  
- *   
- */
-
-#include "cpthemechanger.h"
-#include "cpthemechanger_p.h"
-#include "cpthemelistmodel.h"
-#include "cpthemeclient_p.h"
-#include "cpthemecommon_p.h"
-
-#include <QStringList>
-#include <QSettings>
-#include <QFileSystemWatcher>
-#include <QPixmap>
-#include <QFileInfoList>
-#include <QDir>
-
-#include <hbicon.h>
-#include <hbinstance.h>
-
-
-#if !defined(Q_OS_SYMBIAN)
-    #include <stdio.h>
-    static const char* KThemePathKey = "HB_THEMES_DIR";
-#endif
-    static const QString KDefaultTheme = "sfblacktheme";
-    static const QString KDefaultThemeIcon = ":/image/themePreview.nvg";
-    static const QString KPreviewThumbnailNVG = "/scalable/qtg_graf_theme_preview_thumbnail.nvg";
-    static const QString KPreviewThumbnailSVG = "/scalable/qtg_graf_theme_preview_thumbnail.svg";
-    
-    static const QString KPreviewPrtNVG =       "/scalable/qtg_graf_theme_preview_prt.nvg";
-    static const QString KPreviewLscNVG =       "/scalable/qtg_graf_theme_preview_lsc.nvg";
-    static const QString KPreviewPrtSVG =       "/scalable/qtg_graf_theme_preview_prt.svg";
-    static const QString KPreviewLscSVG =       "/scalable/qtg_graf_theme_preview_lsc.svg";
-   
-    static const QString KBackgroundPrtNVG =    "/scalable/qtg_graf_screen_bg_prt.nvg";
-    static const QString KBackgroundLscNVG =    "/scalable/qtg_graf_screen_bg_lsc.nvg";
-    static const QString KBackgroundPrtSVG =    "/scalable/qtg_graf_screen_bg_prt.svg";
-    static const QString KBackgroundLscSVG =    "/scalable/qtg_graf_screen_bg_lsc.svg";
-    
-    static const QString KBackgroundPrtPNG =    "/pixmap/qtg_graf_screen_bg_prt.png";                     
-    static const QString KBackgroundLscPNG =    "/pixmap/qtg_graf_screen_bg_lsc.png";
-                     
-   
-
-CpThemeChangerPrivate::CpThemeChangerPrivate(CpThemeChanger* qq):
-    q_ptr(qq),
-    mThemeClient(CpThemeClient::global()),
-    mFileWatcher(new QFileSystemWatcher(qq)),
-    mModel(this, qq)
-
-{
-    Q_Q(CpThemeChanger);
-
-    // Figure out where our themes are. This is platform-dependent,
-    // but not worth breaking out into platform-private implementations
-    // at the moment. Ideally, this would be given to us by the theme server,
-#ifdef Q_OS_WIN
-    static char* _path = NULL;
-    static size_t _size = 0;
-    _dupenv_s(&_path, &_size, KThemePathKey);
-    mThemeRootPath = QString(_path);
-    mThemeRootPathPostfix = QString();
-    free(_path);
-#elif defined(Q_OS_SYMBIAN)
-    mThemeRootPath = "c:\\resource\\hb";
-    mThemeRootPathPostfix = "resource\\hb";
-#elif defined(Q_OS_MACX)
-    mThemeRootPath = QDir::homePath() + '/' + "Library" + QString("hb");
-    mThemeRootPathPostfix = QString();
-#elif defined(Q_OS_UNIX)
-    mThemeRootPath = QString(getenv(KThemePathKey));
-    mThemeRootPathPostfix = QString();
-#else
-    mThemeRootPath = "c:\\resource\\hb";
-    mThemeRootPathPostfix = QString();
-#endif
-
-    // Get our current state
-    if (HbInstance::instance()) {
-        HbTheme *hbTheme = HbInstance::instance()->theme();
-        if (hbTheme) {
-            mCurrentTheme.name = hbTheme->name();
-        }
-    }
-  
-    // Watch for changes to the theme directory in flash.
-    // This may change once we start offering a model.
-#if defined(Q_OS_SYMBIAN)
-    QFileInfoList driveInfoList = QDir::drives();
-    foreach (const QFileInfo &driveInfo, driveInfoList) {
-        const QString drive = driveInfo.absolutePath();
-        mThemesPathList << drive + mThemeRootPathPostfix;
-    }
-#else
-    mThemesPathList << mThemeRootPath;
-#endif
-    foreach (const QString &path, mThemesPathList) {
-        QDir themeDir;
-        themeDir.setPath( path ) ;
-        QStringList list = themeDir.entryList(QDir::AllDirs|QDir::NoDotAndDotDot,QDir::Name);
-        if(list.contains("themes", Qt::CaseSensitive )) {
-            mFileWatcher->addPath(themeDir.path() + "/themes/");
-        }
-    }
-    
-    q->connect(mFileWatcher, SIGNAL(directoryChanged(const QString&)),
-               q, SLOT(_q_themeDirectoryChanged(const QString&)));
-
-    updateThemeList(mCurrentTheme.name);
-
-    // Connect to the theme server
-    connectToServer();
-}
-
-CpThemeChangerPrivate::~CpThemeChangerPrivate()
-{
-    mThemeClient->releaseInstance();
-    mThemeClient = 0;
-}
-
-const CpThemeChanger::ThemeInfo& CpThemeChangerPrivate::currentTheme() const
-{
-    return mCurrentTheme;
-}
-
-const QString& CpThemeChangerPrivate::currentThemeName() const
-{
-    return mCurrentTheme.name.isEmpty() ? KDefaultTheme : mCurrentTheme.name;
-}
-
-int CpThemeChangerPrivate::indexOf(const CpThemeChanger::ThemeInfo& theme) const
-{
-    return mThemeList.indexOf(theme);
-}
-
-void CpThemeChangerPrivate::updateThemeList(const QString& newThemeName)
-{
-    if(!mThemeList.isEmpty()) {
-        mThemeList.clear();
-    }
-
-    mCurrentTheme.name = newThemeName.isEmpty() ? KDefaultTheme : newThemeName;
-
-    foreach (const QString &path, mThemesPathList) {
-        QDir themeDir;
-        themeDir.setPath( path ) ;
-        QStringList iconthemeslist;
-        QStringList list = themeDir.entryList(QDir::AllDirs|QDir::NoDotAndDotDot,QDir::Name);
-        CpThemeChanger::ThemeInfo nameIconPair;
-
-        if(list.contains("themes", Qt::CaseSensitive )) {
-            QDir root(themeDir.path());
-            themeDir.setPath(root.path() + "/themes/icons/") ;
-            iconthemeslist = themeDir.entryList(QDir::AllDirs|QDir::NoDotAndDotDot,QDir::Name);
-            foreach(QString themefolder, iconthemeslist) {
-                QDir iconThemePath(root.path() + "/themes/icons/" + themefolder);
-                if(iconThemePath.exists("index.theme") &&
-                   (iconThemePath.exists("scalable") || iconThemePath.exists("pixmap") )) {
-                    QSettings iniSetting(iconThemePath.path() + "/index.theme", QSettings::IniFormat);
-                    iniSetting.beginGroup("Icon Theme");
-                    QString hidden = iniSetting.value("Hidden").toString();
-                    QString name = iniSetting.value("Name").toString();
-                    QString iconPath = iniSetting.value("PreviewThumbnailPath").toString();
-                    QString previewPathPrt = iniSetting.value("PreviewIconPath_prt").toString();
-                    QString previewPathLsc = iniSetting.value("PreviewIconPath_lsc").toString();
-                    if (name.isEmpty()) {
-                        continue;
-                    }
-                    
-                    QString fullPathToIcon(iconThemePath.path());
-                     
-                    if(iconPath.isEmpty()|| !QFileInfo(fullPathToIcon + iconPath).exists()){
-                       //Set thumbnail
-                        if(QFileInfo(fullPathToIcon + KPreviewThumbnailNVG).exists()){
-                            nameIconPair.icon = HbIcon(fullPathToIcon + KPreviewThumbnailNVG);
-                        }else if(QFileInfo(fullPathToIcon + KPreviewThumbnailSVG).exists()){
-                            nameIconPair.icon = HbIcon(fullPathToIcon + KPreviewThumbnailSVG);
-                        }else if(QFileInfo(fullPathToIcon + KBackgroundPrtNVG).exists()){
-                            nameIconPair.icon = HbIcon(fullPathToIcon + KBackgroundPrtNVG);
-                        } else if(QFileInfo(fullPathToIcon + KBackgroundPrtSVG).exists()){
-                            nameIconPair.icon = HbIcon(fullPathToIcon + KBackgroundPrtSVG);
-                        } else if(QFileInfo(fullPathToIcon + KBackgroundPrtPNG).exists()){
-                            nameIconPair.icon = HbIcon(fullPathToIcon + KBackgroundPrtPNG); 
-                        }else{
-                            nameIconPair.icon = HbIcon(KDefaultThemeIcon);
-                        }
-
-                    } else {
-                        nameIconPair.icon = HbIcon(fullPathToIcon + iconPath);
-                    }
-                    
-                    //Portrait preview
-                    
-                    if(previewPathPrt.isEmpty() || !QFileInfo(fullPathToIcon + previewPathPrt).exists()) {
-                    
-                        if(QFileInfo(fullPathToIcon + KPreviewPrtNVG).exists()){
-                            nameIconPair.portraitPreviewIcon = HbIcon(fullPathToIcon + KPreviewPrtNVG);
-                        }else if(QFileInfo(fullPathToIcon + KPreviewPrtSVG).exists()){
-                            nameIconPair.portraitPreviewIcon = HbIcon(fullPathToIcon + KPreviewPrtSVG);
-                        }else if(QFileInfo(fullPathToIcon + KBackgroundPrtNVG).exists()){
-                            nameIconPair.portraitPreviewIcon = HbIcon(fullPathToIcon + KBackgroundPrtNVG);
-                        } else if(QFileInfo(fullPathToIcon + KBackgroundPrtSVG).exists()){
-                            nameIconPair.portraitPreviewIcon = HbIcon(fullPathToIcon + KBackgroundPrtSVG);
-                        } else if(QFileInfo(fullPathToIcon + KBackgroundPrtPNG).exists()){
-                            nameIconPair.portraitPreviewIcon = HbIcon(fullPathToIcon + KBackgroundPrtPNG);
-                        } else{
-                            nameIconPair.portraitPreviewIcon = HbIcon(KDefaultThemeIcon);
-                        }
-                    }
-                    else {
-                        nameIconPair.portraitPreviewIcon = HbIcon(fullPathToIcon + previewPathPrt);
-                    }
-                    
-                    //Landscape preview
-                    
-                    if(previewPathLsc.isEmpty() || !QFileInfo(fullPathToIcon + previewPathLsc).exists()) {
-                        if(QFileInfo(fullPathToIcon + KPreviewLscNVG).exists()){
-                            nameIconPair.landscapePreviewIcon = HbIcon(fullPathToIcon + KPreviewLscNVG);
-                        }else if(QFileInfo(fullPathToIcon + KPreviewLscSVG).exists()){
-                            nameIconPair.landscapePreviewIcon = HbIcon(fullPathToIcon + KPreviewLscSVG);
-                        }else if(QFileInfo(fullPathToIcon + KBackgroundLscNVG).exists()){
-                            nameIconPair.landscapePreviewIcon = HbIcon(fullPathToIcon + KBackgroundLscNVG);
-                        } else if(QFileInfo(fullPathToIcon + KBackgroundLscSVG).exists()){
-                            nameIconPair.landscapePreviewIcon = HbIcon(fullPathToIcon + KBackgroundLscSVG);
-                        } else if(QFileInfo(fullPathToIcon + KBackgroundLscPNG).exists()){
-                            nameIconPair.landscapePreviewIcon = HbIcon(fullPathToIcon + KBackgroundLscPNG);
-                        } else{
-                            nameIconPair.landscapePreviewIcon = HbIcon(KDefaultThemeIcon);
-                        }
-                    }
-                    else {
-                        nameIconPair.landscapePreviewIcon = HbIcon(fullPathToIcon + previewPathLsc);
-                    }
-                
-                    nameIconPair.name = name;
-                                        
-                    mThemeList.append(nameIconPair);
-
-                    if (name == mCurrentTheme.name) {
-                        mCurrentTheme = nameIconPair;
-                    }
-
-                    iniSetting.endGroup();
-                    if((hidden == "true") ||( hidden == "")||(name != themefolder) ) {
-                        iconthemeslist.removeOne(themefolder);
-                        if(!mThemeList.isEmpty()) {
-                            mThemeList.removeLast();
-                        }
-                    }
-                } else {
-                    iconthemeslist.removeOne(themefolder);
-                    if(!mThemeList.isEmpty()) {
-                        mThemeList.removeLast();
-                    }
-                }
-            }
-        }
-    }
-    
-    if (mCurrentTheme.name == KDefaultTheme)
-    {
-        // Include default
-         CpThemeChanger::ThemeInfo def;
-         def.name = KDefaultTheme;
-         def.icon = HbIcon(KDefaultThemeIcon);
-         mThemeList.append(def);
-  
-         mCurrentTheme = def;
-    }
-
-}
-
-const QList<CpThemeChanger::ThemeInfo>& CpThemeChangerPrivate::themes() const
-{
-   return mThemeList;
-}
-
-bool CpThemeChangerPrivate::connectToServer()
-{
-    return mThemeClient->connectToServer();
-}
-
-/**
- * Indicate if the client is connected to the server
- */
-bool CpThemeChangerPrivate::isConnected() const
-{
-    return mThemeClient->isConnected();
-}
-
-/**
- * Change a theme
- */
-bool CpThemeChangerPrivate::changeTheme(const QString& newTheme)
-{
-    bool result = false;
-    // Skip doing this if the request is for the current theme
-    if (newTheme.isEmpty() || newTheme == mCurrentTheme.name) {
-        return result;
-    }
-
-    // Make sure it's a valid theme name and set the current theme.
-    bool exists = false;
-    QList<CpThemeChanger::ThemeInfo>::const_iterator i;
-    for (i = mThemeList.constBegin(); i != mThemeList.constEnd(); ++i) {
-        if ( newTheme == i->name) {
-            exists = true;
-            break;
-        }
-    }
-
-    if (exists) {
-        result = mThemeClient->changeTheme(newTheme);
-        if(result) {
-            mCurrentTheme = *i;
-        }
-    }
-    return result;
-}
-
-void CpThemeChangerPrivate::_q_themeDirectoryChanged(const QString&)
-{
-    updateThemeList();
-}
-
-
-
-// End of file
--- a/controlpanelplugins/themeplugin/src/cpthemechanger_p.h	Wed Jun 23 18:13:38 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,72 +0,0 @@
-/*
- * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
- * All rights reserved.
- * This component and the accompanying materials are made available
- * under the terms of "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:
- * Nokia Corporation - initial contribution.
- *
- * Contributors:
- *
- * Description:  
- *   
- */
-
-#ifndef HBTHEMECHANGER_P_H
-#define HBTHEMECHANGER_P_H
-
-#include <hbglobal.h>
-
-#include <QObject>
-
-#include "cpthemechanger.h"
-#include "cpthemelistmodel.h"
-
-QT_BEGIN_NAMESPACE
-class QString;
-class QStringList;
-class QFileSystemWatcher;
-QT_END_NAMESPACE
-
-class CpThemeClient;
-
-class CpThemeChangerPrivate
-{
-    CpThemeChanger* q_ptr;
-    Q_DECLARE_PUBLIC(CpThemeChanger)
-
-public:
-    CpThemeChangerPrivate(CpThemeChanger* q);
-    ~CpThemeChangerPrivate();
-
-    bool connectToServer();
-    bool isConnected() const;
-
-    const QList<CpThemeChanger::ThemeInfo>& themes() const;
-    void updateThemeList(const QString& currentThemeName = QString());
-
-    const CpThemeChanger::ThemeInfo& currentTheme() const;
-    int indexOf(const CpThemeChanger::ThemeInfo& theme) const;
-
-    const QString& currentThemeName() const;
-    bool changeTheme(const QString& newtheme);
-
-    void _q_themeDirectoryChanged(const QString&);
-
-    CpThemeChanger::ThemeInfo mCurrentTheme;
-
-    QString mThemeRootPath;
-    QString mThemeRootPathPostfix;
-    QStringList mThemesPathList;
-
-    CpThemeClient* mThemeClient;
-    QFileSystemWatcher* mFileWatcher;
-    QList<CpThemeChanger::ThemeInfo> mThemeList;
-	CpThemeListModel mModel;
-	friend class CpThemeListModel;
-};
-
-#endif /* HBTHEMECHANGER_P_H */
--- a/controlpanelplugins/themeplugin/src/cpthemeclient_p.cpp	Wed Jun 23 18:13:38 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,86 +0,0 @@
-/*
- * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
- * All rights reserved.
- * This component and the accompanying materials are made available
- * under the terms of "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:
- * Nokia Corporation - initial contribution.
- *
- * Contributors:
- *
- * Description:  
- *   
- */
-
-#include "cpthemeclient_p.h"
-#include "cpthemeclient_p_p.h"
-
-static CpThemeClient *clientInst=0;
-
-/**
- * Constructor
- */
-CpThemeClient::CpThemeClient():d_ptr(new CpThemeClientPrivate)
-{
-    
-}
-
-/**
- * CpThemeClient::connectToServer()
- */
-bool CpThemeClient::connectToServer()
-{
-    Q_D(CpThemeClient);
-    
-    return d->connectToServer();
-}
-
-bool CpThemeClient::isConnected()
-{
-    Q_D(const CpThemeClient);
-    
-    return d->isConnected();
-}
-
-/**
- * Change a theme
- */
-bool CpThemeClient::changeTheme(const QString& newtheme)
-{
-    Q_D(CpThemeClient);
-    
-    return d->changeTheme(newtheme);
-}
-
-/**
- * CpThemeClient::~CpThemeClient()
- */
-CpThemeClient::~CpThemeClient()
-{
-    Q_D(CpThemeClient);
-    
-    delete d;
-}
-
-/**
- * CpThemeClient::global()
- */
-CpThemeClient *CpThemeClient::global()
-{
-    if ( !clientInst ) {
-        clientInst = new CpThemeClient;
-    }
-    return clientInst;
-}
-
-/**
- * CpThemeClient::releaseInstance()
- */
-void CpThemeClient::releaseInstance()
-{
-    delete clientInst;
-    clientInst = 0;
-}
--- a/controlpanelplugins/themeplugin/src/cpthemeclient_p.h	Wed Jun 23 18:13:38 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,46 +0,0 @@
-/*
- * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
- * All rights reserved.
- * This component and the accompanying materials are made available
- * under the terms of "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:
- * Nokia Corporation - initial contribution.
- *
- * Contributors:
- *
- * Description:  
- *   
- */
-
-#ifndef CPTHEMECLIENT_P_H
-#define CPTHEMECLIENT_P_H
-
-#include <qglobal.h>
-
-class CpThemeClientPrivate;
-
-class CpThemeClient
-{
-    CpThemeClientPrivate* d_ptr;
-    Q_DECLARE_PRIVATE_D(d_ptr, CpThemeClient)
-
-public:
-    bool connectToServer();
-
-    bool changeTheme(const QString& newtheme);
-
-    bool isConnected();
-
-public:
-    static CpThemeClient *global();
-    static void releaseInstance();
-    ~CpThemeClient();
-
-private:
-    CpThemeClient();
-};
-
-#endif /* CPTHEMECLIENT_P_H */
--- a/controlpanelplugins/themeplugin/src/cpthemeclient_p_p.h	Wed Jun 23 18:13:38 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,74 +0,0 @@
-/*
- * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
- * All rights reserved.
- * This component and the accompanying materials are made available
- * under the terms of "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:
- * Nokia Corporation - initial contribution.
- *
- * Contributors:
- *
- * Description:  
- *   
- */
-
-#ifndef CPTHEMECLIENT_P_P_H
-#define CPTHEMECLIENT_P_P_H
-
-#include <QIcon>
-#include "cpthemecommon_p.h"
-
-#ifdef Q_OS_SYMBIAN
-#include <e32base.h>
-#endif
-
-class QSizeF;
-#ifndef Q_OS_SYMBIAN
-class QLocalSocket;
-#endif
-
-class CpThemeClientPrivate :
-#ifdef Q_OS_SYMBIAN
-public RSessionBase
-#else
-public QObject
-#endif
-{
-#ifndef Q_OS_SYMBIAN
-    Q_OBJECT
-#endif
-
-public:
-    CpThemeClientPrivate();
-    bool connectToServer();
-    bool isConnected() const;
-	bool changeTheme(const QString& newTheme);
-    ~CpThemeClientPrivate();
-    
-#ifndef Q_OS_SYMBIAN
-public slots:
-    void changeTheme();
-#endif
-
-public:
-    bool clientConnected;
-
-private:
-#ifdef Q_OS_SYMBIAN
-    TVersion Version() const;
-    TInt StartServer();
-    TInt CreateServerProcess();
-#endif
-
-private:
-#ifdef Q_OS_SYMBIAN
-	friend class CThemeListenerPrivate;
-#else
-    QLocalSocket* localSocket;
-#endif 
-};
-
-#endif // HBTHEMECLIENT_P_P_H
--- a/controlpanelplugins/themeplugin/src/cpthemeclientqt_p.cpp	Wed Jun 23 18:13:38 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,187 +0,0 @@
-/*
- * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
- * All rights reserved.
- * This component and the accompanying materials are made available
- * under the terms of "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:
- * Nokia Corporation - initial contribution.
- *
- * Contributors:
- *
- * Description:  
- *   
- */
-
-#include "cpthemeclient_p_p.h"
-#include <QLocalSocket>
-#include <QProcess>
-#include <QFile>
-#include <QCoreApplication>
-#include <QDebug>
-#include <QDir>
-
-#include <hbinstance.h>
-
-
-#define WAIT_TIME_TO_CONNECT_TO_SERVER 500
-#define WAIT_TIME_TO_START_SERVER 5000
-/**
- * Constructor
- */
-CpThemeClientPrivate::CpThemeClientPrivate():clientConnected( false ),localSocket( new QLocalSocket() )
-{
-#ifdef THEME_SERVER_TRACES
-    qDebug() << Q_FUNC_INFO ;
-#endif
-}
-
-/**
- * connectToServer
- */
-bool CpThemeClientPrivate::connectToServer()
-{
-    localSocket->connectToServer(THEME_SERVER_NAME);
-    // This logic needs to be improved
-    bool success = localSocket->waitForConnected( WAIT_TIME_TO_CONNECT_TO_SERVER );
-
-#ifdef THEME_SERVER_TRACES
-    qDebug() << Q_FUNC_INFO << "Socket Connect status: " << success;
-#endif 
-
-// Stub shouldn't try starting the theme server yet again.
-#if 0
-    if(!success) {
-        QProcess *newProcess = new QProcess();
-        newProcess->start(SERVERFILEPATH);
-        success = newProcess->waitForStarted( WAIT_TIME_TO_START_SERVER );
-#ifdef THEME_SERVER_TRACES
-        qDebug() << Q_FUNC_INFO << "Server Start Status: " << success << "Error = " << newProcess->error ();
-#endif
-
-        // If server started
-        if (success) {
-            // ToDo: This is to wait for server to start running. Logic needs to be improved.
-            newProcess->waitForFinished(3000);
-#ifdef THEME_SERVER_TRACES
-            qDebug() <<Q_FUNC_INFO<< " Server Start Wait is over" ;
-#endif
-            localSocket->connectToServer(THEME_SERVER_NAME);
-            success = localSocket->waitForConnected();
-#ifdef THEME_SERVER_TRACES
-            qDebug() <<Q_FUNC_INFO<< "socketconnected : "<<success;
-#endif
-        }
-    }
-#endif
-    if (success) {
-        connect(localSocket, SIGNAL(readyRead()), this, SLOT(themeChanged()));
-    }
-    return clientConnected = success;
-}
-
-/**
- * isConnected
- */
-bool CpThemeClientPrivate::isConnected() const
-{
-    return clientConnected;
-}
-
-/**
- * Destructor
- */
-CpThemeClientPrivate::~CpThemeClientPrivate()
-{
-    localSocket->disconnectFromServer();
-    delete localSocket;
-}
-
-/**
- * CpThemeClientPrivate::themeChanged()
- */
-void CpThemeClientPrivate::themeChanged()
-{
-#ifdef THEME_SERVER_TRACES
-    qDebug() << Q_FUNC_INFO;
-#endif
-
-    QByteArray inputByteArray = localSocket->readAll();
-    QDataStream inputDataStream(inputByteArray);
-    int request;
-    inputDataStream >> request;
-
-#ifdef THEME_SERVER_TRACES
-    qDebug() << Q_FUNC_INFO << "recognizer: "<<request;
-#endif
- 
-    if(EThemeSelection==request) {
-        QString themeName;
-        handleThemeChangeRequest(inputDataStream);
-    }
-#if 0
-    // TODO determine if we need this for the control panel app
-    if(EThemeContentUpdate == request) {
-        hbInstance->theme()->d_ptr->clearCache();
-    }
-#endif
-}
-
-/**
- * CpThemeClientPrivate::handleThemeChangeRequest()
- */
-void CpThemeClientPrivate::handleThemeChangeRequest(QDataStream &dataStream)
-{
-    QString themeName;
-    dataStream >> themeName;
-#ifdef THEME_SERVER_TRACES
-    qDebug() << Q_FUNC_INFO <<"themeName is : " <<themeName;
-#endif
-
-    if(!(hbInstance->theme()->name() == themeName)) {
-#ifdef THEME_SERVER_TRACES
-        qDebug() << Q_FUNC_INFO <<"themeChanged(): called";
-#endif
-#if 0
-        // TODO determine if we need this for the control panel app
-        hbInstance->theme()->d_ptr->handleThemeChange();
-#endif
-    }
-}
-
-/**
- * changeTheme
- */
-bool CpThemeClientPrivate::changeTheme(const QString &newTheme)
-{
-#ifdef THEME_CHANGER_TRACES
-    qDebug() <<"ThemeClientQt::changeTheme("<<newTheme<<") called";
-#endif
-    if( (themeName==newTheme) || (newTheme.isEmpty()) ) {
-#ifdef THEME_CHANGER_TRACES
-        qDebug() <<"ThemeClientQt:: return Sametheme applied";
-#endif
-        return false;
-    }
-    QByteArray outputByteArray;
-    QDataStream outputDataStream(&outputByteArray, QIODevice::WriteOnly);
-    ThemeServerRequest requestType = EThemeSelection;
-    outputDataStream << (int)requestType;
-    outputDataStream << newTheme;
-    themeName = newTheme;
-    int expected = outputByteArray.size();
-    int count = localSocket->write(outputByteArray);
-#ifdef THEME_CHANGER_TRACES
-    qDebug()<<"ThemeClientQt::ThemeName written to server";
-#endif
-    localSocket->flush();
-    return count == expected;
-}
-
-
-
-
-
-
--- a/controlpanelplugins/themeplugin/src/cpthemeclientsymbian_p.cpp	Wed Jun 23 18:13:38 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,72 +0,0 @@
-/*
- * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
- * All rights reserved.
- * This component and the accompanying materials are made available
- * under the terms of "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:
- * Nokia Corporation - initial contribution.
- *
- * Contributors:
- *
- * Description:  
- *   
- */
-
-#include "cpthemeclient_p_p.h"
-#include "cpthemesymbiancommon_p.h"
-#include <e32property.h>
-
-
-/**
-* constructor
-*/
-CpThemeClientPrivate::CpThemeClientPrivate()
-{
-}
-
-/**
-* CpThemeClientPrivate::connectToServer()
-*
-* Connects to the server
-*/
-bool CpThemeClientPrivate::connectToServer()
-{
-    return true;
-}
-
-/**
-Indicates a connection to the server
-*/
-bool CpThemeClientPrivate::isConnected() const
-{
-    return true;
-}
-
-/**
- * Destructor
- */
-CpThemeClientPrivate::~CpThemeClientPrivate()
-{
-}
-
-/**
- * changeTheme
- */
-bool CpThemeClientPrivate::changeTheme(const QString& aString )
-{
-    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/cpthemecommon_p.h	Wed Jun 23 18:13:38 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,196 +0,0 @@
-/*
- * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
- * All rights reserved.
- * This component and the accompanying materials are made available
- * under the terms of "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:
- * Nokia Corporation - initial contribution.
- *
- * Contributors:
- *
- * Description:  
- *   
- */
-
-#ifndef HBTHEMECOMMON_P_H
-#define HBTHEMECOMMON_P_H
-
-#include <QImage>
-#include <QSize>
-#include <QStringList>
-#include <QColor>
-
-#define THEME_SERVER_NAME "hbthemeserver"
-#define HB_THEME_SHARED_PIXMAP_CHUNK "themeserver_chunk"
-#define ORGANIZATION "Nokia"
-#define THEME_COMPONENT "ThemeFramework"
-
-// To enable/disable debug messages for theme server functionality
-#undef THEME_SERVER_TRACES
-
-// To enable fute testing for cache
-//#define HB_ICON_CACHE_DEBUG
-struct MultiPartSizeData
-{
-    // Indexing order is:
-
-    // 'NinePieces'             -> tl, t, tr, l, c, r, bl, b, br
-    // 'ThreePiecesHorizontal'  -> l, c, r
-    // 'ThreePiecesVertical'    -> t, c, b
-    QString multiPartIconId;
-    QRect sources[9];       // rects used from the rasterized frame part pixmaps
-    QRect targets[9];       // frame part target rects inside the bounding rectangle of the frame
-    QSize pixmapSizes[9];   // frame part pixmaps are rasterized to these sizes
-};
-
-
-struct HbMultiIconParams
-{
-    QString multiPartIconId;
-    QStringList multiPartIconList;
-    MultiPartSizeData multiPartIconData;
-    QSizeF size;
-    int aspectRatioMode;
-    int mode;
-    int options;
-    bool mirrored;
-    QColor color;
-    int rgba;
-    bool colorflag;
-};
-
-
-enum IconFormatType {
-    INVALID_FORMAT = -1,
-    NVG,
-    PIC,
-    SVG,
-    BLOB,
-    OTHER_SUPPORTED_FORMATS
-};
-
-struct HbSharedPixmapInfo
-{
-    int offset;
-    int width;
-    int height;
-    int defaultWidth;
-    int defaultHeight;
-    QImage::Format format;
-};
-
-struct HbSharedNVGInfo
-{		
-    int offset;
-    int dataSize;
-    int width;
-    int height;
-    int defaultWidth;
-    int defaultHeight;
-    
-};
-
-struct HbSharedPICInfo
-{
-    int offset;
-    int dataSize;
-    int width;
-    int height;
-    int defaultWidth;
-    int defaultHeight;
-};
-
-struct HbSharedBLOBInfo
-{
-    int offset;
-    int dataSize;
-};
-
-struct HbSharedIconInfo
-{
-    IconFormatType type;
-    
-    union 
-    {
-    	HbSharedPixmapInfo pixmapData;
-    	HbSharedNVGInfo nvgData;
-    	HbSharedPICInfo picData;
-        HbSharedBLOBInfo blobData;
-    };	
-      
-};
-
-struct HbSharedStyleSheetInfo
-{
-    int offset;
-    int refCount;
-    HbSharedStyleSheetInfo(): 
-        offset(-1),
-        refCount(0)    
-    {}
-};
-
-struct HbSharedEffectInfo
-{
-    int offset;
-    HbSharedEffectInfo(): offset(-1){}
-};
-
-struct HbSharedWMLInfo
-{
-    int offset;
-    HbSharedWMLInfo() : offset(-1) {}
-};
-
-struct HbDeviceProfileInfo
-{
-    int offset;
-    HbDeviceProfileInfo() : offset(-1) {}
-};
-
-// Function codes (opcodes) used in message passing between client and server
-enum ThemeServerRequest
-    {
-     EIconLookup = 1,
-     EIconDefaultSize,
-     EStyleSheetLookup,
-     EThemeSelection,
-     EMultiPieceIcon,
-     EWidgetMLLookup,
-     EDeviceProfileOffset,
- #ifdef HB_ICON_CACHE_DEBUG
-     EIconCleanUp,
-     ECacheIconCount,
-     ERasterMemLimit,
-     EVectorMemLimit,
-     EFreeRasterMem,
-     EFreeVectorMem,
-     ELastAddedItemMem,
-     ELastAddedItemRefCount,
-     ELastRemovedItemMem,
-     ELastRemovedItemRefCount,
-     EEnableCache,
-     ECacheHit,
-     ECacheMiss,
-     ECleanRasterLRUList,
-     ECleanVectorLRUList,
-     EServerHeap,
-     EGpuLruCount,
-     ECpuLruCount,
-     EServerStat,
-     EServerHeapMarkStart,
-     EServerHeapMarkEnd,
-     EServerAllocFail,
-     EServerAllocReset,
- #endif
-     EThemeContentUpdate,
-	 EEffectLookupFilePath,
-	 EEffectAdd,
-     EUnloadIcon,
-     EThemeServerStop
-    };
-
-#endif /* HBTHEMECOMMON_P_H */
--- a/controlpanelplugins/themeplugin/src/cpthemecontrol.cpp	Wed Jun 23 18:13:38 2010 +0300
+++ b/controlpanelplugins/themeplugin/src/cpthemecontrol.cpp	Tue Jul 06 14:17:10 2010 +0300
@@ -34,6 +34,8 @@
 #include <QSortFilterProxyModel>
 #include <QThread>
 #include <QTimer>
+#include <QDesktopServices>
+#include <QUrl>
 
 #include <hbmainwindow.h>
 #include <hbinstance.h>
@@ -42,6 +44,8 @@
 #include "cpthemecontrol.h"
 #include "cpthemelistview.h"
 #include "cpthemepreview.h"
+#include "cpthemeinfo.h"
+#include "cpthemelistmodel.h"
 
 #include <hbdialog.h>
 #include <hblabel.h>
@@ -67,7 +71,6 @@
     mThemePreview(0), 
     mThemeChanger(0),
     mListModel(0),
-    mSortModel(0),
     mThemeChangeFinished(false),
     mWaitDialog(0)
 {
@@ -79,7 +82,7 @@
     translator->load("control_panel_" + lang, path);
     qApp->installTranslator(translator);
     
-    connect(hbInstance->theme(),SIGNAL(changeFinished()), this, SLOT(themeChangeFinished()));
+    connect(mThemeChanger,SIGNAL(themeChangeFinished()), this, SLOT(themeChangeFinished()));
    
 }
 
@@ -111,16 +114,12 @@
    
     mThemeListView = new CpThemeListView();
     
-    mListModel = &mThemeChanger->model();
+    if(!mListModel) {
+        mListModel = new CpThemeListModel(this);
+    }
     
-    mSortModel = new QSortFilterProxyModel(this);
-    mSortModel->setDynamicSortFilter(true);
-    mSortModel->setSortCaseSensitivity(Qt::CaseInsensitive);
-    mSortModel->sort(0);
-    mSortModel->setSourceModel(mListModel);
-
     // Set the model for theme list.
-    mThemeListView->setModel(mSortModel);
+    mThemeListView->setModel(mListModel);
     mThemeListView->themeList()->setSelectionMode(HbAbstractItemView::SingleSelection);
     
     setActiveThemeIndex();
@@ -154,7 +153,11 @@
 */
 QString CpThemeControl::currentThemeName() const
 {
-    return mThemeChanger->currentTheme().name;
+    QString name = "";
+    if(mThemeChanger->currentTheme()) {
+        name = mThemeChanger->currentTheme()->name();
+    }
+    return name;
 }
 
 /*!
@@ -162,7 +165,11 @@
 */
 HbIcon CpThemeControl::currentThemeIcon() const
 {
-    return mThemeChanger->currentTheme().icon;
+    HbIcon icon;
+    if(mThemeChanger->currentTheme()) {
+        icon = mThemeChanger->currentTheme()->icon();
+    }
+    return icon;
 }
 
 /*!
@@ -173,38 +180,66 @@
     if(!index.isValid()) {
         return;
     }
-
     
-    CpThemeChanger::ThemeInfo themeInfo;
+    CpThemeInfo themeInfo;
     QVariant data;
 
     //reset the current index to active theme, so that the selection remains on current
     //theme even though another list item is selected.
     setActiveThemeIndex();
     
+    // Figure out whether this is a URI and appropriately delegate
+    data = index.data(CpThemeListModel::ItemTypeRole);
+    if(data.isValid() && data.canConvert<CpThemeInfo::ThemeListItemType>()) {
+
+        CpThemeInfo::ThemeListItemType type = data.value<CpThemeInfo::ThemeListItemType>();
+
+        switch (type) {
+            case CpThemeInfo::ThemeListItemType_URL:
+                //get the URL
+                data = index.data(CpThemeListModel::ItemDataRole);
+                if(data.isValid()) {
+                    QString url = data.toString();
+                    // Launch the URL in the browser and 
+                    // continue to Preview if not successful
+                    if (QDesktopServices::openUrl(QUrl(url, QUrl::TolerantMode))) {
+                        return;
+                    }
+                }
+                break;
+    
+            case CpThemeInfo::ThemeListItemType_APP:
+                break;
+
+            default:
+                // do nothing
+                qt_noop();
+        }
+    }
+    
     //get the theme name.
     data = index.data(Qt::DisplayRole);
     if(data.isValid()) {
-        themeInfo.name = data.toString();
+        themeInfo.setName(data.toString());
     }
+    
     //get theme icon.
     data = index.data(Qt::DecorationRole);
     if(data.isValid()) {
-        themeInfo.icon = data.value<HbIcon>();
-    }
-    
-    data = index.data(CpThemeChanger::PortraitPreviewRole);
-    if(data.isValid()) {
-        themeInfo.portraitPreviewIcon = data.value<HbIcon>();
+        themeInfo.setIcon(data.value<HbIcon>());
     }
     
-    data = index.data(CpThemeChanger::LandscapePreviewRole);
+    data = index.data(CpThemeListModel::PortraitPreviewRole);
     if(data.isValid()) {
-        themeInfo.landscapePreviewIcon = data.value<HbIcon>();
+        themeInfo.setPortraitPreviewIcon(data.value<HbIcon>());
     }
-        
-        
-    //Set up the theme preview and set it to
+    
+    data = index.data(CpThemeListModel::LandscapePreviewRole);
+    if(data.isValid()) {
+        themeInfo.setLandscapePreviewIcon(data.value<HbIcon>());
+    }
+    
+   //Set up the theme preview and set it to
     //the current view of main window.
     HbMainWindow*  mWindow = ::mainWindow();
    
@@ -221,9 +256,9 @@
         mThemePreview->setThemeInfo(themeInfo);
     }
     mThemePreview->setTitle(hbTrId("txt_cp_title_control_panel"));
-	  	
+
     mWindow->setCurrentView(mThemePreview);
-	
+
 }
 
 /*!
@@ -231,22 +266,21 @@
 */
 void CpThemeControl::themeApplied(const QString& theme)
 {
-    bool success = false;
-
-    success = mThemeChanger->connectToServer();
+    QThread::currentThread()->setPriority(QThread::HighPriority);  
+    
+    if(mThemeChanger->changeTheme(theme)) {
     
-    if (success) {
-        QThread::currentThread()->setPriority(QThread::HighPriority);  
-        mThemeChanger->changeTheme(theme);
-        emit themeUpdated(mThemeChanger->currentTheme().name, mThemeChanger->currentTheme().icon);
+        //Start a timer. If theme change takes more than 1 seconds,
+        //we will show a dialog (mWaitDialog) until theme change
+        //is done (themeChangeFinished is called).
+        QTimer::singleShot(1000, this, SLOT(themeWaitTimeout()));
+        
+        mThemeChangeFinished = false;
+    } else {
+        //theme change failed, go back to control panel.
+        previewClosed();
+        triggerThemeListClose();
     }
-    
-    //Start a timer. If theme change takes more than 1 seconds,
-    //we will show a dialog (mWaitDialog) until theme change
-    //is done (themeChangeFinished is called).
-    QTimer::singleShot(1000, this, SLOT(themeWaitTimeout()));
-        
-    mThemeChangeFinished = false;
    
 }
 
@@ -314,8 +348,9 @@
     {
         if(!mWaitDialog) {
             mWaitDialog = new HbDialog();
+            mWaitDialog->setDismissPolicy(HbPopup::NoDismiss);
             mWaitDialog->setModal(false);
-            mWaitDialog->setDismissPolicy(HbPopup::NoDismiss);
+            mWaitDialog->setTimeout(HbPopup::NoTimeout);
             //TODO: need localized text for Hb Dialog
             // Create and set HbLabel as content widget.
             HbLabel *label = new HbLabel("Processing ...");
@@ -334,6 +369,10 @@
     QTimer::singleShot(0, this, SLOT(themeChangeTimeout()));
     mThemeChangeFinished = true;
     
+    if(mThemeChanger->currentTheme()) {
+        emit themeUpdated(mThemeChanger->currentTheme()->name(), mThemeChanger->currentTheme()->icon());
+    }
+    
 }
 
 /*!
@@ -343,11 +382,13 @@
 void CpThemeControl::setActiveThemeIndex()
 {
     //Get the index of current theme.
-    QModelIndex sourceIndex = mListModel->index(mThemeChanger->indexOf(mThemeChanger->currentTheme()),0);
-    //Map it to the sort model index.
-    QModelIndex sortedIndex = mSortModel->mapFromSource(sourceIndex);
-    //set current index.
-    mThemeListView->themeList()->setCurrentIndex(sortedIndex, QItemSelectionModel::SelectCurrent);
+    CpThemeListModel* themeListModel = dynamic_cast<CpThemeListModel*>(mListModel);
+    const CpThemeInfo* currentTheme = mThemeChanger->currentTheme();
+    if(themeListModel && currentTheme) {
+        QModelIndex sourceIndex = mListModel->index(themeListModel->indexOf(*currentTheme),0);
+        //set current index.
+        mThemeListView->themeList()->setCurrentIndex(sourceIndex, QItemSelectionModel::SelectCurrent);
+    }
 }
     
 
--- a/controlpanelplugins/themeplugin/src/cpthemecontrol.h	Wed Jun 23 18:13:38 2010 +0300
+++ b/controlpanelplugins/themeplugin/src/cpthemecontrol.h	Tue Jul 06 14:17:10 2010 +0300
@@ -34,7 +34,7 @@
 class CpThemeListView;
 class CpThemePreview;
 class CpBaseSettingView;
-
+class CpThemeListModel;
 
 
 class CpThemeControl : public QObject
@@ -70,7 +70,6 @@
     CpThemePreview* mThemePreview;
     CpThemeChanger* mThemeChanger;
     QAbstractItemModel* mListModel;
-    QSortFilterProxyModel* mSortModel;
     bool mThemeChangeFinished;
     HbDialog* mWaitDialog;
 };
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelplugins/themeplugin/src/cpthemeinfo.cpp	Tue Jul 06 14:17:10 2010 +0300
@@ -0,0 +1,102 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "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:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:  
+ *   
+ */
+
+/*!
+ * A simple class to represent theme information. This information includes:
+ *  1. Theme Name
+ *  2. Theme Preview Thumbnail
+ *  3. Theme Preview landscape and portrait icon
+ *  4. Theme list type: either an item representing a theme, or a link (e.g OviStore).
+ *  5. Item type data. Represents additional information (e.g for link type, the URL).
+ */
+#include <hbicon.h>
+
+#include "cpthemeinfo.h"
+
+ CpThemeInfo::CpThemeInfo()
+{
+}
+
+ 
+ CpThemeInfo::~CpThemeInfo()
+{
+}
+      
+QString CpThemeInfo::name() const
+{
+    return mName;
+}
+
+void CpThemeInfo::setName(const QString& newName)
+{
+    mName = newName;
+}
+      
+CpThemeInfo::ThemeListItemType CpThemeInfo::itemType() const
+{
+    return mItemType;
+}
+
+void CpThemeInfo::setItemType(CpThemeInfo::ThemeListItemType type)
+{
+    mItemType = type;
+}
+
+      
+QString CpThemeInfo::itemData() const
+{
+    return mItemData;
+}
+
+void CpThemeInfo::setItemData(const QString& data)
+{
+    mItemData = data;
+}
+
+      
+HbIcon CpThemeInfo::icon() const
+{
+    return mIcon;
+}
+  
+void CpThemeInfo::setIcon(const HbIcon& newIcon)
+{
+    mIcon = newIcon;
+}
+
+      
+HbIcon CpThemeInfo::portraitPreviewIcon() const
+{
+    return mPortraitPreviewIcon;
+}
+
+void CpThemeInfo::setPortraitPreviewIcon(const HbIcon& newIcon)
+{
+    mPortraitPreviewIcon = newIcon;
+}
+
+      
+HbIcon CpThemeInfo::landscapePreviewIcon() const
+{
+    return mLandscapePreviewIcon;
+}
+
+void CpThemeInfo::setLandscapePreviewIcon(const HbIcon& newIcon)
+{
+    mLandscapePreviewIcon = newIcon;
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelplugins/themeplugin/src/cpthemeinfo.h	Tue Jul 06 14:17:10 2010 +0300
@@ -0,0 +1,77 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "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:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:  
+ *   
+ */
+#ifndef CPTHEMEINFO_H_
+#define CPTHEMEINFO_H_
+
+
+#include <QString>
+
+#include <hbicon.h>
+
+class CpThemeInfo {
+
+public:
+    
+    Q_ENUMS(ThemeListItemType)
+    
+    enum ThemeListItemType {
+                 ThemeListItemType_default = 0,
+                 ThemeListItemType_URL,
+                 ThemeListItemType_APP
+             };
+    
+     CpThemeInfo();
+     ~CpThemeInfo();
+     
+     QString name() const;
+     void setName(const QString& newName);
+     
+     ThemeListItemType itemType() const;
+     void setItemType(ThemeListItemType type);
+     
+     QString itemData() const;
+     void setItemData(const QString& data);
+     
+     HbIcon icon() const;
+     void setIcon(const HbIcon& newIcon);
+     
+     HbIcon portraitPreviewIcon() const;
+     void setPortraitPreviewIcon(const HbIcon& newIcon);
+     
+     HbIcon landscapePreviewIcon() const;
+     void setLandscapePreviewIcon(const HbIcon& newIcon);
+     
+     bool operator < (const CpThemeInfo &other) const   {            
+         return mName.toCaseFolded().localeAwareCompare(other.mName.toCaseFolded()) < 0;
+     }
+     bool operator == (const CpThemeInfo &other) const {
+         return mName.localeAwareCompare(other.mName) == 0;
+     }
+     
+private:
+     CpThemeInfo::ThemeListItemType mItemType;
+     QString mItemData;
+     QString mName;
+     HbIcon mIcon;
+     HbIcon mPortraitPreviewIcon;
+     HbIcon mLandscapePreviewIcon;
+
+};    
+Q_DECLARE_METATYPE(CpThemeInfo::ThemeListItemType)
+
+   
+#endif /* CPTHEMEINFO_H_ */
--- a/controlpanelplugins/themeplugin/src/cpthemelistmodel.cpp	Wed Jun 23 18:13:38 2010 +0300
+++ b/controlpanelplugins/themeplugin/src/cpthemelistmodel.cpp	Tue Jul 06 14:17:10 2010 +0300
@@ -1,39 +1,69 @@
 /*
- * ============================================================================
- *  Name        : cpthemelistmodel_p.cpp
- *  Part of     : LibHb / theme
- *  Description : Private implementation of the theme listmodel.
- *  Version     : %version: 1 % << Don't touch! Updated by Synergy at check-out.
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0""
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
  *
- *  Copyright (c) 2008-2009 Nokia.  All rights reserved.
- *  This material, including documentation and any related computer
- *  programs, is protected by copyright controlled by Nokia.  All
- *  rights are reserved.  Copying, including reproducing, storing,
- *  adapting or translating, any or all of this material requires the
- *  prior written consent of Nokia.  This material also contains
- *  confidential information which may not be disclosed to others
- *  without the prior written consent of Nokia.
- * ============================================================================
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:  
+ *   
  */
 
+#include <QDir>
+#include <QStringList>
+#include <QFileSystemWatcher>
+
+#include <HbIcon>
+
 #include "cpthemelistmodel.h"
-#include "cpthemechanger_p.h"
-#include <QFileSystemWatcher>
+#include "cpthemeinfo.h"
+#include "cpthemeutil.h"
 
 /*
     CpThemeChangerModel provides an interface to the data contained in the
-    CpThemeChanger using QAbstractListModel.
+    theme list using QAbstractListModel.
 */
 
 /*
     Constructor
 */
-CpThemeListModel::CpThemeListModel(CpThemeChangerPrivate *dd, QObject* parent)
+CpThemeListModel::CpThemeListModel(QObject* parent)
     : QAbstractListModel(parent)
-    , mThemeChangerPrivate(dd)
+    , mTopThemeList()
+    , mThemeList()
+    , mBottomThemeList()
+    , mFileWatcher(new QFileSystemWatcher(this))
 {
-    connect(dd->mFileWatcher, SIGNAL(directoryChanged(const QString&)),
-        this, SLOT(themeListChanged()));
+    //Build theme list
+    mThemeList = CpThemeUtil::buildThemeList();
+    
+    //Look into theme paths and add a file watcher for it
+    //to get notified when themes are added.
+    QStringList themesPathList = CpThemeUtil::themePathList();
+    foreach (const QString &path, themesPathList) {
+        QDir themeDir;
+        themeDir.setPath( path ) ;
+        QStringList list = themeDir.entryList(QDir::AllDirs|QDir::NoDotAndDotDot,QDir::Name);
+        if(list.contains("themes", Qt::CaseSensitive )) {
+            mFileWatcher->addPath(themeDir.path() + "/themes/");
+        }
+    }
+    connect(mFileWatcher, SIGNAL(directoryChanged(const QString&)),
+           this, SLOT(themeListChanged()));
+       
+    // data for the list which appears after the themes:
+    CpThemeInfo fetchFromStore;
+    fetchFromStore.setName(hbTrId("txt_cp_list_get_more_tones"));
+    fetchFromStore.setItemType(CpThemeInfo::ThemeListItemType_URL);
+    fetchFromStore.setItemData(QString("http://lr.ovi.mobi/store/themes"));
+    fetchFromStore.setIcon(HbIcon("qtg_large_ovistore"));
+    mBottomThemeList.append(fetchFromStore);
 }
 
 /*
@@ -41,6 +71,8 @@
 */
 CpThemeListModel::~CpThemeListModel()
 {
+    delete mFileWatcher;
+    mFileWatcher = 0;
 
 }
 
@@ -49,42 +81,70 @@
 */
 int CpThemeListModel::rowCount(const QModelIndex&) const
 {
-    return mThemeChangerPrivate->mThemeList.size();
+    return mTopThemeList.size() +
+        mThemeList.size() +
+        mBottomThemeList.size();
 }
 
 /*
-    Reimplemented from QAbstractListModel.  Provides the data for Qt::DisplayRole and
-    Qt::DecorationRole.
+    Reimplemented from QAbstractListModel. 
 */
 QVariant CpThemeListModel::data(const QModelIndex& index, int role) const
 {
     QVariant retVal = QVariant();
 
     if (index.isValid()) {
-        switch (role) {
-            case Qt::DisplayRole:
-                retVal = mThemeChangerPrivate->mThemeList.at(index.row()).name;
-                break;
+        // figure out which list we're in and do the appropriate mapping
+        int row = index.row();
+        const QList<CpThemeInfo> *list = 0;
+        if (row < mTopThemeList.size()) {
+            list = &mTopThemeList;
+        } else {
+            row -= mTopThemeList.size();
+            if ( row < mThemeList.size() ) {
+                list = &mThemeList;
+            } else {
+                row -= mThemeList.size();
+                if ( row < mBottomThemeList.size() ) {
+                    list = &mBottomThemeList;
+                }
+            }
+        }
 
-            case Qt::DecorationRole:
-                retVal = mThemeChangerPrivate->mThemeList.at(index.row()).icon;
-                break;
+        if (list) {
+            switch (role) {
+                case Qt::DisplayRole:
+                    retVal = list->at(row).name();
+                    break;
 
-            case Qt::SizeHintRole:
-                retVal = mThemeChangerPrivate->mThemeList.at(index.row()).icon.size();
-                break;
-                
-        	  case CpThemeChanger::PortraitPreviewRole:
-          	    retVal = mThemeChangerPrivate->mThemeList.at(index.row()).portraitPreviewIcon;
-                break;
-                
-            case CpThemeChanger::LandscapePreviewRole:
-                retVal = mThemeChangerPrivate->mThemeList.at(index.row()).landscapePreviewIcon;
-                break;
+                case Qt::DecorationRole:
+                    retVal = list->at(row).icon();
+                    break;
 
-            default:
-                // do nothing
-                qt_noop();
+                case Qt::SizeHintRole:
+                    retVal = list->at(row).icon().size();
+                    break;
+                    
+                case PortraitPreviewRole:
+          	        retVal = list->at(row).portraitPreviewIcon();
+                    break;
+                    
+                case LandscapePreviewRole:
+                    retVal = list->at(row).landscapePreviewIcon();
+                    break;
+                    
+                case ItemDataRole:
+                    retVal = list->at(row).itemData();
+                    break;
+
+                case ItemTypeRole:
+                    retVal = QVariant::fromValue<CpThemeInfo::ThemeListItemType>(list->at(row).itemType());
+                    break;
+
+                default:
+                    // do nothing
+                    qt_noop();
+            }
         }
     }
 
@@ -101,8 +161,17 @@
 void CpThemeListModel::themeListChanged()
 {
     beginResetModel();
-
-    mThemeChangerPrivate->themes();
-
+    if(!mThemeList.empty()) {
+        mThemeList.clear();
+    }
+    mThemeList = CpThemeUtil::buildThemeList();
+  
     endResetModel();
 }
+/*!
+ * Returns index of theme infor within the theme list.
+ */
+int CpThemeListModel::indexOf(const CpThemeInfo& theme) const
+{
+    return mThemeList.indexOf(theme);
+}
--- a/controlpanelplugins/themeplugin/src/cpthemelistmodel.h	Wed Jun 23 18:13:38 2010 +0300
+++ b/controlpanelplugins/themeplugin/src/cpthemelistmodel.h	Tue Jul 06 14:17:10 2010 +0300
@@ -1,20 +1,19 @@
 /*
-* ============================================================================
-*  Name        : cpthemelistmodel_p.h
-*  Part of     : LibHb / theme
-*  Description : CpThemeListModel class definition
-*  Version     : %version: 1 % << Don't touch! Updated by Synergy at check-out.
-*
-*  Copyright (c) 2008-2009 Nokia.  All rights reserved.
-*  This material, including documentation and any related computer
-*  programs, is protected by copyright controlled by Nokia.  All
-*  rights are reserved.  Copying, including reproducing, storing,
-*  adapting or translating, any or all of this material requires the
-*  prior written consent of Nokia.  This material also contains
-*  confidential information which may not be disclosed to others
-*  without the prior written consent of Nokia.
-* ============================================================================
-*/
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "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:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:  
+ *   
+ */
 
 #ifndef CP_THEME_LIST_MODEL_P_H
 #define CP_THEME_LIST_MODEL_P_H
@@ -22,25 +21,38 @@
 #include <QAbstractListModel>
 #include <QModelIndex>
 #include <QObject>
+#include "cpthemeutil.h"
 
-class CpThemeChangerPrivate;
+class QFileSystemWatcher;
 
 class CpThemeListModel : public QAbstractListModel
 {
     Q_OBJECT
 
 public:
-    CpThemeListModel(CpThemeChangerPrivate* dd, QObject *parent = 0);
+    
+    enum ThemeListUserRole {
+               PortraitPreviewRole = Qt::UserRole,
+               LandscapePreviewRole,
+               ItemTypeRole,
+               ItemDataRole
+        };
+    
+    explicit CpThemeListModel(QObject *parent = 0);
     virtual ~CpThemeListModel();
 
     virtual int rowCount(const QModelIndex& parent = QModelIndex()) const;
     virtual QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const;
-
+    int indexOf(const CpThemeInfo& theme) const;
+    
 public slots:
     void themeListChanged();
 
 private:
-    CpThemeChangerPrivate *mThemeChangerPrivate;
+    QList<CpThemeInfo> mTopThemeList;
+    QList<CpThemeInfo> mThemeList;
+    QList<CpThemeInfo> mBottomThemeList;
+    QFileSystemWatcher *mFileWatcher;
 };
 
 #endif //CP_THEME_LIST_MODEL_P_H
--- a/controlpanelplugins/themeplugin/src/cpthemepreview.cpp	Wed Jun 23 18:13:38 2010 +0300
+++ b/controlpanelplugins/themeplugin/src/cpthemepreview.cpp	Tue Jul 06 14:17:10 2010 +0300
@@ -29,6 +29,7 @@
 #include <HbParameterLengthLimiter>
 
 #include "cpthemepreview.h"
+#include "cpthemeinfo.h"
 
 /*!
     \class CpThemePreview
@@ -40,7 +41,7 @@
 /*!
     constructor.
 */
-CpThemePreview::CpThemePreview(const CpThemeChanger::ThemeInfo& theme, QGraphicsItem *parent) :
+CpThemePreview::CpThemePreview(const CpThemeInfo& theme, QGraphicsItem *parent) :
      HbView(parent), 
      mTheme(theme),
      mSoftKeyBackAction(0),
@@ -52,22 +53,23 @@
 
     
     //setup the heading.
-    QString themeHeading = HbParameterLengthLimiter("txt_cp_title_preview_1").arg(mTheme.name);   
+    QString themeHeading = HbParameterLengthLimiter("txt_cp_title_preview_1").arg(mTheme.name());   
     HbLabel* label = new HbLabel(themeHeading, this);
    
     layout->addItem(label);
     
     layout->setAlignment(layout->itemAt(0), Qt::AlignTop);
+    layout->itemAt(0)->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed,QSizePolicy::DefaultType);
     
     //Create the toolbar and "Select" and "Cancel" actions.
     HbToolBar* mToolBar = new HbToolBar(this);
 
-    HbAction* selectAction = new HbAction(tr("Select"));
+    HbAction* selectAction = new HbAction(hbTrId("txt_common_button_select"));
     
     //Add Action to the toolbar and show toolbar
     mToolBar->addAction( selectAction );
 
-    HbAction* cancelAction = new HbAction(tr("Cancel"));
+    HbAction* cancelAction = new HbAction(hbTrId("txt_common_button_cancel"));
     mToolBar->addAction( cancelAction );
 
     QObject::connect( selectAction, SIGNAL(triggered()), 
@@ -81,12 +83,14 @@
        
    
     if(mainWindow()->orientation() == Qt::Horizontal) {
-        mPreviewIcon = new HbIconItem(mTheme.landscapePreviewIcon, this);
+        mPreviewIcon = new HbIconItem(mTheme.landscapePreviewIcon(), this);
     }
     else {
-        mPreviewIcon = new HbIconItem(mTheme.portraitPreviewIcon, this);
+        mPreviewIcon = new HbIconItem(mTheme.portraitPreviewIcon(), this);
     }
     layout->addItem(mPreviewIcon);
+    layout->itemAt(1)->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred,QSizePolicy::DefaultType);
+        
  
     setToolBar(mToolBar);
     setLayout(layout);
@@ -110,7 +114,7 @@
 /*!
   sets the theme to \a theme.
 */
-void CpThemePreview::setThemeInfo(const CpThemeChanger::ThemeInfo& theme)
+void CpThemePreview::setThemeInfo(const CpThemeInfo& theme)
 {
     mTheme = theme;
 }
@@ -120,7 +124,7 @@
 */
 const QString& CpThemePreview::themeName() const
 {
-    return mTheme.name;
+    return mTheme.name();
 }
 
 /*!
@@ -128,7 +132,7 @@
 */
 const HbIcon& CpThemePreview::themeIcon() const
 {
-    return mTheme.icon;
+    return mTheme.icon();
 }
 
 /*!
@@ -136,7 +140,7 @@
 */
 void CpThemePreview::themeSelected()
 {
-    emit applyTheme(mTheme.name);
+    emit applyTheme(mTheme.name());
 }
 
 /*! 
@@ -152,10 +156,10 @@
         previewLayout->removeAt(1);
         
         if(orientation == Qt::Horizontal) {
-            mPreviewIcon->setIcon(mTheme.landscapePreviewIcon);
+            mPreviewIcon->setIcon(mTheme.landscapePreviewIcon());
         }
         else {
-            mPreviewIcon->setIcon(mTheme.portraitPreviewIcon);
+            mPreviewIcon->setIcon(mTheme.portraitPreviewIcon());
         }
         
         previewLayout->addItem(mPreviewIcon);
--- a/controlpanelplugins/themeplugin/src/cpthemepreview.h	Wed Jun 23 18:13:38 2010 +0300
+++ b/controlpanelplugins/themeplugin/src/cpthemepreview.h	Tue Jul 06 14:17:10 2010 +0300
@@ -21,7 +21,9 @@
 #include <hbview.h>
 #include <QObject>
 #include <hbicon.h>
-#include <cpthemechanger.h>
+#include "cpthemechanger.h"
+#include "cpthemeinfo.h"
+
 
 QT_BEGIN_NAMESPACE
 class QString;
@@ -36,9 +38,9 @@
     Q_OBJECT
 
 public:
-    explicit CpThemePreview(const CpThemeChanger::ThemeInfo &theme, QGraphicsItem *parent = 0);
+    explicit CpThemePreview(const CpThemeInfo &theme, QGraphicsItem *parent = 0);
     ~CpThemePreview();
-    void setThemeInfo(const CpThemeChanger::ThemeInfo& theme);
+    void setThemeInfo(const CpThemeInfo& theme);
     const QString& themeName() const;
     const HbIcon& themeIcon() const;
 	
@@ -51,7 +53,7 @@
     void previewOrientationChanged(Qt::Orientation orientation);
 
 private:
-    CpThemeChanger::ThemeInfo mTheme;
+    CpThemeInfo mTheme;
     HbAction* mSoftKeyBackAction;
     HbIconItem* mPreviewIcon;
 
--- a/controlpanelplugins/themeplugin/src/cpthemesymbiancommon_p.h	Wed Jun 23 18:13:38 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,71 +0,0 @@
-/*
- * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
- * All rights reserved.
- * This component and the accompanying materials are made available
- * under the terms of "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:
- * Nokia Corporation - initial contribution.
- *
- * Contributors:
- *
- * Description:  
- *   
- */
-
-#ifndef HBTHEMESYMBIANCOMMON_P_H
-#define HBTHEMESYMBIANCOMMON_P_H
-
-#include <e32base.h>
-#include "cpthemecommon_p.h"
-struct TIconParams
-{
-    TBuf<256> fileName;
-    TReal width;
-    TReal height;
-    TUint8 aspectRatioMode;
-    TUint8 mode;
-    TUint8 options;
-    TBool mirrored;
-    TUint32 rgba;
-    TBool colorflag;
- };
-
-struct TMultiIconSymbParams
-{
-    TBuf<256> multiPartIconId;
-    TBuf<256> multiPartIconList[9];
-    TRect sources[9];
-    TRect targets[9];
-    TSize pixmapSizes[9];
-    QSizeF size;
-    TInt aspectRatioMode;
-    TInt mode;
-    TInt options;
-    TBool mirrored;
-    TInt rgba;
-    TBool colorflag;
- };
-
-// 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
-
-
-const TUint KThemeServerMajorVersionNumber=0;
-const TUint KThemeServerMinorVersionNumber=1;
-const TUint KThemeServerBuildVersionNumber=1;
-
-enum TThemeServerLeave
-{
-    ENonNumericString = 99
-};
-
-#endif // HBTHEMESYMBIANCOMMON_P_H
-
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelplugins/themeplugin/src/cpthemeutil.cpp	Tue Jul 06 14:17:10 2010 +0300
@@ -0,0 +1,311 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "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:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:  
+ *   
+ */
+
+#include "cpthemeinfo.h"
+#include "cpthemeutil.h"
+
+#include <QStringList>
+#include <QSettings>  
+#include <QFileInfoList>
+#include <QDir>
+#include <QList>
+
+#include <hbicon.h>
+#include <hbinstance.h>
+
+/*!
+ * This class provides utility function to get Theme information.  
+ */
+
+#if defined(Q_OS_SYMBIAN)
+#include <e32std.h>
+#include <centralrepository.h>
+        static const TUid KServerUid3={0x20022E82};
+        static const TUint32 KDefaultThemeNameKey = 0x2;
+        static const TUint32 KDefaultThemeRootPathKey = 0x3;
+
+#endif
+
+#if !defined(Q_OS_SYMBIAN)
+    #include <stdio.h>
+    static const char* KThemePathKey = "HB_THEMES_DIR";  //used for getting default theme.
+#endif
+    
+    
+#ifdef Q_OS_WIN
+    static char* _path = NULL;
+    static size_t _size = 0;
+    _dupenv_s(&_path, &_size, KThemePathKey);
+    static QString themeRootPath = QString(_path);
+    static QString themeRootPathPostfix = QString();
+    free(_path);
+#elif defined(Q_OS_SYMBIAN)
+    static QString themeRootPath = "c:\\resource\\hb";
+    static QString themeRootPathPostfix = "resource\\hb";
+#elif defined(Q_OS_MACX)
+    static QString themeRootPath = QDir::homePath() + '/' + "Library" + QString("hb");
+    static QString themeRootPathPostfix = QString();
+#elif defined(Q_OS_UNIX)
+    static QString themeRootPath = QString(getenv(KThemePathKey));
+    static QString themeRootPathPostfix = QString();
+#else
+    static QString themeRootPath = "c:\\resource\\hb";
+    static QString themeRootPathPostfix = QString();
+#endif
+
+    //Location of theme preview and background icons.
+    static const QString KPreviewThumbnailNVG = "/scalable/qtg_graf_theme_preview_thumbnail.nvg";
+    static const QString KPreviewThumbnailSVG = "/scalable/qtg_graf_theme_preview_thumbnail.svg";
+    
+    static const QString KPreviewPrtNVG       = "/scalable/qtg_graf_theme_preview_prt.nvg";
+    static const QString KPreviewLscNVG       = "/scalable/qtg_graf_theme_preview_lsc.nvg";
+    static const QString KPreviewPrtSVG       = "/scalable/qtg_graf_theme_preview_prt.svg";
+    static const QString KPreviewLscSVG       = "/scalable/qtg_graf_theme_preview_lsc.svg";
+   
+    static const QString KBackgroundPrtNVG    = "/scalable/qtg_graf_screen_bg_prt.nvg";
+    static const QString KBackgroundLscNVG    = "/scalable/qtg_graf_screen_bg_lsc.nvg";
+    static const QString KBackgroundPrtSVG    = "/scalable/qtg_graf_screen_bg_prt.svg";
+    static const QString KBackgroundLscSVG    = "/scalable/qtg_graf_screen_bg_lsc.svg";
+    
+    static const QString KBackgroundPrtPNG    = "/pixmap/qtg_graf_screen_bg_prt.png";                     
+    static const QString KBackgroundLscPNG    = "/pixmap/qtg_graf_screen_bg_lsc.png";
+    
+/*!
+ * Returns a list of paths where themes folder reside.  
+ */
+QStringList CpThemeUtil::themePathList()
+{
+    static QStringList themesPathList;
+    
+    if(themesPathList.isEmpty()) {
+
+#if defined(Q_OS_SYMBIAN)
+        QFileInfoList driveInfoList = QDir::drives();
+        foreach (const QFileInfo &driveInfo, driveInfoList) {
+            const QString themePath = driveInfo.absolutePath() + themeRootPathPostfix;
+            if(QDir(themePath).exists())
+                themesPathList << themePath;
+        }
+#else
+        themesPathList << themeRootPath;
+#endif
+    }
+    return themesPathList;
+}
+
+/*!
+ * Given the theme name, it returns the absolute path of the theme.
+ */
+QString CpThemeUtil::themePath(const QString& themeName)
+{
+    QString themePath = "";
+    QStringList themesPathList = themePathList();
+    foreach (const QString &path, themesPathList) {
+       QString tmpPath = path + "/themes/icons/" + themeName;
+       if(QDir(tmpPath).exists()) {
+           themePath = tmpPath;
+           break;
+       }
+    }
+    return themePath;
+}
+  
+/*
+ * Builds a CpThemeInfo object given theme path and theme name.  It creates the name and 
+ * preview icons for the object.  Creates a new CpThemeInfo objects. Caller takes ownership.
+ * Returns NULL if can't build the object.
+ */
+CpThemeInfo* CpThemeUtil::buildThemeInfo(const QString& themePath, const QString& themeName)
+{
+    CpThemeInfo *themeInfo = new CpThemeInfo();
+    QString iconPath;
+    
+    QString previewPathPrt;
+    QString previewPathLsc;
+    QString name = themeName;
+    QString hidden = "";
+    
+    //first look into the index.theme file to get theme information.
+   
+    if(QFileInfo(themePath + "/index.theme").exists()) {
+        QSettings iniSetting(themePath + "/index.theme", QSettings::IniFormat);
+        iniSetting.beginGroup("Icon Theme");
+        name = iniSetting.value("Name").toString();
+        hidden = iniSetting.value("Hidden").toString();
+        iconPath = iniSetting.value("PreviewThumbnailPath").toString();
+        previewPathPrt = iniSetting.value("PreviewIconPath_prt").toString();
+        previewPathLsc = iniSetting.value("PreviewIconPath_lsc").toString();
+        iniSetting.endGroup();
+       
+    }
+                       
+    if(name.isEmpty() || (hidden == "true") ||( hidden == "")) {
+        return NULL;
+    }
+   
+    themeInfo->setName(name);
+    themeInfo->setItemType(CpThemeInfo::ThemeListItemType_default);
+          
+    //Get the icons. Logic is as follow:
+    /* 1. If the icon path is in index.theme and the icon exist, use it.
+     * 2. Otherwise look for the icon in the theme folder.
+     * 2. If preview icon doesn't exist, use background icon.
+     * 3. If no icon exist (background or preview),use default theme icon.
+     */
+    if(iconPath.isEmpty() || !QFileInfo(themePath + iconPath).exists()){
+    //Set thumbnail
+        if(QFileInfo(themePath + KPreviewThumbnailNVG).exists()){
+            themeInfo->setIcon(HbIcon(themePath + KPreviewThumbnailNVG));
+        }else if(QFileInfo(themePath + KPreviewThumbnailSVG).exists()){
+            themeInfo->setIcon(HbIcon(themePath + KPreviewThumbnailSVG));
+        }else if(QFileInfo(themePath + KBackgroundPrtNVG).exists()){
+            themeInfo->setIcon(HbIcon(themePath + KBackgroundPrtNVG));
+        } else if(QFileInfo(themePath + KBackgroundPrtSVG).exists()){
+            themeInfo->setIcon(HbIcon(themePath + KBackgroundPrtSVG));
+        } else if(QFileInfo(themePath + KBackgroundPrtPNG).exists()){
+            themeInfo->setIcon(HbIcon(themePath + KBackgroundPrtPNG)); 
+        }else{
+            themeInfo->setIcon(HbIcon(defaultTheme()->icon()));
+        }
+
+    } else {
+        themeInfo->setIcon(HbIcon(themePath + iconPath));
+    }
+          
+    //Portrait preview
+          
+    if(previewPathPrt.isEmpty() || !QFileInfo(themePath + previewPathPrt).exists()) {
+          
+        if(QFileInfo(themePath + KPreviewPrtNVG).exists()){
+            themeInfo->setPortraitPreviewIcon(HbIcon(themePath + KPreviewPrtNVG));
+        }else if(QFileInfo(themePath + KPreviewPrtSVG).exists()){
+            themeInfo->setPortraitPreviewIcon(HbIcon(themePath + KPreviewPrtSVG));
+        }else if(QFileInfo(themePath + KBackgroundPrtNVG).exists()){
+            themeInfo->setPortraitPreviewIcon(HbIcon(themePath + KBackgroundPrtNVG));
+        } else if(QFileInfo(themePath + KBackgroundPrtSVG).exists()){
+            themeInfo->setPortraitPreviewIcon(HbIcon(themePath + KBackgroundPrtSVG));
+        } else if(QFileInfo(themePath + KBackgroundPrtPNG).exists()){
+            themeInfo->setPortraitPreviewIcon(HbIcon(themePath + KBackgroundPrtPNG));
+        } else{
+            themeInfo->setPortraitPreviewIcon(HbIcon(defaultTheme()->icon()));
+        }
+    }
+    else {
+        themeInfo->setPortraitPreviewIcon(HbIcon(themePath + previewPathPrt));
+    }
+          
+    //Landscape preview
+          
+    if(previewPathLsc.isEmpty() || !QFileInfo(themePath + previewPathLsc).exists()) {
+        if(QFileInfo(themePath + KPreviewLscNVG).exists()){
+            themeInfo->setLandscapePreviewIcon(HbIcon(themePath + KPreviewLscNVG));
+        }else if(QFileInfo(themePath + KPreviewLscSVG).exists()){
+            themeInfo->setLandscapePreviewIcon(HbIcon(themePath + KPreviewLscSVG));
+        }else if(QFileInfo(themePath + KBackgroundLscNVG).exists()){
+            themeInfo->setLandscapePreviewIcon(HbIcon(themePath + KBackgroundLscNVG));
+        } else if(QFileInfo(themePath + KBackgroundLscSVG).exists()){
+            themeInfo->setLandscapePreviewIcon(HbIcon(themePath + KBackgroundLscSVG));
+        } else if(QFileInfo(themePath + KBackgroundLscPNG).exists()){
+            themeInfo->setLandscapePreviewIcon(HbIcon(themePath + KBackgroundLscPNG));
+        } else{
+            themeInfo->setLandscapePreviewIcon(HbIcon(defaultTheme()->icon()));
+        }
+    }
+    else {
+        themeInfo->setLandscapePreviewIcon(HbIcon(themePath + previewPathLsc));
+    }
+    return themeInfo;
+
+}
+
+/*! Creates a list of CpThemeInfo objects representing theme information.
+ *  Caller should take ownership of the list.
+ */
+QList<CpThemeInfo> CpThemeUtil::buildThemeList()
+{
+    QList<CpThemeInfo> themeList; 
+  
+    QStringList mThemesPathList = themePathList();
+    
+    foreach (const QString &path, mThemesPathList) {
+        QDir themeDir;
+        themeDir.setPath( path ) ;
+        QStringList iconthemeslist;
+        QStringList list = themeDir.entryList(QDir::AllDirs|QDir::NoDotAndDotDot,QDir::Name);
+        CpThemeInfo* themeInfo;
+
+        if(list.contains("themes", Qt::CaseSensitive )) {
+            QDir root(themeDir.path());
+            themeDir.setPath(root.path() + "/themes/icons/") ;
+            iconthemeslist = themeDir.entryList(QDir::AllDirs|QDir::NoDotAndDotDot,QDir::Name);
+            foreach(QString themefolder, iconthemeslist) {
+                QDir iconThemePath(root.path() + "/themes/icons/" + themefolder);
+                if(iconThemePath.exists("index.theme") &&
+                   (iconThemePath.exists("scalable") || iconThemePath.exists("pixmap") )) {
+
+                    themeInfo = buildThemeInfo(iconThemePath.path(), themefolder);
+                    if(themeInfo && !themeInfo->name().isEmpty()) {
+                        themeList.append(*themeInfo);
+                    }
+                } 
+            }
+        }
+    }
+    qSort( themeList );
+    return themeList;
+}
+
+/*!
+ * Returns the default theme information. 
+ */
+CpThemeInfo* CpThemeUtil::defaultTheme()
+{
+    //static because default theme doesn't change.
+    static CpThemeInfo *defaultTheme = new CpThemeInfo();
+    QString defaultThemeName;
+    QString defaultThemeRootDir;
+    if(defaultTheme->name().isEmpty()) {
+       
+
+#ifdef Q_OS_SYMBIAN
+        CRepository *repository = 0;
+        TRAP_IGNORE(repository = CRepository::NewL(KServerUid3));
+        if (repository) {
+            TBuf<256> value;
+            if (KErrNone == repository->Get((TUint32)KDefaultThemeNameKey, value)) {
+                QString qvalue((QChar*)value.Ptr(), value.Length());
+                defaultThemeName = qvalue.trimmed();
+            }
+            value.Zero();
+            if (KErrNone == repository->Get((TUint32)KDefaultThemeRootPathKey, value)) {
+                QString qvalue((QChar*)value.Ptr(), value.Length());
+                defaultThemeRootDir = qvalue.trimmed();
+            }
+            else {
+                defaultThemeRootDir = themePath(defaultThemeName);
+            }
+            value.Zero();
+            delete repository;
+        }
+          
+#endif
+        defaultTheme = buildThemeInfo(defaultThemeRootDir, defaultThemeName);
+
+    }
+    return defaultTheme;
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelplugins/themeplugin/src/cpthemeutil.h	Tue Jul 06 14:17:10 2010 +0300
@@ -0,0 +1,38 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "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:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:  
+ *   
+ */
+
+#ifndef CPTHEMEUTIL_H_
+#define CPTHEMEUTIL_H_
+
+#include <QList>
+
+class QStringList;
+class CpThemeInfo;
+
+class CpThemeUtil {
+
+public:
+    static QStringList themePathList();
+    static QList<CpThemeInfo> buildThemeList();
+    static CpThemeInfo* buildThemeInfo(const QString& themePath, const QString& themeName);
+    static QString themePath(const QString& themeName);
+    static CpThemeInfo* defaultTheme();
+};
+
+#endif /* CPTHEMEUTIL_H_ */
+
+
--- a/controlpanelplugins/themeplugin/themeplugin.pri	Wed Jun 23 18:13:38 2010 +0300
+++ b/controlpanelplugins/themeplugin/themeplugin.pri	Tue Jul 06 14:17:10 2010 +0300
@@ -9,18 +9,15 @@
 # Contributors:
 # Description: cpthemeplugin source files
 # Input
-HEADERS += src/cpthemeclient_p_p.h \
-    src/cpthemepreview.h \
+HEADERS += src/cpthemepreview.h \
     src/cpthemecontrol.h \
     src/cpthemeplugin.h \
     src/cpthemelistview.h \
     src/cpthemelistmodel.h \
     src/cpthemechanger.h \
-    src/cpthemeclient_p.h \
-    src/cpthemecommon_p.h \
-    src/cpthemechanger_p.h \
-    src/cpthemepluginentryitemdata.h
-
+    src/cpthemepluginentryitemdata.h \
+    src/cpthemeutil.h \
+    src/cpthemeinfo.h
 SOURCES += src/cpthemepreview.cpp \
     src/cpthemecontrol.cpp \
     src/cpthemeplugin.cpp \
@@ -28,14 +25,5 @@
     src/cpthemelistmodel.cpp \
     src/cpthemepluginentryitemdata.cpp \
     src/cpthemechanger.cpp \
-    src/cpthemechanger_p.cpp \
-    src/cpthemeclient_p.cpp
-    	
-win32|mac { 
-    SOURCES += src/cpthemeclientqt_p.cpp
-}
-
-symbian { 
-    HEADERS += src/cpthemesymbiancommon_p.h
-    SOURCES += src/cpthemeclientsymbian_p.cpp
-}
+    src/cpthemeutil.cpp \
+    src/cpthemeinfo.cpp
--- a/controlpanelplugins/themeplugin/themeplugin.pro	Wed Jun 23 18:13:38 2010 +0300
+++ b/controlpanelplugins/themeplugin/themeplugin.pro	Tue Jul 06 14:17:10 2010 +0300
@@ -65,6 +65,7 @@
 symbian {
     INCLUDEPATH += $$MW_LAYER_SYSTEMINCLUDE
     INCLUDEPATH += $$MOC_DIR
+    LIBS += -lcentralrepository
     TARGET.CAPABILITY = ALL -TCB
     TARGET.EPOCALLOWDLLDATA = 1
     TARGET.UID3 = 0X2002C2F3
--- a/controlpanelui/examples/groupplugin/src/cpsamplegroup.cpp	Wed Jun 23 18:13:38 2010 +0300
+++ b/controlpanelui/examples/groupplugin/src/cpsamplegroup.cpp	Tue Jul 06 14:17:10 2010 +0300
@@ -42,11 +42,11 @@
 void CpSampleGroup::sliderValueChanged(int value)
 {
     //TODO: store your changes
-    HbMessageBox::launchInformationMessageBox(QString("slider value changed to:%1").arg(value));
+   // HbMessageBox::message(QString("slider value changed to:%1").arg(value));
 }
 void CpSampleGroup::checkBoxStateChanged(int state)
 {
     //TODO: store your changes
     QString str = (state ? "checked" : "un-checked");
-    HbMessageBox::launchInformationMessageBox(str);
+   // HbMessageBox::message(str);
 }
--- a/controlpanelui/examples/pluginlauncherclient/src/main.cpp	Wed Jun 23 18:13:38 2010 +0300
+++ b/controlpanelui/examples/pluginlauncherclient/src/main.cpp	Tue Jul 06 14:17:10 2010 +0300
@@ -19,14 +19,15 @@
 #include <QDir>
 #include <hbmainwindow.h>
 #include <hbstyleloader.h>
-#include <cpbasepath.h>
 #include "mainview.h"
 
 int main(int argc, char **argv)
 {
     HbApplication app(argc, argv);
     
-    HbStyleLoader::registerFilePath(CP_RESOURCE_PATH + QDir::separator() + WIDGETML_SUB_PATH);
+    HbStyleLoader::registerFilePath(":/widgetml/cpdataformlistentryviewitem.css");
+    HbStyleLoader::registerFilePath(":/widgetml/cpdataformlistentryviewitem_color.css");
+    HbStyleLoader::registerFilePath(":/widgetml/cpdataformlistentryviewitem.widgetml");
     
     HbMainWindow mainWindow;
     MainView *mainView = new MainView();
--- a/controlpanelui/examples/pluginlauncherclient/src/mainview.cpp	Wed Jun 23 18:13:38 2010 +0300
+++ b/controlpanelui/examples/pluginlauncherclient/src/mainview.cpp	Tue Jul 06 14:17:10 2010 +0300
@@ -24,16 +24,17 @@
 #include <hbmessagebox.h>
 #include <xqaiwrequest.h>
 #include <XQServiceRequest.h>
+#include <QTimer>
 
 MainView::MainView(QGraphicsItem *parent/* = 0*/)
-: HbView(parent)
+: HbView(parent),mRequest(0)
 {
 	init();
 }
 
 MainView::~MainView()
 {
-
+    delete mRequest;
 }
 
 void MainView::init()
@@ -60,16 +61,21 @@
 
 void MainView::launchQtHighwayProfileView()
 {
-    XQAiwRequest *request = mAppMgr.create("com.nokia.symbian.ICpPluginLauncher", "launchSettingView(QString,QVariant)", true);
+    if (mRequest) {
+        delete mRequest;
+        mRequest = 0;
+    }
+    
+    mRequest = mAppMgr.create("com.nokia.symbian.ICpPluginLauncher", "launchSettingView(QString,QVariant)", true);
 
-    if (!request)
+    if (!mRequest)
     {
         return;
     }
     else
     {
-        connect(request, SIGNAL(requestOk(QVariant)), SLOT(handleReturnValue(QVariant)));
-        connect(request, SIGNAL(requestError(int,QString)), SLOT(handleError(int,QString)));
+        connect(mRequest, SIGNAL(requestOk(QVariant)), SLOT(handleReturnValue(QVariant)));
+        connect(mRequest, SIGNAL(requestError(int,QString)), SLOT(handleError(int,QString)));
     }
 
 
@@ -77,15 +83,18 @@
     QList<QVariant> args;
     args << QVariant( "cppersonalizationplugin.dll" );
     args << QVariant ( "profile_view" );
-    request->setArguments(args);
+    mRequest->setArguments(args);
 
+    mRequest->setSynchronous(false);
+    
+    QTimer::singleShot(20* 1000, this, SLOT(closeSettingView()));
+    
     // Make the request
-    if (!request->send())
+    if (!mRequest->send())
     {
         //report error     
     }
     
-    delete request;
 }
 
 void MainView::handleReturnValue(const QVariant &returnValue)
@@ -98,4 +107,12 @@
     HbMessageBox::information( QString("handle error:") + errorMessage);
 }
 
+void MainView::closeSettingView()
+{   
+    if (mRequest) {
+        delete mRequest;
+        mRequest = 0;
+    }
+}
+
 //End of File
--- a/controlpanelui/examples/pluginlauncherclient/src/mainview.h	Wed Jun 23 18:13:38 2010 +0300
+++ b/controlpanelui/examples/pluginlauncherclient/src/mainview.h	Tue Jul 06 14:17:10 2010 +0300
@@ -30,13 +30,19 @@
 	void init();
 private slots:
     void launchInProcessProfileView();
+    
     void launchQtHighwayProfileView();   
+    
     void handleReturnValue(const QVariant &returnValue);
     void handleError(int errorCode,const QString &errorMessage);
+    
+    void closeSettingView();
+    
 private:
     Q_DISABLE_COPY(MainView)
 private:
     XQApplicationManager mAppMgr;
+    XQAiwRequest *mRequest;
 };
 
 #endif
--- a/controlpanelui/examples/viewplugin/src/cpsampleview.cpp	Wed Jun 23 18:13:38 2010 +0300
+++ b/controlpanelui/examples/viewplugin/src/cpsampleview.cpp	Tue Jul 06 14:17:10 2010 +0300
@@ -60,12 +60,12 @@
 void CpSampleView::sliderValueChanged(int value)
 {
     //TODO: store your changes
-    HbMessageBox::launchInformationMessageBox(QString("slider value changed to:%1").arg(value));
+   // HbMessageBox::message(QString("slider value changed to:%1").arg(value));
 }
 void CpSampleView::checkBoxStateChanged(int state)
 {
     //TODO: store your changes
     QString str = (state ? "checked" : "un-checked");
-    HbMessageBox::launchInformationMessageBox(str);
+   // HbMessageBox::message(str);
 }
 
--- a/controlpanelui/rom/controlpanelui.iby	Wed Jun 23 18:13:38 2010 +0300
+++ b/controlpanelui/rom/controlpanelui.iby	Tue Jul 06 14:17:10 2010 +0300
@@ -24,6 +24,7 @@
 #define CP_UPGRADABLE_APP_REG_RSC(NAME) data=DATAZ_\PRIVATE\10003A3F\IMPORT\APPS\ ## NAME ## _reg.rsc        Private\10003a3f\import\apps\ ## NAME ## _reg.rsc
 
 file=ABI_DIR\BUILD_DIR\controlpanel.exe         			 SHARED_LIB_DIR\controlpanel.exe 
+data = ZRESOURCE\apps\controlpanel.mif                                   APP_RESOURCE_DIR\controlpanel.mif
 CP_UPGRADABLE_APP_REG_RSC(controlpanel)    
 
 
--- a/controlpanelui/src/bwins/cpcategorymodelu.def	Wed Jun 23 18:13:38 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,53 +0,0 @@
-EXPORTS
-	?stop@CpTaskExecutor@@QAEXXZ @ 1 NONAME ; void CpTaskExecutor::stop(void)
-	?tr@CpTaskExecutor@@SA?AVQString@@PBD0@Z @ 2 NONAME ; class QString CpTaskExecutor::tr(char const *, char const *)
-	?getStaticMetaObject@CpTaskExecutor@@SAABUQMetaObject@@XZ @ 3 NONAME ; struct QMetaObject const & CpTaskExecutor::getStaticMetaObject(void)
-	??1CpCategorySettingFormModel@@UAE@XZ @ 4 NONAME ; CpCategorySettingFormModel::~CpCategorySettingFormModel(void)
-	?beforeLoadingConfigPlugins@CpCategorySettingFormItemData@@EAEXAAVCpItemDataHelper@@@Z @ 5 NONAME ; void CpCategorySettingFormItemData::beforeLoadingConfigPlugins(class CpItemDataHelper &)
-	?trUtf8@CpCategorySettingFormModel@@SA?AVQString@@PBD0H@Z @ 6 NONAME ; class QString CpCategorySettingFormModel::trUtf8(char const *, char const *, int)
-	??0CpCategorySettingFormModel@@QAE@ABVQString@@@Z @ 7 NONAME ; CpCategorySettingFormModel::CpCategorySettingFormModel(class QString const &)
-	?staticMetaObject@CpTaskExecutor@@2UQMetaObject@@B @ 8 NONAME ; struct QMetaObject const CpTaskExecutor::staticMetaObject
-	??_ECpTaskExecutor@@UAE@I@Z @ 9 NONAME ; CpTaskExecutor::~CpTaskExecutor(unsigned int)
-	?trUtf8@CpTaskExecutor@@SA?AVQString@@PBD0H@Z @ 10 NONAME ; class QString CpTaskExecutor::trUtf8(char const *, char const *, int)
-	?trUtf8@CpCategorySettingFormItemData@@SA?AVQString@@PBD0@Z @ 11 NONAME ; class QString CpCategorySettingFormItemData::trUtf8(char const *, char const *)
-	?tr@CpCategorySettingFormModel@@SA?AVQString@@PBD0@Z @ 12 NONAME ; class QString CpCategorySettingFormModel::tr(char const *, char const *)
-	?tr@CpCategorySettingFormItemData@@SA?AVQString@@PBD0@Z @ 13 NONAME ; class QString CpCategorySettingFormItemData::tr(char const *, char const *)
-	?getStaticMetaObject@CpCategorySettingFormModel@@SAABUQMetaObject@@XZ @ 14 NONAME ; struct QMetaObject const & CpCategorySettingFormModel::getStaticMetaObject(void)
-	?destroyGlobalInstance@CpTaskExecutor@@SAXXZ @ 15 NONAME ; void CpTaskExecutor::destroyGlobalInstance(void)
-	?initialize@CpCategorySettingFormModel@@UAEXAAVCpItemDataHelper@@@Z @ 16 NONAME ; void CpCategorySettingFormModel::initialize(class CpItemDataHelper &)
-	?initialize@CpCategorySettingFormItemData@@QAEXAAVCpItemDataHelper@@@Z @ 17 NONAME ; void CpCategorySettingFormItemData::initialize(class CpItemDataHelper &)
-	?tr@CpTaskExecutor@@SA?AVQString@@PBD0H@Z @ 18 NONAME ; class QString CpTaskExecutor::tr(char const *, char const *, int)
-	??0CpTaskExecutor@@QAE@PAVQObject@@@Z @ 19 NONAME ; CpTaskExecutor::CpTaskExecutor(class QObject *)
-	?tr@CpCategorySettingFormItemData@@SA?AVQString@@PBD0H@Z @ 20 NONAME ; class QString CpCategorySettingFormItemData::tr(char const *, char const *, int)
-	?qt_metacast@CpTaskExecutor@@UAEPAXPBD@Z @ 21 NONAME ; void * CpTaskExecutor::qt_metacast(char const *)
-	??1CpCategorySettingFormItemData@@UAE@XZ @ 22 NONAME ; CpCategorySettingFormItemData::~CpCategorySettingFormItemData(void)
-	?beforeLoadingConfigPlugins@CpCategorySettingFormModel@@EAEXAAVCpItemDataHelper@@@Z @ 23 NONAME ; void CpCategorySettingFormModel::beforeLoadingConfigPlugins(class CpItemDataHelper &)
-	??1CpTaskExecutor@@UAE@XZ @ 24 NONAME ; CpTaskExecutor::~CpTaskExecutor(void)
-	?createCpPluginItemData@@YAHPAVCpCreatePluginItemDataEvent@@@Z @ 25 NONAME ; int createCpPluginItemData(class CpCreatePluginItemDataEvent *)
-	?trUtf8@CpCategorySettingFormModel@@SA?AVQString@@PBD0@Z @ 26 NONAME ; class QString CpCategorySettingFormModel::trUtf8(char const *, char const *)
-	?staticMetaObject@CpCategorySettingFormModel@@2UQMetaObject@@B @ 27 NONAME ; struct QMetaObject const CpCategorySettingFormModel::staticMetaObject
-	?qt_metacall@CpTaskExecutor@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 28 NONAME ; int CpTaskExecutor::qt_metacall(enum QMetaObject::Call, int, void * *)
-	??0CpCategorySettingFormItemData@@QAE@ABVQString@@PBVHbDataFormModelItem@@@Z @ 29 NONAME ; CpCategorySettingFormItemData::CpCategorySettingFormItemData(class QString const &, class HbDataFormModelItem const *)
-	?qt_metacast@CpCategorySettingFormItemData@@UAEPAXPBD@Z @ 30 NONAME ; void * CpCategorySettingFormItemData::qt_metacast(char const *)
-	?toFront@CpTaskExecutor@@QAE_NPAVCpTask@@@Z @ 31 NONAME ; bool CpTaskExecutor::toFront(class CpTask *)
-	?qt_metacall@CpCategorySettingFormModel@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 32 NONAME ; int CpCategorySettingFormModel::qt_metacall(enum QMetaObject::Call, int, void * *)
-	?removeTasks@CpTaskExecutor@@AAEXXZ @ 33 NONAME ; void CpTaskExecutor::removeTasks(void)
-	?qt_metacall@CpCategorySettingFormItemData@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 34 NONAME ; int CpCategorySettingFormItemData::qt_metacall(enum QMetaObject::Call, int, void * *)
-	?qt_metacast@CpCategorySettingFormModel@@UAEPAXPBD@Z @ 35 NONAME ; void * CpCategorySettingFormModel::qt_metacast(char const *)
-	?afterLoadingConfigPlugins@CpCategorySettingFormModel@@EAEXAAVCpItemDataHelper@@@Z @ 36 NONAME ; void CpCategorySettingFormModel::afterLoadingConfigPlugins(class CpItemDataHelper &)
-	?getStaticMetaObject@CpCategorySettingFormItemData@@SAABUQMetaObject@@XZ @ 37 NONAME ; struct QMetaObject const & CpCategorySettingFormItemData::getStaticMetaObject(void)
-	?metaObject@CpTaskExecutor@@UBEPBUQMetaObject@@XZ @ 38 NONAME ; struct QMetaObject const * CpTaskExecutor::metaObject(void) const
-	??0CpCategorySettingFormItemData@@QAE@W4DataItemType@HbDataFormModelItem@@ABVQString@@1PBV2@@Z @ 39 NONAME ; CpCategorySettingFormItemData::CpCategorySettingFormItemData(enum HbDataFormModelItem::DataItemType, class QString const &, class QString const &, class HbDataFormModelItem const *)
-	?trUtf8@CpCategorySettingFormItemData@@SA?AVQString@@PBD0H@Z @ 40 NONAME ; class QString CpCategorySettingFormItemData::trUtf8(char const *, char const *, int)
-	?runTask@CpTaskExecutor@@QAE_NPAVCpTask@@_N@Z @ 41 NONAME ; bool CpTaskExecutor::runTask(class CpTask *, bool)
-	?afterLoadingConfigPlugins@CpCategorySettingFormItemData@@EAEXAAVCpItemDataHelper@@@Z @ 42 NONAME ; void CpCategorySettingFormItemData::afterLoadingConfigPlugins(class CpItemDataHelper &)
-	?metaObject@CpCategorySettingFormModel@@UBEPBUQMetaObject@@XZ @ 43 NONAME ; struct QMetaObject const * CpCategorySettingFormModel::metaObject(void) const
-	?tr@CpCategorySettingFormModel@@SA?AVQString@@PBD0H@Z @ 44 NONAME ; class QString CpCategorySettingFormModel::tr(char const *, char const *, int)
-	?staticMetaObject@CpCategorySettingFormItemData@@2UQMetaObject@@B @ 45 NONAME ; struct QMetaObject const CpCategorySettingFormItemData::staticMetaObject
-	?run@CpTaskExecutor@@MAEXXZ @ 46 NONAME ; void CpTaskExecutor::run(void)
-	?metaObject@CpCategorySettingFormItemData@@UBEPBUQMetaObject@@XZ @ 47 NONAME ; struct QMetaObject const * CpCategorySettingFormItemData::metaObject(void) const
-	?trUtf8@CpTaskExecutor@@SA?AVQString@@PBD0@Z @ 48 NONAME ; class QString CpTaskExecutor::trUtf8(char const *, char const *)
-	??_ECpCategorySettingFormItemData@@UAE@I@Z @ 49 NONAME ; CpCategorySettingFormItemData::~CpCategorySettingFormItemData(unsigned int)
-	??_ECpCategorySettingFormModel@@UAE@I@Z @ 50 NONAME ; CpCategorySettingFormModel::~CpCategorySettingFormModel(unsigned int)
-	?globalInstance@CpTaskExecutor@@SAPAV1@XZ @ 51 NONAME ; class CpTaskExecutor * CpTaskExecutor::globalInstance(void)
-
--- a/controlpanelui/src/bwins/cpprofilewrapperu.def	Wed Jun 23 18:13:38 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,57 +0,0 @@
-EXPORTS
-	?setKeyTouchScreenVibra@CpProfileModel@@QAEXHH@Z @ 1 NONAME ; void CpProfileModel::setKeyTouchScreenVibra(int, int)
-	?tr@CpProfileModel@@SA?AVQString@@PBD0H@Z @ 2 NONAME ; class QString CpProfileModel::tr(char const *, char const *, int)
-	?setReminderVibra@CpProfileModel@@QAEXH_N@Z @ 3 NONAME ; void CpProfileModel::setReminderVibra(int, bool)
-	?offLineMode@CpProfileModel@@QBE_NXZ @ 4 NONAME ; bool CpProfileModel::offLineMode(void) const
-	?masterVibra@CpProfileModel@@QBE_NXZ @ 5 NONAME ; bool CpProfileModel::masterVibra(void) const
-	?ringTone@CpProfileModel@@QBE?AVQString@@XZ @ 6 NONAME ; class QString CpProfileModel::ringTone(void) const
-	?qt_metacast@CpProfileModel@@UAEPAXPBD@Z @ 7 NONAME ; void * CpProfileModel::qt_metacast(char const *)
-	?setRingTone@CpProfileModel@@QAEXABVQString@@@Z @ 8 NONAME ; void CpProfileModel::setRingTone(class QString const &)
-	?setReminderTone@CpProfileModel@@QAEXHABVQString@@@Z @ 9 NONAME ; void CpProfileModel::setReminderTone(int, class QString const &)
-	?trUtf8@CpProfileModel@@SA?AVQString@@PBD0@Z @ 10 NONAME ; class QString CpProfileModel::trUtf8(char const *, char const *)
-	?silenceMode@CpProfileModel@@QBE_NXZ @ 11 NONAME ; bool CpProfileModel::silenceMode(void) const
-	?reminderVibra@CpProfileModel@@QBE_NH@Z @ 12 NONAME ; bool CpProfileModel::reminderVibra(int) const
-	?setEmailTone@CpProfileModel@@QAEXHABVQString@@@Z @ 13 NONAME ; void CpProfileModel::setEmailTone(int, class QString const &)
-	?ringAlertVibra@CpProfileModel@@QBE_NH@Z @ 14 NONAME ; bool CpProfileModel::ringAlertVibra(int) const
-	?emailTone@CpProfileModel@@QBE?AVQString@@H@Z @ 15 NONAME ; class QString CpProfileModel::emailTone(int) const
-	?activeProfileId@CpProfileModel@@QBEHXZ @ 16 NONAME ; int CpProfileModel::activeProfileId(void) const
-	?masterVolume@CpProfileModel@@QBEHXZ @ 17 NONAME ; int CpProfileModel::masterVolume(void) const
-	?notificationTone@CpProfileModel@@QBE_NH@Z @ 18 NONAME ; bool CpProfileModel::notificationTone(int) const
-	?tr@CpProfileModel@@SA?AVQString@@PBD0@Z @ 19 NONAME ; class QString CpProfileModel::tr(char const *, char const *)
-	?getStaticMetaObject@CpProfileModel@@SAABUQMetaObject@@XZ @ 20 NONAME ; struct QMetaObject const & CpProfileModel::getStaticMetaObject(void)
-	?keyTouchScreenTone@CpProfileModel@@QBEHH@Z @ 21 NONAME ; int CpProfileModel::keyTouchScreenTone(int) const
-	?setRingTone@CpProfileModel@@QAEXHABVQString@@@Z @ 22 NONAME ; void CpProfileModel::setRingTone(int, class QString const &)
-	?reminderTone@CpProfileModel@@QBE?AVQString@@H@Z @ 23 NONAME ; class QString CpProfileModel::reminderTone(int) const
-	?profileName@CpProfileModel@@QBE?AVQString@@H@Z @ 24 NONAME ; class QString CpProfileModel::profileName(int) const
-	?setKeyTouchScreenTone@CpProfileModel@@QAEXHH@Z @ 25 NONAME ; void CpProfileModel::setKeyTouchScreenTone(int, int)
-	?setMasterVolume@CpProfileModel@@QAEXH@Z @ 26 NONAME ; void CpProfileModel::setMasterVolume(int)
-	?staticMetaObject@CpProfileModel@@2UQMetaObject@@B @ 27 NONAME ; struct QMetaObject const CpProfileModel::staticMetaObject
-	?activateProfile@CpProfileModel@@QAEHH@Z @ 28 NONAME ; int CpProfileModel::activateProfile(int)
-	?profileNames@CpProfileModel@@QBE?AVQStringList@@XZ @ 29 NONAME ; class QStringList CpProfileModel::profileNames(void) const
-	?setNotificationVibra@CpProfileModel@@QAEXH_N@Z @ 30 NONAME ; void CpProfileModel::setNotificationVibra(int, bool)
-	?setNotificationTone@CpProfileModel@@QAEXH_N@Z @ 31 NONAME ; void CpProfileModel::setNotificationTone(int, bool)
-	?metaObject@CpProfileModel@@UBEPBUQMetaObject@@XZ @ 32 NONAME ; struct QMetaObject const * CpProfileModel::metaObject(void) const
-	?setRingAlertVibra@CpProfileModel@@QAEXH_N@Z @ 33 NONAME ; void CpProfileModel::setRingAlertVibra(int, bool)
-	??0CpProfileModel@@QAE@PAVQObject@@@Z @ 34 NONAME ; CpProfileModel::CpProfileModel(class QObject *)
-	?emailVibra@CpProfileModel@@QBE_NH@Z @ 35 NONAME ; bool CpProfileModel::emailVibra(int) const
-	?setProfileSettings@CpProfileModel@@QAEHHAAVCpProfileSettings@@@Z @ 36 NONAME ; int CpProfileModel::setProfileSettings(int, class CpProfileSettings &)
-	?setEmailVibra@CpProfileModel@@QAEXH_N@Z @ 37 NONAME ; void CpProfileModel::setEmailVibra(int, bool)
-	?setOffLineMode@CpProfileModel@@QAEX_N@Z @ 38 NONAME ; void CpProfileModel::setOffLineMode(bool)
-	??1CpProfileModel@@UAE@XZ @ 39 NONAME ; CpProfileModel::~CpProfileModel(void)
-	?notificationVibra@CpProfileModel@@QBE_NH@Z @ 40 NONAME ; bool CpProfileModel::notificationVibra(int) const
-	?qt_metacall@CpProfileModel@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 41 NONAME ; int CpProfileModel::qt_metacall(enum QMetaObject::Call, int, void * *)
-	?messageTone@CpProfileModel@@QBE?AVQString@@H@Z @ 42 NONAME ; class QString CpProfileModel::messageTone(int) const
-	?profileSettings@CpProfileModel@@QAEXHAAVCpProfileSettings@@@Z @ 43 NONAME ; void CpProfileModel::profileSettings(int, class CpProfileSettings &)
-	?d_func@CpProfileModel@@ABEPBVCpProfileModelPrivate@@XZ @ 44 NONAME ; class CpProfileModelPrivate const * CpProfileModel::d_func(void) const
-	?setSilenceMode@CpProfileModel@@QAEX_N@Z @ 45 NONAME ; void CpProfileModel::setSilenceMode(bool)
-	?setMessageVibra@CpProfileModel@@QAEXH_N@Z @ 46 NONAME ; void CpProfileModel::setMessageVibra(int, bool)
-	?keyTouchScreenVibra@CpProfileModel@@QBEHH@Z @ 47 NONAME ; int CpProfileModel::keyTouchScreenVibra(int) const
-	?d_func@CpProfileModel@@AAEPAVCpProfileModelPrivate@@XZ @ 48 NONAME ; class CpProfileModelPrivate * CpProfileModel::d_func(void)
-	?initiationFlag@CpProfileModel@@QAEHXZ @ 49 NONAME ; int CpProfileModel::initiationFlag(void)
-	?messageVibra@CpProfileModel@@QBE_NH@Z @ 50 NONAME ; bool CpProfileModel::messageVibra(int) const
-	??_ECpProfileModel@@UAE@I@Z @ 51 NONAME ; CpProfileModel::~CpProfileModel(unsigned int)
-	?ringTone@CpProfileModel@@QBE?AVQString@@H@Z @ 52 NONAME ; class QString CpProfileModel::ringTone(int) const
-	?trUtf8@CpProfileModel@@SA?AVQString@@PBD0H@Z @ 53 NONAME ; class QString CpProfileModel::trUtf8(char const *, char const *, int)
-	?setMessageTone@CpProfileModel@@QAEXHABVQString@@@Z @ 54 NONAME ; void CpProfileModel::setMessageTone(int, class QString const &)
-	?setMasterVibra@CpProfileModel@@QAEX_N@Z @ 55 NONAME ; void CpProfileModel::setMasterVibra(bool)
-
--- a/controlpanelui/src/bwins/cpringtoneviewu.def	Wed Jun 23 18:13:38 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,20 +0,0 @@
-EXPORTS
-	?tr@CpRingToneView@@SA?AVQString@@PBD0@Z @ 1 NONAME ; class QString CpRingToneView::tr(char const *, char const *)
-	?selOK@CpRingToneView@@IAEXABVQString@@@Z @ 2 NONAME ; void CpRingToneView::selOK(class QString const &)
-	??1CpRingToneView@@UAE@XZ @ 3 NONAME ; CpRingToneView::~CpRingToneView(void)
-	?getStaticMetaObject@CpRingToneView@@SAABUQMetaObject@@XZ @ 4 NONAME ; struct QMetaObject const & CpRingToneView::getStaticMetaObject(void)
-	?handleError@CpRingToneView@@AAEXHABVQString@@@Z @ 5 NONAME ; void CpRingToneView::handleError(int, class QString const &)
-	?launchMediaFetcher@CpRingToneView@@AAEXABVQString@@0@Z @ 6 NONAME ; void CpRingToneView::launchMediaFetcher(class QString const &, class QString const &)
-	?onTypeSelected@CpRingToneView@@AAEXPAVHbListWidgetItem@@@Z @ 7 NONAME ; void CpRingToneView::onTypeSelected(class HbListWidgetItem *)
-	?selError@CpRingToneView@@IAEXHABVQString@@@Z @ 8 NONAME ; void CpRingToneView::selError(int, class QString const &)
-	?trUtf8@CpRingToneView@@SA?AVQString@@PBD0H@Z @ 9 NONAME ; class QString CpRingToneView::trUtf8(char const *, char const *, int)
-	?qt_metacall@CpRingToneView@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 10 NONAME ; int CpRingToneView::qt_metacall(enum QMetaObject::Call, int, void * *)
-	?staticMetaObject@CpRingToneView@@2UQMetaObject@@B @ 11 NONAME ; struct QMetaObject const CpRingToneView::staticMetaObject
-	?metaObject@CpRingToneView@@UBEPBUQMetaObject@@XZ @ 12 NONAME ; struct QMetaObject const * CpRingToneView::metaObject(void) const
-	?tr@CpRingToneView@@SA?AVQString@@PBD0H@Z @ 13 NONAME ; class QString CpRingToneView::tr(char const *, char const *, int)
-	??0CpRingToneView@@QAE@PAVQGraphicsItem@@@Z @ 14 NONAME ; CpRingToneView::CpRingToneView(class QGraphicsItem *)
-	??_ECpRingToneView@@UAE@I@Z @ 15 NONAME ; CpRingToneView::~CpRingToneView(unsigned int)
-	?trUtf8@CpRingToneView@@SA?AVQString@@PBD0@Z @ 16 NONAME ; class QString CpRingToneView::trUtf8(char const *, char const *)
-	?handleOk@CpRingToneView@@AAEXABVQVariant@@@Z @ 17 NONAME ; void CpRingToneView::handleOk(class QVariant const &)
-	?qt_metacast@CpRingToneView@@UAEPAXPBD@Z @ 18 NONAME ; void * CpRingToneView::qt_metacast(char const *)
-
--- a/controlpanelui/src/bwins/seccodeuiu.def	Wed Jun 23 18:13:38 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,33 +0,0 @@
-EXPORTS
-	?qt_metacall@SecCodeSettings@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 1 NONAME ; int SecCodeSettings::qt_metacall(enum QMetaObject::Call, int, void * *)
-	?canSetModelIndex@SecCodeEditDataFormViewItem@@UBE_NABVQModelIndex@@@Z @ 2 NONAME ; bool SecCodeEditDataFormViewItem::canSetModelIndex(class QModelIndex const &) const
-	?qt_metacast@SecCodeEditDataFormViewItem@@UAEPAXPBD@Z @ 3 NONAME ; void * SecCodeEditDataFormViewItem::qt_metacast(char const *)
-	?staticMetaObject@SecCodeEditDataFormViewItem@@2UQMetaObject@@B @ 4 NONAME ; struct QMetaObject const SecCodeEditDataFormViewItem::staticMetaObject
-	??0SecCodeSettings@@QAE@PAVQObject@@@Z @ 5 NONAME ; SecCodeSettings::SecCodeSettings(class QObject *)
-	?tr@SecCodeEditDataFormViewItem@@SA?AVQString@@PBD0H@Z @ 6 NONAME ; class QString SecCodeEditDataFormViewItem::tr(char const *, char const *, int)
-	??_ESecCodeEditDataFormViewItem@@UAE@I@Z @ 7 NONAME ; SecCodeEditDataFormViewItem::~SecCodeEditDataFormViewItem(unsigned int)
-	?pinCodeRequest@SecCodeSettings@@QBE_NXZ @ 8 NONAME ; bool SecCodeSettings::pinCodeRequest(void) const
-	?metaObject@SecCodeSettings@@UBEPBUQMetaObject@@XZ @ 9 NONAME ; struct QMetaObject const * SecCodeSettings::metaObject(void) const
-	?createItem@SecCodeEditDataFormViewItem@@UAEPAVHbAbstractViewItem@@XZ @ 10 NONAME ; class HbAbstractViewItem * SecCodeEditDataFormViewItem::createItem(void)
-	?trUtf8@SecCodeEditDataFormViewItem@@SA?AVQString@@PBD0@Z @ 11 NONAME ; class QString SecCodeEditDataFormViewItem::trUtf8(char const *, char const *)
-	??_ESecCodeSettings@@UAE@I@Z @ 12 NONAME ; SecCodeSettings::~SecCodeSettings(unsigned int)
-	?qt_metacall@SecCodeEditDataFormViewItem@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 13 NONAME ; int SecCodeEditDataFormViewItem::qt_metacall(enum QMetaObject::Call, int, void * *)
-	?changePin2Code@SecCodeSettings@@QAEXXZ @ 14 NONAME ; void SecCodeSettings::changePin2Code(void)
-	?trUtf8@SecCodeSettings@@SA?AVQString@@PBD0@Z @ 15 NONAME ; class QString SecCodeSettings::trUtf8(char const *, char const *)
-	?tr@SecCodeSettings@@SA?AVQString@@PBD0H@Z @ 16 NONAME ; class QString SecCodeSettings::tr(char const *, char const *, int)
-	?staticMetaObject@SecCodeSettings@@2UQMetaObject@@B @ 17 NONAME ; struct QMetaObject const SecCodeSettings::staticMetaObject
-	?setPinCodeRequest@SecCodeSettings@@QAEX_N@Z @ 18 NONAME ; void SecCodeSettings::setPinCodeRequest(bool)
-	?qt_metacast@SecCodeSettings@@UAEPAXPBD@Z @ 19 NONAME ; void * SecCodeSettings::qt_metacast(char const *)
-	?tr@SecCodeSettings@@SA?AVQString@@PBD0@Z @ 20 NONAME ; class QString SecCodeSettings::tr(char const *, char const *)
-	??1SecCodeSettings@@UAE@XZ @ 21 NONAME ; SecCodeSettings::~SecCodeSettings(void)
-	?getStaticMetaObject@SecCodeSettings@@SAABUQMetaObject@@XZ @ 22 NONAME ; struct QMetaObject const & SecCodeSettings::getStaticMetaObject(void)
-	?createCustomWidget@SecCodeEditDataFormViewItem@@MAEPAVHbWidget@@XZ @ 23 NONAME ; class HbWidget * SecCodeEditDataFormViewItem::createCustomWidget(void)
-	?trUtf8@SecCodeSettings@@SA?AVQString@@PBD0H@Z @ 24 NONAME ; class QString SecCodeSettings::trUtf8(char const *, char const *, int)
-	?changePinCode@SecCodeSettings@@QAEXXZ @ 25 NONAME ; void SecCodeSettings::changePinCode(void)
-	?tr@SecCodeEditDataFormViewItem@@SA?AVQString@@PBD0@Z @ 26 NONAME ; class QString SecCodeEditDataFormViewItem::tr(char const *, char const *)
-	?getStaticMetaObject@SecCodeEditDataFormViewItem@@SAABUQMetaObject@@XZ @ 27 NONAME ; struct QMetaObject const & SecCodeEditDataFormViewItem::getStaticMetaObject(void)
-	??1SecCodeEditDataFormViewItem@@UAE@XZ @ 28 NONAME ; SecCodeEditDataFormViewItem::~SecCodeEditDataFormViewItem(void)
-	?metaObject@SecCodeEditDataFormViewItem@@UBEPBUQMetaObject@@XZ @ 29 NONAME ; struct QMetaObject const * SecCodeEditDataFormViewItem::metaObject(void) const
-	?trUtf8@SecCodeEditDataFormViewItem@@SA?AVQString@@PBD0H@Z @ 30 NONAME ; class QString SecCodeEditDataFormViewItem::trUtf8(char const *, char const *, int)
-	??0SecCodeEditDataFormViewItem@@QAE@PAVQGraphicsItem@@@Z @ 31 NONAME ; SecCodeEditDataFormViewItem::SecCodeEditDataFormViewItem(class QGraphicsItem *)
-
--- a/controlpanelui/src/cpapplication/cpapplication.pro	Wed Jun 23 18:13:38 2010 +0300
+++ b/controlpanelui/src/cpapplication/cpapplication.pro	Tue Jul 06 14:17:10 2010 +0300
@@ -17,17 +17,21 @@
 TEMPLATE = app
 TARGET = ControlPanel
 
+ICON = resources/qtg_large_settings.svg
+
 include ( ../common.pri )
 include ( cpapplication.pri )
 
+CONFIG += hb
 
-CONFIG += hb
+RESOURCES += cpapplication.qrc
 
 LIBS += -lcpframework -lcpcategorymodel
 
 TRANSLATIONS = control_panel.ts
 
 symbian: { 
+          SKINICON = qtg_large_settings
 	  TARGET.UID3 = 0x20025FD9
 	  TARGET.EPOCHEAPSIZE = 0x020000 0x1000000
 	
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/cpapplication/cpapplication.qrc	Tue Jul 06 14:17:10 2010 +0300
@@ -0,0 +1,5 @@
+<RCC>
+    <qresource prefix="/logconf" >
+        <file alias="controlpanellog.conf">data/controlpanellog.conf</file>
+    </qresource>  
+</RCC>
\ No newline at end of file
--- a/controlpanelui/src/cpapplication/data/controlpanellog.conf	Wed Jun 23 18:13:38 2010 +0300
+++ b/controlpanelui/src/cpapplication/data/controlpanellog.conf	Tue Jul 06 14:17:10 2010 +0300
@@ -1,6 +1,3 @@
-
-# copy the file(controlpanellog.conf) to C:/data/.config to enable logging
-
 [CpFramework]
 logdatetime = 1
 logloggername = 1
@@ -9,7 +6,7 @@
 fileoutput/logfile = C:/data/logs/cpframework.log
 fileoutput/truncate = 1
 
-#[CpPerformance]
+[CpPerformance]
 logdatetime = 1
 datetimeformat = hh:mm:ss:zzz
 output = fileoutput
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/cpapplication/resources/qtg_large_settings.svg	Tue Jul 06 14:17:10 2010 +0300
@@ -0,0 +1,159 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Tiny//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd">
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" baseProfile="tiny" height="60" viewBox="0 0 60 60" width="60">
+<g>
+<rect fill="none" height="60" width="60"/>
+<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_1_" x1="30" x2="30" y1="4.5" y2="55.3778">
+<stop offset="0" style="stop-color:#E8E8E8"/>
+<stop offset="0.3576" style="stop-color:#B2BDC2"/>
+<stop offset="0.7455" style="stop-color:#595C5E"/>
+<stop offset="1" style="stop-color:#A1ABB0"/>
+</linearGradient>
+<path d="M6.412,55.5c-1.055,0-1.912-0.857-1.912-1.911V6.411C4.5,5.357,5.357,4.5,6.412,4.5h47.176  c1.055,0,1.913,0.857,1.913,1.911v47.178c0,1.054-0.858,1.911-1.913,1.911H6.412z" fill="url(#SVGID_1_)"/>
+<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_2_" x1="30.001" x2="30.001" y1="5.7139" y2="54.1698">
+<stop offset="0" style="stop-color:#FFFFFF"/>
+<stop offset="0.1455" style="stop-color:#D7DDDE"/>
+<stop offset="0.3212" style="stop-color:#FFFFFF"/>
+<stop offset="0.7333" style="stop-color:#8E9699"/>
+<stop offset="1" style="stop-color:#D5E2E6"/>
+</linearGradient>
+<path d="M6.412,54.286c-0.385,0-0.697-0.313-0.697-0.697V6.411c0-0.384,0.313-0.697,0.697-0.697h47.176  c0.387,0,0.699,0.313,0.699,0.697v47.178c0,0.385-0.313,0.697-0.699,0.697H6.412z" fill="url(#SVGID_2_)"/>
+<path d="M53.588,5.106H6.412c-0.719,0-1.305,0.586-1.305,1.305v47.178  c0,0.719,0.586,1.305,1.305,1.305h47.176c0.72,0,1.307-0.586,1.307-1.305V6.411C54.895,5.692,54.308,5.106,53.588,5.106z   M53.68,53.589c0,0.05-0.041,0.09-0.092,0.09H6.412c-0.049,0-0.09-0.04-0.09-0.09V6.411c0-0.049,0.041-0.09,0.09-0.09h47.176  c0.051,0,0.092,0.041,0.092,0.09V53.589z" fill="#FFFFFF" fill-opacity="0.5"/>
+<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_3_" x1="13.6074" x2="13.6074" y1="11.021" y2="48.3899">
+<stop offset="0" style="stop-color:#FFFFFF"/>
+<stop offset="1" style="stop-color:#000000"/>
+</linearGradient>
+<path d="M13,48.519c-1.339,0-2.428-1.09-2.428-2.429V13.304c0-1.34,1.089-2.43,2.428-2.43  h1.215c1.339,0,2.429,1.09,2.429,2.43V46.09c0,1.339-1.09,2.429-2.429,2.429H13z" fill="url(#SVGID_3_)" fill-opacity="0.3"/>
+<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_4_" x1="15.9473" x2="11.1119" y1="29.6973" y2="29.6973">
+<stop offset="0" style="stop-color:#595C5E"/>
+<stop offset="0.3" style="stop-color:#ABB2B5"/>
+<stop offset="0.7" style="stop-color:#ABB2B5"/>
+<stop offset="1" style="stop-color:#595C5E"/>
+</linearGradient>
+<path d="M16.036,46.09c0,1.006-0.815,1.822-1.821,1.822H13c-1.006,0-1.821-0.816-1.821-1.822V13.304  c0-1.008,0.815-1.821,1.821-1.821h1.215c1.006,0,1.821,0.813,1.821,1.821V46.09z" fill="url(#SVGID_4_)"/>
+<path d="M14.215,11.482H13c-1.006,0-1.821,0.813-1.821,1.821V46.09c0,1.006,0.815,1.822,1.821,1.822h1.215  c1.006,0,1.821-0.816,1.821-1.822V13.304C16.036,12.296,15.221,11.482,14.215,11.482z M15.429,46.09  c0,0.669-0.544,1.214-1.214,1.214H13c-0.67,0-1.214-0.545-1.214-1.214V13.304c0-0.67,0.544-1.215,1.214-1.215h1.215  c0.67,0,1.214,0.545,1.214,1.215V46.09z" fill-opacity="0.1"/>
+<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_5_" x1="11.7861" x2="15.4287" y1="36.0713" y2="36.0713">
+<stop offset="0" style="stop-color:#5AA913"/>
+<stop offset="0.497" style="stop-color:#A2ED21"/>
+<stop offset="1" style="stop-color:#58A813"/>
+</linearGradient>
+<path d="M13,47.304c-0.67,0-1.214-0.545-1.214-1.214V26.054c0-0.668,0.544-1.215,1.214-1.215h1.215  c0.67,0,1.214,0.547,1.214,1.215V46.09c0,0.669-0.544,1.214-1.214,1.214H13z" fill="url(#SVGID_5_)"/>
+<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_6_" x1="13.6074" x2="13.6074" y1="19.6782" y2="28.6905">
+<stop offset="0" style="stop-color:#666666"/>
+<stop offset="1" style="stop-color:#000000"/>
+</linearGradient>
+<path d="M10.572,28.483c-1.34,0-2.43-1.09-2.43-2.43v-4.25c0-1.34,1.09-2.428,2.43-2.428  h6.071c1.339,0,2.429,1.088,2.429,2.428v4.25c0,1.34-1.09,2.43-2.429,2.43H10.572z" fill="url(#SVGID_6_)" fill-opacity="0.2"/>
+<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_7_" x1="13.6074" x2="13.6074" y1="19.4058" y2="27.2627">
+<stop offset="0" style="stop-color:#A6A8AB"/>
+<stop offset="1" style="stop-color:#231F20"/>
+</linearGradient>
+<path d="M10.572,27.268c-1.006,0-1.822-0.816-1.822-1.82v-4.252  c0-1.004,0.816-1.819,1.822-1.819h6.071c1.004,0,1.821,0.815,1.821,1.819v4.252c0,1.004-0.817,1.82-1.821,1.82H10.572z" fill="url(#SVGID_7_)" fill-opacity="0.6"/>
+<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_8_" x1="13.6074" x2="13.6074" y1="20.2031" y2="26.8131">
+<stop offset="0" style="stop-color:#FFFFFF"/>
+<stop offset="0.1212" style="stop-color:#FFFFFF"/>
+<stop offset="0.4182" style="stop-color:#B0B6B8"/>
+<stop offset="0.4182" style="stop-color:#9FA6A8"/>
+<stop offset="0.6606" style="stop-color:#7D8588"/>
+<stop offset="0.9697" style="stop-color:#ADB3B5"/>
+<stop offset="0.9697" style="stop-color:#595C5E"/>
+<stop offset="1" style="stop-color:#ADB3B5"/>
+<stop offset="1" style="stop-color:#595C5E"/>
+</linearGradient>
+<path d="M17.857,25.447c0,0.671-0.543,1.214-1.214,1.214h-6.071c-0.672,0-1.215-0.543-1.215-1.214v-4.252  c0-0.669,0.543-1.214,1.215-1.214h6.071c0.671,0,1.214,0.545,1.214,1.214V25.447z" fill="url(#SVGID_8_)"/>
+<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_9_" x1="13.6074" x2="13.6074" y1="20.7715" y2="26.1783">
+<stop offset="0" style="stop-color:#E5E9EB"/>
+<stop offset="0.1212" style="stop-color:#E5E9EB"/>
+<stop offset="0.4182" style="stop-color:#B0B6B8"/>
+<stop offset="0.4182" style="stop-color:#9FA6A8"/>
+<stop offset="0.6606" style="stop-color:#7D8588"/>
+<stop offset="1" style="stop-color:#ADB3B5"/>
+</linearGradient>
+<path d="M10.572,26.054c-0.336,0-0.607-0.272-0.607-0.606v-4.252c0-0.335,0.271-0.605,0.607-0.605h6.071  c0.335,0,0.606,0.271,0.606,0.605v4.252c0,0.334-0.271,0.606-0.606,0.606H10.572z" fill="url(#SVGID_9_)"/>
+<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_10_" x1="25.75" x2="25.75" y1="11.021" y2="48.3899">
+<stop offset="0" style="stop-color:#FFFFFF"/>
+<stop offset="1" style="stop-color:#000000"/>
+</linearGradient>
+<path d="M25.143,48.519c-1.339,0-2.428-1.09-2.428-2.429V13.304  c0-1.34,1.089-2.43,2.428-2.43h1.215c1.339,0,2.429,1.09,2.429,2.43V46.09c0,1.339-1.09,2.429-2.429,2.429H25.143z" fill="url(#SVGID_10_)" fill-opacity="0.3"/>
+<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_11_" x1="28.0898" x2="23.2554" y1="29.6973" y2="29.6973">
+<stop offset="0" style="stop-color:#595C5E"/>
+<stop offset="0.3" style="stop-color:#ABB2B5"/>
+<stop offset="0.7" style="stop-color:#ABB2B5"/>
+<stop offset="1" style="stop-color:#595C5E"/>
+</linearGradient>
+<path d="M28.179,46.09c0,1.006-0.815,1.822-1.821,1.822h-1.215c-1.005,0-1.82-0.816-1.82-1.822V13.304  c0-1.008,0.815-1.821,1.82-1.821h1.215c1.006,0,1.821,0.813,1.821,1.821V46.09z" fill="url(#SVGID_11_)"/>
+<path d="M26.357,11.482h-1.215c-1.005,0-1.82,0.813-1.82,1.821V46.09c0,1.006,0.815,1.822,1.82,1.822h1.215  c1.006,0,1.821-0.816,1.821-1.822V13.304C28.179,12.296,27.363,11.482,26.357,11.482z M27.571,46.09  c0,0.669-0.544,1.214-1.214,1.214h-1.215c-0.67,0-1.214-0.545-1.214-1.214V13.304c0-0.67,0.544-1.215,1.214-1.215h1.215  c0.67,0,1.214,0.545,1.214,1.215V46.09z" fill-opacity="0.1"/>
+<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_12_" x1="23.9287" x2="27.5713" y1="37.5898" y2="37.5898">
+<stop offset="0" style="stop-color:#5AA913"/>
+<stop offset="0.497" style="stop-color:#A2ED21"/>
+<stop offset="1" style="stop-color:#58A813"/>
+</linearGradient>
+<path d="M25.143,47.304c-0.67,0-1.214-0.545-1.214-1.214v-17c0-0.67,0.544-1.214,1.214-1.214h1.215  c0.67,0,1.214,0.544,1.214,1.214v17c0,0.669-0.544,1.214-1.214,1.214H25.143z" fill="url(#SVGID_12_)"/>
+<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_13_" x1="25.75" x2="25.75" y1="26.9634" y2="35.9757">
+<stop offset="0" style="stop-color:#666666"/>
+<stop offset="1" style="stop-color:#000000"/>
+</linearGradient>
+<path d="M22.715,35.769c-1.339,0-2.429-1.09-2.429-2.43V29.09  c0-1.34,1.09-2.429,2.429-2.429h6.071c1.339,0,2.429,1.089,2.429,2.429v4.249c0,1.34-1.09,2.43-2.429,2.43H22.715z" fill="url(#SVGID_13_)" fill-opacity="0.2"/>
+<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_14_" x1="25.75" x2="25.75" y1="26.6909" y2="34.5488">
+<stop offset="0" style="stop-color:#A6A8AB"/>
+<stop offset="1" style="stop-color:#231F20"/>
+</linearGradient>
+<path d="M22.715,34.554c-1.005,0-1.822-0.816-1.822-1.821v-4.249  c0-1.006,0.817-1.822,1.822-1.822h6.071c1.005,0,1.821,0.816,1.821,1.822v4.249c0,1.005-0.816,1.821-1.821,1.821H22.715z" fill="url(#SVGID_14_)" fill-opacity="0.6"/>
+<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_15_" x1="25.75" x2="25.75" y1="27.4893" y2="34.0982">
+<stop offset="0" style="stop-color:#FFFFFF"/>
+<stop offset="0.1212" style="stop-color:#FFFFFF"/>
+<stop offset="0.4182" style="stop-color:#B0B6B8"/>
+<stop offset="0.4182" style="stop-color:#9FA6A8"/>
+<stop offset="0.6606" style="stop-color:#7D8588"/>
+<stop offset="0.9697" style="stop-color:#ADB3B5"/>
+<stop offset="0.9697" style="stop-color:#595C5E"/>
+<stop offset="1" style="stop-color:#ADB3B5"/>
+<stop offset="1" style="stop-color:#595C5E"/>
+</linearGradient>
+<path d="M30,32.732c0,0.671-0.543,1.214-1.214,1.214h-6.071c-0.671,0-1.215-0.543-1.215-1.214v-4.249  c0-0.672,0.544-1.216,1.215-1.216h6.071c0.671,0,1.214,0.544,1.214,1.216V32.732z" fill="url(#SVGID_15_)"/>
+<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_16_" x1="25.75" x2="25.75" y1="28.0571" y2="33.463">
+<stop offset="0" style="stop-color:#E5E9EB"/>
+<stop offset="0.1212" style="stop-color:#E5E9EB"/>
+<stop offset="0.4182" style="stop-color:#B0B6B8"/>
+<stop offset="0.4182" style="stop-color:#9FA6A8"/>
+<stop offset="0.6606" style="stop-color:#7D8588"/>
+<stop offset="1" style="stop-color:#ADB3B5"/>
+</linearGradient>
+<path d="M22.715,33.339c-0.335,0-0.607-0.271-0.607-0.606v-4.249c0-0.336,0.272-0.607,0.607-0.607h6.071  c0.335,0,0.607,0.271,0.607,0.607v4.249c0,0.335-0.272,0.606-0.607,0.606H22.715z" fill="url(#SVGID_16_)"/>
+<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_17_" x1="42.1426" x2="42.1426" y1="14.0352" y2="45.034">
+<stop offset="0" style="stop-color:#999999"/>
+<stop offset="1" style="stop-color:#000000"/>
+</linearGradient>
+<path d="M36.982,45.179c-1.034,0-1.877-0.842-1.877-1.876V16.091  c0-1.035,0.843-1.876,1.877-1.876h10.322c1.035,0,1.876,0.841,1.876,1.876v27.212c0,1.034-0.841,1.876-1.876,1.876H36.982z" fill="url(#SVGID_17_)" fill-opacity="0.1"/>
+<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_18_" x1="42.1426" x2="42.1426" y1="14.5083" y2="44.5696">
+<stop offset="0" style="stop-color:#999999"/>
+<stop offset="1" style="stop-color:#000000"/>
+</linearGradient>
+<path d="M36.982,44.71c-0.775,0-1.407-0.632-1.407-1.407V16.091  c0-0.775,0.632-1.408,1.407-1.408h10.322c0.775,0,1.406,0.633,1.406,1.408v27.212c0,0.775-0.631,1.407-1.406,1.407H36.982z" fill="url(#SVGID_18_)" fill-opacity="0.3"/>
+<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_19_" x1="42.1436" x2="42.1436" y1="44.3218" y2="15.0707">
+<stop offset="0" style="stop-color:#5F6366"/>
+<stop offset="1" style="stop-color:#3E4142"/>
+</linearGradient>
+<path d="M48.242,43.303c0,0.519-0.419,0.938-0.938,0.938H36.982c-0.518,0-0.938-0.42-0.938-0.938V16.091  c0-0.518,0.42-0.938,0.938-0.938h10.322c0.519,0,0.938,0.42,0.938,0.938V43.303z" fill="url(#SVGID_19_)"/>
+<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_20_" x1="42.1436" x2="42.1436" y1="16.8999" y2="43.2099">
+<stop offset="0" style="stop-color:#9CA4A6"/>
+<stop offset="0.1" style="stop-color:#F0F2F3"/>
+<stop offset="0.5" style="stop-color:#BBBEBF"/>
+<stop offset="0.9" style="stop-color:#F3F5F5"/>
+<stop offset="0.95" style="stop-color:#8E9699"/>
+<stop offset="1" style="stop-color:#686E70"/>
+</linearGradient>
+<path d="M36.982,43.771c-0.258,0-0.469-0.21-0.469-0.468V17.03c0-0.26,0.211-0.471,0.469-0.471h10.322  c0.259,0,0.469,0.211,0.469,0.471v26.272c0,0.258-0.21,0.468-0.469,0.468H36.982z" fill="url(#SVGID_20_)"/>
+<path d="M47.305,18.437H36.982c-0.258,0-0.469,0.211-0.469,0.469v0.471c0-0.26,0.211-0.471,0.469-0.471h10.322  c0.259,0,0.469,0.211,0.469,0.471v-0.471C47.773,18.647,47.563,18.437,47.305,18.437z" fill="#FFFFFF"/>
+<path d="M47.305,43.303H36.982c-0.258,0-0.469-0.21-0.469-0.47v0.47c0,0.258,0.211,0.468,0.469,0.468h10.322  c0.259,0,0.469-0.21,0.469-0.468v-0.47C47.773,43.093,47.563,43.303,47.305,43.303z" fill-opacity="0.3"/>
+<path d="M36.982,41.427c-0.259,0-0.469-0.212-0.469-0.47V19.376c0-0.26,0.21-0.471,0.469-0.471  h10.322c0.259,0,0.469,0.211,0.469,0.471v21.581c0,0.258-0.21,0.47-0.469,0.47H36.982z" fill="#FFFFFF" fill-opacity="0.3"/>
+<path d="M36.514,30.165v10.792c0,0.258,0.21,0.47,0.469,0.47h10.322  c0.259,0,0.469-0.212,0.469-0.47V30.165H36.514z" fill="#FFFFFF" fill-opacity="0.4"/>
+<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_21_" x1="42.1436" x2="42.1436" y1="22.582" y2="19.8827">
+<stop offset="0" style="stop-color:#FFFFFF"/>
+<stop offset="1" style="stop-color:#808080"/>
+</linearGradient>
+<path d="M38.859,22.66c-0.26,0-0.469-0.212-0.469-0.471v-1.876  c0-0.26,0.209-0.47,0.469-0.47h6.568c0.26,0,0.469,0.21,0.469,0.47v1.876c0,0.259-0.209,0.471-0.469,0.471H38.859z" fill="url(#SVGID_21_)" fill-opacity="0.4"/>
+<rect fill="#FF1D25" height="1.876" width="6.568" x="38.859" y="20.313"/>
+<polygon fill-opacity="0.3" points="44.959,20.313 39.328,20.313 38.859,20.313 38.859,20.782 38.859,22.189 39.328,22.189   39.328,20.782 44.959,20.782 44.959,22.189 45.428,22.189 45.428,20.782 45.428,20.313 "/>
+<rect fill="none" height="60" width="60"/>
+</g>
+</svg>
--- a/controlpanelui/src/cpapplication/src/cpmainwindow.cpp	Wed Jun 23 18:13:38 2010 +0300
+++ b/controlpanelui/src/cpapplication/src/cpmainwindow.cpp	Tue Jul 06 14:17:10 2010 +0300
@@ -19,7 +19,6 @@
 #include "cpmainview.h"
 #include <cpplugininterface.h>
 #include <cpcategorysettingformitemdata.h>
-#include <cpbasepath.h>
 #include <hbapplication.h>
 #include <cpevent.h>
 
--- a/controlpanelui/src/cpapplication/src/main.cpp	Wed Jun 23 18:13:38 2010 +0300
+++ b/controlpanelui/src/cpapplication/src/main.cpp	Tue Jul 06 14:17:10 2010 +0300
@@ -24,7 +24,6 @@
 #include <QLatin1String>
 #include <QDir>
 #include <cplogger.h>
-#include <cpbasepath.h>
 
 int main(int argc, char **argv)
 {
@@ -35,10 +34,15 @@
     QCoreApplication::setOrganizationDomain("Orbit");
     QCoreApplication::setApplicationName("ControlPanel");
 
+#ifdef ENABLE_CPFW_LOG
     Logger::instance(CPFW_LOGGER_NAME)->configure(
         CP_LOGGER_CONFIG_PATH,QSettings::IniFormat);
+#endif
+    
+#ifdef ENABLE_CPPERF_LOG
     Logger::instance(CPPERF_LOGGER_NAME)->configure(
         CP_LOGGER_CONFIG_PATH,QSettings::IniFormat);
+#endif
 
     CPFW_LOG("Entering ControlPanel.exe...");
     CPPERF_LOG("Entering ControlPanel.exe...");
@@ -48,8 +52,10 @@
     {
         qApp->installTranslator(&translator);
     }
-    
-    HbStyleLoader::registerFilePath(CP_RESOURCE_PATH + QDir::separator() + WIDGETML_SUB_PATH);
+        
+    HbStyleLoader::registerFilePath(":/widgetml/cpdataformlistentryviewitem.css");
+    HbStyleLoader::registerFilePath(":/widgetml/cpdataformlistentryviewitem_color.css");
+    HbStyleLoader::registerFilePath(":/widgetml/cpdataformlistentryviewitem.widgetml");
 
     CpMainWindow mainWindow;
     
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/cpcategorymodel/bwins/cpcategorymodelu.def	Tue Jul 06 14:17:10 2010 +0300
@@ -0,0 +1,53 @@
+EXPORTS
+	?stop@CpTaskExecutor@@QAEXXZ @ 1 NONAME ; void CpTaskExecutor::stop(void)
+	?tr@CpTaskExecutor@@SA?AVQString@@PBD0@Z @ 2 NONAME ; class QString CpTaskExecutor::tr(char const *, char const *)
+	?getStaticMetaObject@CpTaskExecutor@@SAABUQMetaObject@@XZ @ 3 NONAME ; struct QMetaObject const & CpTaskExecutor::getStaticMetaObject(void)
+	??1CpCategorySettingFormModel@@UAE@XZ @ 4 NONAME ; CpCategorySettingFormModel::~CpCategorySettingFormModel(void)
+	?beforeLoadingConfigPlugins@CpCategorySettingFormItemData@@EAEXAAVCpItemDataHelper@@@Z @ 5 NONAME ; void CpCategorySettingFormItemData::beforeLoadingConfigPlugins(class CpItemDataHelper &)
+	?trUtf8@CpCategorySettingFormModel@@SA?AVQString@@PBD0H@Z @ 6 NONAME ; class QString CpCategorySettingFormModel::trUtf8(char const *, char const *, int)
+	??0CpCategorySettingFormModel@@QAE@ABVQString@@@Z @ 7 NONAME ; CpCategorySettingFormModel::CpCategorySettingFormModel(class QString const &)
+	?staticMetaObject@CpTaskExecutor@@2UQMetaObject@@B @ 8 NONAME ; struct QMetaObject const CpTaskExecutor::staticMetaObject
+	??_ECpTaskExecutor@@UAE@I@Z @ 9 NONAME ; CpTaskExecutor::~CpTaskExecutor(unsigned int)
+	?trUtf8@CpTaskExecutor@@SA?AVQString@@PBD0H@Z @ 10 NONAME ; class QString CpTaskExecutor::trUtf8(char const *, char const *, int)
+	?trUtf8@CpCategorySettingFormItemData@@SA?AVQString@@PBD0@Z @ 11 NONAME ; class QString CpCategorySettingFormItemData::trUtf8(char const *, char const *)
+	?tr@CpCategorySettingFormModel@@SA?AVQString@@PBD0@Z @ 12 NONAME ; class QString CpCategorySettingFormModel::tr(char const *, char const *)
+	?tr@CpCategorySettingFormItemData@@SA?AVQString@@PBD0@Z @ 13 NONAME ; class QString CpCategorySettingFormItemData::tr(char const *, char const *)
+	?getStaticMetaObject@CpCategorySettingFormModel@@SAABUQMetaObject@@XZ @ 14 NONAME ; struct QMetaObject const & CpCategorySettingFormModel::getStaticMetaObject(void)
+	?destroyGlobalInstance@CpTaskExecutor@@SAXXZ @ 15 NONAME ; void CpTaskExecutor::destroyGlobalInstance(void)
+	?initialize@CpCategorySettingFormModel@@UAEXAAVCpItemDataHelper@@@Z @ 16 NONAME ; void CpCategorySettingFormModel::initialize(class CpItemDataHelper &)
+	?initialize@CpCategorySettingFormItemData@@QAEXAAVCpItemDataHelper@@@Z @ 17 NONAME ; void CpCategorySettingFormItemData::initialize(class CpItemDataHelper &)
+	?tr@CpTaskExecutor@@SA?AVQString@@PBD0H@Z @ 18 NONAME ; class QString CpTaskExecutor::tr(char const *, char const *, int)
+	??0CpTaskExecutor@@QAE@PAVQObject@@@Z @ 19 NONAME ; CpTaskExecutor::CpTaskExecutor(class QObject *)
+	?tr@CpCategorySettingFormItemData@@SA?AVQString@@PBD0H@Z @ 20 NONAME ; class QString CpCategorySettingFormItemData::tr(char const *, char const *, int)
+	?qt_metacast@CpTaskExecutor@@UAEPAXPBD@Z @ 21 NONAME ; void * CpTaskExecutor::qt_metacast(char const *)
+	??1CpCategorySettingFormItemData@@UAE@XZ @ 22 NONAME ; CpCategorySettingFormItemData::~CpCategorySettingFormItemData(void)
+	?beforeLoadingConfigPlugins@CpCategorySettingFormModel@@EAEXAAVCpItemDataHelper@@@Z @ 23 NONAME ; void CpCategorySettingFormModel::beforeLoadingConfigPlugins(class CpItemDataHelper &)
+	??1CpTaskExecutor@@UAE@XZ @ 24 NONAME ; CpTaskExecutor::~CpTaskExecutor(void)
+	?createCpPluginItemData@@YAHPAVCpCreatePluginItemDataEvent@@@Z @ 25 NONAME ; int createCpPluginItemData(class CpCreatePluginItemDataEvent *)
+	?trUtf8@CpCategorySettingFormModel@@SA?AVQString@@PBD0@Z @ 26 NONAME ; class QString CpCategorySettingFormModel::trUtf8(char const *, char const *)
+	?staticMetaObject@CpCategorySettingFormModel@@2UQMetaObject@@B @ 27 NONAME ; struct QMetaObject const CpCategorySettingFormModel::staticMetaObject
+	?qt_metacall@CpTaskExecutor@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 28 NONAME ; int CpTaskExecutor::qt_metacall(enum QMetaObject::Call, int, void * *)
+	??0CpCategorySettingFormItemData@@QAE@ABVQString@@PBVHbDataFormModelItem@@@Z @ 29 NONAME ; CpCategorySettingFormItemData::CpCategorySettingFormItemData(class QString const &, class HbDataFormModelItem const *)
+	?qt_metacast@CpCategorySettingFormItemData@@UAEPAXPBD@Z @ 30 NONAME ; void * CpCategorySettingFormItemData::qt_metacast(char const *)
+	?toFront@CpTaskExecutor@@QAE_NPAVCpTask@@@Z @ 31 NONAME ; bool CpTaskExecutor::toFront(class CpTask *)
+	?qt_metacall@CpCategorySettingFormModel@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 32 NONAME ; int CpCategorySettingFormModel::qt_metacall(enum QMetaObject::Call, int, void * *)
+	?removeTasks@CpTaskExecutor@@AAEXXZ @ 33 NONAME ; void CpTaskExecutor::removeTasks(void)
+	?qt_metacall@CpCategorySettingFormItemData@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 34 NONAME ; int CpCategorySettingFormItemData::qt_metacall(enum QMetaObject::Call, int, void * *)
+	?qt_metacast@CpCategorySettingFormModel@@UAEPAXPBD@Z @ 35 NONAME ; void * CpCategorySettingFormModel::qt_metacast(char const *)
+	?afterLoadingConfigPlugins@CpCategorySettingFormModel@@EAEXAAVCpItemDataHelper@@@Z @ 36 NONAME ; void CpCategorySettingFormModel::afterLoadingConfigPlugins(class CpItemDataHelper &)
+	?getStaticMetaObject@CpCategorySettingFormItemData@@SAABUQMetaObject@@XZ @ 37 NONAME ; struct QMetaObject const & CpCategorySettingFormItemData::getStaticMetaObject(void)
+	?metaObject@CpTaskExecutor@@UBEPBUQMetaObject@@XZ @ 38 NONAME ; struct QMetaObject const * CpTaskExecutor::metaObject(void) const
+	??0CpCategorySettingFormItemData@@QAE@W4DataItemType@HbDataFormModelItem@@ABVQString@@1PBV2@@Z @ 39 NONAME ; CpCategorySettingFormItemData::CpCategorySettingFormItemData(enum HbDataFormModelItem::DataItemType, class QString const &, class QString const &, class HbDataFormModelItem const *)
+	?trUtf8@CpCategorySettingFormItemData@@SA?AVQString@@PBD0H@Z @ 40 NONAME ; class QString CpCategorySettingFormItemData::trUtf8(char const *, char const *, int)
+	?runTask@CpTaskExecutor@@QAE_NPAVCpTask@@_N@Z @ 41 NONAME ; bool CpTaskExecutor::runTask(class CpTask *, bool)
+	?afterLoadingConfigPlugins@CpCategorySettingFormItemData@@EAEXAAVCpItemDataHelper@@@Z @ 42 NONAME ; void CpCategorySettingFormItemData::afterLoadingConfigPlugins(class CpItemDataHelper &)
+	?metaObject@CpCategorySettingFormModel@@UBEPBUQMetaObject@@XZ @ 43 NONAME ; struct QMetaObject const * CpCategorySettingFormModel::metaObject(void) const
+	?tr@CpCategorySettingFormModel@@SA?AVQString@@PBD0H@Z @ 44 NONAME ; class QString CpCategorySettingFormModel::tr(char const *, char const *, int)
+	?staticMetaObject@CpCategorySettingFormItemData@@2UQMetaObject@@B @ 45 NONAME ; struct QMetaObject const CpCategorySettingFormItemData::staticMetaObject
+	?run@CpTaskExecutor@@MAEXXZ @ 46 NONAME ; void CpTaskExecutor::run(void)
+	?metaObject@CpCategorySettingFormItemData@@UBEPBUQMetaObject@@XZ @ 47 NONAME ; struct QMetaObject const * CpCategorySettingFormItemData::metaObject(void) const
+	?trUtf8@CpTaskExecutor@@SA?AVQString@@PBD0@Z @ 48 NONAME ; class QString CpTaskExecutor::trUtf8(char const *, char const *)
+	??_ECpCategorySettingFormItemData@@UAE@I@Z @ 49 NONAME ; CpCategorySettingFormItemData::~CpCategorySettingFormItemData(unsigned int)
+	??_ECpCategorySettingFormModel@@UAE@I@Z @ 50 NONAME ; CpCategorySettingFormModel::~CpCategorySettingFormModel(unsigned int)
+	?globalInstance@CpTaskExecutor@@SAPAV1@XZ @ 51 NONAME ; class CpTaskExecutor * CpTaskExecutor::globalInstance(void)
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/cpcategorymodel/eabi/cpcategorymodelu.def	Tue Jul 06 14:17:10 2010 +0300
@@ -0,0 +1,56 @@
+EXPORTS
+	_Z22createCpPluginItemDataP27CpCreatePluginItemDataEvent @ 1 NONAME
+	_ZN14CpTaskExecutor11qt_metacallEN11QMetaObject4CallEiPPv @ 2 NONAME
+	_ZN14CpTaskExecutor11qt_metacastEPKc @ 3 NONAME
+	_ZN14CpTaskExecutor11removeTasksEv @ 4 NONAME
+	_ZN14CpTaskExecutor14globalInstanceEv @ 5 NONAME
+	_ZN14CpTaskExecutor16staticMetaObjectE @ 6 NONAME DATA 16
+	_ZN14CpTaskExecutor19getStaticMetaObjectEv @ 7 NONAME
+	_ZN14CpTaskExecutor21destroyGlobalInstanceEv @ 8 NONAME
+	_ZN14CpTaskExecutor3runEv @ 9 NONAME
+	_ZN14CpTaskExecutor4stopEv @ 10 NONAME
+	_ZN14CpTaskExecutor7runTaskEP6CpTaskb @ 11 NONAME
+	_ZN14CpTaskExecutor7toFrontEP6CpTask @ 12 NONAME
+	_ZN14CpTaskExecutorC1EP7QObject @ 13 NONAME
+	_ZN14CpTaskExecutorC2EP7QObject @ 14 NONAME
+	_ZN14CpTaskExecutorD0Ev @ 15 NONAME
+	_ZN14CpTaskExecutorD1Ev @ 16 NONAME
+	_ZN14CpTaskExecutorD2Ev @ 17 NONAME
+	_ZN26CpCategorySettingFormModel10initializeER16CpItemDataHelper @ 18 NONAME
+	_ZN26CpCategorySettingFormModel11qt_metacallEN11QMetaObject4CallEiPPv @ 19 NONAME
+	_ZN26CpCategorySettingFormModel11qt_metacastEPKc @ 20 NONAME
+	_ZN26CpCategorySettingFormModel16staticMetaObjectE @ 21 NONAME DATA 16
+	_ZN26CpCategorySettingFormModel19getStaticMetaObjectEv @ 22 NONAME
+	_ZN26CpCategorySettingFormModel25afterLoadingConfigPluginsER16CpItemDataHelper @ 23 NONAME
+	_ZN26CpCategorySettingFormModel26beforeLoadingConfigPluginsER16CpItemDataHelper @ 24 NONAME
+	_ZN26CpCategorySettingFormModelC1ERK7QString @ 25 NONAME
+	_ZN26CpCategorySettingFormModelC2ERK7QString @ 26 NONAME
+	_ZN26CpCategorySettingFormModelD0Ev @ 27 NONAME
+	_ZN26CpCategorySettingFormModelD1Ev @ 28 NONAME
+	_ZN26CpCategorySettingFormModelD2Ev @ 29 NONAME
+	_ZN29CpCategorySettingFormItemData10initializeER16CpItemDataHelper @ 30 NONAME
+	_ZN29CpCategorySettingFormItemData11qt_metacallEN11QMetaObject4CallEiPPv @ 31 NONAME
+	_ZN29CpCategorySettingFormItemData11qt_metacastEPKc @ 32 NONAME
+	_ZN29CpCategorySettingFormItemData16staticMetaObjectE @ 33 NONAME DATA 16
+	_ZN29CpCategorySettingFormItemData19getStaticMetaObjectEv @ 34 NONAME
+	_ZN29CpCategorySettingFormItemData25afterLoadingConfigPluginsER16CpItemDataHelper @ 35 NONAME
+	_ZN29CpCategorySettingFormItemData26beforeLoadingConfigPluginsER16CpItemDataHelper @ 36 NONAME
+	_ZN29CpCategorySettingFormItemDataC1EN19HbDataFormModelItem12DataItemTypeERK7QStringS4_PKS0_ @ 37 NONAME
+	_ZN29CpCategorySettingFormItemDataC1ERK7QStringPK19HbDataFormModelItem @ 38 NONAME
+	_ZN29CpCategorySettingFormItemDataC2EN19HbDataFormModelItem12DataItemTypeERK7QStringS4_PKS0_ @ 39 NONAME
+	_ZN29CpCategorySettingFormItemDataC2ERK7QStringPK19HbDataFormModelItem @ 40 NONAME
+	_ZN29CpCategorySettingFormItemDataD0Ev @ 41 NONAME
+	_ZN29CpCategorySettingFormItemDataD1Ev @ 42 NONAME
+	_ZN29CpCategorySettingFormItemDataD2Ev @ 43 NONAME
+	_ZNK14CpTaskExecutor10metaObjectEv @ 44 NONAME
+	_ZNK26CpCategorySettingFormModel10metaObjectEv @ 45 NONAME
+	_ZNK29CpCategorySettingFormItemData10metaObjectEv @ 46 NONAME
+	_ZTI14CpTaskExecutor @ 47 NONAME
+	_ZTI26CpCategorySettingFormModel @ 48 NONAME
+	_ZTI29CpCategorySettingFormItemData @ 49 NONAME
+	_ZTV14CpTaskExecutor @ 50 NONAME
+	_ZTV26CpCategorySettingFormModel @ 51 NONAME
+	_ZTV29CpCategorySettingFormItemData @ 52 NONAME
+	_ZThn8_N29CpCategorySettingFormItemDataD0Ev @ 53 NONAME
+	_ZThn8_N29CpCategorySettingFormItemDataD1Ev @ 54 NONAME
+
--- a/controlpanelui/src/cpcategorymodel/src/cpcategorymodelutility.cpp	Wed Jun 23 18:13:38 2010 +0300
+++ b/controlpanelui/src/cpcategorymodel/src/cpcategorymodelutility.cpp	Tue Jul 06 14:17:10 2010 +0300
@@ -19,9 +19,9 @@
 #include <QDir>
 #include <QFileInfo>
 #include <hbinstance.h>
-#include <cpbasepath.h>
 #include <cppluginloader.h>
 #include <cpplugininterface.h>
+#include <cpbasepath.h>
 #include <cplogger.h>
 #include <cpevent.h>
 #include <cptaskexecutor.h>
@@ -214,11 +214,7 @@
     }
     if (entryItemData->iconName().isEmpty()) {
         entryItemData->setIconName(
-                  CP_RESOURCE_PATH
-                  + QDir::separator() 
-                  + ICON_SUB_PATH 
-                  + QDir::separator() 
-                  + QLatin1String("qgn_prop_set_default_sub.svg") );
+                QLatin1String(":/icon/qgn_prop_set_default_sub.svg") );
     }
     
     return true;
--- a/controlpanelui/src/cpplugins/communicationplugin/data/cpcommunicationplugin.cpcfg	Wed Jun 23 18:13:38 2010 +0300
+++ b/controlpanelui/src/cpplugins/communicationplugin/data/cpcommunicationplugin.cpcfg	Tue Jul 06 14:17:10 2010 +0300
@@ -13,7 +13,10 @@
   <plugin displayname = "Telephony" id = "0X20029F23"  dll = "cptelephonyplugin.dll">
     <desc></desc>
   </plugin>
-    <plugin displayname = "Network settings" id = "0X2002BC8F"  dll = "cpipsettingsplugin.dll">
+  <plugin displayname = "Network settings" id = "0X2002BC8F"  dll = "cpipsettingsplugin.dll">
+    <desc></desc>
+  </plugin>
+  <plugin displayname = "NFC" id = "0X20027040"  dll = "nfccpplugin.dll">
     <desc></desc>
   </plugin>
 </childplugins>
\ No newline at end of file
--- a/controlpanelui/src/cpplugins/communicationplugin/src/cpcommunicationgroupitemdata.cpp	Wed Jun 23 18:13:38 2010 +0300
+++ b/controlpanelui/src/cpplugins/communicationplugin/src/cpcommunicationgroupitemdata.cpp	Tue Jul 06 14:17:10 2010 +0300
@@ -17,7 +17,7 @@
 #include "cpcommunicationgroupitemdata.h"
 #include <QStringList>
 #include <QtAlgorithms>
-#include <settingsinternalcrkeys.h>
+#include <CoreApplicationUIsSDKCRKeys.h>
 #include <xqsettingsmanager.h>
 #include <cpitemdatahelper.h>
 
@@ -48,8 +48,7 @@
 
 void CpCommunicationGroupItemData::beforeLoadingConfigPlugins(CpItemDataHelper &itemDataHelper)
 {
-    mAirplaneModeItem = new HbDataFormModelItem(HbDataFormModelItem::ToggleValueItem,
-                                              hbTrId("txt_cp_setlabel_offline_airplane_mode"));
+    mAirplaneModeItem = new HbDataFormModelItem(HbDataFormModelItem::ToggleValueItem);
     mAirplaneModeItem->setDescription(hbTrId("txt_cp_info_in_offline_mode_all_wireless_communica"));
     
     itemDataHelper.addConnection(mAirplaneModeItem,
@@ -57,7 +56,7 @@
             this,
             SLOT(toggleAirplaneMode()));
     
-    XQCentralRepositorySettingsKey key(KCRUidCommunicationSettings.iUid,KSettingsAirplaneMode);
+    XQCentralRepositorySettingsKey key(KCRUidCoreApplicationUIs.iUid,KCoreAppUIsNetworkConnectionAllowed);
     QVariant airplaneMode = mSettingManager->readItemValue(key,XQSettingsManager::TypeInt);
     settingValueChanged(key,airplaneMode);
     
@@ -71,7 +70,7 @@
 
 void CpCommunicationGroupItemData::toggleAirplaneMode()
 {
-    XQCentralRepositorySettingsKey key(KCRUidCommunicationSettings.iUid,KSettingsAirplaneMode);
+    XQCentralRepositorySettingsKey key(KCRUidCoreApplicationUIs.iUid,KCoreAppUIsNetworkConnectionAllowed);
     QVariant airplaneMode = mSettingManager->readItemValue(key,XQSettingsManager::TypeInt);
         
     airplaneMode.setValue( static_cast<int> (!airplaneMode.toBool()) );
@@ -82,12 +81,12 @@
 void CpCommunicationGroupItemData::settingValueChanged(const XQSettingsKey &key, const QVariant &value)
 {
     if (mAirplaneModeItem 
-        && key.uid() == KCRUidCommunicationSettings.iUid 
-        && key.key() == KSettingsAirplaneMode 
+        && key.uid() == KCRUidCoreApplicationUIs.iUid 
+        && key.key() == KCoreAppUIsNetworkConnectionAllowed 
         && value.isValid()) {
         QString text = hbTrId("txt_cp_setlabel_offline_mode_val_on");
         QString additionalText = hbTrId("txt_cp_setlabel_offline_mode_val_off");
-        if (!value.toBool()) {
+        if (ECoreAppUIsNetworkConnectionAllowed == value.toInt()) {
             ::qSwap (text, additionalText);
         }
         mAirplaneModeItem->setContentWidgetData("text",text);
--- a/controlpanelui/src/cpplugins/deviceplugin/data/cpdeviceplugin.cpcfg	Wed Jun 23 18:13:38 2010 +0300
+++ b/controlpanelui/src/cpplugins/deviceplugin/data/cpdeviceplugin.cpcfg	Tue Jul 06 14:17:10 2010 +0300
@@ -3,17 +3,17 @@
   <plugin displayname = "Time &amp; data" id = "0X102818E9"  dll = "datetimesettingsplugin.dll">
     <desc></desc>
   </plugin>
-  <plugin displayname = "Language" id = "0X0"  dll = "TBD">
+  <plugin displayname = "Language and region" id = "0X2002873C"  dll = "cplanguageplugin.dll">
     <desc></desc>
   </plugin>
-  <plugin displayname = "Text and keyboard" id = "0X0"  dll = "TBD">
+  <plugin displayname = "Text and keyboard" id = "0X20025FDD"  dll = "cpinputsettingplugin.dll">
     <desc></desc>
   </plugin>
   <plugin displayname = "Positioning" id = "0x2002C318"  dll = "possettingsplugin.dll">
     <desc></desc>
   </plugin>
-   <plugin displayname = "Voice commands" id = "0X0"  dll = "TBD">
-    <desc></desc>
+  <plugin displayname = "Power management" id = "0x2000E51E" dll = "cppsmplugin.dll">
+    <desc>power save mode </desc>
   </plugin> 
   <plugin displayname = "Device updates" id = "0X2002DD04"  dll = "deviceupdatesplugin.dll">
     <desc></desc>
@@ -21,7 +21,7 @@
   <plugin displayname = "Reset" id = "0x10275117"  dll = "cprfsplugin.dll">
     <desc></desc>
   </plugin> 
-  <plugin displayname = "About" id = "0X0"  dll = "TBD">
+  <plugin displayname = "About" id = "0X2002873B"  dll = "cpaboutplugin.dll">
     <desc></desc>
   </plugin> 
 </childplugins>
\ No newline at end of file
--- a/controlpanelui/src/cpplugins/keytouchfdbkplugin/src/cpkeyscreenplugin.cpp	Wed Jun 23 18:13:38 2010 +0300
+++ b/controlpanelui/src/cpplugins/keytouchfdbkplugin/src/cpkeyscreenplugin.cpp	Tue Jul 06 14:17:10 2010 +0300
@@ -29,8 +29,11 @@
 QList<CpSettingFormItemData*> CpKeyScreenPlugin::createSettingFormItemData(CpItemDataHelper &itemDataHelper) const
 {
     CpSettingFormItemData* itemData = new CpSettingFormEntryItemDataImpl<CpKeyScreenView>(
+            CpSettingFormEntryItemData::ListEntryItem,  // item type
 			itemDataHelper,
-			hbTrId("txt_cp_list_keys_screen"));
+			hbTrId("txt_cp_list_keys_screen"),  // text
+			QString(" "),                       // description
+			"qtg_large_key_screen");            // icon name
     return QList<CpSettingFormItemData*>() << itemData;
 }
 
--- a/controlpanelui/src/cpplugins/keytouchfdbkplugin/src/cpkeyscreenview.cpp	Wed Jun 23 18:13:38 2010 +0300
+++ b/controlpanelui/src/cpplugins/keytouchfdbkplugin/src/cpkeyscreenview.cpp	Tue Jul 06 14:17:10 2010 +0300
@@ -60,9 +60,9 @@
 
         makeBrightnessItem(*model);
 
-        if ( mModel->isCallibrationSupported() ) {
+       /* if ( mModel->isCallibrationSupported() ) {
             makeCallibrationItem(*model);
-        }
+        }*/
 
         form->setModel(model);
     }
--- a/controlpanelui/src/cpplugins/personalizationplugin/src/cppersonalizationgroupitemdata.cpp	Wed Jun 23 18:13:38 2010 +0300
+++ b/controlpanelui/src/cpplugins/personalizationplugin/src/cppersonalizationgroupitemdata.cpp	Tue Jul 06 14:17:10 2010 +0300
@@ -56,6 +56,9 @@
     CpSettingFormEntryItemData *advanceSettingItem = 
             new CpSettingFormEntryItemDataImpl<CpPersonalizationAdvanceView>(CpSettingFormEntryItemData::ButtonEntryItem,
             		itemDataHelper, hbTrId("txt_cp_button_advanced_settings"));
+    
+    advanceSettingItem->setContentWidgetData("textAlignment", QVariant( Qt::AlignHCenter | Qt::AlignVCenter) );
+    
     appendChild(advanceSettingItem);
     CPFW_LOG("CpPersonalizationGroupItemData::afterLoadingConfigPlugins(), END");
 }
--- a/controlpanelui/src/cpplugins/personalizationplugin/src/cppersonalizationplugin.cpp	Wed Jun 23 18:13:38 2010 +0300
+++ b/controlpanelui/src/cpplugins/personalizationplugin/src/cppersonalizationplugin.cpp	Tue Jul 06 14:17:10 2010 +0300
@@ -35,7 +35,7 @@
     CpPersonalizationGroupItemData *personalItemData = 
             new CpPersonalizationGroupItemData(
             HbDataFormModelItem::GroupItem,
-            tr("Personalization"),
+            hbTrId("txt_cp_subhead_personalization"),
             QString("cppersonalizationplugin.cpcfg") );
 
     return QList<CpSettingFormItemData*>() << personalItemData;
--- a/controlpanelui/src/cpplugins/personalizationplugin/src/cpprofilesettingform.cpp	Wed Jun 23 18:13:38 2010 +0300
+++ b/controlpanelui/src/cpplugins/personalizationplugin/src/cpprofilesettingform.cpp	Tue Jul 06 14:17:10 2010 +0300
@@ -102,7 +102,7 @@
     //ring tone item
     QFileInfo ringToneFileInfo( profileSettings.mRingTone );
     HbDataFormModelItem *modelItem = new CpPersonalizationEntryItemData( *mItemDataHelper,
-            hbTrId("txt_cp_dblist_ringtone"), ringToneFileInfo.fileName(), mFileIconProvider->icon( ringToneFileInfo ),
+            hbTrId("txt_cp_dblist_ringtone"), ringToneFileInfo.fileName(), "qtg_large_ring_tone",
             CpPersonalizationEntryItemData::TONE_Ring, profileId );
     mModel->appendDataFormItem(modelItem, parent);
     modelItems.insert(ProfileItemRingTone,modelItem);
@@ -110,7 +110,7 @@
     //message tone item
     QFileInfo messageToneFileInfo( profileSettings.mMessageTone );
     modelItem = new CpPersonalizationEntryItemData( *mItemDataHelper,
-            hbTrId("txt_cp_dblist_message_tone"), messageToneFileInfo.fileName(), mFileIconProvider->icon( messageToneFileInfo ),
+            hbTrId("txt_cp_dblist_message_tone"), messageToneFileInfo.fileName(), "qtg_large_message",
             CpPersonalizationEntryItemData::TONE_Message,
             profileId );
     mModel->appendDataFormItem(modelItem , parent);
@@ -119,7 +119,7 @@
     //email tone item
     QFileInfo emailToneFileInfo( profileSettings.mEmailTone );
     modelItem = new CpPersonalizationEntryItemData( *mItemDataHelper,
-            hbTrId("txt_cp_dblist_email_tone"),  emailToneFileInfo.fileName(), mFileIconProvider->icon( emailToneFileInfo ),
+            hbTrId("txt_cp_dblist_email_tone"),  emailToneFileInfo.fileName(), "qtg_large_email",
             CpPersonalizationEntryItemData::TONE_Email,
             profileId );
     mModel->appendDataFormItem(modelItem , parent);
@@ -128,7 +128,7 @@
     //reminder tone item
     QFileInfo reminderToneFileInfo( profileSettings.mReminderTone );
     modelItem = new CpPersonalizationEntryItemData( *mItemDataHelper,
-            hbTrId("txt_cp_dblist_reminder_tone"), reminderToneFileInfo.fileName(), mFileIconProvider->icon( reminderToneFileInfo ),
+            hbTrId("txt_cp_dblist_reminder_tone"), reminderToneFileInfo.fileName(), "qtg_large_calendar",
             CpPersonalizationEntryItemData::TONE_Reminder,
             profileId );
     mModel->appendDataFormItem(modelItem , parent);
@@ -419,18 +419,7 @@
     HbDataFormModelItem *modelItem = profileItem(EProfileWrapperGeneralId,ProfileItemKeyandTouchScreenTones);
     if (modelItem) {
         modelItem->setContentWidgetData( QString("value"), value );
-        QMap< QString, QVariant > elements;
-        if (value != 0) {      
-            elements.insert(QString("DecreaseElement"), QVariant(":/icon/hb_vol_slider_decrement.svg"));
-            elements.insert(QString("IncreaseElement"), QVariant(":/icon/hb_vol_slider_increment.svg"));
-            elements.insert(QString("IconElement"), QVariant(":/icon/hb_vol_slider_unmuted.svg") );            
-        }
-        else {
-            elements.insert(QString("DecreaseElement"), QVariant(":/icon/hb_vol_slider_decrement.svg"));
-            elements.insert(QString("IncreaseElement"), QVariant(":/icon/hb_vol_slider_increment.svg"));
-            elements.insert(QString("IconElement"), QVariant(":/icon/hb_vol_slider_muted.svg") );  
-        }
-        modelItem->setContentWidgetData( QString( "elementIcons" ), elements );            
+        setMuteIcon(modelItem, (value == 0) );            
     }
 }
 
@@ -481,18 +470,7 @@
     HbDataFormModelItem *modelItem = profileItem(EProfileWrapperMeetingId,ProfileItemKeyandTouchScreenTones);
     if (modelItem) {
         modelItem->setContentWidgetData( QString("value"), value );
-        QMap< QString, QVariant > elements;
-        if (value != 0) {
-            elements.insert(QString("DecreaseElement"), QVariant(":/icon/hb_vol_slider_decrement.svg"));
-            elements.insert(QString("IncreaseElement"), QVariant(":/icon/hb_vol_slider_increment.svg"));
-            elements.insert(QString("IconElement"), QVariant(":/icon/hb_vol_slider_unmuted.svg") );            
-        }
-        else {
-            elements.insert(QString("DecreaseElement"), QVariant(":/icon/hb_vol_slider_decrement.svg"));
-            elements.insert(QString("IncreaseElement"), QVariant(":/icon/hb_vol_slider_increment.svg"));
-            elements.insert(QString("IconElement"), QVariant(":/icon/hb_vol_slider_muted.svg") );  
-        }
-        modelItem->setContentWidgetData( QString( "elementIcons" ), elements );            
+        setMuteIcon(modelItem, (value == 0) );            
     }
 }
 
@@ -557,7 +535,13 @@
             for (int i = 0; i < sizeof(silenceSensitiveModelItemIds)/sizeof(silenceSensitiveModelItemIds[0]);++i) {           
                 QHash<int,HbDataFormModelItem*>::const_iterator found = it.value().find(silenceSensitiveModelItemIds[i]);
                 if (found != it.value().end()) {
-                    found.value()->setEnabled(!value.toBool());
+                    if (found.key() == CpProfileSettingForm::ProfileItemKeyandTouchScreenTones) {
+                        int currentValue = found.value()->contentWidgetData("value").toInt();
+                        // change the mute icon when the silence mode is changed
+                        bool isMute = value.toBool() || (currentValue == 0);
+                        setMuteIcon(found.value(), isMute); 
+                    } 
+                    found.value()->setEnabled(!value.toBool());                             
                 }
             }   
         }
@@ -569,4 +553,30 @@
     return mProfileModelItems.value(profileId).value(profileItemId);
 }
 
+/*!
+ *  Set the slider icon to mute or unmute
+ *  @param isMute: identified the icon of slider, mute or unmute
+ *  @param profileId: identified which slider should be changed
+ */
+
+void CpProfileSettingForm::setMuteIcon(HbDataFormModelItem *sliderItem, bool isMute)
+{
+    if (sliderItem == 0) {
+        return;
+    }
+    //VolumeSliderItem will be depreacted, so ignore the assert about it
+    if (sliderItem->type() != HbDataFormModelItem::SliderItem) {
+        return;
+    }
+    
+    QMap<QString, QVariant> elements = sliderItem->contentWidgetData("elementIcons").toMap();
+    
+    if (isMute) {        
+        elements.insert(QString("IconElement"), QVariant(":/icon/hb_vol_slider_muted.svg"));
+    }
+    else {
+        elements.insert(QString("IconElement"), QVariant(":/icon/hb_vol_slider_unmuted.svg"));
+    }
+    sliderItem->setContentWidgetData( QString( "elementIcons" ), elements ); 
+}
 //End of File
--- a/controlpanelui/src/cpplugins/personalizationplugin/src/cpprofilesettingform.h	Wed Jun 23 18:13:38 2010 +0300
+++ b/controlpanelui/src/cpplugins/personalizationplugin/src/cpprofilesettingform.h	Tue Jul 06 14:17:10 2010 +0300
@@ -89,6 +89,7 @@
     
     void initProfileItems(int profileId,HbDataFormModelItem *parent);
     HbDataFormModelItem *profileItem(int profileId,int profileItemId);
+    void setMuteIcon(HbDataFormModelItem *silderItem, bool isMute);
 private:
     HbDataFormModel *mModel;
     CpItemDataHelper *mItemDataHelper;
--- a/controlpanelui/src/cpplugins/profileactivatorplugin/src/cpprofileactivatorentryitem.cpp	Wed Jun 23 18:13:38 2010 +0300
+++ b/controlpanelui/src/cpplugins/profileactivatorplugin/src/cpprofileactivatorentryitem.cpp	Tue Jul 06 14:17:10 2010 +0300
@@ -25,9 +25,9 @@
 CpProfileActivatorEntryItem::CpProfileActivatorEntryItem(CpItemDataHelper &itemDataHelper,
                 const QString &text,
                 const QString &description,
-                const HbIcon &icon,
+                const QString &icon,
                 const HbDataFormModelItem *parent)
-                :CpSettingFormEntryItemData(itemDataHelper,text,description,
+                :CpSettingFormEntryItemData(CpSettingFormEntryItemData::ListEntryItem, itemDataHelper,text,description,
                                             icon,parent),mProfileModel(0),mProfileMonitor(0)
 {
     mProfileMonitor = new CpProfileMonitor();
--- a/controlpanelui/src/cpplugins/profileactivatorplugin/src/cpprofileactivatorentryitem.h	Wed Jun 23 18:13:38 2010 +0300
+++ b/controlpanelui/src/cpplugins/profileactivatorplugin/src/cpprofileactivatorentryitem.h	Tue Jul 06 14:17:10 2010 +0300
@@ -28,7 +28,7 @@
 public:
     explicit CpProfileActivatorEntryItem(CpItemDataHelper &itemDataHelper,
             const QString &text = QString(), const QString &description =
-                    QString(), const HbIcon &icon = HbIcon(),
+                    QString(), const QString &icon = QString(),
             const HbDataFormModelItem *parent = 0);
     virtual ~CpProfileActivatorEntryItem();
 private slots:
--- a/controlpanelui/src/cpplugins/profileactivatorplugin/src/cpprofileactivatorplugin.cpp	Wed Jun 23 18:13:38 2010 +0300
+++ b/controlpanelui/src/cpplugins/profileactivatorplugin/src/cpprofileactivatorplugin.cpp	Tue Jul 06 14:17:10 2010 +0300
@@ -30,7 +30,9 @@
 {
     CpSettingFormItemData* itemData = new CpProfileActivatorEntryItem(
                                             itemDataHelper,
-                                            hbTrId("txt_cp_dblist_profile"));
+                                            hbTrId("txt_cp_dblist_profile"),
+                                            " ",
+                                            "qtg_large_profiles");
     return QList<CpSettingFormItemData*>() << itemData;
 }
 
--- a/controlpanelui/src/cpplugins/ringtoneplugin/src/cppersonalizationentryitemdata.cpp	Wed Jun 23 18:13:38 2010 +0300
+++ b/controlpanelui/src/cpplugins/ringtoneplugin/src/cppersonalizationentryitemdata.cpp	Tue Jul 06 14:17:10 2010 +0300
@@ -31,11 +31,11 @@
 CpPersonalizationEntryItemData::CpPersonalizationEntryItemData(CpItemDataHelper &itemDataHelper,
                 const QString &text,
                 const QString &description,
-                const HbIcon &icon,
+                const QString &icon,
                 Profile_Tone_Types toneType,
                 int profileId,
                 const HbDataFormModelItem *parent)
-                :CpSettingFormEntryItemData( itemDataHelper,text,description,icon,parent),
+                :CpSettingFormEntryItemData(CpSettingFormEntryItemData::ListEntryItem, itemDataHelper,text,description,icon,parent),
                 mProfileModel(0),
                 m_profileID(profileId),
                 mToneType(toneType),
--- a/controlpanelui/src/cpplugins/ringtoneplugin/src/cppersonalizationentryitemdata.h	Wed Jun 23 18:13:38 2010 +0300
+++ b/controlpanelui/src/cpplugins/ringtoneplugin/src/cppersonalizationentryitemdata.h	Tue Jul 06 14:17:10 2010 +0300
@@ -38,7 +38,7 @@
         explicit CpPersonalizationEntryItemData(CpItemDataHelper &itemDataHelper,
                 const QString &text = QString(),
                 const QString &description = QString(),
-                const HbIcon &icon = HbIcon(),
+                const QString &icon = QString(),
                 Profile_Tone_Types toneType = TONE_Ring,
                 int profileId = -1,
                 const HbDataFormModelItem *parent = 0);
--- a/controlpanelui/src/cpplugins/ringtoneplugin/src/cpringtoneplugin.cpp	Wed Jun 23 18:13:38 2010 +0300
+++ b/controlpanelui/src/cpplugins/ringtoneplugin/src/cpringtoneplugin.cpp	Tue Jul 06 14:17:10 2010 +0300
@@ -27,9 +27,12 @@
 
 QList<CpSettingFormItemData*> CpRingTonePlugin::createSettingFormItemData(CpItemDataHelper &itemDataHelper) const
 {
-    CpPersonalizationEntryItemData *itemData = new CpPersonalizationEntryItemData(itemDataHelper,
-																		tr("Ring tone"),
-																		tr("Default ring tone"));
+    CpPersonalizationEntryItemData *itemData 
+        = new CpPersonalizationEntryItemData(
+                itemDataHelper,
+                hbTrId("txt_cp_dblist_ringtone"),
+				QString(""),
+				"qtg_large_ring_tone");
     return QList<CpSettingFormItemData*>() << itemData;
 }
 
--- a/controlpanelui/src/cpplugins/volumeplugin/src/cpvolumegroupitemdata.cpp	Wed Jun 23 18:13:38 2010 +0300
+++ b/controlpanelui/src/cpplugins/volumeplugin/src/cpvolumegroupitemdata.cpp	Tue Jul 06 14:17:10 2010 +0300
@@ -57,7 +57,7 @@
     this->appendChild(silenceIndicator);
     
     HbDataFormModelItem *masterVolume = new HbDataFormModelItem(HbDataFormModelItem::SliderItem,
-                                            hbTrId("txt_cp_setlabel_volume"));
+                                            hbTrId("txt_cp_setlabel_ringing_volume"));
     mItemList.insert(CpVolumeGroupItemData::EVolumeMasterVolumeItem, masterVolume);
     QList<QVariant> elements;
     elements << QVariant(HbSlider::IncreaseElement) << QVariant(HbSlider::TrackElement)
@@ -76,11 +76,11 @@
     masterVolume->setContentWidgetData("majorTickInterval",1);
     masterVolume->setContentWidgetData("tickPosition",Hb::SliderTicksBelow);
 
-    QStringList tickLabels;
+    /*QStringList tickLabels;
     tickLabels<<hbTrId("txt_cp_setlabel_volume_val_soft")
               <<hbTrId("txt_cp_setlabel_volume_val_med")
               <<hbTrId("txt_cp_setlabel_volume_val_loud");
-    masterVolume->setContentWidgetData("majorTickLabels",tickLabels);
+    masterVolume->setContentWidgetData("majorTickLabels",tickLabels);*/
     
     masterVolume->setContentWidgetData("iconCheckable",false);
     this->appendChild(masterVolume);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/cpprofilewrapper/bwins/cpprofilewrapperu.def	Tue Jul 06 14:17:10 2010 +0300
@@ -0,0 +1,57 @@
+EXPORTS
+	?setKeyTouchScreenVibra@CpProfileModel@@QAEXHH@Z @ 1 NONAME ; void CpProfileModel::setKeyTouchScreenVibra(int, int)
+	?tr@CpProfileModel@@SA?AVQString@@PBD0H@Z @ 2 NONAME ; class QString CpProfileModel::tr(char const *, char const *, int)
+	?setReminderVibra@CpProfileModel@@QAEXH_N@Z @ 3 NONAME ; void CpProfileModel::setReminderVibra(int, bool)
+	?offLineMode@CpProfileModel@@QBE_NXZ @ 4 NONAME ; bool CpProfileModel::offLineMode(void) const
+	?masterVibra@CpProfileModel@@QBE_NXZ @ 5 NONAME ; bool CpProfileModel::masterVibra(void) const
+	?ringTone@CpProfileModel@@QBE?AVQString@@XZ @ 6 NONAME ; class QString CpProfileModel::ringTone(void) const
+	?qt_metacast@CpProfileModel@@UAEPAXPBD@Z @ 7 NONAME ; void * CpProfileModel::qt_metacast(char const *)
+	?setRingTone@CpProfileModel@@QAEXABVQString@@@Z @ 8 NONAME ; void CpProfileModel::setRingTone(class QString const &)
+	?setReminderTone@CpProfileModel@@QAEXHABVQString@@@Z @ 9 NONAME ; void CpProfileModel::setReminderTone(int, class QString const &)
+	?trUtf8@CpProfileModel@@SA?AVQString@@PBD0@Z @ 10 NONAME ; class QString CpProfileModel::trUtf8(char const *, char const *)
+	?silenceMode@CpProfileModel@@QBE_NXZ @ 11 NONAME ; bool CpProfileModel::silenceMode(void) const
+	?reminderVibra@CpProfileModel@@QBE_NH@Z @ 12 NONAME ; bool CpProfileModel::reminderVibra(int) const
+	?setEmailTone@CpProfileModel@@QAEXHABVQString@@@Z @ 13 NONAME ; void CpProfileModel::setEmailTone(int, class QString const &)
+	?ringAlertVibra@CpProfileModel@@QBE_NH@Z @ 14 NONAME ; bool CpProfileModel::ringAlertVibra(int) const
+	?emailTone@CpProfileModel@@QBE?AVQString@@H@Z @ 15 NONAME ; class QString CpProfileModel::emailTone(int) const
+	?activeProfileId@CpProfileModel@@QBEHXZ @ 16 NONAME ; int CpProfileModel::activeProfileId(void) const
+	?masterVolume@CpProfileModel@@QBEHXZ @ 17 NONAME ; int CpProfileModel::masterVolume(void) const
+	?notificationTone@CpProfileModel@@QBE_NH@Z @ 18 NONAME ; bool CpProfileModel::notificationTone(int) const
+	?tr@CpProfileModel@@SA?AVQString@@PBD0@Z @ 19 NONAME ; class QString CpProfileModel::tr(char const *, char const *)
+	?getStaticMetaObject@CpProfileModel@@SAABUQMetaObject@@XZ @ 20 NONAME ; struct QMetaObject const & CpProfileModel::getStaticMetaObject(void)
+	?keyTouchScreenTone@CpProfileModel@@QBEHH@Z @ 21 NONAME ; int CpProfileModel::keyTouchScreenTone(int) const
+	?setRingTone@CpProfileModel@@QAEXHABVQString@@@Z @ 22 NONAME ; void CpProfileModel::setRingTone(int, class QString const &)
+	?reminderTone@CpProfileModel@@QBE?AVQString@@H@Z @ 23 NONAME ; class QString CpProfileModel::reminderTone(int) const
+	?profileName@CpProfileModel@@QBE?AVQString@@H@Z @ 24 NONAME ; class QString CpProfileModel::profileName(int) const
+	?setKeyTouchScreenTone@CpProfileModel@@QAEXHH@Z @ 25 NONAME ; void CpProfileModel::setKeyTouchScreenTone(int, int)
+	?setMasterVolume@CpProfileModel@@QAEXH@Z @ 26 NONAME ; void CpProfileModel::setMasterVolume(int)
+	?staticMetaObject@CpProfileModel@@2UQMetaObject@@B @ 27 NONAME ; struct QMetaObject const CpProfileModel::staticMetaObject
+	?activateProfile@CpProfileModel@@QAEHH@Z @ 28 NONAME ; int CpProfileModel::activateProfile(int)
+	?profileNames@CpProfileModel@@QBE?AVQStringList@@XZ @ 29 NONAME ; class QStringList CpProfileModel::profileNames(void) const
+	?setNotificationVibra@CpProfileModel@@QAEXH_N@Z @ 30 NONAME ; void CpProfileModel::setNotificationVibra(int, bool)
+	?setNotificationTone@CpProfileModel@@QAEXH_N@Z @ 31 NONAME ; void CpProfileModel::setNotificationTone(int, bool)
+	?metaObject@CpProfileModel@@UBEPBUQMetaObject@@XZ @ 32 NONAME ; struct QMetaObject const * CpProfileModel::metaObject(void) const
+	?setRingAlertVibra@CpProfileModel@@QAEXH_N@Z @ 33 NONAME ; void CpProfileModel::setRingAlertVibra(int, bool)
+	??0CpProfileModel@@QAE@PAVQObject@@@Z @ 34 NONAME ; CpProfileModel::CpProfileModel(class QObject *)
+	?emailVibra@CpProfileModel@@QBE_NH@Z @ 35 NONAME ; bool CpProfileModel::emailVibra(int) const
+	?setProfileSettings@CpProfileModel@@QAEHHAAVCpProfileSettings@@@Z @ 36 NONAME ; int CpProfileModel::setProfileSettings(int, class CpProfileSettings &)
+	?setEmailVibra@CpProfileModel@@QAEXH_N@Z @ 37 NONAME ; void CpProfileModel::setEmailVibra(int, bool)
+	?setOffLineMode@CpProfileModel@@QAEX_N@Z @ 38 NONAME ; void CpProfileModel::setOffLineMode(bool)
+	??1CpProfileModel@@UAE@XZ @ 39 NONAME ; CpProfileModel::~CpProfileModel(void)
+	?notificationVibra@CpProfileModel@@QBE_NH@Z @ 40 NONAME ; bool CpProfileModel::notificationVibra(int) const
+	?qt_metacall@CpProfileModel@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 41 NONAME ; int CpProfileModel::qt_metacall(enum QMetaObject::Call, int, void * *)
+	?messageTone@CpProfileModel@@QBE?AVQString@@H@Z @ 42 NONAME ; class QString CpProfileModel::messageTone(int) const
+	?profileSettings@CpProfileModel@@QAEXHAAVCpProfileSettings@@@Z @ 43 NONAME ; void CpProfileModel::profileSettings(int, class CpProfileSettings &)
+	?d_func@CpProfileModel@@ABEPBVCpProfileModelPrivate@@XZ @ 44 NONAME ; class CpProfileModelPrivate const * CpProfileModel::d_func(void) const
+	?setSilenceMode@CpProfileModel@@QAEX_N@Z @ 45 NONAME ; void CpProfileModel::setSilenceMode(bool)
+	?setMessageVibra@CpProfileModel@@QAEXH_N@Z @ 46 NONAME ; void CpProfileModel::setMessageVibra(int, bool)
+	?keyTouchScreenVibra@CpProfileModel@@QBEHH@Z @ 47 NONAME ; int CpProfileModel::keyTouchScreenVibra(int) const
+	?d_func@CpProfileModel@@AAEPAVCpProfileModelPrivate@@XZ @ 48 NONAME ; class CpProfileModelPrivate * CpProfileModel::d_func(void)
+	?initiationFlag@CpProfileModel@@QAEHXZ @ 49 NONAME ; int CpProfileModel::initiationFlag(void)
+	?messageVibra@CpProfileModel@@QBE_NH@Z @ 50 NONAME ; bool CpProfileModel::messageVibra(int) const
+	??_ECpProfileModel@@UAE@I@Z @ 51 NONAME ; CpProfileModel::~CpProfileModel(unsigned int)
+	?ringTone@CpProfileModel@@QBE?AVQString@@H@Z @ 52 NONAME ; class QString CpProfileModel::ringTone(int) const
+	?trUtf8@CpProfileModel@@SA?AVQString@@PBD0H@Z @ 53 NONAME ; class QString CpProfileModel::trUtf8(char const *, char const *, int)
+	?setMessageTone@CpProfileModel@@QAEXHABVQString@@@Z @ 54 NONAME ; void CpProfileModel::setMessageTone(int, class QString const &)
+	?setMasterVibra@CpProfileModel@@QAEX_N@Z @ 55 NONAME ; void CpProfileModel::setMasterVibra(bool)
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/cpprofilewrapper/eabi/cpprofilewrapperu.def	Tue Jul 06 14:17:10 2010 +0300
@@ -0,0 +1,55 @@
+EXPORTS
+	_ZN14CpProfileModel11qt_metacallEN11QMetaObject4CallEiPPv @ 1 NONAME
+	_ZN14CpProfileModel11qt_metacastEPKc @ 2 NONAME
+	_ZN14CpProfileModel11setRingToneERK7QString @ 3 NONAME
+	_ZN14CpProfileModel11setRingToneEiRK7QString @ 4 NONAME
+	_ZN14CpProfileModel12setEmailToneEiRK7QString @ 5 NONAME
+	_ZN14CpProfileModel13setEmailVibraEib @ 6 NONAME
+	_ZN14CpProfileModel14initiationFlagEv @ 7 NONAME
+	_ZN14CpProfileModel14setMasterVibraEb @ 8 NONAME
+	_ZN14CpProfileModel14setMessageToneEiRK7QString @ 9 NONAME
+	_ZN14CpProfileModel14setOffLineModeEb @ 10 NONAME
+	_ZN14CpProfileModel14setSilenceModeEb @ 11 NONAME
+	_ZN14CpProfileModel15activateProfileEi @ 12 NONAME
+	_ZN14CpProfileModel15profileSettingsEiR17CpProfileSettings @ 13 NONAME
+	_ZN14CpProfileModel15setMasterVolumeEi @ 14 NONAME
+	_ZN14CpProfileModel15setMessageVibraEib @ 15 NONAME
+	_ZN14CpProfileModel15setReminderToneEiRK7QString @ 16 NONAME
+	_ZN14CpProfileModel16setReminderVibraEib @ 17 NONAME
+	_ZN14CpProfileModel16staticMetaObjectE @ 18 NONAME DATA 16
+	_ZN14CpProfileModel17setRingAlertVibraEib @ 19 NONAME
+	_ZN14CpProfileModel18setProfileSettingsEiR17CpProfileSettings @ 20 NONAME
+	_ZN14CpProfileModel19getStaticMetaObjectEv @ 21 NONAME
+	_ZN14CpProfileModel19setNotificationToneEib @ 22 NONAME
+	_ZN14CpProfileModel20setNotificationVibraEib @ 23 NONAME
+	_ZN14CpProfileModel21setKeyTouchScreenToneEii @ 24 NONAME
+	_ZN14CpProfileModel22setKeyTouchScreenVibraEii @ 25 NONAME
+	_ZN14CpProfileModelC1EP7QObject @ 26 NONAME
+	_ZN14CpProfileModelC2EP7QObject @ 27 NONAME
+	_ZN14CpProfileModelD0Ev @ 28 NONAME
+	_ZN14CpProfileModelD1Ev @ 29 NONAME
+	_ZN14CpProfileModelD2Ev @ 30 NONAME
+	_ZNK14CpProfileModel10emailVibraEi @ 31 NONAME
+	_ZNK14CpProfileModel10metaObjectEv @ 32 NONAME
+	_ZNK14CpProfileModel11masterVibraEv @ 33 NONAME
+	_ZNK14CpProfileModel11messageToneEi @ 34 NONAME
+	_ZNK14CpProfileModel11offLineModeEv @ 35 NONAME
+	_ZNK14CpProfileModel11profileNameEi @ 36 NONAME
+	_ZNK14CpProfileModel11silenceModeEv @ 37 NONAME
+	_ZNK14CpProfileModel12masterVolumeEv @ 38 NONAME
+	_ZNK14CpProfileModel12messageVibraEi @ 39 NONAME
+	_ZNK14CpProfileModel12profileNamesEv @ 40 NONAME
+	_ZNK14CpProfileModel12reminderToneEi @ 41 NONAME
+	_ZNK14CpProfileModel13reminderVibraEi @ 42 NONAME
+	_ZNK14CpProfileModel14ringAlertVibraEi @ 43 NONAME
+	_ZNK14CpProfileModel15activeProfileIdEv @ 44 NONAME
+	_ZNK14CpProfileModel16notificationToneEi @ 45 NONAME
+	_ZNK14CpProfileModel17notificationVibraEi @ 46 NONAME
+	_ZNK14CpProfileModel18keyTouchScreenToneEi @ 47 NONAME
+	_ZNK14CpProfileModel19keyTouchScreenVibraEi @ 48 NONAME
+	_ZNK14CpProfileModel8ringToneEi @ 49 NONAME
+	_ZNK14CpProfileModel8ringToneEv @ 50 NONAME
+	_ZNK14CpProfileModel9emailToneEi @ 51 NONAME
+	_ZTI14CpProfileModel @ 52 NONAME
+	_ZTV14CpProfileModel @ 53 NONAME
+
--- a/controlpanelui/src/cpprofilewrapper/src/cpprofilemodel_p.cpp	Wed Jun 23 18:13:38 2010 +0300
+++ b/controlpanelui/src/cpprofilewrapper/src/cpprofilemodel_p.cpp	Tue Jul 06 14:17:10 2010 +0300
@@ -201,6 +201,7 @@
     profileSettings.mEmailTone = stringFromDescriptor(extTones.EmailAlertTone());
     profileSettings.mReminderTone = stringFromDescriptor(extTones.ReminderTone());
     profileSettings.mNotificationTone = toneSettings.iWarningAndGameTones;
+    // only use Keypad Volume as a base value for display in key & touch screen setting option
     profileSettings.mKeyTouchScreenTone = toneSettings.iKeypadVolume;
     
     profileSettings.mRingAlertVibra = vibraSettings.RingAlertVibra();
@@ -211,6 +212,11 @@
     profileSettings.mKeyTouchScreenVibra = feedbackSettings.TactileFeedback();
 						
 }
+/*!
+     set profile settings
+     \param profileId identify the profile
+     \param profileSettings value of profile options
+ */
 int CpProfileModelPrivate::setProfileSettings(int profileId, CpProfileSettings& profileSettings)
 {
     MProfileExtended2 *profileExtend = mProfileList.value(profileId);
@@ -224,7 +230,7 @@
             profileExtend->ProfileSetExtraSettings();
     MProfileSetFeedbackSettings &setFeedbackSettings =
             extraSettings.ProfileSetFeedbackSettings();
-    // ignore here, wait for the exception deal framework of qt-symbian
+    
     TRAP_IGNORE(
             setTones.SetRingingTone1L(*descriptorFromString(
                     profileSettings.mRingTone));
@@ -237,8 +243,12 @@
             )
     toneSettings.iWarningAndGameTones
             = profileSettings.mNotificationTone;
+    // Change the keypad volume and touch screen tone together
     toneSettings.iKeypadVolume
-            = static_cast<TProfileKeypadVolume> (profileSettings.mKeyTouchScreenTone);
+            = static_cast<TProfileKeypadVolume> (profileSettings.mKeyTouchScreenTone);    
+    setFeedbackSettings.SetAudioFeedback(
+            static_cast<TProfileAudioFeedback> (profileSettings.mKeyTouchScreenTone));
+   
     setVibraSettings.SetRingAlertVibra(profileSettings.mRingAlertVibra);
     setVibraSettings.SetMessageAlertVibra(profileSettings.mMessageVibra);
     setVibraSettings.SetEmailAlertVibra(profileSettings.mEmailVibra);
@@ -429,7 +439,10 @@
             mEngine->CommitChangeL(*profileExtend);
             ) 
 }
-
+/*!
+     return key & touch screen tone's value
+     \sa setKeyTouchScreenTone
+ */
 int CpProfileModelPrivate::keyTouchScreenTone(int profileId) const
 {
     MProfileExtended2 *profileExtend = mProfileList.value(profileId);
@@ -440,7 +453,12 @@
     int keyTouchScreenTone = toneSettings.iKeypadVolume;
     return keyTouchScreenTone;        
 }
-
+/*!
+     set key & touch screen tone
+     \param profileId identify the profile
+     \param level 0-5
+     \sa keyTouchScreenTone
+ */
 void CpProfileModelPrivate::setKeyTouchScreenTone(int profileId, int level)
 {
     MProfileExtended2 *profileExtend = mProfileList.value(profileId);                    
@@ -449,8 +467,16 @@
     TProfileToneSettings &toneSettings =
             setTones.SetToneSettings();
 
+    MProfileSetExtraSettings &extraSettings =
+                profileExtend->ProfileSetExtraSettings();
+    MProfileSetFeedbackSettings &setFeedbackSettings =
+                extraSettings.ProfileSetFeedbackSettings();
+
     toneSettings.iKeypadVolume
             = static_cast<TProfileKeypadVolume> (level);
+    
+    setFeedbackSettings.SetAudioFeedback(
+            static_cast<TProfileAudioFeedback> (level));
     TRAP_IGNORE (
             mEngine->CommitChangeL(*profileExtend);
     )    
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/cpringtoneview/bwins/cpringtoneviewu.def	Tue Jul 06 14:17:10 2010 +0300
@@ -0,0 +1,20 @@
+EXPORTS
+	?tr@CpRingToneView@@SA?AVQString@@PBD0@Z @ 1 NONAME ; class QString CpRingToneView::tr(char const *, char const *)
+	?selOK@CpRingToneView@@IAEXABVQString@@@Z @ 2 NONAME ; void CpRingToneView::selOK(class QString const &)
+	??1CpRingToneView@@UAE@XZ @ 3 NONAME ; CpRingToneView::~CpRingToneView(void)
+	?getStaticMetaObject@CpRingToneView@@SAABUQMetaObject@@XZ @ 4 NONAME ; struct QMetaObject const & CpRingToneView::getStaticMetaObject(void)
+	?handleError@CpRingToneView@@AAEXHABVQString@@@Z @ 5 NONAME ; void CpRingToneView::handleError(int, class QString const &)
+	?launchMediaFetcher@CpRingToneView@@AAEXABVQString@@0@Z @ 6 NONAME ; void CpRingToneView::launchMediaFetcher(class QString const &, class QString const &)
+	?selError@CpRingToneView@@IAEXHABVQString@@@Z @ 7 NONAME ; void CpRingToneView::selError(int, class QString const &)
+	?trUtf8@CpRingToneView@@SA?AVQString@@PBD0H@Z @ 8 NONAME ; class QString CpRingToneView::trUtf8(char const *, char const *, int)
+	?qt_metacall@CpRingToneView@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 9 NONAME ; int CpRingToneView::qt_metacall(enum QMetaObject::Call, int, void * *)
+	?staticMetaObject@CpRingToneView@@2UQMetaObject@@B @ 10 NONAME ; struct QMetaObject const CpRingToneView::staticMetaObject
+	?metaObject@CpRingToneView@@UBEPBUQMetaObject@@XZ @ 11 NONAME ; struct QMetaObject const * CpRingToneView::metaObject(void) const
+	?tr@CpRingToneView@@SA?AVQString@@PBD0H@Z @ 12 NONAME ; class QString CpRingToneView::tr(char const *, char const *, int)
+	??0CpRingToneView@@QAE@PAVQGraphicsItem@@@Z @ 13 NONAME ; CpRingToneView::CpRingToneView(class QGraphicsItem *)
+	?itemActivated@CpRingToneView@@AAEXABVQModelIndex@@@Z @ 14 NONAME ; void CpRingToneView::itemActivated(class QModelIndex const &)
+	??_ECpRingToneView@@UAE@I@Z @ 15 NONAME ; CpRingToneView::~CpRingToneView(unsigned int)
+	?trUtf8@CpRingToneView@@SA?AVQString@@PBD0@Z @ 16 NONAME ; class QString CpRingToneView::trUtf8(char const *, char const *)
+	?handleOk@CpRingToneView@@AAEXABVQVariant@@@Z @ 17 NONAME ; void CpRingToneView::handleOk(class QVariant const &)
+	?qt_metacast@CpRingToneView@@UAEPAXPBD@Z @ 18 NONAME ; void * CpRingToneView::qt_metacast(char const *)
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/cpringtoneview/eabi/cpringtoneviewu.def	Tue Jul 06 14:17:10 2010 +0300
@@ -0,0 +1,24 @@
+EXPORTS
+	_ZN14CpRingToneView11handleErrorEiRK7QString @ 1 NONAME
+	_ZN14CpRingToneView11qt_metacallEN11QMetaObject4CallEiPPv @ 2 NONAME
+	_ZN14CpRingToneView11qt_metacastEPKc @ 3 NONAME
+	_ZN14CpRingToneView13itemActivatedERK11QModelIndex @ 4 NONAME
+	_ZN14CpRingToneView16staticMetaObjectE @ 5 NONAME DATA 16
+	_ZN14CpRingToneView18launchMediaFetcherERK7QStringS2_ @ 6 NONAME
+	_ZN14CpRingToneView19getStaticMetaObjectEv @ 7 NONAME
+	_ZN14CpRingToneView5selOKERK7QString @ 8 NONAME
+	_ZN14CpRingToneView8handleOkERK8QVariant @ 9 NONAME
+	_ZN14CpRingToneView8selErrorEiRK7QString @ 10 NONAME
+	_ZN14CpRingToneViewC1EP13QGraphicsItem @ 11 NONAME
+	_ZN14CpRingToneViewC2EP13QGraphicsItem @ 12 NONAME
+	_ZN14CpRingToneViewD0Ev @ 13 NONAME
+	_ZN14CpRingToneViewD1Ev @ 14 NONAME
+	_ZN14CpRingToneViewD2Ev @ 15 NONAME
+	_ZNK14CpRingToneView10metaObjectEv @ 16 NONAME
+	_ZTI14CpRingToneView @ 17 NONAME
+	_ZTV14CpRingToneView @ 18 NONAME
+	_ZThn16_N14CpRingToneViewD0Ev @ 19 NONAME
+	_ZThn16_N14CpRingToneViewD1Ev @ 20 NONAME
+	_ZThn8_N14CpRingToneViewD0Ev @ 21 NONAME
+	_ZThn8_N14CpRingToneViewD1Ev @ 22 NONAME
+
--- a/controlpanelui/src/cpringtoneview/src/cpringtoneview.cpp	Wed Jun 23 18:13:38 2010 +0300
+++ b/controlpanelui/src/cpringtoneview/src/cpringtoneview.cpp	Tue Jul 06 14:17:10 2010 +0300
@@ -19,54 +19,56 @@
 #include <QGraphicsLinearLayout>
 #include <HbLabel>
 #include <QList>
+#include <QPair>
 #include <QModelIndex>
 #include <QStandardItemModel>
 #include <QStandardItem>
 #include <xqaiwrequest.h>
 #include <cplogger.h>
+#include <hbstyleloader.h>
+#include <hbdataformmodel.h>
+#include <hbdataformmodelitem.h>
+#include <hbdataform.h>
+#include <cpsettingformentryitemdata.h>
 
 CpRingToneView::CpRingToneView( QGraphicsItem *parent ):
                               CpBaseSettingView(0, parent),
                               mToneTypeList( new HbListWidget(this) ),
                               mReq(0)
 {
-    HbWidget* contentWidget = new HbWidget(this);
-    QGraphicsLinearLayout* layout = new QGraphicsLinearLayout(Qt::Vertical);
-
-    //setup the heading.
-    HbLabel* label = new HbLabel( hbTrId("txt_cp_subhead_select_tone_type"), contentWidget );
-    layout->addItem(label);
-    //handling user click
-    bool bret = connect(mToneTypeList, SIGNAL( activated(HbListWidgetItem *) ),
-            this, SLOT(onTypeSelected(HbListWidgetItem *)));
-    //initialize the list contents
-    QList<QString> tonesTypeList;
-    tonesTypeList <<
-            hbTrId("txt_cp_list_no_tone")<<
-            hbTrId("txt_cp_list_tone")<<
-            hbTrId("txt_cp_list_music")<<
-            hbTrId("txt_cp_list_recording")<<
-            hbTrId("txt_cp_list_get_more_tones");
-    for ( int i = 0; i < tonesTypeList.count(); i++ )
-    {
-        mToneTypeList->addItem(tonesTypeList.at(i));
+    HbStyleLoader::registerFilePath(":/widgetml/cpdataformlistentryviewitem.css");
+    HbStyleLoader::registerFilePath(":/widgetml/cpdataformlistentryviewitem_color.css");
+    HbStyleLoader::registerFilePath(":/widgetml/cpdataformlistentryviewitem.widgetml");
+    
+    HbDataForm *form = qobject_cast<HbDataForm*> ( widget() );
+    form->setHeading("txt_cp_subhead_select_tone_type");   
+    
+    HbDataFormModel *model = new HbDataFormModel();  
+    QList< QPair<QString,QString> > tonesTypeList;
+    tonesTypeList << qMakePair( QString("qtg_large_tone_off"), hbTrId("txt_cp_list_no_tone") )
+                 << qMakePair( QString("qtg_large_tone"), hbTrId("txt_cp_list_tone") )
+                 << qMakePair( QString("qtg_large_music"), hbTrId("txt_cp_list_music") )                 
+                 << qMakePair( QString("qtg_large_ovistore"), hbTrId("txt_cp_list_get_more_tones") );
+       
+    for (int i = 0; i < tonesTypeList.count(); ++i) {
+        HbDataFormModelItem *itemData = new HbDataFormModelItem();
+        itemData->setType ( static_cast<HbDataFormModelItem::DataItemType> (CpSettingFormEntryItemData::ListEntryItem) );
+        itemData->setLabel(tonesTypeList.at(i).second);
+        itemData->setIcon(tonesTypeList.at(i).first);
+        model->appendDataFormItem(itemData, model->invisibleRootItem());
     }
-    //add the list to layout.
-    layout->addItem(mToneTypeList);
-
-    contentWidget->setLayout(layout);
-
-    setWidget(contentWidget);
+    connect(form, SIGNAL(activated(QModelIndex)), this, SLOT(itemActivated(QModelIndex)));
+    form->setModel(model);
 }
 CpRingToneView::~CpRingToneView()
 {
     if(mReq)    delete mReq;
 }
-void CpRingToneView::onTypeSelected(HbListWidgetItem *item)
+void CpRingToneView::itemActivated( const QModelIndex &index )
 {
-    int nRow = mToneTypeList->row( item );
-    switch(nRow)
-    {
+    int nRow = index.row();
+
+    switch(nRow) {
         case 0:         //no tone, set default no sound
                 emit selOK(QString(""));
                 emit aboutToClose();
@@ -77,11 +79,10 @@
         case 2:         //music
                 launchMediaFetcher("com.nokia.symbian.IMusicFetch", "fetch()" );
                 break;
-        case 3:         //recording
-        case 4:         //get more tones
-        default:
-                break;
-    }
+        case 3:         //get more tones
+		default:
+		        break;
+	 }
 }
 void CpRingToneView::handleOk(const QVariant &result)
 {
--- a/controlpanelui/src/cpserviceprovider/src/cplauncherservice.cpp	Wed Jun 23 18:13:38 2010 +0300
+++ b/controlpanelui/src/cpserviceprovider/src/cplauncherservice.cpp	Tue Jul 06 14:17:10 2010 +0300
@@ -31,6 +31,7 @@
 {
     CPSP_LOG("CpLauncherService Constructing...");
     publishAll();
+    connect(this,SIGNAL(clientDisconnected()),this,SLOT(handleClientDisconnected()));
 }
 
 CpLauncherService::~CpLauncherService()
@@ -38,11 +39,13 @@
     CPSP_LOG("CpLauncherService Destructing...");
 }
 
-void CpLauncherService::complete()
+bool CpLauncherService::complete()
 {
     CPSP_LOG( QString("CpLauncherService::complete() mAsyncRequestIndex = %1, mReturnValue = %2").arg(
             mAsyncRequestIndex).arg(mReturnValue.toBool()) );
-    completeRequest(mAsyncRequestIndex, mReturnValue);
+    bool ret = completeRequest(mAsyncRequestIndex, mReturnValue);
+    mAsyncRequestIndex = -1;
+    return ret;
 }
 
 void CpLauncherService::setReturnValue(const QVariant &returnValue)
@@ -86,4 +89,9 @@
     return succeed;
 }
 
+void CpLauncherService::handleClientDisconnected()
+{
+    qApp->quit();
+}
+
 //End of File
--- a/controlpanelui/src/cpserviceprovider/src/cplauncherservice.h	Wed Jun 23 18:13:38 2010 +0300
+++ b/controlpanelui/src/cpserviceprovider/src/cplauncherservice.h	Tue Jul 06 14:17:10 2010 +0300
@@ -28,11 +28,12 @@
 public:
     explicit CpLauncherService(HbMainWindow *mainWindow = 0);
     virtual ~CpLauncherService();
-    void complete();
+    bool complete();
 public slots:
     bool launchSettingView(const QString &pluginFile,const QVariant &hint);
 private slots:
     void setReturnValue(const QVariant &returnValue);
+    void handleClientDisconnected();
 private:
     HbMainWindow *mMainWindow;
     int mAsyncRequestIndex;
--- a/controlpanelui/src/cpserviceprovider/src/cpservicemainwindow.cpp	Wed Jun 23 18:13:38 2010 +0300
+++ b/controlpanelui/src/cpserviceprovider/src/cpservicemainwindow.cpp	Tue Jul 06 14:17:10 2010 +0300
@@ -22,7 +22,7 @@
 #include "cpsplogger.h"
 
 CpServiceMainWindow::CpServiceMainWindow(QWidget *parent /* = 0*/)
-: HbMainWindow(parent), mLauncherService(0)
+: HbMainWindow(parent), mLauncherService(0), mPreviousView(0)
 {
     CPSP_LOG("CpServiceMainWindow Constructing...");
     mLauncherService = new CpLauncherService(this);
@@ -37,6 +37,8 @@
 {
     mSettingViewPointer = settingView;
     
+    mPreviousView = currentView();
+    
     connect(settingView, SIGNAL(aboutToClose()), this, SLOT(quit()));    
     addView(settingView);
     setCurrentView(settingView);
@@ -46,6 +48,8 @@
 {
     CPSP_LOG("CpServiceMainWindow::quit()");
     
+    closeSettingView();
+    
     connect(mLauncherService, SIGNAL(returnValueDelivered()), qApp, SLOT(quit()));
     mLauncherService->complete();
   
@@ -59,4 +63,14 @@
     */
 }
 
+void CpServiceMainWindow::closeSettingView()
+{
+    if (mSettingViewPointer) {
+        removeView(mSettingViewPointer);
+        mSettingViewPointer->deleteLater();
+    }
+    
+    setCurrentView(mPreviousView);
+}
+
 //End of File
--- a/controlpanelui/src/cpserviceprovider/src/cpservicemainwindow.h	Wed Jun 23 18:13:38 2010 +0300
+++ b/controlpanelui/src/cpserviceprovider/src/cpservicemainwindow.h	Tue Jul 06 14:17:10 2010 +0300
@@ -31,12 +31,21 @@
     explicit CpServiceMainWindow(QWidget *parent = 0);
     virtual ~CpServiceMainWindow();
     
+    /*
+     * set the setting view as current view
+     */
     void setSettingView(CpBaseSettingView *settingView);
     
+    /*
+     * close current setting view
+     */
+    void closeSettingView();
+    
 public slots:
     void quit();
 private:
     CpLauncherService *mLauncherService;
+    HbView *mPreviousView;
     QPointer<CpBaseSettingView> mSettingViewPointer;
 };
 
--- a/controlpanelui/src/cpserviceprovider/src/main.cpp	Wed Jun 23 18:13:38 2010 +0300
+++ b/controlpanelui/src/cpserviceprovider/src/main.cpp	Tue Jul 06 14:17:10 2010 +0300
@@ -19,7 +19,6 @@
 #include <QDir>
 #include <QTranslator>
 #include <QLocale>
-#include <cpbasepath.h>
 #include "cpservicemainwindow.h"
 #include "cpsplogger.h"
 
@@ -37,7 +36,9 @@
         qApp->installTranslator(&translator);
     }
     
-    HbStyleLoader::registerFilePath(CP_RESOURCE_PATH + QDir::separator() + WIDGETML_SUB_PATH);
+    HbStyleLoader::registerFilePath(":/widgetml/cpdataformlistentryviewitem.css");
+    HbStyleLoader::registerFilePath(":/widgetml/cpdataformlistentryviewitem_color.css");
+    HbStyleLoader::registerFilePath(":/widgetml/cpdataformlistentryviewitem.widgetml");
     
     CpServiceMainWindow wnd;
     wnd.show();
--- a/controlpanelui/src/eabi/cpcategorymodelu.def	Wed Jun 23 18:13:38 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,56 +0,0 @@
-EXPORTS
-	_Z22createCpPluginItemDataP27CpCreatePluginItemDataEvent @ 1 NONAME
-	_ZN14CpTaskExecutor11qt_metacallEN11QMetaObject4CallEiPPv @ 2 NONAME
-	_ZN14CpTaskExecutor11qt_metacastEPKc @ 3 NONAME
-	_ZN14CpTaskExecutor11removeTasksEv @ 4 NONAME
-	_ZN14CpTaskExecutor14globalInstanceEv @ 5 NONAME
-	_ZN14CpTaskExecutor16staticMetaObjectE @ 6 NONAME DATA 16
-	_ZN14CpTaskExecutor19getStaticMetaObjectEv @ 7 NONAME
-	_ZN14CpTaskExecutor21destroyGlobalInstanceEv @ 8 NONAME
-	_ZN14CpTaskExecutor3runEv @ 9 NONAME
-	_ZN14CpTaskExecutor4stopEv @ 10 NONAME
-	_ZN14CpTaskExecutor7runTaskEP6CpTaskb @ 11 NONAME
-	_ZN14CpTaskExecutor7toFrontEP6CpTask @ 12 NONAME
-	_ZN14CpTaskExecutorC1EP7QObject @ 13 NONAME
-	_ZN14CpTaskExecutorC2EP7QObject @ 14 NONAME
-	_ZN14CpTaskExecutorD0Ev @ 15 NONAME
-	_ZN14CpTaskExecutorD1Ev @ 16 NONAME
-	_ZN14CpTaskExecutorD2Ev @ 17 NONAME
-	_ZN26CpCategorySettingFormModel10initializeER16CpItemDataHelper @ 18 NONAME
-	_ZN26CpCategorySettingFormModel11qt_metacallEN11QMetaObject4CallEiPPv @ 19 NONAME
-	_ZN26CpCategorySettingFormModel11qt_metacastEPKc @ 20 NONAME
-	_ZN26CpCategorySettingFormModel16staticMetaObjectE @ 21 NONAME DATA 16
-	_ZN26CpCategorySettingFormModel19getStaticMetaObjectEv @ 22 NONAME
-	_ZN26CpCategorySettingFormModel25afterLoadingConfigPluginsER16CpItemDataHelper @ 23 NONAME
-	_ZN26CpCategorySettingFormModel26beforeLoadingConfigPluginsER16CpItemDataHelper @ 24 NONAME
-	_ZN26CpCategorySettingFormModelC1ERK7QString @ 25 NONAME
-	_ZN26CpCategorySettingFormModelC2ERK7QString @ 26 NONAME
-	_ZN26CpCategorySettingFormModelD0Ev @ 27 NONAME
-	_ZN26CpCategorySettingFormModelD1Ev @ 28 NONAME
-	_ZN26CpCategorySettingFormModelD2Ev @ 29 NONAME
-	_ZN29CpCategorySettingFormItemData10initializeER16CpItemDataHelper @ 30 NONAME
-	_ZN29CpCategorySettingFormItemData11qt_metacallEN11QMetaObject4CallEiPPv @ 31 NONAME
-	_ZN29CpCategorySettingFormItemData11qt_metacastEPKc @ 32 NONAME
-	_ZN29CpCategorySettingFormItemData16staticMetaObjectE @ 33 NONAME DATA 16
-	_ZN29CpCategorySettingFormItemData19getStaticMetaObjectEv @ 34 NONAME
-	_ZN29CpCategorySettingFormItemData25afterLoadingConfigPluginsER16CpItemDataHelper @ 35 NONAME
-	_ZN29CpCategorySettingFormItemData26beforeLoadingConfigPluginsER16CpItemDataHelper @ 36 NONAME
-	_ZN29CpCategorySettingFormItemDataC1EN19HbDataFormModelItem12DataItemTypeERK7QStringS4_PKS0_ @ 37 NONAME
-	_ZN29CpCategorySettingFormItemDataC1ERK7QStringPK19HbDataFormModelItem @ 38 NONAME
-	_ZN29CpCategorySettingFormItemDataC2EN19HbDataFormModelItem12DataItemTypeERK7QStringS4_PKS0_ @ 39 NONAME
-	_ZN29CpCategorySettingFormItemDataC2ERK7QStringPK19HbDataFormModelItem @ 40 NONAME
-	_ZN29CpCategorySettingFormItemDataD0Ev @ 41 NONAME
-	_ZN29CpCategorySettingFormItemDataD1Ev @ 42 NONAME
-	_ZN29CpCategorySettingFormItemDataD2Ev @ 43 NONAME
-	_ZNK14CpTaskExecutor10metaObjectEv @ 44 NONAME
-	_ZNK26CpCategorySettingFormModel10metaObjectEv @ 45 NONAME
-	_ZNK29CpCategorySettingFormItemData10metaObjectEv @ 46 NONAME
-	_ZTI14CpTaskExecutor @ 47 NONAME
-	_ZTI26CpCategorySettingFormModel @ 48 NONAME
-	_ZTI29CpCategorySettingFormItemData @ 49 NONAME
-	_ZTV14CpTaskExecutor @ 50 NONAME
-	_ZTV26CpCategorySettingFormModel @ 51 NONAME
-	_ZTV29CpCategorySettingFormItemData @ 52 NONAME
-	_ZThn8_N29CpCategorySettingFormItemDataD0Ev @ 53 NONAME
-	_ZThn8_N29CpCategorySettingFormItemDataD1Ev @ 54 NONAME
-
--- a/controlpanelui/src/eabi/cpprofilewrapperu.def	Wed Jun 23 18:13:38 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,55 +0,0 @@
-EXPORTS
-	_ZN14CpProfileModel11qt_metacallEN11QMetaObject4CallEiPPv @ 1 NONAME
-	_ZN14CpProfileModel11qt_metacastEPKc @ 2 NONAME
-	_ZN14CpProfileModel11setRingToneERK7QString @ 3 NONAME
-	_ZN14CpProfileModel11setRingToneEiRK7QString @ 4 NONAME
-	_ZN14CpProfileModel12setEmailToneEiRK7QString @ 5 NONAME
-	_ZN14CpProfileModel13setEmailVibraEib @ 6 NONAME
-	_ZN14CpProfileModel14initiationFlagEv @ 7 NONAME
-	_ZN14CpProfileModel14setMasterVibraEb @ 8 NONAME
-	_ZN14CpProfileModel14setMessageToneEiRK7QString @ 9 NONAME
-	_ZN14CpProfileModel14setOffLineModeEb @ 10 NONAME
-	_ZN14CpProfileModel14setSilenceModeEb @ 11 NONAME
-	_ZN14CpProfileModel15activateProfileEi @ 12 NONAME
-	_ZN14CpProfileModel15profileSettingsEiR17CpProfileSettings @ 13 NONAME
-	_ZN14CpProfileModel15setMasterVolumeEi @ 14 NONAME
-	_ZN14CpProfileModel15setMessageVibraEib @ 15 NONAME
-	_ZN14CpProfileModel15setReminderToneEiRK7QString @ 16 NONAME
-	_ZN14CpProfileModel16setReminderVibraEib @ 17 NONAME
-	_ZN14CpProfileModel16staticMetaObjectE @ 18 NONAME DATA 16
-	_ZN14CpProfileModel17setRingAlertVibraEib @ 19 NONAME
-	_ZN14CpProfileModel18setProfileSettingsEiR17CpProfileSettings @ 20 NONAME
-	_ZN14CpProfileModel19getStaticMetaObjectEv @ 21 NONAME
-	_ZN14CpProfileModel19setNotificationToneEib @ 22 NONAME
-	_ZN14CpProfileModel20setNotificationVibraEib @ 23 NONAME
-	_ZN14CpProfileModel21setKeyTouchScreenToneEii @ 24 NONAME
-	_ZN14CpProfileModel22setKeyTouchScreenVibraEii @ 25 NONAME
-	_ZN14CpProfileModelC1EP7QObject @ 26 NONAME
-	_ZN14CpProfileModelC2EP7QObject @ 27 NONAME
-	_ZN14CpProfileModelD0Ev @ 28 NONAME
-	_ZN14CpProfileModelD1Ev @ 29 NONAME
-	_ZN14CpProfileModelD2Ev @ 30 NONAME
-	_ZNK14CpProfileModel10emailVibraEi @ 31 NONAME
-	_ZNK14CpProfileModel10metaObjectEv @ 32 NONAME
-	_ZNK14CpProfileModel11masterVibraEv @ 33 NONAME
-	_ZNK14CpProfileModel11messageToneEi @ 34 NONAME
-	_ZNK14CpProfileModel11offLineModeEv @ 35 NONAME
-	_ZNK14CpProfileModel11profileNameEi @ 36 NONAME
-	_ZNK14CpProfileModel11silenceModeEv @ 37 NONAME
-	_ZNK14CpProfileModel12masterVolumeEv @ 38 NONAME
-	_ZNK14CpProfileModel12messageVibraEi @ 39 NONAME
-	_ZNK14CpProfileModel12profileNamesEv @ 40 NONAME
-	_ZNK14CpProfileModel12reminderToneEi @ 41 NONAME
-	_ZNK14CpProfileModel13reminderVibraEi @ 42 NONAME
-	_ZNK14CpProfileModel14ringAlertVibraEi @ 43 NONAME
-	_ZNK14CpProfileModel15activeProfileIdEv @ 44 NONAME
-	_ZNK14CpProfileModel16notificationToneEi @ 45 NONAME
-	_ZNK14CpProfileModel17notificationVibraEi @ 46 NONAME
-	_ZNK14CpProfileModel18keyTouchScreenToneEi @ 47 NONAME
-	_ZNK14CpProfileModel19keyTouchScreenVibraEi @ 48 NONAME
-	_ZNK14CpProfileModel8ringToneEi @ 49 NONAME
-	_ZNK14CpProfileModel8ringToneEv @ 50 NONAME
-	_ZNK14CpProfileModel9emailToneEi @ 51 NONAME
-	_ZTI14CpProfileModel @ 52 NONAME
-	_ZTV14CpProfileModel @ 53 NONAME
-
--- a/controlpanelui/src/eabi/cpringtoneviewu.def	Wed Jun 23 18:13:38 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,24 +0,0 @@
-EXPORTS
-	_ZN14CpRingToneView11handleErrorEiRK7QString @ 1 NONAME
-	_ZN14CpRingToneView11qt_metacallEN11QMetaObject4CallEiPPv @ 2 NONAME
-	_ZN14CpRingToneView11qt_metacastEPKc @ 3 NONAME
-	_ZN14CpRingToneView14onTypeSelectedEP16HbListWidgetItem @ 4 NONAME
-	_ZN14CpRingToneView16staticMetaObjectE @ 5 NONAME DATA 16
-	_ZN14CpRingToneView18launchMediaFetcherERK7QStringS2_ @ 6 NONAME
-	_ZN14CpRingToneView19getStaticMetaObjectEv @ 7 NONAME
-	_ZN14CpRingToneView5selOKERK7QString @ 8 NONAME
-	_ZN14CpRingToneView8handleOkERK8QVariant @ 9 NONAME
-	_ZN14CpRingToneView8selErrorEiRK7QString @ 10 NONAME
-	_ZN14CpRingToneViewC1EP13QGraphicsItem @ 11 NONAME
-	_ZN14CpRingToneViewC2EP13QGraphicsItem @ 12 NONAME
-	_ZN14CpRingToneViewD0Ev @ 13 NONAME
-	_ZN14CpRingToneViewD1Ev @ 14 NONAME
-	_ZN14CpRingToneViewD2Ev @ 15 NONAME
-	_ZNK14CpRingToneView10metaObjectEv @ 16 NONAME
-	_ZTI14CpRingToneView @ 17 NONAME
-	_ZTV14CpRingToneView @ 18 NONAME
-	_ZThn16_N14CpRingToneViewD0Ev @ 19 NONAME
-	_ZThn16_N14CpRingToneViewD1Ev @ 20 NONAME
-	_ZThn8_N14CpRingToneViewD0Ev @ 21 NONAME
-	_ZThn8_N14CpRingToneViewD1Ev @ 22 NONAME
-
--- a/controlpanelui/src/eabi/seccodeuiu.def	Wed Jun 23 18:13:38 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,37 +0,0 @@
-EXPORTS
-	_ZN15SecCodeSettings11qt_metacallEN11QMetaObject4CallEiPPv @ 1 NONAME
-	_ZN15SecCodeSettings11qt_metacastEPKc @ 2 NONAME
-	_ZN15SecCodeSettings13changePinCodeEv @ 3 NONAME
-	_ZN15SecCodeSettings14changePin2CodeEv @ 4 NONAME
-	_ZN15SecCodeSettings16staticMetaObjectE @ 5 NONAME DATA 16
-	_ZN15SecCodeSettings17setPinCodeRequestEb @ 6 NONAME
-	_ZN15SecCodeSettings19getStaticMetaObjectEv @ 7 NONAME
-	_ZN15SecCodeSettingsC1EP7QObject @ 8 NONAME
-	_ZN15SecCodeSettingsC2EP7QObject @ 9 NONAME
-	_ZN15SecCodeSettingsD0Ev @ 10 NONAME
-	_ZN15SecCodeSettingsD1Ev @ 11 NONAME
-	_ZN15SecCodeSettingsD2Ev @ 12 NONAME
-	_ZN27SecCodeEditDataFormViewItem10createItemEv @ 13 NONAME
-	_ZN27SecCodeEditDataFormViewItem11qt_metacallEN11QMetaObject4CallEiPPv @ 14 NONAME
-	_ZN27SecCodeEditDataFormViewItem11qt_metacastEPKc @ 15 NONAME
-	_ZN27SecCodeEditDataFormViewItem16staticMetaObjectE @ 16 NONAME DATA 16
-	_ZN27SecCodeEditDataFormViewItem18createCustomWidgetEv @ 17 NONAME
-	_ZN27SecCodeEditDataFormViewItem19getStaticMetaObjectEv @ 18 NONAME
-	_ZN27SecCodeEditDataFormViewItemC1EP13QGraphicsItem @ 19 NONAME
-	_ZN27SecCodeEditDataFormViewItemC2EP13QGraphicsItem @ 20 NONAME
-	_ZN27SecCodeEditDataFormViewItemD0Ev @ 21 NONAME
-	_ZN27SecCodeEditDataFormViewItemD1Ev @ 22 NONAME
-	_ZN27SecCodeEditDataFormViewItemD2Ev @ 23 NONAME
-	_ZNK15SecCodeSettings10metaObjectEv @ 24 NONAME
-	_ZNK15SecCodeSettings14pinCodeRequestEv @ 25 NONAME
-	_ZNK27SecCodeEditDataFormViewItem10metaObjectEv @ 26 NONAME
-	_ZNK27SecCodeEditDataFormViewItem16canSetModelIndexERK11QModelIndex @ 27 NONAME
-	_ZTI15SecCodeSettings @ 28 NONAME
-	_ZTI27SecCodeEditDataFormViewItem @ 29 NONAME
-	_ZTV15SecCodeSettings @ 30 NONAME
-	_ZTV27SecCodeEditDataFormViewItem @ 31 NONAME
-	_ZThn16_N27SecCodeEditDataFormViewItemD0Ev @ 32 NONAME
-	_ZThn16_N27SecCodeEditDataFormViewItemD1Ev @ 33 NONAME
-	_ZThn8_N27SecCodeEditDataFormViewItemD0Ev @ 34 NONAME
-	_ZThn8_N27SecCodeEditDataFormViewItemD1Ev @ 35 NONAME
-
--- a/controlpanelui/src/inc/cpringtoneview.h	Wed Jun 23 18:13:38 2010 +0300
+++ b/controlpanelui/src/inc/cpringtoneview.h	Tue Jul 06 14:17:10 2010 +0300
@@ -36,7 +36,7 @@
    void selError(  int errorCode, const QString& errorMessage );
 
 private slots:
-    void onTypeSelected( HbListWidgetItem *item );
+    void itemActivated( const QModelIndex &index );
     void handleOk(const QVariant &result);
     void handleError(int errorCode, const QString& errorMessage);
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/tonefetcher/inc/tonefetcherlog.conf	Tue Jul 06 14:17:10 2010 +0300
@@ -0,0 +1,7 @@
+[ToneFetcher]
+logdatetime = 1
+logloggername = 1
+datetimeformat = hh:mm:ss:zzz
+output = debugoutput fileoutput
+fileoutput/logfile = C:/data/logs/tonefetcher.log
+fileoutput/truncate = 1
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/tonefetcher/inc/tonefetcherlogger.h	Tue Jul 06 14:17:10 2010 +0300
@@ -0,0 +1,39 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "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:
+ * Nokia Corporation - initial contribution.
+ * 
+ * Contributors:
+ * 
+ * Description:
+ *     The header file for tone fetcher utilities.
+ *     
+ */
+
+#ifndef TONEFETCHERLOGGER_H
+#define TONEFETCHERLOGGER_H
+
+#include <QLatin1String>
+#include <logger.h>
+
+#define TONEFETCHER_LOGGER_NAME       QLatin1String("ToneFetcher")
+
+#if defined (Q_OS_SYMBIAN)
+    #define TF_LOGGER_CONFIG_PATH QLatin1String("C:/data/.config/tonefetcherlog.conf")
+#elif defined (Q_WS_WIN)
+    #ifdef _DEBUG
+        #define TF_LOGGER_CONFIG_PATH QLatin1String("C:/controlpanel/debug/bin/tonefetcherlog.conf")
+    #else 
+        #define TF_LOGGER_CONFIG_PATH QLatin1String("C:/controlpanel/release/bin/tonefetcherlog.conf")
+    #endif
+#endif
+
+#define TF_LOG(str)   Logger::instance(TONEFETCHER_LOGGER_NAME)->log(str);
+
+#endif /* TONEFETCHERLOGGER_H */
--- a/controlpanelui/src/tonefetcher/inc/tonefetcherutils.cpp	Wed Jun 23 18:13:38 2010 +0300
+++ b/controlpanelui/src/tonefetcher/inc/tonefetcherutils.cpp	Tue Jul 06 14:17:10 2010 +0300
@@ -15,6 +15,7 @@
  *     The source file for tone fetcher utilities.
  *     
  */
+
 #include "tonefetcherutils.h"
 #include <QDir>
 #include <QChar>
--- a/controlpanelui/src/tonefetcher/inc/tonefetcherutils.h	Wed Jun 23 18:13:38 2010 +0300
+++ b/controlpanelui/src/tonefetcher/inc/tonefetcherutils.h	Tue Jul 06 14:17:10 2010 +0300
@@ -15,6 +15,7 @@
  *     The header file for tone fetcher utilities.
  *     
  */
+
 #ifndef TONEFETCHERUTILS_H
 #define TONEFETCHERUTILS_H
 
@@ -23,7 +24,7 @@
 class ToneFetcherUtils
 {
 public:
-     
+    //replace '/' and '\' with QDir::separator()
     static QString normalizeSeperator(const QString &path);
 };
 
--- a/controlpanelui/src/tonefetcher/src/main.cpp	Wed Jun 23 18:13:38 2010 +0300
+++ b/controlpanelui/src/tonefetcher/src/main.cpp	Tue Jul 06 14:17:10 2010 +0300
@@ -19,10 +19,17 @@
 #include "tonefetcher.h"
 #include "tonefetchermainwindow.h"
 #include <hbapplication.h>
+#include <tonefetcherlogger.h>
 
 int main(int argc, char *argv[])
 {
     HbApplication a(argc, argv);
+    
+    
+    Logger::instance(TONEFETCHER_LOGGER_NAME)->configure(
+            TF_LOGGER_CONFIG_PATH,QSettings::IniFormat);
+
+    TF_LOG("Entering tonefetcher.exe...");
     ToneFetcherMainWindow w;   
     w.show();
     return a.exec();
--- a/controlpanelui/src/tonefetcher/src/tonefetcher.cpp	Wed Jun 23 18:13:38 2010 +0300
+++ b/controlpanelui/src/tonefetcher/src/tonefetcher.cpp	Tue Jul 06 14:17:10 2010 +0300
@@ -22,7 +22,7 @@
 #include "tonefetcherutils.h"
 #include <QChar>
 #include <QDir>
-#include <cplogger.h>
+#include <tonefetcherlogger.h>
 
 ToneFetcher::ToneFetcher(HbMainWindow *mainWindow)
     : XQServiceProvider(QString("tonefetcher.com.nokia.symbian.IToneFetch"), mainWindow),
@@ -50,7 +50,7 @@
             mMainWindow->addView(toneView);
             mMainWindow->setCurrentView(toneView);            
         } else {
-            CPFW_LOG("ToneFetcher::fetch: ToneFetcherView failed to be created");
+            TF_LOG("ToneFetcher::fetch: ToneFetcherView failed to be created");
         }
     }
 }
@@ -66,8 +66,7 @@
 }
 
 void ToneFetcher::setSelectedPath(const QString & tonePath)
-{
-    QString path(ToneFetcherUtils::normalizeSeperator(tonePath));
-    mReturnValue.setValue(path);
+{    
+    mReturnValue.setValue(ToneFetcherUtils::normalizeSeperator(tonePath));
 }
 //End of File
--- a/controlpanelui/src/tonefetcher/src/tonefetcher.h	Wed Jun 23 18:13:38 2010 +0300
+++ b/controlpanelui/src/tonefetcher/src/tonefetcher.h	Tue Jul 06 14:17:10 2010 +0300
@@ -39,9 +39,15 @@
     bool isActive();
         
 public slots:
+    /*
+     * tone fetcher service's operation
+     */
     void fetch();
     
 private slots:
+    /*
+     * set the selected tone's path to be the return value
+     */
     void setSelectedPath(const QString &tonePath);
 
 private:
--- a/controlpanelui/src/tonefetcher/src/tonefetchermainwindow.cpp	Wed Jun 23 18:13:38 2010 +0300
+++ b/controlpanelui/src/tonefetcher/src/tonefetchermainwindow.cpp	Tue Jul 06 14:17:10 2010 +0300
@@ -30,11 +30,4 @@
 {
     delete mToneFetcher;
 }
-
-void ToneFetcherMainWindow::quit()
-{
-    connect(mToneFetcher, SIGNAL(returnValueDelivered()), qApp, SLOT(quit()));
-    mToneFetcher->complete();   
-}
-
 //End of File
--- a/controlpanelui/src/tonefetcher/src/tonefetchermainwindow.h	Wed Jun 23 18:13:38 2010 +0300
+++ b/controlpanelui/src/tonefetcher/src/tonefetchermainwindow.h	Tue Jul 06 14:17:10 2010 +0300
@@ -30,8 +30,6 @@
     explicit ToneFetcherMainWindow(QWidget *parent = 0);
     virtual ~ToneFetcherMainWindow();
     
-public slots:
-    void quit();
 private:
     ToneFetcher *mToneFetcher;
 };
--- a/controlpanelui/src/tonefetcher/src/tonefetchermodel.cpp	Wed Jun 23 18:13:38 2010 +0300
+++ b/controlpanelui/src/tonefetcher/src/tonefetchermodel.cpp	Tue Jul 06 14:17:10 2010 +0300
@@ -15,9 +15,11 @@
  *     The source file for tone list model
  */
 #include "tonefetchermodel.h"
+#include <QFileInfo>
+#include <QtAlgorithms>
 
 ToneFetcherModel::ToneFetcherModel(QObject *parent) 
-    : QStandardItemModel(parent)
+    : QStringListModel(parent)
 {
 }
 
@@ -27,75 +29,37 @@
 
 QVariant ToneFetcherModel::data(const QModelIndex &index, int role) const
 {
-    if (role == Qt::UserRole) {
-        return  mUserDataLst.at(index.row());
+    if (role == Qt::DisplayRole) {
+        return  QFileInfo(QStringListModel::data(index, role).toString()).baseName();        
     } else {
-        return QStandardItemModel::data(index, role);
-    }    
+        return QStringListModel::data(index, role);
+    }
 }
 
-void ToneFetcherModel::insertInOrder(QStandardItem *fileName, QStandardItem *filePath, int role)
-{
-    QString name = fileName->text();
-    QString path = filePath->text();
-    int index = this->insertIndex(0, rowCount(), name);
-    
-    mUserDataLst.insert(index, path);
-    QStandardItemModel::insertRow(index, fileName);
-}
-
-QString ToneFetcherModel::path(const QModelIndex &index) const
-{
-    QString str =  data(index, Qt::UserRole).toString();
-    return str;
+QString ToneFetcherModel::getPath(const QModelIndex &index) const
+{    
+    return  QStringListModel::data(index, Qt::DisplayRole).toString();
 }
 
-int ToneFetcherModel::insertIndex(int low, int high,  QString value)
+void ToneFetcherModel::sort()
 {
-    if (low == high) {
-        return low;   
-    }
-    int middle = (low + high - 1)/2;
-    QModelIndex lowItemIndex = ((QStandardItemModel *)this)->index(low, 0);
-    QModelIndex highItemIndex = ((QStandardItemModel *)this)->index(high - 1, 0);
-    QModelIndex middleItemIndex = (( QStandardItemModel *)this)->index(middle, 0);
-    QString lowString = data(lowItemIndex).toString();
-    QString highString = data(highItemIndex).toString();
-    QString middleString = data(middleItemIndex).toString();
-    
-    if (value >= highString) {
-        return high;
-    }
-    if (value < lowString) {
-        return low;
-    }
-    high = high - 1;
-    while (low < high) {
-        middle = (low + high)/2;
-        middleItemIndex = ((QStandardItemModel *)this)->index(middle, 0);
-        middleString = data(middleItemIndex).toString();
-        if (value >= middleString) {
-            low = middle + 1;
-        } else {
-            high = middle;
-        }        
-    }
-    return low;
+    QStringList list = stringList();
+    qStableSort(list.begin(), list.end(), caseSensitiveLessThan);   
+    removeRows(0, rowCount());
+    setStringList(list);
+}
+void ToneFetcherModel::layoutToBeChanged()
+{
+    emit layoutAboutToBeChanged();
 }
 
-void ToneFetcherModel::refresh()
+void ToneFetcherModel::layoutHasChanged()
 {
     emit layoutChanged();
 }
 
-void ToneFetcherModel::toBeFreshed()
+bool ToneFetcherModel::caseSensitiveLessThan(const QString &s1, const QString &s2)
 {
-    emit layoutAboutToBeChanged();
-}
-
-void ToneFetcherModel::clearAll()
-{
-    mUserDataLst.clear();
-    QStandardItemModel::clear();
+    return QFileInfo(s1).baseName().toLower() < QFileInfo(s2).baseName().toLower();
 }
 //End of File
--- a/controlpanelui/src/tonefetcher/src/tonefetchermodel.h	Wed Jun 23 18:13:38 2010 +0300
+++ b/controlpanelui/src/tonefetcher/src/tonefetchermodel.h	Tue Jul 06 14:17:10 2010 +0300
@@ -19,41 +19,31 @@
 #ifndef TONEFETCHERMODEL_H
 #define TONEFETCHERMODEL_H
 
-#include <QStandardItemModel>
+#include <QStringListModel>
 #include <QStringList>
 
 // CLASS DECLARATION
 /**
  *  This class is used for storing tone list items.
- *  inherited from QStandardItemModel so that many existing functions could be used.
+ *  inherited from QStringListModel so that many existing functions could be used.
  *
  */
-class ToneFetcherModel : public QStandardItemModel
+class ToneFetcherModel : public QStringListModel
 {
 public:
     explicit ToneFetcherModel( QObject *parent );
     virtual ~ToneFetcherModel();
-    //from QAbstractItemModel
-    QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
-    void insertInOrder(QStandardItem *fileName, QStandardItem *filePath, int role = Qt::DisplayRole);    
-    QString path(const QModelIndex &index) const;
-    void refresh();
-    void toBeFreshed();
-    void clearAll();
-private:
-    /*
-     * binary search (ascendant) for the correct index to insert.
-     * @param low the start of search
-     * @param high the end of search.
-     * @return the correct index
-     */
-    int insertIndex(int low, int high, QString variant);
-    
-    /*
-     * save the absolute path of the tone.
-     */
-    QStringList mUserDataLst;   
-    
+    //from QStringListModel
+    QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;        
+    QString getPath(const QModelIndex &index) const;
+    //sort the list
+    void sort();
+    //sort method
+    bool static caseSensitiveLessThan(const QString &s1, const QString &s2);
+    //emit the signal of layoutToBeChanged();
+    void layoutToBeChanged();
+    //emit the signal of layoutChanged();
+    void layoutHasChanged();
 };
 
-#endif /* TONEFETCHERMODEL_H_ */
+#endif /* TONEFETCHERMODEL_H */
--- a/controlpanelui/src/tonefetcher/src/tonefetcherview.cpp	Wed Jun 23 18:13:38 2010 +0300
+++ b/controlpanelui/src/tonefetcher/src/tonefetcherview.cpp	Tue Jul 06 14:17:10 2010 +0300
@@ -46,9 +46,9 @@
 }
 
 void ToneFetcherView::quit()
-{
+{    
+    connect(mServiceProvider, SIGNAL(returnValueDelivered()), qApp, SLOT(quit()));
     mServiceProvider->complete();
-    connect(mServiceProvider, SIGNAL(returnValueDelivered()), qApp, SLOT(quit()));    
 }
 
 void ToneFetcherView::initToolBar()
@@ -77,10 +77,12 @@
 }
 
 void ToneFetcherView::on_rightAction_triggered()
-{
-    QString path(mWidget->getCurrentItemPath());    
-    emit itemSelected(path);
+{       
+    emit itemSelected(mWidget->getCurrentItemPath());
     quit();
+    /*QDir dir("c:\\data\\Sounds\\Simple\\");
+    dir.remove("def.aac");
+    dir.remove("abc.aac");   */ 
 }
 
 void ToneFetcherView::enableToolBar(bool enable)
--- a/controlpanelui/src/tonefetcher/src/tonefetcherview.h	Wed Jun 23 18:13:38 2010 +0300
+++ b/controlpanelui/src/tonefetcher/src/tonefetcherview.h	Tue Jul 06 14:17:10 2010 +0300
@@ -33,6 +33,10 @@
     explicit ToneFetcherView(ToneFetcher *service);
     ~ToneFetcherView();
     void quit();
+
+signals:
+        void itemSelected(const QString &path);
+        
 private:
     void initMainWidget();
     void initToolBar();
@@ -46,9 +50,6 @@
     void on_rightAction_triggered();
     void enableToolBar(bool enable);
     
-signals:
-    void itemSelected(const QString &path);    
-    
 private:
     ToneFetcherWidget *mWidget;
     ToneFetcher *mServiceProvider; //not own
@@ -56,4 +57,4 @@
     HbAction *mToolBarRightAction;
     };
 
-#endif /* TONEFETCHERVIEW_H_ */
+#endif /* TONEFETCHERVIEW_H */
--- a/controlpanelui/src/tonefetcher/src/tonefetcherwidget.cpp	Wed Jun 23 18:13:38 2010 +0300
+++ b/controlpanelui/src/tonefetcher/src/tonefetcherwidget.cpp	Tue Jul 06 14:17:10 2010 +0300
@@ -46,26 +46,21 @@
       mServiceEngine(0),
       mWaitNote(0)
       
-{
-    mSelected = false;
+{    
     init();
     connect(mServiceEngine, SIGNAL(mdeSessionOpened()), 
             this, SLOT(mdeSessionOpened()));
     connect(mServiceEngine, SIGNAL(mdeSessionError(int)),
             this, SLOT(mdeSessionError(int)));
-    connect(mServiceEngine, SIGNAL(queryComplete(QStringList, QStringList)), 
-            this, SLOT(queryComplete(QStringList, QStringList)));
+    connect(mServiceEngine, SIGNAL(queryComplete(QStringList)), 
+            this, SLOT(queryComplete(QStringList)));
     connect(mServiceEngine, SIGNAL(queryError(int)), 
             this, SLOT(queryError(int)));
     connect(mServiceEngine, 
-           SIGNAL(notifyPreviewEvent(ToneServiceEngine::TPreviewEvent, int)), 
-           this, SLOT(previewEvent(ToneServiceEngine::TPreviewEvent, int)));
+           SIGNAL(notifyPreviewEvent(int)), 
+           this, SLOT(previewEvent(int)));
     connect( mServiceEngine, SIGNAL(notifyObjectChanged()),
             this, SLOT(onObjectChanged()));
-    connect( mServiceEngine, SIGNAL(notifyRefreshStart()),
-                this, SLOT(refreshStart()));
-    connect( mServiceEngine, SIGNAL(notifyRefreshFinish()),
-                this, SLOT(refreshFinish()));
 }
 
 ToneFetcherWidget::~ToneFetcherWidget()
@@ -78,38 +73,28 @@
 
 void ToneFetcherWidget::on_list_activated(const QModelIndex &index)
 {  
-    QModelIndexList modelIndexList = mListView->selectionModel()->selectedIndexes();
-    
     //stop previewing when clicking another item.
-    if (mServiceEngine->IsPlaying()) {
-        mServiceEngine->stop();
+    if (mServiceEngine->isPlaying()) {
+        mServiceEngine->stopPlaying();
     }
     /*
      * when one item is selected, reselecting it will deselect it. selecting another 
      * will also deselect it, while the other is selected.
      */
-    if (mSelected){
-        if(mOldSeletedItem != index) {
-            mListView->selectionModel()->select(index, QItemSelectionModel::Select);
-            mOldSeletedItem = index;
-            emit triggerToolBar(true);
-        } else {
-            mListView->selectionModel()->select(index, QItemSelectionModel::Deselect);
-            mSelected = false;
-            emit triggerToolBar(false);
-        }        
-        return;
+    QItemSelectionModel *selectionModel = mListView->selectionModel();        
+    if (mOldSeletedItem == index) {
+        selectionModel->select(index,QItemSelectionModel::Toggle);
     }
-    if (modelIndexList.count() > 0) {
-        for (QModelIndexList::const_iterator it = modelIndexList.begin(); it != modelIndexList.end(); ++it) {
-            if ((*it) == index) {
-                mSelected = true;
-                mOldSeletedItem = index;
-                emit triggerToolBar(true);
-            }            
-        }
-        
-    }   
+    
+    QModelIndexList modelIndexList = selectionModel->selectedIndexes();
+    if (modelIndexList.isEmpty()) {
+        mOldSeletedItem = QModelIndex();
+    }
+    else {
+        mOldSeletedItem = modelIndexList.front();
+    }
+    emit triggerToolBar(selectionModel->hasSelection());
+
     
 }
 
@@ -129,8 +114,9 @@
     mListView->setSelectionMode(HbAbstractItemView::SingleSelection);
      
     mServiceEngine = new ToneFetcherEngine(this);     
-    mToneModel = new ToneFetcherModel(this);
-    addRomFiles();
+    mToneModel = new ToneFetcherModel(this);    
+    
+    initRomSoundList();    
     
     connect(mListView, SIGNAL(activated(QModelIndex)),
         this, SLOT(on_list_activated(QModelIndex )));
@@ -144,23 +130,19 @@
 
 void ToneFetcherWidget::mdeSessionOpened()
 {
-    mServiceEngine->getTone();
+    mServiceEngine->getTones();
 }
 
-void ToneFetcherWidget::queryComplete(const QStringList &nameList, const QStringList &uriList)
+void ToneFetcherWidget::queryComplete(const QStringList &uriList)
 {
-    QStandardItem *fileName = 0;
-    QStandardItem *filePath = 0; 
-    for (int i = 0; i < nameList.size(); ++i) { 
-        QString tr1 = nameList.at(i);
-        tr1 = uriList.at(i);
-        fileName = new QStandardItem(nameList.at(i));
-        filePath = new QStandardItem(uriList.at(i));
-        mToneModel->insertInOrder(fileName, filePath);       
-    }   
-    mLabel->setPlainText(QString::number(mSimpleSoundList.size() + mDigitalSoundList.size() + nameList.size()) + " tones");
-    mListView->setModel(mToneModel);
-    mToneModel->refresh();
+    addFilesFromMDE(uriList);
+    addFilesFromRom();
+    mToneModel->sort();
+    mToneModel->layoutHasChanged();
+    if (!mListView->model()) {    
+        mListView->setModel(mToneModel);
+    }
+    refreshFinish();
 }
 
 void ToneFetcherWidget::queryError(int error)
@@ -178,27 +160,27 @@
 {
     QModelIndexList modelIndexList = mListView->selectionModel()->selectedIndexes();
     if (modelIndexList.count() > 0) {
-        QModelIndex index = modelIndexList.at(0);
-        return mToneModel->data(index, Qt::UserRole).toString();
+        QModelIndex index = modelIndexList.front();
+        QString path = mToneModel->getPath(index);
+        return path;
     }
     return QString();
 }
 
 void ToneFetcherWidget::playOrPause() 
 {
-    if(mServiceEngine->IsPlaying()) {
-        mServiceEngine->stop();
+    if(mServiceEngine->isPlaying()) {
+        mServiceEngine->stopPlaying();
     } else {    
-    mServiceEngine->preview(getCurrentItemPath());
+        mServiceEngine->play(getCurrentItemPath());
     }
     
 }
 
-void ToneFetcherWidget::previewEvent(ToneFetcherEngine::TPreviewEvent event, int errorId) 
+void ToneFetcherWidget::previewEvent(int event) 
 {
-    Q_UNUSED(errorId);
-    if (event == ToneFetcherEngine::EAudioPreviewComplete) {
-        //reserved
+    if (event == 0) {
+        //preview successful, reserved
     } else {
         HbMessageBox::information(QString(hbTrId("Preview Error")));
     }
@@ -206,41 +188,33 @@
 
 void ToneFetcherWidget::onObjectChanged()
 {
-    if (mServiceEngine->IsPlaying()) {
-        mServiceEngine->stop();      
+    refreshStart();
+    if (mServiceEngine->isPlaying()) {
+        mServiceEngine->stopPlaying();      
     }
-    emit triggerToolBar(false);
-    mToneModel->toBeFreshed();
-    mToneModel->clearAll();
-    mDigitalSoundList.clear();
-    mSimpleSoundList.clear();
-    addRomFiles();
-    mServiceEngine->getTone();    
+    mToneModel->layoutToBeChanged();
+    emit triggerToolBar(false);    
+    mToneModel->removeRows(0, mToneModel->rowCount());           
+    mServiceEngine->getTones();    
 }
 
-void ToneFetcherWidget::addRomFiles() 
-{
-    QStandardItem *fileName = 0;
-    QStandardItem *filePath = 0;
-    QDir digitalSoundPath(XQUtils::romRootPath() + XQUtils::digitalSoundsPath());
-    mDigitalSoundList = digitalSoundPath.entryInfoList();  
-           
-    QDir simpleSoundPath(XQUtils::romRootPath() + XQUtils::simpleSoundsPath());
-    mSimpleSoundList = simpleSoundPath.entryInfoList();
+void ToneFetcherWidget::addFilesFromRom() 
+{     
+    int currentCount = mToneModel->rowCount();
+    mToneModel->insertRows(currentCount, mRomSoundList.size());
+    for (int i = 0; i < mRomSoundList.size(); ++i) {
+        mToneModel->setData(mToneModel->index(i + currentCount), 
+            QFileInfo(mRomSoundList.at(i)).absoluteFilePath());
+    }  
+}
 
-    for (int i = 0; i < mDigitalSoundList.size(); ++i) {
-        QFileInfo fileInfo = mDigitalSoundList.at(i);        
-        fileName = new QStandardItem(fileInfo.fileName());
-        filePath = new QStandardItem(fileInfo.absoluteFilePath());
-        mToneModel->insertInOrder(fileName, filePath);
-    }
-      
-    for (int i = 0; i < mSimpleSoundList.size(); ++i) {
-        QFileInfo fileInfo = mSimpleSoundList.at(i);       
-        fileName = new QStandardItem(fileInfo.fileName());
-        filePath = new QStandardItem(fileInfo.absoluteFilePath());
-        mToneModel->insertInOrder(fileName, filePath);  
-    }
+void ToneFetcherWidget::addFilesFromMDE(const QStringList &uriList)
+{
+    int currentCount = mToneModel->rowCount();
+    mToneModel->insertRows(currentCount, uriList.size());
+    for (int i = 0; i < uriList.size(); ++i) {
+        mToneModel->setData(mToneModel->index(i + currentCount), QFileInfo(uriList.at(i)).absoluteFilePath());
+    }   
 }
 
 void ToneFetcherWidget::refreshFinish()
@@ -256,4 +230,11 @@
         mWaitNote->open();
     }
 }
+
+void ToneFetcherWidget::initRomSoundList()
+{
+    QDir digitalSoundPath(XQUtils::romRootPath() + XQUtils::digitalSoundsPath());
+    QDir simpleSoundPath(XQUtils::romRootPath() + XQUtils::simpleSoundsPath());
+    mRomSoundList = digitalSoundPath.entryInfoList() + simpleSoundPath.entryInfoList();
+}
 //End of File
--- a/controlpanelui/src/tonefetcher/src/tonefetcherwidget.h	Wed Jun 23 18:13:38 2010 +0300
+++ b/controlpanelui/src/tonefetcher/src/tonefetcherwidget.h	Tue Jul 06 14:17:10 2010 +0300
@@ -48,22 +48,25 @@
     void itemClicked(const QString &item);
     void triggerToolBar(bool enable);
     
+    
+private:
+    void init();
+    void addFilesFromRom();
+    void initRomSoundList();
+    void addFilesFromMDE(const QStringList &uriList);
+    
 private slots:
     void on_list_activated(const QModelIndex &index);    
     void mdeSessionOpened();
     void mdeSessionError(int error);
-    void queryComplete(const QStringList &nameList, const QStringList &uriList);
+    void queryComplete(const QStringList &uriList);
     void queryError(int error );
-    void previewEvent(ToneFetcherEngine::TPreviewEvent event, int errorId);
+    void previewEvent(int event);
     void onObjectChanged();
     void refreshFinish();
     void refreshStart();
     
 private:
-    void init();
-    void addRomFiles();
-    
-private:
     HbLabel *mLabel;
     HbListView *mListView;
     QGraphicsLinearLayout *mLayout;
@@ -72,10 +75,8 @@
     ToneFetcherView *mServiceView;
     ToneFetcherEngine *mServiceEngine;
     
-    QFileInfoList mSimpleSoundList;
-    QFileInfoList mDigitalSoundList;    
-    bool mSelected;
+    QFileInfoList mRomSoundList;    
     QModelIndex mOldSeletedItem;
     HbProgressDialog *mWaitNote;
 };
-#endif /* TONEFETCHERWIDGET_H_ */
+#endif /* TONEFETCHERWIDGET_H */
--- a/controlpanelui/src/tonefetcher/tonefetcher.pri	Wed Jun 23 18:13:38 2010 +0300
+++ b/controlpanelui/src/tonefetcher/tonefetcher.pri	Tue Jul 06 14:17:10 2010 +0300
@@ -32,12 +32,20 @@
            src/main.cpp 
 
 symbian {
-    HEADERS +=  tonefetcherengine/private/symbian/toneselectionengine_p.h \
-                tonefetcherengine/private/symbian/tonepreviewprivate.h
+    HEADERS +=  tonefetcherengine/private/CTonePlayer.h \
+                tonefetcherengine/private/CToneSelection.h \
+                tonefetcherengine/private/MTonePlayingWatcher.h \
+                tonefetcherengine/private/MToneSelectionWatcher.h \
+                tonefetcherengine/private/tonefetcherengine_symbian.h
+                
 
 
-    SOURCES += tonefetcherengine/private/symbian/toneselectionengine_p.cpp \
-               tonefetcherengine/private/symbian/tonepreviewprivate.cpp
+    SOURCES += tonefetcherengine/private/CTonePlayer.cpp \
+               tonefetcherengine/private/CToneSelection.cpp \
+               tonefetcherengine/private/tonefetcherengine_symbian.cpp
+} else {
+    HEADERS +=  tonefetcherengine/private/tonefetcherengine_stub.h
+    SOURCES += tonefetcherengine/private/tonefetcherengine_stub.cpp
 }
 
 
--- a/controlpanelui/src/tonefetcher/tonefetcher.pro	Wed Jun 23 18:13:38 2010 +0300
+++ b/controlpanelui/src/tonefetcher/tonefetcher.pro	Tue Jul 06 14:17:10 2010 +0300
@@ -39,7 +39,10 @@
             -lDrmHelper \
             -ldrmutility \
             -lapmime \
-            -lecom
+            -lecom \
+            -lcone \
+            -lapgrfx
+
             TARGET.UID3 = 0x2002BCCA
             TARGET.CAPABILITY = ALL -TCB
             BLD_INF_RULES.prj_exports += "./service_conf.xml z:/private/2002BCCA/service_conf.xml"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/tonefetcher/tonefetcherengine/private/CTonePlayer.cpp	Tue Jul 06 14:17:10 2010 +0300
@@ -0,0 +1,626 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "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:
+ * Nokia Corporation - initial contribution.
+ * 
+ * Contributors:
+ * 
+ * Description:
+ *     The source file for tone playing.
+ *     
+ */
+#include "CTonePlayer.h"
+#include "tonefetcherutils.h"
+#include <AudioPreference.h>             // KAudioPriorityPreview
+#include <c3dringingtoneinterface.h>     // C3DRingingToneInterface
+#include <ctsydomainpskeys.h>            // for phone call states
+#include <MProfileEngine.h>
+#include <MProfile.h>
+#include <MProfileTones.h>
+#include "TProfileToneSettings.h"
+#include <MProfileExtraSettings.h>
+#include <MProfile3DToneSettings.h>
+#include <ProfileInternal.hrh>
+#include <ProfileEngineDomainCRKeys.h>   // KProEngDefaultRingingTone
+#include "MTonePlayingWatcher.h"
+
+
+CMFPreviewHandlerBase::CMFPreviewHandlerBase()
+    {
+    iMediaType = KErrNotFound;
+    iRingingVolume = KErrNotFound;
+    iRingingType = KErrNotFound;
+    iVibra = KErrNotFound;
+    i3DEffect = KErrNotFound;
+    i3DEcho = KErrNotFound;
+    iFileSize = KErrNotFound;    
+    iFullName = 0;    
+    iActiveProfileRead = EFalse;
+    iPlayerStatus = EPlayerNotCreated;
+
+    }
+
+void CMFPreviewHandlerBase::ConstructL()
+    {
+    // To allow/not allow screensaver
+    // Errors ignored, no actions needed if API is not available
+    //iProperty.Attach( KPSUidScreenSaver, KScreenSaverAllowScreenSaver );    
+    TRAP_IGNORE(User::LeaveIfError( iApaSession.Connect() ) );
+    
+    TRAP_IGNORE( ReadDefaultToneL() );
+    // To keep backlight on while a video is being previewed
+    iBacklightTimer = CPeriodic::NewL( EPriorityLow );
+    }
+
+CMFPreviewHandlerBase::~CMFPreviewHandlerBase()
+    {
+    delete iFullName;
+    iProperty.Close();
+    
+    iApaSession.Close();
+    }
+
+void CMFPreviewHandlerBase::SetAttrL( const TDesC& aFileName )
+    {
+    if ( aFileName.Length() )
+        {        
+        delete iFullName;
+        iFullName = 0;
+        iFullName = aFileName.AllocL();      
+        }
+    }
+
+TInt CMFPreviewHandlerBase::RingingVolume()
+    {
+    const TInt KDefaultVolumeLevel = 7; // see profile.hrh for volume levels
+    
+    if ( iRingingVolume != KErrNotFound )
+        {
+        return iRingingVolume;
+        }
+        
+    if ( iActiveProfileRead )
+        {
+        return iActiveProfileRingingVolume;
+        }
+
+    return KDefaultVolumeLevel;
+    }
+
+TInt CMFPreviewHandlerBase::RingingType()
+    {
+    if ( iRingingType != KErrNotFound )
+        {
+        return iRingingType;
+        }
+        
+    if ( iActiveProfileRead )
+        {
+        return iActiveProfileRingingType;
+        }
+
+    return ERingingTypeRinging;
+    }
+
+TInt CMFPreviewHandlerBase::Vibra()
+    {
+    if ( iVibra != KErrNotFound )
+        {
+        return iVibra;
+        }
+        
+    if ( iActiveProfileRead )
+        {
+        return iActiveProfileVibra;
+        }
+    
+    return 0;  // in case of error vibra is off
+    }
+
+TInt CMFPreviewHandlerBase::Echo3D()
+    {
+    if ( i3DEcho != KErrNotFound )
+        {
+        return i3DEcho;
+        }
+    
+    if ( iActiveProfileRead )
+        {
+        return iActiveProfile3DEcho;
+        }
+
+    return EProfile3DEchoOff;  // from ProfileInternal.hrh
+    }
+
+TInt CMFPreviewHandlerBase::Effect3D()
+    {
+    if ( i3DEffect != KErrNotFound )
+        {
+        return i3DEffect;
+        }
+    
+    if ( iActiveProfileRead )
+        {
+        return iActiveProfile3DEffect;
+        }
+
+    return EProfile3DEffectOff;
+    }
+
+TInt CMFPreviewHandlerBase::ConvertVolume( TInt aVolume, TInt aMaxVolume )
+    {
+    const TInt KMinVolumeLevel = 1;
+    const TInt KMaxVolumeLevel = 10;
+        
+    TInt result = aMaxVolume * aVolume / KMaxVolumeLevel;
+    
+    // if user has selected minimum volume level set HW volume 1
+    if ( aVolume == KMinVolumeLevel && result == 0 )
+        {
+        result = 1;
+        }
+
+    return result;
+    }
+  
+void CMFPreviewHandlerBase::ReadActiveProfileL()
+    {
+    iActiveProfileRead = EFalse;
+    
+    MProfileEngine* profileEngine = CreateProfileEngineL();
+    CleanupReleasePushL( *profileEngine );
+    
+    MProfile* activeProfile  = profileEngine->ActiveProfileL();
+    CleanupReleasePushL( *activeProfile );
+        
+    const MProfileTones& profileTones = activeProfile->ProfileTones();
+     
+    const TProfileToneSettings& toneSettings = profileTones.ToneSettings();
+    iActiveProfileVibra = toneSettings.iVibratingAlert;
+    iActiveProfileRingingVolume = toneSettings.iRingingVolume;
+    iActiveProfileRingingType = toneSettings.iRingingType;
+          
+    const MProfileExtraSettings& extra = activeProfile->ProfileExtraSettings();
+    const MProfile3DToneSettings& threeD = extra.Profile3DToneSettings();
+    
+    iActiveProfile3DEffect = threeD.Effect();
+    iActiveProfile3DEcho = threeD.Echo();
+   
+    CleanupStack::PopAndDestroy( activeProfile ); 
+    CleanupStack::PopAndDestroy( profileEngine );
+    
+    iActiveProfileRead = ETrue;
+    }
+ 
+void CMFPreviewHandlerBase::ReadDefaultToneL()
+    {
+    CRepository* cenrep = CRepository::NewLC( KCRUidProfileEngine );
+
+    User::LeaveIfError( cenrep->Get( KProEngDefaultRingingTone, iDefaultTone ) );
+    CleanupStack::PopAndDestroy( cenrep );
+    }
+
+TInt CMFPreviewHandlerBase::GetDataType( const TDesC& aFileName, TDataType& aDataType )
+    {
+    TUid dummyUid( KNullUid );
+    return iApaSession.AppForDocument( aFileName, dummyUid, aDataType );
+    }
+
+TInt CMFPreviewHandlerBase::DoResetInactivityTimer( TAny* /*aObject*/ )
+    {
+    User::ResetInactivityTime();
+    return KErrNone;
+    }
+
+void CMFPreviewHandlerBase::DisableBackLight()
+    {
+        const TInt KResetInactivityTimerDelay = 2000000;
+    iBacklightTimer->Cancel(); // Just in case
+    // Disable backlight turn off during video preview
+    iBacklightTimer->Start( KResetInactivityTimerDelay,
+                            KResetInactivityTimerDelay,
+                            TCallBack( DoResetInactivityTimer, 0 ) );
+    
+    }
+
+CTonePlayer* CTonePlayer::NewL( MTonePlayingWatcher *aWatcher )
+    {
+    CTonePlayer* self = CTonePlayer::NewLC( aWatcher );
+    CleanupStack::Pop();
+    return self;
+    }
+
+CTonePlayer* CTonePlayer::NewLC( MTonePlayingWatcher *aWatcher )
+    {
+    CTonePlayer* self = new ( ELeave ) CTonePlayer( aWatcher );
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    return self;
+    }
+
+void CTonePlayer::ConstructL()
+    {
+    iAudioPlayerStatus = EPlayerNotCreated;
+    CMFPreviewHandlerBase::ConstructL();
+    iTonePlayerStatus = EPlayerNotCreated;
+    CCoeEnv* coeEnv = CCoeEnv::Static();
+    coeEnv->AddForegroundObserverL( *this );
+    }
+
+CTonePlayer::CTonePlayer( MTonePlayingWatcher *aWatcher ) : iTonePlayWatcher( aWatcher )
+    {    
+    }
+
+CTonePlayer::~CTonePlayer()
+    {
+    Cancel();
+    
+    delete iAudioPlayer;
+    delete iTonePlayer;
+    delete i3dRingingTonePlugin;
+    }
+
+TBool CTonePlayer::IsPlaying()
+    {
+    if ( iAudioPlayerStatus != EPlayerNotCreated )
+        {
+        return ETrue;
+        }
+    
+    if ( iTonePlayerStatus != EPlayerNotCreated )
+        {
+        return ETrue;
+        }
+
+    return EFalse;
+    }
+
+void CTonePlayer::PlayL()
+    {    
+    //sequence for playing a beep once sound
+    _LIT8( KFileListBeepSequence, "\x00\x11\x06\x0A\x08\x73\x0A\x40\x28\x0A\xF7\
+    \x05\xFC\x40\x64\x0A\x08\x40\x32\x0A\xF7\x06\x0B" ); 
+
+    // rng mime type
+    _LIT( KFileListRngMimeType, "application/vnd.nokia.ringing-tone" );
+    
+    Cancel(); // stop previous play
+    
+    if ( !iFullName || iFullName->Des().Length() == 0 )
+        {
+        User::Leave( KErrNotFound );
+        }
+
+    TRAP_IGNORE( ReadActiveProfileL() );
+
+    TPtrC fileName( iFullName->Des() );
+    TDataType dataType;
+    TInt err = GetDataType( fileName, dataType );
+    if ( err == KErrNotFound )
+        {
+        fileName.Set( iDefaultTone );
+        if ( fileName.Length() == 0 )
+             {
+             User::Leave( KErrNotFound );
+             }
+        }
+    else if ( err != KErrNone )
+        {
+        User::Leave( err );
+        }
+        
+    TBool mimeTypeRng = EFalse;
+    
+    if ( err == KErrNone )
+        {
+        if( dataType.Des().CompareF( KFileListRngMimeType ) == 0 )
+            {
+            mimeTypeRng = ETrue;
+            }
+        }
+
+    TInt ringingType = RingingType();
+    if ( ringingType == ERingingTypeBeepOnce )
+        {
+        // Active profile ringing tone is set to Beep Once
+        // Don't initialize a FileSequence but use DesSequence instead
+        iTonePlayer = CMdaAudioToneUtility::NewL( *this );
+        iTonePlayer->PrepareToPlayDesSequence( KFileListBeepSequence() );
+        iTonePlayerStatus = EPlayerInitializing;
+        }
+    else
+        {
+        if( mimeTypeRng )
+            {
+            //Ringingtone is a RNG-file
+            iTonePlayer = CMdaAudioToneUtility::NewL( *this );
+            iTonePlayer->PrepareToPlayFileSequence( fileName );
+            iTonePlayerStatus = EPlayerInitializing;
+            }
+        else
+            {
+            delete iAudioPlayer;
+            iAudioPlayer = 0;
+
+            iAudioPlayer = CDrmPlayerUtility::NewFilePlayerL(
+                fileName, *this, KAudioPriorityRingingTonePreview,
+                ( TMdaPriorityPreference )KAudioPrefRingFilePreview );
+    
+            iAudioPlayerStatus = EPlayerInitializing;
+            }
+        }
+    DisableBackLight();
+    }
+
+void CTonePlayer::Stop()
+    {
+    Cancel();
+    }
+
+TInt CTonePlayer::ConvertVolume( TInt aVolume )
+    {
+    TInt result = 0;
+    if ( iAudioPlayer )
+        {
+        result = CMFPreviewHandlerBase::ConvertVolume( aVolume, iAudioPlayer->MaxVolume() );
+        }
+    else if ( iTonePlayer )
+        {
+        result = CMFPreviewHandlerBase::ConvertVolume( aVolume, iTonePlayer->MaxVolume() );
+        }
+        
+    //if user has selected silent ringing type, set volume off
+    TInt ringingType = RingingType();
+    if( ringingType == ERingingTypeSilent )
+        {
+        result = 0;
+        }
+
+    return result;
+    }
+
+void CTonePlayer::SetToneRingingType( TInt aRingingType )
+    {
+    const TInt KToneInterval = 1000000; // 1 second pause between tones
+    const TInt KAscendingVolumeInterval = 3000000; // 3 seconds
+    
+    if ( !iTonePlayer )
+        {
+        return;
+        }
+    TInt ringingVolume = RingingVolume();
+    
+    switch( aRingingType )
+        {
+        case ERingingTypeRinging:
+        case ERingingTypeSilent:
+            {
+            iTonePlayer->SetRepeats( KMdaAudioToneRepeatForever,
+                                     TTimeIntervalMicroSeconds( KToneInterval ) );
+            break;
+            }
+        case ERingingTypeAscending:
+            {
+            iTonePlayer->SetRepeats( KMdaAudioToneRepeatForever,
+                                     TTimeIntervalMicroSeconds( KToneInterval ) );
+            
+            TInt volRamp = KAscendingVolumeInterval * ringingVolume;
+            iTonePlayer->SetVolumeRamp( TTimeIntervalMicroSeconds( volRamp ) );
+            break;
+            }
+        case ERingingTypeRingOnce:
+        case ERingingTypeBeepOnce:
+            {
+            iTonePlayer->SetRepeats( 0, TTimeIntervalMicroSeconds( KToneInterval ) );
+            break;
+            }
+        default:
+            {
+            break;
+            }
+        }
+    }
+
+void CTonePlayer::SetAudioRingingType( TInt aRingingType )
+    {
+    const TInt KToneInterval = 1000000; // 1 second pause between tones
+    const TInt KAscendingVolumeInterval = 3000000; // 3 seconds
+    
+    if ( !iAudioPlayer )
+        {
+        return;
+        }
+
+    TInt ringingVolume = RingingVolume();
+        
+    switch( aRingingType )
+        {
+        case ERingingTypeRinging:
+        case ERingingTypeSilent:
+            {
+            iAudioPlayer->SetRepeats( KMdaAudioToneRepeatForever,
+                                      TTimeIntervalMicroSeconds( KToneInterval ) );
+            break;
+            }
+        case ERingingTypeAscending:
+            {
+            iAudioPlayer->SetRepeats( KMdaAudioToneRepeatForever,
+                                      TTimeIntervalMicroSeconds( KToneInterval ) );
+            TInt volRamp = KAscendingVolumeInterval * ringingVolume;
+            iAudioPlayer->SetVolumeRamp( TTimeIntervalMicroSeconds( volRamp ) );
+            break;
+            }
+        case ERingingTypeRingOnce:
+            {
+            iAudioPlayer->SetRepeats( 0, TTimeIntervalMicroSeconds( KToneInterval ) );
+            break;
+            }
+
+        default:
+            {
+            break;
+            }
+        }
+    }
+
+void CTonePlayer::Cancel()
+    {
+    TBool isPlaying = EFalse;
+    
+    if ( iAudioPlayer )
+        {
+        isPlaying = ETrue;
+        if ( iAudioPlayerStatus == EPlayerPlayingWith3DEffect )
+            {
+            i3dRingingTonePlugin->Stop();
+            // plugin calls AudioPlayer->Stop()
+            iAudioPlayer->Close();
+            }
+        if ( iAudioPlayerStatus == EPlayerPlaying )
+            {
+            iAudioPlayer->Stop();
+            iAudioPlayer->Close();
+            }
+        
+        delete iAudioPlayer;
+        iAudioPlayer = 0;
+        iAudioPlayerStatus = EPlayerNotCreated;
+        }
+    
+    if ( iTonePlayer )
+        {
+        isPlaying = ETrue;
+        if ( iTonePlayerStatus == EPlayerPlaying )
+            {
+            iTonePlayer->CancelPlay();
+            }
+        
+        delete iTonePlayer;
+        iTonePlayer = 0;
+        iTonePlayerStatus = EPlayerNotCreated;
+        }
+        
+
+    if ( isPlaying )
+        {
+        //User::InfoPrint(_L("cancel"));
+//        EnableScreenSaver( ETrue );
+        iBacklightTimer->Cancel();
+        }
+    }
+
+void CTonePlayer::MatoPlayComplete( TInt aError )
+    {
+    Cancel();
+    iTonePlayWatcher->HandlePreviewEvent( aError );
+    }
+
+void CTonePlayer::MatoPrepareComplete( TInt aError )
+    {
+    if ( aError != KErrNone )
+        {
+        Cancel();
+        
+        iTonePlayWatcher->HandlePreviewEvent( aError );
+        return;
+        }
+
+    TInt ringingVolume = RingingVolume();
+    TInt ringingType = RingingType();
+    TInt vibra = Vibra();
+       
+    iTonePlayerStatus = EPlayerInitialized;
+    SetToneRingingType( ringingType );
+    iTonePlayer->SetVolume( ConvertVolume( ringingVolume ) );
+    
+    TMdaPriorityPreference pref = (TMdaPriorityPreference) KAudioPrefRingFilePreview;               
+    if ( vibra )
+        {
+        pref = (TMdaPriorityPreference) KAudioPrefRingFilePreviewVibra;
+        }
+    iTonePlayer->SetPriority( KAudioPriorityPreview, pref );
+                                             
+    iTonePlayer->Play();
+    iTonePlayerStatus = EPlayerPlaying;
+    }
+
+void CTonePlayer::MdapcInitComplete( TInt aError, 
+                        const TTimeIntervalMicroSeconds& /* aDuration */ )
+    {
+    if ( aError != KErrNone )
+        {
+        Cancel();
+        iTonePlayWatcher->HandlePreviewEvent( aError );
+        return;
+        }
+        
+
+    TInt ringingVolume = RingingVolume();
+    TInt ringingType = RingingType();
+    TInt vibra = Vibra();
+    TInt echo3D = Echo3D();
+    TInt effect3D = Effect3D();
+
+    
+
+    iAudioPlayerStatus = EPlayerInitialized;
+    SetAudioRingingType( ringingType );
+    iAudioPlayer->SetVolume( ConvertVolume( ringingVolume ) );
+    
+    TMdaPriorityPreference pref = (TMdaPriorityPreference) KAudioPrefRingFilePreview;               
+    if ( vibra )
+        {
+        pref = (TMdaPriorityPreference) KAudioPrefRingFilePreviewVibra;
+        }
+    iAudioPlayer->SetPriority( KAudioPriorityPreview, pref );
+     
+    iAudioPlayerStatus = EPlayerPlaying;
+    
+    if ( effect3D == EProfile3DEffectOff )
+        {
+        iAudioPlayer->Play();  // 3D not used
+        return;
+        }
+
+    if ( !i3dRingingTonePlugin )
+        {
+        TUid emptyUid = { 0 };
+        TRAPD( err, i3dRingingTonePlugin = C3DRingingToneInterface::NewL( emptyUid ) );
+        if ( err != KErrNone || !i3dRingingTonePlugin )
+            {
+            iAudioPlayer->Play();
+            return;
+            }
+        }       
+   
+    i3dRingingTonePlugin->SetAttr( E3DRTIAttr3DEffect, effect3D );
+    i3dRingingTonePlugin->SetAttr( E3DRTIAttr3DEcho, echo3D );    
+    i3dRingingTonePlugin->SetAttr( E3DRTIAttrDrmPlayerUtility, iAudioPlayer );
+    TRAP_IGNORE( i3dRingingTonePlugin->PlayL() );
+
+    iAudioPlayerStatus = EPlayerPlayingWith3DEffect;
+    }
+
+void CTonePlayer::MdapcPlayComplete( TInt aError )
+    {  
+    Cancel();
+    iTonePlayWatcher->HandlePreviewEvent( aError );
+    }
+
+void CTonePlayer::HandleLosingForeground()
+    {
+    if ( IsPlaying() )
+        {
+        Stop();
+        }
+    }
+void CTonePlayer::HandleGainingForeground()
+    {
+    
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/tonefetcher/tonefetcherengine/private/CTonePlayer.h	Tue Jul 06 14:17:10 2010 +0300
@@ -0,0 +1,202 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "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:
+ * Nokia Corporation - initial contribution.
+ * 
+ * Contributors:
+ * 
+ * Description:
+ *     The header file for tone playing.
+ *     
+ */
+
+#ifndef CTONEPLAYER_H
+#define CTONEPLAYER_H
+
+#include <e32base.h>
+#include <coemain.h>
+#include <DrmAudioSamplePlayer.h>
+#include <mdaaudiotoneplayer.h>
+#include <videoplayer.h>
+#include <centralrepository.h>
+#include <apgcli.h>  // for RApaLsSession
+#include <e32property.h>
+
+class C3DRingingToneInterface;
+class RWindow;
+class MTonePlayingWatcher;
+/**
+* CMFPreviewHandlerBase
+*
+* Base class for CMFAudioPreviewHandler.
+ */
+class CMFPreviewHandlerBase : public CBase
+                        
+    {
+    public:     
+       enum TMediaFileType
+           {
+           EMediaFileTypeAudio = 0,
+           EMediaFileTypeVideo
+           };
+        enum TPlayerStatus
+            {
+            EPlayerNotCreated,
+            EPlayerInitializing,
+            EPlayerReady,
+            EPlayerPlaying,
+            EPlayerInitialized,
+            EPlayerPlayingWith3DEffect
+            };
+    
+        // these must match with the ones in Profile Engine
+        enum TRingingTypes
+            {
+            ERingingTypeRinging = 0,
+            ERingingTypeAscending,
+            ERingingTypeRingOnce,
+            ERingingTypeBeepOnce,
+            ERingingTypeSilent
+            };
+    
+        enum TFLAllowScreenSaver
+            {
+            EFLScreenSaverAllowed = 0, EFLScreenSaverNotAllowed
+            };
+    public:    
+        void SetAttrL(const TDesC& aFileName);    
+        TInt Attr(TInt aAttr);    
+        virtual void PlayL() = 0;
+        virtual void Stop() = 0;
+        virtual TBool IsPlaying() = 0;
+           
+    protected:    
+        virtual ~CMFPreviewHandlerBase();
+    
+    protected:    
+        /**
+         * C++ default constructor.
+         */
+        CMFPreviewHandlerBase( );    
+        /**
+         * By default Symbian OS constructor is private.
+         */
+        void ConstructL();
+     
+    protected:
+        TInt ConvertVolume(TInt aVolume);
+        void ReadActiveProfileL();
+        TInt GetDataType(const TDesC& aFileName, TDataType& aDataType);
+        void ReadDefaultToneL();   
+        void DisableBackLight();    
+        static TInt DoResetInactivityTimer(TAny* aObject);
+        TInt RingingVolume();
+        TInt RingingType();
+        TInt Vibra();
+        TInt Echo3D();
+        TInt Effect3D();
+        static TInt ConvertVolume(TInt aVolume, TInt aMaxVolume);    
+    
+    protected:
+        TInt iRingingVolume;
+        TInt iRingingType;
+        TInt iVibra;
+        TInt i3DEffect;
+        TInt i3DEcho;
+        TInt iMediaType;
+        TInt iFileSize;
+        HBufC* iFullName;    
+        TBool iActiveProfileRead;
+        TInt iActiveProfileRingingVolume;
+        TInt iActiveProfileRingingType;
+        TInt iActiveProfileVibra;
+        TInt iActiveProfile3DEffect;
+        TInt iActiveProfile3DEcho;    
+        TInt iPlayerStatus;    
+        // handle to window
+        RWindow* iWindow; // does not own    
+        // for getting file MIME types
+        RApaLsSession iApaSession;    
+        // for setting screensaver on/off
+        RProperty iProperty;    
+        // default ringing tone
+        TFileName iDefaultTone;        
+        /**
+         * Timer for resetting the user inactivity timeout
+         */
+        CPeriodic* iBacklightTimer;
+    };
+
+// CLASS DECLARATION
+/**
+ *  This class is used for playing the tones.
+ *
+ */
+
+class CTonePlayer : public CMFPreviewHandlerBase,
+                    public MDrmAudioPlayerCallback,
+                    public MMdaAudioToneObserver,
+                    public MCoeForegroundObserver
+    {
+    public:
+        static CTonePlayer* NewL( MTonePlayingWatcher *aWatcher );
+        static CTonePlayer* NewLC( MTonePlayingWatcher *aWatcher );
+        virtual ~CTonePlayer();   
+    
+        
+    public:
+        void PlayL();
+        void Stop();
+        TBool IsPlaying();
+    
+    private:
+        CTonePlayer( MTonePlayingWatcher *aWatcher );
+        void ConstructL();
+        void Cancel();
+        void SetAudioRingingType( TInt aRingingType );
+        void SetToneRingingType( TInt aRingingType );
+        TInt ConvertVolume( TInt aVolume );        
+            
+    private:
+        // from MMdaAudioToneObserver
+        virtual void MatoPrepareComplete( TInt aError );
+        virtual void MatoPlayComplete(TInt aError);
+    
+    private:
+        // from MDrmAudioPlayerCallback
+        void MdapcInitComplete(TInt aError,
+                const TTimeIntervalMicroSeconds& aDuration);
+        void MdapcPlayComplete(TInt aError);
+        
+        // from MCoeForegroundObserver
+        void HandleLosingForeground();
+        void HandleGainingForeground();
+    
+    private:
+        //wacher of the playing process
+        MTonePlayingWatcher* iTonePlayWatcher;
+        
+        // audio player
+        CDrmPlayerUtility* iAudioPlayer;
+    
+        /// Audioplayer status
+        TPlayerStatus iAudioPlayerStatus;
+    
+        /// toneplayer
+        CMdaAudioToneUtility* iTonePlayer;
+    
+        /// Toneplayer status
+        TPlayerStatus iTonePlayerStatus;
+        
+        // plugin for playing 3D effects
+        C3DRingingToneInterface* i3dRingingTonePlugin;
+    
+    };
+    
+#endif /* CTONEPLAYER_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/tonefetcher/tonefetcherengine/private/CToneSelection.cpp	Tue Jul 06 14:17:10 2010 +0300
@@ -0,0 +1,405 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "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:
+ * Nokia Corporation - initial contribution.
+ * 
+ * Contributors:
+ * 
+ * Description:
+ *     The source file for mde tone fetcher.
+ *     
+ */
+#include "CToneSelection.h"
+#include <pathinfo.h>
+#include <bautils.h>
+#include "tonefetcherengine.h"
+#include "MToneSelectionWatcher.h"
+#include <centralrepository.h>
+#include <ProfileEngineDomainCRKeys.h>
+#include <tonefetcherlogger.h>
+#include <QString>
+
+//refresh interval, 2 seconds.
+const TInt KTimerInterval = 2 * 1000 * 1000;
+const TInt KObserverCallStep = 100;
+// CONSTANTS
+_LIT( KMimeMp3, "mp3" );
+
+CMFActiveCaller* CMFActiveCaller::NewL( CToneSelection* aObserver )
+    {
+    CMFActiveCaller* self = new (ELeave) CMFActiveCaller( aObserver );
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop( self );
+
+    return self;
+    }
+
+CMFActiveCaller::~CMFActiveCaller()
+    {
+    Cancel();
+    iTimer.Close();
+    }
+
+CMFActiveCaller::CMFActiveCaller(CToneSelection* aObserver) : CActive(CActive::EPriorityStandard)
+    {
+    iObserver = aObserver;
+    }
+
+void CMFActiveCaller::ConstructL()
+    {
+    User::LeaveIfError( iTimer.CreateLocal() );
+    CActiveScheduler::Add( this );
+    }
+
+void CMFActiveCaller::DoCancel()
+    {
+    iTimer.Cancel();
+    }
+
+void CMFActiveCaller::RunL()
+    {
+    iObserver->ChangeObject();
+    }
+
+void CMFActiveCaller::Request()
+    {
+    Cancel();
+    SetActive();
+    TRequestStatus* status = &iStatus;
+    User::RequestComplete( status, KErrNone );
+    }
+
+void CMFActiveCaller::Start( TInt aMilliseconds )
+    {    
+    Cancel();
+
+    if ( aMilliseconds <= 0 )
+        {
+        Request();  // no delay - complete asap
+        }
+    else
+        {
+        iTimer.After( iStatus, aMilliseconds );
+        SetActive();
+        }
+    }
+
+void CMFActiveCaller::Stop()
+    {
+    Cancel();
+    }
+
+CToneSelection* CToneSelection::NewL( MToneSelectionWatcher *aWatcher )
+    {
+    CToneSelection* self = CToneSelection::NewLC(aWatcher);
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+CToneSelection* CToneSelection::NewLC( MToneSelectionWatcher *aWatcher )
+    {
+    CToneSelection* self = new ( ELeave ) CToneSelection( aWatcher );
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    return self;
+    }
+
+void CToneSelection::ConstructL()
+    {
+    iSession = CMdESession::NewL( *this );    
+    iObjectNotificationCaller = CMFActiveCaller::NewL( this );    
+    }
+
+CToneSelection::CToneSelection( MToneSelectionWatcher *aWatcher ) : iToneSelectionWatcher( aWatcher )
+    {
+    iMediaFileCounter = 0;
+    iIsQuerying = EFalse;
+    }
+
+CToneSelection::~CToneSelection()
+    {
+    iResultArray.ResetAndDestroy();
+    delete iQuery;
+    delete iSession;
+    delete iObjectNotificationCaller;
+    }
+
+void CToneSelection::HandleSessionOpened( CMdESession& /*aSession*/, TInt aError )
+    {
+    if ( aError != KErrNone )
+        {
+        iDefNS = 0;
+        delete iSession;
+        iSession = 0;
+        iSessionOpen = EFalse;
+        iToneSelectionWatcher->HandleMdeSessionError( aError );
+        }
+    else
+        {
+        iDefNS = &iSession->GetDefaultNamespaceDefL();
+        iSessionOpen = ETrue;
+        TRAP_IGNORE( AddObjectObserverL() );
+        iToneSelectionWatcher->HandleMdeSessionOpened();
+        }
+    }
+
+
+
+void CToneSelection::HandleSessionError( CMdESession& /*aSession*/, TInt aError )
+    {
+    if ( aError == KErrNone )
+        {
+        return;
+        }
+        
+    delete iSession;
+    iSession = 0;
+    iSessionOpen = EFalse;
+    iToneSelectionWatcher->HandleMdeSessionError( aError );
+    }
+
+void CToneSelection::HandleQueryNewResults( CMdEQuery& /*aQuery*/, 
+                                               TInt /*aFirstNewItemIndex*/,
+                                               TInt /*aNewItemCount*/ )
+    {
+    }
+
+void CToneSelection::HandleObjectNotification( CMdESession& /*aSession*/, 
+                                        TObserverNotificationType aType,
+                                        const RArray<TItemId>& aObjectIdArray )
+    {   
+    /*if ( aObjectIdArray.Count() > 0 && ( aType == ENotifyAdd || aType == ENotifyModify || aType == ENotifyRemove ) )
+        {
+        QString str("CToneSelection::HandleObjectNotification " + QString::number(aObjectIdArray.Count()) + " " + QString::number(aType));
+        TF_LOG(str);        
+        iMediaFileCounter = iMediaFileCounter + aObjectIdArray.Count();
+        if ( iMediaFileCounter >= KObserverCallStep )
+            {
+            iMediaFileCounter = 0;
+            iToneSelectionWatcher->HandleObjectChanged();
+            }
+        else 
+            {
+            iObjectNotificationCaller->Start(KTimerInterval);
+            }        
+        }*/
+    }
+
+void CToneSelection::AddObjectObserverL()
+    {
+    if ( iSessionOpen )
+        {
+        TUint32 notificationType = ENotifyAdd | ENotifyModify | ENotifyRemove;        
+        iSession->AddObjectObserverL( *this, 0, notificationType, iDefNS );
+        
+        iSession->AddObjectPresentObserverL( *this );
+        }
+    }
+
+void CToneSelection::HandleObjectPresentNotification( CMdESession& /*aSession*/, 
+                         TBool /*aPresent*/, const RArray<TItemId>& aObjectIdArray )
+    {
+    
+    if( aObjectIdArray.Count() > 0 )
+        {
+        //if query is executing, we do not allow the fresh of contents
+        if ( iIsQuerying )
+            {
+            iMediaFileCounter = 0;
+            return;
+            }
+        QString str("CToneSelection::HandleObjectPresentNotification " + QString::number(aObjectIdArray.Count()));
+        TF_LOG(str);
+        iMediaFileCounter = iMediaFileCounter + aObjectIdArray.Count();
+        if ( iMediaFileCounter > KObserverCallStep )
+            {
+            iMediaFileCounter = 0;
+            iToneSelectionWatcher->HandleObjectChanged();
+            }
+        else 
+            {
+            iObjectNotificationCaller->Start(KTimerInterval);
+            }    
+        }    
+    }
+
+void CToneSelection::HandleQueryCompleted( CMdEQuery& aQuery, TInt aError )
+    {
+    iIsQuerying = EFalse;
+    iResultArray.ResetAndDestroy();
+    if ( aError == KErrCancel )
+        {      
+        iToneSelectionWatcher->HandleQueryError( aError );
+        return;
+        }
+    else
+        {
+        CMdEObjectQuery* query = static_cast<CMdEObjectQuery*> (&aQuery);
+        TInt count = query->Count();
+        for (TInt i = 0; i < count; ++i)
+            {
+            CMdEObject* object =
+                    (CMdEObject*) query->TakeOwnershipOfResult(i);
+            CleanupStack::PushL(object);
+            CMdEPropertyDef& propDef = 
+                        CToneSelection::PropertyDefL( iSession, CToneSelection::EAttrSongName  );
+                
+            CMdEProperty* property = 0;
+            TInt err = object->Property( propDef, property, 0 );
+            if ( err != KErrNotFound && property )
+                {            
+                HBufC* songUri = HBufC::NewL( object->Uri().Length() );
+                TPtr ptr = songUri->Des();
+                ptr.Copy( object->Uri() );
+                iResultArray.AppendL( songUri );
+                }
+            CleanupStack::PopAndDestroy( object );
+            }
+        iToneSelectionWatcher->HandleQueryComplete( iResultArray );     
+        }
+    }
+
+void CToneSelection::QueryTonesL()
+    {
+    LeaveIfSessionClosedL();
+    delete iQuery;
+    iQuery = 0;
+    CMdEObjectDef& musicObjectDef =
+            iDefNS->GetObjectDefL( MdeConstants::Audio::KAudioObject );    
+    iQuery = iSession->NewObjectQueryL( *iDefNS, musicObjectDef, this );    
+    
+    // set attributes that are included in query result  
+    CMdEPropertyDef& namePropertyDef = PropertyDefL( EAttrSongName );
+    iQuery->AddPropertyFilterL( &namePropertyDef );
+    
+    iQuery->SetResultMode( EQueryResultModeItem );
+    
+    CMdELogicCondition& conditions = iQuery->Conditions();
+    ExcludeMusicPropertiesL( conditions );
+    iIsQuerying = ETrue;
+    iQuery->FindL();
+    }
+
+void CToneSelection::LeaveIfSessionClosedL()
+    {
+    if ( !iSession || !iSessionOpen )
+        {
+        User::Leave( KErrDisconnected );
+        }
+    }
+
+CMdEPropertyDef& CToneSelection::PropertyDefL( TInt aAttr )
+    {
+    return PropertyDefL( iSession, aAttr );
+    }
+
+CMdEPropertyDef& CToneSelection::PropertyDefL( CMdESession* aSession, TInt aAttr )
+    {
+    CMdEObjectDef& objectDef = 
+            iDefNS->GetObjectDefL( MdeConstants::Audio::KAudioObject );
+   
+    if ( aAttr == EAttrFileSize )
+        {
+        return objectDef.GetPropertyDefL( MdeConstants::Object::KSizeProperty );
+        }
+    else if ( aAttr == EAttrMediaType )
+        {
+        return objectDef.GetPropertyDefL( MdeConstants::Object::KItemTypeProperty );
+        }
+    else if ( aAttr == EAttrSongName || aAttr == EAttrFileName )
+        {
+        return objectDef.GetPropertyDefL( MdeConstants::Object::KTitleProperty );
+        }
+    else if ( aAttr == EAttrArtist )
+        {
+        return objectDef.GetPropertyDefL( MdeConstants::MediaObject::KArtistProperty );
+        }
+    else if ( aAttr == EAttrAlbum )
+        {
+        return objectDef.GetPropertyDefL( MdeConstants::Audio::KAlbumProperty );
+        }
+    else if ( aAttr == EAttrGenre )
+        {
+        return objectDef.GetPropertyDefL( MdeConstants::MediaObject::KGenreProperty );
+        }
+    else if ( aAttr == EAttrComposer )
+        {
+        return objectDef.GetPropertyDefL( MdeConstants::Audio::KComposerProperty );
+        }
+    else
+        {
+        User::Leave( KErrNotSupported );
+        }
+    }
+
+void CToneSelection::ExcludeMusicPropertiesL( CMdELogicCondition& aCondition )
+    {
+    TInt sizeLimitKB = 0;
+    CRepository* cenrep = CRepository::NewL( KCRUidProfileEngine );
+    CleanupStack::PushL( cenrep );
+    User::LeaveIfError( cenrep->Get( KProEngRingingToneMaxSize, sizeLimitKB ) );
+    CleanupStack::PopAndDestroy(); // cenrep
+
+    SetAttr( CToneSelection::EAttrFileSize, sizeLimitKB );
+    CMdEPropertyDef& sizeTypeDef = PropertyDefL( EAttrFileSize );
+    CMdEPropertyDef& mimeTypeDef = PropertyDefL( EAttrMediaType );
+    CMdEPropertyDef& artistTypeDef = PropertyDefL( EAttrArtist );
+    CMdEPropertyDef& albumTypeDef = PropertyDefL( EAttrAlbum );
+    CMdEPropertyDef& genreTypeDef = PropertyDefL( EAttrGenre );
+    CMdEPropertyDef& composerTypeDef = PropertyDefL( EAttrComposer );
+    
+    CMdELogicCondition& condition = 
+                        aCondition.AddLogicConditionL( ELogicConditionOperatorAnd );
+    condition.AddPropertyConditionL( sizeTypeDef, TMdEIntRange(0, iMaxFileSize, EMdERangeTypeBetween) );
+    condition.AddPropertyConditionL( mimeTypeDef, 
+            ETextPropertyConditionCompareContains, KMimeMp3 );
+    condition.AddPropertyConditionL( artistTypeDef );
+    condition.AddPropertyConditionL( albumTypeDef );
+    condition.AddPropertyConditionL( genreTypeDef );
+    condition.AddPropertyConditionL( composerTypeDef );
+    
+    condition.SetNegate( ETrue );
+    }
+
+void CToneSelection::SetAttr( int attr, int value )
+{
+    switch ( attr )
+        {
+        case CToneSelection::EAttrFileSize:
+            {
+            iMaxFileSize = value;
+            break;
+            }            
+        default:
+            {
+            break;
+            }
+        }
+}
+
+void CToneSelection::ChangeObject()
+    {    
+    if ( QueryReady() )
+        {
+        iToneSelectionWatcher->HandleObjectChanged();
+        }
+    }
+
+TBool CToneSelection::QueryReady() 
+    {
+    if ( iQuery )
+        {
+        return iQuery->IsComplete();    
+        }
+     
+    return ETrue;
+    }
+// End of File
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/tonefetcher/tonefetcherengine/private/CToneSelection.h	Tue Jul 06 14:17:10 2010 +0300
@@ -0,0 +1,170 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "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:
+ * Nokia Corporation - initial contribution.
+ * 
+ * Contributors:
+ * 
+ * Description:
+ *     The header file for mde tone fetcher.
+ *     
+ */
+
+#ifndef CTONESELECTION_H
+#define CTONESELECTION_H
+
+#include <e32base.h>
+#include <mdesession.h>
+#include <mdequery.h>
+#include <mdelogiccondition.h>
+#include <mdeconstants.h>
+#include <mdeobjectquery.h>
+#include <mdccommon.h>
+#include <mdeitem.h>
+#include <mdeobject.h>
+
+// FORWARD DECLARATIONS
+class MToneSelectionWatcher;
+class CToneSelection;
+
+/**
+* CMFActiveCaller
+*
+* CMFActiveCaller is used for generating a call from active scheduler.
+* Typical use is to start some operation after a short delay.
+*/
+NONSHARABLE_CLASS (CMFActiveCaller) : public CActive
+    {
+    public:
+        static CMFActiveCaller* NewL( CToneSelection* aObserver );
+        virtual ~CMFActiveCaller();
+
+    private:
+        CMFActiveCaller( CToneSelection* aObserver );
+        void ConstructL();
+
+    public:
+        void Start( TInt aMilliseconds );
+        void Stop();
+        void Request();
+
+    private:
+        void RunL();
+        void DoCancel();
+        
+    private:
+        // timer
+        RTimer iTimer;
+
+        // observer that gets called
+        CToneSelection* iObserver;
+    };
+
+// CLASS DECLARATION
+/**
+ *  This class is used for quering tones from mde.
+ *
+ */
+class CToneSelection : public CBase, 
+                       public MMdESessionObserver,
+                       public MMdEQueryObserver,
+                       public MMdEObjectObserver,
+                       public MMdEObjectPresentObserver                            
+    {
+    public:
+        enum TStorageType
+            {
+            EPhoneMemory = 0, ERomStorage, EMassStorage, EMemoryCard
+            };
+        
+        enum TQueryAttribute
+            {
+            EAttrMediaType = 20, // integer
+            EAttrFileSize, // integer
+            EAttrStorageType, // integer
+            EAttrMediaFileId, // integer
+            EAttrFileName, // string
+            EAttrFullName, // string
+            EAttrSongName, // string
+            EAttrArtist, // string
+            EAttrAlbum, // string
+            EAttrGenre, // string
+            EAttrComposer
+            };
+    
+    public:
+        static CToneSelection* NewL( MToneSelectionWatcher *aWatcher );
+        static CToneSelection* NewLC( MToneSelectionWatcher *aWatcher );
+        
+        virtual ~CToneSelection();
+        //iTimer's callback function.
+        void ChangeObject();
+        void QueryTonesL();   
+        void SetAttr( int attr, int value );
+        TBool QueryReady();
+    
+    private:   
+        CToneSelection(  MToneSelectionWatcher *aWatcher );
+        void ConstructL(); 
+        void ExcludeMusicPropertiesL( CMdELogicCondition& aCondition );    
+        void LeaveIfSessionClosedL();
+        CMdEPropertyDef& PropertyDefL(TInt aAttr);
+        CMdEPropertyDef& PropertyDefL(CMdESession* aSession, TInt aAttr);
+    
+    private:
+        // from MMdESessionObserver
+        void HandleSessionOpened( CMdESession& aSession, TInt aError );
+        void HandleSessionError( CMdESession& aSession, TInt aError );
+    
+    private:
+        // from MMdEQueryObserver (mdequery.h)
+        void HandleQueryNewResults( CMdEQuery& aQuery, TInt aFirstNewItemIndex,
+                TInt aNewItemCount );
+        void HandleQueryCompleted( CMdEQuery& aQuery, TInt aError );    
+    private:
+        // from MMdEObjectObserver
+        void HandleObjectNotification( CMdESession& aSession,
+                TObserverNotificationType aType,
+                const RArray<TItemId>& aObjectIdArray );
+    
+    private:
+        // from MMdEObjectPresentObserver
+        void HandleObjectPresentNotification( CMdESession& aSession,
+                TBool aPresent, const RArray<TItemId>& aObjectIdArray);
+        void AddObjectObserverL();
+        void HandleObjectChanged();
+    private:
+    
+        MToneSelectionWatcher* iToneSelectionWatcher;
+    
+        // session to metadata engine
+        CMdESession* iSession;
+        
+        CMdENamespaceDef* iDefNS; 
+    
+        // metadata query
+        CMdEObjectQuery* iQuery;
+        TBool iIsQuerying;
+    
+        // used for saving the quering result.
+        RPointerArray<TDesC> iResultArray;
+    
+        // is metadata session open
+        TBool iSessionOpen;
+    
+        // max audio file file size
+        TInt iMaxFileSize;
+        
+        TInt iMediaFileCounter;
+        // for generating active object calls
+        CMFActiveCaller* iObjectNotificationCaller;
+        
+    };
+#endif /* CTONESELECTION_H */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/tonefetcher/tonefetcherengine/private/MTonePlayingWatcher.h	Tue Jul 06 14:17:10 2010 +0300
@@ -0,0 +1,34 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "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:
+ * Nokia Corporation - initial contribution.
+ * 
+ * Contributors:
+ * 
+ * Description:
+ * 
+ *     
+ */
+
+#ifndef MTONEPLAYINGWATCHER_H
+#define MTONEPLAYINGWATCHER_H
+
+#include <e32def.h>
+
+/*
+ * this class is used to watch tone playing event, inherited by ToneFetcherEnginePrivate
+ */
+class MTonePlayingWatcher
+    {
+    public:
+        // handle preview event
+        virtual void HandlePreviewEvent( TInt event ) = 0;
+    };
+
+#endif /* MTONEPLAYINGWATCHER_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/tonefetcher/tonefetcherengine/private/MToneSelectionWatcher.h	Tue Jul 06 14:17:10 2010 +0300
@@ -0,0 +1,47 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "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:
+ * Nokia Corporation - initial contribution.
+ * 
+ * Contributors:
+ * 
+ * Description:
+ *   
+ *     
+ */
+
+#ifndef MTONESELECTIONWATCHER_H
+#define MTONESELECTIONWATCHER_H
+
+#include <e32def.h>
+#include <e32cmn.h> 
+
+/*
+ * this class is used to watch MDE system change, inherited by ToneFetcherEnginePrivate
+ */
+class MToneSelectionWatcher
+    {
+    public:
+        // handle mde session error event
+        virtual void HandleMdeSessionError( TInt aError ) = 0;
+        
+        // handle mde session open event
+        virtual void HandleMdeSessionOpened() = 0;
+        
+        // handle query error event        
+        virtual void HandleQueryError( TInt aError ) = 0;
+        
+        // handle query complete event
+        virtual void HandleQueryComplete( RPointerArray<TDesC>& ) = 0;
+        
+        // handle object changed event
+        virtual void HandleObjectChanged() = 0;
+    };
+
+#endif /* MTONESELECTIONWATCHER_H */
--- a/controlpanelui/src/tonefetcher/tonefetcherengine/private/symbian/tonepreviewprivate.cpp	Wed Jun 23 18:13:38 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,612 +0,0 @@
-/*
- * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
- * All rights reserved.
- * This component and the accompanying materials are made available
- * under the terms of "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:
- * Nokia Corporation - initial contribution.
- * 
- * Contributors:
- * 
- * Description:
- *     The source file for tone previewing.
- *     
- */
-#include "tonepreviewprivate.h"
-#include "tonefetcherutils.h"
-#include <AudioPreference.h>             // KAudioPriorityPreview
-#include <c3dringingtoneinterface.h>     // C3DRingingToneInterface
-#include <ctsydomainpskeys.h>            // for phone call states
-#include <MProfileEngine.h>
-#include <MProfile.h>
-#include <MProfileTones.h>
-#include "TProfileToneSettings.h"
-#include <MProfileExtraSettings.h>
-#include <MProfile3DToneSettings.h>
-#include <ProfileInternal.hrh>
-#include <ProfileEngineDomainCRKeys.h>   // KProEngDefaultRingingTone
-#include <XQConversions>
-#include <QChar>
-
-CMFPreviewHandlerBase::CMFPreviewHandlerBase( QObject *parent  ) : QObject( parent )
-    {
-    iMediaType = KErrNotFound;
-    iRingingVolume = KErrNotFound;
-    iRingingType = KErrNotFound;
-    iVibra = KErrNotFound;
-    i3DEffect = KErrNotFound;
-    i3DEcho = KErrNotFound;
-    iFileSize = KErrNotFound;    
-    iFullName = 0;    
-    iActiveProfileRead = EFalse;
-    iPlayerStatus = EPlayerNotCreated;
-
-    }
-
-void CMFPreviewHandlerBase::ConstructL()
-    {
-    // To allow/not allow screensaver
-    // Errors ignored, no actions needed if API is not available
-    //iProperty.Attach( KPSUidScreenSaver, KScreenSaverAllowScreenSaver );    
-    TRAP_IGNORE(User::LeaveIfError( iApaSession.Connect() ) );
-    
-    TRAP_IGNORE( ReadDefaultToneL() );
-    // To keep backlight on while a video is being previewed
-    iBacklightTimer = CPeriodic::NewL( EPriorityLow );
-    }
-
-CMFPreviewHandlerBase::~CMFPreviewHandlerBase()
-    {
-    delete iFullName;
-    iProperty.Close();
-    
-    iApaSession.Close();
-    }
-
-void CMFPreviewHandlerBase::SetAttr(const QString &file )
-    {
-    if ( !file.isNull() )
-        {
-        QString path = ToneFetcherUtils::normalizeSeperator(file);
-        delete iFullName;
-        iFullName = 0;
-        iFullName = XQConversions::qStringToS60Desc( path );         
-        }
-    }
-
-TInt CMFPreviewHandlerBase::RingingVolume()
-    {
-    const TInt KDefaultVolumeLevel = 7; // see profile.hrh for volume levels
-    
-    if ( iRingingVolume != KErrNotFound )
-        {
-        return iRingingVolume;
-        }
-        
-    if ( iActiveProfileRead )
-        {
-        return iActiveProfileRingingVolume;
-        }
-
-    return KDefaultVolumeLevel;
-    }
-
-TInt CMFPreviewHandlerBase::RingingType()
-    {
-    if ( iRingingType != KErrNotFound )
-        {
-        return iRingingType;
-        }
-        
-    if ( iActiveProfileRead )
-        {
-        return iActiveProfileRingingType;
-        }
-
-    return ERingingTypeRinging;
-    }
-
-TInt CMFPreviewHandlerBase::Vibra()
-    {
-    if ( iVibra != KErrNotFound )
-        {
-        return iVibra;
-        }
-        
-    if ( iActiveProfileRead )
-        {
-        return iActiveProfileVibra;
-        }
-    
-    return 0;  // in case of error vibra is off
-    }
-
-TInt CMFPreviewHandlerBase::Echo3D()
-    {
-    if ( i3DEcho != KErrNotFound )
-        {
-        return i3DEcho;
-        }
-    
-    if ( iActiveProfileRead )
-        {
-        return iActiveProfile3DEcho;
-        }
-
-    return EProfile3DEchoOff;  // from ProfileInternal.hrh
-    }
-
-TInt CMFPreviewHandlerBase::Effect3D()
-    {
-    if ( i3DEffect != KErrNotFound )
-        {
-        return i3DEffect;
-        }
-    
-    if ( iActiveProfileRead )
-        {
-        return iActiveProfile3DEffect;
-        }
-
-    return EProfile3DEffectOff;
-    }
-
-TInt CMFPreviewHandlerBase::ConvertVolume( TInt aVolume, TInt aMaxVolume )
-    {
-    const TInt KMinVolumeLevel = 1;
-    const TInt KMaxVolumeLevel = 10;
-        
-    TInt result = aMaxVolume * aVolume / KMaxVolumeLevel;
-    
-    // if user has selected minimum volume level set HW volume 1
-    if ( aVolume == KMinVolumeLevel && result == 0 )
-        {
-        result = 1;
-        }
-
-    return result;
-    }
-  
-void CMFPreviewHandlerBase::ReadActiveProfileL()
-    {
-    iActiveProfileRead = EFalse;
-    
-    MProfileEngine* profileEngine = CreateProfileEngineL();
-    CleanupReleasePushL( *profileEngine );
-    
-    MProfile* activeProfile  = profileEngine->ActiveProfileL();
-    CleanupReleasePushL( *activeProfile );
-        
-    const MProfileTones& profileTones = activeProfile->ProfileTones();
-     
-    const TProfileToneSettings& toneSettings = profileTones.ToneSettings();
-    iActiveProfileVibra = toneSettings.iVibratingAlert;
-    iActiveProfileRingingVolume = toneSettings.iRingingVolume;
-    iActiveProfileRingingType = toneSettings.iRingingType;
-          
-    const MProfileExtraSettings& extra = activeProfile->ProfileExtraSettings();
-    const MProfile3DToneSettings& threeD = extra.Profile3DToneSettings();
-    
-    iActiveProfile3DEffect = threeD.Effect();
-    iActiveProfile3DEcho = threeD.Echo();
-   
-    CleanupStack::PopAndDestroy( activeProfile ); 
-    CleanupStack::PopAndDestroy( profileEngine );
-    
-    iActiveProfileRead = ETrue;
-    }
- 
-void CMFPreviewHandlerBase::ReadDefaultToneL()
-    {
-    CRepository* cenrep = CRepository::NewLC( KCRUidProfileEngine );
-
-    User::LeaveIfError( cenrep->Get( KProEngDefaultRingingTone, iDefaultTone ) );
-    CleanupStack::PopAndDestroy( cenrep );
-    }
-
-TInt CMFPreviewHandlerBase::GetDataType( const TDesC& aFileName, TDataType& aDataType )
-    {
-    TUid dummyUid( KNullUid );
-    return iApaSession.AppForDocument( aFileName, dummyUid, aDataType );
-    }
-
-TInt CMFPreviewHandlerBase::DoResetInactivityTimer( TAny* /*aObject*/ )
-    {
-    User::ResetInactivityTime();
-    return KErrNone;
-    }
-
-void CMFPreviewHandlerBase::DisableBackLight()
-    {
-        const TInt KResetInactivityTimerDelay = 2000000;
-    iBacklightTimer->Cancel(); // Just in case
-    // Disable backlight turn off during video preview
-    iBacklightTimer->Start( KResetInactivityTimerDelay,
-                            KResetInactivityTimerDelay,
-                            TCallBack( DoResetInactivityTimer, 0 ) );
-    
-    }
-
-
-
-TonePreviewPrivate::TonePreviewPrivate( QObject *parent ) : CMFPreviewHandlerBase( parent )
-    {
-    iAudioPlayerStatus = EPlayerNotCreated;
-    CMFPreviewHandlerBase::ConstructL();
-    iTonePlayerStatus = EPlayerNotCreated;
-    CCoeEnv* coeEnv = CCoeEnv::Static();
-    coeEnv->AddForegroundObserverL( *this );
-    }
-
-TonePreviewPrivate::~TonePreviewPrivate()
-    {
-    Cancel();
-    
-    delete iAudioPlayer;
-    delete iTonePlayer;
-    delete i3dRingingTonePlugin;
-    }
-
-TBool TonePreviewPrivate::IsPlaying()
-    {
-    if ( iAudioPlayerStatus != EPlayerNotCreated )
-        {
-        return ETrue;
-        }
-    
-    if ( iTonePlayerStatus != EPlayerNotCreated )
-        {
-        return ETrue;
-        }
-
-    return EFalse;
-    }
-
-void TonePreviewPrivate::Play()
-    {    
-    //sequence for playing a beep once sound
-    _LIT8( KFileListBeepSequence, "\x00\x11\x06\x0A\x08\x73\x0A\x40\x28\x0A\xF7\
-    \x05\xFC\x40\x64\x0A\x08\x40\x32\x0A\xF7\x06\x0B" ); 
-
-    // rng mime type
-    _LIT( KFileListRngMimeType, "application/vnd.nokia.ringing-tone" );
-    
-    Cancel(); // stop previous play
-    
-    if ( !iFullName || iFullName->Des().Length() == 0 )
-        {
-        User::Leave( KErrNotFound );
-        }
-
-    TRAP_IGNORE( ReadActiveProfileL() );
-
-    TPtrC fileName( iFullName->Des() );
-    TDataType dataType;
-    TInt err = GetDataType( fileName, dataType );
-    if ( err == KErrNotFound )
-        {
-        fileName.Set( iDefaultTone );
-        if ( fileName.Length() == 0 )
-             {
-             User::Leave( KErrNotFound );
-             }
-        }
-    else if ( err != KErrNone )
-        {
-        User::Leave( err );
-        }
-        
-    TBool mimeTypeRng = EFalse;
-    
-    if ( err == KErrNone )
-        {
-        if( dataType.Des().CompareF( KFileListRngMimeType ) == 0 )
-            {
-            mimeTypeRng = ETrue;
-            }
-        }
-
-    TInt ringingType = RingingType();
-    if ( ringingType == ERingingTypeBeepOnce )
-        {
-        // Active profile ringing tone is set to Beep Once
-        // Don't initialize a FileSequence but use DesSequence instead
-        iTonePlayer = CMdaAudioToneUtility::NewL( *this );
-        iTonePlayer->PrepareToPlayDesSequence( KFileListBeepSequence() );
-        iTonePlayerStatus = EPlayerInitializing;
-        }
-    else
-        {
-        if( mimeTypeRng )
-            {
-            //Ringingtone is a RNG-file
-            iTonePlayer = CMdaAudioToneUtility::NewL( *this );
-            iTonePlayer->PrepareToPlayFileSequence( fileName );
-            iTonePlayerStatus = EPlayerInitializing;
-            }
-        else
-            {
-            delete iAudioPlayer;
-            iAudioPlayer = 0;
-
-            iAudioPlayer = CDrmPlayerUtility::NewFilePlayerL(
-                fileName, *this, KAudioPriorityRingingTonePreview,
-                ( TMdaPriorityPreference )KAudioPrefRingFilePreview );
-    
-            iAudioPlayerStatus = EPlayerInitializing;
-            }
-        }
-    DisableBackLight();
-    }
-
-void TonePreviewPrivate::Stop()
-    {
-    Cancel();
-    }
-
-TInt TonePreviewPrivate::ConvertVolume( TInt aVolume )
-    {
-    TInt result = 0;
-    if ( iAudioPlayer )
-        {
-        result = CMFPreviewHandlerBase::ConvertVolume( aVolume, iAudioPlayer->MaxVolume() );
-        }
-    else if ( iTonePlayer )
-        {
-        result = CMFPreviewHandlerBase::ConvertVolume( aVolume, iTonePlayer->MaxVolume() );
-        }
-        
-    //if user has selected silent ringing type, set volume off
-    TInt ringingType = RingingType();
-    if( ringingType == ERingingTypeSilent )
-        {
-        result = 0;
-        }
-
-    return result;
-    }
-
-void TonePreviewPrivate::SetToneRingingType( TInt aRingingType )
-    {
-    const TInt KToneInterval = 1000000; // 1 second pause between tones
-    const TInt KAscendingVolumeInterval = 3000000; // 3 seconds
-    
-    if ( !iTonePlayer )
-        {
-        return;
-        }   
-
-
-    TInt ringingVolume = RingingVolume();
-
-    switch( aRingingType )
-        {
-        case ERingingTypeRinging:
-        case ERingingTypeSilent:
-            {
-            iTonePlayer->SetRepeats( KMdaAudioToneRepeatForever,
-                                     TTimeIntervalMicroSeconds( KToneInterval ) );
-            break;
-            }
-        case ERingingTypeAscending:
-            {
-            iTonePlayer->SetRepeats( KMdaAudioToneRepeatForever,
-                                     TTimeIntervalMicroSeconds( KToneInterval ) );
-            
-            TInt volRamp = KAscendingVolumeInterval * ringingVolume;
-            iTonePlayer->SetVolumeRamp( TTimeIntervalMicroSeconds( volRamp ) );
-            break;
-            }
-        case ERingingTypeRingOnce:
-        case ERingingTypeBeepOnce:
-            {
-            iTonePlayer->SetRepeats( 0, TTimeIntervalMicroSeconds( KToneInterval ) );
-            break;
-            }
-        default:
-            {
-            break;
-            }
-        }
-    }
-
-void TonePreviewPrivate::SetAudioRingingType( TInt aRingingType )
-    {
-    const TInt KToneInterval = 1000000; // 1 second pause between tones
-    const TInt KAscendingVolumeInterval = 3000000; // 3 seconds
-    
-    if ( !iAudioPlayer )
-        {
-        return;
-        }
-
-    TInt ringingVolume = RingingVolume();
-        
-    switch( aRingingType )
-        {
-        case ERingingTypeRinging:
-        case ERingingTypeSilent:
-            {
-            iAudioPlayer->SetRepeats( KMdaAudioToneRepeatForever,
-                                      TTimeIntervalMicroSeconds( KToneInterval ) );
-            break;
-            }
-        case ERingingTypeAscending:
-            {
-            iAudioPlayer->SetRepeats( KMdaAudioToneRepeatForever,
-                                      TTimeIntervalMicroSeconds( KToneInterval ) );
-            TInt volRamp = KAscendingVolumeInterval * ringingVolume;
-            iAudioPlayer->SetVolumeRamp( TTimeIntervalMicroSeconds( volRamp ) );
-            break;
-            }
-        case ERingingTypeRingOnce:
-            {
-            iAudioPlayer->SetRepeats( 0, TTimeIntervalMicroSeconds( KToneInterval ) );
-            break;
-            }
-
-        default:
-            {
-            break;
-            }
-        }
-    }
-
-void TonePreviewPrivate::Cancel()
-    {
-    TBool isPlaying = EFalse;
-    
-    if ( iAudioPlayer )
-        {
-        isPlaying = ETrue;
-        if ( iAudioPlayerStatus == EPlayerPlayingWith3DEffect )
-            {
-            i3dRingingTonePlugin->Stop();
-            // plugin calls AudioPlayer->Stop()
-            iAudioPlayer->Close();
-            }
-        if ( iAudioPlayerStatus == EPlayerPlaying )
-            {
-            iAudioPlayer->Stop();
-            iAudioPlayer->Close();
-            }
-        
-        delete iAudioPlayer;
-        iAudioPlayer = 0;
-        iAudioPlayerStatus = EPlayerNotCreated;
-        }
-    
-    if ( iTonePlayer )
-        {
-        isPlaying = ETrue;
-        if ( iTonePlayerStatus == EPlayerPlaying )
-            {
-            iTonePlayer->CancelPlay();
-            }
-        
-        delete iTonePlayer;
-        iTonePlayer = 0;
-        iTonePlayerStatus = EPlayerNotCreated;
-        }
-        
-
-    if ( isPlaying )
-        {
-        //User::InfoPrint(_L("cancel"));
-//        EnableScreenSaver( ETrue );
-        iBacklightTimer->Cancel();
-        }
-    }
-
-void TonePreviewPrivate::MatoPlayComplete( TInt aError )
-    {
-    Cancel();
-    emit notifyPreviewEvent( ToneFetcherEngine::EAudioPreviewComplete, aError );
-    }
-
-void TonePreviewPrivate::MatoPrepareComplete( TInt aError )
-    {
-    if ( aError != KErrNone )
-        {
-        Cancel();
-        
-        emit notifyPreviewEvent( ToneFetcherEngine::EPreviewError, aError );        
-        return;
-        }
-
-    TInt ringingVolume = RingingVolume();
-    TInt ringingType = RingingType();
-    TInt vibra = Vibra();
-       
-    iTonePlayerStatus = EPlayerInitialized;
-    SetToneRingingType( ringingType );
-    iTonePlayer->SetVolume( ConvertVolume( ringingVolume ) );
-    
-    TMdaPriorityPreference pref = (TMdaPriorityPreference) KAudioPrefRingFilePreview;               
-    if ( vibra )
-        {
-        pref = (TMdaPriorityPreference) KAudioPrefRingFilePreviewVibra;
-        }
-    iTonePlayer->SetPriority( KAudioPriorityPreview, pref );
-                                             
-    iTonePlayer->Play();
-    iTonePlayerStatus = EPlayerPlaying;
-    }
-
-void TonePreviewPrivate::MdapcInitComplete( TInt aError, 
-                        const TTimeIntervalMicroSeconds& /* aDuration */ )
-    {
-    if ( aError != KErrNone )
-        {
-        Cancel();
-        emit notifyPreviewEvent( ToneFetcherEngine::EPreviewError, aError );
-        return;
-        }
-        
-
-    TInt ringingVolume = RingingVolume();
-    TInt ringingType = RingingType();
-    TInt vibra = Vibra();
-    TInt echo3D = Echo3D();
-    TInt effect3D = Effect3D();
-
-    
-
-    iAudioPlayerStatus = EPlayerInitialized;
-    SetAudioRingingType( ringingType );
-    iAudioPlayer->SetVolume( ConvertVolume( ringingVolume ) );
-    
-    TMdaPriorityPreference pref = (TMdaPriorityPreference) KAudioPrefRingFilePreview;               
-    if ( vibra )
-        {
-        pref = (TMdaPriorityPreference) KAudioPrefRingFilePreviewVibra;
-        }
-    iAudioPlayer->SetPriority( KAudioPriorityPreview, pref );
-     
-    iAudioPlayerStatus = EPlayerPlaying;
-    
-    if ( effect3D == EProfile3DEffectOff )
-        {
-        iAudioPlayer->Play();  // 3D not used
-        return;
-        }
-
-    if ( !i3dRingingTonePlugin )
-        {
-        TUid emptyUid = { 0 };
-        TRAPD( err, i3dRingingTonePlugin = C3DRingingToneInterface::NewL( emptyUid ) );
-        if ( err != KErrNone || !i3dRingingTonePlugin )
-            {
-            iAudioPlayer->Play();
-            return;
-            }
-        }       
-   
-    i3dRingingTonePlugin->SetAttr( E3DRTIAttr3DEffect, effect3D );
-    i3dRingingTonePlugin->SetAttr( E3DRTIAttr3DEcho, echo3D );    
-    i3dRingingTonePlugin->SetAttr( E3DRTIAttrDrmPlayerUtility, iAudioPlayer );
-    TRAP_IGNORE( i3dRingingTonePlugin->PlayL() );
-
-    iAudioPlayerStatus = EPlayerPlayingWith3DEffect;
-    }
-
-void TonePreviewPrivate::MdapcPlayComplete( TInt aError )
-    {  
-    Cancel();
-    emit notifyPreviewEvent( ToneFetcherEngine::EAudioPreviewComplete, aError );
-    }
-
-void TonePreviewPrivate::HandleLosingForeground()
-    {
-    if ( IsPlaying() )
-        {
-        Stop();
-        }
-    }
-void TonePreviewPrivate::HandleGainingForeground()
-    {
-    
-    }
--- a/controlpanelui/src/tonefetcher/tonefetcherengine/private/symbian/tonepreviewprivate.h	Wed Jun 23 18:13:38 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,223 +0,0 @@
-/*
- * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
- * All rights reserved.
- * This component and the accompanying materials are made available
- * under the terms of "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:
- * Nokia Corporation - initial contribution.
- * 
- * Contributors:
- * 
- * Description:
- *     The header file for tone previewing.
- *     
- */
-
-#ifndef TONEPREVIEWPRIVATE_H
-#define TONEPREVIEWPRIVATE_H
-#include <e32base.h>
-#include <DrmAudioSamplePlayer.h>
-#include <mdaaudiotoneplayer.h>
-#include <videoplayer.h>
-#include <centralrepository.h>
-#include <apgcli.h>  // for RApaLsSession
-#include <e32property.h>
-#include <QObject>
-#include "tonefetcherengine.h"
-#include <coemain.h>
-
-class C3DRingingToneInterface;
-class RWindow;
-
-/**
-* CMFPreviewHandlerBase
-*
-* Base class for CMFAudioPreviewHandler.
- */
-class CMFPreviewHandlerBase : public QObject, public CBase
-                        
-{
-Q_OBJECT
-public: 
-
-   enum TMediaFileType
-       {
-       EMediaFileTypeAudio = 0,
-       EMediaFileTypeVideo
-       };
-    enum TPlayerStatus
-        {
-        EPlayerNotCreated,
-        EPlayerInitializing,
-        EPlayerReady,
-        EPlayerPlaying,
-        EPlayerInitialized,
-        EPlayerPlayingWith3DEffect
-        };
-
-    // these must match with the ones in Profile Engine
-    enum TRingingTypes
-        {
-        ERingingTypeRinging = 0,
-        ERingingTypeAscending,
-        ERingingTypeRingOnce,
-        ERingingTypeBeepOnce,
-        ERingingTypeSilent
-        };
-
-    enum TFLAllowScreenSaver
-        {
-        EFLScreenSaverAllowed = 0, EFLScreenSaverNotAllowed
-        };
-
-protected:
-
-    virtual ~CMFPreviewHandlerBase();
-
-protected:
-
-    /**
-     * C++ default constructor.
-     */
-    CMFPreviewHandlerBase( QObject *parent );
-
-    /**
-     * By default Symbian OS constructor is private.
-     */
-    void ConstructL();
-
-public:    
-    void SetAttr(const QString &file);    
-    TInt Attr(TInt aAttr);    
-    virtual void Play() = 0;
-    virtual void Stop() = 0;
-    virtual TBool IsPlaying() = 0;
-
-protected:
-    TInt ConvertVolume(TInt aVolume);
-    void ReadActiveProfileL();
-    TInt GetDataType(const TDesC& aFileName, TDataType& aDataType);
-    void ReadDefaultToneL();   
-    
-
-    void DisableBackLight();
-
-    static TInt DoResetInactivityTimer(TAny* aObject);
-protected:
-    TInt RingingVolume();
-    TInt RingingType();
-    TInt Vibra();
-    TInt Echo3D();
-    TInt Effect3D();
-
-protected:
-    static TInt ConvertVolume(TInt aVolume, TInt aMaxVolume);    
-
-protected:
-    TInt iRingingVolume;
-    TInt iRingingType;
-    TInt iVibra;
-    TInt i3DEffect;
-    TInt i3DEcho;
-    TInt iMediaType;
-    TInt iFileSize;
-    HBufC* iFullName;
-
-    TBool iActiveProfileRead;
-    TInt iActiveProfileRingingVolume;
-    TInt iActiveProfileRingingType;
-    TInt iActiveProfileVibra;
-    TInt iActiveProfile3DEffect;
-    TInt iActiveProfile3DEcho;
-   
-
-    TInt iPlayerStatus;
-
-    // handle to window
-    RWindow* iWindow; // does not own
-
-    // for getting file MIME types
-    RApaLsSession iApaSession;
-
-    // for setting screensaver on/off
-    RProperty iProperty;
-
-    // default ringing tone
-    TFileName iDefaultTone;
-
-    // file server session
-    //RFs iFsSession;
-
-    /**
-     * Timer for resetting the user inactivity timeout
-     */
-    CPeriodic* iBacklightTimer;
-};
-
-// CLASS DECLARATION
-/**
- *  This class is used for previewing the tones.
- *
- */
-
-class TonePreviewPrivate : public CMFPreviewHandlerBase,
-                           public MDrmAudioPlayerCallback,
-                           public MMdaAudioToneObserver,
-                           public MCoeForegroundObserver
-
-{
-Q_OBJECT
-public:
-    TonePreviewPrivate( QObject *parent );
-    virtual ~TonePreviewPrivate();   
-signals:
-    void notifyPreviewEvent( ToneFetcherEngine::TPreviewEvent event, int errorId );
-    
-public:
-    void Play();
-    void Stop();
-    TBool IsPlaying();
-
-private:
-    void Cancel();
-    void SetAudioRingingType( TInt aRingingType );
-    void SetToneRingingType( TInt aRingingType );
-    TInt ConvertVolume( TInt aVolume );
-        
-        
-private:
-    // from MMdaAudioToneObserver
-    virtual void MatoPrepareComplete( TInt aError );
-    virtual void MatoPlayComplete(TInt aError);
-
-private:
-    // from MDrmAudioPlayerCallback
-    void MdapcInitComplete(TInt aError,
-            const TTimeIntervalMicroSeconds& aDuration);
-    void MdapcPlayComplete(TInt aError);
-    // from MCoeForegroundObserver
-    void HandleLosingForeground();
-    void HandleGainingForeground();
-
-private:
-    // audio player
-    CDrmPlayerUtility* iAudioPlayer;
-
-    /// Audioplayer status
-    TPlayerStatus iAudioPlayerStatus;
-
-    /// toneplayer
-    CMdaAudioToneUtility* iTonePlayer;
-
-    /// Toneplayer status
-    TPlayerStatus iTonePlayerStatus;
-    
-    // plugin for playing 3D effects
-    C3DRingingToneInterface* i3dRingingTonePlugin;
-
-};
-    
-#endif /* TONEPREVIEWPRIVATE_H_ */
--- a/controlpanelui/src/tonefetcher/tonefetcherengine/private/symbian/toneselectionengine_p.cpp	Wed Jun 23 18:13:38 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,376 +0,0 @@
-/*
- * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
- * All rights reserved.
- * This component and the accompanying materials are made available
- * under the terms of "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:
- * Nokia Corporation - initial contribution.
- * 
- * Contributors:
- * 
- * Description:
- *     The source file for mde tone fetcher.
- *     
- */
-#include "toneselectionengine_p.h"
-#include <XQConversions>
-#include <pathinfo.h>
-#include <bautils.h>
-#include "tonepreviewprivate.h"
-#include "tonefetcherengine.h"
-#include <centralrepository.h>
-#include <ProfileEngineDomainCRKeys.h>
-#include <cplogger.h>
-
-
-CTimeOutTimer* CTimeOutTimer::NewL(ToneSelectionEnginePrivate& aObserver)
-    {
-    CTimeOutTimer* self = CTimeOutTimer::NewLC(aObserver);
-    CleanupStack::Pop(self);
-    return self;
-    }
-
- 
-
-CTimeOutTimer* CTimeOutTimer::NewLC(ToneSelectionEnginePrivate& aObserver)
-    {
-    CTimeOutTimer* self = new (ELeave) CTimeOutTimer(aObserver);
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    return self;
-    } 
-
- 
-
-CTimeOutTimer::CTimeOutTimer(ToneSelectionEnginePrivate& aObserver)
-    : CTimer(EPriorityStandard),
-      iObserver( aObserver )
-    { 
-
-    }
-
- 
-
-CTimeOutTimer::~CTimeOutTimer()
-    {
-    Cancel();
-    }
-
- 
-
-void CTimeOutTimer::ConstructL()
-    {
-    CTimer::ConstructL();
-    CActiveScheduler::Add(this);
-    }
-
- 
-
-void CTimeOutTimer::RunL()
-    {
-    iObserver.ChangeObject();
-    }
-
-ToneSelectionEnginePrivate::ToneSelectionEnginePrivate( ToneFetcherEngine *engine ) : mServiceEngine( engine )
-
-    {
-    iSession = CMdESession::NewL( *this );
-    
-    iTimer = CTimeOutTimer::NewLC( *this );
-    iContinue = EFalse;
-    iTimerStarted = EFalse;
-    iFreshing = EFalse;
-    CleanupStack::Pop();
-    
-    
-    }
-
-ToneSelectionEnginePrivate::~ToneSelectionEnginePrivate()
-    {
-    delete iQuery;
-    delete iSession;
-    }
-
-void ToneSelectionEnginePrivate::HandleSessionOpened( CMdESession& /*aSession*/, TInt aError )
-    {
-    if ( aError != KErrNone )
-        {
-        delete iSession;
-        iSession = 0;
-        iSessionOpen = EFalse;
-        emit mdeSessionError( aError );
-        }
-    else
-        {
-        iSessionOpen = ETrue;
-        TRAP_IGNORE( AddObjectObserverL() );
-        emit mdeSessionOpened();
-        }
-    }
-
-
-
-void ToneSelectionEnginePrivate::HandleSessionError( CMdESession& /*aSession*/, TInt aError )
-    {
-    if ( aError == KErrNone )
-        {
-        return;
-        }
-        
-    delete iSession;
-    iSession = 0;
-    iSessionOpen = EFalse;
-    emit mdeSessionError( aError );            
-    }
-
-
-void ToneSelectionEnginePrivate::HandleQueryNewResults( CMdEQuery& /*aQuery*/, 
-                                               TInt /*aFirstNewItemIndex*/,
-                                               TInt /*aNewItemCount*/ )
-    {
-    }
-
-void ToneSelectionEnginePrivate::HandleObjectNotification( CMdESession& /*aSession*/, 
-                                        TObserverNotificationType aType,
-                                        const RArray<TItemId>& aObjectIdArray )
-    {    
-    if ( aObjectIdArray.Count() > 0 && ( aType == ENotifyAdd || aType == ENotifyModify || aType == ENotifyRemove ) )
-        {
-        CPFW_LOG("ToneSelectionEnginePrivate::HandleObjectNotification count = " + QVariant(aObjectIdArray.Count()).toString() + " type = " + QVariant(aType).toString());
-        const TInt KOneSecond = 1000*1000;
-        if ( !iFreshing )
-            {
-            emit notifyRefreshStart();
-            iFreshing = ETrue;
-            }
-        if ( !iTimerStarted ) 
-            {            
-            iTimer->After( 5 * KOneSecond );
-            iTimerStarted = ETrue;
-            }        
-        iContinue = ETrue;        
-        }
-    }
-
-void ToneSelectionEnginePrivate::AddObjectObserverL()
-    {
-    if ( iSessionOpen )
-        {
-        TUint32 notificationType = ENotifyAdd | ENotifyModify | ENotifyRemove;
-        CMdENamespaceDef& defNS = iSession->GetDefaultNamespaceDefL();
-        iSession->AddObjectObserverL( *this, 0, notificationType, &defNS );
-        
-        iSession->AddObjectPresentObserverL( *this );
-        }
-    }
-
-void ToneSelectionEnginePrivate::HandleObjectPresentNotification( CMdESession& /*aSession*/, 
-                         TBool /*aPresent*/, const RArray<TItemId>& aObjectIdArray )
-    {
-    if( aObjectIdArray.Count() > 0 )
-        {
-        const TInt KOneSecond = 1000*1000;
-        if ( !iFreshing )
-            {
-            emit notifyRefreshStart();
-            iFreshing = ETrue;
-            }
-        if ( !iTimerStarted ) 
-            {            
-            iTimer->After( 5 * KOneSecond );
-            iTimerStarted = ETrue;
-            }        
-        iContinue = ETrue;       
-        }    
-    }
-
-void ToneSelectionEnginePrivate::HandleQueryCompleted( CMdEQuery& aQuery, TInt aError )
-    {
-    iNameList.clear();
-    iUriList.clear();
-    if ( aError == KErrCancel )
-        {      
-        emit queryError( aError );
-        return;
-        }
-    else
-        {
-        CMdEObjectQuery* query = static_cast<CMdEObjectQuery*> (&aQuery);
-        TInt count = query->Count();
-        for (TInt i = 0; i < count; ++i)
-            {
-            CMdEObject* object =
-                    (CMdEObject*) query->TakeOwnershipOfResult(i);
-            CleanupStack::PushL(object);
-            CMdEPropertyDef& propDef = 
-                        ToneSelectionEnginePrivate::PropertyDefL( iSession, ToneSelectionEnginePrivate::EAttrSongName  );
-                
-            CMdEProperty* property = 0;
-            TInt err = object->Property( propDef, property, 0 );
-            if ( err != KErrNotFound && property )
-                {
-                QString songName( XQConversions::s60DescToQString( property->TextValueL() ) );
-                QString uriValue( XQConversions::s60DescToQString( object->Uri() ) );
-                iNameList.append( songName );
-                iUriList.append( uriValue );
-                }
-            CleanupStack::PopAndDestroy(object);
-            }
-        emit queryComplete(iNameList, iUriList );        
-        }
-    }
-
-void ToneSelectionEnginePrivate::QueryTones()
-    {
-    LeaveIfSessionClosedL();
-        
-    CMdENamespaceDef& defNS = iSession->GetDefaultNamespaceDefL();
-    CMdEObjectDef& musicObjectDef =
-    defNS.GetObjectDefL( MdeConstants::Audio::KAudioObject );
-  
-    delete iQuery;
-    iQuery = 0;
-    iQuery = iSession->NewObjectQueryL( defNS, musicObjectDef, this );    
-    
-    
-    // set attributes that are included in query result  
-    CMdEPropertyDef& namePropertyDef = PropertyDefL( EAttrSongName );
-    iQuery->AddPropertyFilterL( &namePropertyDef );
-    
-    iQuery->SetResultMode( EQueryResultModeItem );
-    
-    CMdELogicCondition& conditions = iQuery->Conditions();
-    ExcludeMusicPropertiesL( conditions );
-
-    iQuery->FindL();
-    }
-
-void ToneSelectionEnginePrivate::LeaveIfSessionClosedL()
-    {
-    if ( !iSession || !iSessionOpen )
-        {
-        User::Leave( KErrDisconnected );
-        }
-    }
-
-CMdEPropertyDef& ToneSelectionEnginePrivate::PropertyDefL( TInt aAttr )
-    {
-    return PropertyDefL( iSession, aAttr );
-    }
-
-CMdEPropertyDef& ToneSelectionEnginePrivate::PropertyDefL( CMdESession* aSession, TInt aAttr )
-    {
-    CMdENamespaceDef& defNS = aSession->GetDefaultNamespaceDefL();
-    
-    CMdEObjectDef& objectDef =
-    defNS.GetObjectDefL( MdeConstants::Audio::KAudioObject );
-   
-    if ( aAttr == EAttrFileSize )
-        {
-        return objectDef.GetPropertyDefL( MdeConstants::Object::KSizeProperty );
-        }
-    else if ( aAttr == EAttrMediaType )
-        {
-        return objectDef.GetPropertyDefL( MdeConstants::Object::KItemTypeProperty );
-        }
-    else if ( aAttr == EAttrSongName || aAttr == EAttrFileName )
-        {
-        return objectDef.GetPropertyDefL( MdeConstants::Object::KTitleProperty );
-        }
-    else if ( aAttr == EAttrArtist )
-        {
-        return objectDef.GetPropertyDefL( MdeConstants::MediaObject::KArtistProperty );
-        }
-    else if ( aAttr == EAttrAlbum )
-        {
-        return objectDef.GetPropertyDefL( MdeConstants::Audio::KAlbumProperty );
-        }
-    else if ( aAttr == EAttrGenre )
-        {
-        return objectDef.GetPropertyDefL( MdeConstants::MediaObject::KGenreProperty );
-        }
-    else if ( aAttr == EAttrComposer )
-        {
-        return objectDef.GetPropertyDefL( MdeConstants::Audio::KComposerProperty );
-        }
-    else
-        {
-        User::Leave( KErrNotSupported );
-        }
-    
-    return objectDef.GetPropertyDefL( MdeConstants::Object::KTitleProperty );
-    }
-
-void ToneSelectionEnginePrivate::ExcludeMusicPropertiesL( CMdELogicCondition& aCondition )
-    {
-    TInt sizeLimitKB = 0;
-    CRepository* cenrep = CRepository::NewL( KCRUidProfileEngine );
-    CleanupStack::PushL( cenrep );
-    User::LeaveIfError( cenrep->Get( KProEngRingingToneMaxSize, sizeLimitKB ) );
-    CleanupStack::PopAndDestroy(); // cenrep
-
-    SetAttr( ToneFetcherEngine::EAttrFileSize, sizeLimitKB );
-    CMdEPropertyDef& sizeTypeDef = PropertyDefL( EAttrFileSize );
-    CMdEPropertyDef& mimeTypeDef = PropertyDefL( EAttrMediaType );
-    CMdEPropertyDef& artistTypeDef = PropertyDefL( EAttrArtist );
-    CMdEPropertyDef& albumTypeDef = PropertyDefL( EAttrAlbum );
-    CMdEPropertyDef& genreTypeDef = PropertyDefL( EAttrGenre );
-    CMdEPropertyDef& composerTypeDef = PropertyDefL( EAttrComposer );
-    
-    CMdELogicCondition& condition = 
-                        aCondition.AddLogicConditionL( ELogicConditionOperatorAnd );
-    condition.AddPropertyConditionL( sizeTypeDef, TMdEIntRange(0, iMaxFileSize, EMdERangeTypeBetween) );
-    condition.AddPropertyConditionL( mimeTypeDef, 
-            ETextPropertyConditionCompareContains, KMimeMp3 );
-    condition.AddPropertyConditionL( artistTypeDef );
-    condition.AddPropertyConditionL( albumTypeDef );
-    condition.AddPropertyConditionL( genreTypeDef );
-    condition.AddPropertyConditionL( composerTypeDef );
-    
-    condition.SetNegate( ETrue );
-    }
-
-void ToneSelectionEnginePrivate::SetAttr( int attr, int value )
-{
-    switch ( attr )
-        {
-        case ToneFetcherEngine::EAttrFileSize:
-            {
-            iMaxFileSize = value;
-            break;
-            }            
-        default:
-            {
-            break;
-            }
-        }
-}
-
-void ToneSelectionEnginePrivate::ChangeObject()
-    {    
-    if ( iTimerStarted )
-        {
-        emit notifyObjectChanged();
-        iTimerStarted = EFalse;
-        }
-    
-    if ( iContinue  )
-        {
-        iContinue = EFalse;
-        iTimer->After( 5000*1000 );
-        iTimerStarted = ETrue;
-        }
-    else 
-        {
-        if ( iFreshing )
-            {
-            emit notifyRefreshFinish();
-            iFreshing = EFalse;
-            }        
-        }
-    }
-// End of File
-
--- a/controlpanelui/src/tonefetcher/tonefetcherengine/private/symbian/toneselectionengine_p.h	Wed Jun 23 18:13:38 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,170 +0,0 @@
-/*
- * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
- * All rights reserved.
- * This component and the accompanying materials are made available
- * under the terms of "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:
- * Nokia Corporation - initial contribution.
- * 
- * Contributors:
- * 
- * Description:
- *     The header file for mde tone fetcher.
- *     
- */
-#ifndef TONESELECTIONENGINEPRIVATE_H
-#define TONESELECTIONENGINEPRIVATE_H
-
-#include "toneselectionengine_p.h"
-#include <mdesession.h>
-#include <mdequery.h>
-#include <mdelogiccondition.h>
-#include <mdeconstants.h>
-#include <mdeobjectquery.h>
-#include <mdccommon.h>
-#include <mdeitem.h>
-#include <mdeobject.h>
-#include <e32base.h>
-#include <QObject>
-#include <QStringList>
-// FORWARD DECLARATIONS
-class ToneFetcherEngine;
-class ToneSelectionEnginePrivate;
-// CONSTANTS
-_LIT( KMimeMp3, "mp3" );
-
-class CTimeOutTimer : public CTimer
-{
-public:
-    static CTimeOutTimer* NewL(ToneSelectionEnginePrivate& aObserver);
-    static CTimeOutTimer* NewLC(ToneSelectionEnginePrivate& aObserver);
-
-    ~CTimeOutTimer();   
-
-protected:
-    virtual void RunL();    
-
-private:
-    CTimeOutTimer(ToneSelectionEnginePrivate& aObserver);
-    void ConstructL(); 
-
-private:
-
-    ToneSelectionEnginePrivate& iObserver;
-};
-
-// CLASS DECLARATION
-/**
- *  This class is used for quering tones from mde.
- *
- */
-class ToneSelectionEnginePrivate : public QObject,
-                            public CBase, 
-                            public MMdESessionObserver,
-                            public MMdEQueryObserver,
-                            public MMdEObjectObserver,
-                            public MMdEObjectPresentObserver                            
-{
-    Q_OBJECT
-public:
-
-    enum TStorageType
-        {
-        EPhoneMemory = 0, ERomStorage, EMassStorage, EMemoryCard
-        };
-    
-    enum TQueryAttribute
-        {
-        EAttrMediaType = 20, // integer
-        EAttrFileSize, // integer
-        EAttrStorageType, // integer
-        EAttrMediaFileId, // integer
-        EAttrFileName, // string
-        EAttrFullName, // string
-        EAttrSongName, // string
-        EAttrArtist, // string
-        EAttrAlbum, // string
-        EAttrGenre, // string
-        EAttrComposer
-        // string
-        };
-
-public:
-    ToneSelectionEnginePrivate(  ToneFetcherEngine *engine );
-    virtual ~ToneSelectionEnginePrivate();
-    void ChangeObject();
-signals:
-    void mdeSessionOpened();
-    void mdeSessionError( int error );
-    void queryComplete( const QStringList& nameList, const QStringList& uriList );
-    void queryError( int error );
-    void notifyObjectChanged();
-    void notifyRefreshStart();
-    void notifyRefreshFinish();
-
-public:
-    static CMdEPropertyDef& PropertyDefL(CMdESession* aSession, TInt aAttr);
-    void QueryTones();   
-    void SetAttr( int attr, int value );
-
-private:   
-    void ExcludeMusicPropertiesL(CMdELogicCondition& aCondition);    
-    void LeaveIfSessionClosedL();
-    CMdEPropertyDef& PropertyDefL(TInt aAttr);
-
-private:
-    // from MMdESessionObserver
-    void HandleSessionOpened(CMdESession& aSession, TInt aError);
-    void HandleSessionError(CMdESession& aSession, TInt aError);
-
-private:
-    // from MMdEQueryObserver (mdequery.h)
-    void HandleQueryNewResults(CMdEQuery& aQuery, TInt aFirstNewItemIndex,
-            TInt aNewItemCount);
-    void HandleQueryCompleted(CMdEQuery& aQuery, TInt aError);    
-private:
-    // from MMdEObjectObserver
-    void HandleObjectNotification(CMdESession& aSession,
-            TObserverNotificationType aType,
-            const RArray<TItemId>& aObjectIdArray);
-
-private:
-    // from MMdEObjectPresentObserver
-    void HandleObjectPresentNotification(CMdESession& aSession,
-            TBool aPresent, const RArray<TItemId>& aObjectIdArray);
-    void AddObjectObserverL();
-private:
-
-    ToneFetcherEngine *mServiceEngine;
-
-    // session to metadata engine
-    CMdESession* iSession;
-
-    // metadata query
-    CMdEObjectQuery* iQuery;
-
-    // used for saving the quering result.
-    //both name and uri.
-    QStringList iNameList;
-    QStringList iUriList;
-
-    // is metadata session open
-    TBool iSessionOpen;
-
-    // max audio file file size
-    TInt iMaxFileSize;
-    
-    // query error
-    TInt iQueryError;
-    
-    // for refresh
-    CTimeOutTimer *iTimer;
-    TBool iContinue;
-    TBool iTimerStarted;
-    TBool iFreshing;
-};
-#endif /* TONESELECTIONENGINE_H_ */
-
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/tonefetcher/tonefetcherengine/private/tonefetcherengine_stub.cpp	Tue Jul 06 14:17:10 2010 +0300
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "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:
+ * Nokia Corporation - initial contribution.
+ * 
+ * Contributors:
+ * 
+ * Description:
+ *     The source file for tone fetcher engine private class of other platforms.
+ *     
+ */
+
+#include "tonefetcherengine_stub.h"
+
+ToneFetcherEnginePrivate::ToneFetcherEnginePrivate()
+    {
+    
+    }
+
+virtual ~ToneFetcherEnginePrivate::ToneFetcherEnginePrivate()
+    {
+    
+    }
+
+void ToneFetcherEnginePrivate::getTones()
+    {
+    
+    }
+
+void ToneFetcherEnginePrivate::play( const QString & )
+    {
+    
+    }
+
+bool ToneFetcherEnginePrivate::isPlaying()
+    {
+    return false;
+    }
+
+void ToneFetcherEnginePrivate::stopPlaying()
+    {
+    
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/tonefetcher/tonefetcherengine/private/tonefetcherengine_stub.h	Tue Jul 06 14:17:10 2010 +0300
@@ -0,0 +1,37 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "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:
+ * Nokia Corporation - initial contribution.
+ * 
+ * Contributors:
+ * 
+ * Description:
+ *     The header file for tone fetcher engine private class of other platforms.
+ *     
+ */
+
+#ifndef TONEFETCHERENGINE_STUB_H
+#define TONEFETCHERENGINE_STUB_H
+
+#include <QObject>
+
+class ToneFetcherEnginePrivate : public QObject
+{
+    Q_OBJECT
+    
+public:
+    ToneFetcherEnginePrivate();
+    virtual ~ToneFetcherEnginePrivate();
+    void getTones();    
+    void play( const QString & );
+    bool isPlaying();
+    void stopPlaying();
+};
+
+#endif /* TONEFETCHERENGINE_STUB */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/tonefetcher/tonefetcherengine/private/tonefetcherengine_symbian.cpp	Tue Jul 06 14:17:10 2010 +0300
@@ -0,0 +1,94 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "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:
+ * Nokia Corporation - initial contribution.
+ * 
+ * Contributors:
+ * 
+ * Description:
+ *     The source file for tone fetcher engine private class.
+ *     
+ */
+
+
+#include "tonefetcherengine_symbian.h"
+#include "CToneSelection.h"
+#include "CTonePlayer.h"
+#include "tonefetcherutils.h"
+#include <XQConversions>
+
+ToneFetcherEnginePrivate::ToneFetcherEnginePrivate()
+    {
+    TRAPD( err, mToneSelection = CToneSelection::NewL( this ) ); 
+    TRAPD( error, mTonePlayer = CTonePlayer::NewL( this ) );    
+    }
+
+ToneFetcherEnginePrivate::~ToneFetcherEnginePrivate()
+    {
+    mResultList.clear();
+    delete mToneSelection;
+    delete mTonePlayer;
+    }
+
+void ToneFetcherEnginePrivate::getTones()
+    {
+    QT_TRAP_THROWING( mToneSelection->QueryTonesL() );
+    }
+
+void ToneFetcherEnginePrivate::play(const QString &file)
+    {    
+    QT_TRAP_THROWING( mTonePlayer->SetAttrL( XQConversions::qStringToS60Desc( ToneFetcherUtils::normalizeSeperator(file) )->Des() ) );
+    QT_TRAP_THROWING( mTonePlayer->PlayL() );
+    }
+
+bool ToneFetcherEnginePrivate::isPlaying()
+    {
+    return mTonePlayer->IsPlaying();
+    }
+
+void ToneFetcherEnginePrivate::stopPlaying()
+    {
+    mTonePlayer->Stop();
+    }
+
+void ToneFetcherEnginePrivate::HandleMdeSessionError( TInt aError )
+    {
+    emit mdeSessionError( aError );
+    }
+
+void ToneFetcherEnginePrivate::HandleMdeSessionOpened()
+    {
+    emit mdeSessionOpened();
+    }
+
+void ToneFetcherEnginePrivate::HandleQueryError( TInt aError )
+    {
+    emit queryError(aError);
+    }
+
+void ToneFetcherEnginePrivate::HandleQueryComplete( RPointerArray<TDesC>& aResultArray )
+    {
+    mResultList.clear();
+    for ( int i = 0; i < aResultArray.Count(); ++i ) 
+        {
+        mResultList.append( XQConversions::s60DescToQString( *(aResultArray[i]) ) );
+        }
+    aResultArray.ResetAndDestroy();
+    emit queryComplete(mResultList);
+    }
+
+void ToneFetcherEnginePrivate::HandleObjectChanged()
+    {
+    emit notifyObjectChanged();
+    }
+
+void ToneFetcherEnginePrivate::HandlePreviewEvent( TInt event )
+    {
+    emit notifyPreviewEvent(event);
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/tonefetcher/tonefetcherengine/private/tonefetcherengine_symbian.h	Tue Jul 06 14:17:10 2010 +0300
@@ -0,0 +1,68 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "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:
+ * Nokia Corporation - initial contribution.
+ * 
+ * Contributors:
+ * 
+ * Description:
+ *     The header file for tone fetcher engine private class of symbian platform.
+ *     
+ */
+
+#ifndef TONEFETCHERENGINEPRIVATE_H
+#define TONEFETCHERENGINEPRIVATE_H
+
+//#include <e32base.h>
+#include "MToneSelectionWatcher.h"
+#include "MTonePlayingWatcher.h"
+#include <QObject>
+#include <QStringList>
+
+class CToneSelection;
+class CTonePlayer;
+
+class ToneFetcherEnginePrivate : public QObject,                                 
+                                 public MToneSelectionWatcher,
+                                 public MTonePlayingWatcher
+{
+    Q_OBJECT
+    
+public:
+    ToneFetcherEnginePrivate();
+    virtual ~ToneFetcherEnginePrivate();
+    void getTones();    
+    void play( const QString &file );
+    bool isPlaying();
+    void stopPlaying();
+    
+public:
+    //from MToneSelectionWatcher
+    void HandleMdeSessionError( TInt aError );
+    void HandleMdeSessionOpened();
+    void HandleQueryError( TInt aError );
+    void HandleQueryComplete( RPointerArray<TDesC>& aResultArray );
+    void HandleObjectChanged();
+    //from MTonePlayingWatcher
+    void HandlePreviewEvent( TInt event );
+    
+signals:
+    void mdeSessionOpened();
+    void mdeSessionError(int error);
+    void queryComplete(const QStringList& uriList);
+    void queryError(int error);
+    void notifyObjectChanged();  
+    void notifyPreviewEvent(int event);
+
+private:
+    QStringList mResultList;
+    CToneSelection* mToneSelection;
+    CTonePlayer* mTonePlayer;
+};
+#endif /* TONEFETCHERENGINEPRIVATE_H */
--- a/controlpanelui/src/tonefetcher/tonefetcherengine/tonefetcherengine.cpp	Wed Jun 23 18:13:38 2010 +0300
+++ b/controlpanelui/src/tonefetcher/tonefetcherengine/tonefetcherengine.cpp	Tue Jul 06 14:17:10 2010 +0300
@@ -16,31 +16,29 @@
  *     
  */
 #include "tonefetcherengine.h"
-#include "toneselectionengine_p.h"
-#include "tonepreviewprivate.h"
+#ifdef Q_OS_SYMBIAN
+#include "tonefetcherengine_symbian.h"
+#else
+#include "tonefetcherengine_stub.h"
+#endif
 
 ToneFetcherEngine::ToneFetcherEngine(QObject* parent) : QObject(parent)
 {
-    d = new ToneSelectionEnginePrivate(this);
+    d = new ToneFetcherEnginePrivate();
     Q_ASSERT(d);
-    mAudioPlayer = new TonePreviewPrivate( this );
-    Q_ASSERT(mAudioPlayer);
+    
     connect(d, SIGNAL(mdeSessionOpened()), 
             this, SIGNAL(mdeSessionOpened()));
     connect(d, SIGNAL(mdeSessionError(int)),
             this, SIGNAL(mdeSessionError(int)));
-    connect(d, SIGNAL(queryComplete(QStringList, QStringList)),
-            this, SIGNAL(queryComplete(QStringList, QStringList)));
+    connect(d, SIGNAL(queryComplete(QStringList)),
+            this, SIGNAL(queryComplete(QStringList)));
     connect(d, SIGNAL(queryError(int)),
             this, SIGNAL(queryError(int)));
     connect(d, SIGNAL(notifyObjectChanged()),
-            this, SIGNAL(notifyObjectChanged()));
-    connect(d, SIGNAL(notifyRefreshStart()),
-            this, SIGNAL(notifyRefreshStart()));
-    connect(d, SIGNAL(notifyRefreshFinish()),
-            this, SIGNAL(notifyRefreshFinish()));
-    connect(mAudioPlayer, SIGNAL(notifyPreviewEvent(ToneServiceEngine::TPreviewEvent, int)),
-            this, SIGNAL(notifyPreviewEvent(ToneServiceEngine::TPreviewEvent, int)));
+            this, SIGNAL(notifyObjectChanged()));    
+    connect(d, SIGNAL(notifyPreviewEvent(int)),
+            this, SIGNAL(notifyPreviewEvent(int)));
 }
 
 ToneFetcherEngine::~ToneFetcherEngine()
@@ -48,25 +46,24 @@
     delete d;
 }
 
-void ToneFetcherEngine::getTone()
+void ToneFetcherEngine::getTones()
 {
-    d->QueryTones();
+    d->getTones();
 }
 
-void ToneFetcherEngine::preview(const QString &file )
-{
-    mAudioPlayer->SetAttr(file);
-    mAudioPlayer->Play();
+void ToneFetcherEngine::play(const QString &file)
+{    
+    d->play(file);
 }
 
-bool ToneFetcherEngine::IsPlaying()
+bool ToneFetcherEngine::isPlaying()
 {
-    mAudioPlayer->IsPlaying();
+    return d->isPlaying();
 }
 
-void ToneFetcherEngine::stop()
+void ToneFetcherEngine::stopPlaying()
 {
-    mAudioPlayer->Stop();
+    d->stopPlaying();
 }
 
 //End of File
--- a/controlpanelui/src/tonefetcher/tonefetcherengine/tonefetcherengine.h	Wed Jun 23 18:13:38 2010 +0300
+++ b/controlpanelui/src/tonefetcher/tonefetcherengine/tonefetcherengine.h	Tue Jul 06 14:17:10 2010 +0300
@@ -19,15 +19,14 @@
 #ifndef TONEFETCHERENGINE_H
 #define TONEFETCHERENGINE_H
 #include <QObject>
-#include "toneselectionengine_p.h"
 #include <QStringList>
-class TonePreviewPrivate;
-class ToneSelectionEnginePrivate;
+
+class ToneFetcherEnginePrivate;
 
 // CLASS DECLARATION
 /**
  *  This class is used for interacting with platform based codes
- *  including fetching tones from MDE (Metadata Engine) and previewing tones
+ *  including fetching tones from MDE (Metadata Engine) and playing tones
  *  using platform-dependant interface.
  *
  */
@@ -35,69 +34,36 @@
 {
     Q_OBJECT
     
-public:
-    enum TMediaFileListAttribute {
-        // max media file size
-        EAttrFileSize = 0,
-        // ringing volume (TProfileRingingVolume from Profile.hrh)
-        EAttrVolume,
-        // ringing type,  (TProfileRingingType from Profile.hrh)
-        EAttrRingingType,
-        // vibra on/off   (Boolean) 
-        EAttrVibra,
-        // 3D effect      (TProfile3DToneEffect from ProfileInternal.hrh)
-        EAttr3DEffect,
-        // 3D echo        (TProfile3DToneEcho from ProfileInternal.hrh)
-        EAttr3DEcho,
-        // excluded mime type text
-        EAttrExcludeMimeType,
-        // for file protection checking
-        EAttrAutomatedType,
-        // media file dialog title
-        EAttrTitle,
-        // excluded folder (see enum TFolderType)
-        EAttrExcludeFolder
-    };
-    
-    enum State {
-    SessionConnected = 0,
-    SessionError    
-    };
-    
-    enum TPreviewEvent {         
-        EAudioPreviewComplete, 
-        EPreviewError
-    };
+public:    
     explicit ToneFetcherEngine( QObject* parent = 0 );
     ~ToneFetcherEngine();
     /*
      * search the tone using MDE, not including rom files.
      */
-    void getTone();
+    void getTones();
     
     /*
      * preview the tone
      * @param file the absolute path of the file.
      */
-    void preview(const QString &file);
+    void play(const QString &file);
     
-    bool IsPlaying();
+    bool isPlaying();
     
     /*
-     * stop previewing
+     * stop playing
      */
-    void stop();
+    void stopPlaying();
+    
 signals:
     void mdeSessionOpened();
     void mdeSessionError(int error);
-    void queryComplete(const QStringList &nameList, const QStringList &uriList);
+    void queryComplete(const QStringList &uriList);
     void queryError(int error);
-    void notifyPreviewEvent(ToneFetcherEngine::TPreviewEvent event, int errorId);
+    void notifyPreviewEvent(int event);
     void notifyObjectChanged();
-    void notifyRefreshStart();
-    void notifyRefreshFinish();
+    
 private:
-    ToneSelectionEnginePrivate *d;
-    TonePreviewPrivate *mAudioPlayer;
+    ToneFetcherEnginePrivate *d;
 };
 #endif