Revision: 201019
authorDremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Thu, 27 May 2010 12:45:33 +0300
changeset 27 516a867811c3
parent 24 408f75ba5bc2
child 30 d3981f4fe6a4
Revision: 201019 Kit: 2010121
deviceupdatesui/cpqtsp/cpqtsp.pro
deviceupdatesui/devicemanagementnotifiersplugin/devicemanagementnotifierplugin.cpp
deviceupdatesui/devicemanagementnotifiersplugin/devicemanagementnotifiersplugin.pro
deviceupdatesui/devicemanagementnotifiersplugin/devicemanagementnotifierutils.cpp
deviceupdatesui/deviceupdates/deviceupdates.pro
deviceupdatesui/deviceupdates/inc/dmadvancedview.h
deviceupdatesui/deviceupdates/src/dmadvancedview.cpp
deviceupdatesui/deviceupdates/src/dmfotaview.cpp
deviceupdatesui/deviceupdates/src/main.cpp
deviceupdatesui/deviceupdatesplugin/deviceupdatesplugin.pro
deviceupdatesui/deviceupdatesplugin/inc/deviceupdatesdata.h
deviceupdatesui/deviceupdatesplugin/inc/deviceupdatesplugin.h
deviceupdatesui/deviceupdatesplugin/resources/deviceupdatesplugin.qrc
deviceupdatesui/deviceupdatesplugin/resources/qtg_large_device_update.svg
deviceupdatesui/deviceupdatesplugin/src/deviceupdatesdata.cpp
deviceupdatesui/deviceupdatesplugin/src/deviceupdatesplugin.cpp
--- a/deviceupdatesui/cpqtsp/cpqtsp.pro	Fri May 14 15:42:35 2010 +0300
+++ b/deviceupdatesui/cpqtsp/cpqtsp.pro	Thu May 27 12:45:33 2010 +0300
@@ -33,7 +33,7 @@
 LIBS+=-lxqservice -lxqserviceutil -lflogger
 MMP_RULES += "LIBRARY msgs.lib centralrepository.lib provisioningengine.lib featmgr.lib"
 
-#TRANSLATIONS += deviceupdates.ts
+TRANSLATIONS += deviceupdates.ts
 
 SERVICE.FILE = resources/service_conf.xml
 SERVICE.OPTIONS = embeddable
--- a/deviceupdatesui/devicemanagementnotifiersplugin/devicemanagementnotifierplugin.cpp	Fri May 14 15:42:35 2010 +0300
+++ b/deviceupdatesui/devicemanagementnotifiersplugin/devicemanagementnotifierplugin.cpp	Thu May 27 12:45:33 2010 +0300
@@ -79,7 +79,11 @@
     const QVariantMap &parameters, DeviceDialogInfo *info) const
 {
     
-  
+   info->group = GenericDeviceDialogGroup;
+
+info->flags = NoDeviceDialogFlags;
+
+info->priority = DefaultPriority;
     return true;
 }
 
--- a/deviceupdatesui/devicemanagementnotifiersplugin/devicemanagementnotifiersplugin.pro	Fri May 14 15:42:35 2010 +0300
+++ b/deviceupdatesui/devicemanagementnotifiersplugin/devicemanagementnotifiersplugin.pro	Thu May 27 12:45:33 2010 +0300
@@ -19,7 +19,7 @@
 HEADERS += devicemanagementnotifierutils.h 
 HEADERS += syncmlnotifierprivate.h
 RESOURCES = devicemanagementnotifierdevman.qrc
