--- a/dcmofw/dcmoserver/group/dcmoserver.mmp Fri Aug 06 18:29:23 2010 +0530
+++ b/dcmofw/dcmoserver/group/dcmoserver.mmp Thu Aug 19 17:35:34 2010 +0530
@@ -48,4 +48,4 @@
LIBRARY ecom.lib
LIBRARY centralrepository.lib
LIBRARY flogger.lib
-LIBRARY hbcore.lib hbwidgets.lib
+LIBRARY HbCore.lib HbWidgets.lib
--- a/devicemgmtnotifications/dmdevdialogserver/bld/dmdevicedialog.mmp Fri Aug 06 18:29:23 2010 +0530
+++ b/devicemgmtnotifications/dmdevdialogserver/bld/dmdevicedialog.mmp Thu Aug 19 17:35:34 2010 +0530
@@ -40,9 +40,9 @@
LIBRARY euser.lib
LIBRARY efsrv.lib
-LIBRARY hbcore.lib
-LIBRARY syncmlclientapi.lib
-LIBRARY centralrepository.lib
+LIBRARY HbCore.lib
+LIBRARY syncmlclientapi.lib
+LIBRARY centralrepository.lib
DEBUGLIBRARY flogger.lib
--- a/omaprovisioning/provisioning/AuthTypePlugin/Group/Authtypeplugin.mmp Fri Aug 06 18:29:23 2010 +0530
+++ b/omaprovisioning/provisioning/AuthTypePlugin/Group/Authtypeplugin.mmp Thu Aug 19 17:35:34 2010 +0530
@@ -65,7 +65,7 @@
LIBRARY avkon.lib
LIBRARY bafl.lib
LIBRARY commdb.lib
-LIBRARY commonengine.lib // RConeResourceLoader
+LIBRARY CommonEngine.lib // RConeResourceLoader
LIBRARY cone.lib
LIBRARY ecom.lib
LIBRARY efsrv.lib
--- a/omaprovisioning/provisioning/ProvisioningEngine/Group/ProvisioningEngine.mmp Fri Aug 06 18:29:23 2010 +0530
+++ b/omaprovisioning/provisioning/ProvisioningEngine/Group/ProvisioningEngine.mmp Thu Aug 19 17:35:34 2010 +0530
@@ -70,7 +70,7 @@
LIBRARY etelmm.lib
LIBRARY inetprotutil.lib
LIBRARY sysutil.lib
-LIBRARY commonengine.lib
+LIBRARY CommonEngine.lib
LIBRARY edbms.lib
LIBRARY centralrepository.lib
LIBRARY cmmanager.lib
--- a/omaprovisioning/provisioning/ProvisioningEngine/Src/CWPInternetAPDB.cpp Fri Aug 06 18:29:23 2010 +0530
+++ b/omaprovisioning/provisioning/ProvisioningEngine/Src/CWPInternetAPDB.cpp Thu Aug 19 17:35:34 2010 +0530
@@ -241,9 +241,9 @@
Myview.Prepare(iItemsDatabase, TDbQuery(QueryBuffer));
CleanupClosePushL(Myview);
Myview.EvaluateAll();
- Myview.FirstL();
-
- while (Myview.AtRow())
+ if ( Myview.FirstL())
+ {
+ while (Myview.AtRow())
{
Myview.GetL();
@@ -256,6 +256,7 @@
aItemArray.Append(AccessPointItem);
Myview.NextL();
}
+ }
CleanupStack::PopAndDestroy(); // Myview
FLOG( _L( "[Provisioning] CWPInternetAPDB::ReadItemsL: done" ) );
@@ -323,9 +324,9 @@
CleanupClosePushL(Myview);
Myview.EvaluateAll();
- Myview.FirstL();
-
- if (!Myview.IsEmptyL())
+ if( Myview.FirstL())
+ {
+ if (!Myview.IsEmptyL())
{
// we have autoincrement in index so it should be unique
// but just to make sure, we use 'while', instead of 'if'
@@ -341,6 +342,7 @@
iItemsDatabase.Compact();
rowsdeleted = ETrue;
}
+ }
CleanupStack::PopAndDestroy(1); // Myview
FLOG( _L( "[Provisioning] CWPInternetAPDB::DeleteFromDatabaseL: done" ) );
--- a/omaprovisioning/provisioning/ProvisioningEngine/Src/CWPMultiContextManager.cpp Fri Aug 06 18:29:23 2010 +0530
+++ b/omaprovisioning/provisioning/ProvisioningEngine/Src/CWPMultiContextManager.cpp Thu Aug 19 17:35:34 2010 +0530
@@ -405,8 +405,9 @@
new(ELeave) CArrayFixFlat<TUint32>( Max( 1, contexts.CountL() ) );
CleanupStack::PushL( array );
FTRACE(RDebug::Print(_L("[Provisioning] CWPMultiContextManager::ContextUidsL: count (%d)"), contexts.CountL()));
- contexts.FirstL();
- while( contexts.AtRow() )
+ if ( contexts.FirstL())
+ {
+ while( contexts.AtRow() )
{
FLOG( _L( "[Provisioning] CWPMultiContextManager::ContextUidsL contexts.GetL()" ) );
contexts.GetL();
@@ -415,6 +416,7 @@
array->AppendL( uid );
contexts.NextL();
}
+ }
CleanupStack::Pop(); // array
CleanupStack::PopAndDestroy(); // contexts
--- a/omaprovisioning/provisioning/alwaysonadapter/Group/alwaysonadapter.mmp Fri Aug 06 18:29:23 2010 +0530
+++ b/omaprovisioning/provisioning/alwaysonadapter/Group/alwaysonadapter.mmp Thu Aug 19 17:35:34 2010 +0530
@@ -46,7 +46,7 @@
LIBRARY euser.lib
LIBRARY provisioningengine.lib
-LIBRARY commonengine.lib
+LIBRARY CommonEngine.lib
LIBRARY centralrepository.lib
DEBUGLIBRARY flogger.lib
--- a/policymanagement/dmutilserver/group/DMUtilServer.mmp Fri Aug 06 18:29:23 2010 +0530
+++ b/policymanagement/dmutilserver/group/DMUtilServer.mmp Thu Aug 19 17:35:34 2010 +0530
@@ -81,13 +81,13 @@
// S60
LIBRARY rfs.lib
LIBRARY sysutil.lib
-LIBRARY commonengine.lib
+LIBRARY CommonEngine.lib
// TARM
LIBRARY policyengine.lib
LIBRARY centreptool.lib
#ifdef RD_MULTIPLE_DRIVE
-LIBRARY platformenv.lib
+LIBRARY PlatformEnv.lib
LIBRARY estor.lib
LIBRARY ecom.lib
#endif
--- a/policymanagement/policyengine/group/PMRfsPlugin.mmp Fri Aug 06 18:29:23 2010 +0530
+++ b/policymanagement/policyengine/group/PMRfsPlugin.mmp Thu Aug 19 17:35:34 2010 +0530
@@ -51,7 +51,7 @@
LIBRARY efsrv.lib
LIBRARY rfs.lib
#ifdef RD_MULTIPLE_DRIVE
-LIBRARY platformenv.lib
+LIBRARY PlatformEnv.lib
LIBRARY estor.lib
#endif
--- a/policymanagement/policyengine/group/PolicyEngineUI.mmp Fri Aug 06 18:29:23 2010 +0530
+++ b/policymanagement/policyengine/group/PolicyEngineUI.mmp Thu Aug 19 17:35:34 2010 +0530
@@ -56,11 +56,11 @@
LIBRARY bafl.lib
LIBRARY avkon.lib
LIBRARY cone.lib
-LIBRARY commonengine.lib
+LIBRARY CommonEngine.lib
LIBRARY eikcoctl.lib
LIBRARY eikdlg.lib
LIBRARY eikctl.lib
-LIBRARY platformenv.lib
+LIBRARY PlatformEnv.lib
LIBRARY commondialogs.lib
LIBRARY efsrv.lib
LIBRARY eiksrv.lib
--- a/remotemgmt_plat/group/bld.inf Fri Aug 06 18:29:23 2010 +0530
+++ b/remotemgmt_plat/group/bld.inf Thu Aug 19 17:35:34 2010 +0530
@@ -47,5 +47,7 @@
#include "../dcmo_adapter_api/group/bld.inf"
#include "../dcmo_control_api/group/bld.inf"
#include "../ds_capability_mgmt_plugin_api/group/bld.inf"
+#include "../syncml_ds_customization_api/group/bld.inf"
+#include "../syncml_ds_error_reporting_api/group/bld.inf"
#include "../devicemgmt_dialogs_api/group/bld.inf"
#include "../dm_device_dialog_api/group/bld.inf"
\ No newline at end of file
--- a/remotemgmt_plat/oma_ds_extensions_api/tsrc/group/ClientAPIAdvanced.mmp Fri Aug 06 18:29:23 2010 +0530
+++ b/remotemgmt_plat/oma_ds_extensions_api/tsrc/group/ClientAPIAdvanced.mmp Thu Aug 19 17:35:34 2010 +0530
@@ -60,8 +60,7 @@
LIBRARY apparc.lib
LIBRARY cone.lib
LIBRARY eikcore.lib
-LIBRARY avkon.lib
-LIBRARY aknnotify.lib
+
LANG SC
SMPSAFE
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/remotemgmt_plat/syncml_ds_customization_api/group/bld.inf Thu Aug 19 17:35:34 2010 +0530
@@ -0,0 +1,28 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: File that exports the files belonging to
+: SyncML FW Customization API
+*
+*/
+
+#include <platform_paths.hrh>
+
+PRJ_PLATFORMS
+DEFAULT
+
+PRJ_EXPORTS
+
+../inc/nsmloperatordatacrkeys.h MW_LAYER_PLATFORM_EXPORT_PATH(nsmloperatordatacrkeys.h)
+../inc/nsmldevinfextdatacontainerplugin.h MW_LAYER_PLATFORM_EXPORT_PATH(nsmldevinfextdatacontainerplugin.h)
+../inc/nsmldevinfextdatacontainerplugin.inl MW_LAYER_PLATFORM_EXPORT_PATH(nsmldevinfextdatacontainerplugin.inl)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/remotemgmt_plat/syncml_ds_customization_api/inc/nsmldevinfextdatacontainerplugin.h Thu Aug 19 17:35:34 2010 +0530
@@ -0,0 +1,103 @@
+/*
+* 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: Device Info Extension Data Container Plugin header file.
+*
+*/
+
+#ifndef __NSMLDEVINFEXTDATACONTAINERPLUGIN_H__
+#define __NSMLDEVINFEXTDATACONTAINERPLUGIN_H__
+
+
+// EXTERNAL INCLUDES
+#include <e32base.h>
+#include <ecom/ecom.h>
+#include <ecom/ecomresolverparams.h>
+
+// CONSTANTS
+const TUid KExtDataContainerInterfaceUid = { 0x2002DC7C };
+
+// CLASS DEFINITION
+/**
+ * Interface definition for Device Info Extension Data Container plugin
+ */
+class CNSmlDevInfExtDataContainerPlugin : public CBase
+ {
+
+ public: // Constructor & Destructor
+
+ /**
+ * Destructor
+ */
+ virtual ~CNSmlDevInfExtDataContainerPlugin();
+
+ /**
+ * Constructor for plugin instantiation
+ */
+ static CNSmlDevInfExtDataContainerPlugin* NewL();
+
+ public: // Pure virtual methods to be implemented by the actual plugins
+ /**
+ * Resolve number of device info extensions <Ext>
+ *
+ * @return Number of extensions
+ */
+ virtual TInt GetExtensionCountL() = 0;
+
+ /**
+ * Resolve name <XNam> of the extension in the given extension index.
+ * The number of extensions supported can be deduced using
+ * GetExtensionCountL() method. If the method is called with an index
+ * out of range (i.e. negative value or value greater than/equal to
+ * the value returned by GetExtensionCountL()), the method should
+ * leave with KErrArgument.
+ *
+ * Note that any extension has one <XNam> field.
+ *
+ * @param aExtIndex Index of the extension to be returned.
+ * @return Name of the extension
+ */
+ virtual const TDesC8& GetExtNameL( TInt aExtIndex ) = 0;
+
+ /**
+ * Resolve number of values related to particular extension. If the
+ * method is called with an index out of range (i.e. negative value
+ * or value greater than/equal to the value returned by
+ * GetExtensionCountL()), the method should leave with KErrArgument.
+ *
+ * Note that any extension can have 0...n number of values
+ *
+ * @param aExtIndex Index of an extension
+ * @return Number of available values
+ */
+ virtual TInt GetExtValueCountL( TInt aExtIndex ) = 0;
+
+ /**
+ * Resolve <XVal> field of an extension. If the method is called
+ * with illegal index values (i.e. negative value or with non-existent
+ * index), the method should leave with KErrArgument.
+ *
+ * @param aExtIndex Index of an extension
+ * @param aValueIndex Index of a value related to particular extension
+ * @return Value on textual format
+ */
+ virtual const TDesC8& GetExtValueL(
+ TInt aExtIndex, TInt aValueIndex ) = 0;
+
+ private:
+ TUid iDtor_ID_Key; // Instance identifier key
+ };
+
+#include "nsmldevinfextdatacontainerplugin.inl" // Base implementations for ECOM
+
+#endif // __NSMLDEVINFEXTDATACONTAINERPLUGIN_H__
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/remotemgmt_plat/syncml_ds_customization_api/inc/nsmldevinfextdatacontainerplugin.inl Thu Aug 19 17:35:34 2010 +0530
@@ -0,0 +1,37 @@
+/*
+* 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: Inline methods for ECom plugin use.
+*
+*/
+
+inline CNSmlDevInfExtDataContainerPlugin::~CNSmlDevInfExtDataContainerPlugin()
+ {
+ // Inform the ECOM framework that this specific instance of the
+ // interface has been destroyed.
+ REComSession::DestroyedImplementation( iDtor_ID_Key );
+ }
+
+inline CNSmlDevInfExtDataContainerPlugin* CNSmlDevInfExtDataContainerPlugin::NewL()
+ {
+ const TUid KExtDataContainerInterfaceUid = { 0x2002DC7C };
+ TEComResolverParams resolutionParameters;
+ resolutionParameters.SetGenericMatch( ETrue );
+ TAny* interface = REComSession::CreateImplementationL (
+ KExtDataContainerInterfaceUid,
+ _FOFF( CNSmlDevInfExtDataContainerPlugin, iDtor_ID_Key ),
+ resolutionParameters );
+
+ return reinterpret_cast < CNSmlDevInfExtDataContainerPlugin* > ( interface );
+ }
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/remotemgmt_plat/syncml_ds_customization_api/inc/nsmloperatordatacrkeys.h Thu Aug 19 17:35:34 2010 +0530
@@ -0,0 +1,106 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: SyncML DS customization API CenRep key definitions
+*
+*/
+
+#ifndef NSMLOPERATORDATACRKEYS_H
+#define NSMLOPERATORDATACRKEYS_H
+
+#include <e32std.h>
+
+/**
+ * SyncML framework operator settings
+ *
+ */
+const TUid KCRUidOperatorDatasyncInternalKeys = { 0x2001E2E1 };
+
+/**
+ * KNsmlOpDsOperatorSyncServerURL
+ * Define operator server URL
+ *
+ */
+const TUint32 KNsmlOpDsOperatorSyncServerURL = 0x00000001;
+
+/**
+ * KNsmlOpDsOperatorAdapterUid
+ * Define operator specific contact adapter uid
+ *
+ */
+const TUint32 KNsmlOpDsOperatorAdapterUid = 0x00000002;
+
+/**
+ * KNsmlOpDsProfileAdapterUid
+ * Define profile contact adapter uid
+ *
+ */
+const TUint32 KNsmlOpDsProfileAdapterUid = 0x00000003;
+
+/**
+ * KNsmlOpDsDevInfoSwVValue
+ * Define Software version for operator devinfo
+ *
+ */
+const TUint32 KNsmlOpDsDevInfoSwVValue = 0x00000004;
+
+/**
+ * KNsmlOpDsDevInfoModValue
+ * Define Mod value for operator devinfo
+ *
+ */
+const TUint32 KNsmlOpDsDevInfoModValue = 0x00000005;
+
+/**
+ * KNsmlOpDsSyncProfileVisibility
+ * Define visibility setting for operator specific sync profile
+ *
+ */
+const TUint32 KNsmlOpDsSyncProfileVisibility = 0x00000006;
+
+/**
+ * KNsmlOpDsOperatorSyncServerId
+ * Define operator server Id
+ *
+ */
+const TUint32 KNsmlOpDsOperatorSyncServerId = 0x00000007;
+
+/**
+* KNsmlOpDsDevInfoManValue
+* Define Man value for operator devinfo
+*
+*/
+const TUint32 KNsmlOpDsDevInfoManValue = 0x00000008;
+
+/**
+ * KNsmlOpDsSyncMLStatusCodeList
+ * Define list of SyncML status codes for error reporting
+ *
+ */
+const TUint32 KNsmlOpDsSyncMLStatusCodeList = 0x00000009;
+
+/**
+ * KNsmlOpDsHttpErrorReporting
+ * Define if HTTP status codes are reported
+ *
+ */
+const TUint32 KNsmlOpDsHttpErrorReporting = 0x0000000A;
+
+/**
+ * KNsmlOpDsSyncMLErrorReporting
+ * Define if SyncML status codes are reported
+ *
+ */
+const TUint32 KNsmlOpDsSyncMLErrorReporting = 0x0000000B;
+
+#endif //NSMLOPERATORDATACRKEYS_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/remotemgmt_plat/syncml_ds_customization_api/syncml_ds_customization_api.metaxml Thu Aug 19 17:35:34 2010 +0530
@@ -0,0 +1,14 @@
+<?xml version="1.0" ?>
+<api id="824b33bd67b108d18fe063b94ed85ac5" dataversion="1.0">
+ <name>SyncML DS customization API</name>
+ <description>Definitions of operator settings keys related to data synchronizationk</description>
+ <type>c++</type>
+ <subsystem>syncmlfw</subsystem>
+ <libs>
+ </libs>
+ <release category="platform"/>
+ <attributes>
+ <htmldocprovided>no</htmldocprovided>
+ <adaptation>no</adaptation>
+ </attributes>
+</api>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/remotemgmt_plat/syncml_ds_customization_api/tsrc/SyncFwCustomizer/customlistview.cpp Thu Aug 19 17:35:34 2010 +0530
@@ -0,0 +1,478 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#include "customlistview.h"
+#include <hbmenu.h>
+#include <hbaction.h>
+#include <hblistwidgetitem.h>
+#include <hblistwidget.h>
+#include <QAbstractItemModel>
+#include <xqsettingsmanager.h>
+#include <nsmloperatordatacrkeys.h>
+#include <hbinputdialog.h>
+#include <syncmlclient.h>
+#include <syncmlclientds.h>
+#include <hbmessagebox.h>
+#include <centralrepository.h>
+
+CustomListView::CustomListView( QGraphicsItem *parent )
+ : HbView( parent )
+ {
+ setTitle(tr("SyncFwCustomizer"));
+ populateModel();
+ createMenu();
+ }
+
+void CustomListView::editItem()
+ {
+ HbListWidgetItem* item( mWidget->currentItem() );
+ QString text = item->text();
+ QString content = item->secondaryText();
+
+ HbInputDialog *dialog = new HbInputDialog();
+ dialog->setAttribute(Qt::WA_DeleteOnClose, true);
+ dialog->setPromptText(text);
+ dialog->setPrimaryAction(new HbAction("Ok"));
+ dialog->setSecondaryAction(new HbAction("Cancel"));
+ dialog->setInputMode(HbInputDialog::TextInput);
+ dialog->setValue(content);
+ dialog->open(this, SLOT(handleEditItem(HbAction*)));
+ }
+
+void CustomListView::handleEditItem(HbAction* action)
+ {
+ HbInputDialog *dialog = static_cast<HbInputDialog*>(sender());
+
+ if (dialog && action == dialog->actions().first())
+ {
+ QString text = dialog->value().toString();
+ HbListWidgetItem* item(mWidget->currentItem());
+ item->setSecondaryText(text);
+ mWidget->setCurrentItem(item);
+ saveKeyItems();
+ }
+ }
+
+void CustomListView::saveKeyItems()
+ {
+ QString notDefined = tr("Not defined");
+ XQSettingsManager* manager = new XQSettingsManager( this );
+ XQSettingsKey key1( XQSettingsKey::TargetCentralRepository,
+ KCRUidOperatorDatasyncInternalKeys.iUid, KNsmlOpDsOperatorSyncServerURL );
+ QVariant url = mWidget->item( 0 )->secondaryText();
+ bool err = false;
+ if( url.toString().compare( notDefined ) )
+ {
+ err = manager->writeItemValue( key1, url );
+ }
+ XQSettingsKey key2( XQSettingsKey::TargetCentralRepository,
+ KCRUidOperatorDatasyncInternalKeys.iUid, KNsmlOpDsOperatorAdapterUid );
+ QVariant adapter = mWidget->item( 1 )->secondaryText();
+ if( adapter.toString().compare( notDefined ) )
+ {
+ bool ok;
+ int value = adapter.toString().toInt( &ok, 10 );
+ if( !ok )
+ {
+ value = adapter.toString().toInt( &ok, 16 );
+ }
+ if( ok )
+ {
+ QVariant var( value );
+ err = manager->writeItemValue( key2, var );
+ }
+ }
+ XQSettingsKey key3( XQSettingsKey::TargetCentralRepository,
+ KCRUidOperatorDatasyncInternalKeys.iUid, KNsmlOpDsProfileAdapterUid );
+ QVariant profile = mWidget->item( 2 )->secondaryText();
+ if( profile.toString().compare( notDefined ) )
+ {
+ bool ok;
+ int value = profile.toString().toInt( &ok, 10 );
+ if( !ok )
+ {
+ value = profile.toString().toInt( &ok, 16 );
+ }
+ if( ok )
+ {
+ QVariant var( value );
+ err = manager->writeItemValue( key3, var );
+ }
+ }
+ XQSettingsKey key4( XQSettingsKey::TargetCentralRepository,
+ KCRUidOperatorDatasyncInternalKeys.iUid, KNsmlOpDsDevInfoSwVValue );
+ QVariant swv = mWidget->item( 3 )->secondaryText();
+ if( swv.toString().compare( notDefined ) )
+ {
+ err = manager->writeItemValue( key4, swv.toByteArray() );
+ }
+ XQSettingsKey key5( XQSettingsKey::TargetCentralRepository,
+ KCRUidOperatorDatasyncInternalKeys.iUid, KNsmlOpDsDevInfoModValue );
+ QVariant mod = mWidget->item( 4 )->secondaryText();
+ if( mod.toString().compare(notDefined) )
+ {
+ err = manager->writeItemValue( key5, mod.toByteArray() );
+ }
+ XQSettingsKey key6( XQSettingsKey::TargetCentralRepository,
+ KCRUidOperatorDatasyncInternalKeys.iUid, KNsmlOpDsSyncProfileVisibility );
+ QVariant visibility = mWidget->item( 5 )->secondaryText();
+ if( visibility.toString().compare( notDefined ) )
+ {
+ bool ok;
+ int value = visibility.toString().toInt( &ok, 10 );
+ if( !ok )
+ {
+ value = visibility.toString().toInt( &ok, 16 );
+ }
+ if( ok )
+ {
+ QVariant var( value );
+ err = manager->writeItemValue( key6, var );
+ }
+ }
+ XQSettingsKey key7( XQSettingsKey::TargetCentralRepository,
+ KCRUidOperatorDatasyncInternalKeys.iUid, KNsmlOpDsOperatorSyncServerId );
+ QVariant serverId = mWidget->item( 6 )->secondaryText();
+ if( serverId.toString().compare( notDefined ) )
+ {
+ err = manager->writeItemValue( key7, serverId.toByteArray() );
+ }
+ XQSettingsKey key8( XQSettingsKey::TargetCentralRepository,
+ KCRUidOperatorDatasyncInternalKeys.iUid, KNsmlOpDsSyncMLStatusCodeList );
+ QVariant syncmlStatus = mWidget->item( 7 )->secondaryText();
+ if( syncmlStatus.toString().compare( notDefined ) )
+ {
+ err = manager->writeItemValue( key8, syncmlStatus );
+ }
+ XQSettingsKey key9( XQSettingsKey::TargetCentralRepository,
+ KCRUidOperatorDatasyncInternalKeys.iUid, KNsmlOpDsDevInfoManValue );
+ QVariant man = mWidget->item( 8 )->secondaryText();
+ if( man.toString().compare(notDefined) )
+ {
+ err = manager->writeItemValue( key9, man.toByteArray() );
+ }
+ XQSettingsKey key10( XQSettingsKey::TargetCentralRepository,
+ KCRUidOperatorDatasyncInternalKeys.iUid, KNsmlOpDsHttpErrorReporting );
+ QVariant httpErrorReporting = mWidget->item( 9 )->secondaryText();
+ if( httpErrorReporting.toString().compare( notDefined ) )
+ {
+ bool ok;
+ int value = httpErrorReporting.toString().toInt( &ok, 10 );
+ if( !ok )
+ {
+ value = httpErrorReporting.toString().toInt( &ok, 16 );
+ }
+ if( ok )
+ {
+ QVariant var( value );
+ err = manager->writeItemValue( key10, var );
+ }
+ }
+ XQSettingsKey key11( XQSettingsKey::TargetCentralRepository,
+ KCRUidOperatorDatasyncInternalKeys.iUid, KNsmlOpDsSyncMLErrorReporting );
+ QVariant syncMLErrorReporting = mWidget->item( 10 )->secondaryText();
+ if( syncMLErrorReporting.toString().compare( notDefined ) )
+ {
+ bool ok;
+ int value = syncMLErrorReporting.toString().toInt( &ok, 10 );
+ if( !ok )
+ {
+ value = syncMLErrorReporting.toString().toInt( &ok, 16 );
+ }
+ if( ok )
+ {
+ QVariant var( value );
+ err = manager->writeItemValue( key11, var );
+ }
+ }
+ delete manager;
+ }
+
+void CustomListView::syncNow()
+ {
+ HbInputDialog *dialog = new HbInputDialog();
+ dialog->setAttribute(Qt::WA_DeleteOnClose, true);
+ dialog->setPromptText(tr("Profile ID"));
+ dialog->setPrimaryAction(new HbAction("Ok"));
+ dialog->setSecondaryAction(new HbAction("Cancel"));
+ dialog->setInputMode(HbInputDialog::TextInput);
+ dialog->open(this, SLOT(startSync(HbAction*)));
+ }
+
+void CustomListView::startSync(HbAction* action)
+ {
+ HbInputDialog *dialog = static_cast<HbInputDialog*>(sender());
+
+ if (dialog && action == dialog->actions().first())
+ {
+ QString text = dialog->value().toString();
+ bool ok = false;
+ int profileId = text.toInt(&ok, 10);
+ if (ok)
+ {
+ // Open syncML session
+ RSyncMLSession syncMLSession;
+ RSyncMLDataSyncJob job;
+ CleanupClosePushL( syncMLSession );
+ CleanupClosePushL( job );
+ syncMLSession.OpenL();
+
+ // Need instance of data sync class
+ // For creating a data sync job, need to specify id of the profile used for synchronization
+ // If profile selected is PCSuite, it searches for the bluetooth device to sync with
+
+ job.CreateL( syncMLSession, profileId );
+ // close the job
+ job.Close();
+ // close the syncML session
+ CleanupStack::PopAndDestroy( &job );
+ CleanupStack::PopAndDestroy( &syncMLSession );
+ }
+ }
+ }
+
+void CustomListView::listSyncProfiles()
+ {
+ // Open syncML session
+ RSyncMLSession syncMLSession;
+ syncMLSession.OpenL();
+ CleanupClosePushL( syncMLSession );
+
+ RArray<TSmlProfileId> profiles;
+ // Get the list of available profiles into an array
+ syncMLSession.ListProfilesL( profiles, ESmlDataSync );
+ QString text = NULL;
+ for( TInt i = 0; i < profiles.Count(); i++ )
+ {
+ RSyncMLDataSyncProfile profile;
+ profile.OpenL( syncMLSession,profiles[i], ESmlOpenReadWrite );
+ CleanupClosePushL( profile );
+ text.append( QString::number( profiles[i] ) );
+ text.append( tr(" ") );
+ QString qname( (QChar*)profile.DisplayName().Ptr(), profile.DisplayName().Length() );
+ text.append( qname );
+ if( profiles.Count() != ( i + 1 ) )
+ {
+ text.append( tr("; ") );
+ }
+ CleanupStack::PopAndDestroy(& profile );
+ }
+ profiles.Close();
+ HbMessageBox::information(text);
+ CleanupStack::PopAndDestroy( &syncMLSession );
+ }
+
+void CustomListView::resetItem()
+ {
+ //HbListWidgetItem* item( mWidget->currentItem() );
+ CRepository* rep = CRepository::NewLC( KCRUidOperatorDatasyncInternalKeys );
+ rep->Reset( mWidget->currentRow() + 1 );
+ CleanupStack::PopAndDestroy( rep );
+ populateModel();
+ }
+
+void CustomListView::resetAll()
+ {
+ CRepository* rep = CRepository::NewLC( KCRUidOperatorDatasyncInternalKeys );
+ rep->Reset();
+ CleanupStack::PopAndDestroy( rep );
+ populateModel();
+ }
+
+void CustomListView::populateModel()
+ {
+ HbListWidget* widget = new HbListWidget;
+ XQSettingsManager* manager = new XQSettingsManager( this );
+ XQSettingsKey key1( XQSettingsKey::TargetCentralRepository,
+ KCRUidOperatorDatasyncInternalKeys.iUid, KNsmlOpDsOperatorSyncServerURL );
+ QString url = manager->readItemValue( key1, XQSettingsManager::TypeString ).toString();
+ XQSettingsKey key2( XQSettingsKey::TargetCentralRepository,
+ KCRUidOperatorDatasyncInternalKeys.iUid, KNsmlOpDsOperatorAdapterUid );
+ QString adapter = manager->readItemValue( key2, XQSettingsManager::TypeInt ).toString();
+ XQSettingsKey key3( XQSettingsKey::TargetCentralRepository,
+ KCRUidOperatorDatasyncInternalKeys.iUid, KNsmlOpDsProfileAdapterUid );
+ QString profile = manager->readItemValue( key3, XQSettingsManager::TypeInt ).toString();
+ XQSettingsKey key4( XQSettingsKey::TargetCentralRepository,
+ KCRUidOperatorDatasyncInternalKeys.iUid, KNsmlOpDsDevInfoSwVValue );
+ QString swv = manager->readItemValue( key4 ).toString();
+ XQSettingsKey key5( XQSettingsKey::TargetCentralRepository,
+ KCRUidOperatorDatasyncInternalKeys.iUid, KNsmlOpDsDevInfoModValue );
+ QString mod = manager->readItemValue( key5 ).toString();
+ XQSettingsKey key6( XQSettingsKey::TargetCentralRepository,
+ KCRUidOperatorDatasyncInternalKeys.iUid, KNsmlOpDsSyncProfileVisibility );
+ QString visibility = manager->readItemValue( key6, XQSettingsManager::TypeInt ).toString();
+ XQSettingsKey key7( XQSettingsKey::TargetCentralRepository,
+ KCRUidOperatorDatasyncInternalKeys.iUid, KNsmlOpDsOperatorSyncServerId );
+ QString serverId = manager->readItemValue( key7 ).toString();
+ XQSettingsKey key8( XQSettingsKey::TargetCentralRepository,
+ KCRUidOperatorDatasyncInternalKeys.iUid, KNsmlOpDsSyncMLStatusCodeList );
+ QString status = manager->readItemValue( key8, XQSettingsManager::TypeString ).toString();
+ XQSettingsKey key9( XQSettingsKey::TargetCentralRepository,
+ KCRUidOperatorDatasyncInternalKeys.iUid, KNsmlOpDsDevInfoManValue );
+ QString man = manager->readItemValue( key9 ).toString();
+ XQSettingsKey key10( XQSettingsKey::TargetCentralRepository,
+ KCRUidOperatorDatasyncInternalKeys.iUid, KNsmlOpDsHttpErrorReporting );
+ QString httpErrorReporting = manager->readItemValue( key10 ).toString();
+ XQSettingsKey key11( XQSettingsKey::TargetCentralRepository,
+ KCRUidOperatorDatasyncInternalKeys.iUid, KNsmlOpDsSyncMLErrorReporting );
+ QString syncMLErrorReporting = manager->readItemValue( key11 ).toString();
+
+ delete manager;
+ HbListWidgetItem* result1 = new HbListWidgetItem();
+ result1->setText( tr("Operator server URL") );
+ if( !url.isEmpty() )
+ {
+ result1->setSecondaryText( url );
+ }
+ else
+ {
+ result1->setSecondaryText( tr("Not defined") );
+ }
+ HbListWidgetItem* result2 = new HbListWidgetItem();
+ result2->setText( tr("Sync adapter UID") );
+ if( !adapter.isEmpty() )
+ {
+ result2->setSecondaryText( adapter );
+ }
+ else
+ {
+ result2->setSecondaryText( tr("Not defined") );
+ }
+ HbListWidgetItem* result3 = new HbListWidgetItem();
+ result3->setText( tr("Profile adapter UID") );
+ if( !profile.isEmpty() )
+ {
+ result3->setSecondaryText( profile );
+ }
+ else
+ {
+ result3->setSecondaryText( tr("Not defined") );
+ }
+ HbListWidgetItem* result4 = new HbListWidgetItem();
+ result4->setText( tr("Customized SwV") );
+ if( !swv.isEmpty() )
+ {
+ result4->setSecondaryText( swv );
+ }
+ else
+ {
+ result4->setSecondaryText( tr("Not defined") );
+ }
+ HbListWidgetItem* result5 = new HbListWidgetItem;
+ result5->setText( tr("Customized Mod") );
+ if( !mod.isEmpty() )
+ {
+ result5->setSecondaryText( mod );
+ }
+ else
+ {
+ result5->setSecondaryText( tr("Not defined") );
+ }
+ HbListWidgetItem* result6 = new HbListWidgetItem;
+ result6->setText( tr("Sync profile visibility") );
+ if( !visibility.isEmpty() )
+ {
+ result6->setSecondaryText( visibility );
+ }
+ else
+ {
+ result6->setSecondaryText( tr("Not defined") );
+ }
+ HbListWidgetItem* result7 = new HbListWidgetItem;
+ result7->setText( tr("Sync server ID") );
+ if( !serverId.isEmpty() )
+ {
+ result7->setSecondaryText( serverId );
+ }
+ else
+ {
+ result7->setSecondaryText( tr("Not defined") );
+ }
+ HbListWidgetItem* result8 = new HbListWidgetItem;
+ result8->setText( tr("SyncML status codes") );
+ if( !status.isEmpty() )
+ {
+ result8->setSecondaryText( status );
+ }
+ else
+ {
+ result8->setSecondaryText( tr("Not defined") );
+ }
+ HbListWidgetItem* result9 = new HbListWidgetItem;
+ result9->setText( tr("Customized Man") );
+ if( !man.isEmpty() )
+ {
+ result9->setSecondaryText( man );
+ }
+ else
+ {
+ result9->setSecondaryText( tr("Not defined") );
+ }
+ HbListWidgetItem* result10 = new HbListWidgetItem;
+ result10->setText( tr("Http error reporting") );
+ if( !httpErrorReporting.isEmpty() )
+ {
+ result10->setSecondaryText( httpErrorReporting );
+ }
+ else
+ {
+ result10->setSecondaryText( tr("Not defined") );
+ }
+ HbListWidgetItem* result11 = new HbListWidgetItem;
+ result11->setText( tr("SyncML error reporting") );
+ if( !syncMLErrorReporting.isEmpty() )
+ {
+ result11->setSecondaryText( syncMLErrorReporting );
+ }
+ else
+ {
+ result11->setSecondaryText( tr("Not defined") );
+ }
+ widget->addItem( result1 );
+ widget->addItem( result2 );
+ widget->addItem( result3 );
+ widget->addItem( result4 );
+ widget->addItem( result5 );
+ widget->addItem( result6 );
+ widget->addItem( result7 );
+ widget->addItem( result8 );
+ widget->addItem( result9 );
+ widget->addItem( result10 );
+ widget->addItem( result11 );
+
+ connect( widget,
+ SIGNAL( activated(HbListWidgetItem*) ),
+ SLOT( handleItem(HbListWidgetItem*) ) );
+ connect(widget,
+ SIGNAL( longPressed(HbListWidgetItem*, const QPointF&) ),
+ SLOT( editItem()) );
+ mWidget = widget;
+ setWidget( widget );
+ }
+
+void CustomListView::createMenu()
+ {
+ HbMenu* theMenu = menu();
+ connect( theMenu->addAction( tr("Edit")), SIGNAL( triggered() ), SLOT( editItem() ) );
+ //connect( theMenu->addAction( tr("Save")), SIGNAL( triggered() ), SLOT( saveKeyItems() ) );
+ connect( theMenu->addAction( tr("List profiles")), SIGNAL( triggered() ), SLOT( listSyncProfiles() ) );
+ connect( theMenu->addAction( tr("Sync now")), SIGNAL( triggered() ), SLOT( syncNow() ) );
+ HbMenu* subMenu = theMenu->addMenu(tr("Reset"));
+ connect( subMenu->addAction( tr("Reset item")), SIGNAL( triggered() ), SLOT( resetItem() ) );
+ connect( subMenu->addAction( tr("Reset All")), SIGNAL( triggered() ), SLOT( resetAll() ) );
+ }
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/remotemgmt_plat/syncml_ds_customization_api/tsrc/SyncFwCustomizer/customlistview.h Thu Aug 19 17:35:34 2010 +0530
@@ -0,0 +1,53 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#ifndef CUSTOMLISTVIEW_H_
+#define CUSTOMLISTVIEW_H_
+
+#include <QStringListModel>
+#include <hbview.h>
+
+class HbListWidget;
+
+class CustomListView : public HbView
+{
+ Q_OBJECT
+
+public:
+ CustomListView( QGraphicsItem *parent=0 );
+ virtual ~CustomListView() {};
+
+public slots:
+ void editItem();
+ void saveKeyItems();
+ void listSyncProfiles();
+ void syncNow();
+ void resetItem();
+ void resetAll();
+ void handleEditItem(HbAction* action);
+ void startSync(HbAction* action);
+
+protected:
+ void populateModel();
+ void createMenu();
+
+protected:
+ HbListWidget* mWidget;
+
+};
+
+#endif /* CUSTOMLISTVIEW_H_*/
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/remotemgmt_plat/syncml_ds_customization_api/tsrc/SyncFwCustomizer/main.cpp Thu Aug 19 17:35:34 2010 +0530
@@ -0,0 +1,32 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#include <QtGui>
+#include <hbmainwindow.h>
+#include <hbapplication.h>
+#include "customlistview.h"
+
+int main(int argc, char *argv[])
+{
+ HbApplication app( argc, argv );
+ HbMainWindow mainWindow;
+ CustomListView* listView = new CustomListView;
+ mainWindow.addView( listView );
+ mainWindow.show();
+ return app.exec();
+}
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/remotemgmt_plat/syncml_ds_customization_api/tsrc/SyncFwCustomizer/syncfwcustomizer.iby Thu Aug 19 17:35:34 2010 +0530
@@ -0,0 +1,27 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#include <bldvariant.hrh>
+
+#ifndef __SYNCFWCUSTOMIZER_IBY__
+#define __SYNCFWCUSTOMIZER_IBY__
+
+file=ABI_DIR\BUILD_DIR\syncfwcustomizer.exe PROGRAMS_DIR\syncfwcustomizer.exe
+data=\epoc32\data\z\resource\apps\syncfwcustomizer.rsc RESOURCE_FILES_DIR\syncfwcustomizer.rsc
+data=\epoc32\data\z\private\10003a3f\import\apps\syncfwcustomizer_reg.rsc \private\10003a3f\apps\syncfwcustomizer_reg.rsc
+
+#endif //__SYNCFWCUSTOMIZER_IBY__
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/remotemgmt_plat/syncml_ds_customization_api/tsrc/SyncFwCustomizer/syncfwcustomizer.pro Thu Aug 19 17:35:34 2010 +0530
@@ -0,0 +1,19 @@
+
+
+TEMPLATE = app
+TARGET =
+DEPENDPATH += .
+CONFIG += hb
+LIBS += -lxqsettingsmanager
+INCLUDEPATH += \epoc32\include\platform\mw
+
+# Input
+SOURCES += customlistview.cpp \
+ main.cpp
+HEADERS = customlistview.h
+
+symbian:TARGET.UID3 = 0x2001FDF4
+symbian:LIBS += -lsyncmlclientapi \
+ -lcentralrepository
+TARGET.CAPABILITY = ALL \
+ -TCB
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/remotemgmt_plat/syncml_ds_customization_api/tsrc/devinfextmgmtinterface/UT_devinfextmgmtinterface.mmp Thu Aug 19 17:35:34 2010 +0530
@@ -0,0 +1,58 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: MMP file for device info extension management
+* interface unit tests.
+*
+*/
+
+#include <Digia/Eunit/EUnitCaps.h>
+#include <platform_paths.hrh>
+#include <defaultcaps.hrh>
+#include <data_caging_paths.hrh>
+
+// Build target
+TARGET UT_devinfextmgmtif.dll
+TARGETTYPE dll
+UID 0x1000af5a 0x01700000
+
+CAPABILITY EUNIT_CAPS
+VENDORID 0x00000000
+
+#if defined(ARMCC)
+DEFFILE ./def/eabidevinfextmgmtif_test
+#elif defined(WINSCW)
+DEFFILE ./def/bwinscwdevinfextmgmtif_test
+#endif
+
+// Source files
+SOURCEPATH .
+SOURCE dllmain.cpp
+SOURCE devinfextmgmtif_test.cpp
+
+// Code under test
+SOURCEPATH ../exampledevinfextdataplugin/src
+SOURCE exampledevinfextdatacontainerplugin.cpp
+
+// Include paths
+USERINCLUDE . ../exampledevinfextdataplugin/inc
+
+MW_LAYER_SYSTEMINCLUDE
+SYSTEMINCLUDE /epoc32/include/ecom
+SYSTEMINCLUDE /epoc32/include/Digia/EUnit
+
+// Dependencies to system components
+LIBRARY ecom.lib
+LIBRARY euser.lib
+LIBRARY EUnit.lib
+LIBRARY bafl.lib
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/remotemgmt_plat/syncml_ds_customization_api/tsrc/devinfextmgmtinterface/bld.inf Thu Aug 19 17:35:34 2010 +0530
@@ -0,0 +1,20 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Build info file for device info extension management
+* interface unit tests.
+*
+*/
+
+PRJ_MMPFILES
+UT_devinfextmgmtinterface.mmp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/remotemgmt_plat/syncml_ds_customization_api/tsrc/devinfextmgmtinterface/def/bwinscwdevinfextmgmtif_testu.def Thu Aug 19 17:35:34 2010 +0530
@@ -0,0 +1,3 @@
+EXPORTS
+ ?CreateTestSuiteL@@YAPAVMEUnitTest@@XZ @ 1 NONAME ; class MEUnitTest * CreateTestSuiteL(void)
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/remotemgmt_plat/syncml_ds_customization_api/tsrc/devinfextmgmtinterface/def/eabidevinfextmgmtif_testu.def Thu Aug 19 17:35:34 2010 +0530
@@ -0,0 +1,5 @@
+EXPORTS
+ _Z16CreateTestSuiteLv @ 1 NONAME
+ _ZTI36CExampleDevInfExtDataContainerPlugin @ 2 NONAME
+ _ZTV36CExampleDevInfExtDataContainerPlugin @ 3 NONAME
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/remotemgmt_plat/syncml_ds_customization_api/tsrc/devinfextmgmtinterface/devinfextmgmtif_test.cpp Thu Aug 19 17:35:34 2010 +0530
@@ -0,0 +1,339 @@
+/*
+* 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: Source code file for device info extension management
+* interface unit tests.
+*
+*/
+
+// CLASS HEADER
+#include "devinfextmgmtif_test.h"
+
+// EXTERNAL INCLUDES
+#include <EUnitMacros.h>
+#include <EUnitDecorators.h>
+#include <nsmldevinfextdatacontainerplugin.h>
+
+// INTERNAL INCLUDES
+#include "exampledevinfextdatacontainerplugin.h"
+
+// LOCAL DEFINITIONS
+namespace
+ {
+ _LIT8( KTestXNam1, "TestExtensionName" );
+ _LIT8( KTestXNam2, "AnotherExtensionName" );
+ _LIT8( KTestXNam3, "ExtensionNameWithNoValues" );
+
+ _LIT8( KTestXVal1, "FirstValue" );
+ _LIT8( KTestXVal2, "SecondValue" );
+ _LIT8( KTestXVal3, "ThirdValue" );
+ _LIT8( KTestXVal4, "FourthValue" );
+ }
+
+// - Construction -----------------------------------------------------------
+CDevInfExtMgmtIf_Test* CDevInfExtMgmtIf_Test::NewL()
+ {
+ CDevInfExtMgmtIf_Test* self = CDevInfExtMgmtIf_Test::NewLC();
+ CleanupStack::Pop( self );
+ return self;
+ }
+
+CDevInfExtMgmtIf_Test* CDevInfExtMgmtIf_Test::NewLC()
+ {
+ CDevInfExtMgmtIf_Test* self = new ( ELeave ) CDevInfExtMgmtIf_Test();
+ CleanupStack::PushL( self );
+ self->ConstructL();
+ return self;
+ }
+
+CDevInfExtMgmtIf_Test::~CDevInfExtMgmtIf_Test()
+ {
+ if( iEcomPlugin )
+ {
+ delete iEcomPlugin;
+ REComSession::FinalClose();
+ }
+ }
+
+CDevInfExtMgmtIf_Test::CDevInfExtMgmtIf_Test()
+ {
+ }
+
+void CDevInfExtMgmtIf_Test::ConstructL()
+ {
+ CEUnitTestSuiteClass::ConstructL();
+ }
+
+// - Setup & Teardown ---------------------------------------------------------
+
+void CDevInfExtMgmtIf_Test::SetupEmptyL()
+ {
+ // Construct the plugin normally; in its default construction, no
+ // extensions are available.
+ TRAPD( err, iEcomPlugin = CNSmlDevInfExtDataContainerPlugin::NewL() );
+ if( err != KErrNone )
+ {
+ EUNIT_PRINT( _L( "Leave while instantiating plugin: %d" ), err );
+ }
+ EUNIT_ASSERT_DESC( iEcomPlugin, "Plugin instantiation failed." );
+ }
+
+void CDevInfExtMgmtIf_Test::SetupOneXNamL()
+ {
+ // Default construction
+ SetupEmptyL();
+
+ // Add XNam + XVals
+ CExampleDevInfExtDataContainerPlugin* plugin =
+ reinterpret_cast < CExampleDevInfExtDataContainerPlugin* >( iEcomPlugin );
+
+ plugin->InsertExtension( KTestXNam1, KTestXVal1 );
+ plugin->InsertExtension( KTestXNam1, KTestXVal2 );
+ }
+
+void CDevInfExtMgmtIf_Test::SetupMultipleXNamL()
+ {
+ // Default construction
+ SetupEmptyL();
+
+ // Add XNam + XVals
+ CExampleDevInfExtDataContainerPlugin* plugin =
+ reinterpret_cast < CExampleDevInfExtDataContainerPlugin* >( iEcomPlugin );
+
+ plugin->InsertExtension( KTestXNam1, KTestXVal1 );
+ plugin->InsertExtension( KTestXNam1, KTestXVal2 );
+ plugin->InsertExtension( KTestXNam2, KTestXVal3 );
+ plugin->InsertExtension( KTestXNam2, KTestXVal4 );
+ plugin->InsertExtension( KTestXNam3, KNullDesC8 );
+ }
+
+void CDevInfExtMgmtIf_Test::Teardown()
+ {
+ if( iEcomPlugin )
+ {
+ delete iEcomPlugin;
+ }
+ REComSession::FinalClose();
+ }
+
+// - Actual test methods ------------------------------------------------------
+void CDevInfExtMgmtIf_Test::NewLL()
+ {
+ // Instantiate the example plugin
+ CNSmlDevInfExtDataContainerPlugin* ecomPlugin = NULL;
+
+ // Instantiate the plugin
+ TRAPD( err, ecomPlugin = CNSmlDevInfExtDataContainerPlugin::NewL() );
+ if( err != KErrNone )
+ {
+ EUNIT_PRINT( _L( "Leave while instantiating plugin: %d" ), err );
+ }
+
+ EUNIT_ASSERT( ecomPlugin );
+ delete ecomPlugin;
+ ecomPlugin = NULL;
+
+ // Tell the framework that plugin is no longer used - resources are released
+ REComSession::FinalClose();
+ }
+
+// Run tests for the test plugin, when there are no extension configured
+// in the plugin.
+void CDevInfExtMgmtIf_Test::TestEmptyPluginL()
+ {
+ // Debug
+ PrintExtensions();
+
+ TInt extCount = 0;
+ TRAPD( err, extCount = iEcomPlugin->GetExtensionCountL() );
+ EUNIT_ASSERT_DESC( err == KErrNone, "GetExtensionCountL() leaves" );
+ EUNIT_ASSERT( extCount == 0 );
+
+ // Ensure that other methods leave, as there are not extensions
+ TRAP( err, iEcomPlugin->GetExtNameL( 0 ) );
+ EUNIT_ASSERT( err == KErrArgument );
+ TRAP( err, iEcomPlugin->GetExtNameL( 1 ) );
+ EUNIT_ASSERT( err == KErrArgument );
+
+ TRAP( err, iEcomPlugin->GetExtValueCountL( 0 ) );
+ EUNIT_ASSERT( err == KErrArgument );
+ TRAP( err, iEcomPlugin->GetExtValueCountL( 1 ) );
+ EUNIT_ASSERT( err == KErrArgument );
+
+ TRAP( err, iEcomPlugin->GetExtValueL( 0, 0 ) );
+ EUNIT_ASSERT( err == KErrArgument );
+ }
+
+// Run tests for the test plugin, when there is one extension configured
+// in the plugin.
+void CDevInfExtMgmtIf_Test::TestOneXNamPluginL()
+ {
+ // Debug
+ PrintExtensions();
+
+ TInt extCount = 0;
+ TRAPD( err, extCount = iEcomPlugin->GetExtensionCountL() );
+ EUNIT_ASSERT_DESC( err == KErrNone, "GetExtensionCountL() leaves" );
+ EUNIT_ASSERT( extCount == 1 );
+
+ // Check legal values
+ TBuf8< 50 > tmpBuf;
+ EUNIT_ASSERT_NO_LEAVE( tmpBuf = iEcomPlugin->GetExtNameL( 0 ) );
+ EUNIT_ASSERT( tmpBuf.Compare( KTestXNam1 ) == 0 );
+
+ TInt xValCount = 0;
+ EUNIT_ASSERT_NO_LEAVE( xValCount = iEcomPlugin->GetExtValueCountL( 0 ) );
+ EUNIT_ASSERT( xValCount == 2 );
+
+ tmpBuf.Zero();
+ EUNIT_ASSERT_NO_LEAVE( tmpBuf = iEcomPlugin->GetExtValueL( 0, 0 ) );
+ EUNIT_ASSERT( tmpBuf.Compare( KTestXVal1 ) == 0 );
+ tmpBuf.Zero();
+ EUNIT_ASSERT_NO_LEAVE( tmpBuf = iEcomPlugin->GetExtValueL( 0, 1 ) );
+ EUNIT_ASSERT( tmpBuf.Compare( KTestXVal2 ) == 0 );
+
+ // Ensure that methods leave with illegal indices
+ TRAP( err, iEcomPlugin->GetExtNameL( 1 ) );
+ EUNIT_ASSERT( err == KErrArgument );
+
+ TRAP( err, iEcomPlugin->GetExtValueCountL( 1 ) );
+ EUNIT_ASSERT( err == KErrArgument );
+
+ TRAP( err, iEcomPlugin->GetExtValueL( 1, 0 ) );
+ EUNIT_ASSERT( err == KErrArgument );
+ }
+
+// Run tests for the test plugin, when there are multiple extensions configured
+// in the plugin.
+void CDevInfExtMgmtIf_Test::TestMultipleXNamPluginL()
+ {
+ // Debug
+ PrintExtensions();
+
+ TInt extCount = 0;
+ TRAPD( err, extCount = iEcomPlugin->GetExtensionCountL() );
+ EUNIT_ASSERT_DESC( err == KErrNone, "GetExtensionCountL() leaves" );
+ EUNIT_ASSERT( extCount == 3 );
+
+ // Check legal values
+ // 1st extension (index 0)
+ TBuf8< 50 > tmpBuf;
+ EUNIT_ASSERT_NO_LEAVE( tmpBuf = iEcomPlugin->GetExtNameL( 0 ) );
+ EUNIT_ASSERT( tmpBuf.Compare( KTestXNam1 ) == 0 );
+
+ TInt xValCount = 0;
+ EUNIT_ASSERT_NO_LEAVE( xValCount = iEcomPlugin->GetExtValueCountL( 0 ) );
+ EUNIT_ASSERT( xValCount == 2 );
+
+ tmpBuf.Zero();
+ EUNIT_ASSERT_NO_LEAVE( tmpBuf = iEcomPlugin->GetExtValueL( 0, 0 ) );
+ EUNIT_ASSERT( tmpBuf.Compare( KTestXVal1 ) == 0 );
+ tmpBuf.Zero();
+ EUNIT_ASSERT_NO_LEAVE( tmpBuf = iEcomPlugin->GetExtValueL( 0, 1 ) );
+ EUNIT_ASSERT( tmpBuf.Compare( KTestXVal2 ) == 0 );
+
+ // 2nd extension (index 1)
+ tmpBuf.Zero();
+ EUNIT_ASSERT_NO_LEAVE( tmpBuf = iEcomPlugin->GetExtNameL( 1 ) );
+ EUNIT_ASSERT( tmpBuf.Compare( KTestXNam2 ) == 0 );
+
+ xValCount = 0;
+ EUNIT_ASSERT_NO_LEAVE( xValCount = iEcomPlugin->GetExtValueCountL( 1 ) );
+ EUNIT_ASSERT( xValCount == 2 );
+
+ tmpBuf.Zero();
+ EUNIT_ASSERT_NO_LEAVE( tmpBuf = iEcomPlugin->GetExtValueL( 1, 0 ) );
+ EUNIT_ASSERT( tmpBuf.Compare( KTestXVal3 ) == 0 );
+ tmpBuf.Zero();
+ EUNIT_ASSERT_NO_LEAVE( tmpBuf = iEcomPlugin->GetExtValueL( 1, 1 ) );
+ EUNIT_ASSERT( tmpBuf.Compare( KTestXVal4 ) == 0 );
+
+ // 3nd extension (index 2)
+ EUNIT_ASSERT_NO_LEAVE( tmpBuf = iEcomPlugin->GetExtNameL( 2 ) );
+ EUNIT_ASSERT( tmpBuf.Compare( KTestXNam3 ) == 0 );
+
+ xValCount = 0;
+ EUNIT_ASSERT_NO_LEAVE( xValCount = iEcomPlugin->GetExtValueCountL( 2 ) );
+ EUNIT_ASSERT( xValCount == 0 );
+
+ // Ensure that methods leave with illegal indices
+ TRAP( err, iEcomPlugin->GetExtNameL( -1 ) );
+ EUNIT_ASSERT( err == KErrArgument );
+
+ TRAP( err, iEcomPlugin->GetExtValueCountL( 3 ) );
+ EUNIT_ASSERT( err == KErrArgument );
+
+ TRAP( err, iEcomPlugin->GetExtValueL( 5, 2 ) );
+ EUNIT_ASSERT( err == KErrArgument );
+ }
+
+// - Utilities ----------------------------------------------------------------
+void CDevInfExtMgmtIf_Test::PrintExtensions()
+ {
+ EUNIT_PRINT( _L( "Extension count %d" ), iEcomPlugin->GetExtensionCountL() );
+
+ for ( TInt i = 0; i < iEcomPlugin->GetExtensionCountL(); i++ )
+ {
+ EUNIT_PRINT( _L("EXTENSION NUMBER %d"), i );
+
+ EUNIT_PRINT( _L( "Name" ) );
+ EUNIT_PRINT( iEcomPlugin->GetExtNameL( i ) );
+
+ EUNIT_PRINT( _L( "Values" ) );
+ for ( TInt j = 0; j < iEcomPlugin->GetExtValueCountL( i ); j++ )
+ {
+ EUNIT_PRINT( iEcomPlugin->GetExtValueL( i, j ) );
+ }
+
+ EUNIT_PRINT( _L("END OF EXTENSION %d"), i );
+ }
+ }
+
+// - EUnit test table -------------------------------------------------------
+
+EUNIT_BEGIN_TEST_TABLE(
+ CDevInfExtMgmtIf_Test,
+ "Unit tests for Device info ext management interface.",
+ "UNIT" )
+
+EUNIT_TEST(
+ "Verify Ecom plugin instantiation",
+ "CNSmlDevInfExtDataContainerPlugin",
+ "NewL",
+ "FUNCTIONALITY",
+ Empty, NewLL, Empty)
+
+EUNIT_TEST(
+ "Test the behaviour with no extensions",
+ "CNSmlDevInfExtDataContainerPlugin",
+ "NewL",
+ "FUNCTIONALITY",
+ SetupEmptyL, TestEmptyPluginL, Teardown)
+
+EUNIT_TEST(
+ "Test the behaviour with one extension",
+ "CNSmlDevInfExtDataContainerPlugin",
+ "NewL",
+ "FUNCTIONALITY",
+ SetupOneXNamL, TestOneXNamPluginL, Teardown)
+
+EUNIT_TEST(
+ "Test the behaviour with multiple extensions",
+ "CNSmlDevInfExtDataContainerPlugin",
+ "NewL",
+ "FUNCTIONALITY",
+ SetupMultipleXNamL, TestMultipleXNamPluginL, Teardown)
+
+EUNIT_END_TEST_TABLE
+
+// End of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/remotemgmt_plat/syncml_ds_customization_api/tsrc/devinfextmgmtinterface/devinfextmgmtif_test.h Thu Aug 19 17:35:34 2010 +0530
@@ -0,0 +1,72 @@
+/*
+* 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: Header file for device info extension management
+* interface unit tests.
+*
+*/
+
+#ifndef __DEVINFEXTMGMTIF_TEST_H__
+#define __DEVINFEXTMGMTIF_TEST_H__
+
+// INCLUDES
+#include <CEUnitTestSuiteClass.h>
+#include <EUnitDecorators.h>
+
+// FORWARD DECLARATION
+class CNSmlDevInfExtDataContainerPlugin;
+
+// CLASS DEFINITION
+/**
+ * Unit test class for Device info extension management interface
+ * (ECom plugin).
+ */
+NONSHARABLE_CLASS( CDevInfExtMgmtIf_Test )
+ : public CEUnitTestSuiteClass
+ {
+ public: // Constructors and destructor
+
+ static CDevInfExtMgmtIf_Test* NewL();
+ static CDevInfExtMgmtIf_Test* NewLC();
+ ~CDevInfExtMgmtIf_Test();
+
+ private: // Constructors
+
+ CDevInfExtMgmtIf_Test();
+ void ConstructL();
+
+ private:
+ // Setup and teardown
+ void Empty() {};
+ void SetupEmptyL();
+ void SetupOneXNamL();
+ void SetupMultipleXNamL();
+ void Teardown();
+
+ // Test methods
+ void NewLL();
+ void TestEmptyPluginL();
+ void TestOneXNamPluginL();
+ void TestMultipleXNamPluginL();
+
+ // Utilities
+ void PrintExtensions();
+
+ private: // Data
+ CNSmlDevInfExtDataContainerPlugin* iEcomPlugin;
+
+ EUNIT_DECLARE_TEST_TABLE;
+
+ };
+
+#endif // __DEVINFEXTMGMTIF_TEST_H__
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/remotemgmt_plat/syncml_ds_customization_api/tsrc/devinfextmgmtinterface/dllmain.cpp Thu Aug 19 17:35:34 2010 +0530
@@ -0,0 +1,39 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: DllMain file for device info extension management
+* interface unit tests.
+*
+*/
+
+// EXTERNAL INCLUDES
+#include <CEUnitTestSuite.h>
+#include "devinfextmgmtif_test.h"
+
+/**
+* UT_nsmldscontactsdataprovider.dll test suite factory function.
+*/
+EXPORT_C MEUnitTest* CreateTestSuiteL()
+ {
+ CEUnitTestSuite* rootSuite =
+ CEUnitTestSuite::NewLC( _L( "Unit test for DevInfo extension mgmt interface" ) );
+
+ MEUnitTest* extMgmtIfSuite = CDevInfExtMgmtIf_Test::NewL();
+ CleanupStack::PushL( extMgmtIfSuite );
+ rootSuite->AddL( extMgmtIfSuite );
+ CleanupStack::Pop( extMgmtIfSuite );
+
+ CleanupStack::Pop( rootSuite );
+
+ return rootSuite;
+ }
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/remotemgmt_plat/syncml_ds_customization_api/tsrc/exampledevinfextdataplugin/data/exampledevinfextdatacontainerplugin.rss Thu Aug 19 17:35:34 2010 +0530
@@ -0,0 +1,44 @@
+/*
+* 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: Registery info for Device Info Extension Data Container Plugin.
+*/
+
+#include <RegistryInfoV2.rh>
+
+RESOURCE REGISTRY_INFO theRegistryInfo
+ {
+ resource_format_version = RESOURCE_FORMAT_VERSION_2;
+ dll_uid = 0x2002DC7D; // Interface implementation UID
+ interfaces =
+ {
+ INTERFACE_INFO
+ {
+ interface_uid = 0x2002DC7C; // Interface UID
+ implementations =
+ {
+ IMPLEMENTATION_INFO
+ {
+ implementation_uid = 0x2002DC7D; // Interface implementation UID
+ version_no = 1;
+ display_name = "DevInfo extension data plugin";
+ default_data = "";
+ opaque_data = "";
+ rom_only = 1;
+ }
+ };
+ }
+ };
+ }
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/remotemgmt_plat/syncml_ds_customization_api/tsrc/exampledevinfextdataplugin/group/bld.inf Thu Aug 19 17:35:34 2010 +0530
@@ -0,0 +1,21 @@
+/*
+* 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: Device Info Extension Data Container Plugin header file.
+*
+*/
+
+#include <platform_paths.hrh>
+
+PRJ_MMPFILES
+./exampledevinfextdatacontainerplugin.mmp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/remotemgmt_plat/syncml_ds_customization_api/tsrc/exampledevinfextdataplugin/group/def/bwinscwexampledevinfextdatacontainerpluginu.def Thu Aug 19 17:35:34 2010 +0530
@@ -0,0 +1,3 @@
+EXPORTS
+ ?ImplementationGroupProxy@@YAPBUTImplementationProxy@@AAH@Z @ 1 NONAME ; struct TImplementationProxy const * ImplementationGroupProxy(int &)
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/remotemgmt_plat/syncml_ds_customization_api/tsrc/exampledevinfextdataplugin/group/def/eabiexampledevinfextdatacontainerpluginu.def Thu Aug 19 17:35:34 2010 +0530
@@ -0,0 +1,5 @@
+EXPORTS
+ _Z24ImplementationGroupProxyRi @ 1 NONAME
+ _ZTI36CExampleDevInfExtDataContainerPlugin @ 2 NONAME
+ _ZTV36CExampleDevInfExtDataContainerPlugin @ 3 NONAME
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/remotemgmt_plat/syncml_ds_customization_api/tsrc/exampledevinfextdataplugin/group/exampledevinfextdatacontainerplugin.mmp Thu Aug 19 17:35:34 2010 +0530
@@ -0,0 +1,54 @@
+/*
+* 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: Device Info Extension Data Container Plugin header file.
+*
+*/
+
+#include <platform_paths.hrh>
+#include <defaultcaps.hrh>
+#include <data_caging_paths.hrh>
+
+CAPABILITY CAP_ECOM_PLUGIN
+
+TARGET exampledevinfextdatacontainerplugin.dll
+TARGETPATH PLUGINS_1_DIR
+TARGETTYPE PLUGIN
+UID 0x10009D8D 0x2002DC7D
+VENDORID VID_DEFAULT
+
+#if defined(ARMCC)
+DEFFILE ./def/eabiexampledevinfextdatacontainerplugin
+#elif defined(WINSCW)
+DEFFILE ./def/bwinscwexampledevinfextdatacontainerplugin
+#endif
+
+SOURCEPATH ../src
+SOURCE exampledevinfextdatacontainerplugin.cpp
+SOURCE exampledevinfextdatacontainerplugindllmain.cpp
+
+MW_LAYER_SYSTEMINCLUDE
+SYSTEMINCLUDE /epoc32/include/ecom
+
+USERINCLUDE ../inc
+
+SOURCEPATH ../data
+START RESOURCE exampledevinfextdatacontainerplugin.rss
+ HEADER
+ TARGET exampledevinfextdatacontainerplugin.rsc
+ TARGETPATH ECOM_RESOURCE_DIR
+ LANG sc
+END
+
+LIBRARY ecom.lib
+LIBRARY euser.lib
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/remotemgmt_plat/syncml_ds_customization_api/tsrc/exampledevinfextdataplugin/inc/exampledevinfextdatacontainerplugin.h Thu Aug 19 17:35:34 2010 +0530
@@ -0,0 +1,114 @@
+/*
+* 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: Example Device Info Extension Data Container Plugin
+* header file.
+*
+*/
+
+#ifndef __EXAMPLEDEVINFEXTDATACONTAINERPLUGIN_H__
+#define __EXAMPLEDEVINFEXTDATACONTAINERPLUGIN_H__
+
+// EXTERNAL INCLUDES
+#include <nsmldevinfextdatacontainerplugin.h>
+
+// FORWARD DECLARATIONS
+class CDesCArrayFlat;
+
+// CONSTANTS
+const TUint KExampleDevInfExtDataContainerImplUid = 0x2002DC7D;
+const TInt KExtensionElementMaxLength = 50;
+
+// CLASS DEFINITION
+/**
+ * Type definition for TExampleDevInfExtExtensionItem, which holds
+ * the contents for a single extension (i.e. XNam value + 0..N
+ * XVal values). Note that this type is only for testing purposes,
+ * e.g. the maximum length of the XNam/XVal elements is set to
+ * 50 characters.
+ */
+NONSHARABLE_CLASS( TExampleDevInfExtExtensionItem )
+ {
+ public:
+ TBuf8< KExtensionElementMaxLength > iXNam;
+ RArray< TBuf8 < KExtensionElementMaxLength > > iXValArray;
+ };
+
+
+// CLASS DEFINITION
+/**
+ * CExampleDevInfExtDataContainerPlugin is an example plugin,
+ * which implements the CNSmlDevInfExtDataContainerPlugin ECom interface.
+ * The example plugin is primarily used for unit test purposes.
+ * It allows modifying the XNam & XVal entries stored in the plugin,
+ * which in turn makes it possible to test the plugin interface
+ * with different configurations.
+ *
+ * Note that the maximum length for the XNam & XVal is limited to
+ * 50 characters; with longer strings the values become truncated
+ * to 50 characters.
+ */
+class CExampleDevInfExtDataContainerPlugin :
+ public CNSmlDevInfExtDataContainerPlugin
+ {
+
+ public: // Constructor(s) and destructor
+ ~CExampleDevInfExtDataContainerPlugin();
+ CExampleDevInfExtDataContainerPlugin();
+ void ConstructL();
+ static CExampleDevInfExtDataContainerPlugin* NewL();
+
+ public: // From CNSmlDevInfExtDataContainerPlugin
+ TInt GetExtensionCountL();
+ const TDesC8& GetExtNameL( TInt aExtIndex );
+ TInt GetExtValueCountL( TInt aExtIndex );
+ const TDesC8& GetExtValueL( TInt aExtIndex, TInt aValueIndex );
+
+ public: // New methods
+ /**
+ * Removes all extension definitions currently configured
+ * to the plugin. After a call to this method, the extension
+ * count is zero.
+ */
+ void ClearExtensions();
+
+ /**
+ * Inserts a new extension with the given XNam name and XVal value
+ * to the plugin. If there are multiple XVal to be defined per
+ * XNam, this method shall be called multiple times with the same
+ * XNam value.
+ *
+ * @param aXNam XNam value for the extension to be added.
+ * @param aXVal XVal value for the extension to be added.
+ */
+ void InsertExtension( const TDesC8& aXNam, const TDesC8& aXVal );
+
+ /**
+ * Removes the given extensions from the Plugin. If an extension with
+ * the given XNam name is not found, does nothing.
+ *
+ * @param aXNam The XNam value for the extension to be removed.
+ */
+ void RemoveExtension( const TDesC8& aXNam );
+
+ private: // Private utility methods
+ TInt FindExtensionIndex( const TDesC8& aXNam );
+ void AddXValToItem( const TInt aIndex, const TDesC8& aXVal );
+ void AddNewXValItem( const TDesC8& aXNam, const TDesC8& aXVal );
+
+ private: // Data
+ RArray< TExampleDevInfExtExtensionItem > iExtensionArray;
+
+ };
+
+#endif // __EXAMPLEDEVINFEXTDATACONTAINERPLUGIN_H__
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/remotemgmt_plat/syncml_ds_customization_api/tsrc/exampledevinfextdataplugin/src/exampledevinfextdatacontainerplugin.cpp Thu Aug 19 17:35:34 2010 +0530
@@ -0,0 +1,241 @@
+/*
+* 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: Example Device Info Extension Data Container Plugin source file.
+*
+*/
+
+// EXTERNAL INCLUDES
+#include <e32base.h>
+
+// CLASS HEADER
+#include "exampledevinfextdatacontainerplugin.h"
+
+// -----------------------------------------------------------------------------
+// CExampleDevInfExtDataContainerPlugin::CExampleDevInfExtDataContainerPlugin()
+// -----------------------------------------------------------------------------
+CExampleDevInfExtDataContainerPlugin::CExampleDevInfExtDataContainerPlugin()
+ {
+ }
+
+// -----------------------------------------------------------------------------
+// void CExampleDevInfExtDataContainerPlugin::ConstructL()
+// -----------------------------------------------------------------------------
+void CExampleDevInfExtDataContainerPlugin::ConstructL()
+ {
+ }
+
+// -----------------------------------------------------------------------------
+// CExampleDevInfExtDataContainerPlugin* CExampleDevInfExtDataContainerPlugin::NewL()
+// -----------------------------------------------------------------------------
+CExampleDevInfExtDataContainerPlugin* CExampleDevInfExtDataContainerPlugin::NewL()
+ {
+ CExampleDevInfExtDataContainerPlugin* self =
+ new (ELeave) CExampleDevInfExtDataContainerPlugin();
+ CleanupStack::PushL( self );
+ self->ConstructL();
+ CleanupStack::Pop( self );
+ return self;
+ }
+
+// -----------------------------------------------------------------------------
+// CExampleDevInfExtDataContainerPlugin::~CExampleDevInfExtDataContainerPlugin()
+// -----------------------------------------------------------------------------
+CExampleDevInfExtDataContainerPlugin::~CExampleDevInfExtDataContainerPlugin()
+ {
+ for( TInt i = 0; i < iExtensionArray.Count(); i++ )
+ {
+ iExtensionArray[ i ].iXValArray.Close();
+ }
+ iExtensionArray.Close();
+ }
+
+// -----------------------------------------------------------------------------
+// TInt CExampleDevInfExtDataContainerPlugin::GetExtensionCountL()
+// -----------------------------------------------------------------------------
+TInt CExampleDevInfExtDataContainerPlugin::GetExtensionCountL()
+ {
+ return iExtensionArray.Count();
+ }
+
+// -----------------------------------------------------------------------------
+// const TDesC8& CExampleDevInfExtDataContainerPlugin::GetExtNameL()
+// -----------------------------------------------------------------------------
+const TDesC8& CExampleDevInfExtDataContainerPlugin::GetExtNameL( TInt aExtIndex )
+ {
+ if( aExtIndex < 0 || aExtIndex >= iExtensionArray.Count() )
+ {
+ // Illegal index
+ User::Leave( KErrArgument );
+ }
+
+ return iExtensionArray[ aExtIndex ].iXNam;
+ }
+
+// -----------------------------------------------------------------------------
+// TInt CExampleDevInfExtDataContainerPlugin::GetExtValueCountL()
+// -----------------------------------------------------------------------------
+TInt CExampleDevInfExtDataContainerPlugin::GetExtValueCountL( TInt aExtIndex )
+ {
+ if( aExtIndex < 0 || aExtIndex >= iExtensionArray.Count() )
+ {
+ // Illegal index
+ User::Leave( KErrArgument );
+ }
+
+ return iExtensionArray[ aExtIndex ].iXValArray.Count();
+ }
+
+// -----------------------------------------------------------------------------
+// const TDesC8& CExampleDevInfExtDataContainerPlugin::GetExtValueL()
+// -----------------------------------------------------------------------------
+const TDesC8& CExampleDevInfExtDataContainerPlugin::GetExtValueL( TInt aExtIndex,
+ TInt aValueIndex )
+ {
+
+ // Check for illegal indices
+ if( aExtIndex < 0 || aExtIndex >= iExtensionArray.Count() )
+ {
+ User::Leave( KErrArgument );
+ }
+ if( aValueIndex < 0 ||
+ aValueIndex >= iExtensionArray[ aExtIndex ].iXValArray.Count() )
+ {
+ User::Leave( KErrArgument );
+ }
+
+ return iExtensionArray[ aExtIndex ].iXValArray[ aValueIndex ];
+ }
+
+// -----------------------------------------------------------------------------
+// void CExampleDevInfExtDataContainerPlugin::ClearExtensions()
+// -----------------------------------------------------------------------------
+void CExampleDevInfExtDataContainerPlugin::ClearExtensions()
+ {
+ for( TInt i = 0; i < iExtensionArray.Count(); i++ )
+ {
+ iExtensionArray[ i ].iXValArray.Reset();
+ }
+ iExtensionArray.Reset();
+ }
+
+// -----------------------------------------------------------------------------
+// void CExampleDevInfExtDataContainerPlugin::InsertExtension()
+// -----------------------------------------------------------------------------
+void CExampleDevInfExtDataContainerPlugin::InsertExtension(
+ const TDesC8& aXNam, const TDesC8& aXVal )
+ {
+ TInt index = FindExtensionIndex( aXNam );
+ if( index != KErrNotFound )
+ {
+ AddXValToItem( index, aXVal );
+ }
+ else
+ {
+ AddNewXValItem( aXNam, aXVal );
+ }
+ }
+
+// -----------------------------------------------------------------------------
+// void CExampleDevInfExtDataContainerPlugin::RemoveExtension()
+// -----------------------------------------------------------------------------
+void CExampleDevInfExtDataContainerPlugin::RemoveExtension( const TDesC8& aXNam )
+ {
+ TInt index = FindExtensionIndex( aXNam );
+ if( index != KErrNotFound )
+ {
+ iExtensionArray.Remove( index );
+ }
+ }
+
+// -----------------------------------------------------------------------------
+// void CExampleDevInfExtDataContainerPlugin::FindExtensionIndex()
+// -----------------------------------------------------------------------------
+TInt CExampleDevInfExtDataContainerPlugin::FindExtensionIndex(
+ const TDesC8& aXNam )
+ {
+ TInt index = KErrNotFound;
+
+ for( TInt i = 0; i < iExtensionArray.Count(); i++ )
+ {
+ TExampleDevInfExtExtensionItem item = iExtensionArray[ i ];
+ if( aXNam.Compare( item.iXNam ) == 0 )
+ {
+ index = i;
+ break;
+ }
+ }
+ return index;
+ }
+
+// -----------------------------------------------------------------------------
+// void CExampleDevInfExtDataContainerPlugin::AddXValToItem()
+// -----------------------------------------------------------------------------
+void CExampleDevInfExtDataContainerPlugin::AddXValToItem(
+ const TInt aIndex, const TDesC8& aXVal )
+ {
+ ASSERT( aIndex >= 0 );
+ ASSERT( aIndex < iExtensionArray.Count() );
+
+ if( aXVal.Length() == 0 )
+ {
+ // No XVal set, do not insert anything to XVal array
+ return;
+ }
+ else if( aXVal.Length() <= KExtensionElementMaxLength )
+ {
+ iExtensionArray[ aIndex ].iXValArray.Append( aXVal );
+ }
+ else
+ {
+ iExtensionArray[ aIndex ].iXValArray.Append(
+ aXVal.Left( KExtensionElementMaxLength ) );
+ }
+ }
+
+// -----------------------------------------------------------------------------
+// void CExampleDevInfExtDataContainerPlugin::AddNewXValItem()
+// -----------------------------------------------------------------------------
+void CExampleDevInfExtDataContainerPlugin::AddNewXValItem(
+ const TDesC8& aXNam, const TDesC8& aXVal )
+ {
+ TExampleDevInfExtExtensionItem item;
+
+ // Insert XNam
+ if( aXNam.Length() <= KExtensionElementMaxLength )
+ {
+ item.iXNam = aXNam;
+ }
+ else
+ {
+ item.iXNam = aXNam.Left( KExtensionElementMaxLength );
+ }
+
+ // Insert XVal
+ if( aXVal.Length() > 0 )
+ {
+ if( aXVal.Length() <= KExtensionElementMaxLength )
+ {
+ item.iXValArray.Append( aXVal );
+ }
+ else
+ {
+ item.iXValArray.Append( aXVal.Left( KExtensionElementMaxLength ) );
+ }
+ }
+
+ // Add to extension array as a new entry
+ iExtensionArray.Append( item );
+ }
+
+// End of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/remotemgmt_plat/syncml_ds_customization_api/tsrc/exampledevinfextdataplugin/src/exampledevinfextdatacontainerplugindllmain.cpp Thu Aug 19 17:35:34 2010 +0530
@@ -0,0 +1,49 @@
+/*
+* 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: Example Device Info Extension Data Container Plugin
+* implementation group proxy definitions.
+*
+*/
+
+// EXTERNAL INCLUDES
+#include <ImplementationProxy.h>
+
+// INTERNAL INCLUDES
+#include "exampledevinfextdatacontainerplugin.h"
+
+// -----------------------------------------------------------------------------
+// ImplementationGroupProxy array
+// -----------------------------------------------------------------------------
+//
+#ifndef IMPLEMENTATION_PROXY_ENTRY
+#define IMPLEMENTATION_PROXY_ENTRY( aUid, aFuncPtr ) {{aUid},(aFuncPtr)}
+#endif
+
+const TImplementationProxy ImplementationTable[] =
+ {
+ IMPLEMENTATION_PROXY_ENTRY( KExampleDevInfExtDataContainerImplUid,
+ CExampleDevInfExtDataContainerPlugin::NewL )
+ };
+
+// -----------------------------------------------------------------------------
+// ImplementationGroupProxy
+// -----------------------------------------------------------------------------
+//
+EXPORT_C const TImplementationProxy* ImplementationGroupProxy( TInt& aTableCount )
+ {
+ aTableCount = sizeof( ImplementationTable ) / sizeof( TImplementationProxy );
+ return ImplementationTable;
+ }
+
+// End of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/remotemgmt_plat/syncml_ds_customization_api/tsrc/operatorsettings/bld.inf Thu Aug 19 17:35:34 2010 +0530
@@ -0,0 +1,24 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Build info file for DS operator settings unit tests.
+*
+*/
+
+//#include <platform_paths.hrh>
+
+PRJ_MMPFILES
+UT_nsmldsoperatorsettings.mmp
+
+PRJ_EXPORTS
+testdata/2001E2E1.txt /epoc32/release/winscw/udeb/z/private/10202be9/2001E2E1.txt
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/remotemgmt_plat/syncml_ds_customization_api/tsrc/operatorsettings/def/bwinscwdsoperatorsettings_testu.def Thu Aug 19 17:35:34 2010 +0530
@@ -0,0 +1,3 @@
+EXPORTS
+ ?CreateTestSuiteL@@YAPAVMEUnitTest@@XZ @ 1 NONAME ; class MEUnitTest * CreateTestSuiteL(void)
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/remotemgmt_plat/syncml_ds_customization_api/tsrc/operatorsettings/def/eabidsoperatorsettings_testu.def Thu Aug 19 17:35:34 2010 +0530
@@ -0,0 +1,3 @@
+EXPORTS
+ _Z16CreateTestSuiteLv @ 1 NONAME
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/remotemgmt_plat/syncml_ds_customization_api/tsrc/operatorsettings/dllmain.cpp Thu Aug 19 17:35:34 2010 +0530
@@ -0,0 +1,41 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: DllMain file for operator settings unit tests.
+*
+*/
+
+// INCLUDES
+#include <CEUnitTestSuite.h>
+#include "nsmldsoperatorsettings_test.h"
+#include <nsmldebug.h>
+/**
+* ut_nsmldsoperatorsettings.dll test suite factory function.
+*/
+EXPORT_C MEUnitTest* CreateTestSuiteL()
+ {
+ _DBG_FILE(_S8("CreateTestSuiteL : Begin"));
+ CEUnitTestSuite* rootSuite =
+ CEUnitTestSuite::NewLC( _L( "Unit test for operator settings" ) );
+
+ // Unit tests for operator settings class (CNSmlDSOperatorSettings)
+ MEUnitTest* settingsSuite = CNSmlDSOperatorSettings_Test::NewL();
+ CleanupStack::PushL( settingsSuite );
+ rootSuite->AddL( settingsSuite );
+ CleanupStack::Pop( settingsSuite );
+
+ CleanupStack::Pop( rootSuite );
+
+ _DBG_FILE(_S8("CreateTestSuiteL : Begin"));
+ return rootSuite;
+ }
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/remotemgmt_plat/syncml_ds_customization_api/tsrc/operatorsettings/nsmldsoperatorsettings_test.cpp Thu Aug 19 17:35:34 2010 +0530
@@ -0,0 +1,206 @@
+/*
+* 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: Operator settings unit tests
+*
+*/
+
+// INTERNAL INCLUDES
+#include "nsmldsoperatorsettings_test.h"
+
+// EXTERNAL INCLUDES
+#include <NSmlDSOperatorSettings.h>
+#include <EUnitMacros.h>
+#include <centralrepository.h> //CRepository
+#include <nsmloperatordatacrkeys.h> // KCRUidOperatorDatasyncInternalKeys
+
+// CONSTANTS
+
+// - Construction -----------------------------------------------------------
+
+CNSmlDSOperatorSettings_Test* CNSmlDSOperatorSettings_Test::NewL()
+ {
+ CNSmlDSOperatorSettings_Test* self = CNSmlDSOperatorSettings_Test::NewLC();
+ CleanupStack::Pop( self );
+ return self;
+ }
+
+CNSmlDSOperatorSettings_Test* CNSmlDSOperatorSettings_Test::NewLC()
+ {
+ CNSmlDSOperatorSettings_Test* self = new( ELeave ) CNSmlDSOperatorSettings_Test();
+ CleanupStack::PushL( self );
+ self->ConstructL();
+ return self;
+ }
+
+CNSmlDSOperatorSettings_Test::~CNSmlDSOperatorSettings_Test()
+ {
+
+ }
+
+CNSmlDSOperatorSettings_Test::CNSmlDSOperatorSettings_Test()
+ {
+
+ }
+
+void CNSmlDSOperatorSettings_Test::ConstructL()
+ {
+ CEUnitTestSuiteClass::ConstructL();
+ CRepository* rep = CRepository::NewL( KCRUidOperatorDatasyncInternalKeys );
+ rep->Reset();
+ delete rep;
+ }
+
+// - Setup & teardown ---------------------------------------------------------
+
+// ++++++++++++ SETUP METHODS ++++++++++++
+
+void CNSmlDSOperatorSettings_Test::SetupL()
+ {
+ iOperatorSettings = CNSmlDSOperatorSettings::NewL();
+ }
+
+//// ++++++++++++ TEARDOWN METHODS ++++++++++++
+//
+void CNSmlDSOperatorSettings_Test::Teardown()
+ {
+ delete iOperatorSettings;
+ iOperatorSettings = NULL;
+ }
+
+// - Test methods -------------------------------------------------------------
+
+// MEMORY ALLOCATION FOR DATASTORE
+void CNSmlDSOperatorSettings_Test::NewLL()
+ {
+ CNSmlDSOperatorSettings* settings = NULL;
+ EUNIT_ASSERT_NO_LEAVE( settings = CNSmlDSOperatorSettings::NewL() );
+ EUNIT_ASSERT( settings );
+ delete settings;
+ }
+
+void CNSmlDSOperatorSettings_Test::IsOperatorProfileLL()
+ {
+ EUNIT_ASSERT( iOperatorSettings->IsOperatorProfileL( _L("www.test.com") ) )
+ EUNIT_ASSERT( !iOperatorSettings->IsOperatorProfileL( _L("www.test2.com") ) )
+ }
+
+void CNSmlDSOperatorSettings_Test::CustomSwvValueLCL()
+ {
+ HBufC8* swv( NULL );
+ swv = iOperatorSettings->CustomSwvValueLC();
+ EUNIT_PRINT( *swv );
+ if( swv->Compare( _L8("1.0") ) != 0 )
+ {
+ EUNIT_FAIL_TEST( "Wrong software value" );
+ }
+ CleanupStack::PopAndDestroy( swv );
+ }
+
+void CNSmlDSOperatorSettings_Test::CustomModValueLCL()
+ {
+ HBufC8* model( NULL );
+ model = iOperatorSettings->CustomModValueLC();
+ EUNIT_PRINT( *model );
+ if( model->Compare( _L8("Mod") ) != 0 )
+ {
+ EUNIT_FAIL_TEST( "Wrong model value" );
+ }
+ CleanupStack::PopAndDestroy( model );
+ }
+
+void CNSmlDSOperatorSettings_Test::CustomManValueLCL()
+ {
+ HBufC8* manufacturer( NULL );
+ manufacturer = iOperatorSettings->CustomManValueLC();
+ EUNIT_PRINT( *manufacturer );
+ if( manufacturer->Compare( _L8("Nokia") ) != 0 )
+ {
+ EUNIT_FAIL_TEST( "Wrong manufacturer value" );
+ }
+ CleanupStack::PopAndDestroy( manufacturer );
+ }
+
+
+void CNSmlDSOperatorSettings_Test::PopulateStatusCodeListLL()
+ {
+ RArray< TInt > statusCodeArray;
+ iOperatorSettings->PopulateStatusCodeListL( statusCodeArray );
+ for( TInt i = 0; i < statusCodeArray.Count(); i++ )
+ {
+ TBuf<10> code;
+ TInt j = statusCodeArray[ i ];
+ code.AppendNum( j );
+ EUNIT_PRINT( code );
+ }
+
+ EUNIT_ASSERT( statusCodeArray[ 0 ] == 211 );
+ EUNIT_ASSERT( statusCodeArray[ 1 ] == 400 );
+ EUNIT_ASSERT( statusCodeArray[ 2 ] == 401 );
+ EUNIT_ASSERT( !( statusCodeArray[ 3 ] == 401 ) );
+
+ statusCodeArray.Close();
+ }
+
+// - EUnit test table -------------------------------------------------------
+
+EUNIT_BEGIN_TEST_TABLE(
+ CNSmlDSOperatorSettings_Test,
+ "Unit test for operator settings",
+ "UNIT" )
+
+EUNIT_TEST(
+ "Test to verify memory allocation for the object",
+ "CNSmlDSOperatorSettings",
+ "NewL",
+ "FUNCTIONALITY",
+ Empty, NewLL, Empty)
+
+EUNIT_TEST(
+ "Test to if profile is operator profile",
+ "CNSmlDSOperatorSettings",
+ "IsOperatorProfileL",
+ "FUNCTIONALITY",
+ SetupL, IsOperatorProfileLL, Teardown )
+
+EUNIT_TEST(
+ "Test to verify Swv value",
+ "CNSmlDSOperatorSettings",
+ "CustomSwvValueLC",
+ "FUNCTIONALITY",
+ SetupL, CustomSwvValueLCL, Teardown )
+
+EUNIT_TEST(
+ "Test to verify Model value",
+ "CNSmlDSOperatorSettings",
+ "CustomModValueLC",
+ "FUNCTIONALITY",
+ SetupL, CustomModValueLCL, Teardown )
+
+EUNIT_TEST(
+ "Test to verify Manufacture value",
+ "CNSmlDSOperatorSettings",
+ "CustomManValueLC",
+ "FUNCTIONALITY",
+ SetupL, CustomManValueLCL, Teardown )
+
+EUNIT_TEST(
+ "Test to verify status code values",
+ "CNSmlDSOperatorSettings",
+ "PopulateStatusCodeListL",
+ "FUNCTIONALITY",
+ SetupL, PopulateStatusCodeListLL, Teardown )
+
+EUNIT_END_TEST_TABLE
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/remotemgmt_plat/syncml_ds_customization_api/tsrc/operatorsettings/nsmldsoperatorsettings_test.h Thu Aug 19 17:35:34 2010 +0530
@@ -0,0 +1,69 @@
+/*
+* 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: Header file for operator settings unit tests.
+*
+*/
+
+#ifndef __NSMLDSOPERATORSETTINGS_TEST_H
+#define __NSMLDSOPERATORSETTINGS_TEST_H
+
+// INCLUDES
+#include <CEUnitTestSuiteClass.h>
+#include <EUnitDecorators.h>
+
+// FORWARD DECLARATIONS
+class CNSmlDSOperatorSettings;
+
+NONSHARABLE_CLASS( CNSmlDSOperatorSettings_Test ): public CEUnitTestSuiteClass
+ {
+ public:
+ static CNSmlDSOperatorSettings_Test* NewL();
+ static CNSmlDSOperatorSettings_Test* NewLC();
+ ~CNSmlDSOperatorSettings_Test();
+
+ private: // Constructors
+
+ CNSmlDSOperatorSettings_Test();
+ void ConstructL();
+
+ private: // New methods
+
+ void Empty() {};
+
+ void SetupL();
+
+ void Teardown();
+
+ void NewLL();
+
+ void IsOperatorProfileLL();
+
+ void CustomSwvValueLCL();
+
+ void CustomModValueLCL();
+
+ void CustomManValueLCL();
+
+ void PopulateStatusCodeListLL();
+
+ private: // data
+
+ CNSmlDSOperatorSettings* iOperatorSettings;
+
+ EUNIT_DECLARE_TEST_TABLE;
+ };
+
+#endif // __NSMLDSOPERATORSETTINGS_TEST_H
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/remotemgmt_plat/syncml_ds_customization_api/tsrc/operatorsettings/readme.txt Thu Aug 19 17:35:34 2010 +0530
@@ -0,0 +1,7 @@
+WARNING
+
+- Central repository file 2001E2E1.txt is copied from forder operatorsettings\testdata to
+ epoc32\release\winscw\udeb\z\private\10202be9 that we can test return values of CNSmlDSOperatorSettings API
+
+- After running module unit tests, user must replace test central repository file 2001E2E1.txt with
+ right platform Central repository file, otherwise emulator might not work correctly.
Binary file remotemgmt_plat/syncml_ds_customization_api/tsrc/operatorsettings/testdata/2001E2E1.txt has changed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/remotemgmt_plat/syncml_ds_customization_api/tsrc/operatorsettings/ut_nsmldsoperatorsettings.mmp Thu Aug 19 17:35:34 2010 +0530
@@ -0,0 +1,68 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: MMP file for operator settings unit tests.
+*
+*/
+
+#include <Digia/Eunit/EUnitCaps.h>
+#include <platform_paths.hrh>
+#include <defaultcaps.hrh>
+#include <data_caging_paths.hrh>
+
+// DEFINES
+MACRO __NSML_MODULETEST__
+
+// Build target
+TARGET ut_nsmldsoperatorsettings.dll
+TARGETTYPE dll
+UID 0x1000af5a 0x01700000
+
+CAPABILITY EUNIT_CAPS
+VENDORID 0x00000000
+
+#if defined(ARMCC)
+DEFFILE ./def/eabidsoperatorsettings_test
+#elif defined(WINSCW)
+DEFFILE ./def/bwinscwdsoperatorsettings_test
+#endif
+
+// Source files
+SOURCEPATH .
+SOURCE dllmain.cpp
+SOURCE nsmldsoperatorsettings_test.cpp
+
+// Code under test
+//SOURCEPATH ../../../../syncmlfw/ds/settings/src
+//SOURCE NSmlDSOperatorSettings.cpp
+
+// Include paths
+USERINCLUDE . ../../../../syncmlfw/ds/settings/inc
+
+APP_LAYER_SYSTEMINCLUDE
+SYSTEMINCLUDE /epoc32/include/ecom
+SYSTEMINCLUDE /epoc32/include/syncml
+SYSTEMINCLUDE /epoc32/include/internal
+SYSTEMINCLUDE /epoc32/include/Digia/EUnit
+
+// Dependencies to system components
+LIBRARY euser.lib
+LIBRARY EUnit.lib
+LIBRARY bafl.lib
+LIBRARY nsmldssettings.lib
+LIBRARY efsrv.lib
+LIBRARY cntmodel.lib
+LIBRARY estor.lib
+LIBRARY nsmldebug.lib
+LIBRARY centralrepository.lib
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/remotemgmt_plat/syncml_ds_customization_api/tsrc/synchconfigvalidator/customdatasynchconfigvalidator.cpp Thu Aug 19 17:35:34 2010 +0530
@@ -0,0 +1,240 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+// CLASS HEADER
+#include "customdatasynchconfigvalidator.h"
+
+// INTERNAL INCLUDES
+#include "customdatasynchconfigvalidatorenginewrapper.h"
+
+// EXTERNAL INCLUDES
+#include <qmessagebox.h>
+#include <qgraphicseffect.h>
+#include <qlabel.h>
+
+const int TESTNAMECOLUMN = 0;
+const int RESULTCOLUMN = 1;
+const int MOREINFOCOLUMN = 2;
+const QString MOREINFO_SYMBOL = "!";
+const QString MOREINFO_VERIFY_BY_USER_SYMBOL = "?";
+const QString NOK_SYMBOL = "NOK";
+const QString OK_SYMBOL = "OK";
+
+// ----------------------------------------------------------------------------
+void CustomDataSynchConfigValidator::Initialize()
+{
+ //TODO: cleanup QTableWidgetItem settings and harmonize layout for columns
+ QFont font;
+ font.setPointSize(4);
+ ui.buttonTestActivator->setFont(font);
+ for (int r = 0; r < ui.tableWidget->rowCount(); r++) {
+ for (int c = 0; c < ui.tableWidget->columnCount(); c++) {
+ ui.tableWidget->item(r, c)->setFlags(ui.tableWidget->item(r, c)->flags()
+ & ~Qt::ItemIsEditable);
+ ui.tableWidget->item(r, c)->setFont(font);
+ }
+ }
+ //Split columns widths for first time
+ const int descriptionColumnInitialWidth = 260;
+ ui.tableWidget->setColumnWidth(TESTNAMECOLUMN, descriptionColumnInitialWidth);
+ ui.tableWidget->resizeColumnToContents(RESULTCOLUMN);
+ ui.tableWidget->resizeColumnToContents(MOREINFOCOLUMN);
+}
+
+// ----------------------------------------------------------------------------
+CustomDataSynchConfigValidator::CustomDataSynchConfigValidator(QWidget *parent) :
+ QMainWindow(parent)
+{
+ ui.setupUi(this);
+ Initialize();
+
+ mEngineWrapper = new CustomDataSynchConfigValidatorEngineWrapper(this);
+
+ bool connectSucceeded;
+ connectSucceeded = QObject::connect(ui.buttonTestActivator, SIGNAL(clicked()), this,
+ SLOT(activateValidation()));
+ connectSucceeded = QObject::connect(ui.tableWidget, SIGNAL(itemClicked(QTableWidgetItem *)),
+ this, SLOT(handleMoreInfoItemsClicks(QTableWidgetItem *)));
+}
+
+// ----------------------------------------------------------------------------
+void CustomDataSynchConfigValidator::resizeEvent(QResizeEvent* event)
+{
+ //TODO: in basic QT how to detect landscape vs portrait
+ if (ui.tableWidget && ui.tableWidget->isVisible()) {
+ ui.tableWidget->resizeColumnToContents(RESULTCOLUMN);//result column
+ ui.tableWidget->resizeColumnToContents(MOREINFOCOLUMN);//info column
+ }
+ QMainWindow::resizeEvent(event);
+}
+
+// ----------------------------------------------------------------------------
+CustomDataSynchConfigValidator::~CustomDataSynchConfigValidator()
+{
+}
+
+// ----------------------------------------------------------------------------
+void CustomDataSynchConfigValidator::activateValidation()
+{
+ bool cenrepCheck;
+ for (int r = 0; r < ui.tableWidget->rowCount(); r++) {
+ if (matchCheckNameWithTableRowIdAndString(r, "OperatorDataSynchErrorCenrepExistsTest")) {
+ cenrepCheck = mEngineWrapper->operatordataSynchErrorCenrepExists();
+ ui.tableWidget->item(r, RESULTCOLUMN)->setText(cenrepCheck ? OK_SYMBOL : NOK_SYMBOL);
+ ui.tableWidget->item(r, MOREINFOCOLUMN)->setText(cenrepCheck ? "" : MOREINFO_SYMBOL);
+ }
+ else if (matchCheckNameWithTableRowIdAndString(r, "OperatorDataSynchCenrepExistsTest")) {
+ cenrepCheck = mEngineWrapper->operatordataSynchCenrepExists();
+ ui.tableWidget->item(r, RESULTCOLUMN)->setText(cenrepCheck ? OK_SYMBOL : NOK_SYMBOL);
+ ui.tableWidget->item(r, MOREINFOCOLUMN)->setText(cenrepCheck ? "" : MOREINFO_SYMBOL);
+ }
+ else if (matchCheckNameWithTableRowIdAndString(r, "DataSynchCenrepExistsTest")) {
+ cenrepCheck = mEngineWrapper->dataSynchCenrepExists();
+ ui.tableWidget->item(r, RESULTCOLUMN)->setText(cenrepCheck ? OK_SYMBOL : NOK_SYMBOL);
+ ui.tableWidget->item(r, MOREINFOCOLUMN)->setText(cenrepCheck ? "" : MOREINFO_SYMBOL);
+ }
+ else if (matchCheckNameWithTableRowIdAndString(r, "CustomProfilesTest")) {
+ cenrepCheck = mEngineWrapper->customSynchProfilesAllowed();
+ ui.tableWidget->item(r, RESULTCOLUMN)->setText(cenrepCheck ? OK_SYMBOL : NOK_SYMBOL);
+ ui.tableWidget->item(r, MOREINFOCOLUMN)->setText(cenrepCheck ? "" : MOREINFO_SYMBOL);
+ }
+ else if (matchCheckNameWithTableRowIdAndString(r, "ContactsAdapterAvailabilityTest")) {
+ bool adapterCheck = mEngineWrapper->configuredContactsAdapterExists(
+ mContactsAdapterAvailabilityTestErrorNote);
+ ui.tableWidget->item(r, RESULTCOLUMN)->setText(adapterCheck ? OK_SYMBOL : NOK_SYMBOL);
+ ui.tableWidget->item(r, MOREINFOCOLUMN)->setText(adapterCheck ? "" : MOREINFO_SYMBOL);
+ }
+ else if (matchCheckNameWithTableRowIdAndString(r, "CustomSynchProfileServerIdTest")) {
+ cenrepCheck = mEngineWrapper->configuredCustomSynchProfileExists(mCustomSynchProfileServerIdTestErrorNote);
+ ui.tableWidget->item(r, RESULTCOLUMN)->setText(cenrepCheck ? OK_SYMBOL : NOK_SYMBOL);
+ ui.tableWidget->item(r, MOREINFOCOLUMN)->setText(cenrepCheck ? "" : MOREINFO_SYMBOL);
+ }
+ else if (matchCheckNameWithTableRowIdAndString(r, "ContactsAdapterSynchProfileTest")) {
+ cenrepCheck = mEngineWrapper->contactAdapterCenrepValueToProfileMatches(mContactsAdapterSynchProfileTestErrorNote);
+ ui.tableWidget->item(r, RESULTCOLUMN)->setText(cenrepCheck ? OK_SYMBOL : NOK_SYMBOL);
+ ui.tableWidget->item(r, MOREINFOCOLUMN)->setText(cenrepCheck ? "" : MOREINFO_SYMBOL);
+ }
+ else if (matchCheckNameWithTableRowIdAndString(r, "MyprofileAdapterSynchProfileTest")) {
+ cenrepCheck = mEngineWrapper->myprofileAdapterCenrepValueToProfileMatches(mMyprofileAdapterSynchProfileTestErrorNote);
+ ui.tableWidget->item(r, RESULTCOLUMN)->setText(cenrepCheck ? OK_SYMBOL : "VERIFY");
+ ui.tableWidget->item(r, MOREINFOCOLUMN)->setText(cenrepCheck ? "" : MOREINFO_VERIFY_BY_USER_SYMBOL);
+ }
+ // Check if Device info extension plugin exists
+ else if (matchCheckNameWithTableRowIdAndString(r, "DeviceInfoExtensionPluginTest"))
+ {
+ bool devInfoExtCheck = mEngineWrapper->devInfoExtensionPluginAvailable();
+ ui.tableWidget->item(r, RESULTCOLUMN)->setText(
+ devInfoExtCheck ? OK_SYMBOL : "VERIFY");
+ ui.tableWidget->item(r, MOREINFOCOLUMN)->setText(
+ devInfoExtCheck ? "" : MOREINFO_VERIFY_BY_USER_SYMBOL);
+ }
+ else {
+ continue;
+ }
+ }
+}
+
+// ----------------------------------------------------------------------------
+void CustomDataSynchConfigValidator::handleMoreInfoItemsClicks(
+ QTableWidgetItem *itemClicked)
+{
+ if ((0 == itemClicked->text().compare(MOREINFO_SYMBOL))||(0 == itemClicked->text().compare(MOREINFO_VERIFY_BY_USER_SYMBOL))) {
+ //user wants to have some info,
+ //and possible hint regarding how to solve NOK case
+ int r = itemClicked->row();
+
+ QScopedPointer<QMessageBox> msgBox(new QMessageBox());
+ msgBox->setWindowTitle(ui.tableWidget->verticalHeaderItem(r)->text());
+
+ if (matchCheckNameWithTableRowIdAndString(r, "OperatorDataSynchErrorCenrepExistsTest")) {
+ QString
+ line1 =
+ "OperatorDataSynchErrorCenrep ini file z:\\private\\10202be9\\2001FDF1.txt was not found from image";
+ QString line2 = "\n\nCheck image creation \\output subfolder for the cenrep ini file.";
+ QString line3 =
+ "\n\nCheck also that .\\s60\\root.confml that operatordatasyncerror.confml is included.";
+ msgBox->setText(line1 + line2 + line3);
+ }
+ else if (matchCheckNameWithTableRowIdAndString(r, "OperatorDataSynchCenrepExistsTest")) {
+ QString line1 =
+ "OperatorDataSynchCenrep ini file z:\\private\\10202be9\\2001E2E1.txt was not found from image";
+ QString line2 = "\n\nCheck image creation \\output subfolder for the cenrep ini file.";
+ QString line3 =
+ "\n\nCheck also that .\\s60\\root.confml that operatordatasyncerror.confml is included.";
+ msgBox->setText(line1 + line2 + line3);
+ }
+ else if (matchCheckNameWithTableRowIdAndString(r, "DataSynchCenrepExistsTest")) {
+ QString line1 =
+ "DataSynchCenrep ini file z:\\private\\10202be9\\2000CF7E.txt was not found from image";
+ QString line2 = "\n\nCheck image creation \\output subfolder for the cenrep ini file.";
+ QString line3 =
+ "\n\nCheck also that .\\s60\\root.confml that operatordatasyncerror.confml is included.";
+ msgBox->setText(line1 + line2 + line3);
+ }
+ else if (matchCheckNameWithTableRowIdAndString(r, "CustomProfilesTest")) {
+ QString line1 =
+ "Support for custom synch profiles defined using z:\\private\\101F99FB\\variantdata.xml is (0) now disabled in cenrep.";
+ QString
+ line2 =
+ "\n\nCheck that variant.confml has KCRUidDataSyncInternalKeys cenrep key KNsmlDsCustomProfiles set to 1.";
+ QString
+ line3 =
+ "\n\nCheck also that DataSynchCenrep ini file z:\\private\\10202be9\\2000CF7E.txt exists in image, see check above.";
+ msgBox->setText(line1 + line2 + line3);
+ }
+ else if (matchCheckNameWithTableRowIdAndString(r, "ContactsAdapterAvailabilityTest")) {
+ QString line1 = "Configured contact adapter does not exist.";
+ QString line2 = "\n\n" + mContactsAdapterAvailabilityTestErrorNote;
+ QString line3 = "\n\n";
+ msgBox->setText(line1 + line2 + line3);
+ }
+ else if (matchCheckNameWithTableRowIdAndString(r, "CustomSynchProfileServerIdTest")) {
+ QString line1 = "ServerId match failed."+mCustomSynchProfileServerIdTestErrorNote;
+ QString line2 =
+ "\n\noperator datasync cenrep z:\\private\\10202be9\\2001E2E1.txt and synch profile was not found.";
+ QString line3 = "\n\nCheck variantdata.xml also.";
+ msgBox->setText(line1 + line2 + line3);
+ }
+ else if (matchCheckNameWithTableRowIdAndString(r, "ContactsAdapterSynchProfileTest")) {
+ QString errorMsg = mContactsAdapterSynchProfileTestErrorNote;
+ msgBox->setText(errorMsg);
+ }
+ else if (matchCheckNameWithTableRowIdAndString(r, "MyprofileAdapterSynchProfileTest")) {
+ QString errorMsg = mMyprofileAdapterSynchProfileTestErrorNote;
+ msgBox->setText(errorMsg);
+ }
+ // DevInfo extension error note
+ else if (matchCheckNameWithTableRowIdAndString(r, "DeviceInfoExtensionPluginTest")) {
+ msgBox->setText("DevInfo extension plugin not found.");
+ }
+ QGraphicsOpacityEffect* effect = new QGraphicsOpacityEffect();
+ effect->setOpacity(0.85);
+ msgBox->setGraphicsEffect(effect);
+ msgBox->exec();
+ }
+}
+
+// ----------------------------------------------------------------------------
+bool CustomDataSynchConfigValidator::matchCheckNameWithTableRowIdAndString(
+ int row, QString matchString)
+{
+ bool match = ui.tableWidget->verticalHeaderItem(row)->text().compare(matchString) == 0 ? true
+ : false;
+ return match;
+}
+
+// End of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/remotemgmt_plat/syncml_ds_customization_api/tsrc/synchconfigvalidator/customdatasynchconfigvalidator.h Thu Aug 19 17:35:34 2010 +0530
@@ -0,0 +1,55 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#ifndef CUSTOMDATASYNCHCONFIGVALIDATOR_H
+#define CUSTOMDATASYNCHCONFIGVALIDATOR_H
+
+#include <QtGui/QMainWindow>
+#include "ui_synchconfigvalidator.h"
+
+// FORWARD DECLARATIONS
+class CustomDataSynchConfigValidatorEngineWrapper;
+
+class CustomDataSynchConfigValidator : public QMainWindow
+{
+ Q_OBJECT
+
+public:
+ CustomDataSynchConfigValidator(QWidget *parent = 0);
+ ~CustomDataSynchConfigValidator();
+
+protected:
+ void resizeEvent (QResizeEvent* event);
+
+private:
+ Ui::CustomDataSynchConfigValidator ui;
+ void Initialize();
+ bool matchCheckNameWithTableRowIdAndString(int row, QString matchString);
+
+public Q_SLOTS:
+ void activateValidation();
+ void handleMoreInfoItemsClicks(QTableWidgetItem *itemClicked);
+
+private:
+ CustomDataSynchConfigValidatorEngineWrapper *mEngineWrapper;
+ QString mContactsAdapterAvailabilityTestErrorNote;
+ QString mCustomSynchProfileServerIdTestErrorNote;
+ QString mContactsAdapterSynchProfileTestErrorNote;
+ QString mMyprofileAdapterSynchProfileTestErrorNote;
+};
+
+#endif // CUSTOMDATASYNCHCONFIGVALIDATOR_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/remotemgmt_plat/syncml_ds_customization_api/tsrc/synchconfigvalidator/customdatasynchconfigvalidatorengine_p.cpp Thu Aug 19 17:35:34 2010 +0530
@@ -0,0 +1,463 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+// CLASS HEADER
+#include "customdatasynchconfigvalidatorengine_p.h"
+
+// INTERNAL INCLUDES
+#include "customdatasynchconfigvalidatorenginewrapper.h"
+#include "customdatasynchdeviceinfo.h"
+
+// EXTERNAL INCLUDES
+#include <etel3rdparty.h>
+#include <sysutil.h>
+#include <centralrepository.h>
+#include <ecom/ecom.h>
+#include <e32def.h>
+#include <utf.h>
+#include <nsmloperatordatacrkeys.h>
+#include <nsmloperatorerrorcrkeys.h>
+#include <syncmlclientds.h>
+
+#include <d32dbms.h>
+#include <f32file.h>
+
+const TUid KCRUidDatasyncKeys = { 0x2000CF7E };
+const TUint32 KDataSynchCustomProfileKey = 0x0;
+const QString SERVERID_DB_COLUMN_NAME = "ServerId";
+const QString PROFILEID_DB_COLUMN_NAME = "Id";
+
+// Utility clean up function
+void CleanupEComArray(TAny* aArray);
+
+// ----------------------------------------------------------------------------
+CustomDataSynchConfigValidatorEngine::CustomDataSynchConfigValidatorEngine(
+ CustomDataSynchConfigValidatorEngineWrapper *parent) :
+ q(parent)
+{
+}
+
+// ----------------------------------------------------------------------------
+CustomDataSynchConfigValidatorEngine::~CustomDataSynchConfigValidatorEngine()
+{
+}
+
+// ----------------------------------------------------------------------------
+bool CustomDataSynchConfigValidatorEngine::dataSynchCenrepExists()
+{
+ int initError = KErrGeneral;
+ TRAP(initError,
+ CRepository* dataSynchCenrep = CRepository::NewL(KCRUidDatasyncKeys);
+ delete dataSynchCenrep;
+ )
+ return (initError == KErrNone ? true : false);
+}
+
+// ----------------------------------------------------------------------------
+bool CustomDataSynchConfigValidatorEngine::operatordataSynchCenrepExists()
+{
+ int initError = KErrGeneral;
+ TRAP(initError,
+ CRepository* operatordataSynchCenrep = CRepository::NewL(KCRUidOperatorDatasyncInternalKeys);
+ delete operatordataSynchCenrep;
+ )
+ return (initError == KErrNone ? true : false);
+}
+
+// ----------------------------------------------------------------------------
+bool CustomDataSynchConfigValidatorEngine::operatordataSynchErrorCenrepExists()
+{
+ int initError = KErrGeneral;
+ TRAP(initError,
+ CRepository* operatordataSynchErrorCenrep = CRepository::NewL(KCRUidOperatorDatasyncErrorKeys);
+ delete operatordataSynchErrorCenrep;
+ )
+ return (initError == KErrNone ? true : false);
+}
+
+// ----------------------------------------------------------------------------
+bool CustomDataSynchConfigValidatorEngine::customSynchProfilesAllowed()
+{
+ int initError = KErrGeneral;//CRepository::Get or CRepository::NewL
+ int customProfileKeyValue = 0;//value 1 means allowed
+ TRAP(initError,
+ CRepository* dataSynchCenrep = CRepository::NewL(KCRUidDatasyncKeys);
+ initError = dataSynchCenrep->Get(KDataSynchCustomProfileKey,customProfileKeyValue);
+ delete dataSynchCenrep;
+ )
+ return (initError == KErrNone && customProfileKeyValue == 1 ? true : false);
+}
+
+// ----------------------------------------------------------------------------
+bool CustomDataSynchConfigValidatorEngine::configuredContactsAdapterExists(
+ QString & errorMsg)
+{
+ int initError = KErrGeneral;//CRepository::Get or CRepository::NewL
+ int pluginloadError = KErrGeneral;
+
+ TUid adapterUid = {0x101F6DDD};//platformcontactadapter Uid
+
+ TRAP(initError,
+ CRepository* operatordataSynchCenrep = CRepository::NewL(KCRUidOperatorDatasyncInternalKeys);
+ int adapterUidInt = 0;
+ int errorCode = operatordataSynchCenrep->Get(KNsmlOpDsOperatorAdapterUid,adapterUidInt);
+ delete operatordataSynchCenrep;
+ if( adapterUidInt > 0 )
+ {//if greater than 0 custom contact adapter is 'likely' to be used
+ adapterUid = TUid::Uid(adapterUidInt);
+ }
+ )
+ TRAP(pluginloadError,
+ TAny* any = REComSession::CreateImplementationL(adapterUid, _FOFF(CustomDataSynchConfigValidatorEngine, iEComDtorKey));
+ REComSession::DestroyedImplementation(iEComDtorKey);
+ )
+ bool success = (initError == KErrNone && pluginloadError == KErrNone) ? true : false;
+ if(!success)
+ {
+ errorMsg = "Problems loading adapter UID: 0x";
+ errorMsg = errorMsg+QString::number(adapterUid.iUid,16).toUpper();
+ }
+
+ return success;
+}
+
+// ----------------------------------------------------------------------------
+bool CustomDataSynchConfigValidatorEngine::configuredCustomSynchProfileExists(QString & errorMsg)
+{
+ int cenrepError = KErrGeneral;//CRepository::Get or CRepository::NewL
+ bool serverIdmatchFound = false;
+ bool dbOk = false;
+
+ QString cenrepServerIdString;
+ QString profileServerId;
+
+ TRAP(cenrepError,
+ CRepository* operatordataSynchCenrep = CRepository::NewL(KCRUidOperatorDatasyncInternalKeys);
+ TBuf8<50> cenrepServerIdBuf;
+ cenrepError = operatordataSynchCenrep->Get(KNsmlOpDsOperatorSyncServerId,cenrepServerIdBuf);
+ delete operatordataSynchCenrep;
+ HBufC* cenrepServerIdHBufC;
+ cenrepServerIdHBufC = CnvUtfConverter::ConvertToUnicodeFromUtf8L(cenrepServerIdBuf);
+ cenrepServerIdString = QString::fromUtf16(cenrepServerIdHBufC->Ptr(), cenrepServerIdHBufC->Length());
+ delete cenrepServerIdHBufC;
+ )
+ dbOk = getStringValueFromSyncProfileSettingsDb(profileServerId,SERVERID_DB_COLUMN_NAME);
+ serverIdmatchFound = cenrepServerIdString.compare(profileServerId)==0 ? true : false;
+
+ bool success = (cenrepError == KErrNone && dbOk) ? serverIdmatchFound : false;
+ if(!success){
+ errorMsg = "Problems with Cenrep defined ServerId:["+cenrepServerIdString+"]";
+ }
+ return success;
+}
+
+// ----------------------------------------------------------------------------
+bool CustomDataSynchConfigValidatorEngine::contactAdapterCenrepValueToProfileMatches(QString & errorMsg)
+{
+ int cenrepError = KErrGeneral;//CRepository::Get or CRepository::NewL
+
+ TUid cenrepAdapterUid = { 0x101F6DDD };//platformcontactadapter Uid
+ int adapterUidInt = 0;
+ TRAP(cenrepError,
+ CRepository* operatordataSynchCenrep = CRepository::NewL(KCRUidOperatorDatasyncInternalKeys);
+ cenrepError = operatordataSynchCenrep->Get(KNsmlOpDsOperatorAdapterUid,adapterUidInt);
+ delete operatordataSynchCenrep;
+ )
+ if( adapterUidInt > 0 )
+ {//if greater than 0 custom contact adapter is 'likely' to be used
+ cenrepAdapterUid = TUid::Uid(adapterUidInt);
+ }
+ return adapterCenrepValueToProfileMatches(errorMsg, cenrepAdapterUid);
+}
+
+// ----------------------------------------------------------------------------
+bool CustomDataSynchConfigValidatorEngine::myprofileAdapterCenrepValueToProfileMatches(QString & errorMsg)
+{
+ int cenrepError = KErrGeneral;//CRepository::Get or CRepository::NewL
+ TUid cenrepAdapterUid = { 0x0 };
+ int adapterUidInt = 0;
+ TRAP(cenrepError,
+ CRepository* operatordataSynchCenrep = CRepository::NewL(KCRUidOperatorDatasyncInternalKeys);
+ cenrepError = operatordataSynchCenrep->Get(KNsmlOpDsProfileAdapterUid,adapterUidInt);
+ delete operatordataSynchCenrep;
+ )
+ if( adapterUidInt > 0 )
+ {//if greater than 0 custom contact adapter is 'likely' to be used
+ cenrepAdapterUid = TUid::Uid(adapterUidInt);
+ }
+ return adapterCenrepValueToProfileMatches(errorMsg, cenrepAdapterUid);
+}
+
+// ----------------------------------------------------------------------------
+bool CustomDataSynchConfigValidatorEngine::devInfoExtensionPluginAvailable()
+{
+ TUid devInfoExtensionPluginUid = { 0x2002DC7C };
+ int err = KErrGeneral;
+ bool pluginExists = false;
+ RImplInfoPtrArray implInfoArray;
+ TCleanupItem cleanup( CleanupEComArray, &implInfoArray );
+ TRAP(err,
+ CleanupStack::PushL( cleanup );
+ REComSession::ListImplementationsL(
+ devInfoExtensionPluginUid, implInfoArray );
+ if( err == KErrNone && implInfoArray.Count() > 0 )
+ {
+ pluginExists = true;
+ }
+
+ CleanupStack::PopAndDestroy(); // implInfoArray
+ )
+ return pluginExists;
+}
+
+//
+// Helper functions
+//
+//
+// ----------------------------------------------------------------------------
+bool CustomDataSynchConfigValidatorEngine::adapterCenrepValueToProfileMatches(QString & errorMsg, TUid adapterUid)
+{
+ int profileOpenError = KErrGeneral;
+ bool adapterMatchFound = false;
+
+ int dbProfileId = operatorProfileIdFromProfilesDB();
+ if(dbProfileId<0)
+ {//No profile Id or cenrep server Id could not found
+ errorMsg = "Test cannot proceed. No profile id was acquired or cenrepServerId was not configured.";
+ return false;//RSyncMLDataSyncProfile.OpenL panics
+ }
+ //Get Contact Adapter UID from synch profile
+ TRAP(profileOpenError,
+ RSyncMLSession syncMLSession;
+ RArray<TSmlProfileId> profiles;
+ syncMLSession.OpenL();
+ CleanupClosePushL(syncMLSession);
+ // Get the list of available profiles into an array
+ syncMLSession.ListProfilesL(profiles, ESmlDataSync);
+ QString dataProviderString = NULL;
+ QString serverDataSourceName;
+
+ for(int i=0; i < profiles.Count(); i++)
+ {
+ RSyncMLDataSyncProfile profile;
+ profile.OpenL(syncMLSession,profiles[i],ESmlOpenRead);
+ if (!profileOpenError) {//-42 PermissionDenied -> Capabilities problem
+ CleanupClosePushL(profile);
+ RArray<TSmlTaskId> profileTasks;
+ CleanupClosePushL(profileTasks);
+ profile.ListTasksL(profileTasks);
+ for (int j = 0; j < profileTasks.Count(); j++) {
+ RSyncMLTask task;
+ task.OpenL(profile, profileTasks[j]);
+ CleanupClosePushL(task);
+ if(task.Profile() == dbProfileId)
+ {
+ int taskProviderInt = task.DataProvider();
+ int cenrepProviderInt = adapterUid.iUid;
+ if(task.DataProvider()==adapterUid.iUid)
+ {
+ serverDataSourceName = QString((QChar*) task.ServerDataSource().Ptr(),
+ task.ServerDataSource().Length());
+ adapterMatchFound = true;
+ }
+ }
+ CleanupStack::PopAndDestroy(&task);
+ }
+ CleanupStack::PopAndDestroy(&profileTasks);
+ CleanupStack::PopAndDestroy(&profile);
+ }
+ }
+ if(profileOpenError==KErrNone)
+ {
+ profiles.Close();
+ }
+ CleanupStack::PopAndDestroy(&syncMLSession);
+ )
+ bool success = (profileOpenError == KErrNone) ? adapterMatchFound : false;
+ if(!success)
+ {
+ errorMsg = "No match found.";
+ errorMsg = errorMsg + "\n\n [dbProfileId]=("+QString::number(dbProfileId)+")";
+ errorMsg = errorMsg + "\n [cenrepAdapterUid]=\n("+"0x"+QString::number(adapterUid.iUid,16).toUpper()+")";
+ errorMsg = errorMsg + "\n\n [profileOpenError]=("+QString::number(profileOpenError)+")";
+ }
+ return success;
+}
+
+// ----------------------------------------------------------------------------
+bool CustomDataSynchConfigValidatorEngine::getStringValueFromSyncProfileSettingsDb(QString& value,QString columnName,QString whereTypeConditionForSql)
+{
+ //profileDbOpenError can be caused by RFs,RDbs,RDbNamedDatabase,RDbTable or RDbView startup sequences
+ int profileDbOpenError = KErrGeneral;
+ bool resultsFromDbWithQuery = false;
+
+ TPtrC columnNamePtr (static_cast<const TUint16*>(columnName.utf16()), columnName.length());
+
+ QString syncSettingsDbName = "\\private\\100012a5\\DBS_101F99FB_nsmldssettings.db";
+ QString syncSettingsDbTableProfiles = "Profiles";
+ TPtrC syncSettingsDbNamePtr (static_cast<const TUint16*>(syncSettingsDbName.utf16()), syncSettingsDbName.length());
+ TPtrC syncSettingsDbTableProfilesPtr (static_cast<const TUint16*>(syncSettingsDbTableProfiles.utf16()), syncSettingsDbTableProfiles.length());
+
+ //Query & where condition handling
+ QString sqlGetProfileQuery = "SELECT * FROM Profiles";
+ if(whereTypeConditionForSql.length()>0)
+ {
+ sqlGetProfileQuery = sqlGetProfileQuery+" WHERE "+whereTypeConditionForSql;
+ }
+ TPtrC sqlQueryPtr (static_cast<const TUint16*>(sqlGetProfileQuery.utf16()), sqlGetProfileQuery.length());
+
+ //DB INIT
+ RDbNamedDatabase database;
+ RFs fsSession;
+ RDbs rdbSession;
+ RDbTable dbTableProfiles;
+ CDbColSet* dbColSet;
+ RDbView dbView;
+ TRAP(profileDbOpenError,
+ //DB CONNECT
+ profileDbOpenError = fsSession.Connect();
+ CleanupClosePushL(fsSession);
+ profileDbOpenError = rdbSession.Connect();
+ CleanupClosePushL(rdbSession);
+ int i = 0;
+ profileDbOpenError = KErrGeneral;//else DBMS 2 panic is rised in dbTableProfiles.Open
+ while (i < 10 && profileDbOpenError != KErrNone)
+ {//100ms synchronous waits max. 1sec
+ profileDbOpenError = database.Open(fsSession,syncSettingsDbNamePtr);
+ User::After(100000);
+ i++;
+ }
+ CleanupClosePushL(database);
+ profileDbOpenError = dbTableProfiles.Open( database, syncSettingsDbTableProfilesPtr );
+ CleanupClosePushL(dbTableProfiles);
+
+ //DB QUERY
+ profileDbOpenError = dbView.Prepare( database, TDbQuery( sqlQueryPtr ), dbView.EReadOnly );
+ CleanupClosePushL(dbView);
+ dbColSet = dbTableProfiles.ColSetL();
+ CleanupStack::PushL(dbColSet);
+
+ while(profileDbOpenError!=KErrArgument&&dbView.NextL())
+ {//if results and no db error
+ resultsFromDbWithQuery = true;
+ dbView.GetL();
+ if(columnName.compare(PROFILEID_DB_COLUMN_NAME)==0)
+ {//Uint
+ TUint valueFromDb = dbView.ColUint( dbColSet->ColNo( columnNamePtr ));
+ value.setNum(valueFromDb);
+ }
+ else if(columnName.compare(SERVERID_DB_COLUMN_NAME)==0)
+ {//String types
+ QString valueFromDb ((QChar*)dbView.ColDes( dbColSet->ColNo( columnNamePtr )).Ptr(),
+ dbView.ColDes(dbColSet->ColNo( columnNamePtr )).Length());
+ value=valueFromDb;
+ }
+ }
+ //DB CLOSE
+ CleanupStack::PopAndDestroy(dbColSet);
+ CleanupStack::PopAndDestroy(5,&fsSession);
+ )
+
+ return profileDbOpenError == KErrNone ? resultsFromDbWithQuery : false;
+}
+
+// ----------------------------------------------------------------------------
+int CustomDataSynchConfigValidatorEngine::operatorProfileIdFromProfilesDB()
+{
+ int profileId = -1;//Return this value if problems during fetch
+ int cenrepError = KErrGeneral; //CRepository::Get or CRepository::NewL
+ bool dbOk = false;
+
+ //Find right Synch profile based on trusted cenrep configured Server Id
+ QString profileIdString;
+ QString cenrepServerIdString;
+
+ TRAP(cenrepError,
+ CRepository* operatordataSynchCenrep = CRepository::NewL(KCRUidOperatorDatasyncInternalKeys);
+ TBuf8<50> cenrepServerIdBuf;
+ cenrepError = operatordataSynchCenrep->Get(KNsmlOpDsOperatorSyncServerId,cenrepServerIdBuf);
+ delete operatordataSynchCenrep;
+ HBufC* cenrepServerIdHBufC;
+ cenrepServerIdHBufC = CnvUtfConverter::ConvertToUnicodeFromUtf8L(cenrepServerIdBuf);
+ cenrepServerIdString = QString::fromUtf16(cenrepServerIdHBufC->Ptr(), cenrepServerIdHBufC->Length());
+ delete cenrepServerIdHBufC;
+ )
+ if(cenrepServerIdString.compare("")==0)
+ {//protect against DBMS panic 2
+ return profileId;//-1
+ }
+ QString whereCondition = SERVERID_DB_COLUMN_NAME+"='"+cenrepServerIdString+"'";
+ dbOk = getStringValueFromSyncProfileSettingsDb(profileIdString,PROFILEID_DB_COLUMN_NAME,whereCondition);
+ if(dbOk)
+ {
+ profileId = profileIdString.toInt();
+ }
+ return profileId;//error handling needs to be done in calling code
+}
+
+// ----------------------------------------------------------------------------
+QString CustomDataSynchConfigValidatorEngine::imei() const
+{
+ QScopedPointer<CDeviceInfo> deviceInfo(CDeviceInfo::NewL());
+ TBuf<CTelephony::KPhoneSerialNumberSize> imei(deviceInfo->imei());
+ return QString::fromUtf16(imei.Ptr(), imei.Length());
+}
+
+// ----------------------------------------------------------------------------
+QString CustomDataSynchConfigValidatorEngine::model() const
+{
+ QScopedPointer<CDeviceInfo> deviceInfo(CDeviceInfo::NewL());
+ TBuf<CTelephony::KPhoneModelIdSize> model(deviceInfo->model());
+ return QString::fromUtf16(model.Ptr(), model.Length());
+}
+
+// ----------------------------------------------------------------------------
+QString CustomDataSynchConfigValidatorEngine::manufacturer() const
+{
+ QScopedPointer<CDeviceInfo> deviceInfo(CDeviceInfo::NewL());
+ TBuf<CTelephony::KPhoneModelIdSize> manufacturer(deviceInfo->manufacturer());
+ return QString::fromUtf16(manufacturer.Ptr(), manufacturer.Length());
+}
+
+// ----------------------------------------------------------------------------
+QString CustomDataSynchConfigValidatorEngine::imsi() const
+{
+ QScopedPointer<CDeviceInfo> deviceInfo(CDeviceInfo::NewL());
+ TBuf<CTelephony::KIMSISize> imsi(deviceInfo->imsi());
+ return QString::fromUtf16(imsi.Ptr(), imsi.Length());
+}
+
+// ----------------------------------------------------------------------------
+QString CustomDataSynchConfigValidatorEngine::softwareVersion() const
+{
+ QString version;
+ TBuf<KSysUtilVersionTextLength> versionBuf;
+ if (SysUtil::GetSWVersion(versionBuf) == KErrNone) {
+ version = QString::fromUtf16(versionBuf.Ptr(), versionBuf.Length());
+ }
+ return version;
+}
+
+// ----------------------------------------------------------------------------
+// CleanupEComArray function is used for cleanup support of locally declared arrays
+void CleanupEComArray(TAny* aArray)
+{
+ (static_cast<RImplInfoPtrArray*> (aArray))->ResetAndDestroy();
+ (static_cast<RImplInfoPtrArray*> (aArray))->Close();
+}
+
+// End of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/remotemgmt_plat/syncml_ds_customization_api/tsrc/synchconfigvalidator/customdatasynchconfigvalidatorengine_p.h Thu Aug 19 17:35:34 2010 +0530
@@ -0,0 +1,69 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#ifndef CUSTOMDATASYNCHCONFIGVALIDATORENGINE_H
+#define CUSTOMDATASYNCHCONFIGVALIDATORENGINE_H
+
+// INCLUDES
+#include "customdatasynchconfigvalidatorenginewrapper.h"
+#include <e32base.h>
+
+// CLASS DECLARATION
+class CustomDataSynchConfigValidatorEngine: public QObject, public CBase
+{
+ Q_OBJECT
+
+public:
+ CustomDataSynchConfigValidatorEngine(CustomDataSynchConfigValidatorEngineWrapper* parent);
+ ~CustomDataSynchConfigValidatorEngine();
+
+ //Tests
+ bool dataSynchCenrepExists();
+ bool operatordataSynchCenrepExists();
+ bool operatordataSynchErrorCenrepExists();
+ bool customSynchProfilesAllowed();
+ bool configuredContactsAdapterExists(QString & errorMsg);
+ bool configuredCustomSynchProfileExists(QString & errorMsg);
+ bool contactAdapterCenrepValueToProfileMatches(QString & errorMsg);
+ bool myprofileAdapterCenrepValueToProfileMatches(QString & errorMsg);
+
+ /**
+ * Tests whether a device info extension plugin is available
+ * @return True, if plugin is found, false otherwise.
+ */
+ bool devInfoExtensionPluginAvailable();
+
+private:
+ bool getStringValueFromSyncProfileSettingsDb(QString & value, QString columnName, QString whereTypeConditionForSql="");
+ /*@returns profileId -1 if problems acquiring the op.specific profile Id*/
+ int operatorProfileIdFromProfilesDB();
+ bool adapterCenrepValueToProfileMatches(QString & errorMsg, TUid adapterUid);
+
+ QString imsi() const;
+ QString imei() const;
+ QString softwareVersion() const;
+ QString model() const;
+ QString manufacturer() const;
+
+private:
+ CustomDataSynchConfigValidatorEngineWrapper* q;//for emitting signals in q
+ TUid iEComDtorKey;
+};
+
+#endif /*CUSTOMDATASYNCHCONFIGVALIDATORENGINE_H*/
+
+// End of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/remotemgmt_plat/syncml_ds_customization_api/tsrc/synchconfigvalidator/customdatasynchconfigvalidatorenginewrapper.cpp Thu Aug 19 17:35:34 2010 +0530
@@ -0,0 +1,89 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+// CLASS HEADER
+#include "customdatasynchconfigvalidatorenginewrapper.h"
+
+// INTERNAL INCLUDES
+#include "customdatasynchconfigvalidatorengine_p.h"
+
+// ----------------------------------------------------------------------------
+CustomDataSynchConfigValidatorEngineWrapper::CustomDataSynchConfigValidatorEngineWrapper (QObject* parent):
+QObject(parent),engine(new CustomDataSynchConfigValidatorEngine(this))
+{
+}
+
+// ----------------------------------------------------------------------------
+CustomDataSynchConfigValidatorEngineWrapper::~CustomDataSynchConfigValidatorEngineWrapper()
+{
+}
+
+// ----------------------------------------------------------------------------
+bool CustomDataSynchConfigValidatorEngineWrapper::dataSynchCenrepExists()
+{
+ return engine->dataSynchCenrepExists();
+}
+
+// ----------------------------------------------------------------------------
+bool CustomDataSynchConfigValidatorEngineWrapper::operatordataSynchCenrepExists()
+{
+ return engine->operatordataSynchCenrepExists();
+}
+
+// ----------------------------------------------------------------------------
+bool CustomDataSynchConfigValidatorEngineWrapper::operatordataSynchErrorCenrepExists()
+{
+ return engine->operatordataSynchErrorCenrepExists();
+}
+
+// ----------------------------------------------------------------------------
+bool CustomDataSynchConfigValidatorEngineWrapper::customSynchProfilesAllowed()
+{
+ return engine->customSynchProfilesAllowed();
+}
+
+// ----------------------------------------------------------------------------
+bool CustomDataSynchConfigValidatorEngineWrapper::configuredContactsAdapterExists(QString & errorMsg)
+{
+ return engine->configuredContactsAdapterExists(errorMsg);
+}
+
+// ----------------------------------------------------------------------------
+bool CustomDataSynchConfigValidatorEngineWrapper::configuredCustomSynchProfileExists(QString & errorMsg)
+{
+ return engine->configuredCustomSynchProfileExists(errorMsg);
+}
+
+// ----------------------------------------------------------------------------
+bool CustomDataSynchConfigValidatorEngineWrapper::contactAdapterCenrepValueToProfileMatches(QString & errorMsg)
+{
+ return engine->contactAdapterCenrepValueToProfileMatches(errorMsg);
+}
+
+// ----------------------------------------------------------------------------
+bool CustomDataSynchConfigValidatorEngineWrapper::myprofileAdapterCenrepValueToProfileMatches(QString & errorMsg)
+{
+ return engine->myprofileAdapterCenrepValueToProfileMatches(errorMsg);
+}
+
+// ----------------------------------------------------------------------------
+bool CustomDataSynchConfigValidatorEngineWrapper::devInfoExtensionPluginAvailable()
+{
+ return engine->devInfoExtensionPluginAvailable();
+}
+
+// End of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/remotemgmt_plat/syncml_ds_customization_api/tsrc/synchconfigvalidator/customdatasynchconfigvalidatorenginewrapper.h Thu Aug 19 17:35:34 2010 +0530
@@ -0,0 +1,49 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#ifndef CUSTOMDATASYNCHCONFIGVALIDATORENGINEWRAPPER_H
+#define CUSTOMDATASYNCHCONFIGVALIDATORENGINEWRAPPER_H
+#include <qobject.h>
+
+// FORWARD DECLARATIONS
+class CustomDataSynchConfigValidatorEngine;
+
+class CustomDataSynchConfigValidatorEngineWrapper : public QObject
+{
+ Q_OBJECT
+
+public:
+
+ CustomDataSynchConfigValidatorEngineWrapper (QObject* parent = 0);
+ ~CustomDataSynchConfigValidatorEngineWrapper();
+ bool dataSynchCenrepExists();
+ bool operatordataSynchCenrepExists();
+ bool operatordataSynchErrorCenrepExists();
+ bool customSynchProfilesAllowed();
+ bool configuredContactsAdapterExists(QString & errorMsg);
+ bool configuredCustomSynchProfileExists(QString & errorMsg);
+ bool contactAdapterCenrepValueToProfileMatches(QString & errorMsg);
+ bool myprofileAdapterCenrepValueToProfileMatches(QString & errorMsg);
+ bool devInfoExtensionPluginAvailable();
+
+private:
+ friend class CustomDataSynchConfigValidatorEngine;
+ CustomDataSynchConfigValidatorEngine* engine;
+
+};
+
+#endif // CUSTOMDATASYNCHCONFIGVALIDATORENGINEWRAPPER_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/remotemgmt_plat/syncml_ds_customization_api/tsrc/synchconfigvalidator/customdatasynchdeviceinfo.cpp Thu Aug 19 17:35:34 2010 +0530
@@ -0,0 +1,143 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#include "customdatasynchdeviceinfo.h"
+
+#include <Etel3rdParty.h>
+
+CDeviceInfo* CDeviceInfo::NewL()
+ {
+ CDeviceInfo* self = NewLC();
+ CleanupStack::Pop( self );
+ return self;
+ }
+
+CDeviceInfo* CDeviceInfo::NewLC()
+ {
+ CDeviceInfo* self = new ( ELeave ) CDeviceInfo();
+ CleanupStack::PushL( self );
+ self->ConstructL();
+ return self;
+ }
+
+void CDeviceInfo::ConstructL()
+ {
+ CActiveScheduler::Add( this );
+ iTelephony = CTelephony::NewL();
+ iWait = new ( ELeave ) CActiveSchedulerWait();
+ }
+
+CDeviceInfo::CDeviceInfo()
+:CActive( EPriorityNormal ), iBatteryInfoV1Pkg( iBatteryInfoV1 ),
+ iPhoneIdV1Pkg( iPhoneIdV1 ),
+ iSignalStrengthV1Pckg( iSignalStrengthV1 ),
+ iSubscriberIdV1Pckg( iSubscriberIdV1 )
+ {
+ }
+
+CDeviceInfo::~CDeviceInfo()
+ {
+ Cancel();
+ delete iTelephony;
+ }
+
+TBuf<CTelephony::KPhoneSerialNumberSize> CDeviceInfo::imei()
+ {
+ Cancel();
+ iTelephony->GetPhoneId( iStatus, iPhoneIdV1Pkg );
+ SetActive();
+
+ if ( !iWait->IsStarted() )
+ {
+ iWait->Start();
+ }
+ return iPhoneIdV1.iSerialNumber;
+ }
+
+TBuf<CTelephony::KPhoneModelIdSize> CDeviceInfo::model()
+ {
+ Cancel();
+ iTelephony->GetPhoneId( iStatus, iPhoneIdV1Pkg );
+ SetActive();
+
+ if ( !iWait->IsStarted() )
+ {
+ iWait->Start();
+ }
+ return iPhoneIdV1.iModel;
+ }
+
+TBuf<CTelephony::KPhoneManufacturerIdSize> CDeviceInfo::manufacturer()
+ {
+ Cancel();
+ iTelephony->GetPhoneId( iStatus, iPhoneIdV1Pkg );
+ SetActive();
+
+ if ( !iWait->IsStarted() )
+ {
+ iWait->Start();
+ }
+ return iPhoneIdV1.iManufacturer;
+ }
+
+TBuf<CTelephony::KIMSISize> CDeviceInfo::imsi()
+ {
+ Cancel();
+ iTelephony->GetSubscriberId( iStatus,iSubscriberIdV1Pckg );
+ SetActive();
+
+ if (!iWait->IsStarted())
+ {
+ iWait->Start();
+ }
+ return iSubscriberIdV1.iSubscriberId;
+ }
+
+TUint CDeviceInfo::batteryLevel()
+ {
+ Cancel();
+ iTelephony->GetBatteryInfo( iStatus,iBatteryInfoV1Pkg );
+ SetActive();
+
+ if ( !iWait->IsStarted() )
+ {
+ iWait->Start();
+ }
+ return iBatteryInfoV1.iChargeLevel;
+ }
+
+TInt32 CDeviceInfo::signalStrength()
+ {
+ Cancel();
+ iTelephony->GetSignalStrength( iStatus, iSignalStrengthV1Pckg );
+ SetActive();
+ if ( !iWait->IsStarted() )
+ {
+ iWait->Start();
+ }
+ return iSignalStrengthV1.iSignalStrength;
+ }
+
+void CDeviceInfo::DoCancel()
+ {
+ iTelephony->CancelAsync( CTelephony::EGetPhoneIdCancel );
+ }
+
+void CDeviceInfo::RunL()
+ {
+ iWait->AsyncStop();
+ }
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/remotemgmt_plat/syncml_ds_customization_api/tsrc/synchconfigvalidator/customdatasynchdeviceinfo.h Thu Aug 19 17:35:34 2010 +0530
@@ -0,0 +1,74 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#ifndef CIMEIREADER_H
+#define CIMEIREADER_H
+
+#include <exception>
+#include <e32base.h>
+#include <Etel3rdParty.h>
+
+class CDeviceInfo : public CActive
+{
+public:
+ enum States
+ {
+ EModel,
+ EManufacturer,
+ ESerialnumber,
+ };
+
+ static CDeviceInfo* NewL();
+ static CDeviceInfo* NewLC();
+ ~CDeviceInfo();
+
+ TBuf<CTelephony::KPhoneSerialNumberSize> imei();
+ TBuf<CTelephony::KPhoneModelIdSize> model();
+ TBuf<CTelephony::KPhoneManufacturerIdSize> manufacturer();
+ TBuf<CTelephony::KIMSISize> imsi();
+ TUint batteryLevel();
+ TInt32 signalStrength();
+
+protected:
+ void DoCancel();
+ void RunL();
+
+private:
+ CDeviceInfo();
+ void ConstructL();
+
+private:
+ CTelephony* iTelephony;
+
+ CTelephony::TBatteryInfoV1Pckg iBatteryInfoV1Pkg;
+ CTelephony::TBatteryInfoV1 iBatteryInfoV1;
+
+ CTelephony::TPhoneIdV1 iPhoneIdV1;
+ CTelephony::TPhoneIdV1Pckg iPhoneIdV1Pkg;
+
+ CTelephony::TSignalStrengthV1Pckg iSignalStrengthV1Pckg;
+ CTelephony::TSignalStrengthV1 iSignalStrengthV1;
+
+ CTelephony::TSubscriberIdV1Pckg iSubscriberIdV1Pckg;
+ CTelephony::TSubscriberIdV1 iSubscriberIdV1;
+
+ CActiveSchedulerWait *iWait;
+
+ bool phoneIdFetched;
+};
+
+#endif /* CIMEIREADER_H */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/remotemgmt_plat/syncml_ds_customization_api/tsrc/synchconfigvalidator/main.cpp Thu Aug 19 17:35:34 2010 +0530
@@ -0,0 +1,29 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#include "CustomDataSynchConfigValidator.h"
+
+#include <QtGui>
+#include <QApplication>
+
+int main(int argc, char *argv[])
+{
+ QApplication a(argc, argv);
+ CustomDataSynchConfigValidator w;
+ w.showMaximized();
+ return a.exec();
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/remotemgmt_plat/syncml_ds_customization_api/tsrc/synchconfigvalidator/synchconfigvalidator.iby Thu Aug 19 17:35:34 2010 +0530
@@ -0,0 +1,11 @@
+#include <bldvariant.hrh>
+#ifndef __SYNCHCONFIGVALIDATOR_IBY__
+#define __SYNCHCONFIGVALIDATOR_IBY__
+
+#ifdef _DEBUG //add param USE_UDEB=1 with imaker if you want to enable this tool
+file=ABI_DIR/BUILD_DIR/synchconfigvalidator.exe PROGRAMS_DIR\synchconfigvalidator.exe
+data=/epoc32/data/z/resource/apps/synchconfigvalidator.rsc RESOURCE_FILES_DIR\synchconfigvalidator.rsc
+data=/epoc32/data/z/private/10003a3f/import/apps/synchconfigvalidator_reg.rsc \private\10003a3f\apps\synchconfigvalidator_reg.rsc
+#endif // _DEBUG
+
+#endif __SYNCHCONFIGVALIDATOR_IBY__
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/remotemgmt_plat/syncml_ds_customization_api/tsrc/synchconfigvalidator/synchconfigvalidator.pro Thu Aug 19 17:35:34 2010 +0530
@@ -0,0 +1,34 @@
+TEMPLATE = app
+TARGET = synchconfigvalidator
+QT += core \
+ gui
+INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE
+symbian:LIBS += -letel3rdparty \
+ -lsysutil \
+ -lcentralrepository \
+ -lsyncmlclientapi \
+ -lecom \
+ -ledbms \
+ -lefsrv \
+ -lcharconv
+HEADERS += synchconfigvalidator.loc \
+ customdatasynchconfigvalidator.h \
+ customdatasynchconfigvalidatorenginewrapper.h \
+ customdatasynchconfigvalidatorengine_p.h \
+ customdatasynchdeviceinfo.h
+SOURCES += synchconfigvalidator_reg.rss \
+ main.cpp \
+ customdatasynchconfigvalidator.cpp \
+ customdatasynchconfigvalidatorenginewrapper.cpp \
+ customdatasynchconfigvalidatorengine_p.cpp \
+ customdatasynchdeviceinfo.cpp
+FORMS += synchconfigvalidator.ui
+RESOURCES +=
+symbian:TARGET.UID3 = 0x2002DC7B
+symbian:TARGET.CAPABILITY = All \
+ -TCB
+symbian {
+ SYNCHCONFIGTOOL_IBY_DIR = $$section(PWD,":",1)
+ BLD_INF_RULES.prj_exports += "$${LITERAL_HASH}include <platform_paths.hrh>"
+ BLD_INF_RULES.prj_exports += "$$SYNCHCONFIGTOOL_IBY_DIR/synchconfigvalidator.iby CUSTOMER_APP_LAYER_IBY_EXPORT_PATH(synchconfigvalidator.iby)"
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/remotemgmt_plat/syncml_ds_customization_api/tsrc/synchconfigvalidator/synchconfigvalidator.ui Thu Aug 19 17:35:34 2010 +0530
@@ -0,0 +1,553 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>CustomDataSynchConfigValidator</class>
+ <widget class="QMainWindow" name="CustomDataSynchConfigValidator">
+ <property name="enabled">
+ <bool>true</bool>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>482</width>
+ <height>396</height>
+ </rect>
+ </property>
+ <property name="font">
+ <font>
+ <pointsize>4</pointsize>
+ <weight>50</weight>
+ <bold>false</bold>
+ <kerning>false</kerning>
+ </font>
+ </property>
+ <property name="windowTitle">
+ <string>SynchConfigValidator</string>
+ </property>
+ <property name="autoFillBackground">
+ <bool>false</bool>
+ </property>
+ <property name="dockNestingEnabled">
+ <bool>false</bool>
+ </property>
+ <widget class="QWidget" name="centralwidget">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>360</width>
+ <height>360</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>480</width>
+ <height>480</height>
+ </size>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout">
+ <item>
+ <widget class="QTableWidget" name="tableWidget">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>280</width>
+ <height>200</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>640</width>
+ <height>640</height>
+ </size>
+ </property>
+ <property name="font">
+ <font>
+ <pointsize>6</pointsize>
+ <kerning>true</kerning>
+ </font>
+ </property>
+ <property name="layoutDirection">
+ <enum>Qt::LeftToRight</enum>
+ </property>
+ <property name="autoFillBackground">
+ <bool>false</bool>
+ </property>
+ <property name="locale">
+ <locale language="English" country="UnitedKingdom"/>
+ </property>
+ <property name="lineWidth">
+ <number>1</number>
+ </property>
+ <property name="midLineWidth">
+ <number>0</number>
+ </property>
+ <property name="verticalScrollBarPolicy">
+ <enum>Qt::ScrollBarAlwaysOff</enum>
+ </property>
+ <property name="horizontalScrollBarPolicy">
+ <enum>Qt::ScrollBarAlwaysOff</enum>
+ </property>
+ <property name="autoScroll">
+ <bool>true</bool>
+ </property>
+ <property name="editTriggers">
+ <set>QAbstractItemView::NoEditTriggers</set>
+ </property>
+ <property name="dragDropOverwriteMode">
+ <bool>false</bool>
+ </property>
+ <property name="alternatingRowColors">
+ <bool>false</bool>
+ </property>
+ <property name="selectionMode">
+ <enum>QAbstractItemView::SingleSelection</enum>
+ </property>
+ <property name="textElideMode">
+ <enum>Qt::ElideRight</enum>
+ </property>
+ <property name="verticalScrollMode">
+ <enum>QAbstractItemView::ScrollPerItem</enum>
+ </property>
+ <property name="horizontalScrollMode">
+ <enum>QAbstractItemView::ScrollPerPixel</enum>
+ </property>
+ <property name="showGrid">
+ <bool>true</bool>
+ </property>
+ <property name="gridStyle">
+ <enum>Qt::SolidLine</enum>
+ </property>
+ <property name="sortingEnabled">
+ <bool>false</bool>
+ </property>
+ <property name="wordWrap">
+ <bool>true</bool>
+ </property>
+ <property name="cornerButtonEnabled">
+ <bool>true</bool>
+ </property>
+ <attribute name="horizontalHeaderVisible">
+ <bool>true</bool>
+ </attribute>
+ <attribute name="horizontalHeaderDefaultSectionSize">
+ <number>180</number>
+ </attribute>
+ <attribute name="horizontalHeaderHighlightSections">
+ <bool>true</bool>
+ </attribute>
+ <attribute name="horizontalHeaderMinimumSectionSize">
+ <number>25</number>
+ </attribute>
+ <attribute name="horizontalHeaderShowSortIndicator" stdset="0">
+ <bool>false</bool>
+ </attribute>
+ <attribute name="horizontalHeaderStretchLastSection">
+ <bool>false</bool>
+ </attribute>
+ <attribute name="verticalHeaderVisible">
+ <bool>false</bool>
+ </attribute>
+ <attribute name="verticalHeaderCascadingSectionResizes">
+ <bool>false</bool>
+ </attribute>
+ <attribute name="verticalHeaderDefaultSectionSize">
+ <number>30</number>
+ </attribute>
+ <attribute name="verticalHeaderHighlightSections">
+ <bool>true</bool>
+ </attribute>
+ <attribute name="verticalHeaderStretchLastSection">
+ <bool>false</bool>
+ </attribute>
+ <attribute name="verticalHeaderVisible">
+ <bool>false</bool>
+ </attribute>
+ <attribute name="horizontalHeaderShowSortIndicator" stdset="0">
+ <bool>false</bool>
+ </attribute>
+ <attribute name="verticalHeaderDefaultSectionSize">
+ <number>30</number>
+ </attribute>
+ <attribute name="horizontalHeaderStretchLastSection">
+ <bool>false</bool>
+ </attribute>
+ <attribute name="horizontalHeaderVisible">
+ <bool>true</bool>
+ </attribute>
+ <attribute name="verticalHeaderCascadingSectionResizes">
+ <bool>false</bool>
+ </attribute>
+ <attribute name="horizontalHeaderMinimumSectionSize">
+ <number>25</number>
+ </attribute>
+ <attribute name="horizontalHeaderHighlightSections">
+ <bool>true</bool>
+ </attribute>
+ <attribute name="verticalHeaderHighlightSections">
+ <bool>true</bool>
+ </attribute>
+ <attribute name="verticalHeaderStretchLastSection">
+ <bool>false</bool>
+ </attribute>
+ <attribute name="horizontalHeaderDefaultSectionSize">
+ <number>180</number>
+ </attribute>
+ <row>
+ <property name="text">
+ <string>DataSynchCenrepExistsTest</string>
+ </property>
+ <property name="font">
+ <font>
+ <pointsize>6</pointsize>
+ </font>
+ </property>
+ </row>
+ <row>
+ <property name="text">
+ <string>OperatorDataSynchCenrepExistsTest</string>
+ </property>
+ <property name="font">
+ <font>
+ <pointsize>6</pointsize>
+ </font>
+ </property>
+ </row>
+ <row>
+ <property name="text">
+ <string>OperatorDataSynchErrorCenrepExistsTest</string>
+ </property>
+ <property name="font">
+ <font>
+ <pointsize>6</pointsize>
+ </font>
+ </property>
+ </row>
+ <row>
+ <property name="text">
+ <string>CustomProfilesTest</string>
+ </property>
+ <property name="font">
+ <font>
+ <pointsize>6</pointsize>
+ </font>
+ </property>
+ </row>
+ <row>
+ <property name="text">
+ <string>ContactsAdapterAvailabilityTest</string>
+ </property>
+ <property name="font">
+ <font>
+ <pointsize>6</pointsize>
+ </font>
+ </property>
+ </row>
+ <row>
+ <property name="text">
+ <string>CustomSynchProfileServerIdTest</string>
+ </property>
+ <property name="font">
+ <font>
+ <pointsize>6</pointsize>
+ </font>
+ </property>
+ </row>
+ <row>
+ <property name="text">
+ <string>ContactsAdapterSynchProfileTest</string>
+ </property>
+ <property name="font">
+ <font>
+ <pointsize>6</pointsize>
+ </font>
+ </property>
+ </row>
+ <row>
+ <property name="text">
+ <string>MyprofileAdapterSynchProfileTest</string>
+ </property>
+ <property name="font">
+ <font>
+ <pointsize>6</pointsize>
+ </font>
+ </property>
+ </row>
+ <row>
+ <property name="text">
+ <string>DeviceInfoExtensionPluginTest</string>
+ </property>
+ </row>
+ <column>
+ <property name="text">
+ <string>Test name</string>
+ </property>
+ <property name="font">
+ <font>
+ <pointsize>6</pointsize>
+ </font>
+ </property>
+ </column>
+ <column>
+ <property name="text">
+ <string>Result</string>
+ </property>
+ <property name="font">
+ <font>
+ <pointsize>6</pointsize>
+ </font>
+ </property>
+ </column>
+ <column>
+ <property name="text">
+ <string>Info</string>
+ </property>
+ <property name="font">
+ <font>
+ <pointsize>6</pointsize>
+ </font>
+ </property>
+ </column>
+ <item row="0" column="0">
+ <property name="text">
+ <string>Datasync cen.rep supports custom sync profiles</string>
+ </property>
+ <property name="toolTip">
+ <string>Datasync cen.rep supports custom sync profiles</string>
+ </property>
+ <property name="whatsThis">
+ <string>Datasync cen.rep supports custom sync profiles</string>
+ </property>
+ <property name="font">
+ <font>
+ <pointsize>6</pointsize>
+ </font>
+ </property>
+ </item>
+ <item row="0" column="1">
+ <property name="text">
+ <string>NOK</string>
+ </property>
+ </item>
+ <item row="0" column="2">
+ <property name="text">
+ <string>!</string>
+ </property>
+ </item>
+ <item row="1" column="0">
+ <property name="text">
+ <string>Operatordatasync cen.rep exists</string>
+ </property>
+ <property name="toolTip">
+ <string>Operatordatasync cen.rep exists</string>
+ </property>
+ <property name="whatsThis">
+ <string>Operatordatasync</string>
+ </property>
+ <property name="font">
+ <font>
+ <pointsize>6</pointsize>
+ </font>
+ </property>
+ </item>
+ <item row="1" column="1">
+ <property name="text">
+ <string>NOK</string>
+ </property>
+ </item>
+ <item row="1" column="2">
+ <property name="text">
+ <string>!</string>
+ </property>
+ </item>
+ <item row="2" column="0">
+ <property name="text">
+ <string>Operatordatasync error cen.rep exists</string>
+ </property>
+ <property name="toolTip">
+ <string>Operatordatasync error cen.rep exists</string>
+ </property>
+ <property name="whatsThis">
+ <string>Operatordatasync</string>
+ </property>
+ <property name="font">
+ <font>
+ <pointsize>6</pointsize>
+ </font>
+ </property>
+ </item>
+ <item row="2" column="1">
+ <property name="text">
+ <string>NOK</string>
+ </property>
+ </item>
+ <item row="2" column="2">
+ <property name="text">
+ <string>!</string>
+ </property>
+ </item>
+ <item row="3" column="0">
+ <property name="text">
+ <string>Custom Synch Profiles allowed</string>
+ </property>
+ <property name="toolTip">
+ <string>Test4</string>
+ </property>
+ <property name="whatsThis">
+ <string>Test4</string>
+ </property>
+ <property name="font">
+ <font>
+ <pointsize>6</pointsize>
+ </font>
+ </property>
+ </item>
+ <item row="3" column="1">
+ <property name="text">
+ <string>NOK</string>
+ </property>
+ </item>
+ <item row="3" column="2">
+ <property name="text">
+ <string>!</string>
+ </property>
+ </item>
+ <item row="4" column="0">
+ <property name="text">
+ <string>Configured Contacts Adapter exists</string>
+ </property>
+ <property name="font">
+ <font>
+ <pointsize>6</pointsize>
+ </font>
+ </property>
+ </item>
+ <item row="4" column="1">
+ <property name="text">
+ <string>NOK</string>
+ </property>
+ </item>
+ <item row="4" column="2">
+ <property name="text">
+ <string>!</string>
+ </property>
+ </item>
+ <item row="5" column="0">
+ <property name="text">
+ <string>Configured Custom Synch Profile exists</string>
+ </property>
+ <property name="font">
+ <font>
+ <pointsize>6</pointsize>
+ </font>
+ </property>
+ </item>
+ <item row="5" column="1">
+ <property name="text">
+ <string>NOK</string>
+ </property>
+ </item>
+ <item row="5" column="2">
+ <property name="text">
+ <string>!</string>
+ </property>
+ </item>
+ <item row="6" column="0">
+ <property name="text">
+ <string>Contacts Adapter in Synch Profile exists</string>
+ </property>
+ <property name="font">
+ <font>
+ <pointsize>6</pointsize>
+ </font>
+ </property>
+ </item>
+ <item row="6" column="1">
+ <property name="text">
+ <string>NOK</string>
+ </property>
+ </item>
+ <item row="6" column="2">
+ <property name="text">
+ <string>!</string>
+ </property>
+ </item>
+ <item row="7" column="0">
+ <property name="text">
+ <string>Myprofile Adapter in Synch Profile exists</string>
+ </property>
+ <property name="font">
+ <font>
+ <pointsize>6</pointsize>
+ </font>
+ </property>
+ </item>
+ <item row="7" column="1">
+ <property name="text">
+ <string>VERIFY</string>
+ </property>
+ </item>
+ <item row="7" column="2">
+ <property name="text">
+ <string>?</string>
+ </property>
+ </item>
+ <item row="8" column="0">
+ <property name="text">
+ <string>DevInfo extension plugin exists</string>
+ </property>
+ </item>
+ <item row="8" column="1">
+ <property name="text">
+ <string>VERIFY</string>
+ </property>
+ </item>
+ <item row="8" column="2">
+ <property name="text">
+ <string>?</string>
+ </property>
+ </item>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="buttonTestActivator">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="autoFillBackground">
+ <bool>false</bool>
+ </property>
+ <property name="text">
+ <string>Run</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ <widget class="QMenuBar" name="menubar">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>482</width>
+ <height>18</height>
+ </rect>
+ </property>
+ </widget>
+ <widget class="QStatusBar" name="statusbar"/>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/remotemgmt_plat/syncml_ds_error_reporting_api/group/bld.inf Thu Aug 19 17:35:34 2010 +0530
@@ -0,0 +1,26 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: File that exports the files belonging to
+: SyncML DS Error reporting API
+*
+*/
+
+#include <platform_paths.hrh>
+
+PRJ_PLATFORMS
+DEFAULT
+
+PRJ_EXPORTS
+
+../inc/nsmloperatorerrorcrkeys.h MW_LAYER_PLATFORM_EXPORT_PATH(nsmloperatorerrorcrkeys.h)
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/remotemgmt_plat/syncml_ds_error_reporting_api/inc/nsmloperatorerrorcrkeys.h Thu Aug 19 17:35:34 2010 +0530
@@ -0,0 +1,55 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: SyncML DS Error reporting API CenRep key definitions
+*
+*/
+
+#ifndef NSMLOPERATORERRORCRKEYS_H
+#define NSMLOPERATORERRORCRKEYS_H
+
+#include <e32std.h>
+
+/**
+ * SyncML DS error reporting keys
+ *
+ */
+const TUid KCRUidOperatorDatasyncErrorKeys = { 0x2001FDF1 };
+
+/**
+ * KNsmlOpDsSyncErrorCode
+ * Holds error code of latest DS sync (0 if no error occured).
+ * Storing of error codes is configured in KCRUidOperatorDatasyncInternalKeys
+ * (nsmloperatordatacrkeys.h).
+ */
+const TUint32 KNsmlOpDsSyncErrorCode = 0x00000001;
+
+/**
+ * KNsmlOpDsSyncProfId
+ * Holds sync profile Id used in last DS sync
+ */
+const TUint32 KNsmlOpDsSyncProfId = 0x00000002;
+
+/**
+ * KNsmlOpDsSyncType
+ * Holds sync type used in last DS sync
+ */
+const TUint32 KNsmlOpDsSyncType = 0x00000003;
+
+/**
+ * KNsmlOpDsSyncInitiation
+ * Holds sync initiation used in last DS sync
+ */
+const TUint32 KNsmlOpDsSyncInitiation = 0x00000004;
+
+#endif //NSMLOPERATORERRORCRKEYS_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/remotemgmt_plat/syncml_ds_error_reporting_api/syncml_ds_error_reporting_api.metaxml Thu Aug 19 17:35:34 2010 +0530
@@ -0,0 +1,14 @@
+<?xml version="1.0" ?>
+<api id="5d568c0272bed4d13d40e9eace6350db" dataversion="1.0">
+ <name>SyncML DS Error reporting API</name>
+ <description>Definitions of Error reporting keys related to SyncML framework</description>
+ <type>c++</type>
+ <subsystem>syncmlfw</subsystem>
+ <libs>
+ </libs>
+ <release category="platform"/>
+ <attributes>
+ <htmldocprovided>no</htmldocprovided>
+ <adaptation>no</adaptation>
+ </attributes>
+</api>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/remotemgmt_plat/syncml_ds_error_reporting_api/tsrc/QtSyncStatusSpy/QtSyncStatusSpy.pro Thu Aug 19 17:35:34 2010 +0530
@@ -0,0 +1,24 @@
+TEMPLATE = app
+TARGET =
+DEPENDPATH += .
+INCLUDEPATH += .
+CONFIG += hb
+LIBS += -lxqsettingsmanager \
+ -lxqserviceutil
+INCLUDEPATH += \epoc32\include\platform\mw
+HEADERS += qtsyncstatuslog.h \
+ qtsyncstatuslogview.h \
+ qtsyncstatusmodel.h \
+ qtsyncstatusview.h
+SOURCES += qtsyncstatuslog.cpp \
+ qtsyncstatuslogview.cpp \
+ qtsyncstatusmodel.cpp \
+ qtsyncstatusview.cpp \
+ main.cpp \
+ QtSyncStatusSpy_reg.rss
+FORMS +=
+RESOURCES +=
+symbian:TARGET.UID3 = 0x2001FDF3
+TARGET.CAPABILITY = ALL \
+ -TCB
+
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/remotemgmt_plat/syncml_ds_error_reporting_api/tsrc/QtSyncStatusSpy/main.cpp Thu Aug 19 17:35:34 2010 +0530
@@ -0,0 +1,87 @@
+/****************************************************************************
+**
+** Trolltech hereby grants a license to use the Qt/Eclipse Integration
+** plug-in (the software contained herein), in binary form, solely for the
+** purpose of creating code to be used with Trolltech's Qt software.
+**
+** Qt Designer is licensed under the terms of the GNU General Public
+** License versions 2.0 and 3.0 ("GPL License"). Trolltech offers users the
+** right to use certain no GPL licensed software under the terms of its GPL
+** Exception version 1.2 (http://trolltech.com/products/qt/gplexception).
+**
+** THIS SOFTWARE IS PROVIDED BY TROLLTECH AND ITS CONTRIBUTORS (IF ANY) "AS
+** IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+** TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+** PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
+** OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+** EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+** PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+** PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+** LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+** NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+** SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** Since we now have the GPL exception I think that the "special exception
+** is no longer needed. The license text proposed above (other than the
+** special exception portion of it) is the BSD license and we have added
+** the BSD license as a permissible license under the exception.
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include <hbmainwindow.h>
+#include <hbapplication.h>
+#include "qtsyncstatusview.h"
+#include "qtsyncstatuslogview.h"
+#include "qtsyncstatuslog.h"
+
+//class QtSyncStatusApp : public HbMainWindow
+//{
+// Q_OBJECT
+//
+//public:
+// QtSyncStatusApp();
+// ~QtSyncStatusApp();
+//
+// virtual bool event(QEvent *event);
+//};
+//
+//QtSyncStatusApp::QtSyncStatusApp()
+//{
+//}
+//
+//QtSyncStatusApp::~QtSyncStatusApp()
+//{
+//}
+//
+//
+//bool QtSyncStatusApp::event(QEvent *event)
+//{
+// if (event->type() == QEvent::ApplicationActivate) {
+// show();
+// }
+// return HbMainWindow::event(event);
+//}
+
+int main(int argc, char *argv[])
+{
+ HbApplication app( argc, argv );
+ HbMainWindow mainWindow;
+
+ QtSyncStatusLog* log = new QtSyncStatusLog();
+
+ QtSyncStatusView* listView = new QtSyncStatusView(*log);
+ mainWindow.addView( listView );
+
+ QtSyncStatusLogView* logView = new QtSyncStatusLogView(*log);
+ mainWindow.addView( logView );
+
+ QObject::connect(logView, SIGNAL(comingBack()), listView, SLOT(activateView()));
+ QObject::connect(listView, SIGNAL(showLog()), logView, SLOT(activateView()));
+
+ mainWindow.show();
+ int error = app.exec();
+ delete log;
+ return error;
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/remotemgmt_plat/syncml_ds_error_reporting_api/tsrc/QtSyncStatusSpy/qtsyncstatuslog.cpp Thu Aug 19 17:35:34 2010 +0530
@@ -0,0 +1,55 @@
+#include <qtextstream.h>
+#include <qstringlist.h>
+#include <qdir.h>
+#include "qtsyncstatuslog.h"
+
+const QString LogFilePath = "C:/logs/Sync/";
+const QString LogFileName = LogFilePath + "QtSyncStatus.txt";
+
+QtSyncStatusLog::QtSyncStatusLog() : mLogFile(LogFileName)
+{
+ open();
+}
+
+QtSyncStatusLog::~QtSyncStatusLog()
+{
+ mLogFile.close();
+}
+
+void QtSyncStatusLog::clear()
+{
+ mLogFile.remove();
+ open();
+}
+
+void QtSyncStatusLog::write(QString& string)
+{
+ QTextStream stream(&mLogFile);
+ stream << string;
+ stream.flush();
+}
+
+QStringList QtSyncStatusLog::lines()
+{
+ QStringList list;
+ QTextStream stream(&mLogFile);
+ stream.seek(0);
+ while (!stream.atEnd()) {
+ list.append(stream.readLine());
+ }
+ return list;
+}
+
+void QtSyncStatusLog::open()
+{
+ QDir dir(LogFilePath);
+ if (!dir.exists()) {
+ dir.mkpath(LogFilePath);
+ }
+ if (!mLogFile.open(QIODevice::ReadWrite | QIODevice::Append | QIODevice::Text)) {
+ qFatal("error opening log file");
+ return;
+ }
+}
+
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/remotemgmt_plat/syncml_ds_error_reporting_api/tsrc/QtSyncStatusSpy/qtsyncstatuslog.h Thu Aug 19 17:35:34 2010 +0530
@@ -0,0 +1,24 @@
+#ifndef QTSYNCSTATUSLOG_H
+#define QTSYNCSTATUSLOG_H
+
+#include <QObject>
+#include <qfile.h>
+
+class QtSyncStatusLog : public QObject
+{
+public:
+ QtSyncStatusLog();
+ ~QtSyncStatusLog();
+
+ void clear();
+ void write(QString& string);
+ QStringList lines();
+
+private:
+ void open();
+
+private:
+ QFile mLogFile;
+};
+
+#endif // QTSYNCSTATUSLOG_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/remotemgmt_plat/syncml_ds_error_reporting_api/tsrc/QtSyncStatusSpy/qtsyncstatuslogview.cpp Thu Aug 19 17:35:34 2010 +0530
@@ -0,0 +1,132 @@
+/*
+* Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Source file for the class QtSyncStatusLogView
+*
+*/
+#include <QGraphicsItem>
+#include <QtGui>
+#include <QTimer>
+#include <QWidget>
+#include <QDebug>
+#include <hbdataform.h>
+#include <hblabel.h>
+#include <hbaction.h>
+#include <hbmainwindow.h>
+#include <hbmenu.h>
+#include <hbtoolbar.h>
+#include <hbscrollarea.h>
+#include <hbscrollbar.h>
+#include <hbtextitem.h>
+#include <hblistwidget.h>
+#include <qgraphicslinearlayout.h>
+#include <hbpushbutton.h>
+#include <qlistiterator>
+
+#include "qtsyncstatuslogview.h"
+#include "qtsyncstatuslog.h"
+
+
+QtSyncStatusLogView::QtSyncStatusLogView(QtSyncStatusLog& log, QGraphicsItem *parent)
+ : HbView(parent),
+ mSyncLog(log)
+{
+ setTitle("QtSyncStatusSpy");
+ createMenu();
+
+ QGraphicsLinearLayout* layout = new QGraphicsLinearLayout(Qt::Vertical);
+ HbScrollArea* scrollArea = new HbScrollArea(this);
+ scrollArea->setScrollDirections(Qt::Vertical);
+ QGraphicsLinearLayout* layout2 = new QGraphicsLinearLayout(Qt::Vertical);
+ QGraphicsWidget* content = new QGraphicsWidget(this);
+
+ mTextItem = new HbTextItem();
+ layout2->addItem(mTextItem);
+ layout2->setContentsMargins(5, 5, 5, 5);
+ content->setLayout(layout2);
+ scrollArea->setContentWidget(content);
+
+ layout->addItem(scrollArea);
+ layout->setStretchFactor(scrollArea, 1);
+ setLayout(layout);
+}
+
+QtSyncStatusLogView::~QtSyncStatusLogView()
+{
+
+}
+
+void QtSyncStatusLogView::updateView()
+ {
+ readLog();
+ }
+
+void QtSyncStatusLogView::deleteLog()
+ {
+ mSyncLog.clear();
+ readLog();
+ }
+
+void QtSyncStatusLogView::goToMainView()
+ {
+ emit comingBack();
+ }
+
+void QtSyncStatusLogView::activateView()
+{
+ mainWindow()->setCurrentView(this);
+}
+
+void QtSyncStatusLogView::createMenu()
+{
+ HbMenu* myMenu = menu();
+ connect( myMenu->addAction( tr("Update")), SIGNAL( triggered() ), SLOT( updateView() ) );
+ connect( myMenu->addAction( tr("Delete log")), SIGNAL( triggered() ), SLOT( deleteLog() ) );
+ connect( myMenu->addAction( tr("Back")), SIGNAL( triggered() ), SLOT( goToMainView() ) );
+
+ HbToolBar* myToolBar = toolBar();
+ connect( myToolBar->addAction( tr("Update")), SIGNAL( triggered() ), SLOT( updateView() ) );
+ connect( myToolBar->addAction( tr("Delete log")), SIGNAL( triggered() ), SLOT( deleteLog() ) );
+ connect( myToolBar->addAction( tr("Back")), SIGNAL( triggered() ), SLOT( goToMainView() ) );
+}
+
+void QtSyncStatusLogView::showEvent(QShowEvent* event)
+ {
+ readLog();
+ HbView::showEvent(event);
+ }
+
+void QtSyncStatusLogView::readLog()
+ {
+ QString logData;
+ QString line;
+ QStringList list;
+ QStringList lines;
+ QString prevDate;
+
+ lines = mSyncLog.lines();
+ QListIterator<QString> iter(lines);
+
+ while (iter.hasNext()) {
+ line = iter.next();
+ line.remove(QChar('['));
+ line.remove(QChar(']'));
+ list = line.split(" ");
+ if (list.at(0).compare(prevDate)) {
+ logData.append(list.at(0) + "\n");
+ prevDate = list.at(0);
+ }
+ logData.append(list.at(1) + " " + list.at(2) + list.at(3) + "\n");
+ }
+ mTextItem->setText(logData);
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/remotemgmt_plat/syncml_ds_error_reporting_api/tsrc/QtSyncStatusSpy/qtsyncstatuslogview.h Thu Aug 19 17:35:34 2010 +0530
@@ -0,0 +1,50 @@
+#ifndef QTSYNCSTATUSLOGVIEW_H
+#define QTSYNCSTATUSLOGVIEW_H
+
+#include <QObject>
+#include <hbview.h>
+#include <QFile>
+#include <QTextStream>
+
+class QGraphicsItem;
+class HbDataForm;
+class HbAction;
+class QtSyncStatusModel;
+class HbMainWindow;
+class HbWidget;
+class HbTextItem;
+class QGraphicsLinearLayout;
+class QtSyncStatusLog;
+
+
+class QtSyncStatusLogView : public HbView
+{
+ Q_OBJECT
+
+public:
+ QtSyncStatusLogView(QtSyncStatusLog& log, QGraphicsItem *parent = 0);
+ ~QtSyncStatusLogView();
+
+signals:
+ void comingBack();
+
+public slots:
+ void activateView();
+
+private slots:
+ void updateView();
+ void deleteLog();
+ void goToMainView();
+
+private:
+ void createMenu();
+ void openSyncLogFile();
+ virtual void showEvent(QShowEvent * event);
+ void readLog();
+
+private:
+ HbTextItem* mTextItem;
+ QtSyncStatusLog& mSyncLog;
+};
+
+#endif // QTSYNCSTATUSLOGVIEW_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/remotemgmt_plat/syncml_ds_error_reporting_api/tsrc/QtSyncStatusSpy/qtsyncstatusmodel.cpp Thu Aug 19 17:35:34 2010 +0530
@@ -0,0 +1,270 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:
+ *
+ */
+
+#include <QModelIndex>
+#include <QDateTime>
+#include <QDir>
+#include <hbdataform.h>
+#include <hbdataformmodel.h>
+#include <hbmainwindow.h>
+//#include <hbstyleoptioncommonnote.h> //<hbcommonnote.h> this new header compensate oldone ??
+#include <HbDataFormModelItem.h>
+#include <hbdataformviewitem.h>
+#include <hblineedit.h>
+#include <HbComboBox.h>
+#include <HbPushButton.h>
+#include <HbAbstractButton.h>
+#include <HbLineEdit.h>
+#include <xqsettingsmanager.h>
+#include <xqsettingskey.h>
+#include <XQServiceUtil.h>
+
+#include <nsmloperatorerrorcrkeys.h>
+#include <DataSyncInternalPSKeys.h>
+#include "qtsyncstatusmodel.h"
+#include "qtsyncstatuslog.h"
+
+QtSyncStatusModel::QtSyncStatusModel(QtSyncStatusLog& log, HbDataForm *form, QObject *parent)
+:QObject(parent),
+ mSettingsForm(form),
+ mSettingsModel(0),
+ mSyncLog(log)
+{
+ connect(mSettingsForm, SIGNAL(activated(const QModelIndex)),
+ this, SLOT(itemDisplayed(const QModelIndex)));
+
+ mSettingsManager = new XQSettingsManager(this);
+ mNsmlOpDsSyncErrorCode = new XQSettingsKey(XQSettingsKey::TargetCentralRepository,
+ KCRUidOperatorDatasyncErrorKeys.iUid, KNsmlOpDsSyncErrorCode);
+ mSettingsManager->startMonitoring(*mNsmlOpDsSyncErrorCode);
+ mNsmlOpDsSyncProfUid = new XQSettingsKey(XQSettingsKey::TargetCentralRepository,
+ KCRUidOperatorDatasyncErrorKeys.iUid, KNsmlOpDsSyncProfId);
+ mSettingsManager->startMonitoring(*mNsmlOpDsSyncProfUid);
+ mNsmlOpDsSyncType = new XQSettingsKey(XQSettingsKey::TargetCentralRepository,
+ KCRUidOperatorDatasyncErrorKeys.iUid, KNsmlOpDsSyncType);
+ mSettingsManager->startMonitoring(*mNsmlOpDsSyncType);
+ mNsmlOpDsSyncInitiation = new XQSettingsKey(XQSettingsKey::TargetCentralRepository,
+ KCRUidOperatorDatasyncErrorKeys.iUid, KNsmlOpDsSyncInitiation);
+ mSettingsManager->startMonitoring(*mNsmlOpDsSyncInitiation);
+
+ mDataSyncStatusKey = new XQSettingsKey(XQSettingsKey::TargetPublishAndSubscribe,
+ KPSUidDataSynchronizationInternalKeys.iUid, KDataSyncStatus);
+
+ connect(mSettingsManager, SIGNAL(valueChanged(const XQSettingsKey&, const QVariant&)),
+ this, SLOT(valueChanged(const XQSettingsKey&, const QVariant&)));
+
+ // Read the initial values from the cenrep
+ QVariant value = mSettingsManager->readItemValue(*mNsmlOpDsSyncErrorCode);
+ mSyncErrorCode = value.toUInt();
+ value = mSettingsManager->readItemValue(*mNsmlOpDsSyncProfUid);
+ mSyncProfileUid = value.toUInt();
+ value = mSettingsManager->readItemValue(*mNsmlOpDsSyncType);
+ mSyncType = value.toUInt();
+ value = mSettingsManager->readItemValue(*mNsmlOpDsSyncInitiation);
+ mSyncInitiation = value.toUInt();
+}
+
+QtSyncStatusModel::~QtSyncStatusModel()
+{
+ delete mSettingsModel;
+ delete mSettingsManager;
+ delete mNsmlOpDsSyncErrorCode;
+ delete mNsmlOpDsSyncProfUid;
+ delete mNsmlOpDsSyncType;
+ delete mNsmlOpDsSyncInitiation;
+ delete mDataSyncStatusKey;
+}
+
+void QtSyncStatusModel::initModel()
+{
+ // Remove the model.
+ if (mSettingsForm->model()) {
+ delete mSettingsForm->model();
+ mSettingsForm->setModel(0);
+ mSettingsModel = 0;
+ }
+
+ mSettingsModel = new HbDataFormModel();
+
+ mNsmlOpDsSyncErrorCodeItem = new HbDataFormModelItem(
+ HbDataFormModelItem::TextItem, QString( tr("Sync error code") ), 0);
+ QString errorCode;
+ errorCode.setNum(mSyncErrorCode);
+ mNsmlOpDsSyncErrorCodeItem->setContentWidgetData( "text", errorCode );
+ mNsmlOpDsSyncErrorCodeItem->setContentWidgetData( QString("readOnly"), QString("false") );
+ mSettingsModel->appendDataFormItem(mNsmlOpDsSyncErrorCodeItem);
+
+ mNsmlOpDsSyncProfUidItem = new HbDataFormModelItem(
+ HbDataFormModelItem::TextItem, QString(tr("Sync profile ID")), 0);
+ //HbDataFormModelItem::TextItem, QString(tr("Sync profile ID")), mSettingsModel->invisibleRootItem());
+ QString profileUId;
+ profileUId.setNum(mSyncProfileUid);
+ mNsmlOpDsSyncProfUidItem->setContentWidgetData( "text", profileUId );
+ mNsmlOpDsSyncProfUidItem->setContentWidgetData( QString("readOnly"), QString("false") );
+ mSettingsModel->appendDataFormItem(mNsmlOpDsSyncProfUidItem);
+
+ QStringList syncTypes;
+ syncTypes << tr("ESmlTwoWay")
+ << tr("ESmlOneWayFromServer")
+ << tr("ESmlOneWayFromClient")
+ << tr("ESmlSlowSync")
+ << tr("ESmlRefreshFromServer")
+ << tr("ESmlRefreshFromClient");
+
+ mNsmlOpDsSyncTypeItem = new HbDataFormModelItem();
+ mNsmlOpDsSyncTypeItem->setType(HbDataFormModelItem::ComboBoxItem);
+ mNsmlOpDsSyncTypeItem->setData(HbDataFormModelItem::LabelRole, QString(tr("Sync type")));
+ mNsmlOpDsSyncTypeItem->setContentWidgetData(QString("items"), syncTypes);
+ mNsmlOpDsSyncTypeItem->setContentWidgetData(QString("currentIndex"), mSyncType);
+ mSettingsModel->appendDataFormItem(mNsmlOpDsSyncTypeItem);
+
+ QStringList syncInitiation;
+ syncInitiation << tr("No sync ongoing")
+ << tr("Client initiated")
+ << tr("Server alerted");
+
+ mNsmlOpDsSyncInitiationItem = new HbDataFormModelItem();
+ mNsmlOpDsSyncInitiationItem->setType(HbDataFormModelItem::ComboBoxItem);
+ mNsmlOpDsSyncInitiationItem->setData(HbDataFormModelItem::LabelRole, QString(tr("Sync initiation")));
+ mNsmlOpDsSyncInitiationItem->setContentWidgetData(QString("items"), syncInitiation);
+ mNsmlOpDsSyncInitiationItem->setContentWidgetData(QString("currentIndex"), mSyncInitiation);
+ mSettingsModel->appendDataFormItem(mNsmlOpDsSyncInitiationItem);
+
+ mSettingsForm->setModel(mSettingsModel);
+}
+
+void QtSyncStatusModel::itemDisplayed(const QModelIndex &index)
+{
+ //HbDataFormModelItem *data = static_cast<HbDataFormModelItem*>(index.internalPointer());
+ HbDataFormViewItem *viewItem = static_cast<HbDataFormViewItem*>( mSettingsForm->itemByIndex(index) );
+
+ switch (index.row())
+ {
+ case 0:
+ {
+ HbWidget* contentWidget = viewItem->dataItemContentWidget();
+ mSyncErrorCodeEdit = static_cast<HbLineEdit *>(contentWidget);
+ mSyncErrorCodeEdit->setInputMethodHints(Qt::ImhPreferNumbers);
+ connect(mSyncErrorCodeEdit, SIGNAL(editingFinished()),
+ this, SLOT(handleSyncMLErrorCodeChangeFinished()));
+ break;
+ }
+
+ case 1:
+ {
+ HbWidget* contentWidget = viewItem->dataItemContentWidget();
+ mSyncProfileUidEdit = static_cast<HbLineEdit *>(contentWidget);
+ mSyncProfileUidEdit->setInputMethodHints(Qt::ImhPreferNumbers);
+ connect(mSyncProfileUidEdit, SIGNAL(editingFinished()),
+ this, SLOT(handleProfileUidChangeFinished()));
+ break;
+ }
+
+ case 2:
+ {
+ HbWidget* contentWidget = viewItem->dataItemContentWidget();
+ mmSyncTypeComboBox = static_cast<HbComboBox *>(contentWidget);
+ connect(mmSyncTypeComboBox, SIGNAL(currentIndexChanged(int)),
+ this, SLOT(handleSyncTypeChange(int)));
+ break;
+ }
+
+ case 3:
+ {
+ HbWidget* contentWidget = viewItem->dataItemContentWidget();
+ mSyncInitiationComboBox = static_cast<HbComboBox *>(contentWidget);
+ connect(mSyncInitiationComboBox, SIGNAL(currentIndexChanged(int)),
+ this, SLOT(handleSyncInitiationChange(int)));
+ break;
+ }
+
+ default:
+ break;
+ }
+}
+
+void QtSyncStatusModel::handleSyncErrorCodeChangeFinished()
+{
+ mSettingsManager->writeItemValue(*mNsmlOpDsSyncErrorCode, mSyncErrorCodeEdit->text().toInt());
+}
+
+void QtSyncStatusModel::handleProfileUidChangeFinished()
+{
+ mSettingsManager->writeItemValue(*mNsmlOpDsSyncProfUid, mSyncProfileUidEdit->text().toInt());
+}
+
+void QtSyncStatusModel::handleSyncTypeChange(int index)
+{
+ mSettingsManager->writeItemValue(*mNsmlOpDsSyncType, index);
+}
+
+void QtSyncStatusModel::handleSyncInitiationChange(int index)
+{
+ mSettingsManager->writeItemValue(*mNsmlOpDsSyncInitiation, index);
+}
+
+void QtSyncStatusModel::valueChanged(const XQSettingsKey& key, const QVariant& value)
+{
+ QDateTime dt = QDateTime::currentDateTime();
+ QString logLine;
+
+ unsigned long int crKey = key.key();
+ if (crKey == mNsmlOpDsSyncErrorCode->key()) {
+ mSyncErrorCode = value.toUInt();
+ QString errorCode;
+ errorCode.setNum(mSyncErrorCode);
+ mNsmlOpDsSyncErrorCodeItem->setContentWidgetData( "text", errorCode );
+ logLine.append("[" + dt.toString("dd.MM.yyyy hh:mm:ss") + "] [SyncErrCode: " + errorCode + "]\r\n");
+ }
+ else if (crKey == mNsmlOpDsSyncProfUid->key()) {
+ mSyncProfileUid = value.toUInt();
+ QString profileUId;
+ profileUId.setNum(mSyncProfileUid);
+ mNsmlOpDsSyncProfUidItem->setContentWidgetData( "text", profileUId );
+ logLine.append("[" + dt.toString("dd.MM.yyyy hh:mm:ss") + "] [SyncProfileId: " + profileUId + "]\r\n");
+ }
+ else if (crKey == mNsmlOpDsSyncType->key()) {
+ mSyncType = value.toUInt();
+ QString syncType;
+ syncType.setNum(mSyncType);
+ mNsmlOpDsSyncTypeItem->setContentWidgetData(QString("currentIndex"), mSyncType);
+ logLine.append("[" + dt.toString("dd.MM.yyyy hh:mm:ss") + "] [SyncType: " + syncType + "]\r\n");
+ }
+ else if (crKey == mNsmlOpDsSyncInitiation->key()) {
+ mSyncInitiation = value.toUInt();
+ QString syncInitiation;
+ syncInitiation.setNum(mSyncInitiation);
+ mNsmlOpDsSyncInitiationItem->setContentWidgetData(QString("currentIndex"), mSyncInitiation);
+ logLine.append("[" + dt.toString("dd.MM.yyyy hh:mm:ss") + "] [SyncInitiation: " + syncInitiation + "]\r\n");
+ }
+ mSyncLog.write(logLine);
+ XQServiceUtil::toBackground( false );
+}
+
+void QtSyncStatusModel::clearSyncLog()
+{
+ mSyncLog.clear();
+}
+
+
+void QtSyncStatusModel::publishSyncStatusKey()
+{
+ mSettingsManager->writeItemValue(*mDataSyncStatusKey,EDataSyncRunning12);
+ mSettingsManager->writeItemValue(*mDataSyncStatusKey,EDataSyncNotRunning);
+}
+
+// End of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/remotemgmt_plat/syncml_ds_error_reporting_api/tsrc/QtSyncStatusSpy/qtsyncstatusmodel.h Thu Aug 19 17:35:34 2010 +0530
@@ -0,0 +1,75 @@
+#ifndef QTSYNCSTATUSMODEL_H
+#define QTSYNCSTATUSMODEL_H
+
+#include <QObject>
+#include <QFile>
+#include <QTextStream>
+
+class QPersistentModelIndex;
+class QModelIndex;
+class HbDataForm;
+class HbDataFormModel;
+class HbDataFormModelItem;
+class HbComboBox;
+class HbPushButton;
+class HbAbstractButton;
+class HbLineEdit;
+class XQSettingsManager;
+class XQSettingsKey;
+class HbMainWindow;
+class QtSyncStatusLog;
+
+class QtSyncStatusModel : public QObject
+{
+ Q_OBJECT
+
+public:
+ QtSyncStatusModel(QtSyncStatusLog& log, HbDataForm *form, QObject *parent = 0);
+ ~QtSyncStatusModel();
+ void initModel();
+ void clearSyncLog();
+ void publishSyncStatusKey();
+
+public slots:
+ void itemDisplayed(const QModelIndex &index);
+ void handleSyncErrorCodeChangeFinished();
+ void handleProfileUidChangeFinished();
+ void handleSyncTypeChange(int index);
+ void handleSyncInitiationChange(int index);
+
+ void valueChanged(const XQSettingsKey& key, const QVariant& value);
+
+private:
+ void openSyncLogFile();
+
+
+private:
+ HbDataForm *mSettingsForm;
+ HbDataFormModel *mSettingsModel;
+ HbDataFormModelItem *mNsmlOpDsSyncErrorCodeItem;
+ HbDataFormModelItem* mNsmlOpDsSyncProfUidItem;
+ HbDataFormModelItem *mNsmlOpDsSyncTypeItem;
+ HbDataFormModelItem* mNsmlOpDsSyncInitiationItem;
+
+ HbLineEdit *mSyncErrorCodeEdit;
+ HbLineEdit *mSyncProfileUidEdit;
+ HbComboBox *mmSyncTypeComboBox;
+ HbComboBox *mSyncInitiationComboBox;
+
+ XQSettingsManager *mSettingsManager;
+ XQSettingsKey *mNsmlOpDsSyncErrorCode;
+ XQSettingsKey *mNsmlOpDsSyncProfUid;
+ XQSettingsKey *mNsmlOpDsSyncType;
+ XQSettingsKey *mNsmlOpDsSyncInitiation;
+
+ XQSettingsKey *mDataSyncStatusKey;
+
+ uint mSyncErrorCode;
+ uint mSyncProfileUid;
+ uint mSyncType;
+ uint mSyncInitiation;
+
+ QtSyncStatusLog& mSyncLog;
+ };
+
+#endif // QTSYNCSTATUSMODEL_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/remotemgmt_plat/syncml_ds_error_reporting_api/tsrc/QtSyncStatusSpy/qtsyncstatusspy.iby Thu Aug 19 17:35:34 2010 +0530
@@ -0,0 +1,27 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#include <bldvariant.hrh>
+
+#ifndef __QTSYNCSTATUSSPY_IBY__
+#define __QTSYNCSTATUSSPY_IBY__
+
+file=ABI_DIR\BUILD_DIR\QtSyncStatusSpy.exe PROGRAMS_DIR\QtSyncStatusSpy.exe
+data=\epoc32\data\z\resource\apps\QtSyncStatusSpy.rsc RESOURCE_FILES_DIR\QtSyncStatusSpy.rsc
+data=\epoc32\data\z\private\10003a3f\import\apps\QtSyncStatusSpy_reg.rsc \private\10003a3f\apps\QtSyncStatusSpy_reg.rsc
+
+#endif //__QTSYNCSTATUSSPY_IBY__
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/remotemgmt_plat/syncml_ds_error_reporting_api/tsrc/QtSyncStatusSpy/qtsyncstatusview.cpp Thu Aug 19 17:35:34 2010 +0530
@@ -0,0 +1,663 @@
+/*
+* Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Source file for the class CalenSettingsView
+*
+*/
+#include <QGraphicsItem>
+#include <QtGui>
+#include <QTimer>
+#include <QWidget>
+#include <QDebug>
+#include <hbdataform.h>
+#include <hblabel.h>
+#include <hbaction.h>
+#include <hbmainwindow.h>
+#include <hbmenu.h>
+#include <hbtoolbar.h>
+#include <XQServiceUtil.h>
+
+#include "qtsyncstatusview.h"
+#include "qtsyncstatusmodel.h"
+#include "qtsyncstatuslog.h"
+
+
+QtSyncStatusView::QtSyncStatusView(QtSyncStatusLog& log, QGraphicsItem *parent )
+: HbView(parent)
+{
+ setTitle(tr("QtSyncStatusSpy"));
+ createMenu();
+ mSyncStatusForm = new HbDataForm(this);
+ mSyncStatusModel = new QtSyncStatusModel(log, mSyncStatusForm);
+ mSyncStatusModel->initModel();
+ setWidget(mSyncStatusForm);
+}
+
+QtSyncStatusView::~QtSyncStatusView()
+{
+ delete mSyncStatusModel;
+}
+
+void QtSyncStatusView::publish()
+{
+ mSyncStatusModel->publishSyncStatusKey();
+}
+
+void QtSyncStatusView::viewLog()
+{
+ emit showLog();
+}
+
+void QtSyncStatusView::hideView()
+{
+ XQServiceUtil::toBackground( true );
+}
+
+void QtSyncStatusView::deleteLog()
+{
+ mSyncStatusModel->clearSyncLog();
+}
+
+void QtSyncStatusView::activateView()
+{
+ mainWindow()->setCurrentView(this);
+}
+
+void QtSyncStatusView::createMenu()
+{
+ HbMenu* myMenu = menu();
+ connect( myMenu->addAction( tr("Publish")), SIGNAL( triggered() ), SLOT( publish() ) );
+ connect( myMenu->addAction( tr("View log")), SIGNAL( triggered() ), SLOT( viewLog() ) );
+ connect( myMenu->addAction( tr("Hide")), SIGNAL( triggered() ), SLOT( hideView() ) );
+ connect( myMenu->addAction( tr("Delete log")), SIGNAL( triggered() ), SLOT( deleteLog() ) );
+
+ HbToolBar* myToolBar = toolBar();
+ connect( myToolBar->addAction( tr("Publish")), SIGNAL( triggered() ), SLOT( publish() ) );
+ connect( myToolBar->addAction( tr("View log")), SIGNAL( triggered() ), SLOT( viewLog() ) );
+ connect( myToolBar->addAction( tr("Hide")), SIGNAL( triggered() ), SLOT( hideView() ) );
+ connect( myToolBar->addAction( tr("Delete log")), SIGNAL( triggered() ), SLOT( deleteLog() ) );
+}
+bool QtSyncStatusView::event(QEvent *event)
+{
+ debugEvent(event);
+// if (event->type() == QEvent::ApplicationActivate) {
+// mMainWindow.show();
+// }
+ return HbView::event(event);
+}
+
+void QtSyncStatusView::debugEvent(QEvent *event)
+{
+ qDebug() << "event->type() = " << event->type();
+ switch (event->type())
+ {
+ case 0:
+ qDebug() << "QEvent::None, Not an event";
+ break;
+
+ case 130:
+ qDebug() << "QEvent::AccessibilityDescription, Used to query accessibility description texts (QAccessibleEvent).";
+ break;
+
+ case 119:
+ qDebug() << "QEvent::AccessibilityHelp, Used to query accessibility help texts (QAccessibleEvent).";
+ break;
+
+ case 86:
+ qDebug() << "QEvent::AccessibilityPrepare, Accessibility information is requested.";
+ break;
+
+ case 114:
+ qDebug() << "QEvent::ActionAdded, A new action has been added (QActionEvent).";
+ break;
+
+ case 113:
+ qDebug() << "QEvent::ActionChanged, An action has been changed (QActionEvent).";
+ break;
+
+ case 115:
+ qDebug() << "QEvent::ActionRemoved, An action has been removed (QActionEvent).";
+ break;
+
+ case 99:
+ qDebug() << "QEvent::ActivationChange, A widget's top-level window activation state has changed.";
+ break;
+
+ case 121:
+ qDebug() << "QEvent::ApplicationActivate, The application has been made available to the user.";
+ break;
+
+ //qDebug() << "QEvent::ApplicationActivated, ApplicationActivate This enum has been deprecated. Use ApplicationActivate instead.";
+
+ case 122:
+ qDebug() << "QEvent::ApplicationDeactivate, The application has been suspended, and is unavailable to the user.";
+ break;
+
+ case 36:
+ qDebug() << "QEvent::ApplicationFontChange, The default application font has changed.";
+ break;
+
+ case 37:
+ qDebug() << "QEvent::ApplicationLayoutDirectionChange, The default application layout direction has changed.";
+ break;
+
+ case 38:
+ qDebug() << "QEvent::ApplicationPaletteChange, The default application palette has changed.";
+ break;
+
+ case 35:
+ qDebug() << "QEvent::ApplicationWindowIconChange, The application's icon has changed.";
+ break;
+
+ case 68:
+ qDebug() << "QEvent::ChildAdded, An object gets a child (QChildEvent).";
+ break;
+
+ case 70:
+ qDebug() << "QEvent::ChildInserted , An object gets a child (QChildEvent). Qt3Support only, use ChildAdded instead.";
+ break;
+
+ case 69:
+ qDebug() << "QEvent::ChildPolished, A widget child gets polished (QChildEvent).";
+ break;
+
+ case 71:
+ qDebug() << "QEvent::ChildRemoved, An object loses a child (QChildEvent).";
+ break;
+
+ case 40:
+ qDebug() << "QEvent::Clipboard, The clipboard contents have changed (QClipboardEvent).";
+ break;
+
+ case 19:
+ qDebug() << "QEvent::Close, Widget was closed (QCloseEvent).";
+ break;
+
+ case 200:
+ qDebug() << "QEvent::CloseSoftwareInputPanel, A widget wants to close the software input panel (SIP).";
+ break;
+
+ case 178:
+ qDebug() << "QEvent::ContentsRectChange, The margins of the widget's content rect changed.";
+ break;
+
+ case 82:
+ qDebug() << "QEvent::ContextMenu, Context popup menu (QContextMenuEvent).";
+ break;
+
+ case 183:
+ qDebug() << "QEvent::CursorChange, The widget's cursor has changed.";
+ break;
+
+ case 52:
+ qDebug() << "QEvent::DeferredDelete, The object will be deleted after it has cleaned up.";
+ break;
+
+ case 60:
+ qDebug() << "QEvent::DragEnter, The cursor enters a widget during a drag and drop operation (QDragEnterEvent).";
+ break;
+
+ case 62:
+ qDebug() << "QEvent::DragLeave, The cursor leaves a widget during a drag and drop operation (QDragLeaveEvent).";
+ break;
+
+ case 61:
+ qDebug() << "QEvent::DragMove, A drag and drop operation is in progress (QDragMoveEvent).";
+ break;
+
+ case 63:
+ qDebug() << "QEvent::Drop, A drag and drop operation is completed (QDropEvent).";
+ break;
+
+ case 98:
+ qDebug() << "QEvent::EnabledChange, Widget's enabled state has changed.";
+ break;
+
+ case 10:
+ qDebug() << "QEvent::Enter, Mouse enters widget's boundaries.";
+ break;
+
+ case 150:
+ qDebug() << "QEvent::EnterEditFocus, An editor widget gains focus for editing.";
+ break;
+
+ case 124:
+ qDebug() << "QEvent::EnterWhatsThisMode, Send to toplevel widgets when the application enters What's This? mode.";
+ break;
+
+ case 116:
+ qDebug() << "QEvent::FileOpen, File open request (QFileOpenEvent).";
+ break;
+
+ case 8:
+ qDebug() << "QEvent::FocusIn, Widget gains keyboard focus (QFocusEvent).";
+ break;
+
+ case 9:
+ qDebug() << "QEvent::FocusOut, Widget loses keyboard focus (QFocusEvent).";
+ break;
+
+ case 97:
+ qDebug() << "QEvent::FontChange, Widget's font has changed.";
+ break;
+
+ case 188:
+ qDebug() << "QEvent::GrabKeyboard, Item gains keyboard grab (QGraphicsItem only).";
+ break;
+
+ case 186:
+ qDebug() << "QEvent::GrabMouse, Item gains mouse grab (QGraphicsItem only).";
+ break;
+
+ case 159:
+ qDebug() << "QEvent::GraphicsSceneContextMenu, Context popup menu over a graphics scene (QGraphicsSceneContextMenuEvent).";
+ break;
+
+ case 164:
+ qDebug() << "QEvent::GraphicsSceneDragEnter, The cursor enters a graphics scene during a drag and drop operation (QGraphicsSceneDragDropEvent).";
+ break;
+
+ case 166:
+ qDebug() << "QEvent::GraphicsSceneDragLeave, The cursor leaves a graphics scene during a drag and drop operation (QGraphicsSceneDragDropEvent).";
+ break;
+
+ case 165:
+ qDebug() << "QEvent::GraphicsSceneDragMove, A drag and drop operation is in progress over a scene (QGraphicsSceneDragDropEvent).";
+ break;
+
+ case 167:
+ qDebug() << "QEvent::GraphicsSceneDrop, A drag and drop operation is completed over a scene (QGraphicsSceneDragDropEvent).";
+ break;
+
+ case 163:
+ qDebug() << "QEvent::GraphicsSceneHelp, The user requests help for a graphics scene (QHelpEvent).";
+ break;
+
+ case 160:
+ qDebug() << "QEvent::GraphicsSceneHoverEnter, The mouse cursor enters a hover item in a graphics scene (QGraphicsSceneHoverEvent).";
+ break;
+
+ case 162:
+ qDebug() << "QEvent::GraphicsSceneHoverLeave, The mouse cursor leaves a hover item in a graphics scene (QGraphicsSceneHoverEvent).";
+ break;
+
+ case 161:
+ qDebug() << "QEvent::GraphicsSceneHoverMove, The mouse cursor moves inside a hover item in a graphics scene (QGraphicsSceneHoverEvent).";
+ break;
+
+ case 158:
+ qDebug() << "QEvent::GraphicsSceneMouseDoubleClick, Mouse press again (double click) in a graphics scene (QGraphicsSceneMouseEvent).";
+ break;
+
+ case 155:
+ qDebug() << "QEvent::GraphicsSceneMouseMove, Move mouse in a graphics scene (QGraphicsSceneMouseEvent).";
+ break;
+
+ case 156:
+ qDebug() << "QEvent::GraphicsSceneMousePress, Mouse press in a graphics scene (QGraphicsSceneMouseEvent).";
+ break;
+
+ case 157:
+ qDebug() << "QEvent::GraphicsSceneMouseRelease, Mouse release in a graphics scene (QGraphicsSceneMouseEvent).";
+ break;
+
+ case 182:
+ qDebug() << "QEvent::GraphicsSceneMove, Widget was moved (QGraphicsSceneMoveEvent).";
+ break;
+
+ case 181:
+ qDebug() << "QEvent::GraphicsSceneResize, Widget was resized (QGraphicsSceneResizeEvent).";
+ break;
+
+ case 168:
+ qDebug() << "QEvent::GraphicsSceneWheel, Mouse wheel rolled in a graphics scene (QGraphicsSceneWheelEvent).";
+ break;
+
+ case 18:
+ qDebug() << "QEvent::Hide, Widget was hidden (QHideEvent).";
+ break;
+
+ case 27:
+ qDebug() << "QEvent::HideToParent, A child widget has been hidden.";
+ break;
+
+ case 127:
+ qDebug() << "QEvent::HoverEnter, The mouse cursor enters a hover widget (QHoverEvent).";
+ break;
+
+ case 128:
+ qDebug() << "QEvent::HoverLeave, The mouse cursor leaves a hover widget (QHoverEvent).";
+ break;
+
+ case 129:
+ qDebug() << "QEvent::HoverMove, The mouse cursor moves inside a hover widget (QHoverEvent).";
+ break;
+
+ case 96:
+ qDebug() << "QEvent::IconDrag, The main icon of a window has been dragged away (QIconDragEvent).";
+ break;
+
+ case 101:
+ qDebug() << "QEvent::IconTextChange, Widget's icon text has been changed.";
+ break;
+
+ case 83:
+ qDebug() << "QEvent::InputMethod, An input method is being used (QInputMethodEvent).";
+ break;
+
+ case 6:
+ qDebug() << "QEvent::KeyPress, Key press (QKeyEvent).";
+ break;
+
+ case 7:
+ qDebug() << "QEvent::KeyRelease, Key release (QKeyEvent).";
+ break;
+
+ case 89:
+ qDebug() << "QEvent::LanguageChange, The application translation changed.";
+ break;
+
+ case 90:
+ qDebug() << "QEvent::LayoutDirectionChange, The direction of layouts changed.";
+ break;
+
+ case 76:
+ qDebug() << "QEvent::LayoutRequest, Widget layout needs to be redone.";
+ break;
+
+ case 11:
+ qDebug() << "QEvent::Leave, Mouse leaves widget's boundaries.";
+ break;
+
+ case 151:
+ qDebug() << "QEvent::LeaveEditFocus, An editor widget loses focus for editing.";
+ break;
+
+ case 125:
+ qDebug() << "QEvent::LeaveWhatsThisMode, Send to toplevel widgets when the application leaves What's This? mode.";
+ break;
+
+ case 88:
+ qDebug() << "QEvent::LocaleChange, The system locale has changed.";
+ break;
+
+ case 176:
+ qDebug() << "QEvent::NonClientAreaMouseButtonDblClick, A mouse double click occurred outside the client area.";
+ break;
+
+ case 174:
+ qDebug() << "QEvent::NonClientAreaMouseButtonPress, A mouse button press occurred outside the client area.";
+ break;
+
+ case 175:
+ qDebug() << "QEvent::NonClientAreaMouseButtonRelease, A mouse button release occurred outside the client area.";
+ break;
+
+ case 173:
+ qDebug() << "QEvent::NonClientAreaMouseMove, A mouse move occurred outside the client area.";
+ break;
+
+ case 177:
+ qDebug() << "QEvent::MacSizeChange, The user changed his widget sizes (Mac OS X only).";
+ break;
+
+ case 153:
+ qDebug() << "QEvent::MenubarUpdated, The window's menu bar has been updated.";
+ break;
+
+ case 43:
+ qDebug() << "QEvent::MetaCall, An asynchronous method invocation via QMetaObject::invokeMethod().";
+ break;
+
+ case 102:
+ qDebug() << "QEvent::ModifiedChange, Widgets modification state has been changed.";
+ break;
+
+ case 4:
+ qDebug() << "QEvent::MouseButtonDblClick, Mouse press again (QMouseEvent).";
+ break;
+
+ case 2:
+ qDebug() << "QEvent::MouseButtonPress, Mouse press (QMouseEvent).";
+ break;
+
+ case 3:
+ qDebug() << "QEvent::MouseButtonRelease, Mouse release (QMouseEvent).";
+ break;
+
+ case 5:
+ qDebug() << "QEvent::MouseMove, Mouse move (QMouseEvent).";
+ break;
+
+ case 109:
+ qDebug() << "QEvent::MouseTrackingChange, The mouse tracking state has changed.";
+ break;
+
+ case 13:
+ qDebug() << "QEvent::Move, Widget's position changed (QMoveEvent).";
+ break;
+
+ case 12:
+ qDebug() << "QEvent::Paint, Screen update necessary (QPaintEvent).";
+ break;
+
+ case 39:
+ qDebug() << "QEvent::PaletteChange, Palette of the widget changed.";
+ break;
+
+ case 131:
+ qDebug() << "QEvent::ParentAboutToChange, The widget parent is about to change.";
+ break;
+
+ case 21:
+ qDebug() << "QEvent::ParentChange, The widget parent has changed.";
+ break;
+
+ case 75:
+ qDebug() << "QEvent::Polish, The widget is polished.";
+ break;
+
+ case 74:
+ qDebug() << "QEvent::PolishRequest, The widget should be polished.";
+ break;
+
+ case 123:
+ qDebug() << "QEvent::QueryWhatsThis, The widget should accept the event if it has What's This? help.";
+ break;
+
+ case 199:
+ qDebug() << "QEvent::RequestSoftwareInputPanel, A widget wants to open a software input panel (SIP).";
+ break;
+
+ case 14:
+ qDebug() << "QEvent::Resize, Widget's size changed (QResizeEvent).";
+ break;
+
+ case 117:
+ qDebug() << "QEvent::Shortcut, Key press in child for shortcut key handling (QShortcutEvent).";
+ break;
+
+ case 51:
+ qDebug() << "QEvent::ShortcutOverride, Key press in child, for overriding shortcut key handling (QKeyEvent).";
+ break;
+
+ case 17:
+ qDebug() << "QEvent::Show, Widget was shown on screen (QShowEvent).";
+ break;
+
+ case 26:
+ qDebug() << "QEvent::ShowToParent, A child widget has been shown.";
+ break;
+
+ case 50:
+ qDebug() << "QEvent::SockAct, Socket activated, used to implement QSocketNotifier.";
+ break;
+
+ case 192:
+ qDebug() << "QEvent::StateMachineSignal, A signal delivered to a state machine (QStateMachine::SignalEvent).";
+ break;
+
+ case 193:
+ qDebug() << "QEvent::StateMachineWrapped, The event is a wrapper for, i.e., contains, another event (QStateMachine::WrappedEvent).";
+ break;
+
+ case 112:
+ qDebug() << "QEvent::StatusTip, A status tip is requested (QStatusTipEvent).";
+ break;
+
+ case 100:
+ qDebug() << "QEvent::StyleChange, Widget's style has been changed.";
+ break;
+
+ case 87:
+ qDebug() << "QEvent::TabletMove, Wacom tablet move (QTabletEvent).";
+ break;
+
+ case 92:
+ qDebug() << "QEvent::TabletPress, Wacom tablet press (QTabletEvent).";
+ break;
+
+ case 93:
+ qDebug() << "QEvent::TabletRelease, Wacom tablet release (QTabletEvent).";
+ break;
+
+ case 94:
+ qDebug() << "QEvent::OkRequest, Ok button in decoration pressed. Supported only for Windows CE.";
+ break;
+
+ case 171:
+ qDebug() << "QEvent::TabletEnterProximity, Wacom tablet enter proximity event (QTabletEvent), sent to QApplication.";
+ break;
+
+ case 172:
+ qDebug() << "QEvent::TabletLeaveProximity, Wacom tablet leave proximity event (QTabletEvent), sent to QApplication.";
+ break;
+
+ case 1:
+ qDebug() << "QEvent::Timer, Regular timer events (QTimerEvent).";
+ break;
+
+ case 120:
+ qDebug() << "QEvent::ToolBarChange, The toolbar button is toggled on Mac OS X.";
+ break;
+
+ case 110:
+ qDebug() << "QEvent::ToolTip, A tooltip was requested (QHelpEvent).";
+ break;
+
+ case 184:
+ qDebug() << "QEvent::ToolTipChange, The widget's tooltip has changed.";
+ break;
+
+ case 189:
+ qDebug() << "QEvent::UngrabKeyboard, Item loses keyboard grab (QGraphicsItem only).";
+ break;
+
+ case 187:
+ qDebug() << "QEvent::UngrabMouse, Item loses mouse grab (QGraphicsItem only).";
+ break;
+
+ case 78:
+ qDebug() << "QEvent::UpdateLater, The widget should be queued to be repainted at a later time.";
+ break;
+
+ case 77:
+ qDebug() << "QEvent::UpdateRequest, The widget should be repainted.";
+ break;
+
+ case 111:
+ qDebug() << "QEvent::WhatsThis, The widget should reveal What's This? help (QHelpEvent).";
+ break;
+
+ case 118:
+ qDebug() << "QEvent::WhatsThisClicked, A link in a widget's What's This? help was clicked.";
+ break;
+
+ case 31:
+ qDebug() << "QEvent::Wheel, Mouse wheel rolled (QWheelEvent).";
+ break;
+
+ case 132:
+ qDebug() << "QEvent::WinEventAct, A Windows-specific activation event has occurred.";
+ break;
+
+ case 24:
+ qDebug() << "QEvent::WindowActivate, Window was activated.";
+ break;
+
+ case 103:
+ qDebug() << "QEvent::WindowBlocked, The window is blocked by a modal dialog.";
+ break;
+
+ case 25:
+ qDebug() << "QEvent::WindowDeactivate, Window was deactivated.";
+ break;
+
+ case 34:
+ qDebug() << "QEvent::WindowIconChange, The window's icon has changed.";
+ break;
+
+ case 105:
+ qDebug() << "QEvent::WindowStateChange, The window's state (minimized, maximized or full-screen) has changed (QWindowStateChangeEvent).";
+ break;
+
+ case 33:
+ qDebug() << "QEvent::WindowTitleChange, The window title has changed.";
+ break;
+
+ case 104:
+ qDebug() << "QEvent::WindowUnblocked, The window is unblocked after a modal dialog exited.";
+ break;
+
+ case 126:
+ qDebug() << "QEvent::ZOrderChange, The widget's z-order has changed. This event is never sent to top level windows.";
+ break;
+
+ case 169:
+ qDebug() << "QEvent::KeyboardLayoutChange, The keyboard layout has changed.";
+ break;
+
+ case 170:
+ qDebug() << "QEvent::DynamicPropertyChange, A dynamic property was added, changed or removed from the object.";
+ break;
+
+ case 194:
+ qDebug() << "QEvent::TouchBegin, Beginning of a sequence of touch-screen and/or track-pad events (QTouchEvent)";
+ break;
+
+ case 195:
+ qDebug() << "QEvent::TouchUpdate, Touch-screen event (QTouchEvent)";
+ break;
+
+ case 196:
+ qDebug() << "QEvent::TouchEnd, End of touch-event sequence (QTouchEvent)";
+ break;
+
+ case 203:
+ qDebug() << "QEvent::WinIdChange, The window system identifer for this native widget has changed";
+ break;
+
+ case 198:
+ qDebug() << "QEvent::Gesture, A gesture was triggered (QGestureEvent)";
+ break;
+
+ case 202:
+ qDebug() << "QEvent::GestureOverride, A gesture override was triggered (QGestureEvent)";
+ break;
+
+ default:
+ break;
+ }
+}
+
+// End of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/remotemgmt_plat/syncml_ds_error_reporting_api/tsrc/QtSyncStatusSpy/qtsyncstatusview.h Thu Aug 19 17:35:34 2010 +0530
@@ -0,0 +1,45 @@
+#ifndef QTSYNCSTATUSVIEW_H
+#define QTSYNCSTATUSVIEW_H
+
+#include <QObject>
+#include <hbview.h>
+
+class QGraphicsItem;
+class HbDataForm;
+class HbAction;
+class QtSyncStatusModel;
+class HbMainWindow;
+class QtSyncStatusLog;
+
+class QtSyncStatusView : public HbView
+{
+ Q_OBJECT
+
+public:
+ QtSyncStatusView(QtSyncStatusLog& log, QGraphicsItem *parent = 0);
+ ~QtSyncStatusView();
+
+signals:
+ void showLog();
+
+public slots:
+ void publish();
+ void viewLog();
+ void hideView();
+ void deleteLog();
+ void activateView();
+
+private:
+ void createMenu();
+
+ virtual bool event(QEvent *event);
+
+ void debugEvent(QEvent *event);
+
+private:
+ HbDataForm *mSyncStatusForm;
+ QtSyncStatusModel *mSyncStatusModel;
+};
+
+#endif // QTSYNCSTATUSVIEW_H
+
--- a/syncmlfw/common/alertqueue/bld/NSmlAlertQueue.mmp Fri Aug 06 18:29:23 2010 +0530
+++ b/syncmlfw/common/alertqueue/bld/NSmlAlertQueue.mmp Thu Aug 19 17:35:34 2010 +0530
@@ -65,7 +65,7 @@
LIBRARY euser.lib estor.lib bafl.lib efsrv.lib nsmlwbxml.lib
LIBRARY nsmlhistorylog.lib
-LIBRARY nsmldssettings.lib
+LIBRARY NSmlDSSettings.lib
LIBRARY nsmldmsettings.lib
LIBRARY nsmldshostclient.lib
LIBRARY nsmlagentcommon.lib
--- a/syncmlfw/common/alertqueue/src/NSmlAlertHandler.cpp Fri Aug 06 18:29:23 2010 +0530
+++ b/syncmlfw/common/alertqueue/src/NSmlAlertHandler.cpp Thu Aug 19 17:35:34 2010 +0530
@@ -62,7 +62,7 @@
{
Cancel();
- if( !iHistoryArray )
+ if( iHistoryArray )
{
iHistoryArray->SetOwnerShip( ETrue );
delete iHistoryArray;
--- a/syncmlfw/common/alertqueue/src/NSmlDSAlertParser11.cpp Fri Aug 06 18:29:23 2010 +0530
+++ b/syncmlfw/common/alertqueue/src/NSmlDSAlertParser11.cpp Thu Aug 19 17:35:34 2010 +0530
@@ -24,7 +24,7 @@
#include <barsc.h>
#include <s32mem.h>
#include <data_caging_path_literals.hrh>
-#include <NSmlDSTypesRes.rsg>
+#include <nsmldstypesres.rsg>
#include <nsmlconstants.h>
#include <nsmlunicodeconverter.h>
@@ -217,27 +217,26 @@
SmlMetInfMetInf_t* metInf = NULL;
TPtr8 mediaType( NULL, 0, 0 );
-
- if ( aAlert->itemList->item->meta )
- {
- if ( aAlert->itemList->item->meta->content &&
- aAlert->itemList->item->meta->contentType == SML_PCDATA_EXTENSION &&
- aAlert->itemList->item->meta->extension == SML_EXT_METINF )
- {
- metInf = (SmlMetInfMetInf_t*) aAlert->itemList->item->meta->content;
-
- if ( metInf->type )
- {
- mediaType.Set( static_cast<TUint8*>( metInf->type->content ), metInf->type->length, metInf->type->length );
- TrimRightSpaceAndNull( mediaType );
- }
- }
- }
-
+
if ( aAlert->itemList )
{
if (aAlert->itemList->item)
- {
+ {
+ if ( aAlert->itemList->item->meta )
+ {
+ if ( aAlert->itemList->item->meta->content &&
+ aAlert->itemList->item->meta->contentType == SML_PCDATA_EXTENSION &&
+ aAlert->itemList->item->meta->extension == SML_EXT_METINF )
+ {
+ metInf = (SmlMetInfMetInf_t*) aAlert->itemList->item->meta->content;
+
+ if ( metInf->type )
+ {
+ mediaType.Set( static_cast<TUint8*>( metInf->type->content ), metInf->type->length, metInf->type->length );
+ TrimRightSpaceAndNull( mediaType );
+ }
+ }
+ }
if ( aAlert->itemList->item->source )
{
HBufC8* remotePath = NULL;
@@ -253,7 +252,7 @@
}
CleanupStack::PopAndDestroy(); // remotePath
- }
+ }
}
}
--- a/syncmlfw/common/alertqueue/src/NSmlDSAlertParser12.cpp Fri Aug 06 18:29:23 2010 +0530
+++ b/syncmlfw/common/alertqueue/src/NSmlDSAlertParser12.cpp Thu Aug 19 17:35:34 2010 +0530
@@ -20,7 +20,7 @@
#include <barsread.h>
#include <barsc.h>
#include <s32mem.h>
-#include <NSmlDSTypesRes.rsg>
+#include <nsmldstypesres.rsg>
#include <data_caging_path_literals.hrh>
#include <nsmlconstants.h>
--- a/syncmlfw/common/http/inc/nsmlhttpclient.h Fri Aug 06 18:29:23 2010 +0530
+++ b/syncmlfw/common/http/inc/nsmlhttpclient.h Thu Aug 19 17:35:34 2010 +0530
@@ -40,6 +40,8 @@
KCouldNotNotifyBodyDataPart
};
+// FORWARD DECLARATIONS
+class CRepository;
//============================================================
// Class CHttpEventHandler declaration
@@ -64,6 +66,9 @@
private:
CNSmlHTTP* iAgent;
MHTTPDataSupplier* iRespBody;
+ //For storing Server Status Code
+ CRepository* iRepositorySSC;
+ TBool iErrorReportingEnabled;
private:
friend class CNSmlHTTP;
--- a/syncmlfw/common/http/src/nsmlhttpclient.cpp Fri Aug 06 18:29:23 2010 +0530
+++ b/syncmlfw/common/http/src/nsmlhttpclient.cpp Thu Aug 19 17:35:34 2010 +0530
@@ -19,6 +19,13 @@
#include "nsmlhttpclient.h"
#include "nsmlerror.h"
#include <featmgr.h>
+#include <nsmloperatorerrorcrkeys.h>
+#include <nsmloperatordatacrkeys.h> // KCRUidOperatorDatasyncInternalKeys
+#include <centralrepository.h>
+
+//CONSTANTS
+const TInt KErrorCodeRangeFirst = 400;
+const TInt KErrorCodeRangeLast = 516;
//Fix to Remove the Bad Compiler Warnings
#ifndef __WINS__
@@ -48,6 +55,14 @@
{
FeatureManager::InitializeLibL();
iAgent = aAgent;
+
+ CRepository* rep = NULL;
+ rep = CRepository::NewL( KCRUidOperatorDatasyncInternalKeys );
+ CleanupStack::PushL( rep );
+ rep->Get( KNsmlOpDsHttpErrorReporting, iErrorReportingEnabled );
+ CleanupStack::PopAndDestroy( rep );
+
+ iRepositorySSC = CRepository::NewL( KCRUidOperatorDatasyncErrorKeys );
}
//------------------------------------------------------------
// CHttpEventHandler::~CHttpEventHandler()
@@ -55,7 +70,8 @@
//------------------------------------------------------------
CHttpEventHandler::~CHttpEventHandler()
{
- FeatureManager::UnInitializeLib();
+ FeatureManager::UnInitializeLib();
+ delete iRepositorySSC;
}
//------------------------------------------------------------
// CHttpEventHandler::NewLC()
@@ -123,6 +139,15 @@
if ( contentTypeStr != KSmlContentTypeDS
&& contentTypeStr != KSmlContentTypeDM )
{
+ if( this->iAgent->iSession == ESyncMLDSSession )
+ {
+ if( iErrorReportingEnabled && ( ( status >= KErrorCodeRangeFirst )
+ && ( status <= KErrorCodeRangeLast ) ) )
+ {
+ iRepositorySSC->Set( KNsmlOpDsSyncErrorCode, status );
+ }
+ }
+
//Error fix for BPSS-7H7H5S
DBG_FILE( _S8("CHttpEventHandler::MHFRunL() There is a mismatch in the Content Type") );
--- a/syncmlfw/common/sosserver/bld/nsmlsosserver.mmp Fri Aug 06 18:29:23 2010 +0530
+++ b/syncmlfw/common/sosserver/bld/nsmlsosserver.mmp Thu Aug 19 17:35:34 2010 +0530
@@ -79,7 +79,7 @@
SOURCE NSmlJobObject.cpp
LIBRARY euser.lib estor.lib ecom.lib bafl.lib efsrv.lib nsmldebug.lib edbms.lib
-LIBRARY nsmldssettings.lib
+LIBRARY NSmlDSSettings.lib
LIBRARY nsmldmsettings.lib
LIBRARY nsmltransport.lib
LIBRARY nsmltransporthandler.lib
--- a/syncmlfw/common/sosserver/src/nsmlsoshandler.cpp Fri Aug 06 18:29:23 2010 +0530
+++ b/syncmlfw/common/sosserver/src/nsmlsoshandler.cpp Thu Aug 19 17:35:34 2010 +0530
@@ -813,26 +813,19 @@
CNSmlDMSettings* settings = CNSmlDMSettings::NewLC();
CNSmlDMProfile* prof = settings->ProfileL( iCurrentJob->ProfileId() );
if(prof)
+ {
+ CleanupStack::PushL( prof );
+ if ( iCurrentJob->iPending || prof->IntValue( EDMProfileHidden ))
{
- CleanupStack::PushL( prof );
- }
-
- if ( iCurrentJob->iPending || prof->IntValue( EDMProfileHidden ))
- {
- syncInit = EServerAlerted;
+ syncInit = EServerAlerted;
}
- if ( !iCurrentJob->TransportId() )
- {
- if ( prof )
- {
- iCurrentJob->SetTransportId( prof->IntValue( EDMProfileTransportId ) );
- }
+ if ( !iCurrentJob->TransportId() )
+ {
+ iCurrentJob->SetTransportId( prof->IntValue( EDMProfileTransportId ) );
}
- if(prof)
- {
CleanupStack::PopAndDestroy( prof );
- }
+ }
CleanupStack::PopAndDestroy( settings );
--- a/syncmlfw/common/sosserver/src/nsmlsossession.cpp Fri Aug 06 18:29:23 2010 +0530
+++ b/syncmlfw/common/sosserver/src/nsmlsossession.cpp Thu Aug 19 17:35:34 2010 +0530
@@ -461,6 +461,8 @@
if ( !iDMAuthInfo )
{
aMessage.Complete( KErrNotFound );
+ _DBG_FILE("CNSmlSOSSession::GetDMAuthInfoL(): iDMAuthInfo is NULL");
+ return;
}
aMessage.WriteL( 0, iDMAuthInfo->Ptr(0), 0 );
aMessage.Complete( KErrNone );
@@ -1545,6 +1547,7 @@
if ( !log )
{
aMessage.Complete( KErrBadHandle );
+ return;
}
log->ResetL();
aMessage.Complete(KErrNone);
--- a/syncmlfw/common/sosserver/src/nsmlsosthread.cpp Fri Aug 06 18:29:23 2010 +0530
+++ b/syncmlfw/common/sosserver/src/nsmlsosthread.cpp Thu Aug 19 17:35:34 2010 +0530
@@ -834,52 +834,27 @@
//
void CNSmlNotifierObserver::ConnectToNotifierL( const TSyncMLAppLaunchNotifParams& aParam )
{
- _DBG_FILE( "CNSmlNotifierObserver::ConnectToNotifierL:Begin" );
- iTimeOut = EFalse;
-
- /*if ( !IsActive() )
- {
- SetActive();
- }*/
-
-
-
+ _DBG_FILE( "CNSmlNotifierObserver::ConnectToNotifierL:Begin" );
+ iTimeOut = EFalse;
if ( !KNSmlWaitNotifierForEver )
{
iNotifierTimeOut.LaunchNotifierTimer( this );
}
- TInt err = KErrNone;
-
- /* if (!iHbSyncmlNotifierEnabled) //Syncml notifier
- err = iNotifier.Connect();
-*/
- if (err == KErrNone)
- {
- if (!iHbSyncmlNotifierEnabled)
- {
-// iNotifier.StartNotifierAndGetResponse(iStatus, KUidNotifier,
-// data, iResBuf);
- LOGSTRING2( "CNSmlNotifierObserver::ConnectToNotifierL %d after connect, StartNotifierAndGetResponse and after setactive" , iStatus.Int());
- }
- else
- {
+ if (!iHbSyncmlNotifierEnabled)
+ {
+ LOGSTRING2( "CNSmlNotifierObserver::ConnectToNotifierL %d after connect, StartNotifierAndGetResponse and after setactive" , iStatus.Int());
+ }
+ else
+ {
iStatus = KRequestPending;
- HbNotifierObserverL(aParam);
- }
- if ( !IsActive() )
- {
- SetActive();
- }
- }
- else
- {
- LOGSTRING("Stop job error connecting to notifier");
- // Stop job. Error connecting to notifier.
- TRequestStatus* sStatus = &iStatus;
- User::RequestComplete( sStatus, err );
- }
+ HbNotifierObserverL(aParam);
+ }
+ if ( !IsActive() )
+ {
+ SetActive();
+ }
_DBG_FILE("CNSmlNotifierObserver::ConnectToNotifierL:End");
}
--- a/syncmlfw/common/sosserver_clientapi/bld/NSmlClientAPI.mmp Fri Aug 06 18:29:23 2010 +0530
+++ b/syncmlfw/common/sosserver_clientapi/bld/NSmlClientAPI.mmp Thu Aug 19 17:35:34 2010 +0530
@@ -67,7 +67,7 @@
SYSTEMINCLUDE /epoc32/include/ecom
SYSTEMINCLUDE /epoc32/include/libc
-LIBRARY euser.lib estor.lib FeatMgr.lib bafl.lib
+LIBRARY euser.lib estor.lib featmgr.lib bafl.lib
LIBRARY eikcore.lib efsrv.lib ecom.lib
LIBRARY nsmltransporthandler.lib
LIBRARY nsmldebug.lib
--- a/syncmlfw/common/sosserver_transporthandler/src/NSmlTransportHandler.cpp Fri Aug 06 18:29:23 2010 +0530
+++ b/syncmlfw/common/sosserver_transporthandler/src/NSmlTransportHandler.cpp Thu Aug 19 17:35:34 2010 +0530
@@ -24,7 +24,7 @@
#include <f32file.h>
#include <SyncMLTransportProperties.h>
#include <data_caging_path_literals.hrh>
-#include <NSmlTransport.rsg>
+#include <nsmltransport.rsg>
#include <nsmlconstants.h>
#include "NSmlTransportHandler.h"
--- a/syncmlfw/common/syncagent/bld/NSmlAgentCommon.mmp Fri Aug 06 18:29:23 2010 +0530
+++ b/syncmlfw/common/syncagent/bld/NSmlAgentCommon.mmp Thu Aug 19 17:35:34 2010 +0530
@@ -75,9 +75,10 @@
LIBRARY nsmlxml.lib
LIBRARY centralrepository.lib
LIBRARY inetprotutil.lib
+LIBRARY bafl.lib
#ifdef ARMCC
-LIBRARY ECOM.LIB
+LIBRARY ecom.lib
#endif
//RD_AUTO_RESTART
LIBRARY commdb.lib
--- a/syncmlfw/common/syncagent/inc/NSmlCmdsBase.h Fri Aug 06 18:29:23 2010 +0530
+++ b/syncmlfw/common/syncagent/inc/NSmlCmdsBase.h Thu Aug 19 17:35:34 2010 +0530
@@ -166,7 +166,7 @@
//
public: // Data
-#ifdef __NOTRANSPORT
+#if defined (__NOTRANSPORT) || defined (_DEBUG)
TPtr8 BufferAreaForDebugDumpL();
#endif
--- a/syncmlfw/common/syncagent/src/NSmlAgentBase.cpp Fri Aug 06 18:29:23 2010 +0530
+++ b/syncmlfw/common/syncagent/src/NSmlAgentBase.cpp Thu Aug 19 17:35:34 2010 +0530
@@ -42,8 +42,9 @@
#include "NSmlURI.h"
#include "nsmltransport.h"
#include "nsmlagenttestdefines.h"
-#ifdef __NOTRANSPORT
+#if defined (__NOTRANSPORT) || defined (_DEBUG)
#include "wbxml2xmlconverter.h"
+#include <bautils.h>
#endif
//Rnd_AutoRestart
#include <es_sock.h> // RConnection RSocket
@@ -1636,6 +1637,36 @@
{
DBG_FILE(_S8("CNSmlAgentBase::SendDataIssueL begins"));
TPtrC8 document( iSyncMLCmds->GeneratedDocument() );
+
+#ifdef _DEBUG
+ {
+ CWbxml2XmlConverter* c = CWbxml2XmlConverter::NewLC();
+ c->ConvertL( document.Ptr(), document.Length() );
+ RFs fs;
+ User::LeaveIfError( fs.Connect() ); // create connect to fileserver
+ CleanupClosePushL( fs );
+ if( !BaflUtils::FolderExists( fs, _L("C:\\logs\\Sync\\") ) )
+ {
+ fs.MkDirAll( _L("C:\\logs\\Sync\\") );
+ }
+ _LIT( KLogFile, "C:\\logs\\Sync\\SendDataIssue.txt" );
+ RFile logFile;
+ CleanupClosePushL( logFile );
+
+ TInt ret = logFile.Open( fs, KLogFile, EFileShareExclusive|EFileWrite ); // open file
+ if( ret == KErrNotFound ) // if file does not exist, create it
+ {
+ logFile.Create( fs, KLogFile, EFileShareExclusive|EFileWrite );
+ }
+
+ TInt size = 0;
+ logFile.Size( size );
+ logFile.Write( size, c->Document() );
+ _LIT8( KNewLine, "\n\n" );
+ logFile.Write( KNewLine );
+ CleanupStack::PopAndDestroy( 3, c );//privateFile, fs, c
+ }
+#endif
#ifdef __NOTRANSPORT
CWbxml2XmlConverter* c = CWbxml2XmlConverter::NewLC();
c->ConvertL(document.Ptr(), document.Length());
@@ -1682,7 +1713,41 @@
#ifndef __NOTRANSPORT
iBufferArea.Set(iSyncMLCmds->BufferAreaForParsingL());
iTransport->Receive( iBufferArea, iStatus );
-
+
+#ifdef _DEBUG
+ {
+ TPtrC8 document( iSyncMLCmds->BufferAreaForDebugDumpL() );
+ CWbxml2XmlConverter* c = CWbxml2XmlConverter::NewLC();
+ TRAPD( err, c->ConvertL( document.Ptr(), document.Length() ) );
+ if ( err == KErrNone )
+ {
+ c->ConvertL( document.Ptr(), document.Length() );
+ RFs fs;
+ User::LeaveIfError( fs.Connect() ); // create connect to fileserver
+ CleanupClosePushL( fs );
+ if( !BaflUtils::FolderExists( fs, _L("C:\\logs\\Sync\\") ) )
+ {
+ fs.MkDirAll( _L("C:\\logs\\Sync\\") );
+ }
+ _LIT( KLogFile, "C:\\logs\\Sync\\ReceiveDataIssue.txt" );
+ RFile logFile;
+ CleanupClosePushL( logFile );
+
+ TInt ret = logFile.Open( fs, KLogFile, EFileShareExclusive|EFileWrite ); // open file
+ if( ret == KErrNotFound ) // if file does not exist, create it
+ {
+ logFile.Create( fs, KLogFile, EFileShareExclusive|EFileWrite );
+ }
+ TInt size = 0;
+ logFile.Size( size );
+ logFile.Write( size, c->Document() );
+ _LIT8( KNewLine, "\n\n" );
+ logFile.Write( KNewLine );
+ CleanupStack::PopAndDestroy( 3, c );//logFile, fs, c
+ }
+ }
+#endif
+
#else
//TESTSEQU
_LIT(KServerInitFile,"C:\\system\\data\\servinit.wbxml");
--- a/syncmlfw/common/syncagent/src/nsmlcmdsbase.cpp Fri Aug 06 18:29:23 2010 +0530
+++ b/syncmlfw/common/syncagent/src/nsmlcmdsbase.cpp Thu Aug 19 17:35:34 2010 +0530
@@ -1648,7 +1648,7 @@
// CNSmlCmdsBase::BufferAreaForDebugDumpL
//
// ---------------------------------------------------------
-#ifdef __NOTRANSPORT
+#if defined (__NOTRANSPORT) || defined (_DEBUG)
TPtr8 CNSmlCmdsBase::BufferAreaForDebugDumpL()
{
--- a/syncmlfw/common/transport/bld/nsmltransport.mmp Fri Aug 06 18:29:23 2010 +0530
+++ b/syncmlfw/common/transport/bld/nsmltransport.mmp Thu Aug 19 17:35:34 2010 +0530
@@ -47,17 +47,17 @@
USERINCLUDE ../inc ../../http/inc ../../inc ../../wbxml/inc ../../wbxml/inc/syncml ../../syncagent/inc ../../debug/inc
USERINCLUDE ../../obex/obexcommserver/inc ../../obex/obexserverbinding/inc ../../obex/obexclient/inc
-LIBRARY euser.lib
+LIBRARY euser.lib
LIBRARY bluetooth.lib
LIBRARY nsmldebug.lib
-LIBRARY commonengine.lib // 1.2 CHANGES: Offline mode
-LIBRARY commdb.lib
-LIBRARY cmmanager.lib
-LIBRARY CENTRALREPOSITORY.LIB
-LIBRARY FeatMgr.lib
+LIBRARY CommonEngine.lib // 1.2 CHANGES: Offline mode
+LIBRARY commdb.lib
+LIBRARY cmmanager.lib
+LIBRARY centralrepository.lib
+LIBRARY featmgr.lib
#ifdef ARMCC
-LIBRARY ECOM.LIB
+LIBRARY ecom.lib
#endif
SMPSAFE
--- a/syncmlfw/common/wbxml/bld/nsmlwbxml.mmp Fri Aug 06 18:29:23 2010 +0530
+++ b/syncmlfw/common/wbxml/bld/nsmlwbxml.mmp Thu Aug 19 17:35:34 2010 +0530
@@ -70,7 +70,7 @@
LIBRARY euser.lib estor.lib
#ifdef ARMCC
-LIBRARY ECOM.LIB
+LIBRARY ecom.lib
#endif
SMPSAFE
--- a/syncmlfw/common/wbxml/src/syncml/smldtd.cpp Fri Aug 06 18:29:23 2010 +0530
+++ b/syncmlfw/common/wbxml/src/syncml/smldtd.cpp Thu Aug 19 17:35:34 2010 +0530
@@ -193,7 +193,7 @@
}
else
{
- delete content;
+ User::Free(content);
}
content = 0;
}
--- a/syncmlfw/common/xml/bld/nsmlxml.mmp Fri Aug 06 18:29:23 2010 +0530
+++ b/syncmlfw/common/xml/bld/nsmlxml.mmp Thu Aug 19 17:35:34 2010 +0530
@@ -64,7 +64,7 @@
LIBRARY nsmlwbxml.lib euser.lib estor.lib
#ifdef ARMCC
-LIBRARY ECOM.LIB
+LIBRARY ecom.lib
#endif
SMPSAFE
Binary file syncmlfw/conf/operatordatasync.confml has changed
Binary file syncmlfw/conf/operatordatasync_2001E2E1.crml has changed
Binary file syncmlfw/conf/operatordatasyncerror.confml has changed
Binary file syncmlfw/conf/operatordatasyncerror_2001FDF1.crml has changed
--- a/syncmlfw/dm/provisioningadapter/bld/NSmlDmProvisioningAdapter.mmp Fri Aug 06 18:29:23 2010 +0530
+++ b/syncmlfw/dm/provisioningadapter/bld/NSmlDmProvisioningAdapter.mmp Thu Aug 19 17:35:34 2010 +0530
@@ -50,7 +50,7 @@
LIBRARY euser.lib commdb.lib charconv.lib bafl.lib efsrv.lib cmmanager.lib
-LIBRARY nsmldebug.lib syncmlclientapi.lib nsmlprivateapi.lib
+LIBRARY nsmldebug.lib syncmlclientapi.lib NSmlPrivateAPI.lib
LIBRARY provisioningengine.lib featmgr.lib centralrepository.lib
#ifdef ARMCC
--- a/syncmlfw/dm/provisioningadapter/src/NSmlDmProvisioningAdapter.cpp Fri Aug 06 18:29:23 2010 +0530
+++ b/syncmlfw/dm/provisioningadapter/src/NSmlDmProvisioningAdapter.cpp Thu Aug 19 17:35:34 2010 +0530
@@ -23,7 +23,7 @@
#include <cdbcols.h> // CommsDB columname defs
#include <stringresourcereader.h>
#include <barsread.h>
-#include <NSmlDMProvisioningAdapter.rsg>
+#include <nsmldmprovisioningadapter.rsg>
#include <f32file.h>
#include <bautils.h>
#include <utf.h>
--- a/syncmlfw/dm/wappushalert/bld/nsmldmwappushalert.mmp Fri Aug 06 18:29:23 2010 +0530
+++ b/syncmlfw/dm/wappushalert/bld/nsmldmwappushalert.mmp Thu Aug 19 17:35:34 2010 +0530
@@ -49,5 +49,5 @@
LIBRARY ecom.lib
LIBRARY wappushutils.lib
LIBRARY nsmldebug.lib
-LIBRARy nsmlprivateapi.lib
+LIBRARy NSmlPrivateAPI.lib
SMPSAFE
--- a/syncmlfw/ds/provisioningadapter/bld/NSmlDsProvisioningAdapter.mmp Fri Aug 06 18:29:23 2010 +0530
+++ b/syncmlfw/ds/provisioningadapter/bld/NSmlDsProvisioningAdapter.mmp Thu Aug 19 17:35:34 2010 +0530
@@ -51,6 +51,6 @@
LIBRARY euser.lib ECom.lib commdb.lib charconv.lib cmmanager.lib
LIBRARY nsmldbcaps.lib bafl.lib efsrv.lib nsmldebug.lib syncmlclientapi.lib
-LIBRARY ProvisioningEngine.lib
+LIBRARY ProvisioningEngine.lib centralrepository.lib
SMPSAFE
--- a/syncmlfw/ds/provisioningadapter/inc/NSmlDsProvisioningAdapter.h Fri Aug 06 18:29:23 2010 +0530
+++ b/syncmlfw/ds/provisioningadapter/inc/NSmlDsProvisioningAdapter.h Thu Aug 19 17:35:34 2010 +0530
@@ -130,6 +130,9 @@
void GetTitleL();
TDesC8& ConvertTo8LC( const TDesC& aSource );
TDesC8& ConvertTo8L( const TDesC& aSource );
+ TBool IsOperatorProfile( const CNSmlDsProfileElement& aProfile );
+ TInt OperatorAdapterUid();
+ void StoreOperatorUrlL( const TDesC& aUrl );
private:
--- a/syncmlfw/ds/provisioningadapter/src/NSmlDsProvisioningAdapter.cpp Fri Aug 06 18:29:23 2010 +0530
+++ b/syncmlfw/ds/provisioningadapter/src/NSmlDsProvisioningAdapter.cpp Thu Aug 19 17:35:34 2010 +0530
@@ -29,6 +29,8 @@
#include <barsc.h>
#include <cmconnectionmethoddef.h>
#include <cmmanagerext.h>
+#include <centralrepository.h> //For central Repository
+#include <nsmloperatordatacrkeys.h> // KCRUidOperatorDatasyncInternalKeys
#include <nsmlconstants.h>
#include <nsmldebug.h>
#include <nsmldsconstants.h>
@@ -41,6 +43,9 @@
#include <WPAdapterUtil.h>
_LIT( KInternetString, "INTERNET" );
+_LIT( KXVcardMimeType, "text/x-vcard");
+const TInt KMaxValueLength = 255;
+
#include <data_caging_path_literals.hrh>
// ============================ MEMBER FUNCTIONS ===============================
@@ -926,6 +931,28 @@
if( ( aType.Length() > 0 ) &&
( iProfiles[iProfiles.Count()-1]->iDataProvElement[iDataProvElementCount]->iRemoteDBUri ) )
{
+ TBool dataProvIdFoundInZ = FALSE;
+ TSmlDataProviderId firstDataProvIdFound = 0;
+ TSmlDataProviderId uidFound = 0;
+
+ TBool doSearch = ETrue;
+ if ( aType.FindF( KXVcardMimeType ) != KErrNotFound )
+ {
+ if ( IsOperatorProfile( *iProfiles[iProfiles.Count()-1] ) )
+ {
+ const CNSmlDsProfileElement& profile = *iProfiles[iProfiles.Count()-1];
+ StoreOperatorUrlL( *profile.iHostAddress );
+
+ // Do not make a search through adapter implementations
+ doSearch = EFalse;
+ uidFound = OperatorAdapterUid();
+ if ( !uidFound )
+ {
+ // If OperatorAdapterUid returns 0, do a search
+ doSearch = ETrue;
+ }
+ }
+ }
// look through every implementation adapter until one found
// which supports MIME type in question
@@ -936,68 +963,67 @@
TPtr8 typePtr = type->Des();
CnvUtfConverter::ConvertFromUnicodeToUtf8( typePtr, aType);
- TBool dataProvIdFoundInZ = FALSE;
- TSmlDataProviderId firstDataProvIdFound = 0;
- TSmlDataProviderId uidFound = 0;
-
// get list of dataproviderIds
RImplInfoPtrArray implArray;
CleanupStack::PushL( PtrArrCleanupItemRArr( CImplementationInformation, &implArray ) );
TUid ifUid = { KNSmlDSInterfaceUid };
REComSession::ListImplementationsL( ifUid, implArray );
- TInt countProviders = implArray.Count();
- for( TInt i = 0; i < countProviders; i++ )
- {
- CImplementationInformation* implInfo = implArray[i];
-
- RSyncMLDataProvider dataProvider;
- dataProvider.OpenL( iSession, implInfo->ImplementationUid().iUid );
- CleanupClosePushL( dataProvider );
+ if ( doSearch )
+ {
+ TInt countProviders = implArray.Count();
+ for( TInt i = 0; i < countProviders; i++ )
+ {
+ CImplementationInformation* implInfo = implArray[i];
+
+ RSyncMLDataProvider dataProvider;
+ dataProvider.OpenL( iSession, implInfo->ImplementationUid().iUid );
+ CleanupClosePushL( dataProvider );
- TInt mimeTypeCount = dataProvider.MimeTypeCount();
- for( TInt j = 0; j < mimeTypeCount; j++ )
- {
- HBufC* mimeType = dataProvider.MimeType( j ).AllocLC();
- TPtrC8 convMimeType = ConvertTo8LC( *mimeType );
- if( typePtr.Find( convMimeType ) == 0)
- {
- // MIME type in question was found
- uidFound = implInfo->ImplementationUid().iUid;
-
- if( firstDataProvIdFound == 0 )
- {
- // save the first in case of none found from ROM
- firstDataProvIdFound = uidFound;
- }
+ TInt mimeTypeCount = dataProvider.MimeTypeCount();
+ for( TInt j = 0; j < mimeTypeCount; j++ )
+ {
+ HBufC* mimeType = dataProvider.MimeType( j ).AllocLC();
+ TPtrC8 convMimeType = ConvertTo8LC( *mimeType );
+ if( typePtr.Find( convMimeType ) == 0)
+ {
+ // MIME type in question was found
+ uidFound = implInfo->ImplementationUid().iUid;
+
+ if( firstDataProvIdFound == 0 )
+ {
+ // save the first in case of none found from ROM
+ firstDataProvIdFound = uidFound;
+ }
- // check whether the provider is located in ROM (drive Z)
- if( implInfo->Drive() == EDriveZ )
- {
- dataProvIdFoundInZ = TRUE;
- }
- }
-
- CleanupStack::PopAndDestroy(2); // mimetype, ConvertTo8LC
+ // check whether the provider is located in ROM (drive Z)
+ if( implInfo->Drive() == EDriveZ )
+ {
+ dataProvIdFoundInZ = TRUE;
+ }
+ }
- if( uidFound )
- {
- break;
- }
- }
+ CleanupStack::PopAndDestroy(2); // mimetype, ConvertTo8LC
+
+ if( uidFound )
+ {
+ break;
+ }
+ }
- CleanupStack::PopAndDestroy(); // dataProvider
+ CleanupStack::PopAndDestroy(); // dataProvider
- if ( dataProvIdFoundInZ )
- {
- break;
- }
- else
- {
- uidFound = firstDataProvIdFound;
- }
- }
-
+ if ( dataProvIdFoundInZ )
+ {
+ break;
+ }
+ else
+ {
+ uidFound = firstDataProvIdFound;
+ }
+ }
+ }
+
REComSession::FinalClose();
CleanupStack::PopAndDestroy( 2 ); // type, implArray
@@ -1066,5 +1092,65 @@
return *buf;
}
+//-----------------------------------------------------------------------------
+// CNSmlDsProvisioningAdapter::IsOperatorProfile
+//
+//-----------------------------------------------------------------------------
+//
+TBool CNSmlDsProvisioningAdapter::IsOperatorProfile( const CNSmlDsProfileElement& aProfile )
+ {
+ TBuf8<KMaxValueLength> value;
+ CRepository* rep = NULL;
+ TRAPD ( err, rep = CRepository::NewL( KCRUidOperatorDatasyncInternalKeys ) );
+ if ( err == KErrNone )
+ {
+ rep->Get( KNsmlOpDsOperatorSyncServerId, value );
+ delete rep;
+ }
+
+ if ( aProfile.iServerId )
+ {
+ if ( value.Compare( *aProfile.iServerId ) == 0 )
+ {
+ return ETrue;
+ }
+ }
+ return EFalse;
+ }
+
+//-----------------------------------------------------------------------------
+// CNSmlDsProvisioningAdapter::OperatorAdapterUid
+//
+//-----------------------------------------------------------------------------
+//
+TInt CNSmlDsProvisioningAdapter::OperatorAdapterUid()
+ {
+ TInt value = 0;
+ CRepository* rep = NULL;
+ TRAPD ( err, rep = CRepository::NewL( KCRUidOperatorDatasyncInternalKeys ) );
+ if ( err == KErrNone )
+ {
+ rep->Get( KNsmlOpDsOperatorAdapterUid, value );
+ delete rep;
+ }
+ return value;
+ }
+
+//-----------------------------------------------------------------------------
+// CNSmlDsProvisioningAdapter::StoreOperatorUrlL
+//
+//-----------------------------------------------------------------------------
+//
+void CNSmlDsProvisioningAdapter::StoreOperatorUrlL( const TDesC& aUrl )
+ {
+ CRepository* rep = NULL;
+ TRAPD ( err, rep = CRepository::NewL( KCRUidOperatorDatasyncInternalKeys ) );
+ if ( err == KErrNone )
+ {
+ CleanupStack::PushL( rep );
+ User::LeaveIfError( rep->Set( KNsmlOpDsOperatorSyncServerURL, aUrl ));
+ CleanupStack::PopAndDestroy( rep );
+ }
+ }
// End of File
--- a/syncmlfw/ds/settings/bld/DEF/bwinscwdssettingsu.def Fri Aug 06 18:29:23 2010 +0530
+++ b/syncmlfw/ds/settings/bld/DEF/bwinscwdssettingsu.def Thu Aug 19 17:35:34 2010 +0530
@@ -53,4 +53,14 @@
?Visibility@CNSmlDSProfile@@QBE?AW4TNSmlDSFieldVisibility@@W4TNSmlDSProfileData@@@Z @ 52 NONAME ; enum TNSmlDSFieldVisibility CNSmlDSProfile::Visibility(enum TNSmlDSProfileData) const
?WriteStreamCommitL@CNSmlDSContentType@@QAEXXZ @ 53 NONAME ; void CNSmlDSContentType::WriteStreamCommitL(void)
?WriteStreamCommitL@CNSmlDSProfile@@QAEXXZ @ 54 NONAME ; void CNSmlDSProfile::WriteStreamCommitL(void)
+ ?IsOperatorProfileL@CNSmlDSOperatorSettings@@QAEHABVTDesC16@@@Z @ 55 NONAME ; int CNSmlDSOperatorSettings::IsOperatorProfileL(class TDesC16 const &)
+ ?CustomSwvValueLC@CNSmlDSOperatorSettings@@QAEPAVHBufC8@@XZ @ 56 NONAME ; class HBufC8 * CNSmlDSOperatorSettings::CustomSwvValueLC(void)
+ ??1CNSmlDSOperatorSettings@@UAE@XZ @ 57 NONAME ; CNSmlDSOperatorSettings::~CNSmlDSOperatorSettings(void)
+ ?CustomManValueLC@CNSmlDSOperatorSettings@@QAEPAVHBufC8@@XZ @ 58 NONAME ; class HBufC8 * CNSmlDSOperatorSettings::CustomManValueLC(void)
+ ?PopulateStatusCodeListL@CNSmlDSOperatorSettings@@QAEXAAV?$RArray@H@@@Z @ 59 NONAME ; void CNSmlDSOperatorSettings::PopulateStatusCodeListL(class RArray<int> &)
+ ?CustomModValueLC@CNSmlDSOperatorSettings@@QAEPAVHBufC8@@XZ @ 60 NONAME ; class HBufC8 * CNSmlDSOperatorSettings::CustomModValueLC(void)
+ ?NewL@CNSmlDSOperatorSettings@@SAPAV1@XZ @ 61 NONAME ; class CNSmlDSOperatorSettings * CNSmlDSOperatorSettings::NewL(void)
+ ?NewLC@CNSmlDSOperatorSettings@@SAPAV1@XZ @ 62 NONAME ; class CNSmlDSOperatorSettings * CNSmlDSOperatorSettings::NewLC(void)
+ ?HttpErrorReportingEnabled@CNSmlDSOperatorSettings@@QAEHXZ @ 63 NONAME ; int CNSmlDSOperatorSettings::HttpErrorReportingEnabled(void)
+ ?SyncErrorReportingEnabled@CNSmlDSOperatorSettings@@QAEHXZ @ 64 NONAME ; int CNSmlDSOperatorSettings::SyncErrorReportingEnabled(void)
--- a/syncmlfw/ds/settings/bld/DEF/eabidssettingsu.def Fri Aug 06 18:29:23 2010 +0530
+++ b/syncmlfw/ds/settings/bld/DEF/eabidssettingsu.def Thu Aug 19 17:35:34 2010 +0530
@@ -83,4 +83,21 @@
_ZTV26CNSmlDSResourceContentType @ 82 NONAME ; #<VT>#
_ZTI26CNSmlProfileContentHandler @ 83 NONAME ; #<TI>#
_ZTV26CNSmlProfileContentHandler @ 84 NONAME ; #<VT>#
+ _ZN15CNSmlDSSettingsD0Ev @ 85 NONAME
+ _ZN15CNSmlDSSettingsD1Ev @ 86 NONAME
+ _ZN15CNSmlDSSettingsD2Ev @ 87 NONAME
+ _ZN23CNSmlDSOperatorSettings16CustomManValueLCEv @ 88 NONAME
+ _ZN23CNSmlDSOperatorSettings16CustomModValueLCEv @ 89 NONAME
+ _ZN23CNSmlDSOperatorSettings16CustomSwvValueLCEv @ 90 NONAME
+ _ZN23CNSmlDSOperatorSettings18IsOperatorProfileLERK7TDesC16 @ 91 NONAME
+ _ZN23CNSmlDSOperatorSettings23PopulateStatusCodeListLER6RArrayIiE @ 92 NONAME
+ _ZN23CNSmlDSOperatorSettings4NewLEv @ 93 NONAME
+ _ZN23CNSmlDSOperatorSettings5NewLCEv @ 94 NONAME
+ _ZN23CNSmlDSOperatorSettingsD0Ev @ 95 NONAME
+ _ZN23CNSmlDSOperatorSettingsD1Ev @ 96 NONAME
+ _ZN23CNSmlDSOperatorSettingsD2Ev @ 97 NONAME
+ _ZTI23CNSmlDSOperatorSettings @ 98 NONAME
+ _ZTV23CNSmlDSOperatorSettings @ 99 NONAME
+ _ZN23CNSmlDSOperatorSettings25HttpErrorReportingEnabledEv @ 100 NONAME
+ _ZN23CNSmlDSOperatorSettings25SyncErrorReportingEnabledEv @ 101 NONAME
--- a/syncmlfw/ds/settings/bld/nsmldssettings.mmp Fri Aug 06 18:29:23 2010 +0530
+++ b/syncmlfw/ds/settings/bld/nsmldssettings.mmp Thu Aug 19 17:35:34 2010 +0530
@@ -44,7 +44,8 @@
SOURCE NSmlDSCrypt.cpp
SOURCE nsmlroam.cpp
SOURCE NSmlRoamTable.cpp
-SOURCE NSmlProfileContentHandler.cpp
+SOURCE NSmlProfileContentHandler.cpp
+SOURCE nsmldsoperatorsettings.cpp
USERINCLUDE ../inc
USERINCLUDE ../../inc
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/syncmlfw/ds/settings/inc/nsmldsoperatorsettings.h Thu Aug 19 17:35:34 2010 +0530
@@ -0,0 +1,126 @@
+/*
+* 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: DS Operator Settings
+*
+*/
+
+#ifndef __NSMLDSOPERATORSETTINGS_H
+#define __NSMLDSOPERATORSETTINGS_H
+
+// INCLUDES
+#include <e32base.h>
+
+// FORWARD DECLARATIONS
+class CRepository;
+
+// ----------------------------------------------------------------------------
+// CNSmlDSOperatorSettings provides an interface to
+// DS Operator Settings repository
+//
+//* @lib nsmldssettings.lib
+// ----------------------------------------------------------------------------
+class CNSmlDSOperatorSettings : public CBase
+ {
+ public:
+ /**
+ * Two-phased constructor.
+ */
+ IMPORT_C static CNSmlDSOperatorSettings* NewL();
+
+ /**
+ * Two-phased constructor.
+ */
+ IMPORT_C static CNSmlDSOperatorSettings* NewLC();
+
+ /**
+ * Destructor.
+ */
+ IMPORT_C virtual ~CNSmlDSOperatorSettings();
+
+ /**
+ * Is current profile Operator specific profile.
+ * @param aServerId Server Id to compare in Repository value.
+ * @return Boolean ETrue if profile is Operator specific profile.
+ */
+ IMPORT_C TBool IsOperatorProfileL( const TDesC& aServerId );
+
+ /**
+ * SW version of Operator specific profile.
+ * @return Software version.
+ */
+ IMPORT_C HBufC8* CustomSwvValueLC();
+
+ /**
+ * Model value of Operator specific profile.
+ * @return Mod value.
+ */
+ IMPORT_C HBufC8* CustomModValueLC();
+
+ /**
+ * Manufacturer value of Operator specific profile.
+ * @return Manufacturer value.
+ */
+ IMPORT_C HBufC8* CustomManValueLC();
+
+ /**
+ * Populates server status code list
+ * @param RArray to contains status codes
+ */
+ IMPORT_C void PopulateStatusCodeListL( RArray< TInt >& aArray );
+
+ /**
+ * SyncML Error Reporting
+ * @return Boolean ETrue if SyncML Error Reporting is enabled.
+ */
+ IMPORT_C TBool SyncErrorReportingEnabled();
+
+ /**
+ * HTTP Error Reporting
+ * @return Boolean ETrue if HTTP Error Reporting is enabled.
+ */
+ IMPORT_C TBool HttpErrorReportingEnabled();
+
+ private:
+
+ /**
+ * Reads list of status codes from cenrep
+ * @param RArray to contains status codes
+ */
+ void InitializeServerStatusCodeListL( RArray< TInt >& aArray );
+
+ /**
+ * C++ constructor.
+ */
+ CNSmlDSOperatorSettings();
+
+ /**
+ * 2nd phase constructor.
+ */
+ void ConstructL();
+
+ /**
+ * Get Repository key value of Operator specific profile.
+ * @param aKey Repository key which value method returns.
+ * @return Repository key value.
+ */
+ HBufC8* GetValueLC( const TUint32 aKey );
+
+ private: // data
+ CRepository* iRepository;
+
+ };
+
+#endif // __NSMLDSOPERATORSETTINGS_H
+
+// End of File
--- a/syncmlfw/ds/settings/src/NSmlDSSettings.cpp Fri Aug 06 18:29:23 2010 +0530
+++ b/syncmlfw/ds/settings/src/NSmlDSSettings.cpp Thu Aug 19 17:35:34 2010 +0530
@@ -30,6 +30,7 @@
#include "NSmlProfileContentHandler.h"
#include <centralrepository.h> //CRepository
+//CONSTANTS
_LIT(Kinfile,"z:\\Private\\101F99FB\\VariantData.xml");
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/syncmlfw/ds/settings/src/nsmldsoperatorsettings.cpp Thu Aug 19 17:35:34 2010 +0530
@@ -0,0 +1,205 @@
+/*
+* 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: DS Operator Settings
+*
+*/
+
+// INTERNAL INCLUDES
+#include "nsmldsoperatorsettings.h"
+
+// EXTERNAL INCLUDES
+#include <centralrepository.h> //CRepository
+#include <nsmloperatordatacrkeys.h> // KCRUidOperatorDatasyncInternalKeys
+
+// CONSTANTS
+const TInt KMaxLength = 256;
+const TInt KBufferLength = 256;
+const TInt KValueLength = 50;
+_LIT( KSpace, " " );
+
+//-----------------------------------------------------------------------------
+// CNSmlDSOperatorSettings::NewL
+//-----------------------------------------------------------------------------
+EXPORT_C CNSmlDSOperatorSettings* CNSmlDSOperatorSettings::NewL()
+ {
+ CNSmlDSOperatorSettings* self = CNSmlDSOperatorSettings::NewLC();
+ CleanupStack::Pop();
+ return self;
+ }
+
+//-----------------------------------------------------------------------------
+// CNSmlDSOperatorSettings::NewLC
+//-----------------------------------------------------------------------------
+EXPORT_C CNSmlDSOperatorSettings* CNSmlDSOperatorSettings::NewLC()
+ {
+ CNSmlDSOperatorSettings* self = new( ELeave ) CNSmlDSOperatorSettings;
+ CleanupStack::PushL( self );
+ self->ConstructL();
+ return self;
+ }
+
+//-----------------------------------------------------------------------------
+// CNSmlDSOperatorSettings::ConstructL
+//-----------------------------------------------------------------------------
+void CNSmlDSOperatorSettings::ConstructL()
+ {
+ iRepository = CRepository::NewL( KCRUidOperatorDatasyncInternalKeys );
+ }
+
+//-----------------------------------------------------------------------------
+// CNSmlDSOperatorSettings::~CNSmlDSOperatorSettings
+//-----------------------------------------------------------------------------
+EXPORT_C CNSmlDSOperatorSettings::~CNSmlDSOperatorSettings()
+ {
+ delete iRepository;
+ }
+
+//-----------------------------------------------------------------------------
+// CNSmlDSOperatorSettings::CNSmlDSOperatorSettings
+//-----------------------------------------------------------------------------
+CNSmlDSOperatorSettings::CNSmlDSOperatorSettings()
+ {
+ }
+
+//-----------------------------------------------------------------------------
+// CNSmlDSOperatorSettings::IsOperatorProfileL
+// Is current profile Operator specific profile.
+//-----------------------------------------------------------------------------
+EXPORT_C TBool CNSmlDSOperatorSettings::IsOperatorProfileL(
+ const TDesC& aServerId )
+ {
+ if( aServerId.Length() != 0 )
+ {
+ TBuf8< KMaxLength > value;
+ TBuf< KMaxLength > valueUtf16;
+
+ iRepository->Get( KNsmlOpDsOperatorSyncServerId, value );
+ valueUtf16.Copy( value );
+ if ( aServerId.Compare( valueUtf16 ) == 0 )
+ {
+ return ETrue;
+ }
+ }
+ return EFalse;
+ }
+
+//-----------------------------------------------------------------------------
+// CNSmlDSOperatorSettings::CustomSwvValueLC
+// SW version of Operator specific profile.
+//-----------------------------------------------------------------------------
+EXPORT_C HBufC8* CNSmlDSOperatorSettings::CustomSwvValueLC()
+ {
+ return GetValueLC( KNsmlOpDsDevInfoSwVValue );
+ }
+
+//-----------------------------------------------------------------------------
+// CNSmlDSOperatorSettings:::CustomModValueLC
+// Mod value of Operator specific profile.
+//-----------------------------------------------------------------------------
+EXPORT_C HBufC8* CNSmlDSOperatorSettings::CustomModValueLC()
+ {
+ return GetValueLC( KNsmlOpDsDevInfoModValue );
+ }
+
+//-----------------------------------------------------------------------------
+// CNSmlDSOperatorSettings:::CustomManValueLC
+// Man value of Operator specific profile.
+//-----------------------------------------------------------------------------
+EXPORT_C HBufC8* CNSmlDSOperatorSettings::CustomManValueLC()
+ {
+ return GetValueLC( KNsmlOpDsDevInfoManValue );
+ }
+
+//-----------------------------------------------------------------------------
+// CNSmlDSOperatorSettings:::PopulateStatusCodeListL
+// Populates server status code list
+//----------------------------------------------------------------------------
+EXPORT_C void CNSmlDSOperatorSettings::PopulateStatusCodeListL(
+ RArray< TInt >& aArray )
+ {
+ InitializeServerStatusCodeListL( aArray );
+ }
+
+// ----------------------------------------------------------------------------
+// CNSmlDSOperatorSettings::InitializeServerStatusCodeListL
+// This function reads list of configured server status codes from cenrep
+// ----------------------------------------------------------------------------
+void CNSmlDSOperatorSettings::InitializeServerStatusCodeListL(
+ RArray< TInt >& aArray )
+ {
+ TBuf< KBufferLength > tempStr;
+ iRepository->Get( KNsmlOpDsSyncMLStatusCodeList, tempStr );
+ TInt commaPos = KErrNotFound;
+
+ while ( ( commaPos = tempStr.Locate( ',' ) ) > KErrNotFound )
+ {
+ tempStr.Replace( commaPos, 1, KSpace );
+ }
+
+ TLex lex( tempStr );
+ while( !lex.Eos() )
+ {
+ TPtrC token = lex.NextToken();
+ TLex temp( token );
+ TInt val;
+ temp.Val( val );
+ aArray.Append( val );
+ }
+ }
+
+//-----------------------------------------------------------------------------
+// CNSmlDSOperatorSettings:::SyncErrorReportingEnabled
+// Returns ETrue if SyncML Error Reporting is enabled
+//----------------------------------------------------------------------------
+EXPORT_C TBool CNSmlDSOperatorSettings::SyncErrorReportingEnabled()
+ {
+ TBool errorReportingEnabled = EFalse;
+ iRepository->Get( KNsmlOpDsSyncMLErrorReporting, errorReportingEnabled );
+ return errorReportingEnabled;
+ }
+
+//-----------------------------------------------------------------------------
+// CNSmlDSOperatorSettings:::HttpErrorReportingEnabled
+// Returns ETrue if HTTP Error Reporting is enabled
+//----------------------------------------------------------------------------
+EXPORT_C TBool CNSmlDSOperatorSettings::HttpErrorReportingEnabled()
+ {
+ TBool errorReportingEnabled = EFalse;
+ iRepository->Get( KNsmlOpDsHttpErrorReporting, errorReportingEnabled );
+ return errorReportingEnabled;
+ }
+
+// ----------------------------------------------------------------------------
+// CNSmlDSOperatorSettings::GetValueLC
+// This function Get Repository key value of Operator specific profile.
+// ----------------------------------------------------------------------------
+HBufC8* CNSmlDSOperatorSettings::GetValueLC( const TUint32 aKey )
+ {
+ HBufC8* buf = HBufC8::NewLC( KValueLength );
+ TPtr8 ptr = buf->Des();
+
+ TInt actualLength;
+ TInt err = iRepository->Get( aKey, ptr, actualLength );
+ if( err == KErrOverflow )
+ {
+ CleanupStack::Pop( buf );
+ buf = buf->ReAllocL( actualLength );
+ CleanupStack::PushL( buf );
+ ptr.Set( buf->Des() );
+ // ignore return error
+ iRepository->Get( aKey, ptr );
+ }
+ return buf;
+ }
+// End of File
--- a/syncmlfw/ds/syncagent/bld/nsmldsagent.mmp Fri Aug 06 18:29:23 2010 +0530
+++ b/syncmlfw/ds/syncagent/bld/nsmldsagent.mmp Thu Aug 19 17:35:34 2010 +0530
@@ -82,6 +82,7 @@
LIBRARY nsmlfilter.lib
LIBRARY nsmldshostclient.lib
LIBRARY nsmlhistorylog.lib
+LIBRARY ecom.lib
//RD_AUTO_RESTART
LIBRARY ConnMon.lib
LIBRARY connmonext.lib
--- a/syncmlfw/ds/syncagent/inc/NSmlDSAgent.h Fri Aug 06 18:29:23 2010 +0530
+++ b/syncmlfw/ds/syncagent/inc/NSmlDSAgent.h Thu Aug 19 17:35:34 2010 +0530
@@ -37,7 +37,9 @@
//RD_AUTO_RESTART
class CNsmlDSNetmon;
class CNSmlDSProfile;
-
+class CNSmlDSSettings;
+class CRepository;
+class CNSmlDSOperatorSettings;
// CLASS DECLARATION
/**
@@ -501,6 +503,7 @@
TNSmlSyncSuspendedState CurrentStateInServerAlertNext();
TBool SyncFailure();
+ void StoreServerStatusCode( TInt aServerStatusCode ) const;
public:
/**
* Mapping of the Alert code is done
@@ -574,6 +577,10 @@
TBool iAutoRestartInitiatedSync;
//RD_SUSPEND_RESUME
TBool iUpdateLastAnchor;
+ //For storing Server Status Code
+ TBool iErrorReportingEnabled;
+ CRepository* iRepositorySSC;
+ RArray< TInt > iServerStatusCodeArray;
};
typedef CNSmlDSAgent* (*TNSmlCreateDSAgentFunc) ( MSyncMLProgressObserver* aObserver );
--- a/syncmlfw/ds/syncagent/inc/NSmlDSCmds.h Fri Aug 06 18:29:23 2010 +0530
+++ b/syncmlfw/ds/syncagent/inc/NSmlDSCmds.h Thu Aug 19 17:35:34 2010 +0530
@@ -35,6 +35,7 @@
class CNSmlDbCaps;
class CNSmlDbMetaHandler;
class CNSmlDSBatchBuffer;
+class CNSmlDSOperatorSettings;
inline void DeleteRPointerArray( TAny* aPtr )
{
@@ -216,6 +217,15 @@
* @param aFinal ETrue if this is the last message from the client.
*/
void DoEndMessageL( TBool aFinal );
+
+ /**
+ * Checks if received Alert Code is a sync type and tries to convert
+ * it to Sync Type (TSmlSyncType). If conversion is succesful, the
+ * value is stored into Cenrep file (KCRUidOperatorDatasyncErrorKeys).
+ * @param aAlertCode received alert code.
+ */
+ void StoreSyncType( const TDes8& aAlertCode );
+
private: // constructors and operators
/**
@@ -316,6 +326,38 @@
*/
TInt ConvertUid( const TDesC8& aLiteralUid, TSmlDbItemUid& aNumericUid );
+ /**
+ * Adds operator specific extensions (XNam, XVal) to device info.
+ * The XNam and XVal to be included in the device info are read from
+ * an ECom plugin, which implements Device Info Extension Data Container
+ * plugin interface (UID: 0x2002DC7C).
+ *
+ * @param aDevInf Device info object, to which the operator extensions
+ * are added.
+ */
+ void InsertOperatorExtensionDevInfFieldsL( SmlDevInfDevInfPtr_t& aDevInf );
+
+ /**
+ * Appends the given dev info extension item to the extension list.
+ *
+ * @param aExtList Extension list, to which the new item is to be added.
+ * On return, the list includes the given new item.
+ * @param aExtItem Extension item to be added to the extension list.
+ */
+ void AppendToExtensionListL( SmlDevInfExtListPtr_t aExtList,
+ SmlDevInfExtPtr_t aExtItem );
+
+ /**
+ * Appends a new XVal (i.e. extension value) item with the given XVal
+ * string to the XVal list.
+ *
+ * @param aXValList XVal list, to which the the new XVal item is to be added.
+ * On return, the list includes the given new item.
+ * @param aXVal A string, which is added to the XVal list as a new item.
+ */
+ void AppendToXValListL( SmlPcdataListPtr_t aXValList,
+ const TDesC8& aXVal );
+
private: // data
// batched items buffer
CNSmlDSBatchBuffer* iBatchBuffer;
--- a/syncmlfw/ds/syncagent/src/nsmldsagent.cpp Fri Aug 06 18:29:23 2010 +0530
+++ b/syncmlfw/ds/syncagent/src/nsmldsagent.cpp Thu Aug 19 17:35:34 2010 +0530
@@ -43,8 +43,10 @@
#include "nsmldscontent.h"
#include "nsmldserror.h"
#include "nsmldssettings.h"
+#include "nsmldsoperatorsettings.h"
#include "nsmlagentlog.h"
#include "nsmlroam.h"
+#include "nsmloperatorerrorcrkeys.h"
//RD_AUTO_RESTART
#include <e32base.h>
#include <centralrepository.h>
@@ -61,6 +63,11 @@
#pragma diag_remark 174
#endif
+// CONSTANTS
+const TInt KGranularity = 12;
+const TInt KErrorCodeRangeFirst = 400;
+const TInt KErrorCodeRangeLast = 516;
+
// ============================ MEMBER FUNCTIONS ===============================
// -----------------------------------------------------------------------------
@@ -68,7 +75,8 @@
// C++ constructor.
// -----------------------------------------------------------------------------
//
-CNSmlDSAgent::CNSmlDSAgent()
+CNSmlDSAgent::CNSmlDSAgent():
+ iServerStatusCodeArray ( RArray< TInt >( KGranularity ) )
{
}
@@ -112,6 +120,15 @@
}
//RD_AUTO_RESTART
+ iRepositorySSC = CRepository::NewL( KCRUidOperatorDatasyncErrorKeys );
+ CNSmlDSOperatorSettings* settings = CNSmlDSOperatorSettings::NewLC();
+ iErrorReportingEnabled = settings->SyncErrorReportingEnabled();
+ if ( iErrorReportingEnabled )
+ {
+ settings->PopulateStatusCodeListL( iServerStatusCodeArray );
+ }
+ CleanupStack::PopAndDestroy( settings );
+
// security policies for P&S reading and writing
_LIT_SECURITY_POLICY_S0( KNSmlPSWritePolicy, KNSmlSOSServerPolicyUID.iUid ); // SID check (sosserver) when writing
_LIT_SECURITY_POLICY_PASS( KNSmlPSReadPolicy ); // no checks done when reading
@@ -162,8 +179,11 @@
{
delete iDSNetmon;
iDSNetmon = NULL;
- }
- //RD_AUTO_RESTART
+ }
+ //RD_AUTO_RESTART
+
+ iServerStatusCodeArray.Close();
+ delete iRepositorySSC;
}
// -----------------------------------------------------------------------------
@@ -1645,6 +1665,12 @@
EDataSyncRunning12 );
}
+ if ( iRepositorySSC )
+ {
+ iRepositorySSC->Set( KNsmlOpDsSyncErrorCode, KErrNone );
+ iRepositorySSC->Set( KNsmlOpDsSyncProfId, profile->IntValue( EDSProfileId ) );
+ iRepositorySSC->Set( KNsmlOpDsSyncInitiation, iSyncInitiation );
+ }
TBool ifInternet = ETrue ; // CR: 403-1188
if ( iMediumType == KUidNSmlMediumTypeInternet )
@@ -2902,6 +2928,11 @@
// Set sync stopped to P&S
RProperty::Set( KPSUidDataSynchronizationInternalKeys, KDataSyncStatus, EDataSyncNotRunning );
+
+ if ( iRepositorySSC )
+ {
+ iRepositorySSC->Set( KNsmlOpDsSyncInitiation, EDataSyncNotRunning );
+ }
ResetDSSessionInfoL();
}
@@ -2957,6 +2988,12 @@
TNSmlError::TNSmlSyncMLStatusCode status = STATIC_CAST( TNSmlError::TNSmlSyncMLStatusCode, iSyncMLCmds->ResponseController()->StatusCode( aEntryID ) );
TBool error( EFalse );
+ // Store status code to cenrep if it is on the list
+ if ( iErrorReportingEnabled )
+ {
+ StoreServerStatusCode( status );
+ }
+
switch ( status )
{
case TNSmlError::ESmlStatusInProgress:
@@ -4264,4 +4301,29 @@
CleanupStack::PopAndDestroy(rep);
}
+// ------------------------------------------------------------------------------------------------------------------
+// CNSmlDSAgent::StoreServerStatusCode(TInt aServerStatusCode)
+// @description This function stores Sync ML Server Status code to cenrep for Operator profile sync if matched with configured list of codes,
+// and the same code can be used by any client for error logging.
+// If there are multiple status codes during sync, the last server status code is stored.
+// @param aServerStatusCode Sync ML server status code while sync ongoing.
+// ------------------------------------------------------------------------------------------------------------------
+void CNSmlDSAgent::StoreServerStatusCode( TInt aServerStatusCode ) const
+ {
+ DBG_FILE(_S8("CNSmlDSAgent::StoreServerStatusCode() begins"));
+
+ if( ( iServerStatusCodeArray.Count() == 0 &&
+ ( aServerStatusCode >= KErrorCodeRangeFirst ) &&
+ ( aServerStatusCode <= KErrorCodeRangeLast ) ) ||
+ ( iServerStatusCodeArray.Find( aServerStatusCode ) != KErrNotFound ) )
+ {
+ TInt error = iRepositorySSC->Set( KNsmlOpDsSyncErrorCode, aServerStatusCode );
+ if ( error != KErrNone )
+ {
+ DBG_FILE(_S8("Error in storing the server status code in cenrep"));
+ }
+ }
+
+ DBG_FILE(_S8("CNSmlDSAgent::StoreServerStatusCode() ends"));
+ }
// End of file
--- a/syncmlfw/ds/syncagent/src/nsmldscmds.cpp Fri Aug 06 18:29:23 2010 +0530
+++ b/syncmlfw/ds/syncagent/src/nsmldscmds.cpp Thu Aug 19 17:35:34 2010 +0530
@@ -46,9 +46,11 @@
#include "nsmldserror.h"
#include "nsmlfilter.h"
#include "nsmldssettings.h"
+#include "nsmldsoperatorsettings.h"
#include "nsmldsbatchbuffer.h"
#include "nsmldshostclient.h"
-
+#include <nsmloperatorerrorcrkeys.h> // KCRUidOperatorDatasyncErrorKeys
+#include <nsmldevinfextdatacontainerplugin.h>
#ifndef __WINS__
// This lowers the unnecessary compiler warning (armv5) to remark.
@@ -1678,6 +1680,7 @@
}
}
}
+ StoreSyncType( alertCode );
}
// status 406 is returned if <Filter> is present BUT the session continues
@@ -2452,12 +2455,40 @@
// VerDTD element
PcdataNewL ( devInf->verdtd, KNSmlAgentVerDTD12 );
+ TBool isOperator = EFalse;
+ TInt profileId( iAgent->ProfileId() );
+ CNSmlDSOperatorSettings* settings = CNSmlDSOperatorSettings::NewLC();
+
+ CNSmlDSSettings* dsSettings = CNSmlDSSettings::NewLC();
+ CNSmlDSProfile* profile = dsSettings->ProfileL( profileId );
+
+ if( profile )
+ {
+ CleanupStack::PushL( profile );
+ isOperator = settings->IsOperatorProfileL(
+ profile->StrValue( EDSProfileServerId ) );
+ CleanupStack::PopAndDestroy( profile );
+ }
+
// Man element (manufacturer)
HBufC* manufacturer = HBufC::NewLC( 50 );
TPtr manufacturerPtr( manufacturer->Des() );
- iPhoneInfo->PhoneDataL( CNSmlPhoneInfo::EPhoneManufacturer, manufacturerPtr );
HBufC8* manufacturerInUTF8( NULL );
- NSmlUnicodeConverter::HBufC8InUTF8LC( *manufacturer, manufacturerInUTF8 );
+ if ( isOperator )
+ {
+ manufacturerInUTF8 = settings->CustomManValueLC();
+ if ( manufacturerInUTF8->Length() == 0 )
+ {
+ CleanupStack::PopAndDestroy();// manufacturerInUTF8
+ iPhoneInfo->PhoneDataL( CNSmlPhoneInfo::EPhoneManufacturer, manufacturerPtr );
+ NSmlUnicodeConverter::HBufC8InUTF8LC( *manufacturer, manufacturerInUTF8 );
+ }
+ }
+ else
+ {
+ iPhoneInfo->PhoneDataL( CNSmlPhoneInfo::EPhoneManufacturer, manufacturerPtr );
+ NSmlUnicodeConverter::HBufC8InUTF8LC( *manufacturer, manufacturerInUTF8 );
+ }
PcdataNewL ( devInf->man, *manufacturerInUTF8 );
CleanupStack::PopAndDestroy( 2 ); // manufacturerInUTF8, manufacturer
@@ -2465,14 +2496,45 @@
// Mod element (model name)
HBufC* model = HBufC::NewLC( 50 );
- TPtr modelPtr = model->Des();
- iPhoneInfo->PhoneDataL( CNSmlPhoneInfo::EPhoneModelId, modelPtr );
+ TPtr modelPtr = model->Des();
HBufC8* modelInUTF8 = NULL;
- NSmlUnicodeConverter::HBufC8InUTF8LC( *model, modelInUTF8 );
+ if ( isOperator )
+ {
+ modelInUTF8 = settings->CustomModValueLC();
+ if ( modelInUTF8->Length() == 0 )
+ {
+ CleanupStack::PopAndDestroy();// modelInUTF8
+ iPhoneInfo->PhoneDataL( CNSmlPhoneInfo::EPhoneModelId, modelPtr );
+ NSmlUnicodeConverter::HBufC8InUTF8LC( *model, modelInUTF8 );
+ }
+ }
+ else
+ {
+ iPhoneInfo->PhoneDataL( CNSmlPhoneInfo::EPhoneModelId, modelPtr );
+ NSmlUnicodeConverter::HBufC8InUTF8LC( *model, modelInUTF8 );
+ }
PcdataNewL ( devInf->mod, *modelInUTF8 );
CleanupStack::PopAndDestroy( 2 ); // modelInUTF8, model
// SwV element (software version)
- PcdataNewL ( devInf->swv, iPhoneInfo->SwVersionL() );
+ if ( isOperator )
+ {
+ HBufC8* swv = settings->CustomSwvValueLC();
+ if ( swv->Length() > 0 )
+ {
+ PcdataNewL ( devInf->swv, *swv );
+ }
+ else
+ {
+ PcdataNewL ( devInf->swv, iPhoneInfo->SwVersionL() );
+ }
+ CleanupStack::PopAndDestroy( swv );
+ }
+ else
+ {
+ PcdataNewL ( devInf->swv, iPhoneInfo->SwVersionL() );
+ }
+
+ CleanupStack::PopAndDestroy( 2, settings );
PcdataNewL ( devInf->hwv, KNullDesC8() );
@@ -2501,6 +2563,17 @@
// DataStore elements
SmlDevInfDatastoreList_t** currDatastorePtr = &devInf->datastore;
+ // Operator specific Device info extensions (XNam, XVal)
+ if( isOperator )
+ {
+ TRAPD( err, InsertOperatorExtensionDevInfFieldsL( devInf ) );
+ if( err != KErrNone )
+ {
+ DBG_FILE( _S8( "CNSmlDSCmds::DoDeviceInfoL(): Leave in InsertOperatorExtensionDevInfFieldsL()" ) );
+ DBG_FILE_CODE( err, _S8("Error code") );
+ }
+ }
+
iDSContent.SetToFirst();
do
@@ -4618,4 +4691,180 @@
return lexer.Val( aNumericUid );
}
+//-----------------------------------------------------------------------------
+// CNSmlDSCmds::StoreSyncType
+// Checks if received Alert Code is a sync type and tries to convert
+// it to Sync Type (TSmlSyncType).
+//-----------------------------------------------------------------------------
+//
+void CNSmlDSCmds::StoreSyncType( const TDes8& aAlertCode )
+ {
+ TInt syncType = KErrNotFound;
+
+ if ( aAlertCode == KNSmlDSTwoWay )
+ {
+ syncType = ESmlTwoWay;
+ }
+ else if ( aAlertCode == KNSmlDSOneWayFromServer )
+ {
+ syncType = ESmlOneWayFromServer;
+ }
+ else if ( aAlertCode == KNSmlDSOneWayFromClient )
+ {
+ syncType = ESmlOneWayFromClient;
+ }
+ else if ( aAlertCode == KNSmlDSSlowSync )
+ {
+ syncType = ESmlSlowSync;
+ }
+ else if ( aAlertCode == KNSmlDSRefreshFromServer )
+ {
+ syncType = ESmlRefreshFromServer;
+ }
+ else if ( aAlertCode == KNSmlDSRefreshFromClient )
+ {
+ syncType = ESmlRefreshFromClient;
+ }
+
+ if ( syncType != KErrNotFound )
+ {
+ CRepository* rep = NULL;
+ TRAPD ( err, rep = CRepository::NewL( KCRUidOperatorDatasyncErrorKeys ) );
+ if ( err == KErrNone )
+ {
+ rep->Set( KNsmlOpDsSyncType, syncType );
+ delete rep;
+ }
+ }
+ }
+
+// ----------------------------------------------------------------------------
+// CNSmlDSCmds::InsertOperatorExtensionDevInfFieldsL
+// Adds operator specific extension fields <XNam> and <XVal> to Device info
+// ----------------------------------------------------------------------------
+//
+void CNSmlDSCmds::InsertOperatorExtensionDevInfFieldsL(
+ SmlDevInfDevInfPtr_t& aDevInf )
+ {
+ // Instantiate Extension Data container ECom plugin
+ CNSmlDevInfExtDataContainerPlugin* extensionPlugin = NULL;
+ TRAPD( err, extensionPlugin = CNSmlDevInfExtDataContainerPlugin::NewL() );
+ if( err == KErrNone )
+ {
+ CleanupStack::PushL( extensionPlugin );
+
+ if( extensionPlugin->GetExtensionCountL() > 0 )
+ {
+ // Create a list for extensions
+ SmlDevInfExtListPtr_t extList = new ( ELeave ) SmlDevInfExtList_t;
+ CleanupStack::PushL( extList );
+ extList->data = NULL;
+ extList->next = NULL;
+
+ for( TInt i = 0; i < extensionPlugin->GetExtensionCountL(); i++ )
+ {
+ // Create new <Ext> element and insert it to extension list
+ SmlDevInfExtPtr_t extElement = new ( ELeave ) SmlDevInfExt_t;
+ CleanupStack::PushL( extElement );
+
+ // Handle <XNam>
+ PcdataNewL( extElement->xnam, extensionPlugin->GetExtNameL( i ) );
+
+ // Handle <XVal>
+ if( extensionPlugin->GetExtValueCountL( i ) > 0 )
+ {
+ SmlPcdataListPtr_t xValList = new ( ELeave ) SmlPcdataList_t;
+ CleanupStack::PushL( xValList );
+ xValList->data = NULL;
+ xValList->next = NULL;
+
+ for( TInt j = 0; j < extensionPlugin->GetExtValueCountL( i ); j++ )
+ {
+ AppendToXValListL( xValList,
+ extensionPlugin->GetExtValueL( i, j ) );
+ }
+ extElement->xval = xValList;
+ CleanupStack::Pop( xValList );
+ }
+ else
+ {
+ extElement->xval = NULL;
+ }
+ AppendToExtensionListL( extList, extElement );
+ CleanupStack::Pop( extElement );
+ }
+
+ // Add extensions as a part of DevInfo structure
+ aDevInf->ext = extList;
+ CleanupStack::Pop( extList );
+ }
+
+ // Do the cleanup
+ CleanupStack::PopAndDestroy( extensionPlugin );
+ REComSession::FinalClose();
+ }
+ }
+
+// ----------------------------------------------------------------------------
+// CNSmlDSCmds::AppendToExtensionListL
+// ----------------------------------------------------------------------------
+//
+void CNSmlDSCmds::AppendToExtensionListL( SmlDevInfExtListPtr_t aExtList,
+ SmlDevInfExtPtr_t aExtItem )
+ {
+ if( !aExtList->data )
+ {
+ // This is the first item to be added to the list
+ aExtList->data = aExtItem;
+ aExtList->next = NULL;
+ }
+ else
+ {
+ // List is not empty
+ SmlDevInfExtListPtr_t newExtListItem = new ( ELeave ) SmlDevInfExtList_t;
+ newExtListItem->data = aExtItem;
+ newExtListItem->next = NULL;
+
+ // Search the end of the extension list & add new item
+ SmlDevInfExtListPtr_t tmp = aExtList;
+ while( tmp->next )
+ {
+ tmp = tmp->next;
+ }
+ tmp->next = newExtListItem;
+ }
+ }
+
+// ----------------------------------------------------------------------------
+// CNSmlDSCmds::AppendToXValListL
+// ----------------------------------------------------------------------------
+//
+void CNSmlDSCmds::AppendToXValListL( SmlPcdataListPtr_t aXValList,
+ const TDesC8& aXVal )
+ {
+ if( !aXValList->data )
+ {
+ // This is the first item to be added to the list
+ PcdataNewL( aXValList->data, aXVal );
+ aXValList->next = NULL;
+ }
+ else
+ {
+ // List is not empty
+ SmlPcdataListPtr_t newXValItem = new ( ELeave ) SmlPcdataList_t;
+ CleanupStack::PushL( newXValItem );
+ PcdataNewL( newXValItem->data, aXVal );
+ CleanupStack::Pop( newXValItem );
+ newXValItem->next = NULL;
+
+ // Search the end of the extension list & add new item
+ SmlPcdataListPtr_t tmp = aXValList;
+ while( tmp->next )
+ {
+ tmp = tmp->next;
+ }
+ tmp->next = newXValItem;
+ }
+ }
+
// End of File
--- a/syncmlfw/group/bld.inf Fri Aug 06 18:29:23 2010 +0530
+++ b/syncmlfw/group/bld.inf Thu Aug 19 17:35:34 2010 +0530
@@ -40,6 +40,11 @@
../conf/datasyncsessioninfo.confml MW_LAYER_CONFML(datasyncsessioninfo.confml)
../conf/datasyncsessioninfo_20029F15.crml MW_LAYER_CRML(datasyncsessioninfo_20029F15.crml)
+../conf/operatordatasync.confml MW_LAYER_CONFML(operatordatasync.confml)
+../conf/operatordatasync_2001E2E1.crml MW_LAYER_CRML(operatordatasync_2001E2E1.crml)
+../conf/operatordatasyncerror.confml MW_LAYER_CONFML(operatordatasyncerror.confml)
+../conf/operatordatasyncerror_2001FDF1.crml MW_LAYER_CRML(operatordatasyncerror_2001FDF1.crml)
+
//for IAD support
syncmlfw_stub.sis /epoc32/data/z/system/install/syncmlfw_stub.sis
../rom/NSml_variant.iby CUSTOMER_MW_LAYER_IBY_EXPORT_PATH(NSml_variant.iby)
--- a/syncmlfw/rom/NSmlCommon.iby Fri Aug 06 18:29:23 2010 +0530
+++ b/syncmlfw/rom/NSmlCommon.iby Thu Aug 19 17:35:34 2010 +0530
@@ -133,8 +133,10 @@
REM Debug modules for debugging purposes
+#ifdef _DEBUG
REM \common\xml
-REM file=ABI_DIR\BUILD_DIR\nsmlxml.dll SHARED_LIB_DIR\nsmlxml.dll
+file=ABI_DIR\BUILD_DIR\nsmlxml.dll SHARED_LIB_DIR\nsmlxml.dll
+#endif
REM \common\debug
REM file=ABI_DIR\BUILD_DIR\nsmldebug.dll SHARED_LIB_DIR\nsmldebug.dll
--- a/terminalsecurity/SCP/SCPClient/group/SCPClient.mmp Fri Aug 06 18:29:23 2010 +0530
+++ b/terminalsecurity/SCP/SCPClient/group/SCPClient.mmp Thu Aug 19 17:35:34 2010 +0530
@@ -58,7 +58,7 @@
LIBRARY aknnotify.lib
LIBRARY eikdlg.lib
LIBRARY ws32.lib
-LIBRARY commonengine.lib
+LIBRARY CommonEngine.lib
LIBRARY bafl.lib
LIBRARY flogger.lib
LIBRARY featmgr.lib
--- a/terminalsecurity/SCP/SCPClient/src/SCPClient.cpp Fri Aug 06 18:29:23 2010 +0530
+++ b/terminalsecurity/SCP/SCPClient/src/SCPClient.cpp Thu Aug 19 17:35:34 2010 +0530
@@ -29,7 +29,7 @@
#include "SCPClient.h"
#include "SCPParamObject.h"
-#include <SCPNotifier.rsg>
+#include <scpnotifier.rsg>
#include "SCP_IDs.h"
#include <centralrepository.h>
--- a/terminalsecurity/SCP/SCPClient/src/SCPQueryDialog.cpp Fri Aug 06 18:29:23 2010 +0530
+++ b/terminalsecurity/SCP/SCPClient/src/SCPQueryDialog.cpp Thu Aug 19 17:35:34 2010 +0530
@@ -26,7 +26,7 @@
// Include the SecUi definitions
#include <secui.hrh>
#include "SCPDebug.h"
-#include <SCPNotifier.rsg>
+#include <scpnotifier.rsg>
// For Central Repository
#include <centralrepository.h>
#include <AknIncallBubbleNotify.h>
--- a/terminalsecurity/SCP/SCPDatabase/src/SCPParamDB.cpp Fri Aug 06 18:29:23 2010 +0530
+++ b/terminalsecurity/SCP/SCPDatabase/src/SCPParamDB.cpp Thu Aug 19 17:35:34 2010 +0530
@@ -177,23 +177,24 @@
__LEAVE_IF_ERROR(lDBView.Prepare(iParameterDB, TDbQuery(*lSelectQry)));
__LEAVE_IF_ERROR(lDBView.EvaluateAll());
- lDBView.FirstL();
+ if( lDBView.FirstL())
+ {
+ TInt lRowCount = lDBView.CountL();
- TInt lRowCount = lDBView.CountL();
-
- if(lRowCount == 0) {
+ if(lRowCount == 0) {
_SCPDB_LOG(_L("[CSCPParamDB]-> No Rows found for this parameter"));
CleanupStack :: PopAndDestroy(2);
return KErrNotFound;
- }
- else if(lRowCount > 1) {
+ }
+ else if(lRowCount > 1) {
_SCPDB_LOG(_L("[CSCPParamDB]-> ERROR: More than one record matches the criterion. Db is corrupt! Leaving..."));
User :: Leave(KErrCorrupt);
- }
+ }
- lDBView.GetL();
- aApp = lDBView.ColInt(iColSet->ColNo(KColAppId));
- aValue = lDBView.ColInt(iColSet->ColNo(KColValueInt));
+ lDBView.GetL();
+ aApp = lDBView.ColInt(iColSet->ColNo(KColAppId));
+ aValue = lDBView.ColInt(iColSet->ColNo(KColValueInt));
+ }
CleanupStack :: PopAndDestroy(2);
_SCPDB_LOG(_L("[CSCPParamDB]-> GetValueForParameterL <<<"));
@@ -212,21 +213,20 @@
__LEAVE_IF_ERROR(lDBView.Prepare(iParameterDB, TDbQuery(*lSelectQry)));
__LEAVE_IF_ERROR(lDBView.EvaluateAll());
- lDBView.FirstL();
-
+ if (lDBView.FirstL())
+ {
+ TInt size(0);
+ TInt lRowCount = lDBView.CountL();
- TInt size(0);
- TInt lRowCount = lDBView.CountL();
-
- if(lRowCount == 0) {
+ if(lRowCount == 0) {
_SCPDB_LOG(_L("[CSCPParamDB]-> No Rows found for this parameter"));
CleanupStack :: PopAndDestroy(2);
return KErrNotFound;
- }
+ }
- TInt lErr(KErrNone);
+ TInt lErr(KErrNone);
- do {
+ do {
lDBView.GetL();
size = lDBView.ColDes(iColSet->ColNo(KColValueDes)).Size();
@@ -242,8 +242,9 @@
User :: Leave(lErr);
}
}
+ }
+ while(lDBView.NextL());
}
- while(lDBView.NextL());
CleanupStack :: PopAndDestroy(2);
_SCPDB_LOG(_L("[CSCPParamDB]-> GetValuesForParameterL <<<"));
--- a/terminalsecurity/SCP/SCPHistoryPlugin/src/SCPHistoryPlugin.cpp Fri Aug 06 18:29:23 2010 +0530
+++ b/terminalsecurity/SCP/SCPHistoryPlugin/src/SCPHistoryPlugin.cpp Thu Aug 19 17:35:34 2010 +0530
@@ -23,7 +23,7 @@
#include <SCPParamObject.h>
#include "SCPHistoryPlugin.h"
-#include <SCPHistoryPluginLang.rsg>
+#include <scphistorypluginlang.rsg>
#include "SCP_IDs.h"
#include <SCPServerInterface.h>
--- a/terminalsecurity/SCP/SCPHistoryPlugin/src/SCPSpecificStringsPlugin.cpp Fri Aug 06 18:29:23 2010 +0530
+++ b/terminalsecurity/SCP/SCPHistoryPlugin/src/SCPSpecificStringsPlugin.cpp Thu Aug 19 17:35:34 2010 +0530
@@ -23,7 +23,7 @@
#include <SCPParamObject.h>
#include "SCPSpecificStringsPlugin.h"
-#include <SCPHistoryPluginLang.rsg>
+#include <scphistorypluginlang.rsg>
#include "SCP_IDs.h"
#include <featmgr.h>
#include <SCPServerInterface.h>
--- a/terminalsecurity/SCP/SCPPatternPlugin/src/SCPPatternPlugin.cpp Fri Aug 06 18:29:23 2010 +0530
+++ b/terminalsecurity/SCP/SCPPatternPlugin/src/SCPPatternPlugin.cpp Thu Aug 19 17:35:34 2010 +0530
@@ -24,7 +24,7 @@
#include <featmgr.h>
#include "SCPPatternPlugin.h"
-#include <SCPPatternPluginLang.rsg>
+#include <scppatternpluginlang.rsg>
#include "SCP_IDs.h"
#include <SCPServerInterface.h>
--- a/terminalsecurity/SCP/SCPTimestampPlugin/group/SCPTimestampPlugin.mmp Fri Aug 06 18:29:23 2010 +0530
+++ b/terminalsecurity/SCP/SCPTimestampPlugin/group/SCPTimestampPlugin.mmp Thu Aug 19 17:35:34 2010 +0530
@@ -70,7 +70,7 @@
LIBRARY flogger.lib
LIBRARY featmgr.lib
#ifdef RD_MULTIPLE_DRIVE
-LIBRARY platformenv.lib
+LIBRARY PlatformEnv.lib
#endif
// End of File
--- a/terminalsecurity/SCP/SCPTimestampPlugin/src/SCPTimestampPlugin.cpp Fri Aug 06 18:29:23 2010 +0530
+++ b/terminalsecurity/SCP/SCPTimestampPlugin/src/SCPTimestampPlugin.cpp Thu Aug 19 17:35:34 2010 +0530
@@ -22,7 +22,7 @@
#include <ecom/implementationproxy.h>
#include <SCPParamObject.h>
#include <SCPServerInterface.h>
-#include <SCPTimestampPluginLang.rsg>
+#include <scptimestamppluginlang.rsg>
#include "SCP_IDs.h"
#include <bautils.h>
#include <hal.h>