--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanel/conf/bld.inf Fri Sep 17 08:31:27 2010 +0300
@@ -0,0 +1,50 @@
+/*
+* ==============================================================================
+* Name : bld.inf
+* Part of :
+* Description : This is a top level bld file to generate all libraries.
+*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). All rights reserved.
+*
+* This library is free software; you can redistribute it and/or
+* modify it under the terms of the GNU Lesser General Public
+* License as published by the Free Software Foundation; either
+* version 2 of the License, or (at your option) any later version.
+*
+* This library is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this library; if not, write to the
+* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+* Boston, MA 02111-1307, USA.
+*
+* Description: This file provides the information required for building
+*
+*/
+
+
+#include <platform_paths.hrh>
+
+PRJ_EXPORTS
+
+
+s60settingsuis.confml MW_LAYER_CONFML(s60settingsuis.confml)
+s60settingsuis_101F877A.crml MW_LAYER_CRML(s60settingsuis_101f877a.crml)
+s60settingsuis_101F877B.crml MW_LAYER_CRML(s60settingsuis_101f877b.crml)
+s60settingsuis_101F877C.crml MW_LAYER_CRML(s60settingsuis_101f877c.crml)
+s60settingsuis_101F877E.crml MW_LAYER_CRML(s60settingsuis_101f877e.crml)
+s60settingsuis_101F877F.crml MW_LAYER_CRML(s60settingsuis_101f877f.crml)
+s60settingsuis_101F883B.crml MW_LAYER_CRML(s60settingsuis_101f883b.crml)
+s60settingsuis_101F8751.crml MW_LAYER_CRML(s60settingsuis_101f8751.crml)
+s60settingsuis_101F8780.crml MW_LAYER_CRML(s60settingsuis_101f8780.crml)
+s60settingsuis_101F8781.crml MW_LAYER_CRML(s60settingsuis_101f8781.crml)
+s60settingsuis_101F8782.crml MW_LAYER_CRML(s60settingsuis_101f8782.crml)
+s60settingsuis_101F8831.crml MW_LAYER_CRML(s60settingsuis_101f8831.crml)
+s60settingsuis_1000A82B.crml MW_LAYER_CRML(s60settingsuis_1000a82b.crml)
+s60settingsuis_1020720A.crml MW_LAYER_CRML(s60settingsuis_1020720a.crml)
+s60settingsuis_1028239D.crml MW_LAYER_CRML(s60settingsuis_1028239d.crml)
+s60settingsuis_2002120B.crml MW_LAYER_CRML(s60settingsuis_2002120b.crml)
+
--- a/controlpanel/controlpanel_plat/inc/controlpanel_plat.pri Thu Sep 02 20:42:34 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,30 +0,0 @@
-#
-# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description:
-#
-
-PLATFORM_HEADERS += $$PWD/cpglobal.h \
- $$PWD/cpbasepath.h \
- $$PWD/cpplugininterface.h \
- $$PWD/cpsettingformitemdata.h \
- $$PWD/cppluginlauncher.h \
- $$PWD/cpbasesettingview.h \
- $$PWD/cpitemdatahelper.h \
- $$PWD/cpsettingformentryitemdata.h \
- $$PWD/cpsettingformentryitemdataimpl.h \
- $$PWD/cppluginloader.h \
- $$PWD/cppluginutility.h \
- $$PWD/cplauncherinterface.h
-
-HEADERS += $$PLATFORM_HEADERS
\ No newline at end of file
--- a/controlpanel/controlpanel_plat/inc/cpbasepath.h Thu Sep 02 20:42:34 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,44 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Common path definitions for controlpanel
-*
-*/
-
-#ifndef CPBASEPATH_H
-#define CPBASEPATH_H
-
-#include <QLatin1String>
-
-/*
- CP_PLUGIN_PATH : path to place controlpanel plugin stub files (.qtplugin files)
- CP_PLUGIN_CONFIG_PATH: path to place controlpanel plugin configuration files (.cpcfg files)
-*/
-#ifdef Q_OS_SYMBIAN
- #define CP_PLUGIN_PATH QLatin1String("/resource/qt/plugins/controlpanel")
- #define CP_PLUGIN_CONFIG_PATH QLatin1String("/resource/qt/plugins/controlpanel/config")
-#else
- #ifdef _DEBUG
- #define CP_PLUGIN_PATH QLatin1String("/ControlPanel/debug/bin")
- #define CP_PLUGIN_CONFIG_PATH QLatin1String("/ControlPanel/debug/bin/config")
- #else
- #define CP_PLUGIN_PATH QLatin1String("/ControlPanel/release/bin")
- #define CP_PLUGIN_CONFIG_PATH QLatin1String("/ControlPanel/release/bin/config")
- #endif
-#endif
-
-
-#endif //CPBASEPATH_H
-
-//End of File
-
--- a/controlpanel/controlpanel_plat/inc/cpbasesettingview.h Thu Sep 02 20:42:34 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,49 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Base class for controlpane plugin views.
-*
-*/
-#ifndef CPBASESETTINGVIEW_H
-#define CPBASESETTINGVIEW_H
-
-#include "cpglobal.h"
-#include <hbview.h>
-
-class QVariant;
-class QModelIndex;
-class HbDataForm;
-class CpBaseSettingViewPrivate;
-class CpItemDataHelper;
-
-class CP_EXPORT CpBaseSettingView : public HbView
-{
- Q_OBJECT
-public:
- explicit CpBaseSettingView(QGraphicsWidget *widget = 0, QGraphicsItem *parent = 0);
- virtual ~CpBaseSettingView();
-signals:
- void returnValueDelivered(const QVariant &returnValue);
- void aboutToClose();
-protected:
- virtual void close();
-private:
- Q_DISABLE_COPY(CpBaseSettingView)
- Q_DECLARE_PRIVATE_D(d_ptr, CpBaseSettingView)
- Q_PRIVATE_SLOT(d_func(), void _q_softkeyClicked())
-private:
- CpBaseSettingViewPrivate *d_ptr;
- friend class CpBaseSettingViewPrivate;
-};
-
-#endif /* CPBASESETTINGVIEW_H */
--- a/controlpanel/controlpanel_plat/inc/cpglobal.h Thu Sep 02 20:42:34 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,29 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Common definitions for controlpanel
-*
-*/
-
-#ifndef CPGLOBAL_H
-#define CPGLOBAL_H
-
-#include <QtGlobal>
-
-#ifdef BUILD_CP_FRAMEWORK
- #define CP_EXPORT Q_DECL_EXPORT
-#else
- #define CP_EXPORT Q_DECL_IMPORT
-#endif
-
-#endif
--- a/controlpanel/controlpanel_plat/inc/cpitemdatahelper.h Thu Sep 02 20:42:34 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,68 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Helper class by which a plugin can communicate with the associated dataform.
-*
-*/
-#ifndef CPITEMDATAHELPER_H
-#define CPITEMDATAHELPER_H
-
-#include <QObject>
-#include <cpglobal.h>
-
-class QObject;
-class HbWidget;
-class QModelIndex;
-class HbDataForm;
-class HbAbstractViewItem;
-class HbDataFormModelItem;
-class CpItemDataHelperPrivate;
-
-class CP_EXPORT CpItemDataHelper : public QObject
-{
- Q_OBJECT
-public:
- explicit CpItemDataHelper(HbDataForm *form = 0);
- virtual ~CpItemDataHelper();
-
- void bindToForm(HbDataForm *form);
-
- void addItemPrototype(HbAbstractViewItem *prototype);
-
- void addConnection(HbDataFormModelItem *item,
- const char *signal,
- QObject *receiver,
- const char *method);
-
- void removeConnection(HbDataFormModelItem *item,
- const char *signal,
- QObject *receiver,
- const char *method);
-
- void connectToForm(const char *signal,
- QObject *receiver,
- const char *method);
-
- void disconnectFromForm(const char *signal,
- QObject *receiver,
- const char *method);
-
- HbWidget *widgetFromModelIndex(const QModelIndex &index);
-
- HbDataFormModelItem *modelItemFromModelIndex(const QModelIndex &index);
-
-private:
- CpItemDataHelperPrivate *d;
-};
-
-#endif
--- a/controlpanel/controlpanel_plat/inc/cplauncherinterface.h Thu Sep 02 20:42:34 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,93 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Interface for controlpanel plugins, with this interface client application can launch a view from outside of controlpanel application.
-*
-*/
-
-
-#ifndef CPLAUNCHERINTERFACE_H
-#define CPLAUNCHERINTERFACE_H
-
-#include <QtPlugin>
-#include <QList>
-
-/*!
- \class CpLauncherInterface
- \brief The class CpLauncherInterface defines an interface for plugins, if one controlpanel plugin implements
- this interface, client application can launch a setting view from outside of controlpanel application by two ways.
-
- (1) launch setting view in client process, using CpPluginLauncher.
-
- \code
- CpBaseSettingView *settingView = CpPluginLauncher::launchSettingView("cpmyplugin.dll",QVariant());
- \endcode
-
- (2) launch setting view in embedded mode, using QtHighway client API.
-
- \code
- if (mRequest) {
- delete mRequest;
- mRequest = 0;
- }
-
- mRequest = mAppMgr.create("com.nokia.symbian.ICpPluginLauncher", "launchSettingView(QString,QVariant)", true);
-
- if (!mRequest)
- {
- return;
- }
- else
- {
- connect(mRequest, SIGNAL(requestOk(QVariant)), SLOT(handleReturnValue(QVariant)));
- connect(mRequest, SIGNAL(requestError(int,QString)), SLOT(handleError(int,QString)));
- }
-
- // Set arguments for request
- QList<QVariant> args;
- args << QVariant("cpmyplugin.dll");
- args << QVariant();
- mRequest->setArguments(args);
-
- mRequest->setSynchronous(false);
- // Make the request
- if (!mRequest->send())
- {
- //report error
- }
- \endcode
-
- */
-
-class QVariant;
-class CpBaseSettingView;
-
-class CpLauncherInterface
-{
-public:
- /*!
- Destructor of CpLauncherInterface.
- */
- virtual ~CpLauncherInterface()
- {
- }
-
- /*!
- Create a CpBaseSettingView by the parameter hint.
- */
- virtual CpBaseSettingView *createSettingView(const QVariant &hint) const = 0;
-};
-
-Q_DECLARE_INTERFACE(CpLauncherInterface, "com.nokia.controlpanel.launcher.interface/1.0");
-
-#endif /* CPLAUNCHERINTERFACE_H */
--- a/controlpanel/controlpanel_plat/inc/cplogger.h Thu Sep 02 20:42:34 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,76 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Log utility for controlpanel framework.
-*
-*/
-#ifndef CPLOGGER_H
-#define CPLOGGER_H
-
-
-/*
- config file path :/logconf/controlpanellog.conf
-
- Format:
-
- [CpFramework]
- logdatetime = 1
- logloggername = 1
- datetimeformat = hh:mm:ss:zzz
- output = debugoutput fileoutput
- fileoutput/logfile = C:/data/logs/cpframework.log
- fileoutput/truncate = 1
-
- [CpPerformance]
- logdatetime = 1
- datetimeformat = hh:mm:ss:zzz
- output = fileoutput
- fileoutput/logfile = C:/data/logs/cpperformance.log
- fileoutput/truncate = 1
-*/
-
-#include <QLatin1String>
-#include <logger.h>
-
-/*
- define ENABLE_CPFW_LOG to make CPFW_LOG work
-*/
-
-//#define ENABLE_CPFW_LOG
-
-/*
- define ENABLE_CPPERF_LOG to make CPPERF_LOG work
-*/
-
-//#define ENABLE_CPPERF_LOG
-
-#define CPFW_LOGGER_NAME QLatin1String("CpFramework")
-#define CPPERF_LOGGER_NAME QLatin1String("CpPerformance")
-
-#define CP_LOGGER_CONFIG_PATH QLatin1String(":/logconf/controlpanellog.conf")
-
-#ifdef ENABLE_CPFW_LOG
- #define CPFW_LOG(str) Logger::instance(CPFW_LOGGER_NAME)->log(str);
- #define CPSP_LOG_FUNC_ENTRY(func) LogFunctionEntryHelper ___cpfw_log_func_entry_helper(CPFW_LOGGER_NAME,func);
-#else
- #define CPFW_LOG(str)
- #define CPSP_LOG_FUNC_ENTRY(func)
-#endif
-
-#ifdef ENABLE_CPPERF_LOG
- #define CPPERF_LOG(str) Logger::instance(CPPERF_LOGGER_NAME)->log(str);
-#else
- #define CPPERF_LOG(str)
-#endif
-
-#endif /* CPLOGGER_H */
--- a/controlpanel/controlpanel_plat/inc/cpplugininterface.h Thu Sep 02 20:42:34 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,50 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Interface for controlpanel plugins.
-*
-*/
-
-#ifndef CPPLUGININTERFACE_H
-#define CPPLUGININTERFACE_H
-
-#include <QtPlugin>
-#include <QList>
-
-/*!
- \class CpPluginInterface
- \brief The class CpPluginInterface is an interface for controlpanel plugins.
- */
-
-class CpSettingFormItemData;
-class CpItemDataHelper;
-
-class CpPluginInterface
-{
-public:
- /*!
- Destructor of CpPluginInterface.
- */
- virtual ~CpPluginInterface()
- {
- }
-
- /*!
- Create a set of data form mode item, by which the control panel framework can build a data form model.
- */
- virtual QList<CpSettingFormItemData*> createSettingFormItemData(CpItemDataHelper &itemDataHelper) const = 0;
-};
-
-Q_DECLARE_INTERFACE(CpPluginInterface, "com.nokia.controlpanel.plugin.interface/1.0");
-
-#endif /* CPPLUGININTERFACE_H */
--- a/controlpanel/controlpanel_plat/inc/cppluginlauncher.h Thu Sep 02 20:42:34 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,33 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Launch controlpanel plugin setting view in client process.
-*
-*/
-
-#ifndef CPPLUGINLAUNCHER_H
-#define CPPLUGINLAUNCHER_H
-
-#include "cpglobal.h"
-#include <QVariant>
-
-class QString;
-class CpBaseSettingView;
-
-class CP_EXPORT CpPluginLauncher
-{
-public:
- static CpBaseSettingView* launchSettingView(const QString &pluginFile,const QVariant &hint = QVariant());
-};
-
-#endif /* CPPLUGINLAUNCHER_H */
--- a/controlpanel/controlpanel_plat/inc/cppluginloader.h Thu Sep 02 20:42:34 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,36 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Utility class to load a CpPluginInterface or CpLauncherInterface from a controlpanel plugin file.
-*
-*/
-
-#ifndef CPPLUGINLOADER_H
-#define CPPLUGINLOADER_H
-
-#include <cpglobal.h>
-#include <QList>
-
-class QString;
-class CpPluginInterface;
-class CpLauncherInterface;
-class CpPluginPlatInterface;
-
-class CP_EXPORT CpPluginLoader
-{
-public:
- static CpPluginInterface *loadCpPluginInterface(const QString &pluginFile);
- static CpLauncherInterface *loadCpLauncherInterface(const QString &pluginFile);
-};
-
-#endif /* CPPLUGINLOADER_H */
--- a/controlpanel/controlpanel_plat/inc/cppluginutility.h Thu Sep 02 20:42:34 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,31 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Utility class for controlpanel plugins.
-*
-*/
-
-#ifndef CPPLUGINUTILITY_H
-#define CPPLUGINUTILITY_H
-
-#include <cpglobal.h>
-
-class HbDataForm;
-
-class CP_EXPORT CpPluginUtility
-{
-public:
- static void addCpItemPrototype(HbDataForm *settingForm);
-};
-
-#endif
--- a/controlpanel/controlpanel_plat/inc/cpsettingformentryitemdata.h Thu Sep 02 20:42:34 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,100 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-#ifndef CPSETTINGFORMENTRYITEMDATA_H
-#define CPSETTINGFORMENTRYITEMDATA_H
-
-#include <cpglobal.h>
-#include <QObject>
-#include <cpsettingformitemdata.h>
-#include <hbicon.h>
-
-class CpItemDataHelper;
-class CpBaseSettingView;
-class HbDataForm;
-class QModelIndex;
-class CpSettingFormEntryItemDataPrivate;
-
-class CP_EXPORT CpSettingFormEntryItemData : public CpSettingFormItemData
-{
- Q_OBJECT
-public:
- enum EntryItemType {
- ListEntryItem = HbDataFormModelItem::CustomItemBase + 1,
- ButtonEntryItem = HbDataFormModelItem::CustomItemBase + 2
- };
-
- explicit CpSettingFormEntryItemData(const HbDataFormModelItem *parent = 0);
-
- explicit CpSettingFormEntryItemData(
- CpItemDataHelper &itemDataHelper,
- const QString &text = QString(),
- const QString &description = QString(),
- const HbIcon &icon = HbIcon(),
- const HbDataFormModelItem *parent = 0);
-
- explicit CpSettingFormEntryItemData(
- HbDataForm *dataForm,
- const QString &text = QString(),
- const QString &description = QString(),
- const HbIcon &icon = HbIcon(),
- const HbDataFormModelItem *parent = 0);
-
- explicit CpSettingFormEntryItemData(
- EntryItemType type,
- CpItemDataHelper &itemDataHelper,
- const QString &text = QString(),
- const QString &description = QString(),
- const QString &iconName = QString(),
- const HbDataFormModelItem *parent = 0);
-
- explicit CpSettingFormEntryItemData(
- EntryItemType type,
- HbDataForm *dataForm,
- const QString &text = QString(),
- const QString &description = QString(),
- const QString &iconName = QString(),
- const HbDataFormModelItem *parent = 0);
-
- virtual ~CpSettingFormEntryItemData();
-
- QString text() const;
- void setText(const QString &text);
-
- QString description() const;
- void setDescription(const QString &description);
-
- QString iconName() const;
- void setIconName(const QString &icon);
-
- HbIcon entryItemIcon() const;
- void setEntryItemIcon(const HbIcon &icon);
-
-public slots:
- virtual void onLaunchView();
-private:
- virtual CpBaseSettingView *createSettingView() const = 0;
-private:
- Q_DISABLE_COPY(CpSettingFormEntryItemData)
- Q_DECLARE_PRIVATE_D(d_ptr, CpSettingFormEntryItemData)
- Q_PRIVATE_SLOT(d_func(), void _q_itemPressed(const QModelIndex &index))
- Q_PRIVATE_SLOT(d_func(), void _q_itemActivated(const QModelIndex &index))
-private:
- CpSettingFormEntryItemDataPrivate *d_ptr;
-};
-
-#endif //CPSETTINGFORMENTRYITEMDATA_H
--- a/controlpanel/controlpanel_plat/inc/cpsettingformentryitemdataimpl.h Thu Sep 02 20:42:34 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,97 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-#ifndef CPSETTINGFORMENTRYITEMDATAIMPL_H
-#define CPSETTINGFORMENTRYITEMDATAIMPL_H
-
-#include "cpsettingformentryitemdata.h"
-
-
-/*!
- \class CpSettingFormEntryItemDataImpl
- \brief The template class CpSettingFormEntryItemDataImpl provide a defaut implementation of CpSettingFormEntryItemData.
- By implementing pure virtual function CpSettingFormEntryItemData::createSettingView.
- */
-class CpItemDataHelper;
-template<typename PLUGIN_VIEW>
-class CpSettingFormEntryItemDataImpl : public CpSettingFormEntryItemData
-{
-public:
-
- /*!
- Construct a new CpSettingFormEntryItemDataImpl with the given text,description and parent.
- */
- explicit CpSettingFormEntryItemDataImpl(CpItemDataHelper &itemDataHelper,
- const QString &text = QString(),
- const QString &description = QString(),
- const HbIcon &icon = HbIcon(),
- const HbDataFormModelItem *parent = 0) :
- CpSettingFormEntryItemData(itemDataHelper,text,description,icon,parent)
- { }
-
- /*!
- Construct a new CpSettingFormEntryItemDataImpl with the given text,description and parent.
- */
- explicit CpSettingFormEntryItemDataImpl(HbDataForm *dataForm,
- const QString &text = QString(),
- const QString &description = QString(),
- const HbIcon &icon = HbIcon(),
- const HbDataFormModelItem *parent = 0) :
- CpSettingFormEntryItemData(dataForm,text,description,icon,parent)
-
- { }
-
- /*!
- Construct a new CpSettingFormEntryItemData with the given type, text, description, icon name, and parent.
- */
- explicit CpSettingFormEntryItemDataImpl(
- EntryItemType type,
- CpItemDataHelper &itemDataHelper,
- const QString &text = QString(),
- const QString &description = QString(),
- const QString &icon = QString(),
- const HbDataFormModelItem *parent = 0) :
- CpSettingFormEntryItemData(type,itemDataHelper,text,description,icon,parent)
- { }
-
- /*!
- Construct a new CpSettingFormEntryItemData with the given type, text, description, icon name, and parent.
- */
- explicit CpSettingFormEntryItemDataImpl(
- EntryItemType type,
- HbDataForm *dataForm,
- const QString &text = QString(),
- const QString &description = QString(),
- const QString &icon = QString(),
- const HbDataFormModelItem *parent = 0) :
- CpSettingFormEntryItemData(type,dataForm,text,description,icon,parent)
- { }
-
- /*!
- Destructor.
- */
- virtual ~CpSettingFormEntryItemDataImpl()
- { }
-
- /*!
- Implement CpSettingFormEntryItemData::createSettingView
- */
- virtual CpBaseSettingView *createSettingView() const
- { return new PLUGIN_VIEW(); }
-};
-
-#endif // CP_SETTINGFORM_ENTRY_ITEM_DATA_IMPL_H
--- a/controlpanel/controlpanel_plat/inc/cpsettingformitemdata.h Thu Sep 02 20:42:34 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,45 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-* This class is a control panel defined HbDataFormModelItem
-*
-*
-*/
-#ifndef CPSETTINGFORMITEMDATA_H
-#define CPSETTINGFORMITEMDATA_H
-
-#include <cpglobal.h>
-#include <hbdataformmodelitem.h>
-#include <QObject>
-#include <QVariant>
-
-class QString;
-class CpItemDataHelper;
-class CpSettingFormItemDataPrivate;
-
-class CP_EXPORT CpSettingFormItemData : public QObject, public HbDataFormModelItem
-{
- Q_OBJECT
-public:
- CpSettingFormItemData(HbDataFormModelItem::DataItemType type,
- const QString &label,
- const HbDataFormModelItem *parent = 0);
- CpSettingFormItemData(const HbDataFormModelItem *parent = 0);
- virtual ~CpSettingFormItemData();
-private:
- CpSettingFormItemDataPrivate *d_ptr; //reservered
-};
-
-
-#endif
--- a/controlpanel/controlpanel_plat/inc/logger.h Thu Sep 02 20:42:34 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,126 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: This class provide log functionality.
-*
-*/
-
-#ifndef LOGGER_H
-#define LOGGER_H
-
-#include <QObject>
-#include <QSettings>
-#include <loggerglobal.h>
-
-class LogOutput;
-class QSettings;
-class LoggerPrivate;
-
-/*
-
-configuration format:
-
- [myapplog]
- logDateTime = 1
- logLoggerName = 1
- datetimeformat = hh:mm:ss
- output = debugoutput consoleoutput fileoutput
- fileoutput/logfile = C:/data/log/myapp.log
- fileoutput/truncate = 1
-
-code examples:
-
- QSettings settings("myapp.ini",QSettings::IniFormat);
- Logger::instance("myapplog")->configure(settings);
- Logger::instance("myapplog")->log("Hello world!");
-
-*/
-
-class LOGGER_EXPORT Logger : public QObject
-{
- Q_OBJECT
- Q_PROPERTY(bool logDateTime READ logDateTime WRITE setLogDateTime)
- Q_PROPERTY(bool logLoggerName READ logLoggerName WRITE setLogLoggerName)
- Q_PROPERTY(QString dateTimeFormat READ dateTimeFormat WRITE setDateTimeFormat)
-public:
- static Logger *instance(const QString &name);
- static void close(const QString &name);
- static void closeAll();
-public:
- virtual ~Logger();
-
- void log(const QString &log);
-
- void configure(const QString &configFile,QSettings::Format format = QSettings::NativeFormat);
-
- void configure(QSettings &settings);
-
- bool addLogOutput(LogOutput *output);
-
- void removeLogOutput(LogOutput *output);
-
- LogOutput *logOutput(const QString &name);
-
- void clearAllLogOutput();
-
- QString name() const;
-
- bool logDateTime() const;
- void setLogDateTime(bool on);
-
- bool logLoggerName() const;
- void setLogLoggerName(bool on);
-
- QString dateTimeFormat() const;
- void setDateTimeFormat(const QString &format);
-private:
- explicit Logger(const QString &name = QString(),QObject *parent = 0);
- LoggerPrivate *d_ptr;
-};
-
-class InitLoggerHelper
-{
-public:
- InitLoggerHelper(const QString &loggerName,const QString &configPath)
- : mLoggerName(loggerName)
- {
- Logger::instance(loggerName)->configure(configPath,QSettings::IniFormat);
- }
- ~InitLoggerHelper() {
- Logger::close(mLoggerName);
- }
-private:
- QString mLoggerName;
-};
-
-class LogFunctionEntryHelper
-{
-public:
- LogFunctionEntryHelper(const QString &loggerName,const QString &func)
- : mLoggerName(loggerName), mFunc(func)
- {
- Logger::instance(mLoggerName)->log(QLatin1String(">>>> ") + mFunc);
- }
- ~LogFunctionEntryHelper()
- {
- Logger::instance(mLoggerName)->log(QLatin1String("<<<< ") + mFunc);
- }
-private:
- QString mLoggerName;
- QString mFunc;
-};
-
-#define INIT_LOGGER(loggerName,configPath) \
- InitLoggerHelper __init##loggerName(loggerName,configPath);
-
-#endif //LOGGER_H
--- a/controlpanel/controlpanel_plat/inc/logger_plat.pri Thu Sep 02 20:42:34 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,23 +0,0 @@
-#
-# 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:
-#
-
-PLATFORM_HEADERS += $$PWD/logger.h \
- $$PWD/loggerglobal.h \
- $$PWD/logoutput.h \
- $$PWD/logoutputfactory.h \
- $$PWD/cplogger.h
-
-HEADERS += $$PLATFORM_HEADERS
--- a/controlpanel/controlpanel_plat/inc/loggerglobal.h Thu Sep 02 20:42:34 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,45 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Common definitions for log.
-*
-*/
-#ifndef LOGGERGLOBAL_H
-#define LOGGERGLOBAL_H
-
-#include <QtGlobal>
-
-#ifdef BUILD_LOGGER_DLL
- #define LOGGER_EXPORT Q_DECL_EXPORT
-#else
- #define LOGGER_EXPORT Q_DECL_IMPORT
-#endif
-
-#define LINE_SEPERATOR QLatin1String("\r\n");
-
-#define SETTINGS_SECTION_SEPERATOR QLatin1String("/")
-
-//following strings can be used in configuration file to specify logger's properties
-//refer to logger.h
-#define LOGGER_LOGDATETIME QLatin1String("logdatetime")
-#define LOGGER_LOGLOGGERNAME QLatin1String("logloggername")
-#define LOGGER_DATETIMEFORMAT QLatin1String("datetimeformat")
-#define LOGGER_OUTPUT QLatin1String("output")
-
-#define DEBUGOUTPUT_NAME QLatin1String("debugoutput")
-#define CONSOLEOUTPUT_NAME QLatin1String("consoleoutput")
-#define FILEOUTPUT_NAME QLatin1String("fileoutput")
- #define FILEOUTPUT_LOGFILE QLatin1String("logfile")
- #define FILEOUTPUT_TRUNCATE QLatin1String("truncate")
-
-#endif //LOGGERGLOBAL_H
--- a/controlpanel/controlpanel_plat/inc/logoutput.h Thu Sep 02 20:42:34 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,51 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: An interface to output log string.
-*
-*/
-#ifndef LOGOUTPUT_H
-#define LOGOUTPUT_H
-
-#include <loggerglobal.h>
-#include <QObject>
-
-class QString;
-class QSettings;
-class Logger;
-
-class LogOutputPrivate;
-class LOGGER_EXPORT LogOutput : public QObject
-{
- Q_OBJECT
- Q_PROPERTY(QString name READ name WRITE setName)
-public:
- virtual ~LogOutput();
- virtual void output(const QString &log) = 0;
- virtual bool init() = 0;
- bool load(QSettings &settings);
-
- Logger *parentLogger();
- void setParentLogger(Logger *parentLogger);
-
- QString name() const;
- void setName(const QString &name);
-private:
- virtual bool doLoad(QSettings &settings) = 0;
-protected:
- LogOutput(Logger *parentLogger = 0);
-private:
- LogOutputPrivate *d_ptr;
-};
-
-#endif //LOGOUTPUT_H
--- a/controlpanel/controlpanel_plat/inc/logoutputfactory.h Thu Sep 02 20:42:34 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,52 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Factory class to create LogOutput.
-*
-*/
-#ifndef LOGOUTPUTFACTORY_H
-#define LOGOUTPUTFACTORY_H
-
-class LogOutput;
-class QVariant;
-class QString;
-
-#include <QHash>
-#include <loggerglobal.h>
-
-class LOGGER_EXPORT LogOutputFactory
-{
-public:
- typedef LogOutput* (*CREATE_ENTRY)();
- static LogOutput *createLogOutput(const QString &name);
- static LogOutput *createLogOutput(const QString &name,const QHash<QString,QVariant> &properties);
- static void addCreateLogOutputEntry(const QString &name,CREATE_ENTRY entry);
-};
-
-class LogOutputCreateEntryRegister
-{
-public:
- LogOutputCreateEntryRegister(const QString &name,LogOutputFactory::CREATE_ENTRY entry) {
- LogOutputFactory::addCreateLogOutputEntry(name,entry);
- }
-};
-
-#define REGISTER_OUTPUT_LOG(name,Class) \
- static LogOutput *create##Class() { \
- LogOutput *output = new Class(); \
- output->setName(name); \
- return output; \
- } \
- LogOutputCreateEntryRegister the##Class##EntryRegister(name,create##Class);
-
-#endif //LOGOUTPUTFACTORY_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanel/rom/bld.inf Fri Sep 17 08:31:27 2010 +0300
@@ -0,0 +1,33 @@
+/*
+* ==============================================================================
+* Name : bld.inf
+* Part of :
+* Description : This is a top level bld file to generate all libraries.
+*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). All rights reserved.
+*
+* This library is free software; you can redistribute it and/or
+* modify it under the terms of the GNU Lesser General Public
+* License as published by the Free Software Foundation; either
+* version 2 of the License, or (at your option) any later version.
+*
+* This library is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this library; if not, write to the
+* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+* Boston, MA 02111-1307, USA.
+*
+* Description : This is a top level bld file to export the data and ROM files
+*
+*/
+
+
+#include <platform_paths.hrh>
+
+PRJ_EXPORTS
+
+controlpanel.iby CORE_MW_LAYER_IBY_EXPORT_PATH(controlpanel.iby)
--- a/controlpanel/src/cpframework/cpframework.pri Thu Sep 02 20:42:34 2010 +0300
+++ b/controlpanel/src/cpframework/cpframework.pri Fri Sep 17 08:31:27 2010 +0300
@@ -15,7 +15,19 @@
# Description: cpframework source files
#
-HEADERS += src/cpviewlauncher.h \
+HEADERS += ../../../gsprofilesrv_plat/controlpanel_api/inc/cpglobal.h \
+ ../../../gsprofilesrv_plat/controlpanel_api/inc/cpbasepath.h \
+ ../../../gsprofilesrv_plat/controlpanel_api/inc/cpplugininterface.h \
+ ../../../gsprofilesrv_plat/controlpanel_api/inc/cpsettingformitemdata.h \
+ ../../../gsprofilesrv_plat/controlpanel_api/inc/cppluginlauncher.h \
+ ../../../gsprofilesrv_plat/controlpanel_api/inc/cpbasesettingview.h \
+ ../../../gsprofilesrv_plat/controlpanel_api/inc/cpitemdatahelper.h \
+ ../../../gsprofilesrv_plat/controlpanel_api/inc/cpsettingformentryitemdata.h \
+ ../../../gsprofilesrv_plat/controlpanel_api/inc/cpsettingformentryitemdataimpl.h \
+ ../../../gsprofilesrv_plat/controlpanel_api/inc/cppluginloader.h \
+ ../../../gsprofilesrv_plat/controlpanel_api/inc/cppluginutility.h \
+ ../../../gsprofilesrv_plat/controlpanel_api/inc/cplauncherinterface.h \
+ src/cpviewlauncher.h \
src/cpbasesettingview_p.h \
src/cpwatchdog.h \
src/cputility.h \
--- a/controlpanel/src/cpframework/cpframework.pro Thu Sep 02 20:42:34 2010 +0300
+++ b/controlpanel/src/cpframework/cpframework.pro Fri Sep 17 08:31:27 2010 +0300
@@ -19,7 +19,6 @@
include ( ../common.pri )
include ( ./cpframework.pri )
-include ( ../../controlpanel_plat/inc/controlpanel_plat.pri )
RESOURCES += cpframework.qrc
@@ -32,6 +31,4 @@
DEFINES += BUILD_CP_FRAMEWORK
LIBS += -lcplogger
-
-include ( cpframework_export.pri )
--- a/controlpanel/src/cpframework/cpframework_export.pri Thu Sep 02 20:42:34 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,35 +0,0 @@
-#
-# 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: controlpanel project - common qmake settings
-#
-
-symbian: {
- # export headers to mw
- EXPORT_PLATFORM_HEADERS += \
- ../../controlpanel_plat/inc/cpglobal.h \
- ../../controlpanel_plat/inc/cpbasepath.h \
- ../../controlpanel_plat/inc/cpplugininterface.h \
- ../../controlpanel_plat/inc/cppluginloader.h \
- ../../controlpanel_plat/inc/cppluginlauncher.h \
- ../../controlpanel_plat/inc/cpbasesettingview.h \
- ../../controlpanel_plat/inc/cpitemdatahelper.h \
- ../../controlpanel_plat/inc/cpsettingformitemdata.h \
- ../../controlpanel_plat/inc/cpsettingformentryitemdata.h \
- ../../controlpanel_plat/inc/cpsettingformentryitemdataimpl.h \
- ../../controlpanel_plat/inc/cppluginutility.h \
- ../../controlpanel_plat/inc/cplauncherinterface.h
-
- headers.sources = $$EXPORT_PLATFORM_HEADERS
- for(header, headers.sources):BLD_INF_RULES.prj_exports += "./$$header $$MW_LAYER_PLATFORM_EXPORT_PATH($$basename(header))"
-}
--- a/controlpanel/src/logger/logger.pri Thu Sep 02 20:42:34 2010 +0300
+++ b/controlpanel/src/logger/logger.pri Fri Sep 17 08:31:27 2010 +0300
@@ -14,5 +14,11 @@
# Description: controlpanel project - common qmake settings
#
-HEADERS += $$PWD/src/*.h
+HEADERS += $$PWD/src/*.h \
+ ../../../gsprofilesrv_plat/controlpanel_api/inc/logger.h \
+ ../../../gsprofilesrv_plat/controlpanel_api/inc/loggerglobal.h \
+ ../../../gsprofilesrv_plat/controlpanel_api/inc/logoutput.h \
+ ../../../gsprofilesrv_plat/controlpanel_api/inc/logoutputfactory.h \
+ ../../../gsprofilesrv_plat/controlpanel_api/inc/cplogger.h
+
SOURCES += $$PWD/src/*.cpp
--- a/controlpanel/src/logger/logger.pro Thu Sep 02 20:42:34 2010 +0300
+++ b/controlpanel/src/logger/logger.pro Fri Sep 17 08:31:27 2010 +0300
@@ -19,13 +19,10 @@
include ( ../common.pri )
include ( logger.pri)
-include ( ../../controlpanel_plat/inc/logger_plat.pri )
symbian: {
TARGET.UID3 = 0x20028734
}
DEFINES += BUILD_LOGGER_DLL
-
-include ( logger_export.pri )
--- a/controlpanel/src/logger/logger_export.pri Thu Sep 02 20:42:34 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,28 +0,0 @@
-#
-# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description: controlpanel project - common qmake settings
-#
-
-symbian: {
- # export headers to mw
- EXPORT_PLATFORM_CPLOGGER_HEADERS += \
- ../../controlpanel_plat/inc/logger.h \
- ../../controlpanel_plat/inc/logoutput.h \
- ../../controlpanel_plat/inc/loggerglobal.h \
- ../../controlpanel_plat/inc/logoutputfactory.h \
- ../../controlpanel_plat/inc/cplogger.h
-
- loggers.sources = $$EXPORT_PLATFORM_CPLOGGER_HEADERS
- for(logger, loggers.sources):BLD_INF_RULES.prj_exports += "./$$logger $$MW_LAYER_PLATFORM_EXPORT_PATH(cplogger/$$basename(logger))"
-}
\ No newline at end of file
--- a/controlpanel/tsrc/unit/ut_common.pri Thu Sep 02 20:42:34 2010 +0300
+++ b/controlpanel/tsrc/unit/ut_common.pri Fri Sep 17 08:31:27 2010 +0300
@@ -22,5 +22,10 @@
QMAKE_EXTRA_TARGETS += test autotest
DEPENDPATH += .
+
+symbian {
+ INCLUDEPATH += $$MW_LAYER_SYSTEMINCLUDE
+ INCLUDEPATH += $$MW_LAYER_PLATFORM_EXPORT_PATH(cplogger)
+}
-LIBS += -lcpframework
+LIBS += -lcpframework -lcplogger
--- a/controlpanel/tsrc/unit/ut_cpapi/ut_cpapi.pro Thu Sep 02 20:42:34 2010 +0300
+++ b/controlpanel/tsrc/unit/ut_cpapi/ut_cpapi.pro Fri Sep 17 08:31:27 2010 +0300
@@ -11,17 +11,13 @@
TEMPLATE = app
TARGET = ut_cpapi
-QT += testlib
-CONFIG += hb qtestlib
-CONFIG += symbian_test
-
-QMAKE_EXTRA_TARGETS += test autotest
DEPENDPATH += .
INCLUDEPATH += src/ \
../../../src/inc \
../../../controlpanel_plat/inc
-LIBS += -lcpframework
+
+include (../ut_common.pri)
# Input
HEADERS += src/ut_cpapi.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/ftuwizardmodel/bwins/ftuwizardmodelu.def Fri Sep 17 08:31:27 2010 +0300
@@ -0,0 +1,23 @@
+EXPORTS
+ ?trUtf8@FtuWizard@@SA?AVQString@@PBD0@Z @ 1 NONAME ; class QString FtuWizard::trUtf8(char const *, char const *)
+ ?qt_metacall@FtuWizard@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 2 NONAME ; int FtuWizard::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?tr@FtuWizard@@SA?AVQString@@PBD0H@Z @ 3 NONAME ; class QString FtuWizard::tr(char const *, char const *, int)
+ ?staticMetaObject@FtuWizard@@2UQMetaObject@@B @ 4 NONAME ; struct QMetaObject const FtuWizard::staticMetaObject
+ ?overlayAdded@FtuWizard@@IAEXPAV1@PAVQGraphicsWidget@@@Z @ 5 NONAME ; void FtuWizard::overlayAdded(class FtuWizard *, class QGraphicsWidget *)
+ ?shutdownCompleted@FtuWizard@@IAEXPAV1@@Z @ 6 NONAME ; void FtuWizard::shutdownCompleted(class FtuWizard *)
+ ?qt_metacast@FtuWizard@@UAEPAXPBD@Z @ 7 NONAME ; void * FtuWizard::qt_metacast(char const *)
+ ?overlayRemoved@FtuWizard@@IAEXPAV1@PAVQGraphicsWidget@@@Z @ 8 NONAME ; void FtuWizard::overlayRemoved(class FtuWizard *, class QGraphicsWidget *)
+ ?metaObject@FtuWizard@@UBEPBUQMetaObject@@XZ @ 9 NONAME ; struct QMetaObject const * FtuWizard::metaObject(void) const
+ ?tr@FtuWizard@@SA?AVQString@@PBD0@Z @ 10 NONAME ; class QString FtuWizard::tr(char const *, char const *)
+ ?getStaticMetaObject@FtuWizard@@SAABUQMetaObject@@XZ @ 11 NONAME ; struct QMetaObject const & FtuWizard::getStaticMetaObject(void)
+ ?progressUpdated@FtuWizard@@IAEXPAV1@_NH@Z @ 12 NONAME ; void FtuWizard::progressUpdated(class FtuWizard *, bool, int)
+ ?viewChanged@FtuWizard@@IAEXPAV1@PAVQGraphicsWidget@@@Z @ 13 NONAME ; void FtuWizard::viewChanged(class FtuWizard *, class QGraphicsWidget *)
+ ?updateMainMenu@FtuWizard@@IAEXPAV1@PAVHbMenu@@@Z @ 14 NONAME ; void FtuWizard::updateMainMenu(class FtuWizard *, class HbMenu *)
+ ??1FtuWizard@@UAE@XZ @ 15 NONAME ; FtuWizard::~FtuWizard(void)
+ ??_EFtuWizard@@UAE@I@Z @ 16 NONAME ; FtuWizard::~FtuWizard(unsigned int)
+ ?wizardDeactivated@FtuWizard@@IAEXPAV1@@Z @ 17 NONAME ; void FtuWizard::wizardDeactivated(class FtuWizard *)
+ ?wizardInitialized@FtuWizard@@IAEXPAV1@_N@Z @ 18 NONAME ; void FtuWizard::wizardInitialized(class FtuWizard *, bool)
+ ??0FtuWizard@@IAE@XZ @ 19 NONAME ; FtuWizard::FtuWizard(void)
+ ?infoTextUpdated@FtuWizard@@IAEXPAV1@VQString@@@Z @ 20 NONAME ; void FtuWizard::infoTextUpdated(class FtuWizard *, class QString)
+ ?trUtf8@FtuWizard@@SA?AVQString@@PBD0H@Z @ 21 NONAME ; class QString FtuWizard::trUtf8(char const *, char const *, int)
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/ftuwizardmodel/eabi/ftuwizardmodelu.def Fri Sep 17 08:31:27 2010 +0300
@@ -0,0 +1,18 @@
+EXPORTS
+ _ZN9FtuWizard11qt_metacallEN11QMetaObject4CallEiPPv @ 1 NONAME
+ _ZN9FtuWizard11qt_metacastEPKc @ 2 NONAME
+ _ZN9FtuWizard11viewChangedEPS_P15QGraphicsWidget @ 3 NONAME
+ _ZN9FtuWizard12overlayAddedEPS_P15QGraphicsWidget @ 4 NONAME
+ _ZN9FtuWizard14overlayRemovedEPS_P15QGraphicsWidget @ 5 NONAME
+ _ZN9FtuWizard14updateMainMenuEPS_P6HbMenu @ 6 NONAME
+ _ZN9FtuWizard15infoTextUpdatedEPS_7QString @ 7 NONAME
+ _ZN9FtuWizard15progressUpdatedEPS_bi @ 8 NONAME
+ _ZN9FtuWizard16staticMetaObjectE @ 9 NONAME DATA 16
+ _ZN9FtuWizard17shutdownCompletedEPS_ @ 10 NONAME
+ _ZN9FtuWizard17wizardDeactivatedEPS_ @ 11 NONAME
+ _ZN9FtuWizard17wizardInitializedEPS_b @ 12 NONAME
+ _ZN9FtuWizard19getStaticMetaObjectEv @ 13 NONAME
+ _ZNK9FtuWizard10metaObjectEv @ 14 NONAME
+ _ZTI9FtuWizard @ 15 NONAME
+ _ZTV9FtuWizard @ 16 NONAME
+
--- a/ftuwizardmodel/ftuwizardmodel.pro Thu Sep 02 20:42:34 2010 +0300
+++ b/ftuwizardmodel/ftuwizardmodel.pro Fri Sep 17 08:31:27 2010 +0300
@@ -52,11 +52,11 @@
#deployment configuration, deploy as a dll.
symbian {
deploy_ftuwizardmodel.sources = ftuwizardmodel.dll
- deploy_ftuwizardmodel.path = \sys\bin
+ deploy_ftuwizardmodel.path = /sys/bin
DEPLOYMENT += deploy_ftuwizardmodel
BLD_INF_RULES.prj_exports += \
"rom/ftuwizardmodel.iby CORE_MW_LAYER_IBY_EXPORT_PATH(ftuwizardmodel.iby)"
}
#ONLY FOR DEVELOPMENT! REMOVE THIS BEFORE EACH HS_Domain RELEASE!
-symbian: MMP_RULES += EXPORTUNFROZEN
+symbian:MMP_RULES += SMPSAFE
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gsprofilesrv_plat/controlpanel_api/controlpanel_api.pri Fri Sep 17 08:31:27 2010 +0300
@@ -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:
+#
+
+CONTROLPANEL_PLAT_HEADERS += \
+ inc/cpglobal.h \
+ inc/cpbasepath.h \
+ inc/cpplugininterface.h \
+ inc/cpsettingformitemdata.h \
+ inc/cppluginlauncher.h \
+ inc/cpbasesettingview.h \
+ inc/cpitemdatahelper.h \
+ inc/cpsettingformentryitemdata.h \
+ inc/cpsettingformentryitemdataimpl.h \
+ inc/cppluginloader.h \
+ inc/cppluginutility.h \
+ inc/cplauncherinterface.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gsprofilesrv_plat/controlpanel_api/controlpanel_api.pro Fri Sep 17 08:31:27 2010 +0300
@@ -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:
+#
+
+TEMPLATE = subdirs
+
+SYMBIAN_PLATFORMS = WINSCW ARMV5
+
+CONFIG += ordered
+
+include ( controlpanel_api.pri )
+include ( logger_api.pri )
+
+symbian: {
+ BLD_INF_RULES.prj_exports += "$${LITERAL_HASH}include <platform_paths.hrh>"
+
+ #exports controlpanel header files
+ headers.sources = $$CONTROLPANEL_PLAT_HEADERS
+ for(header, headers.sources):BLD_INF_RULES.prj_exports += "./$$header $$MW_LAYER_PLATFORM_EXPORT_PATH($$basename(header))"
+
+ #exports logger header files
+ headers.sources = $$CONTROLPANEL_LOG_PLAT_HEADERS
+ for(header, headers.sources):BLD_INF_RULES.prj_exports += "./$$header $$MW_LAYER_PLATFORM_EXPORT_PATH(cplogger/$$basename(header))"
+}
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gsprofilesrv_plat/controlpanel_api/inc/cpbasepath.h Fri Sep 17 08:31:27 2010 +0300
@@ -0,0 +1,44 @@
+/*
+* 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: Common path definitions for controlpanel
+*
+*/
+
+#ifndef CPBASEPATH_H
+#define CPBASEPATH_H
+
+#include <QLatin1String>
+
+/*
+ CP_PLUGIN_PATH : path to place controlpanel plugin stub files (.qtplugin files)
+ CP_PLUGIN_CONFIG_PATH: path to place controlpanel plugin configuration files (.cpcfg files)
+*/
+#ifdef Q_OS_SYMBIAN
+ #define CP_PLUGIN_PATH QLatin1String("/resource/qt/plugins/controlpanel")
+ #define CP_PLUGIN_CONFIG_PATH QLatin1String("/resource/qt/plugins/controlpanel/config")
+#else
+ #ifdef _DEBUG
+ #define CP_PLUGIN_PATH QLatin1String("/ControlPanel/debug/bin")
+ #define CP_PLUGIN_CONFIG_PATH QLatin1String("/ControlPanel/debug/bin/config")
+ #else
+ #define CP_PLUGIN_PATH QLatin1String("/ControlPanel/release/bin")
+ #define CP_PLUGIN_CONFIG_PATH QLatin1String("/ControlPanel/release/bin/config")
+ #endif
+#endif
+
+
+#endif //CPBASEPATH_H
+
+//End of File
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gsprofilesrv_plat/controlpanel_api/inc/cpbasesettingview.h Fri Sep 17 08:31:27 2010 +0300
@@ -0,0 +1,49 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0""
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Base class for controlpane plugin views.
+*
+*/
+#ifndef CPBASESETTINGVIEW_H
+#define CPBASESETTINGVIEW_H
+
+#include "cpglobal.h"
+#include <hbview.h>
+
+class QVariant;
+class QModelIndex;
+class HbDataForm;
+class CpBaseSettingViewPrivate;
+class CpItemDataHelper;
+
+class CP_EXPORT CpBaseSettingView : public HbView
+{
+ Q_OBJECT
+public:
+ explicit CpBaseSettingView(QGraphicsWidget *widget = 0, QGraphicsItem *parent = 0);
+ virtual ~CpBaseSettingView();
+signals:
+ void returnValueDelivered(const QVariant &returnValue);
+ void aboutToClose();
+protected:
+ virtual void close();
+private:
+ Q_DISABLE_COPY(CpBaseSettingView)
+ Q_DECLARE_PRIVATE_D(d_ptr, CpBaseSettingView)
+ Q_PRIVATE_SLOT(d_func(), void _q_softkeyClicked())
+private:
+ CpBaseSettingViewPrivate *d_ptr;
+ friend class CpBaseSettingViewPrivate;
+};
+
+#endif /* CPBASESETTINGVIEW_H */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gsprofilesrv_plat/controlpanel_api/inc/cpglobal.h Fri Sep 17 08:31:27 2010 +0300
@@ -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: Common definitions for controlpanel
+*
+*/
+
+#ifndef CPGLOBAL_H
+#define CPGLOBAL_H
+
+#include <QtGlobal>
+
+#ifdef BUILD_CP_FRAMEWORK
+ #define CP_EXPORT Q_DECL_EXPORT
+#else
+ #define CP_EXPORT Q_DECL_IMPORT
+#endif
+
+#endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gsprofilesrv_plat/controlpanel_api/inc/cpitemdatahelper.h Fri Sep 17 08:31:27 2010 +0300
@@ -0,0 +1,68 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0""
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Helper class by which a plugin can communicate with the associated dataform.
+*
+*/
+#ifndef CPITEMDATAHELPER_H
+#define CPITEMDATAHELPER_H
+
+#include <QObject>
+#include <cpglobal.h>
+
+class QObject;
+class HbWidget;
+class QModelIndex;
+class HbDataForm;
+class HbAbstractViewItem;
+class HbDataFormModelItem;
+class CpItemDataHelperPrivate;
+
+class CP_EXPORT CpItemDataHelper : public QObject
+{
+ Q_OBJECT
+public:
+ explicit CpItemDataHelper(HbDataForm *form = 0);
+ virtual ~CpItemDataHelper();
+
+ void bindToForm(HbDataForm *form);
+
+ void addItemPrototype(HbAbstractViewItem *prototype);
+
+ void addConnection(HbDataFormModelItem *item,
+ const char *signal,
+ QObject *receiver,
+ const char *method);
+
+ void removeConnection(HbDataFormModelItem *item,
+ const char *signal,
+ QObject *receiver,
+ const char *method);
+
+ void connectToForm(const char *signal,
+ QObject *receiver,
+ const char *method);
+
+ void disconnectFromForm(const char *signal,
+ QObject *receiver,
+ const char *method);
+
+ HbWidget *widgetFromModelIndex(const QModelIndex &index);
+
+ HbDataFormModelItem *modelItemFromModelIndex(const QModelIndex &index);
+
+private:
+ CpItemDataHelperPrivate *d;
+};
+
+#endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gsprofilesrv_plat/controlpanel_api/inc/cplauncherinterface.h Fri Sep 17 08:31:27 2010 +0300
@@ -0,0 +1,93 @@
+/*
+* 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: Interface for controlpanel plugins, with this interface client application can launch a view from outside of controlpanel application.
+*
+*/
+
+
+#ifndef CPLAUNCHERINTERFACE_H
+#define CPLAUNCHERINTERFACE_H
+
+#include <QtPlugin>
+#include <QList>
+
+/*!
+ \class CpLauncherInterface
+ \brief The class CpLauncherInterface defines an interface for plugins, if one controlpanel plugin implements
+ this interface, client application can launch a setting view from outside of controlpanel application by two ways.
+
+ (1) launch setting view in client process, using CpPluginLauncher.
+
+ \code
+ CpBaseSettingView *settingView = CpPluginLauncher::launchSettingView("cpmyplugin.dll",QVariant());
+ \endcode
+
+ (2) launch setting view in embedded mode, using QtHighway client API.
+
+ \code
+ if (mRequest) {
+ delete mRequest;
+ mRequest = 0;
+ }
+
+ mRequest = mAppMgr.create("com.nokia.symbian.ICpPluginLauncher", "launchSettingView(QString,QVariant)", true);
+
+ if (!mRequest)
+ {
+ return;
+ }
+ else
+ {
+ connect(mRequest, SIGNAL(requestOk(QVariant)), SLOT(handleReturnValue(QVariant)));
+ connect(mRequest, SIGNAL(requestError(int,QString)), SLOT(handleError(int,QString)));
+ }
+
+ // Set arguments for request
+ QList<QVariant> args;
+ args << QVariant("cpmyplugin.dll");
+ args << QVariant();
+ mRequest->setArguments(args);
+
+ mRequest->setSynchronous(false);
+ // Make the request
+ if (!mRequest->send())
+ {
+ //report error
+ }
+ \endcode
+
+ */
+
+class QVariant;
+class CpBaseSettingView;
+
+class CpLauncherInterface
+{
+public:
+ /*!
+ Destructor of CpLauncherInterface.
+ */
+ virtual ~CpLauncherInterface()
+ {
+ }
+
+ /*!
+ Create a CpBaseSettingView by the parameter hint.
+ */
+ virtual CpBaseSettingView *createSettingView(const QVariant &hint) const = 0;
+};
+
+Q_DECLARE_INTERFACE(CpLauncherInterface, "com.nokia.controlpanel.launcher.interface/1.0");
+
+#endif /* CPLAUNCHERINTERFACE_H */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gsprofilesrv_plat/controlpanel_api/inc/cplogger.h Fri Sep 17 08:31:27 2010 +0300
@@ -0,0 +1,76 @@
+/*
+* 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: Log utility for controlpanel framework.
+*
+*/
+#ifndef CPLOGGER_H
+#define CPLOGGER_H
+
+
+/*
+ config file path :/logconf/controlpanellog.conf
+
+ Format:
+
+ [CpFramework]
+ logdatetime = 1
+ logloggername = 1
+ datetimeformat = hh:mm:ss:zzz
+ output = debugoutput fileoutput
+ fileoutput/logfile = C:/data/logs/cpframework.log
+ fileoutput/truncate = 1
+
+ [CpPerformance]
+ logdatetime = 1
+ datetimeformat = hh:mm:ss:zzz
+ output = fileoutput
+ fileoutput/logfile = C:/data/logs/cpperformance.log
+ fileoutput/truncate = 1
+*/
+
+#include <QLatin1String>
+#include <logger.h>
+
+/*
+ define ENABLE_CPFW_LOG to make CPFW_LOG work
+*/
+
+//#define ENABLE_CPFW_LOG
+
+/*
+ define ENABLE_CPPERF_LOG to make CPPERF_LOG work
+*/
+
+//#define ENABLE_CPPERF_LOG
+
+#define CPFW_LOGGER_NAME QLatin1String("CpFramework")
+#define CPPERF_LOGGER_NAME QLatin1String("CpPerformance")
+
+#define CP_LOGGER_CONFIG_PATH QLatin1String(":/logconf/controlpanellog.conf")
+
+#ifdef ENABLE_CPFW_LOG
+ #define CPFW_LOG(str) Logger::instance(CPFW_LOGGER_NAME)->log(str);
+ #define CPSP_LOG_FUNC_ENTRY(func) LogFunctionEntryHelper ___cpfw_log_func_entry_helper(CPFW_LOGGER_NAME,func);
+#else
+ #define CPFW_LOG(str)
+ #define CPSP_LOG_FUNC_ENTRY(func)
+#endif
+
+#ifdef ENABLE_CPPERF_LOG
+ #define CPPERF_LOG(str) Logger::instance(CPPERF_LOGGER_NAME)->log(str);
+#else
+ #define CPPERF_LOG(str)
+#endif
+
+#endif /* CPLOGGER_H */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gsprofilesrv_plat/controlpanel_api/inc/cpplugininterface.h Fri Sep 17 08:31:27 2010 +0300
@@ -0,0 +1,50 @@
+/*
+* 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: Interface for controlpanel plugins.
+*
+*/
+
+#ifndef CPPLUGININTERFACE_H
+#define CPPLUGININTERFACE_H
+
+#include <QtPlugin>
+#include <QList>
+
+/*!
+ \class CpPluginInterface
+ \brief The class CpPluginInterface is an interface for controlpanel plugins.
+ */
+
+class CpSettingFormItemData;
+class CpItemDataHelper;
+
+class CpPluginInterface
+{
+public:
+ /*!
+ Destructor of CpPluginInterface.
+ */
+ virtual ~CpPluginInterface()
+ {
+ }
+
+ /*!
+ Create a set of data form mode item, by which the control panel framework can build a data form model.
+ */
+ virtual QList<CpSettingFormItemData*> createSettingFormItemData(CpItemDataHelper &itemDataHelper) const = 0;
+};
+
+Q_DECLARE_INTERFACE(CpPluginInterface, "com.nokia.controlpanel.plugin.interface/1.0");
+
+#endif /* CPPLUGININTERFACE_H */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gsprofilesrv_plat/controlpanel_api/inc/cppluginlauncher.h Fri Sep 17 08:31:27 2010 +0300
@@ -0,0 +1,33 @@
+/*
+* 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: Launch controlpanel plugin setting view in client process.
+*
+*/
+
+#ifndef CPPLUGINLAUNCHER_H
+#define CPPLUGINLAUNCHER_H
+
+#include "cpglobal.h"
+#include <QVariant>
+
+class QString;
+class CpBaseSettingView;
+
+class CP_EXPORT CpPluginLauncher
+{
+public:
+ static CpBaseSettingView* launchSettingView(const QString &pluginFile,const QVariant &hint = QVariant());
+};
+
+#endif /* CPPLUGINLAUNCHER_H */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gsprofilesrv_plat/controlpanel_api/inc/cppluginloader.h Fri Sep 17 08:31:27 2010 +0300
@@ -0,0 +1,36 @@
+/*
+* 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: Utility class to load a CpPluginInterface or CpLauncherInterface from a controlpanel plugin file.
+*
+*/
+
+#ifndef CPPLUGINLOADER_H
+#define CPPLUGINLOADER_H
+
+#include <cpglobal.h>
+#include <QList>
+
+class QString;
+class CpPluginInterface;
+class CpLauncherInterface;
+class CpPluginPlatInterface;
+
+class CP_EXPORT CpPluginLoader
+{
+public:
+ static CpPluginInterface *loadCpPluginInterface(const QString &pluginFile);
+ static CpLauncherInterface *loadCpLauncherInterface(const QString &pluginFile);
+};
+
+#endif /* CPPLUGINLOADER_H */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gsprofilesrv_plat/controlpanel_api/inc/cppluginutility.h Fri Sep 17 08:31:27 2010 +0300
@@ -0,0 +1,31 @@
+/*
+* 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: Utility class for controlpanel plugins.
+*
+*/
+
+#ifndef CPPLUGINUTILITY_H
+#define CPPLUGINUTILITY_H
+
+#include <cpglobal.h>
+
+class HbDataForm;
+
+class CP_EXPORT CpPluginUtility
+{
+public:
+ static void addCpItemPrototype(HbDataForm *settingForm);
+};
+
+#endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gsprofilesrv_plat/controlpanel_api/inc/cpsettingformentryitemdata.h Fri Sep 17 08:31:27 2010 +0300
@@ -0,0 +1,100 @@
+/*
+* 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 CPSETTINGFORMENTRYITEMDATA_H
+#define CPSETTINGFORMENTRYITEMDATA_H
+
+#include <cpglobal.h>
+#include <QObject>
+#include <cpsettingformitemdata.h>
+#include <hbicon.h>
+
+class CpItemDataHelper;
+class CpBaseSettingView;
+class HbDataForm;
+class QModelIndex;
+class CpSettingFormEntryItemDataPrivate;
+
+class CP_EXPORT CpSettingFormEntryItemData : public CpSettingFormItemData
+{
+ Q_OBJECT
+public:
+ enum EntryItemType {
+ ListEntryItem = HbDataFormModelItem::CustomItemBase + 1,
+ ButtonEntryItem = HbDataFormModelItem::CustomItemBase + 2
+ };
+
+ explicit CpSettingFormEntryItemData(const HbDataFormModelItem *parent = 0);
+
+ explicit CpSettingFormEntryItemData(
+ CpItemDataHelper &itemDataHelper,
+ const QString &text = QString(),
+ const QString &description = QString(),
+ const HbIcon &icon = HbIcon(),
+ const HbDataFormModelItem *parent = 0);
+
+ explicit CpSettingFormEntryItemData(
+ HbDataForm *dataForm,
+ const QString &text = QString(),
+ const QString &description = QString(),
+ const HbIcon &icon = HbIcon(),
+ const HbDataFormModelItem *parent = 0);
+
+ explicit CpSettingFormEntryItemData(
+ EntryItemType type,
+ CpItemDataHelper &itemDataHelper,
+ const QString &text = QString(),
+ const QString &description = QString(),
+ const QString &iconName = QString(),
+ const HbDataFormModelItem *parent = 0);
+
+ explicit CpSettingFormEntryItemData(
+ EntryItemType type,
+ HbDataForm *dataForm,
+ const QString &text = QString(),
+ const QString &description = QString(),
+ const QString &iconName = QString(),
+ const HbDataFormModelItem *parent = 0);
+
+ virtual ~CpSettingFormEntryItemData();
+
+ QString text() const;
+ void setText(const QString &text);
+
+ QString description() const;
+ void setDescription(const QString &description);
+
+ QString iconName() const;
+ void setIconName(const QString &icon);
+
+ HbIcon entryItemIcon() const;
+ void setEntryItemIcon(const HbIcon &icon);
+
+public slots:
+ virtual void onLaunchView();
+private:
+ virtual CpBaseSettingView *createSettingView() const = 0;
+private:
+ Q_DISABLE_COPY(CpSettingFormEntryItemData)
+ Q_DECLARE_PRIVATE_D(d_ptr, CpSettingFormEntryItemData)
+ Q_PRIVATE_SLOT(d_func(), void _q_itemPressed(const QModelIndex &index))
+ Q_PRIVATE_SLOT(d_func(), void _q_itemActivated(const QModelIndex &index))
+private:
+ CpSettingFormEntryItemDataPrivate *d_ptr;
+};
+
+#endif //CPSETTINGFORMENTRYITEMDATA_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gsprofilesrv_plat/controlpanel_api/inc/cpsettingformentryitemdataimpl.h Fri Sep 17 08:31:27 2010 +0300
@@ -0,0 +1,97 @@
+/*
+* 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 CPSETTINGFORMENTRYITEMDATAIMPL_H
+#define CPSETTINGFORMENTRYITEMDATAIMPL_H
+
+#include "cpsettingformentryitemdata.h"
+
+
+/*!
+ \class CpSettingFormEntryItemDataImpl
+ \brief The template class CpSettingFormEntryItemDataImpl provide a defaut implementation of CpSettingFormEntryItemData.
+ By implementing pure virtual function CpSettingFormEntryItemData::createSettingView.
+ */
+class CpItemDataHelper;
+template<typename PLUGIN_VIEW>
+class CpSettingFormEntryItemDataImpl : public CpSettingFormEntryItemData
+{
+public:
+
+ /*!
+ Construct a new CpSettingFormEntryItemDataImpl with the given text,description and parent.
+ */
+ explicit CpSettingFormEntryItemDataImpl(CpItemDataHelper &itemDataHelper,
+ const QString &text = QString(),
+ const QString &description = QString(),
+ const HbIcon &icon = HbIcon(),
+ const HbDataFormModelItem *parent = 0) :
+ CpSettingFormEntryItemData(itemDataHelper,text,description,icon,parent)
+ { }
+
+ /*!
+ Construct a new CpSettingFormEntryItemDataImpl with the given text,description and parent.
+ */
+ explicit CpSettingFormEntryItemDataImpl(HbDataForm *dataForm,
+ const QString &text = QString(),
+ const QString &description = QString(),
+ const HbIcon &icon = HbIcon(),
+ const HbDataFormModelItem *parent = 0) :
+ CpSettingFormEntryItemData(dataForm,text,description,icon,parent)
+
+ { }
+
+ /*!
+ Construct a new CpSettingFormEntryItemData with the given type, text, description, icon name, and parent.
+ */
+ explicit CpSettingFormEntryItemDataImpl(
+ EntryItemType type,
+ CpItemDataHelper &itemDataHelper,
+ const QString &text = QString(),
+ const QString &description = QString(),
+ const QString &icon = QString(),
+ const HbDataFormModelItem *parent = 0) :
+ CpSettingFormEntryItemData(type,itemDataHelper,text,description,icon,parent)
+ { }
+
+ /*!
+ Construct a new CpSettingFormEntryItemData with the given type, text, description, icon name, and parent.
+ */
+ explicit CpSettingFormEntryItemDataImpl(
+ EntryItemType type,
+ HbDataForm *dataForm,
+ const QString &text = QString(),
+ const QString &description = QString(),
+ const QString &icon = QString(),
+ const HbDataFormModelItem *parent = 0) :
+ CpSettingFormEntryItemData(type,dataForm,text,description,icon,parent)
+ { }
+
+ /*!
+ Destructor.
+ */
+ virtual ~CpSettingFormEntryItemDataImpl()
+ { }
+
+ /*!
+ Implement CpSettingFormEntryItemData::createSettingView
+ */
+ virtual CpBaseSettingView *createSettingView() const
+ { return new PLUGIN_VIEW(); }
+};
+
+#endif // CP_SETTINGFORM_ENTRY_ITEM_DATA_IMPL_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gsprofilesrv_plat/controlpanel_api/inc/cpsettingformitemdata.h Fri Sep 17 08:31:27 2010 +0300
@@ -0,0 +1,45 @@
+/*
+* 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:
+* This class is a control panel defined HbDataFormModelItem
+*
+*
+*/
+#ifndef CPSETTINGFORMITEMDATA_H
+#define CPSETTINGFORMITEMDATA_H
+
+#include <cpglobal.h>
+#include <hbdataformmodelitem.h>
+#include <QObject>
+#include <QVariant>
+
+class QString;
+class CpItemDataHelper;
+class CpSettingFormItemDataPrivate;
+
+class CP_EXPORT CpSettingFormItemData : public QObject, public HbDataFormModelItem
+{
+ Q_OBJECT
+public:
+ CpSettingFormItemData(HbDataFormModelItem::DataItemType type,
+ const QString &label,
+ const HbDataFormModelItem *parent = 0);
+ CpSettingFormItemData(const HbDataFormModelItem *parent = 0);
+ virtual ~CpSettingFormItemData();
+private:
+ CpSettingFormItemDataPrivate *d_ptr; //reservered
+};
+
+
+#endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gsprofilesrv_plat/controlpanel_api/inc/logger.h Fri Sep 17 08:31:27 2010 +0300
@@ -0,0 +1,126 @@
+/*
+* 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: This class provide log functionality.
+*
+*/
+
+#ifndef LOGGER_H
+#define LOGGER_H
+
+#include <QObject>
+#include <QSettings>
+#include <loggerglobal.h>
+
+class LogOutput;
+class QSettings;
+class LoggerPrivate;
+
+/*
+
+configuration format:
+
+ [myapplog]
+ logDateTime = 1
+ logLoggerName = 1
+ datetimeformat = hh:mm:ss
+ output = debugoutput consoleoutput fileoutput
+ fileoutput/logfile = C:/data/log/myapp.log
+ fileoutput/truncate = 1
+
+code examples:
+
+ QSettings settings("myapp.ini",QSettings::IniFormat);
+ Logger::instance("myapplog")->configure(settings);
+ Logger::instance("myapplog")->log("Hello world!");
+
+*/
+
+class LOGGER_EXPORT Logger : public QObject
+{
+ Q_OBJECT
+ Q_PROPERTY(bool logDateTime READ logDateTime WRITE setLogDateTime)
+ Q_PROPERTY(bool logLoggerName READ logLoggerName WRITE setLogLoggerName)
+ Q_PROPERTY(QString dateTimeFormat READ dateTimeFormat WRITE setDateTimeFormat)
+public:
+ static Logger *instance(const QString &name);
+ static void close(const QString &name);
+ static void closeAll();
+public:
+ virtual ~Logger();
+
+ void log(const QString &log);
+
+ void configure(const QString &configFile,QSettings::Format format = QSettings::NativeFormat);
+
+ void configure(QSettings &settings);
+
+ bool addLogOutput(LogOutput *output);
+
+ void removeLogOutput(LogOutput *output);
+
+ LogOutput *logOutput(const QString &name);
+
+ void clearAllLogOutput();
+
+ QString name() const;
+
+ bool logDateTime() const;
+ void setLogDateTime(bool on);
+
+ bool logLoggerName() const;
+ void setLogLoggerName(bool on);
+
+ QString dateTimeFormat() const;
+ void setDateTimeFormat(const QString &format);
+private:
+ explicit Logger(const QString &name = QString(),QObject *parent = 0);
+ LoggerPrivate *d_ptr;
+};
+
+class InitLoggerHelper
+{
+public:
+ InitLoggerHelper(const QString &loggerName,const QString &configPath)
+ : mLoggerName(loggerName)
+ {
+ Logger::instance(loggerName)->configure(configPath,QSettings::IniFormat);
+ }
+ ~InitLoggerHelper() {
+ Logger::close(mLoggerName);
+ }
+private:
+ QString mLoggerName;
+};
+
+class LogFunctionEntryHelper
+{
+public:
+ LogFunctionEntryHelper(const QString &loggerName,const QString &func)
+ : mLoggerName(loggerName), mFunc(func)
+ {
+ Logger::instance(mLoggerName)->log(QLatin1String(">>>> ") + mFunc);
+ }
+ ~LogFunctionEntryHelper()
+ {
+ Logger::instance(mLoggerName)->log(QLatin1String("<<<< ") + mFunc);
+ }
+private:
+ QString mLoggerName;
+ QString mFunc;
+};
+
+#define INIT_LOGGER(loggerName,configPath) \
+ InitLoggerHelper __init##loggerName(loggerName,configPath);
+
+#endif //LOGGER_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gsprofilesrv_plat/controlpanel_api/inc/loggerglobal.h Fri Sep 17 08:31:27 2010 +0300
@@ -0,0 +1,45 @@
+/*
+* 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: Common definitions for log.
+*
+*/
+#ifndef LOGGERGLOBAL_H
+#define LOGGERGLOBAL_H
+
+#include <QtGlobal>
+
+#ifdef BUILD_LOGGER_DLL
+ #define LOGGER_EXPORT Q_DECL_EXPORT
+#else
+ #define LOGGER_EXPORT Q_DECL_IMPORT
+#endif
+
+#define LINE_SEPERATOR QLatin1String("\r\n");
+
+#define SETTINGS_SECTION_SEPERATOR QLatin1String("/")
+
+//following strings can be used in configuration file to specify logger's properties
+//refer to logger.h
+#define LOGGER_LOGDATETIME QLatin1String("logdatetime")
+#define LOGGER_LOGLOGGERNAME QLatin1String("logloggername")
+#define LOGGER_DATETIMEFORMAT QLatin1String("datetimeformat")
+#define LOGGER_OUTPUT QLatin1String("output")
+
+#define DEBUGOUTPUT_NAME QLatin1String("debugoutput")
+#define CONSOLEOUTPUT_NAME QLatin1String("consoleoutput")
+#define FILEOUTPUT_NAME QLatin1String("fileoutput")
+ #define FILEOUTPUT_LOGFILE QLatin1String("logfile")
+ #define FILEOUTPUT_TRUNCATE QLatin1String("truncate")
+
+#endif //LOGGERGLOBAL_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gsprofilesrv_plat/controlpanel_api/inc/logoutput.h Fri Sep 17 08:31:27 2010 +0300
@@ -0,0 +1,51 @@
+/*
+* 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: An interface to output log string.
+*
+*/
+#ifndef LOGOUTPUT_H
+#define LOGOUTPUT_H
+
+#include <loggerglobal.h>
+#include <QObject>
+
+class QString;
+class QSettings;
+class Logger;
+
+class LogOutputPrivate;
+class LOGGER_EXPORT LogOutput : public QObject
+{
+ Q_OBJECT
+ Q_PROPERTY(QString name READ name WRITE setName)
+public:
+ virtual ~LogOutput();
+ virtual void output(const QString &log) = 0;
+ virtual bool init() = 0;
+ bool load(QSettings &settings);
+
+ Logger *parentLogger();
+ void setParentLogger(Logger *parentLogger);
+
+ QString name() const;
+ void setName(const QString &name);
+private:
+ virtual bool doLoad(QSettings &settings) = 0;
+protected:
+ LogOutput(Logger *parentLogger = 0);
+private:
+ LogOutputPrivate *d_ptr;
+};
+
+#endif //LOGOUTPUT_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gsprofilesrv_plat/controlpanel_api/inc/logoutputfactory.h Fri Sep 17 08:31:27 2010 +0300
@@ -0,0 +1,52 @@
+/*
+* 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: Factory class to create LogOutput.
+*
+*/
+#ifndef LOGOUTPUTFACTORY_H
+#define LOGOUTPUTFACTORY_H
+
+class LogOutput;
+class QVariant;
+class QString;
+
+#include <QHash>
+#include <loggerglobal.h>
+
+class LOGGER_EXPORT LogOutputFactory
+{
+public:
+ typedef LogOutput* (*CREATE_ENTRY)();
+ static LogOutput *createLogOutput(const QString &name);
+ static LogOutput *createLogOutput(const QString &name,const QHash<QString,QVariant> &properties);
+ static void addCreateLogOutputEntry(const QString &name,CREATE_ENTRY entry);
+};
+
+class LogOutputCreateEntryRegister
+{
+public:
+ LogOutputCreateEntryRegister(const QString &name,LogOutputFactory::CREATE_ENTRY entry) {
+ LogOutputFactory::addCreateLogOutputEntry(name,entry);
+ }
+};
+
+#define REGISTER_OUTPUT_LOG(name,Class) \
+ static LogOutput *create##Class() { \
+ LogOutput *output = new Class(); \
+ output->setName(name); \
+ return output; \
+ } \
+ LogOutputCreateEntryRegister the##Class##EntryRegister(name,create##Class);
+
+#endif //LOGOUTPUTFACTORY_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gsprofilesrv_plat/controlpanel_api/logger_api.pri Fri Sep 17 08:31:27 2010 +0300
@@ -0,0 +1,23 @@
+#
+# 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:
+#
+
+CONTROLPANEL_LOG_PLAT_HEADERS += \
+ inc/logger.h \
+ inc/loggerglobal.h \
+ inc/logoutput.h \
+ inc/logoutputfactory.h \
+ inc/cplogger.h
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gsprofilesrv_plat/gsprofilesrv_plat.pro Fri Sep 17 08:31:27 2010 +0300
@@ -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:
+#
+
+TEMPLATE = subdirs
+
+SYMBIAN_PLATFORMS = WINSCW ARMV5
+
+CONFIG += ordered
+
+SUBDIRS += controlpanel_api ftuwizardmodel_api
+
+symbian: {
+ :BLD_INF_RULES.prj_mmpfiles += $$LITERAL_HASH"include \"./profiles_engine_api/group/bld.inf\""
+ :BLD_INF_RULES.prj_mmpfiles += $$LITERAL_HASH"include \"./settings_uis_cenrep_collection_api/group/bld.inf\""
+}
+
--- a/gsprofilesrv_pub/profiles_engine_wrapper_api/tsrc/BC/ProfilesEngineWrapperAPI/src/ProEngWrapAPIBlocks.cpp Thu Sep 02 20:42:34 2010 +0300
+++ b/gsprofilesrv_pub/profiles_engine_wrapper_api/tsrc/BC/ProfilesEngineWrapperAPI/src/ProEngWrapAPIBlocks.cpp Fri Sep 17 08:31:27 2010 +0300
@@ -358,11 +358,27 @@
CleanupStack::PushL( observer );
MProEngProfile* generalProfile = engine->ProfileLC( EProfileGeneralId );
- MProEngToneSettings& ts2( generalProfile->ToneSettings() );
+// MProEngToneSettings& ts2( generalProfile->ToneSettings() );
TRAP_IGNORE(
nh->RequestProfileNotificationsL( *observer,
EProfileGeneralId ) );
- ts2.SetVibratingAlert( !ts2.VibratingAlert() );
+ //ts2.SetVibratingAlert( !ts2.VibratingAlert() );
+ MProEngTones& pt = generalProfile->ProfileTones();
+ const TDesC& emailAlertTone = pt.EmailAlertTone();
+ _LIT( KFile1, "z:\\data\\sounds\\digital\\alarm.aac" );
+ _LIT( KFile2, "z:\\data\\sounds\\digital\\Buzzer.aac" );
+
+ TBuf<100> buf1(KFile1);
+ TBuf<100> buf2(KFile2);
+
+ if ( emailAlertTone.Compare( buf1 ) )
+ {
+ TRAP_IGNORE( pt.SetEmailAlertToneL(buf1));
+ }
+ else
+ {
+ TRAP_IGNORE(pt.SetEmailAlertToneL(buf2));
+ }
generalProfile->CommitChangeL();
iSchedulerUtility->Start();
CleanupStack::PopAndDestroy(); // generalProfile
@@ -394,15 +410,29 @@
CProEngVTObserver* observer = new ( ELeave ) CProEngVTObserver(*iSchedulerUtility);
CleanupStack::PushL( observer );
MProEngProfile* generalProfile = engine->ProfileLC( EProfileGeneralId );
- MProEngToneSettings& ts2( generalProfile->ToneSettings() );
+// MProEngToneSettings& ts2( generalProfile->ToneSettings() );
TRAP_IGNORE(
nh->RequestProfileNotificationsL( *observer,
EProfileGeneralId ) );
- ts2.SetVibratingAlert( !ts2.VibratingAlert() );
+ MProEngTones& pt = generalProfile->ProfileTones();
+ const TDesC& emailAlertTone = pt.EmailAlertTone();
+ _LIT( KFile1, "z:\\data\\sounds\\digital\\alarm.aac" );
+ _LIT( KFile2, "z:\\data\\sounds\\digital\\Buzzer.aac" );
+
+ TBuf<100> buf1(KFile1);
+ TBuf<100> buf2(KFile2);
+
+ if ( emailAlertTone.Compare( buf1 ) )
+ {
+ TRAP_IGNORE( pt.SetEmailAlertToneL(buf1));
+ }
+ else
+ {
+ TRAP_IGNORE(pt.SetEmailAlertToneL(buf2));
+ }
generalProfile->CommitChangeL();
iSchedulerUtility->Start();
- //CSchedulerUtility::InstanceL()->Start(); // observer stops this
- nh->CancelProfileNotifications( EProfileMeetingId );
+ nh->CancelProfileNotifications( EProfileGeneralId );
CleanupStack::PopAndDestroy(); // generalProfile
CleanupStack::PopAndDestroy( observer );
CleanupStack::PopAndDestroy( wrapper );
--- a/layers.sysdef.xml Thu Sep 02 20:42:34 2010 +0300
+++ b/layers.sysdef.xml Fri Sep 17 08:31:27 2010 +0300
@@ -7,8 +7,9 @@
<systemModel>
<layer name="bldfirst_mw_layer">
<module name="gsprofilesrv">
- <unit name="ftuwizardmodel_api" unitID="ftuwizardmodel_api" mrp="" bldFile="&layer_real_source_path;/gsprofilesrv_plat/ftuwizardmodel_api" proFile="ftuwizardmodel_api.pro" qmakeArgs="-r -config rom"/>
- <unit name="ftuwizardmodel" unitID="ftuwizardmodel" mrp="" bldFile="&layer_real_source_path;/ftuwizardmodel" proFile="ftuwizardmodel.pro" qmakeArgs="-r -config rom"/>
+ <unit name="ftuwizardmodel_api" unitID="ftuwizardmodel_api" mrp="" bldFile="&layer_real_source_path;/gsprofilesrv_plat/ftuwizardmodel_api" proFile="ftuwizardmodel_api.pro" qmakeArgs="-r -config rom"/>
+ <unit name="ftuwizardmodel" unitID="ftuwizardmodel" mrp="" bldFile="&layer_real_source_path;/ftuwizardmodel" proFile="ftuwizardmodel.pro" qmakeArgs="-r -config rom"/>
+ <unit name="controlpanel_api" unitID="controlpanel_api" mrp="" bldFile="&layer_real_source_path;/gsprofilesrv_plat/controlpanel_api" proFile="controlpanel_api.pro" qmakeArgs="-r -config rom"/>
<unit name="gsprofilesrv" unitID="presdo.gsprofilesrv" bldFile="&layer_real_source_path;/group" mrp="" />
</module>
</layer>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/package_definition.xml Fri Sep 17 08:31:27 2010 +0300
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<SystemDefinition schema="3.0.0" xmlns:qt="http://www.nokia.com/qt">
+ <package id="gsprofilesrv" name="General Settings and Profiles Services" levels="system plugin framework server generic specific">
+ <collection id="gsprofilesrv_pub" name="GS and Profiles Services Public Interfaces" level="specific">
+ <component id="profiles_engine_active_profile_settings_api" name="Profiles Engine Active Profile Settings API" class="api" filter="s60">
+ <meta rel="Api" href="gsprofilesrv_pub/profiles_engine_active_profile_settings_api/profiles_engine_active_profile_settings_api.metaxml"/>
+ <unit bldFile="gsprofilesrv_pub/profiles_engine_active_profile_settings_api/group"/>
+ </component>
+ <component id="profiles_engine_wrapper_api" name="Profiles Engine Wrapper API" class="api" filter="s60">
+ <meta rel="Api" href="gsprofilesrv_pub/profiles_engine_wrapper_api/profiles_engine_wrapper_api.metaxml"/>
+ <unit bldFile="gsprofilesrv_pub/profiles_engine_wrapper_api/group"/>
+ </component>
+ </collection>
+ <collection id="gsprofilesrv_plat" name="GS and Profiles Services Platform Interfaces" level="specific">
+ <component id="ftuwizardmodel_api" name="FTU Wizard Model API" filter="bldfirst,s60" class="api">
+ <unit bldFile="gsprofilesrv_plat/ftuwizardmodel_api" qt:proFile="ftuwizardmodel_api.pro" qt:qmakeArgs="-r -config rom"/>
+ </component>
+ <component id="profiles_engine_api" name="Profiles Engine API" class="api" filter="bldfirst,s60">
+ <meta rel="Api" href="gsprofilesrv_plat/profiles_engine_api/profiles_engine_api.metaxml"/>
+ <unit bldFile="gsprofilesrv_plat/profiles_engine_api/group"/>
+ </component>
+ <component id="settings_uis_cenrep_collection_api" name="Settings UIs CenRep Collection API" class="api" filter="bldfirst,s60">
+ <meta rel="Api" href="gsprofilesrv_plat/settings_uis_cenrep_collection_api/settings_uis_cenrep_collection_api.metaxml"/>
+ <unit bldFile="gsprofilesrv_plat/settings_uis_cenrep_collection_api/group"/>
+ </component>
+ <component id="controlpanel_api" name="Control panel api" class="api" filter="bldfirst,s60">
+ <unit bldFile="gsprofilesrv_plat/controlpanel_api" qt:qmakeArgs="-r -config rom" qt:proFile="controlpanel_api.pro"/>
+ </component>
+ </collection>
+ <collection id="ftuwizardmodel" name="FTU Wizard Model" level="generic">
+ <component id="ftuwizardmodel_build" name="FTU Wizardmodel Build" filter="s60,bldfirst">
+ <unit bldFile="ftuwizardmodel" qt:proFile="ftuwizardmodel.pro" qt:qmakeArgs="-r -config rom"/>
+ </component>
+ </collection>
+ <collection id="controlpanel" name="Control Panel" level="generic">
+ <component id="controlpanel_test" name="Control Panel Test" filter="s60,test,qt_unit_test">
+ <meta rel="testbuild">
+ <group name="controlpanel_tests"/>
+ </meta>
+ <unit bldFile="controlpanel/tsrc" qt:proFile="tsrc.pro"/>
+ </component>
+ <component id="controlpanel_rom" name="Control Panel ROM" filter="s60" class="config">
+ <unit bldFile="controlpanel/rom"/>
+ </component>
+ <component id="controlpanel_config" name="Control Panel Config" filter="s60" class="config" introduced="^4">
+ <unit bldFile="controlpanel/conf"/>
+ </component>
+ <component id="controlpanel_source" name="Control Panel Source" filter="s60">
+ <unit bldFile="controlpanel/src" qt:qmakeArgs="-r -config rom" qt:proFile="src.pro"/>
+ </component>
+ </collection>
+ <collection id="profilesservices" name="Profiles Services" level="server">
+ <component id="profileengine" filter="s60" name="Profile Engine" introduced="9.1">
+ <unit bldFile="profilesservices/profileengine/group"/>
+ </component>
+ </collection>
+ </package>
+</SystemDefinition>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/package_map.xml Fri Sep 17 08:31:27 2010 +0300
@@ -0,0 +1,1 @@
+<PackageMap root="sf" layer="mw"/>
--- a/profilesservices/ProfileEngine/EngSrc/CProfileEngineImpl.cpp Thu Sep 02 20:42:34 2010 +0300
+++ b/profilesservices/ProfileEngine/EngSrc/CProfileEngineImpl.cpp Fri Sep 17 08:31:27 2010 +0300
@@ -1241,10 +1241,22 @@
void CProfileEngineImpl::SetSilenceModeL( TBool aSilenceMode )
{
User::LeaveIfError( iCenRep->Set( KProEngSilenceMode, aSilenceMode ? 1 : 0 ) );
+ //Also set profiles' ring type to silence
+ TInt countOfProfiles = iProfileLocalisedNames->MdcaCount();
- //Send event through P&S
- CreatePubSubKeysIfNeededL();
- PublishChangeL( KProEngActiveProfileModified );
+ for (TInt i = 0; i < countOfProfiles; ++i)
+ {
+ const MProfileName* profileName = iProfileLocalisedNames->ProfileName(i);
+ if (profileName)
+ {
+ MProfileExtended2* profile = Profile2LC(profileName->Id());
+ TProfileToneSettings setToneSettings = profile->ProfileSetTones().SetToneSettings();
+ setToneSettings.iRingingType = aSilenceMode ? EProfileRingingTypeSilent : EProfileRingingTypeRinging;
+ CommitChange2L(*profile);
+ CleanupStack::PopAndDestroy();
+ }
+
+ }
}
// End of File
--- a/profilesservices/ProfileEngine/EngSrc/CProfileTonesImpl.cpp Thu Sep 02 20:42:34 2010 +0300
+++ b/profilesservices/ProfileEngine/EngSrc/CProfileTonesImpl.cpp Fri Sep 17 08:31:27 2010 +0300
@@ -142,14 +142,6 @@
aProfileId ), value ) );
iProfileToneSettings.iRingingType = TProfileRingingType( value );
- //Since 10.1, check if silence mode
- User::LeaveIfError(
- aCenRep.Get( KProEngSilenceMode , value) );
- if ( value )
- {
- iProfileToneSettings.iRingingType = EProfileRingingTypeSilent;
- }
-
User::LeaveIfError(
aCenRep.Get( ProfileEngUtils::ResolveKey( KProEngKeypadVolume,
aProfileId ), value ) );
--- a/profilesservices/ProfileEngine/WrapperSrc/CProEngToneSettingsImpl.cpp Thu Sep 02 20:42:34 2010 +0300
+++ b/profilesservices/ProfileEngine/WrapperSrc/CProEngToneSettingsImpl.cpp Fri Sep 17 08:31:27 2010 +0300
@@ -116,14 +116,10 @@
// CProEngToneSettingsImpl::
// -----------------------------------------------------------------------------
//
-TInt CProEngToneSettingsImpl::SetRingingType( TProfileRingingType aRingingType )
+TInt CProEngToneSettingsImpl::SetRingingType( TProfileRingingType /*aRingingType*/ )
{
- if( iModifiableFlags & EProfileFlagRingingType )
- {
- iToneSettings.iRingingType = aRingingType;
- return KErrNone;
- }
- return KErrAccessDenied;
+ // since 10.1, ring type can't be set by user
+ return KErrNotSupported;
}
// -----------------------------------------------------------------------------