-#TRANSLATIONS += deviceupdates.ts
+TRANSLATIONS += deviceupdates.ts
 
 symbian: {
     TARGET.EPOCALLOWDLLDATA = 1
--- a/deviceupdatesui/devicemanagementnotifiersplugin/devicemanagementnotifierutils.cpp	Fri May 14 15:42:35 2010 +0300
+++ b/deviceupdatesui/devicemanagementnotifiersplugin/devicemanagementnotifierutils.cpp	Thu May 27 12:45:33 2010 +0300
@@ -186,11 +186,11 @@
         contentbody->setPlainText(serverinitmessage);
 
         //set softkeys
-        HbAction *primaryAction = dialog->primaryAction();
+        HbAction *primaryAction = (HbAction *) dialog->actions().first();
         QString softkeyok = hbTrId("txt_common_button_ok");
         primaryAction->setText(softkeyok);
 
-        HbAction *secondaryAction = dialog->secondaryAction();
+        HbAction *secondaryAction = (HbAction *) dialog->actions().at(1);
         QString softkeyCancel = hbTrId("txt_common_button_cancel");
         secondaryAction->setText(softkeyCancel);
 
@@ -313,11 +313,11 @@
     contentbody->setPlainText(string);
 
     //set softkeys
-    HbAction *primaryAction = dialog->primaryAction();
+    HbAction *primaryAction = (HbAction *) dialog->actions().first();
     QString softkeyok = hbTrId("txt_common_button_yes");
     primaryAction->setText(softkeyok);
 
-    HbAction *secondaryAction = dialog->secondaryAction();
+    HbAction *secondaryAction = (HbAction *) dialog->actions().at(1);
     QString softkeyCancel = hbTrId("txt_common_button_no");
     secondaryAction->setText(softkeyCancel);
 
--- a/deviceupdatesui/deviceupdates/deviceupdates.pro	Fri May 14 15:42:35 2010 +0300
+++ b/deviceupdatesui/deviceupdates/deviceupdates.pro	Thu May 27 12:45:33 2010 +0300
@@ -82,6 +82,6 @@
 			
 RESOURCES += ./resources/deviceupdates.qrc
 CONFIG += hb
-#TRANSLATIONS += deviceupdates.ts
+TRANSLATIONS += deviceupdates.ts
    
 
--- a/deviceupdatesui/deviceupdates/inc/dmadvancedview.h	Fri May 14 15:42:35 2010 +0300
+++ b/deviceupdatesui/deviceupdates/inc/dmadvancedview.h	Thu May 27 12:45:33 2010 +0300
@@ -45,6 +45,12 @@
 #include <etel3rdparty.h>
 #include <etelmm.h>
 #include <etel.h>
+#include <sysutil.h>
+#include <sysversioninfo.h>
+#include <swi/sisregistrypackage.h>
+#include <swi/sisregistryentry.h>
+#include <swi/sisregistrysession.h>
+#include "nsmldmsyncprivatecrkeys.h"
 #include "serversettingsview.h"
 #include "dminforetrieval.h"
 #define DOCML_FILE_NAME ":xml/serversview.docml"
--- a/deviceupdatesui/deviceupdates/src/dmadvancedview.cpp	Fri May 14 15:42:35 2010 +0300
+++ b/deviceupdatesui/deviceupdates/src/dmadvancedview.cpp	Thu May 27 12:45:33 2010 +0300
@@ -416,7 +416,7 @@
 void DmAdvancedView::mainCalltoUpdateView()
 {   
     int IndicatorCount =6;
-    otherdetailsmodel = new QStandardItemModel(IndicatorCount,0);
+    otherdetailsmodel = new QStandardItemModel();
     TInt i=0;
     TRequestStatus status;
     QStringList liststr;
@@ -549,6 +549,31 @@
     liststr << str;
     item->setData(liststr , Qt::DisplayRole);
     otherdetailsmodel->setItem(i++, item);
+	
+	    
+    TBuf<KSysUtilVersionTextLength> Langversion; 
+    TBuf<KSysUtilVersionTextLength> lversion;
+
+	    //lang variant version
+    Langversion.Zero();
+    if( SysUtil::GetLangSWVersion(Langversion ) == KErrNone )
+        {
+        int len = Langversion.Length();
+        TInt pos1 = Langversion.Find( KSmlEOL );
+        if( pos1 != KErrNotFound && len > pos1 )
+            {
+            lversion.Zero();
+            lversion.Append( Langversion.Left( pos1 ) );
+            }
+         str = QString::fromUtf16(lversion.Ptr(), lversion.Length());
+         item = new QStandardItem();
+         val = hbTrId("txt_device_update_dblist_language_variant_version");
+         liststr.clear();
+         liststr << val;
+         liststr << str;
+         item->setData(liststr , Qt::DisplayRole);
+         otherdetailsmodel->appendRow(item);
+        }
     
     otherdetailslist->setModel(otherdetailsmodel);
 		
--- a/deviceupdatesui/deviceupdates/src/dmfotaview.cpp	Fri May 14 15:42:35 2010 +0300
+++ b/deviceupdatesui/deviceupdates/src/dmfotaview.cpp	Thu May 27 12:45:33 2010 +0300
@@ -173,6 +173,20 @@
             }
 
     //Model
+    TBuf<100> phoneName;
+    TInt error = SysVersionInfo::GetVersionInfo(SysVersionInfo::EModelVersion, phoneName);
+    if (error==KErrNone)
+    {
+    
+    //phoneName.Copy( telid.iModel );
+    //imei.Copy(telid.iSerialNumber);
+    if( phoneName.Length()>0 )
+        {
+        val = hbTrId("txt_device_update_dblist_model");
+        str = QString::fromUtf16(phoneName.Ptr(), phoneName.Length());
+        FormatList(val,str);
+        }
+    }
     RTelServer telServer;
     User::LeaveIfError( telServer.Connect() );
     RTelServer::TPhoneInfo teleinfo;
@@ -189,17 +203,10 @@
     TBuf <50> imei;
     if (status==KErrNone)
     {
-    TBuf<100> phoneName;
-    phoneName.Copy( telid.iModel );
     imei.Copy(telid.iSerialNumber);
-    if( phoneName.Length()>0 )
-        {
-        val = hbTrId("txt_device_update_dblist_model");
-        str = QString::fromUtf16(phoneName.Ptr(), phoneName.Length());
-        FormatList(val,str);
-        }
     }
     phone.Close();
+    
     telServer.Close();
 
     //type
@@ -227,7 +234,7 @@
           { */
          TBuf<KSysUtilVersionTextLength> productcode;
          productcode.Zero();
-         TInt error = SysVersionInfo::GetVersionInfo(SysVersionInfo::EProductCode, productcode);
+         error = SysVersionInfo::GetVersionInfo(SysVersionInfo::EProductCode, productcode);
          if(error ==KErrNone )
          {            
              if( productcode.Length()>0 )
--- a/deviceupdatesui/deviceupdates/src/main.cpp	Fri May 14 15:42:35 2010 +0300
+++ b/deviceupdatesui/deviceupdates/src/main.cpp	Thu May 27 12:45:33 2010 +0300
@@ -23,53 +23,43 @@
 
 int main(int argc, char *argv[])
 {
+   HbApplication app(argc, argv);
+   //HbView* newview= new HbView();
 
-    HbApplication app(argc, argv);
-    //HbView* newview= new HbView();
-
-    QTranslator *translator = new QTranslator();
+   QTranslator *translator = new QTranslator();
    QString lang = QLocale::system().name();
    qDebug("OMADM Loading qm file");
    qDebug()<<lang;
    QString path = "z:/resource/qt/translations/";
-    // bool fine = translator->load("deviceupdates_" + lang, path);/*finally required once localisation available*/
-    bool fine = translator->load("deviceupdates_en.qm", path);
-	if(fine)
-   qApp->installTranslator(translator);
-   else
-   qDebug("omadm translator loading failed");
    
-    QTranslator *commontranslator = new QTranslator();
+   bool fine = translator->load("deviceupdates_" + lang, path);/*finally required once localisation available*/
+   //bool fine = translator->load("deviceupdates_en.qm", path);
+	 if(fine)
+   		qApp->installTranslator(translator);
+   else
+   		qDebug("omadm translator loading failed");
    
-   	fine = commontranslator->load("common_" + lang + ".qm", path);/*finally required once localisation available*/
-    //fine = commontranslator->load("common_en" , path);
-   	if(fine)
-   qApp->installTranslator(translator);
-   else
-   qDebug("omadm common translator loading failed");
+   QTranslator *commontranslator = new QTranslator();
    
-    app.setApplicationName(hbTrId("txt_device_update_subhead_device_updates"));
-    
-    CRepository *cenrep = CRepository::NewL(KUidSmlSyncApp);
-    TInt val(0);
-    if(cenrep)
-        {        
-        cenrep->Get(KNsmlDmUILaunch, val);
-            {
-            if(val==1)
-                {
-                QTranslator *tempTranslator = new QTranslator();
-    			QString lang = QLocale::system().name();
-    			tempTranslator->load("control_panel_" + lang, path);
-    			qApp->installTranslator(tempTranslator);
-    			app.setApplicationName(hbTrId("txt_applib_list_control_panel"));
-    			val=0;
-    			cenrep->Set(KNsmlDmUILaunch, val);
-    			delete cenrep;
-    			cenrep = NULL;
-                }
-            }
-        }
+   fine = commontranslator->load("common_" + lang + ".qm", path);/*finally required once localisation available*/
+   //fine = commontranslator->load("common_en" , path);
+   if(fine)
+   		qApp->installTranslator(translator);
+   else
+   		qDebug("omadm common translator loading failed");
+   
+   if( argc == 2) // Launch via Control Panel
+    {    	
+    	QTranslator *cptranslator = new QTranslator();
+    	cptranslator->load("control_panel_" + lang, path);
+    	qApp->installTranslator(cptranslator);
+    	app.setApplicationName(hbTrId("txt_applib_list_control_panel"));
+    }
+    else
+    {    		
+    		app.setApplicationName(hbTrId("txt_device_update_subhead_device_updates"));	
+    }  
+
     HbMainWindow window;
 
     DMFotaView* view = new DMFotaView(&window);
--- a/deviceupdatesui/deviceupdatesplugin/deviceupdatesplugin.pro	Fri May 14 15:42:35 2010 +0300
+++ b/deviceupdatesui/deviceupdatesplugin/deviceupdatesplugin.pro	Thu May 27 12:45:33 2010 +0300
@@ -28,7 +28,9 @@
 CONFIG += hb plugin
 
 LIBS += -lcpframework \
-					-lcentralrepository
+					-lcentralrepository \
+					-lws32 \
+					-lapparc
 
 # Input
 HEADERS += deviceupdatesplugin.h \
@@ -66,5 +68,6 @@
 plugin.sources = deviceupdatesplugin.dll
 plugin.path = \resource\qt\plugins\controlpanel
 DEPLOYMENT += plugin
+RESOURCES += ./resources/deviceupdatesplugin.qrc
 
 # End of file	--Don't remove this.
\ No newline at end of file
--- a/deviceupdatesui/deviceupdatesplugin/inc/deviceupdatesdata.h	Fri May 14 15:42:35 2010 +0300
+++ b/deviceupdatesui/deviceupdatesplugin/inc/deviceupdatesdata.h	Thu May 27 12:45:33 2010 +0300
@@ -18,6 +18,7 @@
 #ifndef	DEVICEUPDATESDATA_H_
 #define	DEVICEUPDATESDATA_H_
 
+#include <QtCore/QProcess>
 #include <cpsettingformentryitemdata.h>
 
 _LIT( KDMUIProcess, "\\deviceupdates.exe" );
@@ -37,13 +38,16 @@
 												const QString &description = QString(),
 												const HbIcon &icon = HbIcon(),
 												const HbDataFormModelItem *parent = 0);
-    void OpenDmAppL();
-    void CloseDmUi();
+    void LaunchDeviceUpdatesUi();
+    void CloseDeviceUpdatesUi();
     virtual ~DeviceUpdateData();
 public slots:
 	void onLaunchView();
 private:
 	virtual CpBaseSettingView *createSettingView() const;
+	
+private:
+		QProcess *mproc;
 
 };
 #endif//	DEVICEUPDATESVIEW_H_
--- a/deviceupdatesui/deviceupdatesplugin/inc/deviceupdatesplugin.h	Fri May 14 15:42:35 2010 +0300
+++ b/deviceupdatesui/deviceupdatesplugin/inc/deviceupdatesplugin.h	Thu May 27 12:45:33 2010 +0300
@@ -19,24 +19,22 @@
 #ifndef DEVICEUPDATESPLUGIN_H_
 #define DEVICEUPDATESPLUGIN_H_
 
-#include <cppluginplatinterface.h>
+#include <cpplugininterface.h>
 #include <qobject.h>
 
 
 class CpItemDataHelper;
 
-class DeviceUpdatesPlugin : public QObject, public CpPluginPlatInterface
+class DeviceUpdatesPlugin : public QObject, public CpPluginInterface
 {
 	Q_OBJECT
-  Q_INTERFACES(CpPluginPlatInterface)
+  Q_INTERFACES(CpPluginInterface)
 
 public:
 		DeviceUpdatesPlugin();
 
     virtual ~DeviceUpdatesPlugin();
-
-    virtual int uid() const;
-    virtual CpSettingFormItemData *createSettingFormItemData(CpItemDataHelper &itemDataHelper) const;
+    virtual QList<CpSettingFormItemData*> createSettingFormItemData(CpItemDataHelper &itemDataHelper) const;
 };
 
 #endif /* DEVICEUPDATESPLUGIN_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/deviceupdatesui/deviceupdatesplugin/resources/deviceupdatesplugin.qrc	Thu May 27 12:45:33 2010 +0300
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<RCC>
+    <qresource prefix="/resources">
+        <file alias="qtg_large_device_update.svg">qtg_large_device_update.svg</file>
+    </qresource>
+</RCC>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/deviceupdatesui/deviceupdatesplugin/resources/qtg_large_device_update.svg	Thu May 27 12:45:33 2010 +0300
@@ -0,0 +1,132 @@
+<?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="2.001" y2="57.8555">
+<stop offset="0" style="stop-color:#D1D7D9"/>
+<stop offset="0.0667" style="stop-color:#D1D7D9"/>
+<stop offset="0.2606" style="stop-color:#BDC2C4"/>
+<stop offset="0.6606" style="stop-color:#949DA1"/>
+<stop offset="0.9636" style="stop-color:#ADB3B5"/>
+<stop offset="1" style="stop-color:#595C5E"/>
+</linearGradient>
+<path d="M48.027,54.932c0,1.693-1.375,3.069-3.068,3.069h-29.92c-1.693,0-3.066-1.376-3.066-3.069V5.07  c0-1.696,1.373-3.069,3.066-3.069h29.92c1.693,0,3.068,1.373,3.068,3.069V54.932z" fill="url(#SVGID_1_)"/>
+<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_2_" x1="30" x2="30" y1="2.001" y2="56.899">
+<stop offset="0" style="stop-color:#E4EBED"/>
+<stop offset="0.0667" style="stop-color:#E4EBED"/>
+<stop offset="0.2606" style="stop-color:#D6DCDE"/>
+<stop offset="0.6606" style="stop-color:#B2BEC2"/>
+<stop offset="1" style="stop-color:#ADB3B5"/>
+</linearGradient>
+<path d="M44.959,2.001h-29.92c-1.693,0-3.066,1.373-3.066,3.069v49.861c0,0.82,0.324,1.56,0.848,2.11  c-0.047-0.187-0.08-0.377-0.08-0.575v-1.535V6.602V5.07c0-1.271,1.031-2.304,2.299-2.304h29.92c1.268,0,2.301,1.033,2.301,2.304  v1.531v48.33v1.535c0,0.198-0.033,0.389-0.08,0.575c0.521-0.551,0.848-1.29,0.848-2.11V5.07C48.027,3.374,46.652,2.001,44.959,2.001  z" fill="url(#SVGID_2_)"/>
+<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_3_" x1="30" x2="30" y1="5.8916" y2="43.4283">
+<stop offset="0" style="stop-color:#B6BBBD"/>
+<stop offset="1" style="stop-color:#F0FBFF"/>
+</linearGradient>
+<rect fill="url(#SVGID_3_)" fill-opacity="0.6" height="37.589" stroke-opacity="0.6" width="31.453" x="14.273" y="5.836"/>
+<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_4_" x1="29.999" x2="29.999" y1="6.6548" y2="42.6624">
+<stop offset="0" style="stop-color:#6E6E6E"/>
+<stop offset="1" style="stop-color:#333333"/>
+</linearGradient>
+<rect fill="url(#SVGID_4_)" height="36.058" width="29.92" x="15.039" y="6.602"/>
+<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_5_" x1="30" x2="30" y1="7.4214" y2="41.894">
+<stop offset="0" style="stop-color:#3BC8EB"/>
+<stop offset="0.3879" style="stop-color:#2D9BD2"/>
+<stop offset="0.8909" style="stop-color:#1347BA"/>
+<stop offset="1" style="stop-color:#1347BA"/>
+</linearGradient>
+<rect fill="url(#SVGID_5_)" height="34.521" width="28.383" x="15.809" y="7.37"/>
+<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_6_" x1="30" x2="30" y1="7.9712" y2="21.69">
+<stop offset="0" style="stop-color:#85EFFF"/>
+<stop offset="1" style="stop-color:#3BA1D9"/>
+</linearGradient>
+<polygon fill="url(#SVGID_6_)" points="44.191,19.644 15.809,22.712 15.809,8.137 44.191,8.137 "/>
+<rect fill="#9FE4FF" height="0.767" width="28.383" x="15.809" y="7.37"/>
+<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_7_" x1="30.2236" x2="30.2236" y1="5.8726" y2="2.8032">
+<stop offset="0" style="stop-color:#FFFFFF"/>
+<stop offset="1" style="stop-color:#D1D7D9"/>
+</linearGradient>
+<path d="M26.832,5.836c-0.861,0-1.535-0.563-1.535-1.279v-0.51c0-0.718,0.674-1.28,1.535-1.28h6.785  c0.859,0,1.533,0.563,1.533,1.28v0.51c0,0.716-0.674,1.279-1.533,1.279H26.832z" fill="url(#SVGID_7_)"/>
+<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_8_" x1="30.2236" x2="30.2236" y1="3.2158" y2="5.1992">
+<stop offset="0" style="stop-color:#6C7375"/>
+<stop offset="1" style="stop-color:#BDC2C4"/>
+</linearGradient>
+<path d="M34.383,4.557c0,0.283-0.342,0.514-0.766,0.514h-6.785c-0.424,0-0.768-0.23-0.768-0.514v-0.51  c0-0.283,0.344-0.512,0.768-0.512h6.785c0.424,0,0.766,0.229,0.766,0.512V4.557z" fill="url(#SVGID_8_)"/>
+<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_9_" x1="29.8818" x2="29.8818" y1="44.2236" y2="55.628">
+<stop offset="0" style="stop-color:#B6BBBD"/>
+<stop offset="1" style="stop-color:#FFFFFF"/>
+</linearGradient>
+<path d="M27.109,55.7c-1.645,0-2.98-1.323-2.98-2.951v-5.606c0-1.627,1.336-2.951,2.98-2.951  h5.545c1.645,0,2.98,1.324,2.98,2.951v5.606c0,1.628-1.336,2.951-2.98,2.951H27.109z" fill="url(#SVGID_9_)" fill-opacity="0.6" stroke-opacity="0.6"/>
+<path d="M27.105,54.932c-1.219,0-2.211-0.979-2.211-2.183v-5.606c0-1.204,0.992-2.183,2.211-2.183  h5.553c1.219,0,2.209,0.979,2.209,2.183v5.606c0,1.204-0.99,2.183-2.209,2.183H27.105z" fill="#020202" fill-opacity="0.5" stroke-opacity="0.5"/>
+<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_10_" x1="29.8818" x2="29.8818" y1="45.6865" y2="54.1806">
+<stop offset="0" style="stop-color:#A6A8AB"/>
+<stop offset="0.703" style="stop-color:#58595B"/>
+<stop offset="1" style="stop-color:#808184"/>
+</linearGradient>
+<path d="M34.102,52.749c0,0.783-0.645,1.417-1.438,1.417h-5.566c-0.793,0-1.436-0.634-1.436-1.417v-5.606  c0-0.783,0.643-1.417,1.436-1.417h5.566c0.793,0,1.438,0.634,1.438,1.417V52.749z" fill="url(#SVGID_10_)"/>
+<path d="M28.73,52.632c-0.846,0-1.533-0.688-1.533-1.534v-2.303c0-0.847,0.688-1.534,1.533-1.534  h2.303c0.846,0,1.533,0.688,1.533,1.534v2.303c0,0.847-0.688,1.534-1.533,1.534H28.73z" fill="#020202" fill-opacity="0.2" stroke-opacity="0.2"/>
+<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_11_" x1="29.8809" x2="29.8809" y1="48.0103" y2="51.8696">
+<stop offset="0" style="stop-color:#D1D7D9"/>
+<stop offset="0.0667" style="stop-color:#D1D7D9"/>
+<stop offset="0.2606" style="stop-color:#BDC2C4"/>
+<stop offset="0.6606" style="stop-color:#949DA1"/>
+<stop offset="0.9636" style="stop-color:#ADB3B5"/>
+<stop offset="1" style="stop-color:#595C5E"/>
+</linearGradient>
+<path d="M28.73,51.863c-0.422,0-0.768-0.345-0.768-0.766v-2.303c0-0.422,0.346-0.767,0.768-0.767h2.303  c0.42,0,0.766,0.345,0.766,0.767v2.303c0,0.421-0.346,0.766-0.766,0.766H28.73z" fill="url(#SVGID_11_)"/>
+<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_12_" x1="17.667" x2="17.667" y1="44.917" y2="54.1816">
+<stop offset="0" style="stop-color:#B6BBBD"/>
+<stop offset="1" style="stop-color:#F0FBFF"/>
+</linearGradient>
+<path d="M17.223,54.166c-1.625,0-2.949-1.323-2.949-2.951v-3.307  c0-1.624,1.324-2.948,2.949-2.948h0.887c1.627,0,2.951,1.324,2.951,2.948v3.307c0,1.628-1.324,2.951-2.951,2.951H17.223z" fill="url(#SVGID_12_)" fill-opacity="0.4" stroke-opacity="0.4"/>
+<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_13_" x1="17.665" x2="17.665" y1="45.6899" y2="53.4106">
+<stop offset="0" style="stop-color:#231F20"/>
+<stop offset="1" style="stop-color:#6D6E70"/>
+</linearGradient>
+<path d="M17.223,53.397c-1.203,0-2.184-0.979-2.184-2.183v-3.307  c0-1.201,0.98-2.183,2.184-2.183h0.887c1.205,0,2.182,0.981,2.182,2.183v3.307c0,1.204-0.977,2.183-2.182,2.183H17.223z" fill="url(#SVGID_13_)" fill-opacity="0.7" stroke-opacity="0.7"/>
+<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_14_" x1="17.667" x2="17.667" y1="46.4658" y2="52.6426">
+<stop offset="0" style="stop-color:#C6FF45"/>
+<stop offset="0.7273" style="stop-color:#66A00E"/>
+<stop offset="1" style="stop-color:#387300"/>
+</linearGradient>
+<path d="M19.525,51.215c0,0.783-0.635,1.417-1.416,1.417h-0.887c-0.779,0-1.414-0.634-1.414-1.417v-3.307  c0-0.78,0.635-1.414,1.414-1.414h0.887c0.781,0,1.416,0.634,1.416,1.414V51.215z" fill="url(#SVGID_14_)"/>
+<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_15_" x1="41.6719" x2="41.6719" y1="44.917" y2="54.1816">
+<stop offset="0" style="stop-color:#B6BBBD"/>
+<stop offset="1" style="stop-color:#F0FBFF"/>
+</linearGradient>
+<path d="M41.229,54.166c-1.625,0-2.949-1.323-2.949-2.951v-3.307  c0-1.624,1.324-2.948,2.949-2.948h0.885c1.627,0,2.951,1.324,2.951,2.948v3.307c0,1.628-1.324,2.951-2.951,2.951H41.229z" fill="url(#SVGID_15_)" fill-opacity="0.4" stroke-opacity="0.4"/>
+<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_16_" x1="41.6709" x2="41.6709" y1="45.6899" y2="53.4106">
+<stop offset="0" style="stop-color:#231F20"/>
+<stop offset="1" style="stop-color:#6D6E70"/>
+</linearGradient>
+<path d="M41.229,53.397c-1.203,0-2.184-0.979-2.184-2.183v-3.307  c0-1.201,0.98-2.183,2.184-2.183h0.885c1.205,0,2.184,0.981,2.184,2.183v3.307c0,1.204-0.979,2.183-2.184,2.183H41.229z" fill="url(#SVGID_16_)" fill-opacity="0.7" stroke-opacity="0.7"/>
+<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_17_" x1="41.6719" x2="41.6719" y1="46.4658" y2="52.6426">
+<stop offset="0" style="stop-color:#FFC142"/>
+<stop offset="0.7455" style="stop-color:#CF4E18"/>
+<stop offset="1" style="stop-color:#B52100"/>
+</linearGradient>
+<path d="M43.531,51.215c0,0.783-0.637,1.417-1.418,1.417h-0.885c-0.781,0-1.416-0.634-1.416-1.417v-3.307  c0-0.78,0.635-1.414,1.416-1.414h0.885c0.781,0,1.418,0.634,1.418,1.414V51.215z" fill="url(#SVGID_17_)"/>
+<rect fill="none" height="60" width="60"/>
+</g>
+<g transform="matrix(1 0 0 1 30 30)">
+<polygon fill="none" points="30.096,0 0.096,0 0.096,14.833 0,14.833 0.096,14.933 0.096,30 14.601,30 15.021,30.438 15.447,30   30.096,30 30.096,14.963 30.215,14.841 30.096,14.841 "/>
+<polygon fill-opacity="0.35" points="0,14.833 3.596,14.828 3.625,14.859 8.375,14.859 8.375,0 21.73,0.001 21.73,14.843 30.215,14.841   15.021,30.438 " stroke-opacity="0.35"/>
+<linearGradient gradientTransform="matrix(1 1.000000e-004 1.000000e-004 -1 2191.3389 2985.8491)" gradientUnits="userSpaceOnUse" id="SVGID_1__" x1="-2176.5142" x2="-2176.5142" y1="2984.646" y2="2957.3247">
+<stop offset="0" style="stop-color:#C6FF45"/>
+<stop offset="0.7273" style="stop-color:#66A00E"/>
+<stop offset="1" style="stop-color:#387300"/>
+</linearGradient>
+<polygon fill="url(#SVGID_1__)" points="2.846,15.859 15.025,28.575 27.398,15.845 20.732,15.843 20.727,1.292 9.375,1.291   9.375,15.859 "/>
+<line fill="none" x1="20.727" x2="9.375" y1="1.297" y2="1.296"/>
+<polygon fill="#E7FFB9" points="9.375,1 20.729,1.001 20.727,1.593 9.375,1.592 "/>
+<polygon fill="#E7FFB9" points="20.555,15.867 27.527,15.867 27,16.458 20.555,16.458 "/>
+<polygon fill="#E7FFB9" points="2.459,15.859 9.365,15.859 9.365,16.451 3.08,16.451 "/>
+<linearGradient gradientTransform="matrix(1 1.000000e-004 1.000000e-004 -1 2191.3389 2985.8491)" gradientUnits="userSpaceOnUse" id="SVGID_2__" x1="-2165.6621" x2="-2187.9482" y1="2963.2173" y2="2963.2173">
+<stop offset="0" style="stop-color:#AAE535"/>
+<stop offset="1" style="stop-color:#5D9C0A"/>
+</linearGradient>
+<polygon fill="url(#SVGID_2__)" points="27.016,15.844 15.025,28.15 3.172,15.829 2.348,15.83 15.025,29 27.842,15.844 "/>
+<rect fill="none" height="30" width="30" x="0.096"/>
+</g>
+</svg>
--- a/deviceupdatesui/deviceupdatesplugin/src/deviceupdatesdata.cpp	Fri May 14 15:42:35 2010 +0300
+++ b/deviceupdatesui/deviceupdatesplugin/src/deviceupdatesdata.cpp	Thu May 27 12:45:33 2010 +0300
@@ -15,9 +15,11 @@
 *
 */
 
-
+#include <QtCore/QProcess>
+#include <QtCore/QDir>
+#include <QtCore/QLibraryInfo>
 #include <cpsettingformitemdata.h>
-#include <centralrepository.h>
+#include <apgtask.h>
 #include "deviceupdatesdata.h"
 
 
@@ -32,72 +34,72 @@
 													   icon,
 													   parent)
 {
+	mproc = NULL;
 }
 
 DeviceUpdateData::~DeviceUpdateData()
 {
-	CloseDmUi();
+	CloseDeviceUpdatesUi();
+	if (mproc)
+	{
+		delete mproc;
+		mproc = NULL;
+	}
 }
 
 // -----------------------------------------------------------------------------
 // DeviceUpdateData::OpenDmAppL()
 // -----------------------------------------------------------------------------
 //
-void DeviceUpdateData::OpenDmAppL()
+void DeviceUpdateData::LaunchDeviceUpdatesUi()
 	{	
 		
-    	// Create DM UI Process
-			RProcess rp;
-			TInt cpLaunch(1);
-			CRepository *cenrep = CRepository::NewL(KUidSmlSyncApp);
-			if(cenrep)
-				{
-					cenrep->Set( KNsmlDmUILaunch, cpLaunch);
-					delete cenrep;
-					cenrep = NULL;
-				}	
-    	TInt err = rp.Create(KDMUIProcess,KNullDesC);
-            
-    	User::LeaveIfError(err);  
-    
-		
-      	rp.Resume();    // logon OK - start the server
-      
-    		
+		RWsSession ws;
+    User::LeaveIfError( ws.Connect() );
+    CleanupClosePushL( ws );
+    // Find the task with uid
+    TApaTaskList taskList(ws);
+    TApaTask task = taskList.FindApp( KUidSmlSyncApp );    
+    if ( task.Exists() )
+    {    	    
+        task.BringToForeground();        
+    }
+    else
+    {
+ 				// Create DM UI Process
+    		if(!mproc)
+    			mproc = new QProcess();
+    		if(mproc->state() != QProcess::Running)
+    		{
+    			QString app = QLatin1String("deviceupdates");
+    			QStringList args;
+    			args<< QLatin1String("-cp");
+    			mproc->start(app, args);
+    			mproc->waitForStarted();
+    		}     
+    }
+    CleanupStack::PopAndDestroy();  // ws    		
 	}
 
 // ---------------------------------------------------------------------------------------------
 // DeviceUpdateData::CloseDmUi
 // closes DM Ui
 // ---------------------------------------------------------------------------------------------	
-void DeviceUpdateData:: CloseDmUi()
+void DeviceUpdateData:: CloseDeviceUpdatesUi()
 {
-	// Create DM UI Process
-	 
-	TFullName processName;		
-	TFindProcess process;
-	while ( process.Next( processName ) != KErrNotFound )
-	{
-		if ( ( processName.Find( KDMUIName ) != KErrNotFound ) )
-		{
-			RProcess rprocess;
-			if (rprocess.Open(process, EOwnerProcess) == KErrNone)
-			{				
-				rprocess.Terminate(KErrNone);
-				rprocess.Close();			
-			}
-		}
-	}	
+	if(( mproc )&&(mproc->state() == QProcess::Running))
+  	{
+    			mproc->close();
+    }
+
 }	
 
 void DeviceUpdateData::onLaunchView()
 {
-	TRAP_IGNORE( OpenDmAppL() );
+	LaunchDeviceUpdatesUi();
 }
 
 CpBaseSettingView *DeviceUpdateData::createSettingView() const
 {
-	return 0;
+		return 0;
 }
-
-
--- a/deviceupdatesui/deviceupdatesplugin/src/deviceupdatesplugin.cpp	Fri May 14 15:42:35 2010 +0300
+++ b/deviceupdatesui/deviceupdatesplugin/src/deviceupdatesplugin.cpp	Thu May 27 12:45:33 2010 +0300
@@ -15,7 +15,6 @@
 *
 */
 
-//#include <cpsettingformentryitemdataimpl.h>
 
 #include <cpitemdatahelper.h>
 #include "deviceupdatesplugin.h"
@@ -33,19 +32,12 @@
 	
 }
 
-int DeviceUpdatesPlugin::uid() const
-{
-	//  get a uid and replace it.
-   	 return 0X2002DD04;
-}
-
-CpSettingFormItemData *DeviceUpdatesPlugin::createSettingFormItemData(CpItemDataHelper& itemDataHelper) const
+QList<CpSettingFormItemData*> DeviceUpdatesPlugin::createSettingFormItemData(CpItemDataHelper& itemDataHelper) const
 {
    
-	CpSettingFormItemData *entryItem = new DeviceUpdateData(itemDataHelper, QString("Device updates"),
-                                          QString());
-
-	return entryItem;	
+	return QList<CpSettingFormItemData*>()
+					<< new DeviceUpdateData(itemDataHelper, QString("Device updates"),
+                                          QString("Device updates plugin"), HbIcon(":/resources/qtg_large_device_update.svg"));
 }
 
 Q_EXPORT_PLUGIN2( deviceupdatesplugin, DeviceUpdatesPlugin)