# HG changeset patch # User hgs # Date 1287122942 -19800 # Node ID fdbfe0a95492d85b1d68a8761536bf2fc30e1c62 # Parent 03849bd7987738179c378a1fc0a9037f2ae86a6e 201041 diff -r 03849bd79877 -r fdbfe0a95492 applicationmanagement/RfsPlugin/src/RfsAppMgmtPlugin.cpp --- a/applicationmanagement/RfsPlugin/src/RfsAppMgmtPlugin.cpp Fri Sep 17 19:58:05 2010 +0530 +++ b/applicationmanagement/RfsPlugin/src/RfsAppMgmtPlugin.cpp Fri Oct 15 11:39:02 2010 +0530 @@ -73,8 +73,9 @@ if( appManagement.Connect() == KErrNone ) { RDEBUG("CRfsAppMgmtPlugin::RestoreFactorySettingsL(): Connected to AppMgmt "); + CleanupClosePushL(appManagement); appManagement.PerformRfsL(); - appManagement.Close(); + CleanupStack::PopAndDestroy(&appManagement); } else { diff -r 03849bd79877 -r fdbfe0a95492 applicationmanagement/amadapter2/src/amadapter.cpp --- a/applicationmanagement/amadapter2/src/amadapter.cpp Fri Sep 17 19:58:05 2010 +0530 +++ b/applicationmanagement/amadapter2/src/amadapter.cpp Fri Oct 15 11:39:02 2010 +0530 @@ -2191,7 +2191,7 @@ } else if ( dataType == EDCConRef ) { - CBufBase *b = CBufFlat::NewL(4); + CBufBase *b = CBufFlat::NewL(12); CleanupStack::PushL( b ); SessionL().DeploymentComponentDataL( iluid, dataType, *b); TPckgBuf iap; @@ -3628,7 +3628,7 @@ RDEBUG( "CAmAdapter::CheckStateChangesL(): Adding Trust Closing Session" ); iManagement.Close(); iSessionOpened = EFalse; - RApplicationManagement &session = SessionL(); +// RApplicationManagement &session = SessionL(); // coverity Fix RDEBUG( "CAmAdapter::CheckStateChangesL(): Adding Trust new session started" ); } } diff -r 03849bd79877 -r fdbfe0a95492 applicationmanagement/omascomoadapter/src/omascomoadapter.cpp --- a/applicationmanagement/omascomoadapter/src/omascomoadapter.cpp Fri Sep 17 19:58:05 2010 +0530 +++ b/applicationmanagement/omascomoadapter/src/omascomoadapter.cpp Fri Oct 15 11:39:02 2010 +0530 @@ -977,9 +977,10 @@ CNSmlDMAlertItem* item = new (ELeave) CNSmlDMAlertItem ; - + CleanupStack::PushL(item); HBufC8 *data = HBufC8::NewL(1024); - + CleanupStack::PushL(data); + TPtr8 ptr = data->Des(); //ptr.Append(KDataStart); ptr.Append(KResultCodeStart); @@ -990,48 +991,43 @@ ptr.Append(KIdentifierEnd); //ptr.Append(KDataEnd); - HBufC8 *sourceuri = genericalerts[i]->iSourceURI; + HBufC8 *sourceuri = genericalerts[i]->iSourceURI; item->iSource = sourceuri; - HBufC8 *targeturi = targetURIGet.AllocL(); - + HBufC8 *targeturi = targetURIGet.AllocL(); + CleanupStack::PushL(targeturi); item->iTarget = targeturi; HBufC8 *metatype = scomometatype.AllocL(); - + CleanupStack::PushL(metatype); item->iMetaType = metatype; - HBufC8 *metaformat = scomometaformat.AllocL(); - + HBufC8 *metaformat = scomometaformat.AllocL(); + CleanupStack::PushL(metaformat); item->iMetaFormat = metaformat; HBufC8 *metamark = scomomark.AllocL(); - + CleanupStack::PushL(metamark); item->iMetaMark = metamark; item->iData = data; iItemArray.AppendL(*item); - TRAP_IGNORE(privateAPI.AddDMGenericAlertRequestL( - *genericalerts[i]->iCorrelator,iItemArray )); - - - delete data; - - delete metamark; + TRAP_IGNORE(privateAPI.AddDMGenericAlertRequestL( + *genericalerts[i]->iCorrelator,iItemArray )); - delete metaformat; - - delete metatype; - - delete targeturi; - delete item; + CleanupStack::PopAndDestroy( metamark); + CleanupStack::PopAndDestroy( metaformat); + CleanupStack::PopAndDestroy( metatype); + CleanupStack::PopAndDestroy( targeturi); + CleanupStack::PopAndDestroy( data); + CleanupStack::PopAndDestroy( item); - iItemArray.Reset(); - iItemArray.Close(); - CleanupStack::PopAndDestroy( &privateAPI); + iItemArray.Reset(); + iItemArray.Close(); + CleanupStack::PopAndDestroy( &privateAPI); } } genericalerts.ResetAndDestroy(); @@ -2598,7 +2594,7 @@ else if (dataType == EDCConRef) { - CBufBase *b = CBufFlat::NewL(4); + CBufBase *b = CBufFlat::NewL(12); CleanupStack::PushL(b); SessionL().DeploymentComponentDataL( iluid, dataType, *b); @@ -4144,7 +4140,7 @@ RDEBUG( "CSCOMOAdapter::CheckStateChangesL(): Adding Trust Closing Session" ); iManagement.Close(); iSessionOpened = EFalse; - RApplicationManagement &session = SessionL(); +// RApplicationManagement &session = SessionL(); // coverity Fix RDEBUG( "CSCOMOAdapter::CheckStateChangesL(): Adding Trust new session started" ); } } diff -r 03849bd79877 -r fdbfe0a95492 applicationmanagement/server/src/AMDeploymentComponentData.cpp --- a/applicationmanagement/server/src/AMDeploymentComponentData.cpp Fri Sep 17 19:58:05 2010 +0530 +++ b/applicationmanagement/server/src/AMDeploymentComponentData.cpp Fri Oct 15 11:39:02 2010 +0530 @@ -180,7 +180,7 @@ if (err == KErrNone) { CleanupClosePushL(file); // 2 - TInt fsize; + TInt fsize = 0; User::LeaveIfError(file.Size(fsize) ); iData = HBufC8::NewL(fsize); TPtr8 ptr(iData->Des() ); @@ -396,7 +396,8 @@ // leave if can not open the original file User::LeaveIfError(originalFile.Open(aFs, ptr, EFileWrite) ); RDEBUG(" -> done"); - + + CleanupClosePushL(originalFile); // First construct the temp path User::LeaveIfError(aFs.PrivatePath(decryptedTempFileName) ); // set drive letter into the path @@ -422,11 +423,10 @@ User::LeaveIfError(decryptedFile.Open(aFs, decryptedTempFileName, EFileShareAny) ); RDEBUG(" -> done"); + CleanupClosePushL(decryptedFile); // parse the uid from the file ret = ParseUidFromSisFileL(decryptedFile); - // no use anymore for the decrypted file - decryptedFile.Close(); // delete the temp file TInt err = aFs.Delete(decryptedTempFileName); if (err != KErrNone) @@ -434,9 +434,9 @@ RDEBUG_2("**** ERROR, unable to delete temporary file: %S", &decryptedTempFileName ); } - CleanupStack::PopAndDestroy(licenseMgr); - decryptedFile.Close(); - originalFile.Close(); + CleanupStack::PopAndDestroy(&decryptedFile); + CleanupStack::PopAndDestroy(licenseMgr); + CleanupStack::PopAndDestroy(&originalFile); } else if (iMimeType == KSisxMimeType || iMimeType == KSisMimeType ) diff -r 03849bd79877 -r fdbfe0a95492 applicationmanagement/server/src/AMPreInstallApp.cpp --- a/applicationmanagement/server/src/AMPreInstallApp.cpp Fri Sep 17 19:58:05 2010 +0530 +++ b/applicationmanagement/server/src/AMPreInstallApp.cpp Fri Oct 15 11:39:02 2010 +0530 @@ -178,8 +178,10 @@ { RDEBUG("Clist_PreInstallAppUi: err == KErrNone"); + CleanupStack::PushL(sisRegistry); TPreInstalledAppParams *params = new (ELeave) TPreInstalledAppParams; + CleanupStack::PushL(params); params->iPreInstalledAppame.Copy(sisRegistry->Name()); params->iPreInstalledAppVendorName.Copy( sisRegistry->Vendor()); @@ -199,7 +201,8 @@ RDEBUG_2("Clist_PreInstallAppUi: ListPreInstalledApp: Installed App Name is: %S",&(sisRegistry->Name())); RDEBUG_2("Clist_PreInstallAppUi: ListPreInstalledApp: Installed App Vendor is: %S",&(sisRegistry->Vendor())); RDEBUG_2("Clist_PreInstallAppUi: ListPreInstalledApp: Installed App UID is : '0x%X'",sisRegistry->Uid()); - delete sisRegistry; + CleanupStack::PopAndDestroy(params); + CleanupStack::PopAndDestroy(sisRegistry); } continue; } diff -r 03849bd79877 -r fdbfe0a95492 applicationmanagement/server/src/ApplicationManagementServer.cpp --- a/applicationmanagement/server/src/ApplicationManagementServer.cpp Fri Sep 17 19:58:05 2010 +0530 +++ b/applicationmanagement/server/src/ApplicationManagementServer.cpp Fri Oct 15 11:39:02 2010 +0530 @@ -489,6 +489,10 @@ delete iUtility; delete iAMServerDB; + if ( iArgu ) + delete iArgu; + if ( iResults ) + delete iResults; RProperty::Delete(KUidPSApplicationManagementKeys, KAMServerUIEnabled); @@ -1007,7 +1011,8 @@ if (m_Dlg) m_Dlg->registerInstallRequest(aStatus); delete iArgu; - iArgu = NULL; + iArgu = NULL; + CleanupStack::PushL(m_Dlg); iArgu = Usif::COpaqueNamedParams::NewL(); iArgu->AddIntL(Usif::KSifInParam_InstallSilently, 1); TAMInstallOptions opts = aComponent.InstallOpts(); @@ -1021,13 +1026,14 @@ delete iResults; iResults = NULL; iResults = Usif::COpaqueNamedParams::NewL(); - + RDEBUG_3( "CApplicationManagementServer::InstallL: Install '%S' sizeof opts: %d", &fn, sizeof (aComponent.InstallOpts())); TRAPD( err ,iInstaller.Install( iInstallFile, *iArgu, *iResults, aStatus ) ); RDEBUG_2( "CApplicationManagementServer::InstallL: status: %d", err); User::LeaveIfError(err); iInstallInProgress = ETrue; + CleanupStack::Pop(m_Dlg); } else { @@ -1213,7 +1219,7 @@ = silentsession; TRequestStatus s1 = KRequestPending; AppMgmtNotifier* note = new AppMgmtNotifier(m_appName); - + CleanupStack::PushL(note); // displaying uninstall confirm notes if (!CApplicationManagementUtility::iSilentSession) { @@ -1237,6 +1243,7 @@ true); } + CleanupStack::PushL(m_Dlg); CDialogWait* wait1 = CDialogWait::NewL(); TRAP(err,UninstallL( aCompo, wait1->iStatus )); @@ -1267,6 +1274,7 @@ RDEBUG_2("CApplicationManagementServer: RemoveInternalL ERROR uninstall failed %d", s.Int() ); } } + CleanupStack::Pop(m_Dlg); } else { @@ -1274,7 +1282,7 @@ aCompo.SetStatusNode(EDelivered_RemoveFailed); RDEBUG( "CApplicationManagementServer: RemoveInternalL User cancelled" ); } - delete note; + CleanupStack::PopAndDestroy(note); } else { @@ -3675,6 +3683,7 @@ RDEBUG( "CApplicationManagementSession: StateChangeComponentIdsCountL" ); RPointerArray preInstalledAppParams; CAMPreInstallApp* preInstallApp = CAMPreInstallApp::NewL(); + CleanupStack::PushL(preInstallApp) ; preInstallApp->GetPreInstalledAppsL(preInstalledAppParams); TInt count = 0; for (count = 0; count < preInstalledAppParams.Count(); count++) @@ -3721,7 +3730,7 @@ *preInstallCompo); } } - delete preInstallApp; + CleanupStack::PopAndDestroy(preInstallApp); RComponentIdArray arr; Server().Storage()->GetStateChangeComponentIdsL(arr); TPckgBuf buflen(arr.Count()); diff -r 03849bd79877 -r fdbfe0a95492 applicationmanagement/server/src/amstorage.cpp --- a/applicationmanagement/server/src/amstorage.cpp Fri Sep 17 19:58:05 2010 +0530 +++ b/applicationmanagement/server/src/amstorage.cpp Fri Oct 15 11:39:02 2010 +0530 @@ -170,6 +170,7 @@ RDEBUG_2( "CDeliveryComponentStorage::ConstructL() ERROR CentRep not initialized: Check deployment! %d", erx ); User::Leave(erx); } + TInt err(iRepository->Get(KNextIdKey, iNextId) ); if (err == KErrNotFound) { @@ -181,6 +182,7 @@ User::LeaveIfError(err); } LoadComponentsL(); + } void CDeliveryComponentStorage::LoadCertsL() diff -r 03849bd79877 -r fdbfe0a95492 clientprovisioning/cpqtsp/src/CWPBioControl.cpp --- a/clientprovisioning/cpqtsp/src/CWPBioControl.cpp Fri Sep 17 19:58:05 2010 +0530 +++ b/clientprovisioning/cpqtsp/src/CWPBioControl.cpp Fri Oct 15 11:39:02 2010 +0530 @@ -103,9 +103,15 @@ if (iDevDialog) { delete iDevDialog; + iDevDialog = NULL; } delete ibootstrap; delete iWait; + if ( iMsg ) + { + delete iMsg; + iMsg = NULL; + } } // ---------------------------------------------------------------------------- // CWPBioControl ::RestoreMsgL diff -r 03849bd79877 -r fdbfe0a95492 clientprovisioning/cpqtsp/src/CpQtSpView.cpp --- a/clientprovisioning/cpqtsp/src/CpQtSpView.cpp Fri Sep 17 19:58:05 2010 +0530 +++ b/clientprovisioning/cpqtsp/src/CpQtSpView.cpp Fri Oct 15 11:39:02 2010 +0530 @@ -79,10 +79,7 @@ void CpQtSpView::corruptMessageDialog(HbAction *action) { HbMessageBox *dlg = static_cast(sender()); - if(action == dlg->primaryAction()) - { window->closeWindow(); - } } // ---------------------------------------------------------------------------- // CpQtSpView::constructView diff -r 03849bd79877 -r fdbfe0a95492 devicemgmtdialogsplugin/inc/devicemanagementnotifierutils.h --- a/devicemgmtdialogsplugin/inc/devicemanagementnotifierutils.h Fri Sep 17 19:58:05 2010 +0530 +++ b/devicemgmtdialogsplugin/inc/devicemanagementnotifierutils.h Fri Oct 15 11:39:02 2010 +0530 @@ -38,6 +38,8 @@ class devicemanagementnotifierwidget; class syncmlConnectNotifier; +class fotadevicedialogs; + class devicemanagementnotifierutils :public HbDialog { Q_OBJECT @@ -48,6 +50,7 @@ private: syncmlnotifier* notifier; syncmlConnectNotifier* connectDialog; +fotadevicedialogs * fotadialog; }; diff -r 03849bd79877 -r fdbfe0a95492 devicemgmtdialogsplugin/inc/devicemanagementnotifierwidget_p.h --- a/devicemgmtdialogsplugin/inc/devicemanagementnotifierwidget_p.h Fri Sep 17 19:58:05 2010 +0530 +++ b/devicemgmtdialogsplugin/inc/devicemanagementnotifierwidget_p.h Fri Oct 15 11:39:02 2010 +0530 @@ -50,6 +50,7 @@ void closeDeviceDialog(bool byClient); HbDialog *deviceDialogWidget() const; void dmDevdialogDismissed(ENotfierType notifiertype, int response); + void fotaDevdialogDismissed(int notifiertype, int response); signals: void deviceDialogClosed(); diff -r 03849bd79877 -r fdbfe0a95492 devicemgmtdialogsplugin/inc/fotadevicedialogs.h --- a/devicemgmtdialogsplugin/inc/fotadevicedialogs.h Fri Sep 17 19:58:05 2010 +0530 +++ b/devicemgmtdialogsplugin/inc/fotadevicedialogs.h Fri Oct 15 11:39:02 2010 +0530 @@ -27,39 +27,53 @@ #include "syncmlnotifierprivate.h" #include "devicemanagementnotifierwidget_p.h" +#include -class fotadevicedialogs:public HbDialog, public HbDeviceDialogInterface { -//class fotadevicedialogs:public devicemanagementnotifierwidget { + +class fotadevicedialogs:public QObject +{ + Q_OBJECT public: -/** - * Construction and setting of observer happens here - * - * @since S60 SF4 - * @param aType - tell sthe type of the dialog to be shown - * @param aObserver is the parent class which owns the notifier and information is - * passed to the parent class from the device dialog. - */ + /** + * Construction and setting of observer happens here + * + * @since SF4 + * @param ptr - pointer to the devicemanagementnotifierwidget which sends the data to the calling module. + * passed to the parent class from the device dialog. + */ + + fotadevicedialogs(devicemanagementnotifierwidget* ptr); + + + /** + * Destructor to release the memory + * + * @since SF4 + * @param None + */ + + ~fotadevicedialogs(); -fotadevicedialogs(const QVariantMap ¶meters); - -private: - /** + /** * Function to call the appropriate device dialog based on the dialog ID. * - * @since S60 SF4 + * @since SF4 * @param aType - tell sthe type of the dialog to be shown * @param parameters - contains the dialogID + information to be shown in the dialogs */ void launchFotaDialog(const QVariantMap ¶meters); - + + +private: + /** * Function to show the informative dialog of FOTA * - * @since S60 SF4 + * @since SF4 * @param aType - tell sthe type of the dialog to be shown * @param parameters - contains the dialogID + information to be shown in the dialogs */ @@ -69,7 +83,7 @@ /** * Function to show the error message dialog of FOTA * - * @since S60 SF4 + * @since SF4 * @param aType - tell sthe type of the dialog to be shown * @param parameters - contains the dialogID + information to be shown in the dialogs */ @@ -79,7 +93,7 @@ /** * Function to show the confirmative dialog of FOTA * - * @since S60 SF4 + * @since SF4 * @param aType - tell sthe type of the dialog to be shown * @param parameters - contains the dialogID + information to be shown in the dialogs */ @@ -87,56 +101,34 @@ public slots: -/** - * Construction and setting of observer happens here - * - * @since S60 SF4 - * @param aObserver is the parent class which owns the notifier and information is - * passed to the parent class from the device dialog. - */ - + /** + * Construction and setting of observer happens here + * + * @since SF4 + * @param aObserver is the parent class which owns the notifier and information is + * passed to the parent class from the device dialog. + */ void fotaLSK(); + /** - * Construction and setting of observer happens here - * - * @since S60 SF4 - * @param aObserver is the parent class which owns the notifier and information is - * passed to the parent class from the device dialog. - */ - + * Construction and setting of observer happens here + * + * @since SF4 + * @param aObserver is the parent class which owns the notifier and information is + * passed to the parent class from the device dialog. + */ void fotaRSK(); - -public: //derived from HbDeviceDialogInterface - /** - * Ccalled when device dialog is closed. - * - * @since S60 SF4 - * @param byClient - The Name of the client which closed the dialog. - */ - - void closeDeviceDialog(bool byClient); +private: + + // The dialog ID of the current shown dialog. + TInt m_DialogId; - bool setDeviceDialogParameters(const QVariantMap ¶meters); - int deviceDialogError() const; -// void closeDeviceDialog(bool byClient); - HbDialog *deviceDialogWidget() const; - -signals: - void deviceDialogClosed(); - void deviceDialogData(QVariantMap data); - - -signals: -/** - * servertextmessage - * - * @since S60 SF4 - * @param aObserver is the parent class which owns the notifier and information is - * passed to the parent class from the device dialog. - */ - - void servertextmessage(const QString &string); + // HbDialog instance which actually shows the dialog from the docml. + HbDialog* m_dialog; + + // widget pointer which is used to send the signals to the calling module. + devicemanagementnotifierwidget* m_Ptr; }; #endif diff -r 03849bd79877 -r fdbfe0a95492 devicemgmtdialogsplugin/inc/omacppinquerydialog.h --- a/devicemgmtdialogsplugin/inc/omacppinquerydialog.h Fri Sep 17 19:58:05 2010 +0530 +++ b/devicemgmtdialogsplugin/inc/omacppinquerydialog.h Fri Oct 15 11:39:02 2010 +0530 @@ -26,7 +26,7 @@ #include #include "devicemanagementnotifierwidget_p.h" -class omacppinquerydialog : public devicemanagementnotifierwidget +class omacppinquerydialog : public QObject, public HbDeviceDialogInterface { Q_OBJECT @@ -37,16 +37,27 @@ public: void createcppinquery(const QVariantMap ¶meters); HbDialog *deviceDialogWidget() const; + //derived from HbDeviceDialogInterface + bool setDeviceDialogParameters(const QVariantMap ¶meters); + int deviceDialogError() const; + void closeDeviceDialog(bool byClient); + QObject *signalSender() const; public slots: void pintextChanged(); void okSelected(); void cancelSelected(); - + +private: +signals: + void deviceDialogClosed(); + void deviceDialogData(QVariantMap data); + private: HbLineEdit *mlineedit; HbAction *mactionok; + HbDialog *mDialog; }; diff -r 03849bd79877 -r fdbfe0a95492 devicemgmtdialogsplugin/src/devicemanagementnotifierplugin.cpp --- a/devicemgmtdialogsplugin/src/devicemanagementnotifierplugin.cpp Fri Sep 17 19:58:05 2010 +0530 +++ b/devicemgmtdialogsplugin/src/devicemanagementnotifierplugin.cpp Fri Oct 15 11:39:02 2010 +0530 @@ -67,7 +67,9 @@ bool devicemanagementnotifierplugin::accessAllowed(const QString &deviceDialogType, const QVariantMap ¶meters, const QVariantMap &securityInfo) const { - + Q_UNUSED(deviceDialogType); + Q_UNUSED(parameters); + Q_UNUSED(securityInfo); // This plugin doesn't perform operations that may compromise security. // All clients are allowed to use. return true; @@ -89,17 +91,18 @@ // Return specific object for showing appropriate dialog return new omacppinquerydialog(parameters); } - - if (dialogtype >= EFwDLNeedMoreMemory && dialogtype <= EFwUpdResumeUpdate) - { - // Return specific object for showing appropriate dialog - return new fotadevicedialogs(parameters); - } + + //if (dialogtype >= EFwDLNeedMoreMemory && dialogtype <= EFwUpdResumeUpdate) + //{ + // Return specific object for showing appropriate dialog + // return new fotadevicedialogs(parameters); + //} } + return new devicemanagementnotifierwidget(parameters); - -} + + } // Return information of device dialog the plugin creates bool devicemanagementnotifierplugin::deviceDialogInfo(const QString &deviceDialogType, diff -r 03849bd79877 -r fdbfe0a95492 devicemgmtdialogsplugin/src/devicemanagementnotifierutils.cpp --- a/devicemgmtdialogsplugin/src/devicemanagementnotifierutils.cpp Fri Sep 17 19:58:05 2010 +0530 +++ b/devicemgmtdialogsplugin/src/devicemanagementnotifierutils.cpp Fri Oct 15 11:39:02 2010 +0530 @@ -27,6 +27,8 @@ #include "pnputillogger.h" #include "omacppinquerydialog.h" #include "devicemanagementnotifierwidget_p.h" +#include "fotadevicedialogs.h" + enum TSyncmlHbNotifierKeys { @@ -46,6 +48,7 @@ QVariantMap::const_iterator i = parameters.constBegin(); int notifiertolaunch = 0; + int dialogtype = 0; while (i != parameters.constEnd()) { if (i.key().toAscii() == "syncmlfw") @@ -53,7 +56,15 @@ notifiertolaunch = i.value().toInt(); // profileidenabled = true; + } + + if (i.key().toAscii() == keydialog) + { + + dialogtype = i.value().toInt(); + // profileidenabled = true; } + ++i; } if(notifiertolaunch == 1000001 )// Connecting dialog @@ -61,15 +72,24 @@ connectDialog = new syncmlConnectNotifier(ptr); connectDialog->launchDialog(parameters); notifier = NULL; + fotadialog = NULL; } - + else if (dialogtype >= EFwDLNeedMoreMemory && dialogtype <= EFwUpdResumeUpdate) + { + fotadialog = new fotadevicedialogs(ptr); + fotadialog->launchFotaDialog(parameters); + connectDialog = NULL; + notifier = NULL; + //return fotadialog; + } else { notifier = new syncmlnotifier(ptr); notifier->launchDialog(parameters); connectDialog = NULL; + fotadialog = NULL; } - } + } devicemanagementnotifierutils::~devicemanagementnotifierutils() { qDebug("devicemanagementnotifierutils::~devicemanagementnotifierutils"); diff -r 03849bd79877 -r fdbfe0a95492 devicemgmtdialogsplugin/src/devicemanagementnotifierwidget.cpp --- a/devicemgmtdialogsplugin/src/devicemanagementnotifierwidget.cpp Fri Sep 17 19:58:05 2010 +0530 +++ b/devicemgmtdialogsplugin/src/devicemanagementnotifierwidget.cpp Fri Oct 15 11:39:02 2010 +0530 @@ -19,6 +19,7 @@ #include #include "devicemanagementnotifierwidget_p.h" +#include // Constructor @@ -83,3 +84,12 @@ resultMap.insert("keypress", response); emit deviceDialogData(resultMap); } + + +void devicemanagementnotifierwidget::fotaDevdialogDismissed(int notifiertype, int response) + { + QVariantMap resultMap; + resultMap.insert(keydialog,notifiertype); + resultMap.insert(returnkey, response); + emit deviceDialogData(resultMap); + } diff -r 03849bd79877 -r fdbfe0a95492 devicemgmtdialogsplugin/src/fotadevicedialogs.cpp --- a/devicemgmtdialogsplugin/src/fotadevicedialogs.cpp Fri Sep 17 19:58:05 2010 +0530 +++ b/devicemgmtdialogsplugin/src/fotadevicedialogs.cpp Fri Oct 15 11:39:02 2010 +0530 @@ -15,13 +15,16 @@ * */ - +#include "devicemanagementnotifierutils.h" #include #include #include #include #include #include +//#include "syncmlnotifierparams.h" +#include "fotadevicedialogs.h" + #include #include #include @@ -39,10 +42,11 @@ // --------------------------------------------------------------------------- // -fotadevicedialogs::fotadevicedialogs(const QVariantMap ¶meters) +fotadevicedialogs::fotadevicedialogs(devicemanagementnotifierwidget* ptr) //: devicemanagementnotifierwidget(parameters) { qDebug("devicemanagementnotifierutils fotadevicedialogs"); + m_Ptr = ptr; QTranslator *translator = new QTranslator(); QString lang = QLocale::system().name(); QString path = "Z:/resource/qt/translations/"; @@ -58,7 +62,15 @@ qDebug("device dialog common translator loading failed"); - launchFotaDialog(parameters); + + } + + +fotadevicedialogs::~fotadevicedialogs() + { + if(m_dialog) + m_dialog->deleteLater(); + } @@ -76,13 +88,11 @@ qDebug("devicemanagementnotifierutils fotadevicedialogs launchDialog"); TFwUpdNoteTypes aType = EFwUpdDeviceBusy; - //QString temp = QString::fromUtf8(reinterpret_cast(url.Ptr()), url.Length()); - //TDesC8 * tempStr = KKeyDialog; - //const QString temp = QString::fromUtf8(reinterpret_cast(tempStr.Ptr()), tempStr.Length()); i = parameters.find(keydialog); if(i != parameters.end()) aType = (TFwUpdNoteTypes)i.value().toInt(); + m_DialogId = (TInt)aType; if(aType == EFwUpdRebootNote) { @@ -91,13 +101,9 @@ else if(aType == EFwUpdResumeDownload || aType == EFwUpdResumeUpdate) { createfotaconfirmationdialog(aType,parameters); - //createfotainformativedialog(); } - else if(aType == EFwDLNeedMoreMemory || aType == EFwDLConnectionFailure || aType == EFwDLGeneralFailure || - aType == EFwUpdNotEnoughBattery || aType == EFwUpdDeviceBusy || aType == EFwUpdSuccess || aType == EFwUpdNotCompatible - || aType == EFwDLNonResumableFailure) + else { - //createfotamessagedialog(); createfotamessagedialog(aType,parameters); } } @@ -111,7 +117,6 @@ void fotadevicedialogs::createfotainformativedialog(TFwUpdNoteTypes aType,const QVariantMap ¶meters) { qDebug("createserveralertinformative start"); - LOGSTRING("createserveralertinformative start"); HbDocumentLoader loader; bool ok = false; loader.load(":/xml/resources/fotainformativedialog.docml", &ok); @@ -119,7 +124,7 @@ { return; } - HbDialog *dialog = qobject_cast (loader.findWidget("dialog")); + m_dialog = qobject_cast (loader.findWidget("dialog")); HbLabel *content = qobject_cast (loader.findWidget( "lblContent")); @@ -127,12 +132,12 @@ // No translations required //content->setPlainText("Testing"); - dialog->setTimeout(3000); + m_dialog->setTimeout(3000); - if (dialog) - dialog->show(); + if (m_dialog) + m_dialog->show(); - QObject::connect(dialog, SIGNAL(aboutToClose()), this, SLOT(okSelected())); + QObject::connect(m_dialog, SIGNAL(aboutToClose()), this, SLOT(okSelected())); qDebug("createserveralertinformative end"); @@ -148,7 +153,6 @@ void fotadevicedialogs::createfotaconfirmationdialog(TFwUpdNoteTypes aType,const QVariantMap ¶meters) { qDebug("createserveralertinformative start"); - LOGSTRING("createserveralertinformative start"); QVariantMap::const_iterator i; HbDocumentLoader loader; @@ -184,7 +188,7 @@ { return; } - dialog = qobject_cast (loader.findWidget("dialog")); + m_dialog = qobject_cast (loader.findWidget("dialog")); HbLabel *headingString = qobject_cast (loader.findWidget( "lblDialogHeading")); @@ -211,18 +215,17 @@ contentString->setPlainText(hbTrId("txt_device_update_info_the_last_update_incomplete_dwnld_kb") .arg(param1).arg(param2).arg(sizeRounded)); } - //HbAction *primaryAction = dialog->primaryAction(); - HbAction *primaryAction = (HbAction *) dialog->actions().first(); + + HbAction *primaryAction = (HbAction *) m_dialog->actions().first(); primaryAction->setText(hbTrId("txt_common_button_continue_dialog")); - //HbAction *secondaryAction = dialog->secondaryAction(); - HbAction *secondaryAction = (HbAction *) dialog->actions().at(1); + HbAction *secondaryAction = (HbAction *) m_dialog->actions().at(1); secondaryAction->setText(hbTrId("txt_device_update_button_resume_later")); if(!postpone) secondaryAction->setEnabled(postpone); - dialog->setTimeout(HbPopup::NoTimeout); - dialog->setDismissPolicy(HbPopup::NoDismiss); + m_dialog->setTimeout(HbPopup::NoTimeout); + m_dialog->setDismissPolicy(HbPopup::NoDismiss); QObject::connect(primaryAction, SIGNAL(triggered()), this, SLOT(fotaLSK())); @@ -240,22 +243,20 @@ return; } - dialog = qobject_cast (loader.findWidget("dialog")); + m_dialog = qobject_cast (loader.findWidget("dialog")); - dialog->setTimeout(HbPopup::NoTimeout); - dialog->setDismissPolicy(HbPopup::NoDismiss); + m_dialog->setTimeout(HbPopup::NoTimeout); + m_dialog->setDismissPolicy(HbPopup::NoDismiss); HbLabel *headingString = qobject_cast (loader.findWidget( "lblHeading")); headingString->setPlainText(hbTrId("txt_device_update_title_device_update")); - //HbAction *primaryAction = dialog->primaryAction(); - HbAction *primaryAction = (HbAction *) dialog->actions().first(); + HbAction *primaryAction = (HbAction *) m_dialog->actions().first(); primaryAction->setText(hbTrId("txt_common_button_continue_dialog")); - //HbAction *secondaryAction = dialog->secondaryAction(); - HbAction *secondaryAction = (HbAction *) dialog->actions().at(1); + HbAction *secondaryAction = (HbAction *) m_dialog->actions().at(1); secondaryAction->setText(hbTrId("txt_device_update_button_resume_later")); if(!postpone) secondaryAction->setEnabled(postpone); @@ -292,7 +293,7 @@ "label_1")); contentEmergency->setPlainText(hbTrId("txt_device_update_info_during_the_installation_the")); - dialog->setTimeout(HbPopup::NoTimeout); + m_dialog->setTimeout(HbPopup::NoTimeout); QObject::connect(primaryAction, SIGNAL(triggered()), this, SLOT(fotaLSK())); @@ -307,8 +308,8 @@ } } - if (dialog) - dialog->show(); + if (m_dialog) + m_dialog->show(); qDebug("createserveralertinformative end"); @@ -324,7 +325,6 @@ { QVariantMap::const_iterator i; qDebug("createserveralertinformative start"); - LOGSTRING("createserveralertinformative start"); HbDocumentLoader loader; bool ok = false; loader.load(":/xml/resources/fotasoftkeydialog.docml", &ok); @@ -332,7 +332,7 @@ { return; } - HbDialog *dialog = qobject_cast (loader.findWidget("dialog")); + m_dialog = qobject_cast (loader.findWidget("dialog")); HbLabel *headingString = qobject_cast (loader.findWidget( "lblHeaind")); @@ -341,11 +341,10 @@ HbLabel *contentString = qobject_cast (loader.findWidget( "lblContent")); - dialog->setTimeout(HbPopup::NoTimeout); - dialog->setDismissPolicy(HbPopup::NoDismiss); + m_dialog->setTimeout(HbPopup::NoTimeout); + m_dialog->setDismissPolicy(HbPopup::NoDismiss); - //HbAction *primaryAction = dialog->primaryAction(); - HbAction *primaryAction = (HbAction *) dialog->actions().first(); + HbAction *primaryAction = (HbAction *) m_dialog->actions().first(); primaryAction->setText(hbTrId("txt_common_button_ok_single_dialog")); QObject::connect(primaryAction, SIGNAL(triggered()), this, @@ -416,8 +415,8 @@ } } - if (dialog) - dialog->show(); + if (m_dialog) + m_dialog->show(); qDebug("createserveralertinformative end"); @@ -432,9 +431,7 @@ void fotadevicedialogs::fotaLSK() { qDebug("ok selected"); - QVariantMap resultMap; - resultMap.insert(returnkey, EHbLSK); - emit deviceDialogData(resultMap); + emit m_Ptr->fotaDevdialogDismissed(m_DialogId,EHbLSK); } @@ -447,47 +444,5 @@ void fotadevicedialogs::fotaRSK() { qDebug("cancel selected"); - QVariantMap resultMap; - resultMap.insert(returnkey, EHbRSK); - emit deviceDialogData(resultMap); + emit m_Ptr->fotaDevdialogDismissed(m_DialogId,EHbRSK); } - - - -// Set parameters -bool fotadevicedialogs::setDeviceDialogParameters( - const QVariantMap ¶meters) -{ - - return true; -} - -// Get error -int fotadevicedialogs::deviceDialogError() const -{ - - return 0; -} - - -// Close device dialog -// --------------------------------------------------------------------------- -// fotadevicedialogs::closeDeviceDialog -// This slot is called when device dialog is closed due to errors. -// --------------------------------------------------------------------------- -// - -void fotadevicedialogs::closeDeviceDialog(bool byClient) -{ - qDebug("cancel selected"); - emit deviceDialogClosed(); -} - - -// Return display widget -HbDialog *fotadevicedialogs::deviceDialogWidget() const -{ - - return const_cast(this); - //return const_cast(this); -} diff -r 03849bd79877 -r fdbfe0a95492 devicemgmtdialogsplugin/src/omacppinquerydialog.cpp --- a/devicemgmtdialogsplugin/src/omacppinquerydialog.cpp Fri Sep 17 19:58:05 2010 +0530 +++ b/devicemgmtdialogsplugin/src/omacppinquerydialog.cpp Fri Oct 15 11:39:02 2010 +0530 @@ -29,19 +29,50 @@ // Initialization of member variables; Create Pin query // ---------------------------------------------------------------------------- // -omacppinquerydialog::omacppinquerydialog(const QVariantMap ¶meters) : - devicemanagementnotifierwidget(parameters) +omacppinquerydialog::omacppinquerydialog(const QVariantMap ¶meters) { qDebug("omacppinquerydialog omacppinquerydialog() start"); + + // Do translation + QTranslator *translator = new QTranslator(); + QString lang = QLocale::system().name(); + QString path = "Z:/resource/qt/translations/"; + bool fine = translator->load("deviceupdates_en.qm", path); + if (fine) + qApp->installTranslator(translator); + + QTranslator *commontranslator = new QTranslator(); + + fine = commontranslator->load("common_" + lang, path); + if (fine) + qApp->installTranslator(commontranslator); + mlineedit = 0; mactionok = 0; + mDialog = 0; createcppinquery(parameters); qDebug("omacppinquerydialog omacppinquerydialog() end"); } + +// Set parameters +bool omacppinquerydialog::setDeviceDialogParameters( + const QVariantMap ¶meters) +{ + + return true; +} + +// Get error +int omacppinquerydialog::deviceDialogError() const +{ + + return 0; +} + HbDialog *omacppinquerydialog::deviceDialogWidget() const { - return const_cast (this); + return mDialog; } // ---------------------------------------------------------------------------- @@ -61,9 +92,10 @@ } - HbDialog *dialog = qobject_cast (loader.findWidget("dialog")); - dialog->setDismissPolicy(HbPopup::NoDismiss); - dialog->setTimeout(HbPopup::NoTimeout); + + mDialog = qobject_cast (loader.findWidget("dialog")); + mDialog->setDismissPolicy(HbPopup::NoDismiss); + mDialog->setTimeout(HbPopup::NoTimeout); int tries = -1; @@ -88,12 +120,12 @@ label->setPlainText(labelstring); - mactionok = (HbAction *) dialog->actions().first(); + mactionok = (HbAction *) mDialog->actions().first(); QString softkeyok = hbTrId("txt_common_button_ok"); mactionok->setText(softkeyok); mactionok->setEnabled(false); - HbAction *actioncancel = (HbAction *) dialog->actions().at(1); + HbAction *actioncancel = (HbAction *) mDialog->actions().at(1); QString softkeyCancel = hbTrId("txt_common_button_cancel"); actioncancel->setText(softkeyCancel); @@ -105,7 +137,7 @@ HbEditorInterface editorInterface(mlineedit); editorInterface.setMode(HbInputModeNumeric); editorInterface.setInputConstraints(HbEditorConstraintFixedInputMode); - dialog->setTimeout(HbPopup::NoTimeout); + mDialog->setTimeout(HbPopup::NoTimeout); bool bconnect = false; // Connection to the slot when PIN text is changed @@ -120,9 +152,7 @@ QObject::connect(actioncancel, SIGNAL(triggered()), this, SLOT(cancelSelected())); - if (dialog) - dialog->show(); - + qDebug("omacppinquerydialog createcppinquery() end"); @@ -202,5 +232,19 @@ qDebug("omacppinquerydialog::cancelSelected() end"); } +// Close device dialog +void omacppinquerydialog::closeDeviceDialog(bool byClient) + { + Q_UNUSED(byClient); + mDialog->close(); + emit deviceDialogClosed(); + } + +// Return signal source (container) for the dialog +QObject *omacppinquerydialog::signalSender() const +{ + return const_cast(this); +} + // End of File diff -r 03849bd79877 -r fdbfe0a95492 deviceupdatesui/deviceupdates/deviceupdates.pro --- a/deviceupdatesui/deviceupdates/deviceupdates.pro Fri Sep 17 19:58:05 2010 +0530 +++ b/deviceupdatesui/deviceupdates/deviceupdates.pro Fri Oct 15 11:39:02 2010 +0530 @@ -47,7 +47,7 @@ -lfotaengine \ -leuser \ -lflogger \ - -lxqutils \ + -lxqutils -lxqservice \ -lapgrfx \ -lcone } @@ -56,47 +56,52 @@ DEPENDPATH += ./inc INCLUDEPATH += . INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE +SERVICE.FILE = ./resources/service_conf.xml +SERVICE.OPTIONS = embeddable +libFiles.sources = xqservice.dll +libFiles.path = "!:\sys\bin" +DEPLOYMENT += libFiles # Input -HEADERS += ./inc/dminforetrieval.h \ -./inc/nsmldmdef.h\ -./inc/nsmldmsyncappengine.h \ -./inc/nsmldmsyncdebug.h \ -./inc/nsmldmsynchandler.h\ -./inc/nsmldmsyncinternalpskeys.h \ -./inc/nsmldmsyncprivatecrkeys.h \ -./inc/nsmldmsyncprofile.h \ -./inc/nsmldmsyncprofileitem.h \ -./inc/nsmldmsyncprofilelist.h \ -./inc/nsmldmsyncutil.h \ -./inc/nsmldmuidefines.h \ -./inc/serversettingsview.h\ -./inc/dmadvancedview.h\ -./inc/settingsdataformcustomitem.h\ -./inc/dmfotaview.h\ -./inc/nsmldmdbnotifier.h \ -./inc/deviceupdatemoniter.h \ -./inc/deviceupdatemoniterobserver.h \ -./inc/DeviceUpdateDebug.h \ -./inc/customviewitem.h - -SOURCES += ./src/dmadvancedview.cpp \ - ./src/main.cpp \ - ./src/nsmldmsyncutil.cpp \ - ./src/nsmldmsyncprofilelist.cpp \ - ./src/nsmldmsyncprofileitem.cpp \ - ./src/nsmldmsyncprofile.cpp \ - ./src/nsmldmsyncappengine.cpp \ - ./src/nsmldmsynchandler.cpp \ - ./src/dminforetrieval.cpp\ - ./src/serversettingsview.cpp\ - ./src/settingsdataformcustomitem.cpp\ - ./src/dmfotaview.cpp \ - ./src/nsmldmdbnotifier.cpp \ - ./src/deviceupdatemoniter.cpp \ - ./src/customviewitem.cpp - +HEADERS += inc/dmserviceprovider.h \ + ./inc/dminforetrieval.h \ + ./inc/nsmldmdef.h \ + ./inc/nsmldmsyncappengine.h \ + ./inc/nsmldmsyncdebug.h \ + ./inc/nsmldmsynchandler.h \ + ./inc/nsmldmsyncinternalpskeys.h \ + ./inc/nsmldmsyncprivatecrkeys.h \ + ./inc/nsmldmsyncprofile.h \ + ./inc/nsmldmsyncprofileitem.h \ + ./inc/nsmldmsyncprofilelist.h \ + ./inc/nsmldmsyncutil.h \ + ./inc/nsmldmuidefines.h \ + ./inc/serversettingsview.h \ + ./inc/dmadvancedview.h \ + ./inc/settingsdataformcustomitem.h \ + ./inc/dmfotaview.h \ + ./inc/nsmldmdbnotifier.h \ + ./inc/deviceupdatemoniter.h \ + ./inc/deviceupdatemoniterobserver.h \ + ./inc/DeviceUpdateDebug.h \ + ./inc/customviewitem.h +SOURCES += src/dmserviceprovider.cpp \ + ./src/dmadvancedview.cpp \ + ./src/main.cpp \ + ./src/nsmldmsyncutil.cpp \ + ./src/nsmldmsyncprofilelist.cpp \ + ./src/nsmldmsyncprofileitem.cpp \ + ./src/nsmldmsyncprofile.cpp \ + ./src/nsmldmsyncappengine.cpp \ + ./src/nsmldmsynchandler.cpp \ + ./src/dminforetrieval.cpp \ + ./src/serversettingsview.cpp \ + ./src/settingsdataformcustomitem.cpp \ + ./src/dmfotaview.cpp \ + ./src/nsmldmdbnotifier.cpp \ + ./src/deviceupdatemoniter.cpp \ + ./src/customviewitem.cpp RESOURCES += ./resources/deviceupdates.qrc -CONFIG += hb +CONFIG += hb service TRANSLATIONS += deviceupdates.ts diff -r 03849bd79877 -r fdbfe0a95492 deviceupdatesui/deviceupdates/inc/dmfotaview.h --- a/deviceupdatesui/deviceupdates/inc/dmfotaview.h Fri Sep 17 19:58:05 2010 +0530 +++ b/deviceupdatesui/deviceupdates/inc/dmfotaview.h Fri Oct 15 11:39:02 2010 +0530 @@ -37,9 +37,12 @@ #include #include #include "dminforetrieval.h" +#include "dmserviceprovider.h" #include "deviceupdatemoniterobserver.h" //_LIT( KSmlEOL, "\n" ); -const TUid KControlPanelAppUid ={0x20025fd9}; +enum { + EQtHighwayLaunch = 6 +}; class HbDialog; class HbPushButton; @@ -50,10 +53,9 @@ { Q_OBJECT public: - DMFotaView(HbMainWindow *mainWindow); + DMFotaView(HbMainWindow *aMainWindow,DMServiceProvider* aService=NULL); virtual ~DMFotaView(); bool addFotaView(); - //HbDialog* createDialog() const; void displayNoteAndDisableButtons(); void enableButtons(); @@ -66,42 +68,43 @@ void OnHelp(); void OnExit(); void CheckforUpdate(); - void AdvancedDeviceManager(bool launchadvanceview = true); + void AdvancedDeviceManager(bool aLaunchadvanceview = true); void backtoMainWindow(); - void readSection( Qt::Orientation orientation ); + void readSection( Qt::Orientation aOrientation ); void ResumeUpdate(); public: void UpdateDMUI(TBool aVal); private: - void FormatList(QString val, QString str); + void FormatList(QString aVal, QString aStr); RFotaEngineSession& FotaEngineL(); void fotaSupportEnabled(); private: HbMainWindow* mMainWindow; - HbView* fotaPortraitView; - HbView* fotaLandscapeView; - DmAdvancedView* profilesView; + HbView* mFotaPortraitView; + HbView* mFotaLandscapeView; + DmAdvancedView* mProfilesView; HbAction *mSoftKeyBackAction; RSyncMLSession iSession; - RSyncMLDevManProfile profile; + RSyncMLDevManProfile iProfile; RSyncMLDevManJob iSyncJob; QTranslator* mTranslator; - HbLabel *label,*label2,*label3,*label4; - QStringList list1,list2; - TInt i; - DmInfo* mainDmInfo; - HbDocumentLoader loader,loader2; - HbPushButton *updateButton; - TInt fotaValue; - HbPushButton *advancedButton; - HbPushButton *updateButtonLandscape; - HbPushButton *advancedButtonLandscape; + HbLabel *mLabel,*mLabel2,*mLabel3,*mLabel4; + QStringList mList1,mList2; + TInt iCount; + DMServiceProvider* mService; + DmInfo* iMainDmInfo; + HbDocumentLoader mLoader,mLoader2; + HbPushButton *mUpdateButton; + TInt iFotaValue; + HbPushButton *mAdvancedButton; + HbPushButton *mUpdateButtonLandscape; + HbPushButton *mAdvancedButtonLandscape; RFotaEngineSession iFotaEngine; RFotaEngineSession::TState iFotaState; CDeviceUpdateMoniter * iMoniter; - TBool Connected; + TBool iConnected; }; diff -r 03849bd79877 -r fdbfe0a95492 deviceupdatesui/deviceupdates/inc/dmserviceprovider.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/deviceupdatesui/deviceupdates/inc/dmserviceprovider.h Fri Oct 15 11:39:02 2010 +0530 @@ -0,0 +1,38 @@ +/* +* Copyright (c) 2010 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: Qt Highway Service Provider for control panel +* +*/ + +#ifndef DMSERVICEPROVIDER_H_ +#define DMSERVICEPROVIDER_H_ + +#include + +class DMServiceProvider : public XQServiceProvider +{ + Q_OBJECT +public: + DMServiceProvider( QObject *parent = NULL ); + ~DMServiceProvider(); + + void complete(); + +public slots: + void launchDM(); +private: + int requestId; +}; + +#endif /* DMSERVICEPROVIDER_H_ */ diff -r 03849bd79877 -r fdbfe0a95492 deviceupdatesui/deviceupdates/inc/nsmldmdef.h --- a/deviceupdatesui/deviceupdates/inc/nsmldmdef.h Fri Sep 17 19:58:05 2010 +0530 +++ b/deviceupdatesui/deviceupdates/inc/nsmldmdef.h Fri Oct 15 11:39:02 2010 +0530 @@ -157,6 +157,10 @@ EFotaUpdateDM }; +enum { + EDMLaunchedFromDialer=0, + EDMLaunchedFromCP + }; #endif // NSMLDMDEF_H diff -r 03849bd79877 -r fdbfe0a95492 deviceupdatesui/deviceupdates/inc/nsmldmsyncinternalpskeys.h --- a/deviceupdatesui/deviceupdates/inc/nsmldmsyncinternalpskeys.h Fri Sep 17 19:58:05 2010 +0530 +++ b/deviceupdatesui/deviceupdates/inc/nsmldmsyncinternalpskeys.h Fri Oct 15 11:39:02 2010 +0530 @@ -76,6 +76,10 @@ //Sets by DM UI & used by IAD or others const TUint32 KDMIdle = 0x0000000C; const TUint32 KSilentSession = 0x0000000D; + +//PubSub key used to store the information regarding whether DM has been launched +// by Control panel or not +const TUint32 KDMLaunched = 0x0000000E; #endif // NSMLDMSYNCINTERNALPSKEYS_H // End of File diff -r 03849bd79877 -r fdbfe0a95492 deviceupdatesui/deviceupdates/inc/serversettingsview.h --- a/deviceupdatesui/deviceupdates/inc/serversettingsview.h Fri Sep 17 19:58:05 2010 +0530 +++ b/deviceupdatesui/deviceupdates/inc/serversettingsview.h Fri Oct 15 11:39:02 2010 +0530 @@ -52,6 +52,7 @@ public slots: void backButtonClicked(); void checkServerIdvalue(); + void onDialogClosed(int action); void accessPointItemChanged(int apindex); void portItemChanged(QString port); diff -r 03849bd79877 -r fdbfe0a95492 deviceupdatesui/deviceupdates/resources/devman.docml --- a/deviceupdatesui/deviceupdates/resources/devman.docml Fri Sep 17 19:58:05 2010 +0530 +++ b/deviceupdatesui/deviceupdates/resources/devman.docml Fri Oct 15 11:39:02 2010 +0530 @@ -127,12 +127,6 @@ - - - - - - @@ -151,6 +145,12 @@ + + + + + + diff -r 03849bd79877 -r fdbfe0a95492 deviceupdatesui/deviceupdates/resources/service_conf.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/deviceupdatesui/deviceupdates/resources/service_conf.xml Fri Oct 15 11:39:02 2010 +0530 @@ -0,0 +1,7 @@ + + + Device Manager service + + Launch DeviceManager + + \ No newline at end of file diff -r 03849bd79877 -r fdbfe0a95492 deviceupdatesui/deviceupdates/src/deviceupdatemoniter.cpp --- a/deviceupdatesui/deviceupdates/src/deviceupdatemoniter.cpp Fri Sep 17 19:58:05 2010 +0530 +++ b/deviceupdatesui/deviceupdates/src/deviceupdatemoniter.cpp Fri Oct 15 11:39:02 2010 +0530 @@ -26,9 +26,11 @@ { FLOG(_L("CDeviceUpdateMoniter::NewL >>")); CDeviceUpdateMoniter* h=new (ELeave)CDeviceUpdateMoniter; + CleanupStack::PushL( h ); h->iObserver = aObserver; h->ConstructL(); FLOG(_L("CDeviceUpdateMoniter::NewL <<")); + CleanupStack::Pop( h ); return h; } diff -r 03849bd79877 -r fdbfe0a95492 deviceupdatesui/deviceupdates/src/dmadvancedview.cpp --- a/deviceupdatesui/deviceupdates/src/dmadvancedview.cpp Fri Sep 17 19:58:05 2010 +0530 +++ b/deviceupdatesui/deviceupdates/src/dmadvancedview.cpp Fri Oct 15 11:39:02 2010 +0530 @@ -654,25 +654,19 @@ // WLAN MAC - TUint KPhoneWlanSeparator (':'); - _LIT( KWLanMACDataFormat, "%02x"); - // Fetch WLAN MAC address - TBuf address; - RProperty::Get( KPSUidWlan, KPSWlanMacAddress, address ); - // Format fetched address - TBuf wlanMACAddress; - for ( TInt i( 0 ); i < address.Length(); i++ ) - { - // Set separator - if( i > 0 ) - { - wlanMACAddress.Append( KPhoneWlanSeparator ); - } - // Set data - TBuf<50> tmp; - tmp.Format( KWLanMACDataFormat, address[i] ); - wlanMACAddress.Append( tmp ); - } + TBuf8 address; + // Fetch WLAN MAC address + RProperty::Get(KPSUidWlan,KPSWlanMacAddress,address); + TBuf wlanMACAddress; + for ( TInt i = 0; i < address.Length(); i++ ) + { + TUint16 addbyte = address[i]; + wlanMACAddress.AppendFormat(_L("%02X:"), addbyte); + } + if ( wlanMACAddress.Length() ) // remove trailing ':' + { + wlanMACAddress.Delete(wlanMACAddress.Length()-1, 1); + } liststr.clear(); item = new QStandardItem(); val = hbTrId("txt_device_update_dblist_wlan_mac_address"); diff -r 03849bd79877 -r fdbfe0a95492 deviceupdatesui/deviceupdates/src/dmfotaview.cpp --- a/deviceupdatesui/deviceupdates/src/dmfotaview.cpp Fri Sep 17 19:58:05 2010 +0530 +++ b/deviceupdatesui/deviceupdates/src/dmfotaview.cpp Fri Oct 15 11:39:02 2010 +0530 @@ -22,11 +22,8 @@ #include #include #include -#include #include #include -#include -#include #include #include #include @@ -42,13 +39,13 @@ // DMFotaView::DMFotaView // ----------------------------------------------------------------------------- // -DMFotaView::DMFotaView(HbMainWindow *mainWindow): - mMainWindow(mainWindow),profilesView(NULL),Connected(EFalse) +DMFotaView::DMFotaView(HbMainWindow *aMainWindow,DMServiceProvider* aService): +mService(aService),mMainWindow(aMainWindow),mProfilesView(NULL),iConnected(EFalse) { qDebug("DMFotaView::DMFotaView >>"); - fotaPortraitView=0; - fotaLandscapeView=0; - mainDmInfo=0; + mFotaPortraitView=NULL; + mFotaLandscapeView=NULL; + iMainDmInfo=NULL; qDebug("DMFotaView::DMFotaView <<"); } @@ -60,8 +57,8 @@ DMFotaView::~DMFotaView() { qDebug("DMFotaView::~DMFotaView >>"); - if(mainDmInfo) - delete mainDmInfo; + if(iMainDmInfo) + delete iMainDmInfo; if (iFotaEngine.Handle()) iFotaEngine.Close(); @@ -86,60 +83,60 @@ bool ok = false; QString val,val2; - loader.load(":/xml/devman.docml", &ok); + mLoader.load(":/xml/devman.docml", &ok); ok = false; - loader2.load(":/xml/devman.docml", &ok); + mLoader2.load(":/xml/devman.docml", &ok); // Exit if the file format is invalid Q_ASSERT_X(ok, "Device Manager", "Invalid docml file"); ok=false; - loader.load(":/xml/devman.docml","Portrait", &ok); + mLoader.load(":/xml/devman.docml","Portrait", &ok); ok=false; - loader2.load(":/xml/devman.docml","Landscape", &ok); + mLoader2.load(":/xml/devman.docml","Landscape", &ok); // Load the view by name from the xml file - fotaPortraitView = qobject_cast(loader.findWidget("p:view")); - fotaLandscapeView = qobject_cast(loader2.findWidget("l:view")); + mFotaPortraitView = qobject_cast(mLoader.findWidget("p:view")); + mFotaLandscapeView = qobject_cast(mLoader2.findWidget("l:view")); - HbAction *help = qobject_cast (loader.findObject("help")); + HbAction *help = qobject_cast (mLoader.findObject("help")); help->setText(QString("txt_common_menu_help")); QObject::connect(help, SIGNAL(triggered()), this, SLOT(OnHelp())); - HbAction *exit = qobject_cast (loader.findObject("exit")); + HbAction *exit = qobject_cast (mLoader.findObject("exit")); exit->setText(QString("txt_common_menu_exit")); QObject::connect(exit, SIGNAL(triggered()), this, SLOT(OnExit())); - help = qobject_cast(loader2.findObject("help")); + help = qobject_cast(mLoader2.findObject("help")); help->setText(QString("txt_common_menu_help")); QObject::connect(help, SIGNAL(triggered()), this, SLOT(OnHelp())); - exit = qobject_cast( loader2.findObject("exit")); + exit = qobject_cast( mLoader2.findObject("exit")); exit->setText(QString("txt_common_menu_exit")); QObject::connect(exit, SIGNAL(triggered()), this, SLOT(OnExit())); mSoftKeyBackAction = new HbAction(Hb::BackNaviAction ,this); mSoftKeyBackAction->setText("Back"); - fotaPortraitView->setNavigationAction(mSoftKeyBackAction); - fotaLandscapeView->setNavigationAction(mSoftKeyBackAction); + mFotaPortraitView->setNavigationAction(mSoftKeyBackAction); + mFotaLandscapeView->setNavigationAction(mSoftKeyBackAction); connect(mSoftKeyBackAction, SIGNAL(triggered()), this, SLOT(backtoMainWindow())); - i=0; + iCount=0; QString str; //Setting title text - label = qobject_cast (loader.findWidget("p:title")); - label2 = qobject_cast (loader2.findWidget("l:title")); + mLabel = qobject_cast (mLoader.findWidget("p:title")); + mLabel2 = qobject_cast (mLoader2.findWidget("l:title")); val = hbTrId("txt_device_update_subhead_device_updates"); - label->setPlainText(val); - label2->setPlainText(val); + mLabel->setPlainText(val); + mLabel2->setPlainText(val); - HbScrollArea* area = qobject_cast (loader.findWidget("scrollArea")); + HbScrollArea* area = qobject_cast (mLoader.findWidget("scrollArea")); area->setVerticalScrollBarPolicy(HbScrollArea::ScrollBarAlwaysOn); - list1 << "label" << "label_1" << "label_2" << "label_3" << "label_4" << "label_5" << "label_6"<<"label_7"<<"label_8"<<"label_9"<<"label_10"<<"label_11"; - list2 << "label_13" << "label_14" << "label_15" << "label_16" << "label_17" << "label_18" << "label_19"<<"label_20"<<"label_21"<<"label_22"<<"label_23"<<"label_24"; + mList1 << "label" << "label_1" << "label_2" << "label_3" << "label_4" << "label_5" << "label_6"<<"label_7"<<"label_8"<<"label_9"<<"label_10"<<"label_11"; + mList2 << "label_13" << "label_14" << "label_15" << "label_16" << "label_17" << "label_18" << "label_19"<<"label_20"<<"label_21"<<"label_22"<<"label_23"<<"label_24"; //Product Release @@ -283,8 +280,8 @@ if(iFotaState == RFotaEngineSession::EDownloadComplete || iFotaState == RFotaEngineSession::EStartingUpdate || iFotaState == RFotaEngineSession::EStartingDownload || iFotaState == RFotaEngineSession::EDownloadProgressing) { - label = qobject_cast (loader.findWidget("p:updatelabel")); - label2 = qobject_cast (loader2.findWidget("l:updatelabel")); + mLabel = qobject_cast (mLoader.findWidget("p:updatelabel")); + mLabel2 = qobject_cast (mLoader2.findWidget("l:updatelabel")); FotaEngineL().GetCurrentFirmwareDetailsL(Name, Version, Size); const QString @@ -310,53 +307,53 @@ val = hbTrId("txt_device_update_setlabel_the_last_update_1_2_mb").arg(name) .arg(ver).arg(sizeMB); } - label->setPlainText(val); - label2->setPlainText(val); + mLabel->setPlainText(val); + mLabel2->setPlainText(val); val = hbTrId("txt_device_update_button_resume_update"); - updateButton = qobject_cast(loader.findWidget("p:update")); - updateButton->setText(val); - QObject::connect(updateButton, SIGNAL(clicked()), this, SLOT(ResumeUpdate())); - updateButtonLandscape = qobject_cast(loader2.findWidget("l:update")); - updateButtonLandscape->setText(val); - QObject::connect(updateButtonLandscape, SIGNAL(clicked()), this, SLOT(ResumeUpdate())); - Connected = ETrue; + mUpdateButton = qobject_cast(mLoader.findWidget("p:update")); + mUpdateButton->setText(val); + QObject::connect(mUpdateButton, SIGNAL(clicked()), this, SLOT(ResumeUpdate())); + mUpdateButtonLandscape = qobject_cast(mLoader2.findWidget("l:update")); + mUpdateButtonLandscape->setText(val); + QObject::connect(mUpdateButtonLandscape, SIGNAL(clicked()), this, SLOT(ResumeUpdate())); + iConnected = ETrue; } else { //Setting help text for update button - label = qobject_cast (loader.findWidget("p:updatelabel")); - label2 = qobject_cast (loader2.findWidget("l:updatelabel")); + mLabel = qobject_cast (mLoader.findWidget("p:updatelabel")); + mLabel2 = qobject_cast (mLoader2.findWidget("l:updatelabel")); val = hbTrId("txt_device_update_setlabel_to_update_your_device_s"); - label->setPlainText(val); - label2->setPlainText(val); + mLabel->setPlainText(val); + mLabel2->setPlainText(val); val = hbTrId("txt_device_update_button_update"); - updateButton = qobject_cast(loader.findWidget("p:update")); - updateButton->setText(val); - QObject::connect(updateButton, SIGNAL(clicked()), this, SLOT(CheckforUpdate())); - updateButtonLandscape = qobject_cast(loader2.findWidget("l:update")); - updateButtonLandscape->setText(val); - QObject::connect(updateButtonLandscape, SIGNAL(clicked()), this, SLOT(CheckforUpdate())); - Connected = ETrue; + mUpdateButton = qobject_cast(mLoader.findWidget("p:update")); + mUpdateButton->setText(val); + QObject::connect(mUpdateButton, SIGNAL(clicked()), this, SLOT(CheckforUpdate())); + mUpdateButtonLandscape = qobject_cast(mLoader2.findWidget("l:update")); + mUpdateButtonLandscape->setText(val); + QObject::connect(mUpdateButtonLandscape, SIGNAL(clicked()), this, SLOT(CheckforUpdate())); + iConnected = ETrue; } val = hbTrId("txt_device_update_button_advanced"); - advancedButton = qobject_cast(loader.findWidget("p:advanced")); - advancedButton->setText(val); - QObject::connect(advancedButton, SIGNAL(clicked()), this, SLOT(AdvancedDeviceManager())); - advancedButtonLandscape = qobject_cast(loader2.findWidget("l:advanced")); - advancedButtonLandscape->setText(val); - QObject::connect(advancedButtonLandscape, SIGNAL(clicked()), this, SLOT(AdvancedDeviceManager())); + mAdvancedButton = qobject_cast(mLoader.findWidget("p:advanced")); + mAdvancedButton->setText(val); + QObject::connect(mAdvancedButton, SIGNAL(clicked()), this, SLOT(AdvancedDeviceManager())); + mAdvancedButtonLandscape = qobject_cast(mLoader2.findWidget("l:advanced")); + mAdvancedButtonLandscape->setText(val); + QObject::connect(mAdvancedButtonLandscape, SIGNAL(clicked()), this, SLOT(AdvancedDeviceManager())); fotaSupportEnabled(); - mMainWindow->addView(fotaPortraitView); - mMainWindow->addView(fotaLandscapeView); + mMainWindow->addView(mFotaPortraitView); + mMainWindow->addView(mFotaLandscapeView); if(mMainWindow->orientation()==Qt::Vertical) - mMainWindow->setCurrentView(fotaPortraitView); + mMainWindow->setCurrentView(mFotaPortraitView); else - mMainWindow->setCurrentView(fotaLandscapeView); + mMainWindow->setCurrentView(mFotaLandscapeView); iMoniter = CDeviceUpdateMoniter::NewL(this); //iMoniter->StartMoniter(); @@ -375,9 +372,9 @@ qDebug("omadm DeviceManagerUi::CheckforUpdate >>"); TInt profileId=NULL; - if(mainDmInfo==0) + if(iMainDmInfo==0) { - if(!profilesView) + if(!mProfilesView) { bool launchview = false; AdvancedDeviceManager(launchview); @@ -385,9 +382,9 @@ mainDmInfo->refreshProfileList();*/ } // else - mainDmInfo = profilesView->dminfo; + iMainDmInfo = mProfilesView->dminfo; } - if((profileId = mainDmInfo->DefaultFotaProfileIdL())==KErrNotFound) + if((profileId = iMainDmInfo->DefaultFotaProfileIdL())==KErrNotFound) { HbNotificationDialog* note = new HbNotificationDialog(); @@ -401,7 +398,7 @@ } else { - mainDmInfo->sync(profileId); + iMainDmInfo->sync(profileId); //Connecting note to be displayed //Buttons to be disabled displayNoteAndDisableButtons(); @@ -438,10 +435,10 @@ void DMFotaView::displayNoteAndDisableButtons() { qDebug("DMFotaView::displayNoteAndDisableButtons >>"); - updateButton->setEnabled(false); - advancedButton->setEnabled(false); - updateButtonLandscape->setEnabled(false); - advancedButtonLandscape->setEnabled(false); + mUpdateButton->setEnabled(false); + mAdvancedButton->setEnabled(false); + mUpdateButtonLandscape->setEnabled(false); + mAdvancedButtonLandscape->setEnabled(false); HbNotificationDialog* note = new HbNotificationDialog(); //QString val = hbTrId("txt_device_update_dpophead_device_update"); note->setTitle(hbTrId("txt_device_update_dpophead_device_update")); @@ -468,8 +465,8 @@ if (!value) { fotaSupportEnabled(); - advancedButtonLandscape->setEnabled(true); - advancedButton->setEnabled(true); + mAdvancedButtonLandscape->setEnabled(true); + mAdvancedButton->setEnabled(true); } qDebug("DMFotaView::enableButtons <<"); } @@ -482,21 +479,21 @@ void DMFotaView::AdvancedDeviceManager(bool launchadvanceview) { qDebug("omadm DeviceManagerUi::AdvancedDeviceManager"); - if(!profilesView) + if(!mProfilesView) { qDebug("omadm DeviceManagerUi::AdvancedDeviceManager 1"); - profilesView = new DmAdvancedView(mMainWindow,this,mainDmInfo); + mProfilesView = new DmAdvancedView(mMainWindow,this,iMainDmInfo); qDebug("omadm DeviceManagerUi::AdvancedDeviceManager 2"); - bool loadingok = profilesView->displayItems(); + bool loadingok = mProfilesView->displayItems(); if(loadingok) { qDebug("omadm DeviceManagerUi::AdvancedDeviceManager 3"); - mMainWindow->addView(profilesView); + mMainWindow->addView(mProfilesView); qDebug("omadm DeviceManagerUi::AdvancedDeviceManager 4"); - profilesView->setBackBehavior(); + mProfilesView->setBackBehavior(); qDebug("omadm DeviceManagerUi::AdvancedDeviceManager 5"); if(launchadvanceview) - mMainWindow->setCurrentView(profilesView); + mMainWindow->setCurrentView(mProfilesView); qDebug("omadm DeviceManagerUi::AdvancedDeviceManager 6"); } else @@ -507,8 +504,8 @@ } else { - profilesView->setBackBehavior(); - mMainWindow->setCurrentView(profilesView); + mProfilesView->setBackBehavior(); + mMainWindow->setCurrentView(mProfilesView); } qDebug("DMFotaView::AdvancedDeviceManager <<"); } @@ -521,18 +518,18 @@ void DMFotaView::FormatList(QString val,QString str) { qDebug("DMFotaView::FormatList >>"); - label = qobject_cast (loader.findWidget(list1[i])); - label2 = qobject_cast (loader2.findWidget(list2[i++])); - label3 = qobject_cast (loader.findWidget(list1[i])); - label4 = qobject_cast (loader2.findWidget(list2[i++])); - label->setPlainText(val); - label2->setPlainText(val); - label3->setPlainText(str); - label4->setPlainText(str); - label->setVisible(ETrue); - label2->setVisible(ETrue); - label3->setVisible(ETrue); - label4->setVisible(ETrue); + mLabel = qobject_cast (mLoader.findWidget(mList1[iCount])); + mLabel2 = qobject_cast (mLoader2.findWidget(mList2[iCount++])); + mLabel3 = qobject_cast (mLoader.findWidget(mList1[iCount])); + mLabel4 = qobject_cast (mLoader2.findWidget(mList2[iCount++])); + mLabel->setPlainText(val); + mLabel2->setPlainText(val); + mLabel3->setPlainText(str); + mLabel4->setPlainText(str); + mLabel->setVisible(ETrue); + mLabel2->setVisible(ETrue); + mLabel3->setVisible(ETrue); + mLabel4->setVisible(ETrue); qDebug("DMFotaView::FormatList <<"); } @@ -553,24 +550,15 @@ void DMFotaView::backtoMainWindow() { qDebug("DMFotaView::backtoMainWindow >>"); - QString appName = qApp->applicationName(); - QString cpAppTitle("Control panel"); - mMainWindow->removeView(fotaPortraitView); - mMainWindow->removeView(fotaLandscapeView); - fotaPortraitView->deleteLater(); - fotaLandscapeView->deleteLater(); - fotaPortraitView = NULL; - fotaLandscapeView = NULL; - if (appName == cpAppTitle) + if(mService) { - TApaTaskList taskList(CEikonEnv::Static()->WsSession()); - TApaTask task = taskList.FindApp(KControlPanelAppUid); - if (task.Exists()) - { - task.BringToForeground(); - } + mService->complete(); + connect(mService, SIGNAL(returnValueDelivered()), qApp, SLOT(quit())); } - qApp->quit(); + else + { + qApp->quit(); + } qDebug("DMFotaView::backtoMainWindow <<"); } @@ -597,20 +585,20 @@ void DMFotaView::readSection( Qt::Orientation orientation ) { qDebug("DMFotaView::readSection >>"); - if(mMainWindow->currentView() == fotaPortraitView || mMainWindow->currentView() == fotaLandscapeView) + if(mMainWindow->currentView() == mFotaPortraitView || mMainWindow->currentView() == mFotaLandscapeView) { if( orientation == Qt::Vertical ) { // reading "portrait" section - mMainWindow->setCurrentView(fotaPortraitView); + mMainWindow->setCurrentView(mFotaPortraitView); } else { // reading "landscape" section - mMainWindow->setCurrentView(fotaLandscapeView); + mMainWindow->setCurrentView(mFotaLandscapeView); } } - else if(mMainWindow->currentView()==profilesView) + else if(mMainWindow->currentView()==mProfilesView) { - profilesView->reLayout(orientation); + mProfilesView->reLayout(orientation); } qDebug("DMFotaView::readSection <<"); @@ -625,12 +613,12 @@ if (aVal == 1) { qDebug("DMFotaView::aVal == 1 >>"); - if(Connected) + if(iConnected) { qDebug("DMFotaView::Connected >>"); - QObject::disconnect(updateButton,0,0,0); - QObject::disconnect(updateButtonLandscape,0,0,0); - Connected = EFalse; + QObject::disconnect(mUpdateButton,0,0,0); + QObject::disconnect(mUpdateButtonLandscape,0,0,0); + iConnected = EFalse; } iFotaState = FotaEngineL().GetState(-1); @@ -643,12 +631,12 @@ qDebug("CDeviceUpdateMoniter::Resume >>"); QString value = hbTrId("txt_device_update_button_resume_update"); //updateButton = qobject_cast(loader.findWidget("p:update"); - updateButton->setText(value); - QObject::connect(updateButton, SIGNAL(clicked()), this,SLOT(ResumeUpdate())); + mUpdateButton->setText(value); + QObject::connect(mUpdateButton, SIGNAL(clicked()), this,SLOT(ResumeUpdate())); //updateButtonLandscape = qobject_cast(loader2.findWidget("l:update"); - updateButtonLandscape->setText(value); - QObject::connect(updateButtonLandscape, SIGNAL(clicked()), this, SLOT(ResumeUpdate())); - Connected = ETrue; + mUpdateButtonLandscape->setText(value); + QObject::connect(mUpdateButtonLandscape, SIGNAL(clicked()), this, SLOT(ResumeUpdate())); + iConnected = ETrue; TBuf8<80> Name; TBuf8<80> Version; @@ -680,53 +668,53 @@ .arg(ver).arg(sizeMB); } - label->setPlainText(val); - label2->setPlainText(val); + mLabel->setPlainText(val); + mLabel2->setPlainText(val); } else { qDebug("DMFotaView::Update >>"); val = hbTrId("txt_device_update_setlabel_to_update_your_device_s"); - label->setPlainText(val); - label2->setPlainText(val); + mLabel->setPlainText(val); + mLabel2->setPlainText(val); val = hbTrId("txt_device_update_button_update"); - updateButton = qobject_cast(loader.findWidget("p:update")); - updateButton->setText(val); - QObject::connect(updateButton, SIGNAL(clicked()), this, SLOT(CheckforUpdate())); - updateButtonLandscape = qobject_cast(loader2.findWidget("l:update")); - updateButtonLandscape->setText(val); - QObject::connect(updateButtonLandscape, SIGNAL(clicked()), this, SLOT(CheckforUpdate())); - Connected = ETrue; + mUpdateButton = qobject_cast(mLoader.findWidget("p:update")); + mUpdateButton->setText(val); + QObject::connect(mUpdateButton, SIGNAL(clicked()), this, SLOT(CheckforUpdate())); + mUpdateButtonLandscape = qobject_cast(mLoader2.findWidget("l:update")); + mUpdateButtonLandscape->setText(val); + QObject::connect(mUpdateButtonLandscape, SIGNAL(clicked()), this, SLOT(CheckforUpdate())); + iConnected = ETrue; } } fotaSupportEnabled(); - if(fotaValue == 1 && aVal == 0) + if(iFotaValue == 1 && aVal == 0) { - updateButton->setEnabled(aVal); - updateButtonLandscape->setEnabled(aVal); + mUpdateButton->setEnabled(aVal); + mUpdateButtonLandscape->setEnabled(aVal); } - advancedButton->setEnabled(aVal); - advancedButtonLandscape->setEnabled(aVal); + mAdvancedButton->setEnabled(aVal); + mAdvancedButtonLandscape->setEnabled(aVal); qDebug("DMFotaView::UpdateDMUI <<"); qDebug("DMFotaView::UpdateDMUI <<"); } void DMFotaView::fotaSupportEnabled() { - fotaValue = 1; + iFotaValue = 1; CRepository* centrep( NULL); TUid uidValue = {0x101F9A08}; // KCRFotaAdapterEnabled TInt err = KErrNone; TRAP(err,centrep = CRepository::NewL( uidValue)); if(centrep && err == KErrNone ) { - centrep->Get( 1 , fotaValue ); // KCRFotaAdapterEnabled + centrep->Get( 1 , iFotaValue ); // KCRFotaAdapterEnabled delete centrep; } - if(fotaValue == 0 || fotaValue == 1) + if(iFotaValue == 0 || iFotaValue == 1) { - updateButton->setEnabled(fotaValue); - updateButtonLandscape->setEnabled(fotaValue); + mUpdateButton->setEnabled(iFotaValue); + mUpdateButtonLandscape->setEnabled(iFotaValue); } } diff -r 03849bd79877 -r fdbfe0a95492 deviceupdatesui/deviceupdates/src/dmserviceprovider.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/deviceupdatesui/deviceupdates/src/dmserviceprovider.cpp Fri Oct 15 11:39:02 2010 +0530 @@ -0,0 +1,64 @@ +/* +* Copyright (c) 2010 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: Qt Highway Service Provider for control panel +* +*/ +#include +#include "dmserviceprovider.h" +#include "nsmldmsyncinternalpskeys.h" +#include +#include +#include +#include +#include +// ----------------------------------------------------------------------------- +// DMServiceProvider::DMServiceProvider +// ----------------------------------------------------------------------------- +// +DMServiceProvider::DMServiceProvider(QObject* parent) +: XQServiceProvider("com.nokia.services.MDM.devicemanager",parent) +{ + publishAll(); +} + +// ----------------------------------------------------------------------------- +// DMServiceProvider::~DMServiceProvider +// ----------------------------------------------------------------------------- +// +DMServiceProvider::~DMServiceProvider() +{ +} + +// ----------------------------------------------------------------------------- +// DMServiceProvider::complete +// ----------------------------------------------------------------------------- +// +void DMServiceProvider::complete() +{ + TInt err = RProperty::Delete(KPSUidNSmlDMSyncApp, KDMLaunched); + qDebug()<<"dmsrvice error "<load("control_panel_" + lang, path); @@ -64,11 +62,26 @@ } HbMainWindow window; - - DMFotaView* view = new DMFotaView(&window); + DMServiceProvider* service=NULL; + DMFotaView* view =NULL; + + if(argc == EQtHighwayLaunch) + { + service=new DMServiceProvider(); + view = new DMFotaView(&window,service); + } + else + { + view= new DMFotaView(&window); + } bool loadingok = view->addFotaView(); - window.show(); - return app.exec(); + TInt ret = app.exec(); + if(argc==EQtHighwayLaunch) + { + delete service; + service = NULL; + } + return ret; } diff -r 03849bd79877 -r fdbfe0a95492 deviceupdatesui/deviceupdates/src/nsmldmsynchandler.cpp --- a/deviceupdatesui/deviceupdates/src/nsmldmsynchandler.cpp Fri Sep 17 19:58:05 2010 +0530 +++ b/deviceupdatesui/deviceupdates/src/nsmldmsynchandler.cpp Fri Oct 15 11:39:02 2010 +0530 @@ -234,9 +234,8 @@ iSyncError = aError; iCheckUpdate = EFalse; -#ifndef NO_UPDATE - CRepository* centrep = NULL; - TRAPD( err, centrep = CRepository::NewL( KCRUidNSmlDMSyncApp ) ); + CRepository* centrep = NULL; + TRAPD( err, centrep = CRepository::NewL( KCRUidNSmlDMSyncApp ) ); TInt profileId; centrep->Get( KNSmlDMDefaultFotaProfileKey, profileId ); //FLOG( "CNSmlDMSyncHandler::SynchronizeCompletedL profileId = %d", profileId ); @@ -270,8 +269,8 @@ iDialog->setHeadingWidget(new HbLabel(hbTrId("txt_device_update_title_phone_uptodate"))); iDialog->setContentWidget(new HbLabel(hbTrId("txt_device_update_dpopinfo_your_phone_is_already_u"))); iPrimaryAction = new HbAction(); - iPrimaryAction->setText(hbTrId("OK")); - iDialog->setPrimaryAction(iPrimaryAction); + iPrimaryAction->setText(hbTrId("txt_common_button_ok_single_dialog")); + iDialog->addAction(iPrimaryAction); iDialog->setTimeout(HbPopup::NoTimeout); iDialog->setDismissPolicy(HbPopup::NoDismiss); iDialog->show(); @@ -279,7 +278,6 @@ } } -#endif iUseFotaProgressNote = EFalse; iSyncJob.Close(); diff -r 03849bd79877 -r fdbfe0a95492 deviceupdatesui/deviceupdates/src/serversettingsview.cpp --- a/deviceupdatesui/deviceupdates/src/serversettingsview.cpp Fri Sep 17 19:58:05 2010 +0530 +++ b/deviceupdatesui/deviceupdates/src/serversettingsview.cpp Fri Oct 15 11:39:02 2010 +0530 @@ -147,6 +147,10 @@ if (netauthdata.compare(hbTrId("txt_deviceupdate_setlabel_network_auth_val_yes"))) netauthval = true; //check server name , server id, host addr & usrname + itemlist[0]=itemlist[0].simplified(); + itemlist[1]=itemlist[1].simplified(); + itemlist[3]=itemlist[3].simplified(); + itemlist[4]=itemlist[4].simplified(); if ((itemlist[0].length() > 0) && (itemlist[1].length() > 0) && (itemlist[3].length() > 0) && (itemlist[4].length() > 0)) { @@ -174,13 +178,14 @@ } } if(valSet==1) - { - HbMessageBox *note = new HbMessageBox(HbMessageBox::MessageTypeInformation); + { + HbMessageBox *note = new HbMessageBox(HbMessageBox::MessageTypeQuestion); + note->setStandardButtons(HbMessageBox::Yes | HbMessageBox::No); + note->setAttribute( Qt::WA_DeleteOnClose); note->setText(hbTrId( - "txt_device_update_dialog_enter_mandatory_field_values")); - note->setAttribute( Qt::WA_DeleteOnClose); - note->setTimeout(HbPopup::NoTimeout); - note->open(); + "txt_device_update_info_mandatory_fields_not_filled")); + note->setTimeout(HbMessageBox::NoTimeout); + note->open(this,SLOT(onDialogClosed(int))); } else { @@ -193,18 +198,28 @@ } } +void ServerSettingsView::onDialogClosed(int action) +{ + if (action == HbMessageBox::Yes) + { + iMainWindow->setCurrentView(serversView); + } +} void ServerSettingsView::checkServerIdvalue() { QString srvid = serverid->contentWidgetData(QString("text")).toString(); + if(srvid != NULL) + { if(serversView->checkServerId(srvid)) { serverid->setContentWidgetData(QString("text"), QString("")); HbMessageBox *note= new HbMessageBox(HbMessageBox::MessageTypeInformation); - note->setText(hbTrId("txt_device_update_dialog_invalid_server_id")); + note->setText(hbTrId("txt_device_update_title_duplicate_server_id")); note->setAttribute( Qt::WA_DeleteOnClose); note->setTimeout(HbPopup::NoTimeout); note->open(); + } } } diff -r 03849bd79877 -r fdbfe0a95492 deviceupdatesui/deviceupdatesplugin/deviceupdatesplugin.pro --- a/deviceupdatesui/deviceupdatesplugin/deviceupdatesplugin.pro Fri Sep 17 19:58:05 2010 +0530 +++ b/deviceupdatesui/deviceupdatesplugin/deviceupdatesplugin.pro Fri Oct 15 11:39:02 2010 +0530 @@ -30,7 +30,9 @@ LIBS += -lcpframework \ -lcentralrepository \ -lws32 \ - -lapgrfx + -lapgrfx \ + -lapparc -lcone \ + -lxqservice -lxqserviceutil -lxqutils # Input HEADERS += deviceupdatesplugin.h \ diff -r 03849bd79877 -r fdbfe0a95492 deviceupdatesui/deviceupdatesplugin/inc/deviceupdatesdata.h --- a/deviceupdatesui/deviceupdatesplugin/inc/deviceupdatesdata.h Fri Sep 17 19:58:05 2010 +0530 +++ b/deviceupdatesui/deviceupdatesplugin/inc/deviceupdatesdata.h Fri Oct 15 11:39:02 2010 +0530 @@ -18,14 +18,19 @@ #ifndef DEVICEUPDATESDATA_H_ #define DEVICEUPDATESDATA_H_ -#include #include +#include +#include _LIT( KDMUIProcess, "\\deviceupdates.exe" ); _LIT( KDMUIName, "deviceupdates" ); const TUid KUidSmlSyncApp = { 0x101F6DE5 }; +const TUint32 KNsmlDmUILaunch = 0x00000009; +const QString KService("com.nokia.services.MDM"); +const QString KInterface("devicemanager"); +const QString KMethod("launchDM()"); class DeviceUpdateData : public CpSettingFormEntryItemData { @@ -35,17 +40,19 @@ const QString &text = QString(), const QString &description = QString(), const HbIcon &icon = HbIcon(), - const HbDataFormModelItem *parent = 0); + const HbDataFormModelItem *parent = NULL); void LaunchDeviceUpdatesUi(); void CloseDeviceUpdatesUi(); virtual ~DeviceUpdateData(); public slots: void onLaunchView(); + void handleOk(const QVariant &result); + void handleError(int errorCode, const QString& errorMessage); private: virtual CpBaseSettingView *createSettingView() const; private: - QProcess *mproc; - + XQApplicationManager mRequestManager; + QPointer m_currentRequest; }; #endif// DEVICEUPDATESVIEW_H_ diff -r 03849bd79877 -r fdbfe0a95492 deviceupdatesui/deviceupdatesplugin/src/deviceupdatesdata.cpp --- a/deviceupdatesui/deviceupdatesplugin/src/deviceupdatesdata.cpp Fri Sep 17 19:58:05 2010 +0530 +++ b/deviceupdatesui/deviceupdatesplugin/src/deviceupdatesdata.cpp Fri Oct 15 11:39:02 2010 +0530 @@ -14,37 +14,26 @@ * Description: Device updates data for control panel * */ - -#include -#include -#include #include #include #include "deviceupdatesdata.h" - - +#include DeviceUpdateData::DeviceUpdateData(CpItemDataHelper &itemDataHelper, - const QString &text /*= QString()*/, - const QString &description /*= QString()*/, - const HbIcon &icon /*= HbIcon()*/, - const HbDataFormModelItem *parent /*= 0*/) + const QString &text, + const QString &description, + const HbIcon &icon, + const HbDataFormModelItem *parent) : CpSettingFormEntryItemData(itemDataHelper, text, description, icon, parent) { - mproc = NULL; } DeviceUpdateData::~DeviceUpdateData() { CloseDeviceUpdatesUi(); - if (mproc) - { - delete mproc; - mproc = NULL; - } } // ----------------------------------------------------------------------------- @@ -52,10 +41,10 @@ // ----------------------------------------------------------------------------- // void DeviceUpdateData::LaunchDeviceUpdatesUi() - { - - RWsSession ws; - User::LeaveIfError( ws.Connect() ); + { + qDebug("DeviceUpdateData::LaunchDeviceUpdatesUi >>"); + RWsSession ws; + qt_symbian_throwIfError( ws.Connect() ); CleanupClosePushL( ws ); // Find the task with uid TApaTaskList taskList(ws); @@ -66,40 +55,83 @@ } 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 + qDebug("DeviceUpdateData::LaunchDeviceUpdatesUi >> embedding"); + QScopedPointer requester (mRequestManager.create(KService,KInterface,KMethod,true)); //false for NON-EMBEDDED + qDebug("DeviceUpdateData::LaunchDeviceUpdatesUi >> embed end"); + connect(requester.data(), SIGNAL(requestOk(const QVariant&)), this, SLOT(handleOk(const QVariant&))); + connect(requester.data(), SIGNAL(requestError(int,const QString&)), this, SLOT(handleError(int,const QString&))); + if (!(requester.isNull())) + { + m_currentRequest = requester.data(); + requester->setSynchronous(false); + bool serviceRequestOk = requester->send(); + if (serviceRequestOk) + { + m_currentRequest = requester.take(); + } + else + { + // On a controlled error Qt Highway should call requestError, + // so clean scoped pointer here. + requester.take(); + } + } + } + CleanupStack::PopAndDestroy(); // ws + qDebug("DeviceUpdateData::LaunchDeviceUpdatesUi >> end"); } // --------------------------------------------------------------------------------------------- -// DeviceUpdateData::CloseDmUi +// DeviceUpdateData::CloseDeviceUpdatesUi // closes DM Ui // --------------------------------------------------------------------------------------------- void DeviceUpdateData:: CloseDeviceUpdatesUi() { - if(( mproc )&&(mproc->state() == QProcess::Running)) - { - mproc->close(); - } - + if(m_currentRequest) + { + delete m_currentRequest; + m_currentRequest = NULL; + } } +// --------------------------------------------------------------------------------------------- +// DeviceUpdateData::onLaunchView +// --------------------------------------------------------------------------------------------- void DeviceUpdateData::onLaunchView() { LaunchDeviceUpdatesUi(); } +// --------------------------------------------------------------------------------------------- +// DeviceUpdateData::createSettingView +// --------------------------------------------------------------------------------------------- CpBaseSettingView *DeviceUpdateData::createSettingView() const { - return 0; + return NULL; } + +// --------------------------------------------------------------------------------------------- +// DeviceUpdateData::handleOk +// Handles when request completes successfully +// --------------------------------------------------------------------------------------------- +void DeviceUpdateData::handleOk(const QVariant &returnValue) +{ + if(m_currentRequest) + { + delete m_currentRequest; + m_currentRequest = NULL; + } +} + +// --------------------------------------------------------------------------------------------- +// DeviceUpdateData::handleError +// Handles when request returns with an error +// --------------------------------------------------------------------------------------------- +void DeviceUpdateData::handleError(int error, const QString& errorMessage) +{ + if(m_currentRequest) + { + delete m_currentRequest; + m_currentRequest = NULL; + } +} diff -r 03849bd79877 -r fdbfe0a95492 deviceupdatesui/deviceupdatesqtsp/deviceupdatesqtsp.pro --- a/deviceupdatesui/deviceupdatesqtsp/deviceupdatesqtsp.pro Fri Sep 17 19:58:05 2010 +0530 +++ b/deviceupdatesui/deviceupdatesqtsp/deviceupdatesqtsp.pro Fri Oct 15 11:39:02 2010 +0530 @@ -50,7 +50,9 @@ LIBS += -lhbcore \ -lxqservice \ - -lxqserviceutil + -lxqserviceutil \ + -lapgrfx \ + -lapparc -lcone SERVICE.FILE += ./resources/service_conf.xml SERVICE.OPTIONS = embeddable diff -r 03849bd79877 -r fdbfe0a95492 deviceupdatesui/deviceupdatesqtsp/inc/DmTelServiceHandler.h --- a/deviceupdatesui/deviceupdatesqtsp/inc/DmTelServiceHandler.h Fri Sep 17 19:58:05 2010 +0530 +++ b/deviceupdatesui/deviceupdatesqtsp/inc/DmTelServiceHandler.h Fri Oct 15 11:39:02 2010 +0530 @@ -11,7 +11,7 @@ * * Contributors: * - * Description: + * Description: Service Handler for dialer launch of DM * */ @@ -24,11 +24,20 @@ _LIT( KDMUIProcess, "\\deviceupdates.exe" ); +enum { + EDMLaunchedFromDialer=0, + EDMLaunchedFromCP + }; + +const TUid KControlPanelAppUid ={0x20025fd9}; +const TUid KPSUidNSmlDMSyncApp = {0x101f6de5}; +const TUint32 KDMLaunched = {0x0000000E}; + class DmTelServiceHandler : public XQServiceProvider { Q_OBJECT public: - DmTelServiceHandler(QObject *parent = 0); + DmTelServiceHandler(QObject *parent = NULL); ~DmTelServiceHandler(); public slots: diff -r 03849bd79877 -r fdbfe0a95492 deviceupdatesui/deviceupdatesqtsp/src/DmTelServiceHandler.cpp --- a/deviceupdatesui/deviceupdatesqtsp/src/DmTelServiceHandler.cpp Fri Sep 17 19:58:05 2010 +0530 +++ b/deviceupdatesui/deviceupdatesqtsp/src/DmTelServiceHandler.cpp Fri Oct 15 11:39:02 2010 +0530 @@ -11,12 +11,16 @@ * * Contributors: * - * Description: + * Description: Service Handler for dialer launch of DM * */ +#include +#include +#include +#include +#include #include "DmTelServiceHandler.h" -#include DmTelServiceHandler::DmTelServiceHandler(QObject *parent): XQServiceProvider("com.nokia.services.devicemanager", parent) @@ -29,15 +33,48 @@ } void DmTelServiceHandler::showVersionNumber() -{ -// Create DM UI Process -RProcess rp; -TInt err = rp.Create(KDMUIProcess,KNullDesC); -User::LeaveIfError(err); -rp.SetPriority(EPriorityForeground); -rp.Resume(); // logon OK - start the server + { + qDebug("DmTelServiceHandler::showVersionNumber >> "); + // Create DM UI Process + RWsSession ws; + User::LeaveIfError(ws.Connect()); + CleanupClosePushL(ws); + // Find the task with uid + TApaTaskList taskList(ws); + TApaTask task = taskList.FindApp(KPSUidNSmlDMSyncApp); + TInt dmLaunch=NULL; + TInt err = NULL; + RProperty::Get(KPSUidNSmlDMSyncApp, KDMLaunched, dmLaunch); + if (task.Exists()) + { + if (dmLaunch == EDMLaunchedFromDialer) + { + task.BringToForeground(); + } + else if(dmLaunch == EDMLaunchedFromCP) + { + TApaTask task1 = taskList.FindApp(KControlPanelAppUid); + if (task1.Exists()) + { + task1.BringToForeground(); + } + } + } + else + { + RProcess rp; + err = rp.Create(KDMUIProcess, KNullDesC); + qDebug()<<"process creation error "<> end"); } diff -r 03849bd79877 -r fdbfe0a95492 deviceupdatesui/deviceupdatesqtsp/src/main.cpp --- a/deviceupdatesui/deviceupdatesqtsp/src/main.cpp Fri Sep 17 19:58:05 2010 +0530 +++ b/deviceupdatesui/deviceupdatesqtsp/src/main.cpp Fri Oct 15 11:39:02 2010 +0530 @@ -20,7 +20,7 @@ int main(int argc, char **argv) { - HbApplication a( argc, argv ); + QApplication a( argc, argv, false ); DmTelServiceHandler srvcHndlr; return a.exec(); } diff -r 03849bd79877 -r fdbfe0a95492 omacpadapters/MbxNbrAdapter/Data/WPMbxNbrAdapterResource.rss --- a/omacpadapters/MbxNbrAdapter/Data/WPMbxNbrAdapterResource.rss Fri Sep 17 19:58:05 2010 +0530 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,35 +0,0 @@ -/* -* Copyright (c) 2002 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: Resource file. -* -*/ - - -// INCLUDES -#include -#include - -// RESOURCE DEFINITIONS -// ----------------------------------------------------------------------------- -// -// Mailbox number adapter title resource. -// -// ----------------------------------------------------------------------------- -// -RESOURCE LBUF r_mailbox_number_adapter_title - { - txt = qtn_op_head_mailbox; - } - -// End of file diff -r 03849bd79877 -r fdbfe0a95492 omacpadapters/MbxNbrAdapter/Group/MbxNbrAdapter.mmp --- a/omacpadapters/MbxNbrAdapter/Group/MbxNbrAdapter.mmp Fri Sep 17 19:58:05 2010 +0530 +++ b/omacpadapters/MbxNbrAdapter/Group/MbxNbrAdapter.mmp Fri Oct 15 11:39:02 2010 +0530 @@ -37,25 +37,21 @@ TARGET wpmbxnbradapter.rsc END -START RESOURCE WPMbxNbrAdapterResource.rss -HEADER -TARGET wpmbxnbradapterresource.rsc -TARGETPATH RESOURCE_FILES_DIR -LANGUAGE_IDS -END - USERINCLUDE . USERINCLUDE ../Inc USERINCLUDE ../../bld APP_LAYER_SYSTEMINCLUDE SYSTEMINCLUDE /epoc32/include/ecom +SYSTEMINCLUDE /epoc32/include/mw/hb/hbwidgets +SYSTEMINCLUDE /epoc32/include/mw/hb/hbcore LIBRARY euser.lib LIBRARY provisioningengine.lib LIBRARY CommonEngine.lib LIBRARY vmbxengine.lib LIBRARY centralrepository.lib +LIBRARY hbcore.lib hbwidgets.lib DEBUGLIBRARY flogger.lib diff -r 03849bd79877 -r fdbfe0a95492 omacpadapters/MbxNbrAdapter/Group/bld.inf --- a/omacpadapters/MbxNbrAdapter/Group/bld.inf Fri Sep 17 19:58:05 2010 +0530 +++ b/omacpadapters/MbxNbrAdapter/Group/bld.inf Fri Oct 15 11:39:02 2010 +0530 @@ -1,2 +1,30 @@ +/* +* Copyright (c) 2001-2007 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: Build information file for MbxNbrAdapter CP adapter +* +*/ + + + +#include + +PRJ_PLATFORMS +DEFAULT + +PRJ_EXPORTS + PRJ_MMPFILES -MbxNbrAdapter.mmp \ No newline at end of file +MbxNbrAdapter.mmp + +PRJ_TESTMMPFILES diff -r 03849bd79877 -r fdbfe0a95492 omacpadapters/MbxNbrAdapter/Src/MbxNbrAdapter.cpp --- a/omacpadapters/MbxNbrAdapter/Src/MbxNbrAdapter.cpp Fri Sep 17 19:58:05 2010 +0530 +++ b/omacpadapters/MbxNbrAdapter/Src/MbxNbrAdapter.cpp Fri Oct 15 11:39:02 2010 +0530 @@ -20,7 +20,6 @@ #include #include #include -#include #include #include #include @@ -30,6 +29,7 @@ #include "WPAdapterUtil.h" #include "MbxNbrAdapter.h" #include "ProvisioningDebug.h" +#include // CONSTANTS #if ( defined (__WINS__) || defined (__WINSCW) ) // this different on hw @@ -44,6 +44,9 @@ _LIT( KVideoSupportTypeTrue, "TRUE" ); _LIT( KVideoSupportTypeFalse, "FALSE" ); _LIT( KMailboxAppId, "w9027" ); // From OMA provisioning registration document +_LIT( KMailboxResourceFileName, "deviceupdates_" ); +_LIT( KMailboxResourceFilePath, "z:/resource/qt/translations/" ); + const TInt KSettingsGranularity = 2; // ============================ MEMBER FUNCTIONS =============================== @@ -68,13 +71,11 @@ { FLOG( _L( "[Provisioning] CMbxNbrAdapter::ConstructL:" ) ); - TFileName fileName; - Dll::FileName( fileName ); - iTitle = WPAdapterUtil::ReadHBufCL( fileName, - KAdapterName, - R_MAILBOX_NUMBER_ADAPTER_TITLE ); - - FLOG( _L( "[Provisioning] CMbxNbrAdapter::ConstructL: Done" ) ); + TBool result = HbTextResolverSymbian::Init(KMailboxResourceFileName, KMailboxResourceFilePath ); + _LIT(KMailboxAdapter, "txt_device_update_dblist_mailbox_settings"); + iTitle = HbTextResolverSymbian::LoadL(KMailboxAdapter); + + FLOG( _L( "[Provisioning] CMbxNbrAdapter::ConstructL: Done " )); } // ----------------------------------------------------------------------------- diff -r 03849bd79877 -r fdbfe0a95492 omacpadapters/MbxNbrAdapter/loc/MailboxAdapter.loc --- a/omacpadapters/MbxNbrAdapter/loc/MailboxAdapter.loc Fri Sep 17 19:58:05 2010 +0530 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,30 +0,0 @@ -/* -* Copyright (c) 2002 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: -* This is a localisation file for MediaSettings -* A .loc file is the one and only place where the logical strings -* to be localised are defined. -* -*/ - - - -// LOCALISATION STRINGS - -//d: Summary text for mailbox settings -//l: popup_info_list_pane_t2/opt1 -// -#define qtn_op_head_mailbox "Mailbox settings" - -// End of File diff -r 03849bd79877 -r fdbfe0a95492 omacpadapters/StreamingAdapter/Data/WPStreamingAdapterResource.rss --- a/omacpadapters/StreamingAdapter/Data/WPStreamingAdapterResource.rss Fri Sep 17 19:58:05 2010 +0530 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,29 +0,0 @@ -/* -* Copyright (c) 2002 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: Resource file. -* -*/ - - -// INCLUDES -#include -#include - - -RESOURCE LBUF r_streaming_adapter_title - { - txt = qtn_op_head_streaming; - } - -// End of file diff -r 03849bd79877 -r fdbfe0a95492 omacpadapters/StreamingAdapter/Group/StreamingAdapter.mmp --- a/omacpadapters/StreamingAdapter/Group/StreamingAdapter.mmp Fri Sep 17 19:58:05 2010 +0530 +++ b/omacpadapters/StreamingAdapter/Group/StreamingAdapter.mmp Fri Oct 15 11:39:02 2010 +0530 @@ -37,26 +37,21 @@ TARGET wpstreamingadapter.rsc END -START RESOURCE WPStreamingAdapterResource.rss -HEADER -TARGET wpstreamingadapterresource.rsc -TARGETPATH RESOURCE_FILES_DIR -LANGUAGE_IDS -END - - USERINCLUDE . USERINCLUDE ../Inc USERINCLUDE ../../bld APP_LAYER_SYSTEMINCLUDE SYSTEMINCLUDE /epoc32/include/ecom +SYSTEMINCLUDE /epoc32/include/mw/hb/hbwidgets +SYSTEMINCLUDE /epoc32/include/mw/hb/hbcore LIBRARY euser.lib LIBRARY provisioningengine.lib LIBRARY mpsettengine.lib LIBRARY cmmanager.lib LIBRARY commdb.lib +LIBRARY hbcore.lib hbwidgets.lib DEBUGLIBRARY flogger.lib diff -r 03849bd79877 -r fdbfe0a95492 omacpadapters/StreamingAdapter/Group/bld.inf --- a/omacpadapters/StreamingAdapter/Group/bld.inf Fri Sep 17 19:58:05 2010 +0530 +++ b/omacpadapters/StreamingAdapter/Group/bld.inf Fri Oct 15 11:39:02 2010 +0530 @@ -1,2 +1,30 @@ +/* +* Copyright (c) 2001-2007 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: Build information file for Streaming CP adapter +* +*/ + + + +#include + +PRJ_PLATFORMS +DEFAULT + +PRJ_EXPORTS + PRJ_MMPFILES -StreamingAdapter.mmp \ No newline at end of file +StreamingAdapter.mmp + +PRJ_TESTMMPFILES diff -r 03849bd79877 -r fdbfe0a95492 omacpadapters/StreamingAdapter/Src/Streamingadapter.cpp --- a/omacpadapters/StreamingAdapter/Src/Streamingadapter.cpp Fri Sep 17 19:58:05 2010 +0530 +++ b/omacpadapters/StreamingAdapter/Src/Streamingadapter.cpp Fri Oct 15 11:39:02 2010 +0530 @@ -20,13 +20,15 @@ #include #include #include -#include #include #include #include #include "WPAdapterUtil.h" #include "StreamingAdapter.h" #include "ProvisioningDebug.h" +#include +_LIT( KStreamingResourceFileName, "deviceupdates_" ); +_LIT( KStreamingResourceFilePath, "z:/resource/qt/translations/" ); // CONSTANTS #if ( defined (__WINS__) || defined (__WINSCW) ) // this different on hw @@ -84,13 +86,9 @@ void CStreamingAdapter::ConstructL() { FLOG( _L( "[Provisioning] CStreamingAdapter::ConstructL:" ) ); - - TFileName fileName; - Dll::FileName( fileName ); - iTitle = WPAdapterUtil::ReadHBufCL( fileName, - KAdapterName, - R_STREAMING_ADAPTER_TITLE ); - + TBool result = HbTextResolverSymbian::Init(KStreamingResourceFileName, KStreamingResourceFilePath ); + _LIT(KStreamingAdapter, "txt_device_update_dblist_streaming_settings"); + iTitle = HbTextResolverSymbian::LoadL(KStreamingAdapter); FLOG( _L( "[Provisioning] CStreamingAdapter::ConstructL: Done" ) ); } diff -r 03849bd79877 -r fdbfe0a95492 omacpadapters/StreamingAdapter/loc/StreamingAdapter.loc --- a/omacpadapters/StreamingAdapter/loc/StreamingAdapter.loc Fri Sep 17 19:58:05 2010 +0530 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,30 +0,0 @@ -/* -* Copyright (c) 2002 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: -* This is a localisation file for MediaSettings -* A .loc file is the one and only place where the logical strings -* to be localised are defined. -* -*/ - - - -// LOCALISATION STRINGS - -//d: Summary text for streaming settings -//l: popup_info_list_pane_t2/opt1 -// -#define qtn_op_head_streaming "Streaming settings" - -// End of File diff -r 03849bd79877 -r fdbfe0a95492 omacpadapters/WAPAdapter/Data/WPWAPAdapterResource.rss --- a/omacpadapters/WAPAdapter/Data/WPWAPAdapterResource.rss Fri Sep 17 19:58:05 2010 +0530 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,49 +0,0 @@ -/* -* Copyright (c) 2002 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: Resource file. -* -*/ - - - -// INCLUDES -#include -#include - -// Rich text labels - -RESOURCE LBUF r_qtn_op_head_browser - { - txt = qtn_op_head_browser; - } - -RESOURCE LBUF r_qtn_sm_mms_accesspoints - { - txt = qtn_sm_mms_accesspoints; - } - -RESOURCE LBUF r_qtn_sm_wapap_name - { - txt = qtn_sm_wapap_name; - } - -RESOURCE LBUF r_qtn_sm_bookmark_name - { - txt = qtn_sm_bookmark_name; - } - -RESOURCE LBUF r_qtn_sm_bookmarks - { - txt = qtn_sm_bookmarks; - } diff -r 03849bd79877 -r fdbfe0a95492 omacpadapters/WAPAdapter/Group/WPWAPAdapter.mmp --- a/omacpadapters/WAPAdapter/Group/WPWAPAdapter.mmp Fri Sep 17 19:58:05 2010 +0530 +++ b/omacpadapters/WAPAdapter/Group/WPWAPAdapter.mmp Fri Oct 15 11:39:02 2010 +0530 @@ -45,17 +45,12 @@ TARGET wpwapadapter.rsc END -START RESOURCE WPWAPAdapterResource.rss -HEADER -TARGET wpwapadapterresource.rsc -TARGETPATH RESOURCE_FILES_DIR -LANGUAGE_IDS -END - USERINCLUDE ../Inc ../Group ../../bld APP_LAYER_SYSTEMINCLUDE SYSTEMINCLUDE /epoc32/include/ecom +SYSTEMINCLUDE /epoc32/include/mw/hb/hbwidgets +SYSTEMINCLUDE /epoc32/include/mw/hb/hbcore LIBRARY euser.lib LIBRARY provisioningengine.lib @@ -64,7 +59,7 @@ LIBRARY commdb.lib LIBRARY CommonEngine.lib LIBRARY centralrepository.lib - +LIBRARY hbcore.lib hbwidgets.lib DEBUGLIBRARY flogger.lib #ifdef __MESSAGING_API_V2__ diff -r 03849bd79877 -r fdbfe0a95492 omacpadapters/WAPAdapter/Group/bld.inf --- a/omacpadapters/WAPAdapter/Group/bld.inf Fri Sep 17 19:58:05 2010 +0530 +++ b/omacpadapters/WAPAdapter/Group/bld.inf Fri Oct 15 11:39:02 2010 +0530 @@ -1,2 +1,30 @@ +/* +* Copyright (c) 2001-2007 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: Build information file for WAPAdapter +* +*/ + + + +#include + +PRJ_PLATFORMS +DEFAULT + +PRJ_EXPORTS + PRJ_MMPFILES -WPWAPAdapter.mmp \ No newline at end of file +WPWAPAdapter.mmp + +PRJ_TESTMMPFILES diff -r 03849bd79877 -r fdbfe0a95492 omacpadapters/WAPAdapter/Src/CWPWAPAdapterBase.cpp --- a/omacpadapters/WAPAdapter/Src/CWPWAPAdapterBase.cpp Fri Sep 17 19:58:05 2010 +0530 +++ b/omacpadapters/WAPAdapter/Src/CWPWAPAdapterBase.cpp Fri Oct 15 11:39:02 2010 +0530 @@ -25,7 +25,6 @@ #include #include #include -#include #include "CWPWAPItemBAse.h" #include "CWPWAPAdapterBase.h" #include "WPWAPDebug.h" diff -r 03849bd79877 -r fdbfe0a95492 omacpadapters/WAPAdapter/Src/CWPWAPBookmarkItem.cpp --- a/omacpadapters/WAPAdapter/Src/CWPWAPBookmarkItem.cpp Fri Sep 17 19:58:05 2010 +0530 +++ b/omacpadapters/WAPAdapter/Src/CWPWAPBookmarkItem.cpp Fri Oct 15 11:39:02 2010 +0530 @@ -21,7 +21,6 @@ #include #include #include -#include #include #include "CWPWAPBookmarkItem.h" #include "WPWAPUtil.h" diff -r 03849bd79877 -r fdbfe0a95492 omacpadapters/WAPAdapter/Src/CWPWAPBrowserAdapter.cpp --- a/omacpadapters/WAPAdapter/Src/CWPWAPBrowserAdapter.cpp Fri Sep 17 19:58:05 2010 +0530 +++ b/omacpadapters/WAPAdapter/Src/CWPWAPBrowserAdapter.cpp Fri Oct 15 11:39:02 2010 +0530 @@ -29,9 +29,11 @@ #include "WPWAPItemFactory.h" #include "WPWAPUtil.h" #include "WPWAPDebug.h" - +#include // CONSTANTS _LIT( KBrowserAppID, "w2" ); +_LIT( KBrowserResourceFileName, "deviceupdates_" ); +_LIT( KBrowserResourceFilePath, "z:/resource/qt/translations/" ); // ============================ MEMBER FUNCTIONS =============================== @@ -54,11 +56,21 @@ { BaseConstructL(); - iTitle = WPWAPUtil::ReadHBufCL( R_QTN_OP_HEAD_BROWSER ); - iBookmarkTitle = WPWAPUtil::ReadHBufCL( R_QTN_SM_BOOKMARKS ); - iDefaultName = WPWAPUtil::ReadHBufCL( R_QTN_SM_WAPAP_NAME ); - iDefaultBookmarkName = WPWAPUtil::ReadHBufCL( R_QTN_SM_BOOKMARK_NAME ); - } + TBool result = HbTextResolverSymbian::Init(KBrowserResourceFileName, KBrowserResourceFilePath ); + + _LIT(KBrowserAdapter, "txt_device_update_dblist_browser_settings"); + iTitle = HbTextResolverSymbian::LoadL(KBrowserAdapter); + + _LIT(KBookmarkTitle, "txt_device_update_dblist_bookmark"); + iBookmarkTitle = HbTextResolverSymbian::LoadL(KBookmarkTitle); + + _LIT(KDefaultName, "txt_device_update_dblist_wap_access_point"); + iDefaultName = HbTextResolverSymbian::LoadL(KDefaultName); + + _LIT(KDefaultBookmarkName, "txt_device_update_dblist_wap_access_point"); + iDefaultBookmarkName = HbTextResolverSymbian::LoadL(KDefaultBookmarkName); + + } // ----------------------------------------------------------------------------- // CWPWAPBrowserAdapter::NewL diff -r 03849bd79877 -r fdbfe0a95492 omacpadapters/WAPAdapter/Src/CWPWAPItemBAse.cpp --- a/omacpadapters/WAPAdapter/Src/CWPWAPItemBAse.cpp Fri Sep 17 19:58:05 2010 +0530 +++ b/omacpadapters/WAPAdapter/Src/CWPWAPItemBAse.cpp Fri Oct 15 11:39:02 2010 +0530 @@ -214,7 +214,10 @@ if( !iCmManager ) { iCmManager = new RCmManagerExt; - iCmManager->OpenL(); + if( !iCmManager ) + User::Leave( KErrNoMemory ); + else + iCmManager->OpenL(); } } diff -r 03849bd79877 -r fdbfe0a95492 omacpadapters/WAPAdapter/Src/CWPWAPMMSAdapter.cpp --- a/omacpadapters/WAPAdapter/Src/CWPWAPMMSAdapter.cpp Fri Sep 17 19:58:05 2010 +0530 +++ b/omacpadapters/WAPAdapter/Src/CWPWAPMMSAdapter.cpp Fri Oct 15 11:39:02 2010 +0530 @@ -23,13 +23,15 @@ #include #include #include -#include #include "MWPWAPItemBase.h" #include "WPWAPUtil.h" #include "WPWAPItemFactory.h" +#include // CONSTANTS _LIT( KMMSAppID, "w4" ); +_LIT( KMMSResourceFileName, "deviceupdates_" ); +_LIT( KMMSResourceFilePath, "z:/resource/qt/translations/" ); // ============================ MEMBER FUNCTIONS =============================== @@ -51,9 +53,14 @@ void CWPWAPMMSAdapter::ConstructL() { BaseConstructL(); + + TBool result = HbTextResolverSymbian::Init(KMMSResourceFileName, KMMSResourceFilePath); + _LIT(MMSAdapter, "txt_device_update_dblist_multimedia_access_pts"); + iTitle = HbTextResolverSymbian::LoadL(MMSAdapter); + + _LIT(MMSDefaultAdapter, "txt_device_update_dblist_wap_access_point"); + iTitle = HbTextResolverSymbian::LoadL(MMSDefaultAdapter); - iTitle = WPWAPUtil::ReadHBufCL( R_QTN_SM_MMS_ACCESSPOINTS ); - iDefaultName = WPWAPUtil::ReadHBufCL( R_QTN_SM_WAPAP_NAME ); } // ----------------------------------------------------------------------------- diff -r 03849bd79877 -r fdbfe0a95492 omacpadapters/accesspointadapter/Src/CWPAPAdapter.cpp --- a/omacpadapters/accesspointadapter/Src/CWPAPAdapter.cpp Fri Sep 17 19:58:05 2010 +0530 +++ b/omacpadapters/accesspointadapter/Src/CWPAPAdapter.cpp Fri Oct 15 11:39:02 2010 +0530 @@ -23,7 +23,6 @@ #include #include -#include #include // Feature manager #include "WPAPUtil.h" #include "CWPAPAccesspointItem.h" @@ -36,6 +35,11 @@ #include #include #include +#include + +_LIT( KAPResourceFileName, "deviceupdates_" ); +_LIT( KAPResourceFilePath, "z:/resource/qt/translations/" ); + // ============================ MEMBER FUNCTIONS =============================== @@ -61,8 +65,13 @@ { FLOG( _L( "[AccesspointAdapter] CWPAPAdapter::ConstructL:" ) ); - iTitle = WPAPUtil::ReadHBufCL( R_QTN_SM_WML_ACCESSPOINTS ); - iDefaultName = WPAPUtil::ReadHBufCL( R_QTN_SM_WAPAP_NAME ); + TBool result = HbTextResolverSymbian::Init(KAPResourceFileName, KAPResourceFilePath ); + + _LIT(KAPAdapter, "txt_device_update_dblist_access_points"); + iTitle = HbTextResolverSymbian::LoadL(KAPAdapter); + + _LIT(KWAPDefaultAdapter, "txt_device_update_dblist_wap_access_point"); + iDefaultName = HbTextResolverSymbian::LoadL(KWAPDefaultAdapter); FeatureManager::InitializeLibL(); diff -r 03849bd79877 -r fdbfe0a95492 omacpadapters/accesspointadapter/Src/CWPAPNapdef.cpp --- a/omacpadapters/accesspointadapter/Src/CWPAPNapdef.cpp Fri Sep 17 19:58:05 2010 +0530 +++ b/omacpadapters/accesspointadapter/Src/CWPAPNapdef.cpp Fri Oct 15 11:39:02 2010 +0530 @@ -23,7 +23,6 @@ #include "CWPAPNapdef.h" #include #include -#include #include #include #include "CWPAPAccesspointItem.h" @@ -612,16 +611,20 @@ if(aCharacteristic.Name().Compare( KEAP ) == 0) { CEapTypeElement* newEap = new (ELeave) CEapTypeElement; + CleanupStack::PushL( newEap ); newEap->iEAPSettings = new (ELeave) EAPSettings; newEap->iCertificate = new (ELeave) EapCertificateEntry; iEapTypeArray.AppendL(newEap); + CleanupStack::Pop(newEap); } else if(aCharacteristic.Name().Compare( SECSSID ) == 0) { SECssID* newsecSSID = new (ELeave) SECssID; + CleanupStack::PushL( newsecSSID ); newsecSSID->iSSSID = NULL; newsecSSID->iSUSSID = NULL; iSecSSID.AppendL(newsecSSID); + CleanupStack::Pop(newsecSSID); } aCharacteristic.AcceptL( *this ); diff -r 03849bd79877 -r fdbfe0a95492 omacpadapters/accesspointadapter/group/WPAPAdapter.mmp --- a/omacpadapters/accesspointadapter/group/WPAPAdapter.mmp Fri Sep 17 19:58:05 2010 +0530 +++ b/omacpadapters/accesspointadapter/group/WPAPAdapter.mmp Fri Oct 15 11:39:02 2010 +0530 @@ -48,18 +48,12 @@ TARGET WPAPAdapter.rsc END -START RESOURCE WPAPAdapterResource.rss -HEADER -TARGET WPAPAdapterResource.rsc -TARGETPATH RESOURCE_FILES_DIR -LANGUAGE_IDS -END - - USERINCLUDE ../Inc USERINCLUDE ../../bld MW_LAYER_SYSTEMINCLUDE SYSTEMINCLUDE /epoc32/include/ecom +SYSTEMINCLUDE /epoc32/include/mw/hb/hbwidgets +SYSTEMINCLUDE /epoc32/include/mw/hb/hbcore LIBRARY euser.lib LIBRARY ProvisioningEngine.lib @@ -70,6 +64,7 @@ LIBRARY cmmanager.lib LIBRARY eaptools.lib +LIBRARY hbcore.lib hbwidgets.lib DEBUGLIBRARY flogger.lib // Only in debug builds // End of File diff -r 03849bd79877 -r fdbfe0a95492 omacpadapters/accesspointadapter/group/bld.inf --- a/omacpadapters/accesspointadapter/group/bld.inf Fri Sep 17 19:58:05 2010 +0530 +++ b/omacpadapters/accesspointadapter/group/bld.inf Fri Oct 15 11:39:02 2010 +0530 @@ -26,9 +26,6 @@ //../rom/WPAPAdapter.iby CORE_MW_LAYER_IBY_EXPORT_PATH(WPAPAdapter.iby) //../rom/WPAPAdapterResources.iby LANGUAGE_MW_LAYER_IBY_EXPORT_PATH(WPAPAdapterResources.iby) -// export localised loc file -../loc/WPAPAdapter.loc MW_LAYER_LOC_EXPORT_PATH(wpapadapter.loc) - PRJ_MMPFILES WPAPAdapter.mmp diff -r 03849bd79877 -r fdbfe0a95492 omacpadapters/accesspointadapter/loc/WPAPAdapter.loc --- a/omacpadapters/accesspointadapter/loc/WPAPAdapter.loc Fri Sep 17 19:58:05 2010 +0530 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,35 +0,0 @@ -/* -* Copyright (c) 2002-2004 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: This is a localisation file for AccesspointAdapter -* -*/ - - - - -// LOCALISATION STRINGS - -//d: Summary text for access points -//l: popup_info_list_pane_t2/opt1 -//r: 5.0 - -#define qtn_sm_wml_accesspoints "Access points:" - -//d:This is the default name for new WAP access point. -//l:query_popup_data_pane_t1/opt4 -//r: 5.0 - -#define qtn_sm_wapap_name "WAP access point" - -// End of File diff -r 03849bd79877 -r fdbfe0a95492 omacpadapters/bld/bld.inf --- a/omacpadapters/bld/bld.inf Fri Sep 17 19:58:05 2010 +0530 +++ b/omacpadapters/bld/bld.inf Fri Oct 15 11:39:02 2010 +0530 @@ -19,14 +19,10 @@ DEFAULT PRJ_EXPORTS ../rom/ProvisioningAdapter.iby CORE_APP_LAYER_IBY_EXPORT_PATH(provisioningAdapter.iby) -../rom/ProvisioningAdapterResources.iby LANGUAGE_APP_LAYER_IBY_EXPORT_PATH(provisioningAdapterresources.iby) - -../MbxNbrAdapter/loc/MailboxAdapter.loc MW_LAYER_LOC_EXPORT_PATH(mailboxadapter.loc) -../accesspointadapter/loc/WPAPAdapter.loc MW_LAYER_LOC_EXPORT_PATH(WPAPAdapter.loc) -../StreamingAdapter/loc/StreamingAdapter.loc MW_LAYER_LOC_EXPORT_PATH(streamingadapter.loc) #include "../accesspointadapter/group/bld.inf" #include "../MbxNbrAdapter/Group/bld.inf" #include "../StreamingAdapter/Group/bld.inf" -#include "../WAPAdapter/Group/bld.inf" \ No newline at end of file +#include "../WAPAdapter/Group/bld.inf" +#include "../cpdestinationnwadapter/group/bld.inf" diff -r 03849bd79877 -r fdbfe0a95492 omacpadapters/cpdestinationnwadapter/data/2000b4af.rss --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/omacpadapters/cpdestinationnwadapter/data/2000b4af.rss Fri Oct 15 11:39:02 2010 +0530 @@ -0,0 +1,51 @@ +/* +* Copyright (c) 2007 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: Resource definitions for project wpdestinationnwadapter +* +*/ + + + +#include +#include "wpdestinationnwadapteruids.h" + +// --------------------------------------------------------------------------- +// theInfo +// Resource defining the Destination network adapter plugin. +// --------------------------------------------------------------------------- +// +RESOURCE REGISTRY_INFO theInfo + { + resource_format_version = RESOURCE_FORMAT_VERSION_2; + dll_uid = KDestinationNetworkAdapterDllUid3; + interfaces = + { + INTERFACE_INFO + { + interface_uid = KProvisioningAdapterInterface; + implementations = + { + IMPLEMENTATION_INFO + { + implementation_uid = KDestinationNetworkAdapterUid; + version_no = 1; + display_name = "Destination Network Provisioning Adapter||Copyright © 2007 Nokia Corporation."; + default_data = ""; + opaque_data = "10"; + rom_only = 1; + } + }; + } + }; + } diff -r 03849bd79877 -r fdbfe0a95492 omacpadapters/cpdestinationnwadapter/group/bld.inf --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/omacpadapters/cpdestinationnwadapter/group/bld.inf Fri Oct 15 11:39:02 2010 +0530 @@ -0,0 +1,30 @@ +/* +* Copyright (c) 2001-2007 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: Build information file for CP Destination Adapter +* +*/ + + + +#include + +PRJ_PLATFORMS +DEFAULT + +PRJ_EXPORTS + +PRJ_MMPFILES +wpdestinationnwadapter.mmp + +PRJ_TESTMMPFILES diff -r 03849bd79877 -r fdbfe0a95492 omacpadapters/cpdestinationnwadapter/group/wpdestinationnwadapter.mmp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/omacpadapters/cpdestinationnwadapter/group/wpdestinationnwadapter.mmp Fri Oct 15 11:39:02 2010 +0530 @@ -0,0 +1,57 @@ +/* +* Copyright (c) 2007-2008 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: This file provides the information required for building the +* whole of cwpdestinationnwadapter.dll. +* +*/ + + + +#include +#include + +TARGET wpdestinationnwadapter.dll +TARGETTYPE PLUGIN +UID 0x10009D8D 0x2000B4AF + +OPTION GCC -save-temps + +CAPABILITY CAP_ECOM_PLUGIN +VENDORID VID_DEFAULT + +SOURCEPATH ../src +SOURCE cwpdestinationnwadapter.cpp +SOURCE cwpdestinationnwitem.cpp +SOURCE wpdestinationnwadaptergroupproxy.cpp + +SOURCEPATH ../data + +START RESOURCE 2000b4af.rss +TARGET wpdestinationnwadapter.rsc +END + +USERINCLUDE . +USERINCLUDE ../inc +MW_LAYER_SYSTEMINCLUDE +SYSTEMINCLUDE ../inc +SYSTEMINCLUDE /epoc32/include/ecom +SYSTEMINCLUDE /epoc32/include/mw/hb/hbwidgets +SYSTEMINCLUDE /epoc32/include/mw/hb/hbcore + +LIBRARY euser.lib +LIBRARY provisioningengine.lib +LIBRARY charconv.lib +LIBRARY commdb.lib +LIBRARY cmmanager.lib +LIBRARY hbcore.lib hbwidgets.lib \ No newline at end of file diff -r 03849bd79877 -r fdbfe0a95492 omacpadapters/cpdestinationnwadapter/inc/cwpdestinationnwadapter.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/omacpadapters/cpdestinationnwadapter/inc/cwpdestinationnwadapter.h Fri Oct 15 11:39:02 2010 +0530 @@ -0,0 +1,283 @@ +/* +* Copyright (c) 2007-2008 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: Handles destination network provisioning. +* +*/ + + + +#ifndef CWPDESTINATIONNWADAPTER_H +#define CWPDESTINATIONNWADAPTER_H + +#include +#include + +#include "cwpdestinationnwitem.h" + +class CWPCharacteristic; + +/** + * Realizes destination network provisioning adapter. + * + * Destination network adapter handles destination network provisioning and + * stores them via Connection Method Manager API. + * + * @lib cwpdestinationnwadapter.lib + * @since S60 v3.2. + */ +class CWPDestinationNwAdapter : public CWPAdapter, public MWPContextExtension + { + /** + * Friend class for unit testing - uncomment when running tests. + */ + //friend class UT_wpdestinationnwadapter; + +public: + + static CWPDestinationNwAdapter* NewL(); + + virtual ~CWPDestinationNwAdapter(); + + /** + * Converts given 8-bit descriptor to TUint32. + * + * @since S60 v3.2. + * @param aDes Descriptor to be converted. + * @return Unsigned 32-bit integer. + */ + TUint32 CWPDestinationNwAdapter::Des8ToUint32L( const TDesC8& aDes ); + +// from base class CWPAdapter + + /** + * From CWPAdapter. + * Checks the number of settings items. + * + * @since S60 v3.2. + * @return Quantity of items (always one). + */ + TInt ItemCount() const; + + /** + * From CWPAdapter. + * Getter for the summary title of Destination network settings. The text + * is shown to the user in an opened configuration message. + * + * @since S60 v3.2. + * @param aIndex Location of the settings item. Not used. + * @return Summary title. + */ + const TDesC16& SummaryTitle( TInt aIndex ) const; + + /** + * From CWPAdapter. + * Getter for the summary text of Destination network settings. The text + * is shown to the user in opened configuration message. + * + * @since S60 v3.2. + * @param aIndex Location of the settings item. + * @return Summary text. + */ + const TDesC16& SummaryText( TInt aIndex ) const; + + /** + * From CWPAdapter. + * Saves a destination network. + * + * @since S60 v3.2. + * @param aIndex Location of the settings item. + */ + void SaveL( TInt aIndex ); + + /** + * From CWPAdapter. + * Returns EFalse since a destination cannot be set as default. + * + * @since S60 v3.2. + * @param aIndex Location of the settings item to be queried. Not used. + * @return Information whether these settings can be set as default. + */ + TBool CanSetAsDefault( TInt /*aIndex*/ ) const; + + /** + * From CWPAdapter. + * Adapter sets the settings as default. Not supported. + * + * @since S60 v3.2. + * @param aIndex Location of the settings item to be set as default. + */ + inline void SetAsDefaultL( TInt /*aIndex*/ ); + + /** + * From CWPAdapter. + * Query for detailed information about the destination network. + * This is not supported feature as in other adapters in the framework. + * Always returns KErrNotSupported. + * + * @since S60 v3.2. + * @param aItem Not used but here because of inheritance. + * @param aVisitor Object for retrieveing details of a setting entry. + * Not used. + * @return KErrNotSupported if not supported. + */ + TInt DetailsL( TInt aItem, MWPPairVisitor& aVisitor ); + + /** + * From CWPAdapter. + * Visit method. Visits the adapter. Adapter checks from + * aCharacteristic if the data is targeted to it and acts according to + * that. + * + * @since S60 v3.2. + * @param aCharacteristic The characteristic found. + */ + void VisitL( CWPCharacteristic& aCharacteristic ); + + /** + * From CWPAdapter. + * Visit method. Visits the adapter. Method sets parameter values to + * destination network settings item. + * + * @since S60 v3.2. + * @param aParameter The parameter found. + */ + void VisitL( CWPParameter& aParameter ); + + /** + * From CWPAdapter. + * Visit method. Used for linking settings to NAPDEF definition. + * + * @since S60 v3.2. + * @param aLink Link to the characteristic. + */ + void VisitLinkL( CWPCharacteristic& aLink ); + + /** + * From CWPAdapter. + * Gets the saving information from the adapter that has saved settings. + * + * @since S60 v3.2. + * @param aIndex Index of the previously saved item. + * @param aSavingInfo Saving info. + */ + void GetSavingInfoL( TInt aIndex, RPointerArray& aSavingInfo ); + + /** + * From CWPAdapter. + * Informs the adapters of the saved settings. + * Not used. + * + * @since S60 v3.2. + * @param aAppIdOfSavingItem UID of the adapter component. + * @param aAppRef APPREF of the saved settings. + * @param aStorageIdValue Value that identifies the settings in its + * storage. + */ + inline void SettingsSavedL( const TDesC8& /*aAppIdOfSavingItem*/, + const TDesC8& /*aAppRef*/, const TDesC8& /*aStorageIdValue*/ ); + + /** + * From CWPAdapter. + * Lets the adapters know when the saving has been finalized in + * viewpoint of the provisioning framework. The adapters can make + * finalization of saving the settings after receiving this call. + * Not used. + * + * @since S60 v3.2. + */ + inline void SavingFinalizedL(); + +// from base class MWPContextExtension + + /** + * From MWPContextExtension. + * Returns a pointer to a context extension. + * + * @since S60 v3.2. + * @param aExtension Contains a pointer to MWPContextExtension if + * supported. + * @return KErrNotSupported if not supported, otherwise KErrNone. + */ + TInt ContextExtension( MWPContextExtension*& aExtension ); + + /** + * From MWPContextExtension. + * Returns the data used for saving. + * + * @since S60 v3.2. + * @param aIndex The index of the data. + * @return The data; ownership is transferred. + */ + const TDesC8& SaveDataL( TInt aIndex ) const; + + /** + * From MWPContextExtension. + * Deletes a saved destination network. + * + * @since S60 v3.2. + * @param aSaveData The data used for saving. + */ + void DeleteL( const TDesC8& aSaveData ); + + /** + * From MWPContextExtension. + * Returns the UID of the adapter. + * + * @since S60 v3.2. + * @return UID of the adapter. + */ + TUint32 Uid() const; + +private: + + CWPDestinationNwAdapter(); + + void ConstructL(); + +private: // data + + /** + * Application ID of the current characteristic. + */ + TPtrC iAppId; + + /** + * Title for destination network. Value read from the resource file + * in initiation phase. + * Own. + */ + HBufC16* iDefaultTitle; + + /** + * Name for destination network. Value read from the resource file + * in initiation phase. + * Own. + */ + HBufC16* iDefaultName; + + /** + * Destination network item. + * Own. + */ + CWPDestinationNwItem* iCurrentItem; + + /** + * Destination Network items. + */ + RPointerArray iItems; + }; + +#include "cwpdestinationnwadapter.inl" + +#endif // CWPDESTINATIONNWADAPTER_H diff -r 03849bd79877 -r fdbfe0a95492 omacpadapters/cpdestinationnwadapter/inc/cwpdestinationnwadapter.inl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/omacpadapters/cpdestinationnwadapter/inc/cwpdestinationnwadapter.inl Fri Oct 15 11:39:02 2010 +0530 @@ -0,0 +1,44 @@ +/* +* Copyright (c) 2007 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: cwpdestinationnwadapter.h inline functions. +* +*/ + + + +// ----------------------------------------------------------------------------- +// CWPDestinationNwAdapter::SetAsDefaultL +// ----------------------------------------------------------------------------- +// +inline void CWPDestinationNwAdapter::SetAsDefaultL( TInt /*aIndex*/ ) + { + }; + +// ----------------------------------------------------------------------------- +// CWPDestinationNwAdapter::SettingsSavedL +// ----------------------------------------------------------------------------- +// +inline void CWPDestinationNwAdapter::SettingsSavedL( + const TDesC8& /*aAppIdOfSavingItem*/, const TDesC8& /*aAppRef*/, + const TDesC8& /*aStorageIdValue*/ ) + { + }; + +// ----------------------------------------------------------------------------- +// CWPDestinationNwAdapter::SavingFinalizedL +// ----------------------------------------------------------------------------- +// +inline void CWPDestinationNwAdapter::SavingFinalizedL() + { + }; diff -r 03849bd79877 -r fdbfe0a95492 omacpadapters/cpdestinationnwadapter/inc/cwpdestinationnwitem.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/omacpadapters/cpdestinationnwadapter/inc/cwpdestinationnwitem.h Fri Oct 15 11:39:02 2010 +0530 @@ -0,0 +1,157 @@ +/* +* Copyright (c) 2007 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: Settings item for one destination network. Also handles +* saving destination networks to permanent storage. +* +*/ + + + +#ifndef CWPDESTINATIONNWITEM_H +#define CWPDESTINATIONNWITEM_H + +#include +#include + +class CWPCharacteristic; + +/** + * Destination network settings item. + * + * Destination network item handles saving destination networks via + * Connection Method Manager API. + * + * @lib cwpdestinationnwadapter.lib + * @since S60 v3.2. + */ +class CWPDestinationNwItem : public CBase + { + /** + * Friend classes for unit testing - uncomment when running tests. + */ + //friend class UT_wpdestinationnwadapter; + +public: + + static CWPDestinationNwItem* NewL(); + + virtual ~CWPDestinationNwItem(); + + /** + * Setter for APPREF. + * @since S60 v3.2. + * @param aAPPREF. + */ + void SetAppRefL( const TDesC8& aAppRef ); + + /** + * Setter for user viewable name of the setting. + * @since S60 v3.2. + * @param aNAME. Value is TCP or UDP. + */ + void SetSettingsNameL( const TDesC& aSettingsName ); + + /** + * Setter for NAPDEF (IAP settings). + * @since S60 v3.2. + * @param aNapDef. + */ + void AddNapDefL( CWPCharacteristic* aNapDef ); + + /** + * Getter for APPREF value. + * @since S60 v3.2. + * @return APPREF. + */ + const TDesC8& AppRef() const; + + /** + * Getter for user viewable name of Destination network. + * @since S60 v3.2. + * @return Settings name. + */ + const TDesC& SettingsName() const; + + /** + * Saves the destination network settings. + * @since S60 v3.2. + */ + void SaveL(); + + /** + * Return destination network ID. + * @since S60 v3.2. + * @return ID of the destination network. + */ + const TDesC8& SaveData() const; + +private: + + /** + * Creates a network destination. + * @since S60 v3.2. + * @param aCmManager Connection Method Manager handle. + * @return Network destination. + */ + RCmDestinationExt CreateDestinationL( RCmManagerExt& aCmManager ); + + /** + * Returnes the Iap id that matches the given Wap id. + * @since S60 v3.2.3 + * @param aWapId IAP's Wap Id. + * @return Iap Id. + */ + TUint32 IapIdFromWapIdL( TUint32 aWapId ); + +private: + + void ConstructL(); + CWPDestinationNwItem(); + +private: // data + + /** + * Destination network reference identity in provisioning document. + * Own. + */ + HBufC8* iAppRef; + + /** + * Name of destination network visible to user when viewing the + * provisioning message. + * Own. + */ + HBufC* iSettingsName; + + /** + * Array of NAPDEFs, IAP settings. + * Not own. (Contained pointers are deleted by ProvisioningEngine.) + */ + RPointerArray iNapDefs; + + /** + * ID value of the referred IAP. + */ + TUint32 iIAPId; + + /** + * Destination network ID as a descriptor to be returned by the + * SaveData method to the framework via adapters SaveDataL. + * Own. + */ + HBufC8* iSavedProfileId; + + }; + +#endif // CWPDESTINATIONNWITEM_H diff -r 03849bd79877 -r fdbfe0a95492 omacpadapters/cpdestinationnwadapter/inc/wpdestinationnwadapteruids.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/omacpadapters/cpdestinationnwadapter/inc/wpdestinationnwadapteruids.h Fri Oct 15 11:39:02 2010 +0530 @@ -0,0 +1,40 @@ +/* +* Copyright (c) 2007 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: Destination network adapter UIDs. +* +*/ + + + +#ifndef WPDESTINATIONNWADAPTERUIDS_H +#define WPDESTINATIONNWADAPTERUIDS_H + +// MACROS + +// ECOM plugin +#define KECOMUid2 0x10009D8D + +// UID2 for the Destination Network adapter. ECOM plug-in. +#define KDestinationNetworkAdapterDllUid2 KECOMUid2 + +// UID3 for the Destination Network adapter DLL. +#define KDestinationNetworkAdapterDllUid3 0x2000B4AF + +// Implementation UID for the Destination Network adapter. +#define KDestinationNetworkAdapterUid 0x2000B4AE + +// Interface UID from Client Provisioning adapter base class. +#define KProvisioningAdapterInterface 0x101F84D5 + +#endif // WPDESTINATIONNWADAPTERUIDS_H diff -r 03849bd79877 -r fdbfe0a95492 omacpadapters/cpdestinationnwadapter/inc/wpdestinationnwdebug.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/omacpadapters/cpdestinationnwadapter/inc/wpdestinationnwdebug.h Fri Oct 15 11:39:02 2010 +0530 @@ -0,0 +1,36 @@ +/* +* Copyright (c) 2007 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: Enables and disables debug prints. +* +*/ + + + +#ifndef WPDESTINATIONNWDEBUG_H +#define WPDESTINATIONNWDEBUG_H + +#include + +#ifdef _DEBUG +#define DBG_PRINT( p ) RDebug::Print( _L( p ) ) +#define DBG_PRINT_2( p, i ) RDebug::Print( _L( p ), i ) +#define DBG_PRINT_3( p, i, u ) RDebug::Print( _L( p ), i, u ) +#else +#define DBG_PRINT( p ) +#define DBG_PRINT_2( p, i ) +#define DBG_PRINT_3( p, i, u ) +#endif // _DEBUG + + +#endif // WPDESTINATIONNWDEBUG_H diff -r 03849bd79877 -r fdbfe0a95492 omacpadapters/cpdestinationnwadapter/rom/wpdestinationnwadapter.iby --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/omacpadapters/cpdestinationnwadapter/rom/wpdestinationnwadapter.iby Fri Oct 15 11:39:02 2010 +0530 @@ -0,0 +1,26 @@ +/* +* Copyright (c) 2007 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: wpdestinationnwadapter iby file +* +*/ + + +#ifndef WPDESTINATIONNWADAPTER_IBY +#define WPDESTINATIONNWADAPTER_IBY + +#include + +ECOM_PLUGIN( wpdestinationnwadapter.dll, 2000b4af.rsc ) + +#endif // WPDESTINATIONNWADAPTER_IBY diff -r 03849bd79877 -r fdbfe0a95492 omacpadapters/cpdestinationnwadapter/rom/wpdestinationnwadapter_resources.iby --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/omacpadapters/cpdestinationnwadapter/rom/wpdestinationnwadapter_resources.iby Fri Oct 15 11:39:02 2010 +0530 @@ -0,0 +1,27 @@ +/* +* Copyright (c) 2007 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: wpdestinationnwadapter resource iby file +* +*/ + + +#ifndef __WPDESTINATIONNWADAPTER_RESOURCES_IBY__ +#define __WPDESTINATIONNWADAPTER_RESOURCES_IBY__ + + +//Client Provisioning Destination network adapter resources +data=DATAZ_\RESOURCE_FILES_DIR\wpdestinationnwadapter.rsc RESOURCE_FILES_DIR\wpdestinationnwadapter.rsc + + +#endif // __WPDESTINATIONNWADAPTER_RESOURCES_IBY__ diff -r 03849bd79877 -r fdbfe0a95492 omacpadapters/cpdestinationnwadapter/src/cwpdestinationnwadapter.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/omacpadapters/cpdestinationnwadapter/src/cwpdestinationnwadapter.cpp Fri Oct 15 11:39:02 2010 +0530 @@ -0,0 +1,375 @@ +/* +* Copyright (c) 2007-2008 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: Receives and stores Destination network settings. +* +*/ + + + + +#include +#include +#include +#include +#include +#include // Adapter utils +#include // Unicode conversion +#include +#include +#include +#include + +#include "cwpdestinationnwadapter.h" +#include "wpdestinationnwdebug.h" +#include + +_LIT( KDestinationNwAdapterName, "WPDestinationNwAdapter"); +_LIT( KDestinationNwAppID, "w904C" ); // OMA CP registration document. +_LIT8( KDestinationNwAppID8, "w904C" ); // OMA CP registration document. +_LIT( KCWPDestinationAdapterFileName, "deviceupdates_" ); +_LIT( KCWPDestinationAdapterFilePath, "z:/resource/qt/translations/" ); + +// --------------------------------------------------------------------------- +// CWPDestinationNwAdapter::CWPDestinationNwAdapter +// --------------------------------------------------------------------------- +// +CWPDestinationNwAdapter::CWPDestinationNwAdapter() : CWPAdapter() + { + } + +// --------------------------------------------------------------------------- +// CWPDestinationNwAdapter::ConstructL +// --------------------------------------------------------------------------- +// +void CWPDestinationNwAdapter::ConstructL() + { + DBG_PRINT( "CWPDestinationNwAdapter::ConstructL - begin" ); + + TBool result = HbTextResolverSymbian::Init(KCWPDestinationAdapterFileName, KCWPDestinationAdapterFilePath ); + + _LIT(KCWPDestinationAdapter, "txt_device_update_dblist_destination_networks"); + iDefaultTitle = HbTextResolverSymbian::LoadL(KCWPDestinationAdapter); + iDefaultName = HbTextResolverSymbian::LoadL(KCWPDestinationAdapter); + + DBG_PRINT( "CWPDestinationNwAdapter::ConstructL - end" ); + } + +// --------------------------------------------------------------------------- +// CWPDestinationNwAdapter::NewL +// --------------------------------------------------------------------------- +// +CWPDestinationNwAdapter* CWPDestinationNwAdapter::NewL() + { + CWPDestinationNwAdapter* self = new (ELeave) + CWPDestinationNwAdapter; + CleanupStack::PushL( self ); + self->ConstructL(); + CleanupStack::Pop( self ); + return self; + } + +// --------------------------------------------------------------------------- +// CWPDestinationNwAdapter::~CWPDestinationNwAdapter +// --------------------------------------------------------------------------- +// +CWPDestinationNwAdapter::~CWPDestinationNwAdapter() + { + DBG_PRINT( "CWPDestinationNwAdapter::~CWPDestinationNwAdapter - begin" ); + delete iDefaultTitle; + delete iDefaultName; + iItems.ResetAndDestroy(); + iItems.Close(); + DBG_PRINT( "CWPDestinationNwAdapter::~CWPDestinationNwAdapter - end" ); + } + +// --------------------------------------------------------------------------- +// CWPDestinationNwAdapter::Des8ToUint32L() +// Converts an 8 bit descriptor to TUint32. +// --------------------------------------------------------------------------- +// +TUint32 CWPDestinationNwAdapter::Des8ToUint32L( const TDesC8& aDes ) + { + TLex8 lex( aDes ); + TUint32 value( 0 ); + User::LeaveIfError( lex.Val( value, EDecimal ) ); + return value; + } + +// --------------------------------------------------------------------------- +// CWPDestinationNwAdapter::ItemCount +// From class CWPAdapter. +// Checks the number of settings items. +// --------------------------------------------------------------------------- +// +TInt CWPDestinationNwAdapter::ItemCount() const + { + return iItems.Count(); + } + +// --------------------------------------------------------------------------- +// From class CWPAdapter. +// CWPDestinationNwAdapter::SummaryTitle +// Returns the summary title. +// --------------------------------------------------------------------------- +// +const TDesC16& CWPDestinationNwAdapter::SummaryTitle( TInt /*aIndex*/ ) const + { + return *iDefaultTitle; + } + +// --------------------------------------------------------------------------- +// CWPDestinationNwAdapter::SummaryText +// From class CWPAdapter. +// Returns the summary text of a destination network. +// --------------------------------------------------------------------------- +// +const TDesC16& CWPDestinationNwAdapter::SummaryText( TInt aIndex ) const + { + if ( !iItems[aIndex]->SettingsName().Length() ) + { + return *iDefaultName; + } + return iItems[aIndex]->SettingsName(); + } + +// --------------------------------------------------------------------------- +// CWPDestinationNwAdapter::SaveL +// From class CWPAdapter. +// Calls settings items saving method. +// --------------------------------------------------------------------------- +// +void CWPDestinationNwAdapter::SaveL( TInt aIndex ) + { + __ASSERT_ALWAYS( aIndex >= 0 && aIndex < iItems.Count(), + User::Leave( KErrArgument ) ); + + iItems[aIndex]->SaveL(); + } + +// --------------------------------------------------------------------------- +// CWPDestinationNwAdapter::CanSetAsDefault +// From class CWPAdapter. +// Not supported; always return EFalse. +// --------------------------------------------------------------------------- +// +TBool CWPDestinationNwAdapter::CanSetAsDefault( TInt /*aIndex*/ ) const + { + return EFalse; + } + +// --------------------------------------------------------------------------- +// CWPDestinationNwAdapter::DetailsL +// From class CWPAdapter. +// Not supported. +// --------------------------------------------------------------------------- +// +TInt CWPDestinationNwAdapter::DetailsL( TInt /*aItem*/, + MWPPairVisitor& /*aVisitor */ ) + { + return KErrNotSupported; + } + +// --------------------------------------------------------------------------- +// CWPDestinationNwAdapter::VisitL +// From class CWPAdapter. +// OMA CP characteristics are handled in this method. +// --------------------------------------------------------------------------- +// +void CWPDestinationNwAdapter::VisitL( + CWPCharacteristic& aCharacteristic ) + { + DBG_PRINT( "CWPDestinationNwAdapter::VisitL( characteristic ) - begin" ); + switch ( aCharacteristic.Type() ) + { + // This adapter only handles APPLICATION characteristic. + case KWPApplication: + { + iCurrentItem = CWPDestinationNwItem::NewL(); + // Set default name for destination - replaced later if a name + // has been provisioned. + iCurrentItem->SetSettingsNameL( iDefaultName->Des() ); + aCharacteristic.AcceptL( *this ); + + // Settings are for Destination network - append current item to + // item array to be saved later. + if ( 0 == iAppId.Compare( KDestinationNwAppID() ) ) + { + iItems.AppendL( iCurrentItem ); + } + // Settings are not for Destination network. + else + { + delete iCurrentItem; + iCurrentItem = NULL; + } + break; + } + // All other than APPLICATION are ignored. + default: + break; + } + DBG_PRINT( "CWPDestinationNwAdapter::VisitL( characteristic ) - end" ); + } + +// --------------------------------------------------------------------------- +// CWPDestinationNwAdapter::VisitL +// From class CWPAdapter. +// Destination network parameters are handled in this method. +// --------------------------------------------------------------------------- +// +void CWPDestinationNwAdapter::VisitL( CWPParameter& aParameter ) + { + DBG_PRINT( "CWPDestinationNwAdapter::VisitL( parameter ) - begin" ); + // tmpValue holds the value converted from Unicode to UTF8. + HBufC8* tmpValue = HBufC8::NewLC( aParameter.Value().Length() ); // CS:1 + TPtr8 ptrTmpValue( tmpValue->Des() ); + CnvUtfConverter::ConvertFromUnicodeToUtf8( ptrTmpValue, + aParameter.Value() ); + + switch ( aParameter.ID() ) + { + // APPLICATION/APPID + case EWPParameterAppID: + { + iAppId.Set( aParameter.Value() ); + break; + } + + // APPLICATION/NAME + case EWPParameterName: + { + if ( iCurrentItem ) + { + iCurrentItem->SetSettingsNameL( aParameter.Value() ); + } + break; + } + + // APPLICATION/APPREF + case EWPParameterAppRef: + { + if ( iCurrentItem ) + { + iCurrentItem->SetAppRefL( tmpValue->Des() ); + } + break; + } + + // Other settings are ignored. + default: + { + break; + } + } + CleanupStack::PopAndDestroy( tmpValue ); // CS:0 + DBG_PRINT( "CWPDestinationNwAdapter::VisitL( parameter ) - end" ); + } + +// --------------------------------------------------------------------------- +// CWPDestinationNwAdapter::VisitLinkL +// +// --------------------------------------------------------------------------- +// +void CWPDestinationNwAdapter::VisitLinkL( CWPCharacteristic& aLink ) + { + if ( KWPNapDef == aLink.Type() && iCurrentItem ) + { + iCurrentItem->AddNapDefL( &aLink ); + } + } + +// --------------------------------------------------------------------------- +// CWPDestinationNwAdapter::GetSavingInfoL +// APPID is set to [0], APPREF to [1] and saving info (storage ID) to [2]. +// --------------------------------------------------------------------------- +// +void CWPDestinationNwAdapter::GetSavingInfoL( TInt aIndex, + RPointerArray& aSavingInfo ) + { + __ASSERT_ALWAYS( aIndex >= 0 && aIndex < iItems.Count(), + User::Leave( KErrArgument ) ); + + aSavingInfo.AppendL( KDestinationNwAppID8().AllocL() ); + aSavingInfo.AppendL( iItems[aIndex]->AppRef().AllocL() ); + aSavingInfo.AppendL( iItems[aIndex]->SaveData().AllocL() ); + } + +// --------------------------------------------------------------------------- +// CWPDestinationNwAdapter::ContextExtension +// From class MWPContextExtension. +// Returns a pointer to context extension. +// --------------------------------------------------------------------------- +// +TInt CWPDestinationNwAdapter::ContextExtension( + MWPContextExtension*& aExtension ) + { + aExtension = this; + return KErrNone; + } + +// --------------------------------------------------------------------------- +// CWPDestinationNwAdapter::SaveDataL +// From class MWPContextExtension. +// Returns ID of saved data. +// --------------------------------------------------------------------------- +// +const TDesC8& CWPDestinationNwAdapter::SaveDataL( TInt aIndex ) const + { + __ASSERT_ALWAYS( aIndex >= 0 && aIndex < iItems.Count(), + User::Leave( KErrArgument ) ); + + return iItems[aIndex]->SaveData(); + } + +// --------------------------------------------------------------------------- +// CWPDestinationNwAdapter::DeleteL +// From class MWPContextExtension. +// Deletes a Destination network. +// --------------------------------------------------------------------------- +// +void CWPDestinationNwAdapter::DeleteL( const TDesC8& aSaveData ) + { + DBG_PRINT( "CWPDestinationNwAdapter::DeleteL - begin" ); + RCmManagerExt cmManager; + cmManager.OpenL(); + CleanupClosePushL( cmManager ); // CS:1 + TUint32 destinationId = Des8ToUint32L( aSaveData ); + RCmDestinationExt destination = cmManager.DestinationL( destinationId ); + CleanupClosePushL( destination ); // CS:2 + const TInt cmCount = destination.ConnectionMethodCount(); + // First remove IAPs from destination network because this adapter must + // not delete IAPs. + for ( TInt counter = 0; counter < cmCount; counter++ ) + { + destination.RemoveConnectionMethodL( + destination.ConnectionMethodL( 0 ) ); + destination.UpdateL(); + } + CleanupStack::Pop( &destination ); // CS:1 + destination.DeleteLD(); + CleanupStack::PopAndDestroy( &cmManager ); // CS:0 + DBG_PRINT( "CWPDestinationNwAdapter::DeleteL - end" ); + } + +// --------------------------------------------------------------------------- +// CWPDestinationNwAdapter::Uid +// From class MWPContextExtension. +// Returns the UID of this adapter. +// --------------------------------------------------------------------------- +// +TUint32 CWPDestinationNwAdapter::Uid() const + { + return iDtor_ID_Key.iUid; + } +// End of file. diff -r 03849bd79877 -r fdbfe0a95492 omacpadapters/cpdestinationnwadapter/src/cwpdestinationnwitem.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/omacpadapters/cpdestinationnwadapter/src/cwpdestinationnwitem.cpp Fri Oct 15 11:39:02 2010 +0530 @@ -0,0 +1,345 @@ +/* +* Copyright (c) 2007 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: Settings item for one destination network. Also handles +* saving destination networks to permanent storage. +* +*/ + + + + + +#include +#include +#include +#include +#include +#include +#include // For WLAN plugin UID, i.e. bearer type. + +#include "cwpdestinationnwitem.h" +#include "wpdestinationnwdebug.h" + +const TInt KMaxCharsInTUint32 = 10; + +// --------------------------------------------------------------------------- +// CWPDestinationNwItem::NewL +// +// --------------------------------------------------------------------------- +// +CWPDestinationNwItem* CWPDestinationNwItem::NewL() + { + CWPDestinationNwItem* self = new ( ELeave ) CWPDestinationNwItem(); + CleanupStack::PushL( self ); + self->ConstructL(); + CleanupStack::Pop( self ); + return self; + } + +// --------------------------------------------------------------------------- +// CWPDestinationNwItem::CWPDestinationNwItem +// +// --------------------------------------------------------------------------- +// +CWPDestinationNwItem::CWPDestinationNwItem() + { + } + +// --------------------------------------------------------------------------- +// CWPDestinationNwItem::~CWPDestinationNwItem +// +// --------------------------------------------------------------------------- +// +CWPDestinationNwItem::~CWPDestinationNwItem() + { + DBG_PRINT( "CWPDestinationNwItem::~CWPDestinationNwItem - begin" ); + delete iAppRef; + delete iSettingsName; + iNapDefs.Close(); + delete iSavedProfileId; + DBG_PRINT( "CWPDestinationNwItem::~CWPDestinationNwItem - end" ); + } + +// --------------------------------------------------------------------------- +// CWPDestinationNwItem::ConstructL +// +// --------------------------------------------------------------------------- +// +void CWPDestinationNwItem::ConstructL() + { + DBG_PRINT( "CWPDestinationNwItem::ConstructL - begin" ); + iAppRef = HBufC8::NewL( 0 ); + iSettingsName = HBufC::NewL( 0 ); + iSavedProfileId = HBufC8::NewL( KMaxCharsInTUint32 ); + DBG_PRINT( "CWPDestinationNwItem::ConstructL - end" ); + } + +// --------------------------------------------------------------------------- +// CWPDestinationNwItem::SetAppRefL +// +// --------------------------------------------------------------------------- +// +void CWPDestinationNwItem::SetAppRefL( const TDesC8& aAppRef ) + { + delete iAppRef; + iAppRef = NULL; + iAppRef = aAppRef.AllocL(); + } + +// --------------------------------------------------------------------------- +// CWPDestinationNwItem::SetSettingsNameL +// +// --------------------------------------------------------------------------- +// +void CWPDestinationNwItem::SetSettingsNameL( const TDesC& aSettingsName ) + { + delete iSettingsName; + iSettingsName = NULL; + iSettingsName = aSettingsName.AllocL(); + } + +// --------------------------------------------------------------------------- +// CWPDestinationNwItem::AddNapDefL +// +// --------------------------------------------------------------------------- +// +void CWPDestinationNwItem::AddNapDefL( CWPCharacteristic* aNapDef ) + { + iNapDefs.AppendL( aNapDef ); + } + +// --------------------------------------------------------------------------- +// CWPDestinationNwItem::AppRef +// +// --------------------------------------------------------------------------- +// +const TDesC8& CWPDestinationNwItem::AppRef() const + { + return *iAppRef; + } + +// --------------------------------------------------------------------------- +// CWPDestinationNwItem::SettingsName +// +// --------------------------------------------------------------------------- +// +const TDesC& CWPDestinationNwItem::SettingsName() const + { + return *iSettingsName; + } + +// --------------------------------------------------------------------------- +// CWPDestinationNwItem::SaveL() +// Saves the Destination network using Extended connection settings API. +// --------------------------------------------------------------------------- +// +void CWPDestinationNwItem::SaveL() + { + DBG_PRINT( "CWPDestinationNwItem::SaveL - begin" ); + // Number of IAPs that have been linked to this destination. + const TInt iapCount( iNapDefs.Count() ); + RCmManagerExt cmManager; + cmManager.OpenL(); + CleanupClosePushL( cmManager ); // CS:1 + RCmDestinationExt destination = CreateDestinationL( cmManager ); + CleanupClosePushL( destination ); // CS:2 + RCmConnectionMethodExt tempconn; + + // Add linked IAPs to destination. + for ( TInt counter = 0; counter < iapCount; counter++ ) + { + TPckgBuf apUid; + apUid.Copy( iNapDefs[counter]->Data( 0 ) ); + // The stored id is the wap id. Convert it into the iap id + + TUint32 iapId = IapIdFromWapIdL( apUid() ); + + apUid = NULL; + RCmConnectionMethodExt connection = + cmManager.ConnectionMethodL( iapId ); + CleanupClosePushL( connection ); // CS:5 + + RArray destinationIds; + cmManager.AllDestinationsL( destinationIds ); + CleanupClosePushL( destinationIds ); + + TInt counter2(0); + for ( counter2 = 0; counter2 < destinationIds.Count(); counter2++ ) + { + RCmDestinationExt tempdest = cmManager.DestinationL( + destinationIds[counter2] ); + + TRAPD( err, tempconn = tempdest.ConnectionMethodByIDL( iapId )); + + tempconn.Close(); + tempdest.Close(); + + if ( err != KErrNotFound ) + { + // Found from other destination + break; + } + } + if ( counter2 == destinationIds.Count() ) + { + // Not found in any other destination + destination.AddConnectionMethodL( connection ); + } + else + { + // Found in some other destination -> create copy + destination.AddConnectionMethodL( tempconn = connection.CreateCopyL() ); + tempconn.Close(); + } + CleanupStack::PopAndDestroy( &destinationIds ); + + // Change seamlessness level for linked WLAN IAPs. + TUint32 bearerType = connection.GetIntAttributeL( + CMManager::ECmBearerType ); + if ( KUidWlanBearerType == bearerType ) + { + connection.SetIntAttributeL( CMManager::ECmSeamlessnessLevel, + CMManager::ESeamlessnessShowprogress ); + connection.UpdateL(); + } + + destination.UpdateL(); + CleanupStack::PopAndDestroy( &connection ); // CS:4 + } + destination.UpdateL(); // In case there were no IAP linkages. + // Destination ID is needed as a descriptor (used in linking settings). + TUint32 destinationId = destination.Id(); + iSavedProfileId->Des().Num( destinationId, EDecimal ); + // Pop destination & cmManager. + CleanupStack::PopAndDestroy( 2, &cmManager ); // CS:0 + DBG_PRINT( "CWPDestinationNwItem::SaveL - end" ); + } + +// --------------------------------------------------------------------------- +// CWPDestinationNwItem::SaveData +// +// --------------------------------------------------------------------------- +// +const TDesC8& CWPDestinationNwItem::SaveData() const + { + return *iSavedProfileId; + } + +// --------------------------------------------------------------------------- +// CWPDestinationNwItem::CreateDestinationL +// Checks that settings name if unique, renames if necessary, and creates +// a destination network. +// --------------------------------------------------------------------------- +// +RCmDestinationExt CWPDestinationNwItem::CreateDestinationL( + RCmManagerExt& aCmManager ) + { + DBG_PRINT( "CWPDestinationNwItem::CreateDestinationL - begin" ); + RArray destinationIds; + // Get destination ID's for checking if name to be set is reserved. + CleanupClosePushL( destinationIds ); // CS:1 + aCmManager.AllDestinationsL( destinationIds ); + const TInt destinationCount = destinationIds.Count(); + // Destination's name to actually be used. + HBufC* newName = HBufC::NewLC( + iSettingsName->Des().Length() + KMaxCharsInTUint32 ); // CS:2 + newName->Des().Copy( iSettingsName->Des() ); + + // Check names from all existing destinations. + for ( TInt counter = 0; counter < destinationCount; counter++ ) + { + RCmDestinationExt destination = aCmManager.DestinationL( + destinationIds[counter] ); + CleanupClosePushL( destination ); // CS:3 + HBufC* settingsName = destination.NameLC(); // CS:4 + // If destination exists, return it. + if ( 0 == newName->Des().Compare( settingsName->Des() ) ) + { + // Pop settingsName & destination & newName + CleanupStack::PopAndDestroy( 3, &destination ); // CS:1 + + RCmDestinationExt dest2 = aCmManager.DestinationL( + destinationIds[counter] ); + + CleanupStack::PopAndDestroy( &destinationIds ); // CS:0 + DBG_PRINT( "CWPDestinationNwItem::CreateDestinationL - end" ); + return dest2; + } + // Pop settingsName & destination. + CleanupStack::PopAndDestroy( 2, &destination ); // CS:2 + } + + // Create new a destination and return it. + RCmDestinationExt destination = aCmManager.CreateDestinationL( *newName ); + // Pop newName & destinationIds + CleanupStack::PopAndDestroy( 2, &destinationIds ); // CS:0 + DBG_PRINT( "CWPDestinationNwItem::CreateDestinationL - end" ); + return destination; + } + +// --------------------------------------------------------------------------- +// CWPDestinationNwItem::IapIdFromWapId +// Returns IAP ID from WAP ID. +// --------------------------------------------------------------------------- +// +TUint32 CWPDestinationNwItem::IapIdFromWapIdL( TUint32 aWapId ) + { + RCmManagerExt cmManager; + cmManager.OpenLC(); // CS:1 + RArray iapIds; + TUint32 iapId( 0 ); + + // First get all free IAP ID's. + cmManager.ConnectionMethodL( iapIds ); + CleanupClosePushL( iapIds ); // CS:2 + + // Then get IAP ID's from all destinations. + RArray destIds; + cmManager.AllDestinationsL( destIds ); + CleanupClosePushL( destIds ); // CS:3 + TInt destCount = destIds.Count(); + for ( TInt destIndex = 0; destIndex < destCount; destIndex++ ) + { + RCmDestinationExt dest = cmManager.DestinationL( + destIds[destIndex] ); + CleanupClosePushL( dest ); // CS:4 + TInt cmCount = dest.ConnectionMethodCount(); + for ( TInt cmIndex = 0; cmIndex < cmCount; cmIndex++ ) + { + TUint32 apId = dest.ConnectionMethodL( + cmIndex ).GetIntAttributeL( CMManager::ECmIapId ); + iapIds.AppendL( apId ); + } + CleanupStack::PopAndDestroy( &dest ); // CS:3 + } + // Finally, go through all connection methods and find correct IAP ID. + const TInt cmCount = iapIds.Count(); + for ( TInt counter = 0; counter < cmCount; counter++ ) + { + TUint32 id = cmManager.GetConnectionMethodInfoIntL( + iapIds[counter], CMManager::ECmWapId ); + if ( id == aWapId ) + { + iapId = iapIds[counter]; + // No need to go through rest of IAPs. + break; + } + } + // PopAndDestroy destIds, iapIds, cmManager. + CleanupStack::PopAndDestroy( 3, &cmManager ); // CS:0 + return iapId; + } + + +// End of file. diff -r 03849bd79877 -r fdbfe0a95492 omacpadapters/cpdestinationnwadapter/src/wpdestinationnwadaptergroupproxy.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/omacpadapters/cpdestinationnwadapter/src/wpdestinationnwadaptergroupproxy.cpp Fri Oct 15 11:39:02 2010 +0530 @@ -0,0 +1,47 @@ +/* +* Copyright (c) 2007 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: Destination network adapter implementation group proxy +* +*/ + + + + +// INCLUDE FILES +#include +#include +#include "wpdestinationnwadapteruids.h" +#include "cwpdestinationnwadapter.h" + +// CONSTANTS +const TImplementationProxy KImplementationTable[] = + { + IMPLEMENTATION_PROXY_ENTRY( KDestinationNetworkAdapterUid, + CWPDestinationNwAdapter::NewL ) + }; + +// ----------------------------------------------------------------------------- +// ImplementationGroupProxy +// Returns: TImplementationProxy*: pointer to TImplementationProxy +// ----------------------------------------------------------------------------- +// +EXPORT_C const TImplementationProxy* ImplementationGroupProxy( + TInt& aTableCount ) + { + aTableCount = sizeof( KImplementationTable ) / + sizeof( TImplementationProxy ); + return KImplementationTable; + } + +// End of file. diff -r 03849bd79877 -r fdbfe0a95492 omacpadapters/rom/ProvisioningAdapter.iby --- a/omacpadapters/rom/ProvisioningAdapter.iby Fri Sep 17 19:58:05 2010 +0530 +++ b/omacpadapters/rom/ProvisioningAdapter.iby Fri Oct 15 11:39:02 2010 +0530 @@ -23,5 +23,6 @@ ECOM_PLUGIN(WPStreamingAdapter.dll,101F85CB.rsc) ECOM_PLUGIN(WPAPAdapter.dll, WPAPAdapter.rsc) ECOM_PLUGIN(WPMbxNbrAdapter.dll,10207281.rsc) +ECOM_PLUGIN( wpdestinationnwadapter.dll, 2000b4af.rsc ) #endif \ No newline at end of file diff -r 03849bd79877 -r fdbfe0a95492 omacpadapters/rom/ProvisioningAdapterResources.iby --- a/omacpadapters/rom/ProvisioningAdapterResources.iby Fri Sep 17 19:58:05 2010 +0530 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,28 +0,0 @@ -/* -* Copyright (c) 2002-2006 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: Image description file for the Provisioning Resources -* -*/ - - -#ifndef __PROVISIONINGADAPTERRESOURCES_IBY__ -#define __PROVISIONINGADAPTERRESOURCES_IBY__ - - -data=DATAZ_\RESOURCE_FILES_DIR\WPWAPAdapterResource.rsc RESOURCE_FILES_DIR\WPWAPAdapter.rsc -data=DATAZ_\RESOURCE_FILES_DIR\WpstreamingadapterResource.rsc RESOURCE_FILES_DIR\Wpstreamingadapter.rsc -data=DATAZ_\RESOURCE_FILES_DIR\WPMbxNbrAdapterResource.rsc RESOURCE_FILES_DIR\WPMbxNbrAdapter.rsc -data=DATAZ_\RESOURCE_FILES_DIR\WPAPAdapterResource.rsc RESOURCE_FILES_DIR\WPAPAdapterResource.rsc - -#endif \ No newline at end of file diff -r 03849bd79877 -r fdbfe0a95492 omadmadapters/connmoadapter/src/AddBuffer.cpp --- a/omadmadapters/connmoadapter/src/AddBuffer.cpp Fri Sep 17 19:58:05 2010 +0530 +++ b/omadmadapters/connmoadapter/src/AddBuffer.cpp Fri Oct 15 11:39:02 2010 +0530 @@ -112,14 +112,14 @@ OstTraceExt1( TRACE_NORMAL, CADDBUFFER_ADDNODETOBUFFERL_ENTRY, "ENTRY: CAddBuffer::AddNodeToBufferL;aUri=%s", aUri ); CConnMoNodeElement* newNode = new (ELeave) CConnMoNodeElement(); - + CleanupStack::PushL( newNode ); newNode->iUri.Copy( aUri ); newNode->iParentLUID.Copy( aParentLUID ); newNode->iStatusRef = aStatusRef; newNode->iProcessed = EFalse; - newNode->iLeaf = EFalse; - + newNode->iLeaf = EFalse; iBuffer.AppendL( newNode ); + CleanupStack::Pop(newNode); OstTrace0( TRACE_NORMAL, CADDBUFFER_ADDNODETOBUFFERL_EXIT, "EXIT: CAddBuffer::AddNodeToBufferL"); } @@ -134,15 +134,15 @@ OstTraceExt1( TRACE_NORMAL, CADDBUFFER_ADDNODETOBUFFERL_LEAF_ENTRY, "ENTRY: CAddBuffer::AddNodeToBufferL;aUri=%s", aUri ); CConnMoNodeElement* newNode = new (ELeave) CConnMoNodeElement(); - + CleanupStack::PushL( newNode ); newNode->iUri.Copy( aUri ); newNode->iParentLUID.Copy( aLUID ); newNode->iObject.Copy( aObject ); newNode->iStatusRef = aStatusRef; newNode->iProcessed = EFalse; - newNode->iLeaf = ETrue; - + newNode->iLeaf = ETrue; iBuffer.AppendL( newNode ); + CleanupStack::Pop(newNode); OstTrace0( TRACE_NORMAL, CADDBUFFER_ADDNODETOBUFFERL_LEAF_EXIT, "EXIT: CAddBuffer::AddNodeToBufferL"); } diff -r 03849bd79877 -r fdbfe0a95492 omadmadapters/connmoadapter/src/ProxyBranch.cpp --- a/omadmadapters/connmoadapter/src/ProxyBranch.cpp Fri Sep 17 19:58:05 2010 +0530 +++ b/omadmadapters/connmoadapter/src/ProxyBranch.cpp Fri Oct 15 11:39:02 2010 +0530 @@ -147,12 +147,13 @@ conRef.Append( _L("NAP/") ); CUtils::AppendFirstURISeg( napChildList, conRef ); HBufC8* napLuid = iCallback->GetLuidAllocL( conRef ); + CleanupStack::PushL(napLuid) ; if ( cmId == CUtils::IntLUID( *napLuid ) ) { status = CSmlDmAdapter::EOk; aLeafObject.InsertL( 0, conRef ); } - delete napLuid; + CleanupStack::PopAndDestroy( napLuid ); conRef.Delete( 0, conRef.Length() ); } } diff -r 03849bd79877 -r fdbfe0a95492 omadmadapters/fota/src/nsmldmfotaadapter.cpp --- a/omadmadapters/fota/src/nsmldmfotaadapter.cpp Fri Sep 17 19:58:05 2010 +0530 +++ b/omadmadapters/fota/src/nsmldmfotaadapter.cpp Fri Oct 15 11:39:02 2010 +0530 @@ -285,7 +285,7 @@ User::LeaveIfError( session.Connect() ); CleanupClosePushL(session); - CBufBase* acl=CBufFlat::NewL(10); + CBufBase* acl=CBufFlat::NewL(12); CleanupStack::PushL( acl ); TInt err = session.GetAclL( KNSmlDMFotaNode,*acl,EFalse ); if ( err == KErrNone) diff -r 03849bd79877 -r fdbfe0a95492 omadmadapters/nsmldminternet/src/NSmlInternetAdapter.cpp --- a/omadmadapters/nsmldminternet/src/NSmlInternetAdapter.cpp Fri Sep 17 19:58:05 2010 +0530 +++ b/omadmadapters/nsmldminternet/src/NSmlInternetAdapter.cpp Fri Oct 15 11:39:02 2010 +0530 @@ -5200,8 +5200,7 @@ TPtrC qDB = TPtrC(COMMDB_ID); //Check if URI is /AP/*/NAPDef/* then it should be check IAP ID in DB not IAPService - if ((iIAPId >= 0) - && ((aURI.Match(_L8("AP/*/NAPDef/*")) != KErrNotFound) + if (((aURI.Match(_L8("AP/*/NAPDef/*")) != KErrNotFound) || (aURI.Match(_L8("AP/*/NAPDef/*/Bearer/*")) != KErrNotFound) || (aURI.Match(_L8("AP/*")) != KErrNotFound) || (aURI.Match(_L8("AP/*/NAPDef")) diff -r 03849bd79877 -r fdbfe0a95492 omadmadapters/nsmldminternet/src/NSmlWLanAdapter.cpp --- a/omadmadapters/nsmldminternet/src/NSmlWLanAdapter.cpp Fri Sep 17 19:58:05 2010 +0530 +++ b/omadmadapters/nsmldminternet/src/NSmlWLanAdapter.cpp Fri Oct 15 11:39:02 2010 +0530 @@ -3029,7 +3029,7 @@ { TBuf serviceType; TUint32 serviceId(NULL); - TUint32 lValue; + TUint32 lValue = 0; CCommsDbTableView* napdefView = iDatabase.OpenViewMatchingUintLC( TPtrC(IAP), TPtrC(COMMDB_ID), DesToInt(aParentLUID)); TInt errorCode = napdefView->GotoFirstRecord(); diff -r 03849bd79877 -r fdbfe0a95492 omadmadapters/nsmldminternet/src/NSmlWlanSettings.cpp --- a/omadmadapters/nsmldminternet/src/NSmlWlanSettings.cpp Fri Sep 17 19:58:05 2010 +0530 +++ b/omadmadapters/nsmldminternet/src/NSmlWlanSettings.cpp Fri Oct 15 11:39:02 2010 +0530 @@ -880,7 +880,7 @@ TInt enError = KErrNone; TInt lockError = KErrNone; TRAP(lockError, enError = PerformLockWLANTablesL(ETrue)); - if (iSecondaryView != NULL) + if (apEnforce) { ((CCommsDbProtectTableView*) iSecondaryView)->ProtectRecord(); }