--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/controlpanelui.pro Fri Mar 19 09:29:29 2010 +0200
@@ -0,0 +1,21 @@
+#
+# 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
+SUBDIRS = src
+CONFIG += ordered
+
+include(rom/cpui_rom.pri)
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/cpcfg_win.pl Fri Mar 19 09:29:29 2010 +0200
@@ -0,0 +1,49 @@
+
+# description: copy all cpcfg files to destination directory when building control panel in window envionment
+# usage: go to control panel source directory,
+# run cpcfg_win.pl if you want to build control panel in debug mode or cpcfg_win -R in release mode.
+
+use File::Path qw (mkpath);
+
+#default debug dir
+$config_dir = "C:\\ControlPanel\\debug\\bin\\config";
+if ($ARGV[0] =~ m/^-R$/i) { #release dir
+ $config_dir = "C:\\ControlPanel\\release\\bin\\config";
+}
+
+sub go_through_dir {
+ my @arr, $j = 0;
+ for ($i=0;$i<=$#_;$i++) {
+ if (-d $_[$i]) {
+ if (opendir($handle, $_[$i])) {
+ while ($entry = readdir($handle)) {
+ if (!($entry =~ m/^\.$/) and !($entry =~ m/^(\.\.)$/)) {
+ if (-d $_[$i]."\\$entry") { # is a directory, push to @arr
+ $arr[$j++] = $_[$i]."\\$entry";
+ }
+ else { # is a file
+ if ($entry =~ m/\.cpcfg$/i) { # is a .cpcfg file, copy it
+ $cmd = "copy ";
+ $cmd .= $_[$i]."\\$entry ";
+ $cmd .= $config_dir."\\$entry";
+ print ("$cmd\n");
+ system($cmd);
+ }
+ }
+ }
+ }
+ closedir($handle);
+ }
+ }
+ }
+ if ($j>0) {
+ go_through_dir (@arr);
+ }
+}
+
+# create target directory if it doesn't exist
+print ("Creating direcotry... $config_dir \n");
+mkpath $config_dir;
+
+# go through source directories recrusively
+go_through_dir ".\\src\\cpapplication",".\\src\\cpplugins";
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/examples/example_common.pri Fri Mar 19 09:29:29 2010 +0200
@@ -0,0 +1,81 @@
+#
+# 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
+#
+
+CONFIG += debug_and_release
+
+# On win32 and mac, debug and release libraries are named differently.
+# We must follow the debug and release settings Qt was compiled with:
+# build debug iff Qt built debug, build release iff Qt built release.
+
+win32|mac {
+ !contains(QT_CONFIG,debug)|!contains(QT_CONFIG,release) {
+ CONFIG -= debug_and_release debug release
+ contains(QT_CONFIG,debug): CONFIG+=debug
+ contains(QT_CONFIG,release):CONFIG+=release
+ }
+}
+
+CONFIG(debug, debug|release) {
+ SUBDIRPART = debug
+} else {
+ SUBDIRPART = release
+}
+
+win32 {
+ DESTDIR = C:/ControlPanel/$$SUBDIRPART/bin
+ OBJECTS_DIR = $$PWD/../$$SUBDIRPART/tmp/$$TARGET
+}
+
+# Add the output dirs to the link path too
+LIBS += -L$$DESTDIR
+
+MOC_DIR = moc
+OBJECT_DIR = obj
+RCC_DIR = rcc
+
+#For some reason the default include path doesn't include MOC_DIR on symbian
+symbian {
+ INCLUDEPATH += $$MW_LAYER_SYSTEMINCLUDE
+ INCLUDEPATH += $$MOC_DIR
+ TARGET.CAPABILITY = ALL -TCB
+ TARGET.EPOCALLOWDLLDATA = 1
+}
+
+win32 {
+ # add platfrom API for windows
+ INCLUDEPATH += $$PWD/../controlpanel_plat/inc
+}
+
+CONFIG += hb plugin
+LIBS += -lcpframework
+
+symbian: plugin { # copy qtstub and manifest
+
+ PLUGIN_STUB_PATH = /resource/qt/plugins/controlpanel
+
+ deploy.path = C:
+ pluginstub.sources = $${TARGET}.dll
+ pluginstub.path = $$PLUGIN_STUB_PATH
+ DEPLOYMENT += pluginstub
+
+ qtplugins.path = $$PLUGIN_STUB_PATH
+ qtplugins.sources += qmakepluginstubs/$${TARGET}.qtplugin
+
+ for(qtplugin, qtplugins.sources):BLD_INF_RULES.prj_exports += "./$$qtplugin $$deploy.path$$qtplugins.path/$$basename(qtplugin)"
+}
+
+
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/examples/examples.pro Fri Mar 19 09:29:29 2010 +0200
@@ -0,0 +1,21 @@
+#
+# 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
+SUBDIRS = groupplugin/groupplugin.pro viewplugin/viewplugin.pro themeplugin/themeplugin.pro
+CONFIG += ordered
+
+include (rom/rom.pri)
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/examples/groupplugin/groupplugin.pri Fri Mar 19 09:29:29 2010 +0200
@@ -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: controlpanel project - common qmake settings
+#
+
+HEADERS += src/cpsamplegroup.h \
+ src/cpgroupplugin.h
+SOURCES += src/cpsamplegroup.cpp \
+ src/cpgroupplugin.cpp
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/examples/groupplugin/groupplugin.pro Fri Mar 19 09:29:29 2010 +0200
@@ -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:
+#
+
+TEMPLATE = lib
+TARGET = cpgroupplugin
+
+include (../example_common.pri)
+include (groupplugin.pri)
+
+# Input
+symbian: {
+ TARGET.UID3 = 0x20025FE3
+}
+
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/examples/groupplugin/src/cpgroupplugin.cpp Fri Mar 19 09:29:29 2010 +0200
@@ -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:
+ *
+ */
+#include "cpgroupplugin.h"
+#include "cpsamplegroup.h"
+
+CpGroupPlugin::CpGroupPlugin()
+{
+}
+
+CpGroupPlugin::~CpGroupPlugin()
+{
+}
+
+QList<CpSettingFormItemData*> CpGroupPlugin::createSettingFormItemData(CpItemDataHelper &itemDataHelper) const
+{
+ return QList<CpSettingFormItemData*>() << new CpSampleGroup(itemDataHelper);
+}
+
+Q_EXPORT_PLUGIN2(CpGroupPlugin, CpGroupPlugin);
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/examples/groupplugin/src/cpgroupplugin.h Fri Mar 19 09:29:29 2010 +0200
@@ -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:
+ *
+ */
+#ifndef CPGROUPPLUGIN_H
+#define CPGROUPPLUGIN_H
+
+#include <qobject.h>
+#include <cpplugininterface.h>
+
+class CpGroupPlugin : public QObject, public CpPluginInterface
+{
+ Q_OBJECT
+ Q_INTERFACES(CpPluginInterface)
+public:
+ CpGroupPlugin();
+ virtual ~CpGroupPlugin();
+ virtual QList<CpSettingFormItemData*> createSettingFormItemData(CpItemDataHelper &itemDataHelper) const;
+};
+#endif // CPGROUPPLUGIN_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/examples/groupplugin/src/cpsamplegroup.cpp Fri Mar 19 09:29:29 2010 +0200
@@ -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:
+ *
+ */
+#include "cpsamplegroup.h"
+#include <cpsettingformitemdata.h>
+#include <cpitemdatahelper.h>
+#include <hbmessagebox.h>
+
+CpSampleGroup::CpSampleGroup(CpItemDataHelper &itemDataHelper) :
+ CpSettingFormItemData(HbDataFormModelItem::GroupItem,QString("Sample Group")),
+ mSliderItem(0),
+ mCheckBoxItem(0)
+{
+ mSliderItem = new CpSettingFormItemData(HbDataFormModelItem::SliderItem,
+ QString("Sample Slider"));
+ itemDataHelper.addConnection(mSliderItem,SIGNAL(valueChanged(int)),this,SLOT(sliderValueChanged(int)));
+ this->appendChild(mSliderItem);
+
+ mCheckBoxItem = new CpSettingFormItemData(HbDataFormModelItem::CheckBoxItem,
+ QString("Sample Check Box"));
+ itemDataHelper.addConnection(mCheckBoxItem,SIGNAL(stateChanged (int)),this,SLOT(checkBoxStateChanged(int)));
+ this->appendChild(mCheckBoxItem);
+
+}
+CpSampleGroup::~CpSampleGroup()
+{
+ //TODO: release resource when necessary
+}
+void CpSampleGroup::sliderValueChanged(int value)
+{
+ //TODO: store your changes
+ HbMessageBox::launchInformationMessageBox(QString("slider value changed to:%1").arg(value));
+}
+void CpSampleGroup::checkBoxStateChanged(int state)
+{
+ //TODO: store your changes
+ QString str = (state ? "checked" : "un-checked");
+ HbMessageBox::launchInformationMessageBox(str);
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/examples/groupplugin/src/cpsamplegroup.h Fri Mar 19 09:29:29 2010 +0200
@@ -0,0 +1,42 @@
+/*
+ * 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 CPSAMPLEGROUP_H
+#define CPSAMPLEGROUP_H
+
+#include <cpsettingformitemdata.h>
+
+class CpSettingFormItemData;
+class CpItemDataHelper;
+
+class CpSampleGroup : public CpSettingFormItemData
+{
+ Q_OBJECT
+public:
+ explicit CpSampleGroup(CpItemDataHelper &itemDataHelper);
+ ~CpSampleGroup();
+
+private slots:
+ //need handling your member's value change
+ void sliderValueChanged(int value);
+ void checkBoxStateChanged(int state);
+
+private:
+ CpSettingFormItemData *mSliderItem;
+ CpSettingFormItemData *mCheckBoxItem;
+};
+
+#endif // CPSAMPLEGROUP_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/examples/rom/controlpanel_examples.iby Fri Mar 19 09:29:29 2010 +0200
@@ -0,0 +1,23 @@
+
+/*
+* 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=ABI_DIR\BUILD_DIR\cpgroupplugin.dll SHARED_LIB_DIR\cpgroupplugin.dll
+file=ABI_DIR\BUILD_DIR\cpviewplugin.dll SHARED_LIB_DIR\cpviewplugin.dll
+
+data=\epoc32\data\c\resource\qt\plugins\controlpanel\cpgroupplugin.qtplugin resource\qt\plugins\controlpanel\cpgroupplugin.qtplugin
+data=\epoc32\data\c\resource\qt\plugins\controlpanel\cpviewplugin.qtplugin resource\qt\plugins\controlpanel\cpviewplugin.qtplugin
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/examples/rom/rom.pri Fri Mar 19 09:29:29 2010 +0200
@@ -0,0 +1,21 @@
+#
+# 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:
+#
+
+symbian: {
+ BLD_INF_RULES.prj_exports += \
+ "$${LITERAL_HASH}include<platform_paths.hrh>" \
+ "rom/controlpanel_examples.iby CORE_MW_LAYER_IBY_EXPORT_PATH(controlpanel_examples.iby)"
+}
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/examples/themeplugin/src/cpthemeplugin.cpp Fri Mar 19 09:29:29 2010 +0200
@@ -0,0 +1,35 @@
+/*
+ * 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 "cpthemeplugin.h"
+#include "cpthemepluginentryitemdata.h"
+
+CpThemePlugin::CpThemePlugin()
+{
+}
+
+CpThemePlugin::~CpThemePlugin()
+{
+}
+
+QList<CpSettingFormItemData*> CpThemePlugin::createSettingFormItemData(CpItemDataHelper &itemDataHelper) const
+{
+ CpSettingFormEntryItemData *entryItem = new CpThemePluginEntryItemData(
+ itemDataHelper,tr("Theme"),tr("Name of the Theme"),HbIcon(":/image/qgn_menu_note.svg"));
+ return QList<CpSettingFormItemData*>() << entryItem;
+}
+
+Q_EXPORT_PLUGIN2(cpthemeplugin, CpThemePlugin);
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/examples/themeplugin/src/cpthemeplugin.h Fri Mar 19 09:29:29 2010 +0200
@@ -0,0 +1,34 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0""
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:
+ *
+ */
+
+#ifndef CPTHEMEPLUGIN_H
+#define CPTHEMEPLUGIN_H
+
+#include <qobject.h>
+#include <cpplugininterface.h>
+
+class CpThemePlugin : public QObject, public CpPluginInterface
+{
+ Q_OBJECT
+ Q_INTERFACES(CpPluginInterface)
+public:
+ CpThemePlugin();
+ virtual ~CpThemePlugin();
+ virtual QList<CpSettingFormItemData*> createSettingFormItemData(CpItemDataHelper &itemDataHelper) const;
+};
+
+#endif //CPTHEMEPLUGIN_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/examples/themeplugin/src/cpthemepluginentryitemdata.cpp Fri Mar 19 09:29:29 2010 +0200
@@ -0,0 +1,59 @@
+/*
+ * 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 "cpthemepluginentryitemdata.h"
+#include <cpitemdatahelper.h>
+#include <hbfiledialog.h>
+#include <hbaction.h>
+#include <QFileInfo>
+
+CpThemePluginEntryItemData::CpThemePluginEntryItemData(CpItemDataHelper &itemDataHelper,
+ const QString &text /*= QString()*/,
+ const QString &description /*= QString()*/,
+ const HbIcon &icon /*= HbIcon()*/,
+ const HbDataFormModelItem *parent /*= 0*/)
+ : CpSettingFormEntryItemData(itemDataHelper,
+ text,
+ description,
+ icon,
+ parent)
+{
+}
+
+CpThemePluginEntryItemData::~CpThemePluginEntryItemData()
+{
+}
+
+void CpThemePluginEntryItemData::onLaunchView()
+{
+ HbFileDialog *dlg = new HbFileDialog();
+ dlg->setDirectory(QString("C:/ControlPanel/resource"));
+ dlg->setTitle("Select file:");
+ dlg->setPrimaryActionText(QString("Done"));
+ dlg->setSecondaryActionText(QString("Close"));
+ QString filePath = dlg->getFileName();
+ if (!filePath.isEmpty()) {
+ setDescription(QFileInfo(filePath).baseName());
+ setEntryItemIcon(HbIcon(filePath));
+ }
+ delete dlg;
+}
+
+CpBaseSettingView *CpThemePluginEntryItemData::createSettingView() const
+{
+ return 0;
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/examples/themeplugin/src/cpthemepluginentryitemdata.h Fri Mar 19 09:29:29 2010 +0200
@@ -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:
+ *
+ */
+
+#ifndef CPTHEMEPLUGINENTRYITEMDATA_H
+#define CPTHEMEPLUGINENTRYITEMDATA_H
+
+#include <cpsettingformentryitemdata.h>
+
+class CpThemePluginEntryItemData : public CpSettingFormEntryItemData
+{
+ Q_OBJECT
+public:
+ explicit CpThemePluginEntryItemData(CpItemDataHelper &itemDataHelper,
+ const QString &text = QString(),
+ const QString &description = QString(),
+ const HbIcon &icon = HbIcon(),
+ const HbDataFormModelItem *parent = 0);
+ virtual ~CpThemePluginEntryItemData();
+private slots:
+ void onLaunchView();
+private:
+ virtual CpBaseSettingView *createSettingView() const;
+};
+
+#endif //CPTHEMEPLUGINENTRYITEMDATA_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/examples/themeplugin/themeplugin.pri Fri Mar 19 09:29:29 2010 +0200
@@ -0,0 +1,19 @@
+#
+# 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: cpthemeplugin source files
+#
+
+# Input
+HEADERS += src/*.h
+SOURCES += src/*.cpp
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/examples/themeplugin/themeplugin.pro Fri Mar 19 09:29:29 2010 +0200
@@ -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 = lib
+TARGET = cpthemeplugin
+
+CONFIG += hb plugin
+
+LIBS += -lcpframework
+
+include ( ../example_common.pri )
+include ( themeplugin.pri )
+
+symbian {
+ TARGET.UID3 = 0X20025FDB
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/examples/viewplugin/src/cpsampleview.cpp Fri Mar 19 09:29:29 2010 +0200
@@ -0,0 +1,71 @@
+/*
+ * 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 "cpsampleview.h"
+#include <hbdataform.h>
+#include <qstringlist>
+#include <QDebug>
+#include <hbdataformmodel.h>
+#include <cpsettingformitemdata.h>
+#include <hbmessagebox.h>
+
+CpSampleView::CpSampleView(QGraphicsItem *parent) :
+ CpBaseSettingView(0,parent),
+ mGroupItem(0),
+ mSliderItem(0),
+ mCheckBoxItem(0)
+
+{
+ HbDataForm *form = settingForm();
+ if (form) {
+ HbDataFormModel *model = new HbDataFormModel;
+
+ form->setHeading(tr("View from sample plugin"));
+ mGroupItem = new HbDataFormModelItem(HbDataFormModelItem::GroupItem, QString("Group"));
+
+ model->appendDataFormItem(mGroupItem);
+
+ mSliderItem = new CpSettingFormItemData(HbDataFormModelItem::SliderItem,
+ QString("Sample Slider"));
+ form->addConnection(mSliderItem,SIGNAL(valueChanged(int)),this,SLOT(sliderValueChanged(int)));
+ mGroupItem->appendChild(mSliderItem);
+
+ mCheckBoxItem = new CpSettingFormItemData(HbDataFormModelItem::CheckBoxItem,
+ QString("Sample Check Box"));
+ form->addConnection(mCheckBoxItem,SIGNAL(stateChanged (int)),this,SLOT(checkBoxStateChanged(int)));
+ mGroupItem->appendChild(mCheckBoxItem);
+
+ form->setModel(model);
+ }
+
+
+}
+CpSampleView::~CpSampleView()
+{
+}
+
+void CpSampleView::sliderValueChanged(int value)
+{
+ //TODO: store your changes
+ HbMessageBox::launchInformationMessageBox(QString("slider value changed to:%1").arg(value));
+}
+void CpSampleView::checkBoxStateChanged(int state)
+{
+ //TODO: store your changes
+ QString str = (state ? "checked" : "un-checked");
+ HbMessageBox::launchInformationMessageBox(str);
+}
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/examples/viewplugin/src/cpsampleview.h Fri Mar 19 09:29:29 2010 +0200
@@ -0,0 +1,40 @@
+/*
+ * 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 CPSAMPLEVIEW_H
+#define CPSAMPLEVIEW_H
+
+#include <cpbasesettingview.h>
+
+class HbDataFormModelItem;
+class CpSettingFormItemData;
+
+class CpSampleView : public CpBaseSettingView
+{
+ Q_OBJECT
+public:
+ explicit CpSampleView(QGraphicsItem *parent = 0);
+ virtual ~CpSampleView();
+private slots:
+ //need handling your member's value change
+ void sliderValueChanged(int value);
+ void checkBoxStateChanged(int state);
+private:
+ HbDataFormModelItem *mGroupItem;
+ CpSettingFormItemData *mSliderItem;
+ CpSettingFormItemData *mCheckBoxItem;
+};
+#endif// CPSAMPLEVIEW_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/examples/viewplugin/src/cpviewplugin.cpp Fri Mar 19 09:29:29 2010 +0200
@@ -0,0 +1,37 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0""
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:
+ *
+ */
+#include "cpviewplugin.h"
+#include "cpsampleview.h"
+#include <cpsettingformentryitemdataimpl.h>
+
+CpViewPlugin::CpViewPlugin()
+{
+}
+
+CpViewPlugin::~CpViewPlugin()
+{
+}
+QList<CpSettingFormItemData*> CpViewPlugin::createSettingFormItemData(CpItemDataHelper &itemDataHelper) const
+{
+ return QList<CpSettingFormItemData*>()
+ << new CpSettingFormEntryItemDataImpl<CpSampleView>(
+ itemDataHelper,
+ tr("Entry item from sample view plugin"),
+ tr("view plugin descriptions"));
+}
+
+Q_EXPORT_PLUGIN2(cpviewplugin, CpViewPlugin);
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/examples/viewplugin/src/cpviewplugin.h Fri Mar 19 09:29:29 2010 +0200
@@ -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:
+ *
+ */
+#ifndef CPVIEWPLUGIN_H
+#define CPVIEWPLUGIN_H
+
+#include <qobject.h>
+#include <cpplugininterface.h>
+
+class CpViewPlugin : public QObject, public CpPluginInterface
+{
+ Q_OBJECT
+ Q_INTERFACES(CpPluginInterface)
+public:
+ CpViewPlugin();
+ virtual ~CpViewPlugin();
+ virtual QList<CpSettingFormItemData*> createSettingFormItemData(CpItemDataHelper &itemDataHelper) const;
+};
+
+#endif //CPVIEWPLUGIN_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/examples/viewplugin/viewplugin.pri Fri Mar 19 09:29:29 2010 +0200
@@ -0,0 +1,23 @@
+#
+# 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:
+#
+
+# Input
+HEADERS += src/cpviewplugin.h \
+ src/cpsampleview.h
+
+SOURCES += src/cpviewplugin.cpp \
+ src/cpsampleview.cpp
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/examples/viewplugin/viewplugin.pro Fri Mar 19 09:29:29 2010 +0200
@@ -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:
+#
+
+TEMPLATE = lib
+TARGET = cpviewplugin
+
+include (../example_common.pri)
+include (viewplugin.pri)
+
+symbian: {
+ TARGET.UID3 = 0x20025FE2
+}
+
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/rom/controlpanelui.iby Fri Mar 19 09:29:29 2010 +0200
@@ -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 __CONTROLPANELUI_IBY__
+#define __CONTROLPANELUI_IBY__
+
+#include <bldvariant.hrh>
+#include <data_caging_paths_for_iby.hrh>
+
+#define CP_UPGRADABLE_APP_REG_RSC(NAME) data=DATAZ_\PRIVATE\10003A3F\IMPORT\APPS\ ## NAME ## _reg.rsc Private\10003a3f\import\apps\ ## NAME ## _reg.rsc
+
+file=ABI_DIR\BUILD_DIR\controlpanel.exe SHARED_LIB_DIR\controlpanel.exe
+CP_UPGRADABLE_APP_REG_RSC(controlpanel)
+S60_APP_RESOURCE(controlpanel)
+
+
+file=ABI_DIR\BUILD_DIR\cpcategorymodel.dll SHARED_LIB_DIR\cpcategorymodel.dll
+file=ABI_DIR\BUILD_DIR\seccodeui.dll SHARED_LIB_DIR\seccodeui.dll
+file=ABI_DIR\BUILD_DIR\cpprofilewrapper.dll SHARED_LIB_DIR\cpprofilewrapper.dll
+
+file=ABI_DIR\BUILD_DIR\cpapplicationsettingsplugin.dll SHARED_LIB_DIR\cpapplicationsettingsplugin.dll
+file=ABI_DIR\BUILD_DIR\cppersonalizationplugin.dll SHARED_LIB_DIR\cppersonalizationplugin.dll
+file=ABI_DIR\BUILD_DIR\cpcommunicationplugin.dll SHARED_LIB_DIR\cpcommunicationplugin.dll
+file=ABI_DIR\BUILD_DIR\cpdeviceplugin.dll SHARED_LIB_DIR\cpdeviceplugin.dll
+file=ABI_DIR\BUILD_DIR\cpplaceholderplugin.dll SHARED_LIB_DIR\cpplaceholderplugin.dll
+file=ABI_DIR\BUILD_DIR\cpprivacyplugin.dll SHARED_LIB_DIR\cpprivacyplugin.dll
+file=ABI_DIR\BUILD_DIR\cpplaceholdernoiconplugin.dll SHARED_LIB_DIR\cpplaceholdernoiconplugin.dll
+file=ABI_DIR\BUILD_DIR\cpdisplayplugin.dll SHARED_LIB_DIR\cpdisplayplugin.dll
+file=ABI_DIR\BUILD_DIR\cplookfeelplugin.dll SHARED_LIB_DIR\cplookfeelplugin.dll
+file=ABI_DIR\BUILD_DIR\cpthemeplugin.dll SHARED_LIB_DIR\cpthemeplugin.dll
+file=ABI_DIR\BUILD_DIR\cpkeytouchfdbkplugin.dll SHARED_LIB_DIR\cpkeytouchfdbkplugin.dll
+file=ABI_DIR\BUILD_DIR\cpaccountsplugin.dll SHARED_LIB_DIR\cpaccountsplugin.dll
+file=ABI_DIR\BUILD_DIR\cppincodeplugin.dll SHARED_LIB_DIR\cppincodeplugin.dll
+file=ABI_DIR\BUILD_DIR\cpdevicelockplugin.dll SHARED_LIB_DIR\cpdevicelockplugin.dll
+
+data=\epoc32\data\c\resource\qt\plugins\controlpanel\config\mainview.cpcfg resource\qt\plugins\controlpanel\config\mainview.cpcfg
+data=\epoc32\data\c\resource\qt\plugins\controlpanel\config\cpapplicationsettingsplugin.cpcfg resource\qt\plugins\controlpanel\config\cpapplicationsettingsplugin.cpcfg
+data=\epoc32\data\c\resource\qt\plugins\controlpanel\config\cppersonalizationplugin.cpcfg resource\qt\plugins\controlpanel\config\cppersonalizationplugin.cpcfg
+data=\epoc32\data\c\resource\qt\plugins\controlpanel\config\cpcommunicationplugin.cpcfg resource\qt\plugins\controlpanel\config\cpcommunicationplugin.cpcfg
+data=\epoc32\data\c\resource\qt\plugins\controlpanel\config\cpdeviceplugin.cpcfg resource\qt\plugins\controlpanel\config\cpdeviceplugin.cpcfg
+data=\epoc32\data\c\resource\qt\plugins\controlpanel\config\cpprivacyplugin.cpcfg resource\qt\plugins\controlpanel\config\cpprivacyplugin.cpcfg
+data=\epoc32\data\c\resource\qt\plugins\controlpanel\config\cplookfeelplugin.cpcfg resource\qt\plugins\controlpanel\config\cplookfeelplugin.cpcfg
+
+
+data=\epoc32\data\c\resource\qt\plugins\controlpanel\cppersonalizationplugin.qtplugin resource\qt\plugins\controlpanel\cppersonalizationplugin.qtplugin
+data=\epoc32\data\c\resource\qt\plugins\controlpanel\cpapplicationsettingsplugin.qtplugin resource\qt\plugins\controlpanel\cpapplicationsettingsplugin.qtplugin
+data=\epoc32\data\c\resource\qt\plugins\controlpanel\cpcommunicationplugin.qtplugin resource\qt\plugins\controlpanel\cpcommunicationplugin.qtplugin
+data=\epoc32\data\c\resource\qt\plugins\controlpanel\cpdeviceplugin.qtplugin resource\qt\plugins\controlpanel\cpdeviceplugin.qtplugin
+data=\epoc32\data\c\resource\qt\plugins\controlpanel\cpplaceholderplugin.qtplugin resource\qt\plugins\controlpanel\cpplaceholderplugin.qtplugin
+data=\epoc32\data\c\resource\qt\plugins\controlpanel\cpprivacyplugin.qtplugin resource\qt\plugins\controlpanel\cpprivacyplugin.qtplugin
+data=\epoc32\data\c\resource\qt\plugins\controlpanel\cpplaceholdernoiconplugin.qtplugin resource\qt\plugins\controlpanel\cpplaceholdernoiconplugin.qtplugin
+data=\epoc32\data\c\resource\qt\plugins\controlpanel\cplookfeelplugin.qtplugin resource\qt\plugins\controlpanel\cplookfeelplugin.qtplugin
+data=\epoc32\data\c\resource\qt\plugins\controlpanel\cpthemeplugin.qtplugin resource\qt\plugins\controlpanel\cpthemeplugin.qtplugin
+data=\epoc32\data\c\resource\qt\plugins\controlpanel\cpdisplayplugin.qtplugin resource\qt\plugins\controlpanel\cpdisplayplugin.qtplugin
+data=\epoc32\data\c\resource\qt\plugins\controlpanel\cpkeytouchfdbkplugin.qtplugin resource\qt\plugins\controlpanel\cpkeytouchfdbkplugin.qtplugin
+data=\epoc32\data\c\resource\qt\plugins\controlpanel\cpaccountsplugin.qtplugin resource\qt\plugins\controlpanel\cpaccountsplugin.qtplugin
+data=\epoc32\data\c\resource\qt\plugins\controlpanel\cppincodeplugin.qtplugin resource\qt\plugins\controlpanel\cppincodeplugin.qtplugin
+data=\epoc32\data\c\resource\qt\plugins\controlpanel\cpdevicelockplugin.qtplugin resource\qt\plugins\controlpanel\cpdevicelockplugin.qtplugin
+
+#endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/rom/controlpanelui_resources.iby Fri Mar 19 09:29:29 2010 +0200
@@ -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:
+*
+*/
+
+#ifndef CONTROLPANELUI_RESOURCES
+#define CONTROLPANELUI_RESOURCES
+
+
+#include <data_caging_paths_for_iby.hrh>
+
+data=DATAZ_\QT_TRANSLATIONS_DIR\control_panel.qm QT_TRANSLATIONS_DIR\control_panel.qm
+
+#endif // CONTROLPANELUI_RESOURCES
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/rom/cpui_rom.pri Fri Mar 19 09:29:29 2010 +0200
@@ -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:
+#
+
+symbian {
+ BLD_INF_RULES.prj_exports += \
+ "$${LITERAL_HASH}include<platform_paths.hrh>" \
+ "rom/controlpanelui.iby CORE_APP_LAYER_IBY_EXPORT_PATH(controlpanelui.iby)"
+
+
+ BLD_INF_RULES.prj_exports += \
+ "$${LITERAL_HASH}include<platform_paths.hrh>" \
+ "rom/controlpanelui_resources.iby LANGUAGE_APP_LAYER_IBY_EXPORT_PATH(controlpanelui_resources.iby)"
+}
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/bwins/cpcategorymodelu.def Fri Mar 19 09:29:29 2010 +0200
@@ -0,0 +1,33 @@
+EXPORTS
+ ?qt_metacall@CpCategorySettingFormModel@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 1 NONAME ; int CpCategorySettingFormModel::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?qt_metacall@CpCategorySettingFormItemData@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 2 NONAME ; int CpCategorySettingFormItemData::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ??1CpCategorySettingFormModel@@UAE@XZ @ 3 NONAME ; CpCategorySettingFormModel::~CpCategorySettingFormModel(void)
+ ?qt_metacast@CpCategorySettingFormModel@@UAEPAXPBD@Z @ 4 NONAME ; void * CpCategorySettingFormModel::qt_metacast(char const *)
+ ?beforeLoadingConfigPlugins@CpCategorySettingFormItemData@@EAEXAAVCpItemDataHelper@@@Z @ 5 NONAME ; void CpCategorySettingFormItemData::beforeLoadingConfigPlugins(class CpItemDataHelper &)
+ ?afterLoadingConfigPlugins@CpCategorySettingFormModel@@EAEXAAVCpItemDataHelper@@@Z @ 6 NONAME ; void CpCategorySettingFormModel::afterLoadingConfigPlugins(class CpItemDataHelper &)
+ ?trUtf8@CpCategorySettingFormModel@@SA?AVQString@@PBD0H@Z @ 7 NONAME ; class QString CpCategorySettingFormModel::trUtf8(char const *, char const *, int)
+ ??0CpCategorySettingFormModel@@QAE@ABVQString@@@Z @ 8 NONAME ; CpCategorySettingFormModel::CpCategorySettingFormModel(class QString const &)
+ ?trUtf8@CpCategorySettingFormItemData@@SA?AVQString@@PBD0@Z @ 9 NONAME ; class QString CpCategorySettingFormItemData::trUtf8(char const *, char const *)
+ ?tr@CpCategorySettingFormModel@@SA?AVQString@@PBD0@Z @ 10 NONAME ; class QString CpCategorySettingFormModel::tr(char const *, char const *)
+ ?tr@CpCategorySettingFormItemData@@SA?AVQString@@PBD0@Z @ 11 NONAME ; class QString CpCategorySettingFormItemData::tr(char const *, char const *)
+ ?getStaticMetaObject@CpCategorySettingFormModel@@SAABUQMetaObject@@XZ @ 12 NONAME ; struct QMetaObject const & CpCategorySettingFormModel::getStaticMetaObject(void)
+ ?getStaticMetaObject@CpCategorySettingFormItemData@@SAABUQMetaObject@@XZ @ 13 NONAME ; struct QMetaObject const & CpCategorySettingFormItemData::getStaticMetaObject(void)
+ ?initialize@CpCategorySettingFormModel@@UAEXAAVCpItemDataHelper@@@Z @ 14 NONAME ; void CpCategorySettingFormModel::initialize(class CpItemDataHelper &)
+ ?initialize@CpCategorySettingFormItemData@@QAEXAAVCpItemDataHelper@@@Z @ 15 NONAME ; void CpCategorySettingFormItemData::initialize(class CpItemDataHelper &)
+ ?tr@CpCategorySettingFormItemData@@SA?AVQString@@PBD0H@Z @ 16 NONAME ; class QString CpCategorySettingFormItemData::tr(char const *, char const *, int)
+ ??0CpCategorySettingFormItemData@@QAE@W4DataItemType@HbDataFormModelItem@@ABVQString@@1PBV2@@Z @ 17 NONAME ; CpCategorySettingFormItemData::CpCategorySettingFormItemData(enum HbDataFormModelItem::DataItemType, class QString const &, class QString const &, class HbDataFormModelItem const *)
+ ??1CpCategorySettingFormItemData@@UAE@XZ @ 18 NONAME ; CpCategorySettingFormItemData::~CpCategorySettingFormItemData(void)
+ ?beforeLoadingConfigPlugins@CpCategorySettingFormModel@@EAEXAAVCpItemDataHelper@@@Z @ 19 NONAME ; void CpCategorySettingFormModel::beforeLoadingConfigPlugins(class CpItemDataHelper &)
+ ?trUtf8@CpCategorySettingFormModel@@SA?AVQString@@PBD0@Z @ 20 NONAME ; class QString CpCategorySettingFormModel::trUtf8(char const *, char const *)
+ ?trUtf8@CpCategorySettingFormItemData@@SA?AVQString@@PBD0H@Z @ 21 NONAME ; class QString CpCategorySettingFormItemData::trUtf8(char const *, char const *, int)
+ ?staticMetaObject@CpCategorySettingFormModel@@2UQMetaObject@@B @ 22 NONAME ; struct QMetaObject const CpCategorySettingFormModel::staticMetaObject
+ ?afterLoadingConfigPlugins@CpCategorySettingFormItemData@@EAEXAAVCpItemDataHelper@@@Z @ 23 NONAME ; void CpCategorySettingFormItemData::afterLoadingConfigPlugins(class CpItemDataHelper &)
+ ?metaObject@CpCategorySettingFormModel@@UBEPBUQMetaObject@@XZ @ 24 NONAME ; struct QMetaObject const * CpCategorySettingFormModel::metaObject(void) const
+ ?tr@CpCategorySettingFormModel@@SA?AVQString@@PBD0H@Z @ 25 NONAME ; class QString CpCategorySettingFormModel::tr(char const *, char const *, int)
+ ?staticMetaObject@CpCategorySettingFormItemData@@2UQMetaObject@@B @ 26 NONAME ; struct QMetaObject const CpCategorySettingFormItemData::staticMetaObject
+ ?metaObject@CpCategorySettingFormItemData@@UBEPBUQMetaObject@@XZ @ 27 NONAME ; struct QMetaObject const * CpCategorySettingFormItemData::metaObject(void) const
+ ??0CpCategorySettingFormItemData@@QAE@ABVQString@@PBVHbDataFormModelItem@@@Z @ 28 NONAME ; CpCategorySettingFormItemData::CpCategorySettingFormItemData(class QString const &, class HbDataFormModelItem const *)
+ ??_ECpCategorySettingFormModel@@UAE@I@Z @ 29 NONAME ; CpCategorySettingFormModel::~CpCategorySettingFormModel(unsigned int)
+ ??_ECpCategorySettingFormItemData@@UAE@I@Z @ 30 NONAME ; CpCategorySettingFormItemData::~CpCategorySettingFormItemData(unsigned int)
+ ?qt_metacast@CpCategorySettingFormItemData@@UAEPAXPBD@Z @ 31 NONAME ; void * CpCategorySettingFormItemData::qt_metacast(char const *)
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/bwins/cpprofilewrapperu.def Fri Mar 19 09:29:29 2010 +0200
@@ -0,0 +1,32 @@
+EXPORTS
+ ?ringVolume@CpProfileModel@@QAEHXZ @ 1 NONAME ; int CpProfileModel::ringVolume(void)
+ ??1CpProfileModel@@QAE@XZ @ 2 NONAME ; CpProfileModel::~CpProfileModel(void)
+ ?profileName@CpProfileModel@@QAE?AVQString@@H@Z @ 3 NONAME ; class QString CpProfileModel::profileName(int)
+ ?setScreenVibra@CpProfileModel@@QAEXH@Z @ 4 NONAME ; void CpProfileModel::setScreenVibra(int)
+ ?setScreenVolume@CpProfileModel@@QAEXH@Z @ 5 NONAME ; void CpProfileModel::setScreenVolume(int)
+ ?screenVolume@CpProfileModel@@QAEHXZ @ 6 NONAME ; int CpProfileModel::screenVolume(void)
+ ?setRingTone@CpProfileModel@@QAEHABVQString@@@Z @ 7 NONAME ; int CpProfileModel::setRingTone(class QString const &)
+ ?keyVolume@CpProfileModel@@QAEHXZ @ 8 NONAME ; int CpProfileModel::keyVolume(void)
+ ?setVibraStatus@CpProfileModel@@QAEX_N@Z @ 9 NONAME ; void CpProfileModel::setVibraStatus(bool)
+ ?calendarTone@CpProfileModel@@QAE?AVQString@@XZ @ 10 NONAME ; class QString CpProfileModel::calendarTone(void)
+ ?vibraStatus@CpProfileModel@@QAE_NXZ @ 11 NONAME ; bool CpProfileModel::vibraStatus(void)
+ ?setKeyVolume@CpProfileModel@@QAEXH@Z @ 12 NONAME ; void CpProfileModel::setKeyVolume(int)
+ ?activateSilent@CpProfileModel@@QAEXXZ @ 13 NONAME ; void CpProfileModel::activateSilent(void)
+ ?ringTone@CpProfileModel@@QAE?AVQString@@XZ @ 14 NONAME ; class QString CpProfileModel::ringTone(void)
+ ?activeProfileId@CpProfileModel@@QAEHXZ @ 15 NONAME ; int CpProfileModel::activeProfileId(void)
+ ?emailTone@CpProfileModel@@QAE?AVQString@@XZ @ 16 NONAME ; class QString CpProfileModel::emailTone(void)
+ ?activateBeep@CpProfileModel@@QAEXXZ @ 17 NONAME ; void CpProfileModel::activateBeep(void)
+ ?setEmailTone@CpProfileModel@@QAEHABVQString@@@Z @ 18 NONAME ; int CpProfileModel::setEmailTone(class QString const &)
+ ?setRingVolume@CpProfileModel@@QAEXH@Z @ 19 NONAME ; void CpProfileModel::setRingVolume(int)
+ ?messageTone@CpProfileModel@@QAE?AVQString@@XZ @ 20 NONAME ; class QString CpProfileModel::messageTone(void)
+ ?initiationFlag@CpProfileModel@@QAEHXZ @ 21 NONAME ; int CpProfileModel::initiationFlag(void)
+ ?isBeep@CpProfileModel@@QAE_NXZ @ 22 NONAME ; bool CpProfileModel::isBeep(void)
+ ?activateProfile@CpProfileModel@@QAEHH@Z @ 23 NONAME ; int CpProfileModel::activateProfile(int)
+ ?setAlarmTone@CpProfileModel@@QAEXABVQString@@@Z @ 24 NONAME ; void CpProfileModel::setAlarmTone(class QString const &)
+ ??0CpProfileModel@@QAE@XZ @ 25 NONAME ; CpProfileModel::CpProfileModel(void)
+ ?screenVibra@CpProfileModel@@QAEHXZ @ 26 NONAME ; int CpProfileModel::screenVibra(void)
+ ?alarmTone@CpProfileModel@@QAE?AVQString@@XZ @ 27 NONAME ; class QString CpProfileModel::alarmTone(void)
+ ?setMessageTone@CpProfileModel@@QAEHABVQString@@@Z @ 28 NONAME ; int CpProfileModel::setMessageTone(class QString const &)
+ ?isSilent@CpProfileModel@@QAE_NXZ @ 29 NONAME ; bool CpProfileModel::isSilent(void)
+ ?setCalendarTone@CpProfileModel@@QAEXABVQString@@@Z @ 30 NONAME ; void CpProfileModel::setCalendarTone(class QString const &)
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/bwins/seccodeuiu.def Fri Mar 19 09:29:29 2010 +0200
@@ -0,0 +1,33 @@
+EXPORTS
+ ?qt_metacall@SecCodeSettings@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 1 NONAME ; int SecCodeSettings::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?canSetModelIndex@SecCodeEditDataFormViewItem@@UBE_NABVQModelIndex@@@Z @ 2 NONAME ; bool SecCodeEditDataFormViewItem::canSetModelIndex(class QModelIndex const &) const
+ ?qt_metacast@SecCodeEditDataFormViewItem@@UAEPAXPBD@Z @ 3 NONAME ; void * SecCodeEditDataFormViewItem::qt_metacast(char const *)
+ ?staticMetaObject@SecCodeEditDataFormViewItem@@2UQMetaObject@@B @ 4 NONAME ; struct QMetaObject const SecCodeEditDataFormViewItem::staticMetaObject
+ ??0SecCodeSettings@@QAE@PAVQObject@@@Z @ 5 NONAME ; SecCodeSettings::SecCodeSettings(class QObject *)
+ ?tr@SecCodeEditDataFormViewItem@@SA?AVQString@@PBD0H@Z @ 6 NONAME ; class QString SecCodeEditDataFormViewItem::tr(char const *, char const *, int)
+ ??_ESecCodeEditDataFormViewItem@@UAE@I@Z @ 7 NONAME ; SecCodeEditDataFormViewItem::~SecCodeEditDataFormViewItem(unsigned int)
+ ?pinCodeRequest@SecCodeSettings@@QBE_NXZ @ 8 NONAME ; bool SecCodeSettings::pinCodeRequest(void) const
+ ?metaObject@SecCodeSettings@@UBEPBUQMetaObject@@XZ @ 9 NONAME ; struct QMetaObject const * SecCodeSettings::metaObject(void) const
+ ?createItem@SecCodeEditDataFormViewItem@@UAEPAVHbAbstractViewItem@@XZ @ 10 NONAME ; class HbAbstractViewItem * SecCodeEditDataFormViewItem::createItem(void)
+ ?trUtf8@SecCodeEditDataFormViewItem@@SA?AVQString@@PBD0@Z @ 11 NONAME ; class QString SecCodeEditDataFormViewItem::trUtf8(char const *, char const *)
+ ??_ESecCodeSettings@@UAE@I@Z @ 12 NONAME ; SecCodeSettings::~SecCodeSettings(unsigned int)
+ ?qt_metacall@SecCodeEditDataFormViewItem@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 13 NONAME ; int SecCodeEditDataFormViewItem::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?changePin2Code@SecCodeSettings@@QAEXXZ @ 14 NONAME ; void SecCodeSettings::changePin2Code(void)
+ ?trUtf8@SecCodeSettings@@SA?AVQString@@PBD0@Z @ 15 NONAME ; class QString SecCodeSettings::trUtf8(char const *, char const *)
+ ?tr@SecCodeSettings@@SA?AVQString@@PBD0H@Z @ 16 NONAME ; class QString SecCodeSettings::tr(char const *, char const *, int)
+ ?staticMetaObject@SecCodeSettings@@2UQMetaObject@@B @ 17 NONAME ; struct QMetaObject const SecCodeSettings::staticMetaObject
+ ?setPinCodeRequest@SecCodeSettings@@QAEX_N@Z @ 18 NONAME ; void SecCodeSettings::setPinCodeRequest(bool)
+ ?qt_metacast@SecCodeSettings@@UAEPAXPBD@Z @ 19 NONAME ; void * SecCodeSettings::qt_metacast(char const *)
+ ?tr@SecCodeSettings@@SA?AVQString@@PBD0@Z @ 20 NONAME ; class QString SecCodeSettings::tr(char const *, char const *)
+ ??1SecCodeSettings@@UAE@XZ @ 21 NONAME ; SecCodeSettings::~SecCodeSettings(void)
+ ?getStaticMetaObject@SecCodeSettings@@SAABUQMetaObject@@XZ @ 22 NONAME ; struct QMetaObject const & SecCodeSettings::getStaticMetaObject(void)
+ ?createCustomWidget@SecCodeEditDataFormViewItem@@MAEPAVHbWidget@@XZ @ 23 NONAME ; class HbWidget * SecCodeEditDataFormViewItem::createCustomWidget(void)
+ ?trUtf8@SecCodeSettings@@SA?AVQString@@PBD0H@Z @ 24 NONAME ; class QString SecCodeSettings::trUtf8(char const *, char const *, int)
+ ?changePinCode@SecCodeSettings@@QAEXXZ @ 25 NONAME ; void SecCodeSettings::changePinCode(void)
+ ?tr@SecCodeEditDataFormViewItem@@SA?AVQString@@PBD0@Z @ 26 NONAME ; class QString SecCodeEditDataFormViewItem::tr(char const *, char const *)
+ ?getStaticMetaObject@SecCodeEditDataFormViewItem@@SAABUQMetaObject@@XZ @ 27 NONAME ; struct QMetaObject const & SecCodeEditDataFormViewItem::getStaticMetaObject(void)
+ ??1SecCodeEditDataFormViewItem@@UAE@XZ @ 28 NONAME ; SecCodeEditDataFormViewItem::~SecCodeEditDataFormViewItem(void)
+ ?metaObject@SecCodeEditDataFormViewItem@@UBEPBUQMetaObject@@XZ @ 29 NONAME ; struct QMetaObject const * SecCodeEditDataFormViewItem::metaObject(void) const
+ ?trUtf8@SecCodeEditDataFormViewItem@@SA?AVQString@@PBD0H@Z @ 30 NONAME ; class QString SecCodeEditDataFormViewItem::trUtf8(char const *, char const *, int)
+ ??0SecCodeEditDataFormViewItem@@QAE@PAVQGraphicsItem@@@Z @ 31 NONAME ; SecCodeEditDataFormViewItem::SecCodeEditDataFormViewItem(class QGraphicsItem *)
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/common.pri Fri Mar 19 09:29:29 2010 +0200
@@ -0,0 +1,65 @@
+#
+# 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
+#
+
+CONFIG += debug_and_release
+
+# On win32 and mac, debug and release libraries are named differently.
+# We must follow the debug and release settings Qt was compiled with:
+# build debug iff Qt built debug, build release iff Qt built release.
+
+win32|mac {
+ !contains(QT_CONFIG,debug)|!contains(QT_CONFIG,release) {
+ CONFIG -= debug_and_release debug release
+ contains(QT_CONFIG,debug): CONFIG+=debug
+ contains(QT_CONFIG,release):CONFIG+=release
+ }
+}
+
+CONFIG(debug, debug|release) {
+ SUBDIRPART = debug
+} else {
+ SUBDIRPART = release
+}
+
+win32 {
+ DESTDIR = C:/ControlPanel/$$SUBDIRPART/bin
+ OBJECTS_DIR = $$PWD/../$$SUBDIRPART/tmp/$$TARGET
+}
+
+# Add the output dirs to the link path too
+LIBS += -L$$DESTDIR
+
+MOC_DIR = moc
+OBJECT_DIR = obj
+RCC_DIR = rcc
+
+#For some reason the default include path doesn't include MOC_DIR on symbian
+symbian {
+ INCLUDEPATH += $$MW_LAYER_SYSTEMINCLUDE
+ INCLUDEPATH += $$MW_LAYER_PLATFORM_EXPORT_PATH(cplogger)
+ INCLUDEPATH += $$MOC_DIR
+ TARGET.CAPABILITY = ALL -TCB
+ TARGET.EPOCALLOWDLLDATA = 1
+}
+
+INCLUDEPATH += $$PWD/inc
+win32 {
+ # add platfrom API for windows
+ INCLUDEPATH += $$PWD/../../controlpanel/controlpanel_plat/inc
+}
+
+
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/cpapplication/cpapplication.pri Fri Mar 19 09:29:29 2010 +0200
@@ -0,0 +1,22 @@
+#
+# 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: cpapplication source files
+#
+
+HEADERS += src/cpmainview.h \
+ src/cpmainmodel.h
+
+SOURCES += src/main.cpp \
+ src/cpmainview.cpp \
+ src/cpmainmodel.cpp
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/cpapplication/cpapplication.pro Fri Mar 19 09:29:29 2010 +0200
@@ -0,0 +1,40 @@
+#
+# 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 = app
+TARGET = ControlPanel
+
+include ( ../common.pri )
+include ( cpapplication.pri )
+
+
+CONFIG += hb
+
+LIBS += -lcpframework -lcpcategorymodel
+
+TRANSLATIONS = control_panel.ts
+
+symbian: {
+ TARGET.UID3 = 0x20025FD9
+ TARGET.EPOCHEAPSIZE = 0x020000 0x1000000
+
+ deploy.path = C:
+ headers.sources += data/mainview.cpcfg
+ headers.path = /resource/qt/plugins/controlpanel/config
+ DEPLOYMENT += exportheaders
+
+ for(header, headers.sources):BLD_INF_RULES.prj_exports += "./$$header $$deploy.path$$headers.path/$$basename(header)"
+}
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/cpapplication/data/mainview.cpcfg Fri Mar 19 09:29:29 2010 +0200
@@ -0,0 +1,35 @@
+
+<childplugins>
+
+ <plugin displayname = "Personalization" id = "0X20025FE5" dll = "cppersonalizationplugin.dll">
+ <desc></desc>
+ </plugin>
+
+ <plugin displayname = "Look & feel" id = "0X20025FE0" dll = "cplookfeelplugin.dll">
+ <desc></desc>
+ </plugin>
+
+ <plugin displayname = "Communication" id = "0X20025FDF" dll = "cpcommunicationplugin.dll">
+ <desc></desc>
+ </plugin>
+
+ <plugin displayname = "Accounts" id = "0x2feed8de" dll = "cpaccountsplugin.dll">
+ <desc></desc>
+ </plugin>
+
+ <plugin displayname = "Application settings" id = "0x20025FDC" dll = "cpapplicationsettingsplugin.dll">
+ <desc></desc>
+ </plugin>
+
+ <plugin displayname = "Privacy" id = "0x20025FE1" dll = "cpprivacyplugin.dll">
+ <desc></desc>
+ </plugin>
+
+ <plugin displayname = "Device" id = "0X20025FE7" dll = "cpdeviceplugin.dll">
+ <desc></desc>
+ </plugin>
+
+
+
+
+</childplugins>
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/cpapplication/src/cpmainmodel.cpp Fri Mar 19 09:29:29 2010 +0200
@@ -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:
+*
+*/
+
+#include "cpmainmodel.h"
+#include <cpitemdatahelper.h>
+
+CpMainModel::CpMainModel() :
+ CpCategorySettingFormModel(QString("mainview.cpcfg"))
+
+{
+}
+
+CpMainModel::~CpMainModel()
+{
+}
+
+//End of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/cpapplication/src/cpmainmodel.h Fri Mar 19 09:29:29 2010 +0200
@@ -0,0 +1,30 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0""
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+#ifndef CP_MAIN_MODEL_H
+#define CP_MAIN_MODEL_H
+
+#include <cpcategorysettingformmodel.h>
+
+class CpMainModel : public CpCategorySettingFormModel
+{
+ Q_OBJECT
+public:
+ CpMainModel();
+ virtual ~CpMainModel();
+};
+
+#endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/cpapplication/src/cpmainview.cpp Fri Mar 19 09:29:29 2010 +0200
@@ -0,0 +1,42 @@
+/*
+* 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 "cpmainview.h"
+#include "cpmainmodel.h"
+#include <QList>
+#include <hbdataform.h>
+#include <cpitemdatahelper.h>
+
+CpMainView::CpMainView(QGraphicsItem *parent /*= 0*/)
+: CpBaseSettingView(0,parent), mMainModel(0), mItemDataHelper(0)
+{
+ if (HbDataForm *form = settingForm()) {
+ mItemDataHelper = new CpItemDataHelper(form);
+ mMainModel = new CpMainModel;
+ mMainModel->initialize(*mItemDataHelper);
+ form->setModel(mMainModel);
+ }
+ setTitle( QObject::tr("Control Panel") ); //should use qtTrId("txt_cp_title_control_panel")
+}
+
+CpMainView::~CpMainView()
+{
+ delete mMainModel;
+ delete mItemDataHelper;
+}
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/cpapplication/src/cpmainview.h Fri Mar 19 09:29:29 2010 +0200
@@ -0,0 +1,42 @@
+/*
+* 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 CPMAINVIEW_H
+#define CPMAINVIEW_H
+
+#include <cpbasesettingview.h>
+
+class CpMainModel;
+class HbAbstractViewItem;
+class HbDataFormModelItem;
+class CpItemDataHelper;
+
+class CpMainView : public CpBaseSettingView
+{
+ Q_OBJECT
+public:
+ explicit CpMainView(QGraphicsItem *parent = 0);
+ virtual ~CpMainView();
+private:
+ Q_DISABLE_COPY(CpMainView)
+private:
+ CpMainModel *mMainModel;
+ CpItemDataHelper *mItemDataHelper;
+};
+
+#endif
+//End of file
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/cpapplication/src/main.cpp Fri Mar 19 09:29:29 2010 +0200
@@ -0,0 +1,62 @@
+/*
+* 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 <hbapplication.h>
+#include <hbmainwindow.h>
+#include <QTranslator>
+#include <cplogger.h>
+#include "cpmainview.h"
+
+int main(int argc, char **argv)
+{
+ HbApplication app(argc, argv);
+
+ //used by QSettings
+ QCoreApplication::setOrganizationName("nokia");
+ QCoreApplication::setOrganizationDomain("Orbit");
+ QCoreApplication::setApplicationName("ControlPanel");
+
+ Logger::instance(CPFW_LOGGER_NAME)->configure(
+ CP_LOGGER_CONFIG_PATH,QSettings::IniFormat);
+
+ CPFW_LOG("Entering ControlPanel.exe...");
+
+ QTranslator translator;
+ if (translator.load("controlpanel_" + QLocale::system().name()))
+ {
+ qApp->installTranslator(&translator);
+ }
+
+ HbMainWindow mainWindow;
+ CpMainView *mainView = new CpMainView();
+#ifdef WIN32
+ mainWindow.setOrientation(Qt::Vertical);
+#endif
+ QObject::connect(mainView,SIGNAL(aboutToClose()),&app, SLOT(quit()));
+ mainWindow.addView(mainView);
+ mainWindow.show();
+
+ int ret = app.exec();
+
+ CPFW_LOG("Exiting ControlPanel.exe.");
+
+ Logger::closeAll();
+
+ return ret;
+}
+
+//
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/cpcategorymodel/cpcategorymodel.pri Fri Mar 19 09:29:29 2010 +0200
@@ -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: cpframework source files
+#
+
+HEADERS += $$PWD/src/cpbasepath.h \
+ $$PWD/src/cpplaceholderitemdata.h \
+ $$PWD/src/cppluginconfigreader.h \
+ $$PWD/src/cputility.h
+
+SOURCES += $$PWD/src/cpcategorysettingformitemdata.cpp \
+ $$PWD/src/cpcategorysettingformmodel.cpp \
+ $$PWD/src/cpplaceholderitemdata.cpp \
+ $$PWD/src/cppluginconfig.cpp \
+ $$PWD/src/cppluginconfigreader.cpp \
+ $$PWD/src/cputility.cpp
+
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/cpcategorymodel/cpcategorymodel.pro Fri Mar 19 09:29:29 2010 +0200
@@ -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:
+#
+
+TEMPLATE = lib
+TARGET = cpcategorymodel
+
+include ( ../common.pri )
+include ( ../inc/inc.pri )
+include ( ./cpcategorymodel.pri )
+
+CONFIG += Hb xml
+DEFINES += BUILD_CPCATEGORY_GLOBAL
+
+LIBS += -lcpframework
+
+symbian: {
+ TARGET.UID3 = 0X20028736
+}
+
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/cpcategorymodel/src/cpbasepath.h Fri Mar 19 09:29:29 2010 +0200
@@ -0,0 +1,34 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0""
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#ifndef CPBASEPATH_H
+#define CPBASEPATH_H
+
+#ifdef Q_OS_SYMBIAN
+ #define CP_PLUGIN_PATH QString("/resource/qt/plugins/controlpanel")
+ #define CP_PLUGIN_CONFIG_PATH QString("/resource/qt/plugins/controlpanel/config")
+#else
+ #ifdef _DEBUG
+ #define CP_PLUGIN_PATH QString("/ControlPanel/debug/bin")
+ #define CP_PLUGIN_CONFIG_PATH QString("/ControlPanel/debug/bin/config")
+ #else
+ #define CP_PLUGIN_PATH QString("/ControlPanel/release/bin")
+ #define CP_PLUGIN_CONFIG_PATH QString("/ControlPanel/release/bin/config")
+ #endif
+#endif
+
+#endif /* CPBASEPATH_H */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/cpcategorymodel/src/cpcategorysettingformitemdata.cpp Fri Mar 19 09:29:29 2010 +0200
@@ -0,0 +1,86 @@
+/*
+* 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 "cpcategorysettingformitemdata.h"
+#include <QString>
+#include "cputility.h"
+
+class CpCategorySettingFormItemDataPrivate
+{
+public:
+ CpCategorySettingFormItemDataPrivate(const QString &configFile) :
+ mInitialized(false),
+ mConfigFile(configFile)
+ {
+ }
+
+ ~CpCategorySettingFormItemDataPrivate()
+ {
+ }
+
+public:
+ bool mInitialized;
+ QString mConfigFile;
+};
+
+
+CpCategorySettingFormItemData::CpCategorySettingFormItemData(
+ HbDataFormModelItem::DataItemType type,
+ const QString &label,
+ const QString &configFile,
+ const HbDataFormModelItem *parent /*= 0*/) :
+ CpSettingFormItemData(type,label,parent),
+ d(new CpCategorySettingFormItemDataPrivate(configFile))
+{
+}
+
+CpCategorySettingFormItemData::CpCategorySettingFormItemData(
+ const QString &configFile /*= QString()*/,
+ const HbDataFormModelItem *parent /*= 0*/) :
+ CpSettingFormItemData(parent),
+ d(new CpCategorySettingFormItemDataPrivate(configFile))
+{
+}
+
+CpCategorySettingFormItemData::~CpCategorySettingFormItemData()
+{
+ delete d;
+}
+
+void CpCategorySettingFormItemData::initialize(CpItemDataHelper &itemDataHelper)
+{
+ //avoid to be called twice
+ if (!d->mInitialized) {
+ //give derived class a change do their special things before loading config plugins
+ beforeLoadingConfigPlugins(itemDataHelper);
+ //load plugins which are configured
+ CpUtility::buildConfigPluginItems(this,d->mConfigFile,itemDataHelper);
+ //give derived class a change do their special things after loading config plugins
+ afterLoadingConfigPlugins(itemDataHelper);
+
+ d->mInitialized = true;
+ }
+}
+
+
+void CpCategorySettingFormItemData::beforeLoadingConfigPlugins(CpItemDataHelper &/*itemDataHelper*/)
+{
+}
+
+void CpCategorySettingFormItemData::afterLoadingConfigPlugins(CpItemDataHelper &/*itemDataHelper*/)
+{
+}
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/cpcategorymodel/src/cpcategorysettingformmodel.cpp Fri Mar 19 09:29:29 2010 +0200
@@ -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:
+*
+*/
+
+#include "cpcategorysettingformmodel.h"
+#include <QString>
+
+#include "cputility.h"
+#include <cpitemdatahelper.h>
+
+class CpCategorySettingFormModelPrivate
+{
+public:
+ CpCategorySettingFormModelPrivate(const QString &configFile) :
+ mInitialized(false),
+ mConfigFile(configFile)
+ {
+ }
+
+ ~CpCategorySettingFormModelPrivate()
+ {
+ }
+
+public:
+ bool mInitialized;
+ QString mConfigFile;
+};
+
+CpCategorySettingFormModel::CpCategorySettingFormModel(const QString &configFile) :
+ d (new CpCategorySettingFormModelPrivate(configFile))
+{
+}
+
+CpCategorySettingFormModel::~CpCategorySettingFormModel()
+{
+ delete d;
+}
+
+void CpCategorySettingFormModel::initialize(CpItemDataHelper &itemDataHelper)
+{
+ //avoid to be called twice
+ if (!d->mInitialized) {
+ //give derived class a change do their special things before loading config plugins
+ beforeLoadingConfigPlugins(itemDataHelper);
+ //load plugins which are configured
+ CpUtility::buildConfigPluginItems(invisibleRootItem(),d->mConfigFile,itemDataHelper);
+ //give derived class a change do their special things after loading config plugins
+ afterLoadingConfigPlugins(itemDataHelper);
+
+ d->mInitialized = true;
+ }
+}
+
+
+void CpCategorySettingFormModel::beforeLoadingConfigPlugins(CpItemDataHelper&/*itemDataHelper*/)
+{
+}
+
+void CpCategorySettingFormModel::afterLoadingConfigPlugins(CpItemDataHelper &/*itemDataHelper*/)
+{
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/cpcategorymodel/src/cpplaceholderitemdata.cpp Fri Mar 19 09:29:29 2010 +0200
@@ -0,0 +1,56 @@
+/*
+* 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 "cpplaceholderitemdata.h"
+#include <QTextStream>
+#include <hbmessagebox.h>
+#include "cppluginconfig.h"
+
+CpPlaceHolderItemData::CpPlaceHolderItemData(CpItemDataHelper &itemDataHelper,
+ const CpPluginConfig &pluginConfig)
+ : CpSettingFormEntryItemData(
+ itemDataHelper,
+ pluginConfig.mDisplayName,
+ pluginConfig.mPluginFile)
+{
+}
+
+CpPlaceHolderItemData::~CpPlaceHolderItemData()
+{
+}
+
+void CpPlaceHolderItemData::onLaunchView()
+{
+ QString message;
+ QTextStream stream(&message);
+ stream << "Load plugin:"
+ << description()
+ << " faild."
+ << "this is only a placeholder."
+ << "Please check:\n"
+ << "1. if the dll name is correct in configuration file.\n"
+ << "2 if the dll has been generated.\n"
+ << "3. if the plugin stub file is in place.\n"
+ << "4. if the dll is valid Qt plugin.";
+
+ HbMessageBox::launchWarningMessageBox(message);
+}
+
+CpBaseSettingView *CpPlaceHolderItemData::createSettingView() const
+{
+ return 0;
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/cpcategorymodel/src/cpplaceholderitemdata.h Fri Mar 19 09:29:29 2010 +0200
@@ -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:
+*
+*/
+
+#ifndef CPPLACEHOLDERITEMDATA_H
+#define CPPLACEHOLDERITEMDATA_H
+
+#include <cpsettingformentryitemdata.h>
+
+class CpPluginConfig;
+class CpItemDataHelper;
+
+class CpPlaceHolderItemData : public CpSettingFormEntryItemData
+{
+ Q_OBJECT
+public:
+ CpPlaceHolderItemData(CpItemDataHelper &itemDataHelper,const CpPluginConfig &pluginConfig);
+ virtual ~CpPlaceHolderItemData();
+private slots:
+ virtual void onLaunchView();
+private:
+ virtual CpBaseSettingView *createSettingView() const;
+};
+
+
+#endif //CPPLACEHOLDERITEMDATA_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/cpcategorymodel/src/cppluginconfig.cpp Fri Mar 19 09:29:29 2010 +0200
@@ -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:
+*
+*/
+
+#include "cppluginconfig.h"
+#include <cplogger.h>
+
+CpPluginConfig::CpPluginConfig() :
+ mUid(0),
+ mDisplayName(QString()),
+ mPluginFile(QString()),
+ mDescription(QString())
+{
+
+}
+
+void CpPluginConfig::dump()
+{
+ CPFW_LOG(QLatin1String("id = ") + QString("0x%1").arg(mUid,0,16));
+ CPFW_LOG(QLatin1String("diplayname = ") + mDisplayName);
+ CPFW_LOG(QLatin1String("dll = ") + mPluginFile);
+ CPFW_LOG(QLatin1String("desc = ") + mDescription);
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/cpcategorymodel/src/cppluginconfig.h Fri Mar 19 09:29:29 2010 +0200
@@ -0,0 +1,35 @@
+/*
+* 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 CPPLUGINCONFIG_H
+#define CPPLUGINCONFIG_H
+
+#include <QString>
+
+class CpPluginConfig
+{
+public:
+ CpPluginConfig();
+ void dump();
+public:
+ int mUid;
+ QString mDisplayName;
+ QString mPluginFile;
+ QString mDescription;
+};
+
+#endif /* CPPLUGINCONFIG_H */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/cpcategorymodel/src/cppluginconfigreader.cpp Fri Mar 19 09:29:29 2010 +0200
@@ -0,0 +1,191 @@
+/*
+* 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 "cppluginconfigreader.h"
+#include <QFile>
+#include <QXmlStreamReader>
+#include <cplogger.h>
+
+const QString CHILD_PLUGINS_TAG = "childplugins";
+const QString PLUGIN_TAG = "plugin";
+const QString PLUGIN_ID_ATTR = "id";
+const QString PLUGIN_DLL_ATTR = "dll";
+const QString PLUGIN_DISPALYNAME_ATTR = "displayname";
+const QString DESC_TAG = "desc";
+
+CpPluginConfigReader::CpPluginConfigReader(const QString &configPath)
+: mConfigPath (configPath)
+{
+}
+
+CpPluginConfigReader::~CpPluginConfigReader()
+{
+}
+
+QList<CpPluginConfig> CpPluginConfigReader::readCpPluginConfigs()
+{
+ CPFW_LOG(QLatin1String("reading cpcfg file:") + mConfigPath);
+
+ if (mConfigPath.isNull() || mConfigPath.isEmpty()) {
+ CPFW_LOG("CpPluginConfigReader::readCpPluginConfigs() mConfigPath is empty.");
+ return QList<CpPluginConfig> ();
+ }
+
+ QFile file(mConfigPath);
+
+ if (!file.exists()) {
+ CPFW_LOG( mConfigPath + " does not exist.");
+ return QList<CpPluginConfig> ();
+ }
+
+ if (!file.open(QFile::ReadOnly | QFile::Text)) {
+ CPFW_LOG(QString("CpPluginConfigReader::readCpPluginConfigs() open file failed. Error:%1")
+ .arg(static_cast<int>(file.error()),0,10));
+ return QList<CpPluginConfig> ();
+ }
+
+ QXmlStreamReader reader(&file);
+
+ QList<CpPluginConfig> cpPluginConfigList;
+
+ readCpPluginConfigs(reader, cpPluginConfigList);
+
+ file.close();
+
+ return cpPluginConfigList;
+}
+
+void CpPluginConfigReader::readCpPluginConfigs(QXmlStreamReader &xmlReader,QList<CpPluginConfig> &cpPluginConfigList)
+{
+ xmlReader.readNext();
+
+ while (!xmlReader.atEnd()) {
+
+ if (xmlReader.isStartElement()) {
+ if (xmlReader.name() == CHILD_PLUGINS_TAG) {
+ readChildPluginsElement(xmlReader, cpPluginConfigList);
+ }
+ else {
+ xmlReader.raiseError("Not a valid file with the right format.");
+ }
+ }
+
+ else {
+ xmlReader.readNext();
+ }
+ }
+}
+
+void CpPluginConfigReader::readChildPluginsElement(QXmlStreamReader &xmlReader,QList<CpPluginConfig> &cpPluginConfigList)
+{
+ xmlReader.readNext();
+
+ while (!xmlReader.atEnd()) {
+
+ if (xmlReader.isEndElement()) {
+ xmlReader.readNext();
+ break;
+ }
+
+ if (xmlReader.isStartElement()) {
+ if (xmlReader.name() == PLUGIN_TAG) {
+ readPluginElement(xmlReader, cpPluginConfigList);
+ }
+ else {
+ skipUnknownElement(xmlReader);
+ }
+ }
+
+ else {
+ xmlReader.readNext();
+ }
+ }
+}
+
+void CpPluginConfigReader::readPluginElement(QXmlStreamReader &xmlReader,QList<CpPluginConfig> &cpPluginConfigList)
+{
+ CpPluginConfig cpPluginConfig;
+
+ QXmlStreamAttributes xmlAttributes = xmlReader.attributes();
+
+ if (xmlAttributes.hasAttribute(PLUGIN_ID_ATTR)) {
+ cpPluginConfig.mUid
+ = (xmlAttributes.value(PLUGIN_ID_ATTR)).toString().toUInt(0,16);
+ }
+
+ if (xmlAttributes.hasAttribute(PLUGIN_DLL_ATTR)) {
+ cpPluginConfig.mPluginFile
+ = (xmlAttributes.value(PLUGIN_DLL_ATTR)).toString();
+ }
+
+ if (xmlAttributes.hasAttribute(PLUGIN_DISPALYNAME_ATTR)) {
+ cpPluginConfig.mDisplayName
+ = (xmlAttributes.value(PLUGIN_DISPALYNAME_ATTR)).toString();
+ }
+
+ readDescElement(xmlReader,cpPluginConfig);
+
+ cpPluginConfig.dump();
+
+ cpPluginConfigList.append(cpPluginConfig);
+}
+
+void CpPluginConfigReader::readDescElement(QXmlStreamReader &xmlReader,CpPluginConfig &cpPluginConfig)
+{
+ xmlReader.readNext();
+
+ while (!xmlReader.atEnd()) {
+
+ if (xmlReader.isEndElement()) {
+ xmlReader.readNext();
+ break;
+ }
+
+ if (xmlReader.isStartElement()) {
+ if (xmlReader.name() == DESC_TAG) {
+ cpPluginConfig.mDescription = xmlReader.readElementText();
+ if (xmlReader.isEndElement()) {
+ xmlReader.readNext();
+ }
+ }
+ }
+
+ else {
+ xmlReader.readNext();
+ }
+ }
+}
+
+void CpPluginConfigReader::skipUnknownElement(QXmlStreamReader &xmlReader)
+{
+ xmlReader.readNext();
+
+ while (!xmlReader.atEnd()) {
+
+ if (xmlReader.isEndElement()) {
+ xmlReader.readNext();
+ break;
+ }
+
+ if (xmlReader.isStartElement()) {
+ skipUnknownElement(xmlReader);
+ }
+ else {
+ xmlReader.readNext();
+ }
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/cpcategorymodel/src/cppluginconfigreader.h Fri Mar 19 09:29:29 2010 +0200
@@ -0,0 +1,80 @@
+/*
+* 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:
+*
+*/
+
+/* configuration format:
+
+ <childplugins>
+ <plugin displayname = "Personalization" id = "0xE195181a" dll = "cppersonaliztionplugin.dll">
+ <desc>This is Personalization</desc>
+ </plugin>
+ <plugin displayname = "Communication" id = "0xE195181b" dll = "cpcommunicationplugin.dll">
+ <desc>This is Communication</desc>
+ </plugin>
+ <plugin displayname = "Application settings" id = "0xE195181c" dll = "cpapplicationsettingsplugin.dll">
+ <desc>This is Application settings</desc>
+ </plugin>
+ <plugin displayname = "Device" id = "0xE195181d" dll = "cpdeviceplugin.dll">
+ <desc>This is Device</desc>
+ </plugin>
+ </childplugins>
+*/
+
+/* Usage:
+
+ const QString file("\\resource\\qt\\plugins\\controlpanel\\config\\applicationsettingsplugin.cpcfg");
+
+ CpPluginConfigReader cfgReader(file);
+ QList<CpPluginConfig> cfgList = cfgReader.readCpPluginConfigs();
+
+ foreach (CpPluginConfig cfg, cfgList)
+ {
+ cfg.dump();
+ }
+*/
+
+#ifndef CPPLUGINCONFIGREADER_H
+#define CPPLUGINCONFIGREADER_H
+
+#include <QString>
+#include <QList>
+#include "cppluginconfig.h"
+
+class QXmlStreamReader;
+
+class CpPluginConfigReader
+{
+public:
+ explicit CpPluginConfigReader(const QString &configPath);
+ ~CpPluginConfigReader();
+
+ QList<CpPluginConfig> readCpPluginConfigs();
+
+private:
+ void readCpPluginConfigs(QXmlStreamReader &xmlReader,
+ QList<CpPluginConfig> &cpPluginConfigList);
+ void readChildPluginsElement(QXmlStreamReader &xmlReader,
+ QList<CpPluginConfig> &cpPluginConfigList);
+ void readPluginElement(QXmlStreamReader &xmlReader,
+ QList<CpPluginConfig> &cpPluginConfigList);
+ void readDescElement(QXmlStreamReader &xmlReader,
+ CpPluginConfig &cpPluginConfig);
+ void skipUnknownElement(QXmlStreamReader &xmlReader);
+private:
+ QString mConfigPath;
+};
+
+#endif /* CPPLUGINCONFIGREADER_H */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/cpcategorymodel/src/cputility.cpp Fri Mar 19 09:29:29 2010 +0200
@@ -0,0 +1,183 @@
+/*
+* 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 "cputility.h"
+#include <QString>
+#include <QDir>
+#include <QFileInfo>
+#include "cpbasepath.h"
+#include <cppluginloader.h>
+#include <cpplugininterface.h>
+#include <cppluginplatinterface.h>
+#include <cplogger.h>
+#include <cpsettingformentryitemdata.h>
+#include "cpcategorysettingformitemdata.h"
+#include "cppluginconfigreader.h"
+#include "cpplaceholderitemdata.h"
+
+void CpUtility::buildConfigPluginItems(HbDataFormModelItem *parent,
+ const QString &configFile,
+ CpItemDataHelper &itemDataHelper)
+{
+ if (!parent) {
+ return;
+ }
+
+ QString configPath(configFile);
+ QFileInfo fi(configFile);
+ //if it is a relative path, search the config file from device drives.
+ if (!fi.isAbsolute()) {
+ QStringList dirs = CpUtility::configFileDirectories();
+ foreach(const QString &dir,dirs) {
+ configPath = dir + fi.fileName();
+ if (QFileInfo(configPath).exists()) {
+ CPFW_LOG(configPath + " has been found.");
+ break;
+ }
+ }
+ }
+
+ QList<CpPluginConfig> pluginConfigs = CpPluginConfigReader(configPath).readCpPluginConfigs();
+
+ foreach(const CpPluginConfig &pluginConfig, pluginConfigs) {
+ CPFW_LOG(QLatin1String("Load plugin: ") + pluginConfig.mPluginFile + " from " + configPath);
+
+ QList<CpSettingFormItemData*> itemDataList;
+
+ //firstly, handle CpPluginInterface
+ if (CpPluginInterface *plugin = CpPluginLoader().loadCpPlugin(pluginConfig.mPluginFile)) {
+ CPFW_LOG("Load root component CpPluginInterface succeed.");
+ itemDataList = plugin->createSettingFormItemData(itemDataHelper);
+ }
+ //handle CpPluginPlatInterface
+ else if (CpPluginPlatInterface *plugin = CpPluginLoader().loadPlatCpPlugin(pluginConfig.mPluginFile)) {
+ CPFW_LOG("Load root component CpPluginPlatInterface succeed.");
+ CPFW_LOG("WARNING: CpPluginPlatInterface is deprecated. Please return CpPluginInterface from plugin.");
+ CpSettingFormItemData *itemData = plugin->createSettingFormItemData(itemDataHelper);
+ if (itemData) {
+ itemDataList.append(itemData);
+ }
+ }
+
+ else {
+ CPFW_LOG(QLatin1String("Load plugin:") + pluginConfig.mPluginFile + QLatin1String(" failed."));
+ #ifdef _DEBUG
+ CPFW_LOG(QLatin1String("***Add a placeholder."));
+ parent->appendChild(new CpPlaceHolderItemData(itemDataHelper,pluginConfig));
+ #endif
+ }
+
+ if (itemDataList.count()) {
+ foreach(CpSettingFormItemData *itemData,itemDataList) {
+ if (itemData) {
+ //append the new created setting form item to its parent item.
+ parent->appendChild(itemData);
+
+ if (CpCategorySettingFormItemData *categoryItemData
+ = qobject_cast<CpCategorySettingFormItemData*>(itemData)) {
+ categoryItemData->initialize(itemDataHelper);
+ }
+
+ //set the description from config if it is empty.
+ if (CpSettingFormEntryItemData *cpEntryItemData
+ = qobject_cast<CpSettingFormEntryItemData*>(itemData)) {
+ if (cpEntryItemData->text().isEmpty()) {
+ cpEntryItemData->setText(pluginConfig.mDisplayName);
+ }
+ if (cpEntryItemData->description().isEmpty()) {
+ cpEntryItemData->setDescription(pluginConfig.mDescription);
+ }
+ }
+
+ }
+ } //end foreach
+ }
+
+ } //end foreach
+}
+
+QStringList CpUtility::drives()
+{
+ static QStringList drives;
+
+ if (drives.empty()) {
+ CPFW_LOG("device drives:");
+#ifdef WIN32
+ drives.append("C:");
+ CPFW_LOG("C:");
+#else
+ QFileInfoList fileInfoList = QDir::drives();
+ foreach(const QFileInfo &fileInfo,fileInfoList) {
+ QString str = fileInfo.filePath();
+ if (str.length() > 2) {
+ str = str.left(2);
+ }
+ drives.append(str);
+ CPFW_LOG(str);
+ }
+#endif
+ }
+
+ return drives;
+}
+
+static QStringList directoriesFromAllDrives(const QString &baseDir)
+{
+ QStringList dirs;
+
+ QStringList drives = CpUtility::drives();
+ foreach(const QString &drive,drives) {
+ QString dir = drive + baseDir + QDir::separator();
+ if (QFileInfo(dir).exists()) {
+ dirs.append(dir);
+ CPFW_LOG(dir);
+ }
+ }
+
+ return dirs;
+}
+
+QStringList CpUtility::pluginDirectories()
+{
+ static QStringList dirs;
+ if (dirs.empty()) {
+ CPFW_LOG("ControlPanel plugin derectories:")
+ dirs = directoriesFromAllDrives(CP_PLUGIN_PATH);
+ }
+ return dirs;
+}
+
+QStringList CpUtility::applicationPluginDirectories()
+{
+ static QStringList dirs;
+ if (dirs.empty()) {
+ CPFW_LOG("ControlPanel application plugin derectories:");
+// dirs = directoriesFromAllDrives(CP_APPLICATION_PLUGIN_PATH);
+ }
+ return dirs;
+}
+
+
+QStringList CpUtility::configFileDirectories()
+{
+ static QStringList dirs;
+ if (dirs.empty()) {
+ CPFW_LOG("ControlPanel configuration file derectories:");
+ dirs = directoriesFromAllDrives(CP_PLUGIN_CONFIG_PATH);
+ }
+ return dirs;
+}
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/cpcategorymodel/src/cputility.h Fri Mar 19 09:29:29 2010 +0200
@@ -0,0 +1,60 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0""
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+#ifndef CP_UTILITY_H
+#define CP_UTILITY_H
+
+#include <QString>
+
+class HbDataFormModelItem;
+class CpItemDataHelper;
+
+class CpUtility
+{
+public:
+ /*
+ load all controlpanel plugins from configuration file,
+ and create model items form the loaded plugins
+ and append model items to given parent
+ */
+ static void buildConfigPluginItems(HbDataFormModelItem *parent,
+ const QString &configFile,
+ CpItemDataHelper &itemDataHelper);
+
+ /*
+ get all physical drives of the devices
+ */
+ static QStringList drives();
+
+ /*
+ get all controlpanel plugin directories of the device
+ */
+ static QStringList pluginDirectories();
+
+ /*
+ get all application plugin directories of the device
+ */
+ static QStringList applicationPluginDirectories();
+
+ /*
+ get all config directories of the device
+ */
+ static QStringList configFileDirectories();
+
+
+};
+
+#endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/cpplugins/accountsplugin/accountsplugin.pri Fri Mar 19 09:29:29 2010 +0200
@@ -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: controlpanel project - common qmake settings
+#
+
+HEADERS += src/cpaccountsgroup.h \
+ src/cpaccountsplugin.h
+SOURCES += src/cpaccountsgroup.cpp \
+ src/cpaccountsplugin.cpp
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/cpplugins/accountsplugin/accountsplugin.pro Fri Mar 19 09:29:29 2010 +0200
@@ -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:
+#
+
+TEMPLATE = lib
+TARGET = cpaccountsplugin
+
+CONFIG += hb plugin
+
+
+include ( ../cpplugincommon.pri )
+include ( accountsplugin.pri )
+
+symbian {
+ TARGET.UID3 = 0x2feed8de
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/cpplugins/accountsplugin/src/cpaccountsgroup.cpp Fri Mar 19 09:29:29 2010 +0200
@@ -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 "cpaccountsgroup.h"
+#include <cpsettingformitemdata.h>
+#include <cpitemdatahelper.h>
+
+CpAccountsGroup::CpAccountsGroup(CpItemDataHelper &itemDataHelper) :
+ CpSettingFormItemData(HbDataFormModelItem::GroupItem,QString("Accounts"))
+{
+ Q_UNUSED(itemDataHelper);
+ // Initializing the data form item of accounts group here
+ // You can use CpItemDataHelper for adding connection or adding new proto type
+ // For more detail information, please refer to controlpanel's wiki
+}
+CpAccountsGroup::~CpAccountsGroup()
+{
+ // release resource when necessary
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/cpplugins/accountsplugin/src/cpaccountsgroup.h Fri Mar 19 09:29:29 2010 +0200
@@ -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:
+ *
+ */
+#ifndef CPACCOUNTSGROUP_H
+#define CPACCOUNTSGROUP_H
+
+#include <cpsettingformitemdata.h>
+
+class CpSettingFormItemData;
+class CpItemDataHelper;
+
+class CpAccountsGroup : public CpSettingFormItemData
+{
+ Q_OBJECT
+public:
+ explicit CpAccountsGroup(CpItemDataHelper &itemDataHelper);
+ ~CpAccountsGroup();
+};
+
+#endif // CPACCOUNTSGROUP_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/cpplugins/accountsplugin/src/cpaccountsplugin.cpp Fri Mar 19 09:29:29 2010 +0200
@@ -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:
+ *
+ */
+#include "cpaccountsplugin.h"
+#include "cpaccountsgroup.h"
+
+CpAccountsPlugin::CpAccountsPlugin()
+{
+}
+
+CpAccountsPlugin::~CpAccountsPlugin()
+{
+}
+
+QList<CpSettingFormItemData*> CpAccountsPlugin::createSettingFormItemData(CpItemDataHelper &itemDataHelper) const
+{
+ return QList<CpSettingFormItemData*>() << new CpAccountsGroup(itemDataHelper);
+}
+
+Q_EXPORT_PLUGIN2(cpaccountsplugin, CpAccountsPlugin);
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/cpplugins/accountsplugin/src/cpaccountsplugin.h Fri Mar 19 09:29:29 2010 +0200
@@ -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:
+ *
+ */
+#ifndef CPACCOUNTSPLUGIN_H
+#define CPACCOUNTSPLUGIN_H
+
+#include <qobject.h>
+#include <cpplugininterface.h>
+
+class CpAccountsPlugin : public QObject, public CpPluginInterface
+{
+ Q_OBJECT
+ Q_INTERFACES(CpPluginInterface)
+public:
+ CpAccountsPlugin();
+ ~CpAccountsPlugin();
+ virtual QList<CpSettingFormItemData*> createSettingFormItemData(CpItemDataHelper &itemDataHelper) const;
+};
+#endif // CPACCOUNTSPLUGIN_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/cpplugins/applicationsettingsplugin/applicationsettingsplugin.pri Fri Mar 19 09:29:29 2010 +0200
@@ -0,0 +1,22 @@
+
+#
+# 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: cpapplicationsettingsplugin source files
+#
+
+# Input
+HEADERS += src/cpapplicationsettingsplugin.h \
+ src/cpapplicationsettingsitemdata.h
+SOURCES += src/cpapplicationsettingsplugin.cpp \
+ src/cpapplicationsettingsitemdata.cpp
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/cpplugins/applicationsettingsplugin/applicationsettingsplugin.pro Fri Mar 19 09:29:29 2010 +0200
@@ -0,0 +1,38 @@
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+#
+
+
+TEMPLATE = lib
+TARGET = cpapplicationsettingsplugin
+
+CONFIG += hb plugin
+
+include ( ../cpplugincommon.pri )
+include ( applicationsettingsplugin.pri )
+
+symbian {
+ TARGET.UID3 = 0x20025FDC
+}
+
+symbian {
+ deploy.path = C:
+ headers.sources = data/cpapplicationsettingsplugin.cpcfg
+ headers.path = /resource/qt/plugins/controlpanel/config
+ DEPLOYMENT += exportheaders
+
+ # This is for new exporting system coming in garden
+ for(header, headers.sources):BLD_INF_RULES.prj_exports += "./$$header $$deploy.path$$headers.path/$$basename(header)"
+}
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/cpplugins/applicationsettingsplugin/data/cpapplicationsettingsplugin.cpcfg Fri Mar 19 09:29:29 2010 +0200
@@ -0,0 +1,21 @@
+
+<childplugins>
+ <plugin displayname = "Messaging" id = "0x2001FE74" dll = "msgsettingsplugin.dll">
+ <desc>Message settings</desc>
+ </plugin>
+ <plugin displayname = "Calendar" id = "0x2002B338" dll = "calensettingsplugin.dll">
+ <desc></desc>
+ </plugin>
+ <plugin displayname = Mail" id = "0x2002BCF6" dll = "nmsettingsplugin.dll">
+ <desc></desc>
+ </plugin>
+
+ <plugin displayname = "Application 1" id = "0X20025FE8" dll = "cpplaceholderplugin.dll">
+ <desc></desc>
+ </plugin>
+
+ <plugin displayname = "3rd party application settings" id = "0xEef7e3ec" dll = "cp3rdpartyappsettingsplugin.dll">
+ <desc></desc>
+ </plugin>
+
+</childplugins>
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/cpplugins/applicationsettingsplugin/src/cpapplicationsettingsitemdata.cpp Fri Mar 19 09:29:29 2010 +0200
@@ -0,0 +1,79 @@
+/*
+ * 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 "cpapplicationsettingsitemdata.h"
+#include <QString>
+#include <QtAlgorithms>
+//#include <cppluginloader.h>
+#include <cpplugininterface.h>
+#include <cpsettingformentryitemdata.h>
+
+CpApplicationSettingsItemData::CpApplicationSettingsItemData()
+: CpCategorySettingFormItemData(HbDataFormModelItem::GroupItem,
+ tr("Application Settings"),
+ QString("cpapplicationsettingsplugin.cpcfg"))
+{
+}
+
+CpApplicationSettingsItemData::~CpApplicationSettingsItemData()
+{
+}
+
+/*
+struct ItemDataNameLessThan
+{
+ bool operator() (CpSettingFormItemData *left,CpSettingFormItemData *right) const {
+ QString leftName;
+ if (CpSettingFormEntryItemData *leftEntry = qobject_cast<CpSettingFormEntryItemData*>(left)) {
+ leftName = leftEntry->text();
+ }
+ else {
+ leftName = left->label();
+ }
+
+ QString rightName;
+ if (CpSettingFormEntryItemData *rightEntry = qobject_cast<CpSettingFormEntryItemData*>(right)) {
+ rightName = rightEntry->text();
+ }
+ else {
+ rightName = right->label();
+ }
+
+ return leftName.compare(rightName,Qt::CaseInsensitive) < 0;
+ }
+};
+*/
+
+void CpApplicationSettingsItemData::afterLoadingConfigPlugins(CpItemDataHelper &/*itemDataHelper*/)
+{
+ /*
+ QList<CpSettingFormItemData*> allItemData;
+
+ QList<CpPluginInterface*> appplugins = CpPluginLoader::loadApplicationCpPlugins();
+ foreach (CpPluginInterface *plugin, appplugins) {
+ allItemData += plugin->createSettingFormItemData(itemDataHelper);
+ }
+
+ //sort by name
+ qSort(allItemData.begin(),allItemData.end(),ItemDataNameLessThan());
+
+ foreach(CpSettingFormItemData *itemData,allItemData) {
+ appendChild(itemData);
+ }
+ */
+}
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/cpplugins/applicationsettingsplugin/src/cpapplicationsettingsitemdata.h Fri Mar 19 09:29:29 2010 +0200
@@ -0,0 +1,35 @@
+/*
+ * 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 CPAPPLICATIONSETTINGSITEMDATA_H
+#define CPAPPLICATIONSETTINGSITEMDATA_H
+
+#include <cpcategorysettingformitemdata.h>
+
+class CpApplicationSettingsItemData : public CpCategorySettingFormItemData
+{
+ Q_OBJECT
+public:
+ CpApplicationSettingsItemData();
+ virtual ~CpApplicationSettingsItemData();
+private:
+ virtual void afterLoadingConfigPlugins(CpItemDataHelper &itemDataHelper);
+};
+
+#endif //CPAPPLICATIONSETTINGSITEMDATA_H
+
+//End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/cpplugins/applicationsettingsplugin/src/cpapplicationsettingsplugin.cpp Fri Mar 19 09:29:29 2010 +0200
@@ -0,0 +1,35 @@
+/*
+ * 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 "cpapplicationsettingsplugin.h"
+#include "cpapplicationsettingsitemdata.h"
+
+CpApplicationSettingsPlugin::CpApplicationSettingsPlugin()
+{
+}
+
+CpApplicationSettingsPlugin::~CpApplicationSettingsPlugin()
+{
+}
+
+
+QList<CpSettingFormItemData*> CpApplicationSettingsPlugin::createSettingFormItemData(CpItemDataHelper &/*itemDataHelper*/) const
+{
+ return QList<CpSettingFormItemData*>() << new CpApplicationSettingsItemData();
+}
+
+Q_EXPORT_PLUGIN2(cpapplicationsettingsplugin, CpApplicationSettingsPlugin);
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/cpplugins/applicationsettingsplugin/src/cpapplicationsettingsplugin.h Fri Mar 19 09:29:29 2010 +0200
@@ -0,0 +1,35 @@
+/*
+ * 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 CPAPPLICATIONSETTINGSPLUGIN_H
+#define CPAPPLICATIONSETTINGSPLUGIN_H
+
+#include <qobject.h>
+#include <cpplugininterface.h>
+
+class CpApplicationSettingsPlugin
+ : public QObject, public CpPluginInterface
+{
+ Q_OBJECT
+ Q_INTERFACES(CpPluginInterface)
+public:
+ CpApplicationSettingsPlugin();
+ virtual ~CpApplicationSettingsPlugin();
+ virtual QList<CpSettingFormItemData*> createSettingFormItemData(CpItemDataHelper &itemDataHelper) const;
+};
+
+#endif /* CPAPPLICATIONSETTINGSPLUGIN_H */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/cpplugins/communicationplugin/communicationplugin.pri Fri Mar 19 09:29:29 2010 +0200
@@ -0,0 +1,22 @@
+#
+# 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: cpcommunicationplugin source files
+#
+
+# Input
+HEADERS += src/cpcommunicationplugin.h \
+ src/cpcommunicationgroupitemdata.h
+
+SOURCES += src/cpcommunicationplugin.cpp \
+ src/cpcommunicationgroupitemdata.cpp
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/cpplugins/communicationplugin/communicationplugin.pro Fri Mar 19 09:29:29 2010 +0200
@@ -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:
+#
+
+TEMPLATE = lib
+TARGET = cpcommunicationplugin
+
+CONFIG += hb plugin
+
+
+
+include ( ../cpplugincommon.pri )
+include ( communicationplugin.pri )
+
+symbian {
+ TARGET.UID3 = 0x20025FDF
+}
+
+symbian {
+ deploy.path = C:
+ headers.sources = data/cpcommunicationplugin.cpcfg
+ headers.path = /resource/qt/plugins/controlpanel/config
+ DEPLOYMENT += exportheaders
+
+ # This is for new exporting system coming in garden
+ for(header, headers.sources):BLD_INF_RULES.prj_exports += "./$$header $$deploy.path$$headers.path/$$basename(header)"
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/cpplugins/communicationplugin/data/cpcommunicationplugin.cpcfg Fri Mar 19 09:29:29 2010 +0200
@@ -0,0 +1,19 @@
+
+
+<childplugins>
+ <plugin displayname = "Mobile Network" id = "0X20029F24" dll = "cpnetworkplugin.dll">
+ <desc>Operator, status</desc>
+ </plugin>
+ <plugin displayname = "WLAN" id = "0x2002BCE0" dll = "cpwlanentryplugin.dll">
+ <desc>WLAN status</desc>
+ </plugin>
+ <plugin displayname = "Bluetooth" id = "0X20025FE8" dll = "cpplaceholderplugin.dll">
+ <desc>Status text</desc>
+ </plugin>
+ <plugin displayname = "Telephony" id = "0X20029F23" dll = "cptelephonyplugin.dll">
+ <desc></desc>
+ </plugin>
+ <plugin displayname = "Network settings" id = "0X2002BC8F" dll = "cpipsettingsplugin.dll">
+ <desc></desc>
+ </plugin>
+</childplugins>
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/cpplugins/communicationplugin/src/cpcommunicationgroupitemdata.cpp Fri Mar 19 09:29:29 2010 +0200
@@ -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:
+ *
+ */
+#include "cpcommunicationgroupitemdata.h"
+#include <QStringList>
+
+CpCommunicationGroupItemData::CpCommunicationGroupItemData(const QString &configFile,
+ const HbDataFormModelItem *parent):
+CpCategorySettingFormItemData(configFile,parent)
+{
+
+}
+
+CpCommunicationGroupItemData::CpCommunicationGroupItemData(HbDataFormModelItem::DataItemType type,
+ const QString &label,
+ const QString &configFile,
+ const HbDataFormModelItem *parent):
+CpCategorySettingFormItemData(type, label, configFile, parent)
+{
+
+}
+CpCommunicationGroupItemData::~CpCommunicationGroupItemData()
+{
+
+}
+void CpCommunicationGroupItemData::beforeLoadingConfigPlugins(CpItemDataHelper &/*itemDataHelper*/)
+{
+ HbDataFormModelItem *airPlaneMode = new HbDataFormModelItem(HbDataFormModelItem::ToggleValueItem,
+ QString("Airplane Mode"));
+ QStringList airModeList;
+ airModeList << QObject::tr("On") << QObject::tr("Off");
+
+ airPlaneMode->setContentWidgetData("text",airModeList.at(1));
+ airPlaneMode->setContentWidgetData("additionalText",airModeList.at(0));
+
+ this->appendChild(airPlaneMode);
+
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/cpplugins/communicationplugin/src/cpcommunicationgroupitemdata.h Fri Mar 19 09:29:29 2010 +0200
@@ -0,0 +1,37 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0""
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:
+ *
+ */
+#ifndef CPCOMMUNICATIONGROUPITEMDATA_H
+#define CPCOMMUNICATIONGROUPITEMDATA_H
+
+#include <cpcategorysettingformitemdata.h>
+class CpItemDataHelper;
+class CpCommunicationGroupItemData: public CpCategorySettingFormItemData
+{
+public:
+ explicit CpCommunicationGroupItemData(const QString &configFile = QString(),
+ const HbDataFormModelItem *parent = 0);
+
+ CpCommunicationGroupItemData(HbDataFormModelItem::DataItemType type,
+ const QString &label,
+ const QString &configFile = QString(),
+ const HbDataFormModelItem *parent = 0);
+
+ ~CpCommunicationGroupItemData();
+private:
+ virtual void beforeLoadingConfigPlugins(CpItemDataHelper &itemDataHelper);
+};
+#endif /* CPCOMMUNICATIONGROUPITEMDATA_H */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/cpplugins/communicationplugin/src/cpcommunicationplugin.cpp Fri Mar 19 09:29:29 2010 +0200
@@ -0,0 +1,40 @@
+/*
+ * 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 "cpcommunicationplugin.h"
+#include "cpcommunicationgroupitemdata.h"
+#include <cpitemdatahelper.h>
+
+CpCommunicationPlugin::CpCommunicationPlugin()
+{
+}
+
+CpCommunicationPlugin::~CpCommunicationPlugin()
+{
+}
+
+QList<CpSettingFormItemData*> CpCommunicationPlugin::createSettingFormItemData(CpItemDataHelper &/*itemDataHelper*/) const
+{
+ CpCategorySettingFormItemData *itemData =
+ new CpCommunicationGroupItemData(
+ HbDataFormModelItem::GroupItem,
+ QString("Connectivity"),
+ QString("cpcommunicationplugin.cpcfg") );
+ return QList<CpSettingFormItemData*>() << itemData;
+}
+
+Q_EXPORT_PLUGIN2(cpcommunicationplugin, CpCommunicationPlugin);
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/cpplugins/communicationplugin/src/cpcommunicationplugin.h Fri Mar 19 09:29:29 2010 +0200
@@ -0,0 +1,37 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0""
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:
+ *
+ */
+
+#ifndef CPCOMMUNICATIONPLUGIN_H
+#define CPCOMMUNICATIONPLUGIN_H
+
+
+#include <qobject.h>
+#include <cpplugininterface.h>
+
+class CpCommunicationPlugin
+ : public QObject, public CpPluginInterface
+{
+ Q_OBJECT
+ Q_INTERFACES(CpPluginInterface)
+public:
+ CpCommunicationPlugin();
+ virtual ~CpCommunicationPlugin();
+ virtual QList<CpSettingFormItemData*> createSettingFormItemData(CpItemDataHelper &itemDataHelper) const;
+};
+
+
+#endif /* CPCOMMUNICATIONPLUGIN_H */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/cpplugins/cpplugincommon.pri Fri Mar 19 09:29:29 2010 +0200
@@ -0,0 +1,34 @@
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description: controlpanel plugin project qmake common settings
+#
+include (../common.pri)
+
+
+LIBS += -lcpframework -lcpcategorymodel
+
+symbian: plugin { # copy qtstub and manifest
+
+ PLUGIN_STUB_PATH = /resource/qt/plugins/controlpanel
+
+ deploy.path = C:
+ pluginstub.sources = $${TARGET}.dll
+ pluginstub.path = $$PLUGIN_STUB_PATH
+ DEPLOYMENT += pluginstub
+
+ qtplugins.path = $$PLUGIN_STUB_PATH
+ qtplugins.sources += qmakepluginstubs/$${TARGET}.qtplugin
+
+ for(qtplugin, qtplugins.sources):BLD_INF_RULES.prj_exports += "./$$qtplugin $$deploy.path$$qtplugins.path/$$basename(qtplugin)"
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/cpplugins/cpplugins.pro Fri Mar 19 09:29:29 2010 +0200
@@ -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:
+#
+
+TEMPLATE = subdirs
+SUBDIRS = communicationplugin \
+ placeholderplugin \
+ deviceplugin \
+ privacyplugin \
+ personalizationplugin \
+ applicationsettingsplugin \
+ lookfeelplugin \
+ placeholdernoiconplugin \
+ displayplugin \
+ keytouchfdbkplugin \
+ pincodeplugin \
+ devicelockplugin \
+ accountsplugin
+
+CONFIG += ordered
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/cpplugins/devicelockplugin/devicelockplugin.pri Fri Mar 19 09:29:29 2010 +0200
@@ -0,0 +1,19 @@
+#
+# 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: cpdevicelockplugin source files
+#
+
+# Input
+HEADERS += src/*.h
+SOURCES += src/*.cpp
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/cpplugins/devicelockplugin/devicelockplugin.pro Fri Mar 19 09:29:29 2010 +0200
@@ -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:
+#
+
+TEMPLATE = lib
+TARGET = cpdevicelockplugin
+
+CONFIG += hb plugin
+
+
+include ( ../cpplugincommon.pri )
+include ( devicelockplugin.pri )
+
+symbian {
+ TARGET.UID3 = 0X20028732
+}
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/cpplugins/devicelockplugin/src/cpdevicelockplugin.cpp Fri Mar 19 09:29:29 2010 +0200
@@ -0,0 +1,35 @@
+/*
+ * 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 "cpdevicelockplugin.h"
+#include "cpdevicelockpluginview.h"
+#include <cpsettingformentryitemdataimpl.h>
+
+CpDeviceLockPlugin::CpDeviceLockPlugin()
+{
+}
+
+CpDeviceLockPlugin::~CpDeviceLockPlugin()
+{
+}
+
+QList<CpSettingFormItemData*> CpDeviceLockPlugin::createSettingFormItemData(CpItemDataHelper &itemDataHelper) const
+{
+ return QList<CpSettingFormItemData*>()
+ << new CpSettingFormEntryItemDataImpl<CpDeviceLockPluginView>(itemDataHelper,tr("Device lock"), QString());
+}
+
+Q_EXPORT_PLUGIN2(cpdevicelockplugin, CpDeviceLockPlugin);
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/cpplugins/devicelockplugin/src/cpdevicelockplugin.h Fri Mar 19 09:29:29 2010 +0200
@@ -0,0 +1,34 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0""
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:
+ *
+ */
+
+#ifndef CPDEVICELOCKPLUGIN_H
+#define CPDEVICELOCKPLUGIN_H
+
+#include <QObject>
+#include <cpplugininterface.h>
+
+class CpDeviceLockPlugin : public QObject, public CpPluginInterface
+{
+ Q_OBJECT
+ Q_INTERFACES(CpPluginInterface)
+public:
+ CpDeviceLockPlugin();
+ virtual ~CpDeviceLockPlugin();
+ virtual QList<CpSettingFormItemData*> createSettingFormItemData(CpItemDataHelper &itemDataHelper) const;
+};
+
+#endif //CPDEVICELOCKPLUGIN_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/cpplugins/devicelockplugin/src/cpdevicelockpluginview.cpp Fri Mar 19 09:29:29 2010 +0200
@@ -0,0 +1,82 @@
+/*
+ * 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 "cpdevicelockpluginview.h"
+#include <QStringList>
+#include <hblineedit.h>
+#include <hbdataform.h>
+#include <hbdataformmodel.h>
+#include <hbdataformmodelitem.h>
+#include "cpremotelockdataformviewitem.h"
+
+CpDeviceLockPluginView::CpDeviceLockPluginView(QGraphicsItem *parent /*= 0*/)
+: CpBaseSettingView(0,parent)
+{
+ if (HbDataForm *form = settingForm()) {
+
+ QList<HbAbstractViewItem *> protoTypeList = form->itemPrototypes();
+ protoTypeList.append(new CpRemoteLockDataFormViewItem());
+ form->setItemPrototypes(protoTypeList);
+
+ HbDataFormModel *formModel = new HbDataFormModel();
+
+ form->setHeading(tr("Device lock"));
+
+ HbDataFormModelItem *deviceLockItem = new HbDataFormModelItem(
+ HbDataFormModelItem::ToggleValueItem,tr("Device lock"));
+
+ deviceLockItem->setContentWidgetData("text",tr("On"));
+ deviceLockItem->setContentWidgetData("additionalText",tr("Off"));
+
+ formModel->appendDataFormItem(deviceLockItem);
+
+ HbDataFormModelItem *lockCodeItem = new HbDataFormModelItem(
+ HbDataFormModelItem::TextItem,tr("Lock code"));
+ lockCodeItem->setContentWidgetData("echoMode",HbLineEdit::Password);
+ lockCodeItem->setContentWidgetData("text","1111");
+ lockCodeItem->setContentWidgetData("readOnly",true);
+
+ formModel->appendDataFormItem(lockCodeItem);
+
+ HbDataFormModelItem *deviceLockAfterItem = new HbDataFormModelItem(
+ HbDataFormModelItem::RadioButtonListItem,tr("Device will be locked automatically after:"));
+
+ QStringList items;
+ items << tr("15 minutes") << tr("30 minutes") << tr("1 hour") << tr("4 hours") ;
+ deviceLockAfterItem->setContentWidgetData("items",items);
+ deviceLockAfterItem->setContentWidgetData("selected",0);
+
+ formModel->appendDataFormItem(deviceLockAfterItem);
+
+ HbDataFormModelItem *remoteLockItem = new HbDataFormModelItem(
+ static_cast<HbDataFormModelItem::DataItemType>(CpRemoteLockDataFormViewItem::CpRemoteLockItem),
+ tr("Remote locking"));
+ remoteLockItem->setContentWidgetData("plainText",
+ tr("Device can be locked remotely by sending lock code to the device as SMS."));
+ remoteLockItem->setContentWidgetData("TextWrapping",Hb::TextWordWrap);
+
+ formModel->appendDataFormItem(remoteLockItem);
+
+ form->setModel(formModel);
+ }
+}
+
+CpDeviceLockPluginView::~CpDeviceLockPluginView()
+{
+}
+
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/cpplugins/devicelockplugin/src/cpdevicelockpluginview.h Fri Mar 19 09:29:29 2010 +0200
@@ -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:
+ *
+ */
+#ifndef CPDEVICELOCKPLUGINVIEW_H
+#define CPDEVICELOCKPLUGINVIEW_H
+
+#include <cpbasesettingview.h>
+
+class CpDeviceLockPluginView : public CpBaseSettingView
+{
+ Q_OBJECT
+public:
+ explicit CpDeviceLockPluginView(QGraphicsItem *parent = 0);
+ virtual ~CpDeviceLockPluginView();
+};
+
+
+#endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/cpplugins/devicelockplugin/src/cpremotelockdataformviewitem.cpp Fri Mar 19 09:29:29 2010 +0200
@@ -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:
+ *
+ */
+#include "cpremotelockdataformviewitem.h"
+#include <hblabel.h>
+
+CpRemoteLockDataFormViewItem::CpRemoteLockDataFormViewItem(QGraphicsItem *parent )
+: HbDataFormViewItem(parent)
+{
+}
+
+CpRemoteLockDataFormViewItem::~CpRemoteLockDataFormViewItem()
+{
+}
+
+HbAbstractViewItem* CpRemoteLockDataFormViewItem::createItem()
+{
+ return new CpRemoteLockDataFormViewItem(*this);
+}
+
+bool CpRemoteLockDataFormViewItem::canSetModelIndex(const QModelIndex &index) const
+{
+ int type = index.data(HbDataFormModelItem::ItemTypeRole).toInt();
+ return type == CpRemoteLockItem;
+}
+
+HbWidget *CpRemoteLockDataFormViewItem::createCustomWidget()
+{
+ int type = modelIndex().data(HbDataFormModelItem::ItemTypeRole).toInt();
+
+ if (type == CpRemoteLockItem) {
+ HbLabel *label = new HbLabel("Device can be locked remotely by sending lock code to the device as SMS.");
+ label->setElideMode (Qt::ElideNone );
+ label->setTextWrapping(Hb::TextWordWrap);
+ return label;
+ }
+
+ return 0;
+}
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/cpplugins/devicelockplugin/src/cpremotelockdataformviewitem.h Fri Mar 19 09:29:29 2010 +0200
@@ -0,0 +1,40 @@
+/*
+ * 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 CPREMOTELOCKDATAFORMVIEWITEM_H
+#define CPREMOTELOCKDATAFORMVIEWITEM_H
+
+#include <hbdataformviewitem.h>
+#include <hbdataformmodelitem.h>
+
+class CpRemoteLockDataFormViewItem : public HbDataFormViewItem
+{
+ Q_OBJECT
+public:
+ enum { CpRemoteLockItem = HbDataFormModelItem::CustomItemBase + 10 };
+
+ explicit CpRemoteLockDataFormViewItem(QGraphicsItem *parent = 0);
+ virtual ~CpRemoteLockDataFormViewItem();
+ virtual HbAbstractViewItem* createItem();
+ virtual bool canSetModelIndex(const QModelIndex &index) const;
+protected:
+ virtual HbWidget* createCustomWidget();
+};
+
+#endif //CPREMOTELOCKDATAFORMVIEWITEM_H
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/cpplugins/deviceplugin/data/cpdeviceplugin.cpcfg Fri Mar 19 09:29:29 2010 +0200
@@ -0,0 +1,24 @@
+
+<childplugins>
+ <plugin displayname = "Time & data" id = "0X102818E9" dll = "datetimesettingsplugin.dll">
+ <desc></desc>
+ </plugin>
+ <plugin displayname = "Language" id = "0X20025FDD" dll = "cpplaceholdernoiconplugin.dll">
+ <desc></desc>
+ </plugin>
+ <plugin displayname = "Text and keyboard" id = "0X20025FDD" dll = "cpplaceholdernoiconplugin.dll">
+ <desc></desc>
+ </plugin>
+ <plugin displayname = "Voice commands" id = "0X20025FDD" dll = "cpplaceholdernoiconplugin.dll">
+ <desc></desc>
+ </plugin>
+ <plugin displayname = "Device updates" id = "0X20025FDD" dll = "cpplaceholdernoiconplugin.dll">
+ <desc></desc>
+ </plugin>
+ <plugin displayname = "Reset" id = "0X20025FDD" dll = "cpplaceholdernoiconplugin.dll">
+ <desc></desc>
+ </plugin>
+ <plugin displayname = "About" id = "0X20025FDD" dll = "cpplaceholdernoiconplugin.dll">
+ <desc></desc>
+ </plugin>
+</childplugins>
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/cpplugins/deviceplugin/deviceplugin.pri Fri Mar 19 09:29:29 2010 +0200
@@ -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: cpdeviceplugin source files
+#
+
+
+# Input
+HEADERS += src/cpdeviceplugin.h
+SOURCES += src/cpdeviceplugin.cpp
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/cpplugins/deviceplugin/deviceplugin.pro Fri Mar 19 09:29:29 2010 +0200
@@ -0,0 +1,38 @@
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+#
+
+TEMPLATE = lib
+TARGET = cpdeviceplugin
+
+CONFIG += hb plugin
+
+
+include ( ../cpplugincommon.pri )
+include ( deviceplugin.pri )
+
+symbian {
+ TARGET.UID3 = 0X20025FE7
+}
+
+symbian {
+ deploy.path = C:
+ headers.sources = data/cpdeviceplugin.cpcfg
+ headers.path = /resource/qt/plugins/controlpanel/config
+ DEPLOYMENT += exportheaders
+
+ # This is for new exporting system coming in garden
+ for(header, headers.sources):BLD_INF_RULES.prj_exports += "./$$header $$deploy.path$$headers.path/$$basename(header)"
+}
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/cpplugins/deviceplugin/src/cpdeviceplugin.cpp Fri Mar 19 09:29:29 2010 +0200
@@ -0,0 +1,40 @@
+/*
+ * 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 "cpdeviceplugin.h"
+#include "cpcategorysettingformitemdata.h"
+#include <cpitemdatahelper.h>
+
+CpDevicePlugin::CpDevicePlugin()
+{
+}
+
+CpDevicePlugin::~CpDevicePlugin()
+{
+}
+
+QList<CpSettingFormItemData*> CpDevicePlugin::createSettingFormItemData(CpItemDataHelper &/*itemDataHelper*/) const
+{
+ CpCategorySettingFormItemData *itemData =
+ new CpCategorySettingFormItemData(
+ HbDataFormModelItem::GroupItem,
+ tr("Device"),
+ QString("cpdeviceplugin.cpcfg") );
+ return QList<CpSettingFormItemData*>() << itemData;
+}
+
+Q_EXPORT_PLUGIN2(cpdeviceplugin, CpDevicePlugin);
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/cpplugins/deviceplugin/src/cpdeviceplugin.h Fri Mar 19 09:29:29 2010 +0200
@@ -0,0 +1,37 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0""
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:
+ *
+ */
+
+#ifndef CPDEVICEPLUGIN_H
+#define CPDEVICEPLUGIN_H
+
+
+#include <qobject.h>
+#include <cpplugininterface.h>
+
+class CpDevicePlugin : public QObject,
+ public CpPluginInterface
+{
+ Q_OBJECT
+ Q_INTERFACES(CpPluginInterface)
+public:
+ CpDevicePlugin();
+ virtual ~CpDevicePlugin();
+ virtual QList<CpSettingFormItemData*> createSettingFormItemData(CpItemDataHelper &itemDataHelper) const;
+};
+
+
+#endif /* CPDEVICEPLUGIN_H */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/cpplugins/displayplugin/displayplugin.pri Fri Mar 19 09:29:29 2010 +0200
@@ -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: display plugin source files
+#
+
+# Input
+HEADERS += src/cpdisplayplugin.h \
+ src/cpdisplayview.h \
+ src/cpdisplaymodel.h
+
+SOURCES += src/cpdisplayplugin.cpp \
+ src/cpdisplayview.cpp \
+ src/cpdisplaymodel.cpp
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/cpplugins/displayplugin/displayplugin.pro Fri Mar 19 09:29:29 2010 +0200
@@ -0,0 +1,37 @@
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+#
+
+TEMPLATE = lib
+TARGET = cpdisplayplugin
+
+CONFIG += hb plugin
+
+
+include ( ../cpplugincommon.pri )
+include ( displayplugin.pri )
+
+symbian {
+ INCLUDEPATH += $$MW_LAYER_SYSTEMINCLUDE \
+ $$MOC_DIR
+ HEADERS += src/cpdisplaymodel_p.h
+ SOURCES += src/cpdisplaymodel_p.cpp
+
+ LIBS += -lcentralrepository \
+ -lfeatmgr
+ TARGET.UID3 = 0X20028735
+ TARGET.CAPABILITY = All -TCB
+ TARGET.EPOCALLOWDLLDATA = 1
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/cpplugins/displayplugin/src/cpdisplaymodel.cpp Fri Mar 19 09:29:29 2010 +0200
@@ -0,0 +1,121 @@
+/*
+ * 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 <qglobal.h>
+#include "cpdisplaymodel.h"
+
+#ifdef Q_OS_SYMBIAN
+#include "cpdisplaymodel_p.h"
+#endif
+
+CpDisplayModel::CpDisplayModel()
+{
+#ifdef Q_OS_SYMBIAN
+ ptr = new CpDisplayModelPrivate();
+#endif
+}
+
+CpDisplayModel::~CpDisplayModel()
+{
+#ifdef Q_OS_SYMBIAN
+ delete ptr;
+ ptr = 0;
+#endif
+}
+
+bool CpDisplayModel::isKeyguardSupported()
+{
+#ifdef Q_OS_SYMBIAN
+ return ptr->isKeyguardSupported();
+#else
+ return 0;
+#endif
+}
+
+int CpDisplayModel::keyguard()
+{
+#ifdef Q_OS_SYMBIAN
+ return ptr->keyguard();
+#else
+ return 0;
+#endif
+}
+
+void CpDisplayModel::setKeyguard(int value)
+{
+#ifdef Q_OS_SYMBIAN
+ ptr->setKeyguard(value);
+#else
+ Q_UNUSED(value);
+#endif
+}
+
+bool CpDisplayModel::isBacklightSupported()
+{
+#ifdef Q_OS_SYMBIAN
+ return ptr->isBacklightSupported();
+#else
+ return false;
+#endif
+}
+
+int CpDisplayModel::backlight()
+{
+#ifdef Q_OS_SYMBIAN
+ return ptr->backlight();
+#else
+ return 0;
+#endif
+}
+
+void CpDisplayModel::setBacklight(int value)
+{
+#ifdef Q_OS_SYMBIAN
+ ptr->setBacklight(value);
+#else
+ Q_UNUSED(value);
+#endif
+}
+
+bool CpDisplayModel::isBrightnessSupported()
+{
+#ifdef Q_OS_SYMBIAN
+ return ptr->isBrightnessSupported();
+#else
+ return false;
+#endif
+}
+
+int CpDisplayModel::brightness()
+{
+#ifdef Q_OS_SYMBIAN
+ return ptr->brightness();
+#else
+ return 0;
+#endif
+}
+
+void CpDisplayModel::setBrightness(int value)
+{
+#ifdef Q_OS_SYMBIAN
+ ptr->setBrightness(value);
+#else
+ Q_UNUSED(value);
+#endif
+}
+
+// End of the file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/cpplugins/displayplugin/src/cpdisplaymodel.h Fri Mar 19 09:29:29 2010 +0200
@@ -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:
+ *
+ */
+
+#ifndef CPDISPLAYMODEL_H
+#define CPDISPLAYMODEL_H
+
+class CpDisplayModelPrivate;
+
+class CpDisplayModel
+ {
+public:
+ CpDisplayModel();
+ ~CpDisplayModel();
+
+public:
+ bool isKeyguardSupported();
+ int keyguard();
+ void setKeyguard(int value);
+ bool isBacklightSupported();
+ int backlight();
+ void setBacklight(int value);
+ bool isBrightnessSupported();
+ int brightness();
+ void setBrightness(int value);
+
+private:
+ CpDisplayModelPrivate* ptr;
+ };
+
+#endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/cpplugins/displayplugin/src/cpdisplaymodel_p.cpp Fri Mar 19 09:29:29 2010 +0200
@@ -0,0 +1,105 @@
+/*
+ * 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 "cpdisplaymodel_p.h"
+#include <qglobal.h>
+#include <e32base.h>
+#include <hal.h>
+#include <centralrepository.h>
+#include <settingsinternalcrkeys.h> // KCRUidSecuritySettings
+#include <hwrmlightdomaincrkeys.h> // KCRUidLightSettings
+#include <featmgr.h>
+
+CpDisplayModelPrivate::CpDisplayModelPrivate()
+{
+ mLightCenRep = CRepository::NewL( KCRUidLightSettings );
+ mSecurityCenRep = CRepository::NewL( KCRUidSecuritySettings );
+}
+
+CpDisplayModelPrivate::~CpDisplayModelPrivate()
+{
+ delete mLightCenRep;
+ mLightCenRep = 0;
+
+ delete mSecurityCenRep;
+ mSecurityCenRep = 0;
+}
+
+bool CpDisplayModelPrivate::isKeyguardSupported()
+{
+ return true;
+}
+
+int CpDisplayModelPrivate::keyguard()
+{
+ int period = 0;
+
+ if ( mSecurityCenRep->
+ Get( KSettingsAutomaticKeyguardTime, period ) != KErrNone ){
+ period = 60;
+ mSecurityCenRep->Set( KSettingsAutomaticKeyguardTime, period );
+ }
+
+ return period/5;
+}
+
+void CpDisplayModelPrivate::setKeyguard(int value)
+{
+ value *= 5;
+ mSecurityCenRep->Set( KSettingsAutomaticKeyguardTime, value );
+}
+
+bool CpDisplayModelPrivate::isBacklightSupported()
+{
+ return true;
+}
+
+int CpDisplayModelPrivate::backlight()
+{
+ int time = 0;
+ mLightCenRep->Get( KDisplayLightsTimeout, time );
+ return time/5;
+}
+
+void CpDisplayModelPrivate::setBacklight(int value)
+{
+ value *=5;
+ mLightCenRep->Set( KDisplayLightsTimeout, value );
+}
+
+bool CpDisplayModelPrivate::isBrightnessSupported()
+{
+ if ( FeatureManager::FeatureSupported( KFeatureIdBrightnessControl ) ){
+ return true;
+ } else {
+ return false;
+ }
+}
+
+int CpDisplayModelPrivate::brightness()
+{
+ int time = 0;
+ mLightCenRep->Get( KLightIntensity, time );
+ return time;
+}
+
+void CpDisplayModelPrivate::setBrightness(int value)
+{
+ mLightCenRep->Set( KLightIntensity, value );
+}
+
+// End of the file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/cpplugins/displayplugin/src/cpdisplaymodel_p.h Fri Mar 19 09:29:29 2010 +0200
@@ -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:
+ *
+ */
+
+#ifndef CPDISPLAYMODEL_P_H
+#define CPDISPLAYMODEL_P_H
+
+class CRepository;
+
+class CpDisplayModelPrivate
+ {
+public:
+ CpDisplayModelPrivate();
+ ~CpDisplayModelPrivate();
+
+public:
+ int keyguard();
+ bool isKeyguardSupported();
+ void setKeyguard(int value);
+ bool isBacklightSupported();
+ int backlight();
+ void setBacklight(int value);
+ bool isBrightnessSupported();
+ int brightness();
+ void setBrightness(int value);
+
+private:
+ CRepository* mLightCenRep;
+ CRepository* mSecurityCenRep;
+ };
+
+#endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/cpplugins/displayplugin/src/cpdisplayplugin.cpp Fri Mar 19 09:29:29 2010 +0200
@@ -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:
+ *
+ */
+#include "cpdisplayplugin.h"
+#include "cpdisplayview.h"
+#include <cpsettingformentryitemdataimpl.h>
+
+CpDisplayPlugin::CpDisplayPlugin()
+{
+}
+
+CpDisplayPlugin::~CpDisplayPlugin()
+{
+}
+
+QList<CpSettingFormItemData*> CpDisplayPlugin::createSettingFormItemData(CpItemDataHelper &itemDataHelper) const
+{
+ CpSettingFormItemData* itemData = 0;
+ CpDisplayView* view = new CpDisplayView();
+ if ( view->isHidden() ){ // If there is no any items in the view, the view should be hidden.
+ itemData = 0;
+ } else {
+ itemData = new CpSettingFormEntryItemDataImpl<CpDisplayView>(
+ itemDataHelper,
+ tr("Display "),
+ "");
+ }
+ delete view;
+ return QList<CpSettingFormItemData*>() << itemData;
+}
+
+Q_EXPORT_PLUGIN2(cpdisplayplugin, CpDisplayPlugin);
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/cpplugins/displayplugin/src/cpdisplayplugin.h Fri Mar 19 09:29:29 2010 +0200
@@ -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:
+ *
+ */
+#ifndef CPDISPLAYPLUGIN_H
+#define CPDISPLAYPLUGIN_H
+
+#include <qobject.h>
+#include <cpplugininterface.h>
+
+class CpDisplayPlugin : public QObject, public CpPluginInterface
+{
+Q_OBJECT
+ Q_INTERFACES(CpPluginInterface)
+public:
+ CpDisplayPlugin();
+ virtual ~CpDisplayPlugin();
+ virtual QList<CpSettingFormItemData*> createSettingFormItemData(CpItemDataHelper &itemDataHelper) const;
+};
+
+#endif //CPDISPLAYPLUGIN_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/cpplugins/displayplugin/src/cpdisplayview.cpp Fri Mar 19 09:29:29 2010 +0200
@@ -0,0 +1,133 @@
+/*
+ * 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 "cpdisplayview.h"
+#include "cpdisplaymodel.h"
+#include <hbdataform.h>
+#include <qstringlist>
+#include <QDebug>
+#include <hbdataformmodel.h>
+#include <cpsettingformitemdata.h>
+#include <hbmessagebox.h>
+
+
+CpDisplayView::CpDisplayView(QGraphicsItem *parent) :
+ CpBaseSettingView(0,parent),
+ mScreenRadioButton(0),
+ mDisplayRadioButton(0),
+ mBrightSliderItem(0),
+ mModel(0)
+{
+ HbDataForm *form = settingForm();
+ if (form) {
+ form->setHeading(tr("Display"));
+ mModel = new CpDisplayModel();
+ HbDataFormModel *model = new HbDataFormModel;
+
+ bool screen = false;
+ bool backlight = false;
+ bool brightness = false;
+ if ( mModel->isKeyguardSupported() ) {
+ makeScreenItem(model);
+ screen = true;
+ }
+
+ if ( mModel->isBacklightSupported() ) {
+ makeBacklightItem(model);
+ backlight = true;
+ }
+
+ if ( mModel->isBrightnessSupported() ) {
+ makeBrightnessItem(model);
+ brightness = true;
+ }
+
+ if ( screen || backlight || brightness ){
+ mIsHidden = false;
+ } else {
+ mIsHidden = true;
+ }
+
+ settingForm()->setModel(model);
+ }
+}
+
+bool CpDisplayView::isHidden()
+{
+ return mIsHidden;
+}
+
+void CpDisplayView::makeScreenItem(HbDataFormModel* model)
+{
+ mScreenRadioButton = new CpSettingFormItemData(HbDataFormModelItem::RadioButtonListItem,
+ QString("Keys & screen locked after"));
+ settingForm()->addConnection(mScreenRadioButton,SIGNAL(itemSelected(int)),this,SLOT(ScreenValueChanged(int)));
+ model->appendDataFormItem(mScreenRadioButton, model->invisibleRootItem());
+
+ QStringList sList;
+ sList<< "0 seconds"<< "5 seconds"<< "10 seconds"<< "15 seconds"<< "20 seconds"<< "25 seconds";
+ mScreenRadioButton->setContentWidgetData( QString("items"), sList );
+ mScreenRadioButton->setContentWidgetData( QString("selected"), mModel->keyguard() );
+}
+
+void CpDisplayView::makeBacklightItem(HbDataFormModel* model)
+{
+ mDisplayRadioButton = new CpSettingFormItemData(HbDataFormModelItem::RadioButtonListItem,
+ QString("Display dimmed after"));
+ settingForm()->addConnection(mDisplayRadioButton,SIGNAL(itemSelected(int)),this,SLOT(DisplayValueChanged(int)));
+ model->appendDataFormItem(mDisplayRadioButton, model->invisibleRootItem());
+
+ QStringList sList;
+ sList<< "0 seconds"<< "5 seconds"<< "10 seconds"<< "15 seconds"<< "20 seconds"<< "25 seconds";
+ mDisplayRadioButton->setContentWidgetData( QString("items"), sList );
+ mDisplayRadioButton->setContentWidgetData( QString("selected"), mModel->backlight() );
+}
+
+void CpDisplayView::makeBrightnessItem(HbDataFormModel* model)
+{
+ mBrightSliderItem = new CpSettingFormItemData(HbDataFormModelItem::SliderItem,
+ QString("Brightness"));
+ settingForm()->addConnection(mBrightSliderItem,SIGNAL(valueChanged(int)),this,SLOT(BrightValueChanged(int)));
+ model->appendDataFormItem(mBrightSliderItem, model->invisibleRootItem());
+
+ mBrightSliderItem->setContentWidgetData( QString("value"), mModel->brightness() );
+ mBrightSliderItem->setContentWidgetData( QString("minimum"), 0 );
+ mBrightSliderItem->setContentWidgetData( QString("maximum"), 100 );
+}
+
+CpDisplayView::~CpDisplayView()
+{
+ delete mModel;
+ mModel = 0;
+}
+
+void CpDisplayView::ScreenValueChanged(int value)
+{
+ mModel->setKeyguard(value);
+}
+
+void CpDisplayView::DisplayValueChanged(int value)
+{
+ mModel->setBacklight(value);
+}
+
+void CpDisplayView::BrightValueChanged(int value)
+{
+ mModel->setBrightness(value);
+}
+
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/cpplugins/displayplugin/src/cpdisplayview.h Fri Mar 19 09:29:29 2010 +0200
@@ -0,0 +1,56 @@
+/*
+ * 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 CPDISPLAYVIEW_H
+#define CPDISPLAYVIEW_H
+
+#include <cpbasesettingview.h>
+
+class HbDataFormModelItem;
+class HbDataFormModel;
+class CpSettingFormItemData;
+class CpDisplayModel;
+
+class CpDisplayView : public CpBaseSettingView
+{
+ Q_OBJECT
+public:
+ explicit CpDisplayView(QGraphicsItem *parent = 0);
+ virtual ~CpDisplayView();
+
+private:
+ void makeScreenItem(HbDataFormModel* model);
+ void makeBacklightItem(HbDataFormModel* model);
+ void makeBrightnessItem(HbDataFormModel* model);
+
+public:
+ bool isHidden();
+
+private slots:
+ //need handling your member's value change
+ void ScreenValueChanged(int value);
+ void DisplayValueChanged(int value);
+ void BrightValueChanged(int value);
+
+private:
+ CpSettingFormItemData *mScreenRadioButton;
+ CpSettingFormItemData *mDisplayRadioButton;
+ CpSettingFormItemData *mBrightSliderItem;
+ CpDisplayModel* mModel;
+ bool mIsHidden;
+
+};
+#endif// CPDISPLAYVIEW_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/cpplugins/keytouchfdbkplugin/keytouchfdbkplugin.pri Fri Mar 19 09:29:29 2010 +0200
@@ -0,0 +1,19 @@
+#
+# 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: keytouchfeedback plugin source files
+#
+
+# Input
+HEADERS += src/*.h
+SOURCES += src/*.cpp
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/cpplugins/keytouchfdbkplugin/keytouchfdbkplugin.pro Fri Mar 19 09:29:29 2010 +0200
@@ -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 = lib
+TARGET = cpkeytouchfdbkplugin
+
+CONFIG += hb plugin
+
+LIBS += -lcpprofilewrapper
+
+include ( ../cpplugincommon.pri )
+include ( keytouchfdbkplugin.pri )
+
+symbian {
+ TARGET.UID3 = 0X20025FDE
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/cpplugins/keytouchfdbkplugin/src/cpkeytouchfdbkplugin.cpp Fri Mar 19 09:29:29 2010 +0200
@@ -0,0 +1,37 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0""
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:
+ *
+ */
+#include "cpkeytouchfdbkplugin.h"
+#include "cpktfdbkview.h"
+#include <cpsettingformentryitemdataimpl.h>
+
+CpKeytouchfdbkPlugin::CpKeytouchfdbkPlugin()
+{
+}
+
+CpKeytouchfdbkPlugin::~CpKeytouchfdbkPlugin()
+{
+}
+
+QList<CpSettingFormItemData*> CpKeytouchfdbkPlugin::createSettingFormItemData(CpItemDataHelper &itemDataHelper) const
+{
+ return QList<CpSettingFormItemData*>() << new CpSettingFormEntryItemDataImpl<CpKtfdbkView>(
+ itemDataHelper,
+ tr("Key & screen"),
+ "");
+}
+
+Q_EXPORT_PLUGIN2(cpkeytouchfdbkplugin, CpKeytouchfdbkPlugin);
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/cpplugins/keytouchfdbkplugin/src/cpkeytouchfdbkplugin.h Fri Mar 19 09:29:29 2010 +0200
@@ -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:
+ *
+ */
+#ifndef CPKEYTOUCHFDBKPLUGIN_H
+#define CPKEYTOUCHFDBKPLUGIN_H
+
+#include <qobject.h>
+#include <cpplugininterface.h>
+
+class CpKeytouchfdbkPlugin : public QObject, public CpPluginInterface
+{
+Q_OBJECT
+ Q_INTERFACES(CpPluginInterface)
+public:
+ CpKeytouchfdbkPlugin();
+ virtual ~CpKeytouchfdbkPlugin();
+ virtual QList<CpSettingFormItemData*> createSettingFormItemData(CpItemDataHelper &itemDataHelper) const;
+};
+
+#endif //CPKEYTOUCHFDBKPLUGIN
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/cpplugins/keytouchfdbkplugin/src/cpktfdbkview.cpp Fri Mar 19 09:29:29 2010 +0200
@@ -0,0 +1,99 @@
+/*
+ * 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 "cpktfdbkview.h"
+#include <hbdataform.h>
+#include <qstringlist>
+#include <QDebug>
+#include <hbdataformmodel.h>
+#include <cpsettingformitemdata.h>
+#include <hbmessagebox.h>
+#include <cpprofilemodel.h>
+
+
+CpKtfdbkView::CpKtfdbkView(QGraphicsItem *parent) :
+ CpBaseSettingView(0,parent),
+ mKTSliderItem(0),
+ mSTSliderItem(0),
+ mSVSliderItem(0),
+ mModel(0)
+
+{
+ HbDataForm *form = settingForm();
+ if (form) {
+ mModel = new CpProfileModel();
+ HbDataFormModel *model = new HbDataFormModel;
+
+ form->setHeading(tr("Key & touch screen feedback"));
+// Key tones slider
+ mKTSliderItem = new CpSettingFormItemData(HbDataFormModelItem::SliderItem,
+ QString("Key tones"));
+ form->addConnection(mKTSliderItem,SIGNAL(valueChanged(int)),this,SLOT(KTsliderValueChanged(int)));
+
+ model->appendDataFormItem(mKTSliderItem, model->invisibleRootItem());
+//Screen tones
+ mSTSliderItem = new CpSettingFormItemData(HbDataFormModelItem::SliderItem,
+ QString("Screen tones"));
+ form->addConnection(mSTSliderItem,SIGNAL(valueChanged(int)),this,SLOT(STsliderValueChanged(int)));
+
+ model->appendDataFormItem(mSTSliderItem, model->invisibleRootItem());
+//Screen vibra
+ mSVSliderItem = new CpSettingFormItemData(HbDataFormModelItem::SliderItem,
+ QString("Screen vibra"));
+ form->addConnection(mSVSliderItem,SIGNAL(valueChanged(int)),this,SLOT(SVsliderValueChanged(int)));
+
+ model->appendDataFormItem(mSVSliderItem, model->invisibleRootItem());
+//initialize sliders
+ mKTSliderItem->setContentWidgetData( QString("value"), mModel->keyVolume() );
+ mKTSliderItem->setContentWidgetData( QString("minimum"), 0 );
+ mKTSliderItem->setContentWidgetData( QString("maximum"), 3 );
+
+ mSTSliderItem->setContentWidgetData( QString("value"), mModel->screenVolume() );
+ mSTSliderItem->setContentWidgetData( QString("minimum"), 0 );
+ mSTSliderItem->setContentWidgetData( QString("maximum"), 3 );
+
+ mSVSliderItem->setContentWidgetData( QString("value"), mModel->screenVibra() );
+ mSVSliderItem->setContentWidgetData( QString("minimum"), 0 );
+ mSVSliderItem->setContentWidgetData( QString("maximum"), 3 );
+//
+ form->setModel(model);
+//
+ }
+
+
+}
+CpKtfdbkView::~CpKtfdbkView()
+{
+ if(mModel) delete mModel;
+ mModel = 0;
+}
+
+void CpKtfdbkView::KTsliderValueChanged(int value)
+{
+ if(mModel) mModel->setKeyVolume( value );
+}
+
+void CpKtfdbkView::STsliderValueChanged(int value)
+{
+ if(mModel) mModel->setScreenVolume( value );
+}
+
+void CpKtfdbkView::SVsliderValueChanged(int value)
+{
+ if(mModel) mModel->setScreenVibra( value );
+}
+
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/cpplugins/keytouchfdbkplugin/src/cpktfdbkview.h Fri Mar 19 09:29:29 2010 +0200
@@ -0,0 +1,42 @@
+/*
+ * 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 CPKTFDBKVIEW_H
+#define CPKTFDBKVIEW_H
+
+#include <cpbasesettingview.h>
+
+class HbDataFormModelItem;
+class CpSettingFormItemData;
+class CpProfileModel;
+class CpKtfdbkView : public CpBaseSettingView
+{
+ Q_OBJECT
+public:
+ explicit CpKtfdbkView(QGraphicsItem *parent = 0);
+ virtual ~CpKtfdbkView();
+private slots:
+ //need handling your member's value change
+ void KTsliderValueChanged(int value);
+ void STsliderValueChanged(int value);
+ void SVsliderValueChanged(int value);
+private:
+ CpProfileModel *mModel;
+ CpSettingFormItemData *mKTSliderItem;
+ CpSettingFormItemData *mSTSliderItem;
+ CpSettingFormItemData *mSVSliderItem;
+};
+#endif// CPKTFDBKVIEW_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/cpplugins/lookfeelplugin/data/cplookfeelplugin.cpcfg Fri Mar 19 09:29:29 2010 +0200
@@ -0,0 +1,15 @@
+
+<childplugins>
+ <plugin displayname = "Theme" id = "0X2002C2F3" dll = "cpthemeplugin.dll">
+ <desc></desc>
+ </plugin>
+ <plugin displayname = "WallPaper" id = "0X20025FE8" dll = "cpplaceholderplugin.dll">
+ <desc>Name of the WallPaper</desc>
+ </plugin>
+ <plugin displayname = "Display" id = "0X20028735" dll = "cpdisplayplugin.dll">
+ <desc></desc>
+ </plugin>
+ <plugin displayname = "Key & touch screen feedback" id = "0X20025FDE" dll = "cpkeytouchfdbkplugin.dll">
+ <desc></desc>
+ </plugin>
+</childplugins>
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/cpplugins/lookfeelplugin/lookfeelplugin.pri Fri Mar 19 09:29:29 2010 +0200
@@ -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: cpdeviceplugin source files
+#
+
+
+# Input
+HEADERS += src/cplookfeelplugin.h
+SOURCES += src/cplookfeelplugin.cpp
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/cpplugins/lookfeelplugin/lookfeelplugin.pro Fri Mar 19 09:29:29 2010 +0200
@@ -0,0 +1,38 @@
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+#
+
+TEMPLATE = lib
+TARGET = cplookfeelplugin
+
+CONFIG += hb plugin
+
+
+include ( ../cpplugincommon.pri )
+include ( lookfeelplugin.pri )
+
+symbian {
+ TARGET.UID3 = 0X20025FE0
+}
+
+symbian {
+ deploy.path = C:
+ headers.sources = data/cplookfeelplugin.cpcfg
+ headers.path = /resource/qt/plugins/controlpanel/config
+ DEPLOYMENT += exportheaders
+
+ # This is for new exporting system coming in garden
+ for(header, headers.sources):BLD_INF_RULES.prj_exports += "./$$header $$deploy.path$$headers.path/$$basename(header)"
+}
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/cpplugins/lookfeelplugin/src/cplookfeelplugin.cpp Fri Mar 19 09:29:29 2010 +0200
@@ -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:
+ *
+ */
+
+#include "cplookfeelplugin.h"
+#include "cpcategorysettingformitemdata.h"
+
+CpLookFeelPlugin::CpLookFeelPlugin()
+{
+}
+
+CpLookFeelPlugin::~CpLookFeelPlugin()
+{
+}
+
+QList<CpSettingFormItemData*> CpLookFeelPlugin::createSettingFormItemData(CpItemDataHelper &/*itemDataHelper*/) const
+{
+ CpCategorySettingFormItemData *itemData =
+ new CpCategorySettingFormItemData(
+ HbDataFormModelItem::GroupItem,
+ tr("Look&Feel"),
+ QString("cplookfeelplugin.cpcfg") );
+ return QList<CpSettingFormItemData*>() << itemData;
+}
+
+Q_EXPORT_PLUGIN2(cplookfeelplugin, CpLookFeelPlugin);
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/cpplugins/lookfeelplugin/src/cplookfeelplugin.h Fri Mar 19 09:29:29 2010 +0200
@@ -0,0 +1,37 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0""
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:
+ *
+ */
+
+#ifndef CPLOOKFEELPLUGIN_H
+#define CPLOOKFEELPLUGIN_H
+
+
+#include <qobject.h>
+#include <cpplugininterface.h>
+
+class CpLookFeelPlugin : public QObject,
+ public CpPluginInterface
+{
+ Q_OBJECT
+ Q_INTERFACES(CpPluginInterface)
+public:
+ CpLookFeelPlugin();
+ virtual ~CpLookFeelPlugin();
+ virtual QList<CpSettingFormItemData*> createSettingFormItemData(CpItemDataHelper &itemDataHelper) const;
+};
+
+
+#endif /* CPLOOKFEELPLUGIN_H */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/cpplugins/personalizationplugin/data/cppersonalizationplugin.cpcfg Fri Mar 19 09:29:29 2010 +0200
@@ -0,0 +1,2 @@
+<childplugins>
+</childplugins>
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/cpplugins/personalizationplugin/icon/hb_vol_slider_decrement.svg Fri Mar 19 09:29:29 2010 +0200
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Tiny//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd">
+<svg baseProfile="tiny" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+<polygon points="33.999,26 10,26 10,17.998 33.999,17.998 "/>
+<rect fill="#FFFFFF" height="4" width="20" x="12" y="20"/>
+</svg>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/cpplugins/personalizationplugin/icon/hb_vol_slider_decrement_pressed.svg Fri Mar 19 09:29:29 2010 +0200
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Tiny//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd">
+<svg baseProfile="tiny" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+<polygon points="33.999,26 10,26 10,17.998 33.999,17.998 "/>
+<rect fill="#00FF00" height="4" width="20" x="12" y="20"/>
+</svg>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/cpplugins/personalizationplugin/icon/hb_vol_slider_increment.svg Fri Mar 19 09:29:29 2010 +0200
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Tiny//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd">
+<svg baseProfile="tiny" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+<polygon points="26.001,33.999 18,33.999 18,26.001 10,26.001 10,18 18,18 18,9.999 26.001,9.999 26.001,18 33.999,18 33.999,26.001 26.001,26.001 "/>
+<polygon fill="#FFFFFF" points="31.999,20 23.999,20 23.999,12 20,12 20,20 12,20 12,23.999 20,23.999 20,31.999 23.999,31.999 23.999,23.999 31.999,23.999 "/>
+</svg>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/cpplugins/personalizationplugin/icon/hb_vol_slider_increment_pressed.svg Fri Mar 19 09:29:29 2010 +0200
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Tiny//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd">
+<svg baseProfile="tiny" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+<polygon points="26.001,33.999 18,33.999 18,26.001 10,26.001 10,18 18,18 18,9.999 26.001,9.999 26.001,18 33.999,18 33.999,26.001 26.001,26.001 "/>
+<polygon fill="#00FF00" points="31.999,20 23.999,20 23.999,12 20,12 20,20 12,20 12,23.999 20,23.999 20,31.999 23.999,31.999 23.999,23.999 31.999,23.999 "/>
+</svg>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/cpplugins/personalizationplugin/icon/hb_vol_slider_muted.svg Fri Mar 19 09:29:29 2010 +0200
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Tiny//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd">
+<svg baseProfile="tiny" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+<path d="M25.824,21.015V8.411h-9.979l-1.025,1.6L8.354,3.545L3.651,8.242l6.797,6.795H4.931v15.818h6.671l4.24,6.625h9.982v-7.067 l7.902,7.905l4.697-4.703L25.824,21.015z M19.179,30.336L15.26,24.21h-3.682v-2.524h3.682l0.715-1.121l3.204,3.203V30.336z"/>
+<rect fill="#FFFFFF" height="2.648" transform="matrix(-0.7071 -0.7071 0.7071 -0.7071 21.1169 50.6082)" width="38.533" x="1.773" y="19.607"/>
+<polygon fill="#FFFFFF" points="21.179,32.835 18.403,32.835 14.166,26.209 9.578,26.209 9.578,19.685 14.166,19.685 14.463,19.219 12.279,17.037 6.931,17.037 6.931,28.855 12.695,28.855 16.937,35.48 23.824,35.48 23.824,28.579 21.179,25.936 "/>
+<polygon fill="#FFFFFF" points="18.403,13.06 21.179,13.06 21.179,16.202 23.824,18.847 23.824,10.412 16.937,10.412 16.332,11.355 18.259,13.284 "/>
+</svg>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/cpplugins/personalizationplugin/icon/hb_vol_slider_unmuted.svg Fri Mar 19 09:29:29 2010 +0200
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Tiny//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd">
+<svg baseProfile="tiny" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+<path d="M34.951,38.12l-5.054-4.302l1.282-1.521c0.877-1.04,8.324-10.39,0.111-18.605l-1.414-1.413l4.697-4.701l1.413,1.415 c12.695,12.699,0.386,27.46,0.259,27.606L34.951,38.12L34.951,38.12z"/>
+<path d="M30.761,14.545l-1.414-1.412l-3.521,3.521V8.411h-9.981l-4.24,6.624H4.93v15.82h6.674l4.24,6.625h9.981v-8.201l3.855,3.287 l1.298-1.521C33.574,28.005,36.864,20.643,30.761,14.545z M19.18,30.335l-3.921-6.128h-3.682v-2.522h3.682l3.921-6.128V30.335z M25.918,26.742l-0.094,0.109v-7.844l0.237,0.236C29.324,22.505,26.277,26.318,25.918,26.742z"/>
+<path d="M27.476,17.83c4.622,4.622,0.158,9.979-0.031,10.203l2.014,1.714c2.181-2.554,4.957-8.725-0.11-13.788 L27.476,17.83z" fill="#FFFFFF"/>
+<path d="M34.576,10.406l-1.873,1.871c9.664,9.663,0.404,20.838,0.006,21.309l2.017,1.717 C34.838,35.17,45.974,21.811,34.576,10.406z" fill="#FFFFFF"/>
+<path d="M16.937,10.411l-4.242,6.625H6.931v11.819h5.764l4.242,6.625h6.887V10.411H16.937z M21.179,32.834h-2.776 l-4.237-6.626H9.578v-6.524h4.588l4.237-6.625h2.776V32.834z" fill="#FFFFFF"/>
+</svg>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/cpplugins/personalizationplugin/personalizationplugin.pri Fri Mar 19 09:29:29 2010 +0200
@@ -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: cppersonalizationplugin source files
+#
+
+# Input
+HEADERS += src/cppersonalizationplugin.h \
+ src/cppersonalizationgroupitemdata.h \
+ src/cpmastervolumeslider.h \
+ src/cppersonalizationcustomviewitem.h \
+ src/cpmastervolumevaluecontroller.h \
+ src/cpprofilesgroupitemdata.h \
+ src/cpprofilesettingform.h
+
+SOURCES += src/cppersonalizationplugin.cpp \
+ src/cppersonalizationgroupitemdata.cpp \
+ src/cpmastervolumeslider.cpp \
+ src/cppersonalizationcustomviewitem.cpp \
+ src/cpmastervolumevaluecontroller.cpp \
+ src/cpprofilesgroupitemdata.cpp \
+ src/cpprofilesettingform.cpp
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/cpplugins/personalizationplugin/personalizationplugin.pro Fri Mar 19 09:29:29 2010 +0200
@@ -0,0 +1,40 @@
+#
+# 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 = lib
+TARGET = cppersonalizationplugin
+
+CONFIG += hb plugin
+RESOURCES += personalizationplugin.qrc
+
+LIBS += -lcpprofilewrapper
+
+include ( ../cpplugincommon.pri )
+include ( personalizationplugin.pri )
+
+symbian: {
+ TARGET.UID3 = 0X20025FE5
+}
+
+symbian: {
+ deploy.path = C:
+ headers.sources = data/cppersonalizationplugin.cpcfg
+ headers.path = /resource/qt/plugins/controlpanel/config
+ DEPLOYMENT += exportheaders
+
+ # This is for new exporting system coming in garden
+ for(header, headers.sources):BLD_INF_RULES.prj_exports += "./$$header $$deploy.path$$headers.path/$$basename(header)"
+}
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/cpplugins/personalizationplugin/personalizationplugin.qrc Fri Mar 19 09:29:29 2010 +0200
@@ -0,0 +1,10 @@
+<RCC>
+ <qresource prefix="/">
+ <file>icon/hb_vol_slider_decrement.svg</file>
+ <file>icon/hb_vol_slider_decrement_pressed.svg</file>
+ <file>icon/hb_vol_slider_increment.svg</file>
+ <file>icon/hb_vol_slider_increment_pressed.svg</file>
+ <file>icon/hb_vol_slider_muted.svg</file>
+ <file>icon/hb_vol_slider_unmuted.svg</file>
+ </qresource>
+</RCC>
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/cpplugins/personalizationplugin/src/cpmastervolumeslider.cpp Fri Mar 19 09:29:29 2010 +0200
@@ -0,0 +1,166 @@
+/*
+ * 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 "cpmastervolumeslider.h"
+
+CpMasterVolumeSlider::CpMasterVolumeSlider(QGraphicsItem *parent /* =0 */)
+ :HbSlider(parent),
+ mPreviousValue(0)
+{
+ QList<HbSlider::SliderElement> elements;
+ elements << HbSlider::IncreaseElement
+ << HbSlider::TrackElement
+ << HbSlider::DecreaseElement
+ << HbSlider::IconElement
+ << HbSlider::TextElement;
+
+ setElements( elements );
+ setOrientation(Qt::Horizontal);
+ setMaximum(11);
+ setMinimum(0);
+
+ setIcon(HbSlider::DecreaseElement, HbIcon(":/icon/hb_vol_slider_decrement.svg"));
+ setIcon(HbSlider::IncreaseElement, HbIcon(":/icon/hb_vol_slider_increment.svg"));
+ setIcon(HbSlider::IconElement, HbIcon(":/icon/hb_vol_slider_muted.svg"));
+
+ setIconCheckable(true);
+
+ // set tick and beep label
+
+#if 1
+ setMajorTickInterval(1);
+ setTickPosition(Hb::SliderTicksBothSides);
+// QStringList labelList;
+// labelList<< tr("")
+// << tr("Beep");
+
+// this->setMajorTickLabels(labelList);
+#endif
+
+ connect(this, SIGNAL(iconToggled(bool)),
+ this, SLOT(onMuteIconToggled(bool)));
+ connect(this, SIGNAL(valueChanged(int)),
+ this, SLOT(onValueChanged(int)));
+// onValueChanged(value());
+}
+
+CpMasterVolumeSlider::~CpMasterVolumeSlider()
+{
+}
+
+bool CpMasterVolumeSlider::isBeepMode()
+{
+ if (value() == minimum()+1) {
+ return true;
+ }
+ else {
+ return false;
+ }
+}
+
+void CpMasterVolumeSlider::setBeepMode(bool isBeepMode)
+{
+ if (isBeepMode == true) {
+ setValue(minimum()+1);
+ }
+ else {
+ setValue(mPreviousValue);
+ }
+}
+
+bool CpMasterVolumeSlider::isSilentMode()
+{
+ if (value() == minimum()) {
+ return true;
+ }
+ else {
+ return false;
+ }
+}
+
+void CpMasterVolumeSlider::setSilentMode(bool isSilentMode)
+{
+ if (isSilentMode == true) {
+ setValue(minimum());
+ }
+ else {
+ setValue(mPreviousValue);
+ }
+}
+
+int CpMasterVolumeSlider::normalValue()
+{
+ return (value()-1);
+}
+
+void CpMasterVolumeSlider::setNormalValue(int normalValue)
+{
+ setValue(normalValue+1);
+}
+
+void CpMasterVolumeSlider::onValueChanged(int value)
+{
+ if (this->minimum( ) == value) {
+ // volume is mute
+ this->setIconChecked( true );
+ emit silentActivated();
+ }
+ else {
+ // unmute volume
+ this->setIconEnabled( true );
+ this->setIconCheckable(false);
+ this->setIconChecked( false );
+ this->setIcon(HbSlider::IconElement, HbIcon(":/icon/hb_vol_slider_unmuted.svg"));
+ this->setIconCheckable(true);
+
+
+ if (value == 1) {
+ emit beepActivated();
+ }
+ else {
+ int valueMap = value - 1;
+ emit normalValueChanged(valueMap);
+ }
+ }
+}
+
+void CpMasterVolumeSlider::onIncreaseIconClicked()
+{
+}
+
+void CpMasterVolumeSlider::onDecreaseIconClicked()
+{
+}
+
+void CpMasterVolumeSlider::onMuteIconToggled(bool isToggled)
+{
+ if (isToggled) {
+ mPreviousValue = value();
+ this->setIcon(HbSlider::IconElement, HbIcon(":/icon/hb_vol_slider_muted.svg"));
+ setValue(minimum());
+ }
+ else {
+ this->setIcon(HbSlider::IconElement, HbIcon(":/icon/hb_vol_slider_unmuted.svg"));
+ if (mPreviousValue == minimum()||mPreviousValue == minimum()+1) {
+ setValue(minimum()+1);
+ }
+ else {
+ setValue(mPreviousValue);
+ }
+ mPreviousValue = 0;
+ }
+}
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/cpplugins/personalizationplugin/src/cpmastervolumeslider.h Fri Mar 19 09:29:29 2010 +0200
@@ -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 CP_MASTERVOLUMESLIDER_H
+#define CP_MASTERVOLUMESLIDER_H
+
+#include <hbslider.h>
+#include <hbmessagebox.h>
+class CpMasterVolumeSlider: public HbSlider
+{
+ Q_OBJECT
+ Q_PROPERTY(bool beepMode READ isBeepMode WRITE setBeepMode)
+ Q_PROPERTY(bool silentMode READ isSilentMode WRITE setSilentMode)
+ Q_PROPERTY(int normalValue READ normalValue WRITE setNormalValue)
+
+public:
+ explicit CpMasterVolumeSlider(QGraphicsItem *parent = 0);
+ ~CpMasterVolumeSlider();
+
+public:
+ bool isBeepMode();
+ void setBeepMode(bool isBeepMode);
+ bool isSilentMode();
+ void setSilentMode(bool isSilentMode);
+ int normalValue();
+ void setNormalValue(int normalValue);
+
+signals:
+ void beepActivated();
+ void silentActivated();
+ void normalValueChanged(int value);
+private slots:
+ void onValueChanged(int value);
+ void onIncreaseIconClicked();
+ void onDecreaseIconClicked();
+ void onMuteIconToggled(bool isToggled);
+private:
+ int mPreviousValue;
+};
+
+#endif
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/cpplugins/personalizationplugin/src/cpmastervolumevaluecontroller.cpp Fri Mar 19 09:29:29 2010 +0200
@@ -0,0 +1,79 @@
+
+/*
+ * 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 "cpmastervolumevaluecontroller.h"
+#include <cpitemdatahelper.h>
+#include <hbdataformmodelitem.h>
+
+#ifdef Q_OS_SYMBIAN
+ #include <cpprofilemodel.h>
+#endif
+
+CpMasterVolumeValueController::CpMasterVolumeValueController(CpProfileModel *profileModel,
+ HbDataFormModelItem *masterVolumeItem,
+ CpItemDataHelper &itemDataHelper)
+ : mProfileModle(profileModel),
+ mMasterVolumeItem(masterVolumeItem)
+{
+ itemDataHelper.addConnection(mMasterVolumeItem,SIGNAL(beepActivated()),this,SLOT(onBeepActivated()));
+ itemDataHelper.addConnection(mMasterVolumeItem,SIGNAL(silentActivated()),this,SLOT(onSilentActivated()));
+ itemDataHelper.addConnection(mMasterVolumeItem,SIGNAL(normalValueChanged(int)),this,SLOT(onNormalValueChanged(int)));
+ updateMasterVolumeValue();
+}
+
+CpMasterVolumeValueController::~CpMasterVolumeValueController()
+{
+
+}
+
+void CpMasterVolumeValueController::onBeepActivated()
+{
+#ifdef Q_OS_SYMBIAN
+ mProfileModle->activateBeep();
+#endif
+}
+
+void CpMasterVolumeValueController::onSilentActivated()
+{
+#ifdef Q_OS_SYMBIAN
+ mProfileModle->activateSilent();
+#endif
+}
+
+void CpMasterVolumeValueController::onNormalValueChanged(int value)
+{
+#ifdef Q_OS_SYMBIAN
+ mProfileModle->setRingVolume(value);
+#endif
+}
+
+void CpMasterVolumeValueController::updateMasterVolumeValue()
+{
+#ifdef Q_OS_SYMBIAN
+ if (mProfileModle->isBeep()) {
+ mMasterVolumeItem->setContentWidgetData(QString("value"),QVariant(1));
+ }
+ else if (mProfileModle->isSilent()) {
+ mMasterVolumeItem->setContentWidgetData(QString("value"),QVariant(0));
+ }
+ else {
+ mMasterVolumeItem->setContentWidgetData(QString("value"),QVariant(mProfileModle->ringVolume()+1));
+ }
+#endif
+}
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/cpplugins/personalizationplugin/src/cpmastervolumevaluecontroller.h Fri Mar 19 09:29:29 2010 +0200
@@ -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:
+ *
+ */
+#ifndef CPMASTERVOLUMEVALUECONTROLLER_H
+#define CPMASTERVOLUMEVALUECONTROLLER_H
+
+#include <QObject>
+
+class CpProfileModel;
+class HbDataFormModelItem;
+class CpItemDataHelper;
+
+class CpMasterVolumeValueController : public QObject
+{
+ Q_OBJECT
+public:
+ CpMasterVolumeValueController(CpProfileModel *profileModel,
+ HbDataFormModelItem *masterVolumeItem,
+ CpItemDataHelper &itemDataHelper);
+ virtual ~CpMasterVolumeValueController();
+private slots:
+ void onBeepActivated();
+ void onSilentActivated();
+ void onNormalValueChanged(int value);
+private:
+ void updateMasterVolumeValue();
+private:
+ CpProfileModel *mProfileModle;
+ HbDataFormModelItem *mMasterVolumeItem;
+};
+
+#endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/cpplugins/personalizationplugin/src/cppersonalizationcustomviewitem.cpp Fri Mar 19 09:29:29 2010 +0200
@@ -0,0 +1,122 @@
+/*
+ * 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 "cppersonalizationcustomviewitem.h"
+#include "cpmastervolumeslider.h"
+#include <hbdataformmodelitem.h>
+#include <hbdataformmodel.h>
+#include <hbabstractitemview.h>
+#include <QMetaProperty>
+
+CpPersonalizationCustomViewItem::CpPersonalizationCustomViewItem(QGraphicsItem *parent )
+ : HbDataFormViewItem(parent)
+{
+}
+CpPersonalizationCustomViewItem::~CpPersonalizationCustomViewItem()
+{
+}
+HbAbstractViewItem* CpPersonalizationCustomViewItem::createItem()
+{
+ return new CpPersonalizationCustomViewItem(*this);
+}
+bool CpPersonalizationCustomViewItem::canSetModelIndex(const QModelIndex &index) const
+{
+ int type = index.data(HbDataFormModelItem::ItemTypeRole).toInt();
+ if (type == MasterVolumeSliderItem) {
+ return true;
+ }
+ else {
+ return false;
+ }
+}
+
+HbWidget *CpPersonalizationCustomViewItem::createCustomWidget()
+{
+ int type = modelIndex().data(HbDataFormModelItem::ItemTypeRole).toInt();
+ if (type == MasterVolumeSliderItem) {
+ CpMasterVolumeSlider *masterVolumeSlider = new CpMasterVolumeSlider();
+ connect(masterVolumeSlider, SIGNAL(valueChanged(int)), this, SLOT(store()));
+ mWidget = masterVolumeSlider;
+ return masterVolumeSlider;
+ }
+ else {
+ return 0;
+ }
+}
+
+void CpPersonalizationCustomViewItem::load()
+{
+ HbDataFormViewItem::load();
+ if (mWidget) {
+ HbDataFormModelItem::DataItemType itemType = static_cast<HbDataFormModelItem::DataItemType>(
+ modelIndex().data(HbDataFormModelItem::ItemTypeRole).toInt());
+
+ if(itemType == MasterVolumeSliderItem) {
+
+ QModelIndex itemIndex = modelIndex();
+ HbDataFormModel *model = static_cast<HbDataFormModel*>(itemView()->model());;
+ HbDataFormModelItem *modelItem = static_cast<HbDataFormModelItem*>(
+ model->itemFromIndex(itemIndex));
+
+ const QMetaObject *metaObj = mWidget->metaObject();
+ int count = metaObj->propertyCount();
+ for (int i = 0; i < count; i++) {
+ QMetaProperty metaProperty = metaObj->property(i);
+ if (metaProperty.isValid() && metaProperty.isWritable()) {
+ metaProperty.write(mWidget,modelItem->contentWidgetData(metaProperty.name()));
+ }
+
+ }
+ }
+ }
+}
+
+void CpPersonalizationCustomViewItem::store()
+{
+ HbDataFormViewItem::store();
+ if (mWidget) {
+ HbDataFormModelItem::DataItemType itemType = static_cast<HbDataFormModelItem::DataItemType>(
+ modelIndex().data(HbDataFormModelItem::ItemTypeRole).toInt());
+
+ if(itemType == MasterVolumeSliderItem) {
+
+ QModelIndex itemIndex = modelIndex();
+ HbDataFormModel *model = static_cast<HbDataFormModel*>(itemView()->model());;
+ HbDataFormModelItem *modelItem = static_cast<HbDataFormModelItem*>(
+ model->itemFromIndex(itemIndex));
+ if (CpMasterVolumeSlider *slider = qobject_cast<CpMasterVolumeSlider *>(mWidget)) {
+ modelItem->setContentWidgetData("value",slider->value());
+ }
+
+ }
+ }
+}
+
+void CpPersonalizationCustomViewItem::onValueChanged(int value)
+{
+ HbDataFormModelItem::DataItemType itemType = static_cast<HbDataFormModelItem::DataItemType>(
+ modelIndex().data(HbDataFormModelItem::ItemTypeRole).toInt());
+
+ if(itemType == MasterVolumeSliderItem) {
+
+ QModelIndex itemIndex = modelIndex();
+ HbDataFormModel *model = static_cast<HbDataFormModel*>(itemView()->model());;
+ HbDataFormModelItem *modelItem = static_cast<HbDataFormModelItem*>(
+ model->itemFromIndex(itemIndex));
+ modelItem->setContentWidgetData("value",value);
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/cpplugins/personalizationplugin/src/cppersonalizationcustomviewitem.h Fri Mar 19 09:29:29 2010 +0200
@@ -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:
+ *
+ */
+#ifndef CP_PERSONALIZATION_CUSTOMVIEWITEM_H
+#define CP_PERSONALIZATION_CUSTOMVIEWITEM_H
+
+#include <hbdataformviewitem.h>
+#include <hbdataformmodelitem.h>
+
+class HbWidget;
+
+const int MasterVolumeSliderItem = HbDataFormModelItem::CustomItemBase+21;
+
+class CpPersonalizationCustomViewItem: public HbDataFormViewItem
+{
+ Q_OBJECT
+public:
+ explicit CpPersonalizationCustomViewItem(QGraphicsItem *parent = 0);
+ ~CpPersonalizationCustomViewItem();
+ virtual HbAbstractViewItem* createItem();
+ virtual bool canSetModelIndex(const QModelIndex &index) const;
+public slots:
+ virtual void load();
+ virtual void store();
+private slots:
+ void onValueChanged(int value);
+protected:
+ virtual HbWidget* createCustomWidget();
+private:
+ HbWidget *mWidget;
+};
+#endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/cpplugins/personalizationplugin/src/cppersonalizationgroupitemdata.cpp Fri Mar 19 09:29:29 2010 +0200
@@ -0,0 +1,121 @@
+/*
+ * 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 "cppersonalizationgroupitemdata.h"
+#include <hbdataformmodelitem.h>
+#include <cpsettingformentryitemdataimpl.h>
+#include <cpbasesettingview.h>
+#include <cpitemdatahelper.h>
+#include <hbmessagebox.h>
+#include "cppersonalizationcustomviewitem.h"
+#include "cpmastervolumevaluecontroller.h"
+#include <cpprofilemodel.h>
+
+
+CpPersonalizationGroupItemData::CpPersonalizationGroupItemData(HbDataFormModelItem::DataItemType type,
+ const QString &label,
+ const QString &configFile,
+ const HbDataFormModelItem *parent):
+ CpCategorySettingFormItemData(type, label, configFile, parent),
+ mMasterVolume(0),
+ mMasterVibra(0),
+ mRingTone(0),
+ mMessageTone(0),
+ mEmailTone(0),
+ mReminderTone(0),
+ mClockTone(0),
+ mProfileModel(0),
+ mMasterVolumeValueController(0)
+{
+ mProfileModel = new CpProfileModel();
+}
+
+CpPersonalizationGroupItemData::~CpPersonalizationGroupItemData()
+{
+ delete mProfileModel;
+ delete mMasterVolumeValueController;
+}
+
+void CpPersonalizationGroupItemData::beforeLoadingConfigPlugins(CpItemDataHelper &itemDataHelper)
+{
+
+ itemDataHelper.addItemPrototype(new CpPersonalizationCustomViewItem);
+
+ mMasterVolume = new HbDataFormModelItem(static_cast<HbDataFormModelItem::DataItemType>(MasterVolumeSliderItem));
+ mMasterVolumeValueController = new CpMasterVolumeValueController(mProfileModel,mMasterVolume,itemDataHelper);
+
+ //mMasterVolume->setContentWidgetData("maxmum",10);
+ //mMasterVolume->setContentWidgetData("minmum",1);
+ //itemDataHelper.addConnection(mMasterVolume,SIGNAL(valueChanged (int)),this,SLOT(masterVolumeValueChanged(int)) );
+ this->appendChild(mMasterVolume);
+ mMasterVibra = new HbDataFormModelItem(HbDataFormModelItem::CheckBoxItem,
+ QString());
+ mMasterVibra->setContentWidgetData("text",QObject::tr("Vibrating alerts"));
+ itemDataHelper.addConnection(mMasterVibra,SIGNAL(stateChanged(int)),this,SLOT(onVibraValueChange(int)));
+
+
+ if (mProfileModel->vibraStatus()) {
+ mMasterVibra->setContentWidgetData("checkState", Qt::Checked);
+ }
+ else {
+ mMasterVibra->setContentWidgetData("checkState", Qt::Unchecked);
+ }
+
+ this->appendChild(mMasterVibra);
+
+
+
+ mRingTone = new CpSettingFormEntryItemDataImpl<CpBaseSettingView>(itemDataHelper,
+ tr("Ring tone"),
+ tr("Nokia tone"));
+ this->appendChild(mRingTone);
+ mMessageTone = new CpSettingFormEntryItemDataImpl<CpBaseSettingView>(itemDataHelper,
+ tr("Message tone"),
+ tr("Nokia message tone"));
+ this->appendChild(mMessageTone);
+ mEmailTone = new CpSettingFormEntryItemDataImpl<CpBaseSettingView>(itemDataHelper,
+ tr("E-mail tone"),
+ tr("Nokia e-mail tone"));
+ this->appendChild(mEmailTone);
+ mReminderTone = new CpSettingFormEntryItemDataImpl<CpBaseSettingView>(itemDataHelper,
+ tr("Reminder tone"),
+ tr("Nokia calendar tone"));
+ this->appendChild(mReminderTone);
+ mClockTone = new CpSettingFormEntryItemDataImpl<CpBaseSettingView>(itemDataHelper,
+ tr("Clock tone"),
+ tr("Nokia clock tone"));
+ this->appendChild(mClockTone);
+
+
+}
+
+void CpPersonalizationGroupItemData::masterVolumeValueChanged(int value)
+{
+ Q_UNUSED(value);
+ HbMessageBox::launchInformationMessageBox(QString("volume changed to:%1").arg(value));
+}
+void CpPersonalizationGroupItemData::onVibraValueChange(int isVibra)
+{
+ //Q_UNUSED(isVibra);
+ if (isVibra) {
+ mProfileModel->setVibraStatus(true);
+ }
+ else {
+ mProfileModel->setVibraStatus(false);
+ }
+}
+
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/cpplugins/personalizationplugin/src/cppersonalizationgroupitemdata.h Fri Mar 19 09:29:29 2010 +0200
@@ -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 CPPERSONALIZATIONGROUPITEMDATA_H
+#define CPPERSONALIZATIONGROUPITEMDATA_H
+
+#include <QObject>
+#include <cpcategorysettingformitemdata.h>
+
+class CpProfileModel;
+class CpItemDataHelper;
+class CpSettingFormEntryItemData;
+class CpMasterVolumeValueController;
+
+class CpPersonalizationGroupItemData: public CpCategorySettingFormItemData
+{
+ Q_OBJECT
+public:
+ CpPersonalizationGroupItemData(HbDataFormModelItem::DataItemType type,
+ const QString &label,
+ const QString &configFile = QString(),
+ const HbDataFormModelItem *parent = 0);
+
+ ~CpPersonalizationGroupItemData();
+private slots:
+ void masterVolumeValueChanged(int value);
+ void onVibraValueChange(int isVibra);
+private:
+ virtual void beforeLoadingConfigPlugins(CpItemDataHelper &itemDataHelper);
+private:
+ HbDataFormModelItem *mMasterVolume;
+ HbDataFormModelItem *mMasterVibra;
+ CpSettingFormEntryItemData *mRingTone;
+ CpSettingFormEntryItemData *mMessageTone;
+ CpSettingFormEntryItemData *mEmailTone;
+ CpSettingFormEntryItemData *mReminderTone;
+ CpSettingFormEntryItemData *mClockTone;
+ CpProfileModel *mProfileModel;
+ CpMasterVolumeValueController *mMasterVolumeValueController;
+};
+
+#endif /* CPPERSONALIZATIONGROUPITEMDATA_H */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/cpplugins/personalizationplugin/src/cppersonalizationplugin.cpp Fri Mar 19 09:29:29 2010 +0200
@@ -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:
+ *
+ */
+
+#include "cppersonalizationplugin.h"
+#include "cppersonalizationgroupitemdata.h"
+#include "cpprofilesgroupitemdata.h"
+#include <cpcategorysettingformitemdata.h>
+#include <cpitemdatahelper.h>
+
+CpPersonalizationPlugin::CpPersonalizationPlugin()
+{
+}
+
+CpPersonalizationPlugin::~CpPersonalizationPlugin()
+{
+}
+
+QList<CpSettingFormItemData*> CpPersonalizationPlugin::createSettingFormItemData(CpItemDataHelper &itemDataHelper) const
+{
+ Q_UNUSED(itemDataHelper);
+ /*
+ CpProfilesGroupItemData *profileItemData =
+ new CpProfilesGroupItemData(itemDataHelper);
+ */
+ CpPersonalizationGroupItemData *personalItemData =
+ new CpPersonalizationGroupItemData(
+ HbDataFormModelItem::GroupItem,
+ tr("Default tones"),
+ QString("cppersonalizationplugin.cpcfg") );
+
+ return QList<CpSettingFormItemData*>() /*<< profileItemData*/ << personalItemData;
+}
+
+Q_EXPORT_PLUGIN2(cppersonalizationplugin, CpPersonalizationPlugin);
+
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/cpplugins/personalizationplugin/src/cppersonalizationplugin.h Fri Mar 19 09:29:29 2010 +0200
@@ -0,0 +1,38 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0""
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:
+ *
+ */
+
+#ifndef CPPERSONALIZATIONPLUGIN_H
+#define CPPERSONALIZATIONPLUGIN_H
+
+#include <qobject.h>
+#include <cpplugininterface.h>
+
+class CpPersonalizationPlugin
+ : public QObject,
+ public CpPluginInterface
+{
+ Q_OBJECT
+ Q_INTERFACES(CpPluginInterface)
+public:
+ CpPersonalizationPlugin();
+ virtual ~CpPersonalizationPlugin();
+ virtual QList<CpSettingFormItemData*> createSettingFormItemData(CpItemDataHelper &itemDataHelper) const;
+};
+
+#endif /* CPPERSONALIZATIONPLUGIN_H */
+
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/cpplugins/personalizationplugin/src/cpprofilesettingform.cpp Fri Mar 19 09:29:29 2010 +0200
@@ -0,0 +1,148 @@
+/*
+ * 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 "cpprofilesettingform.h"
+#include <QStringList>
+#include <hbdataformmodel.h>
+#include "cppersonalizationcustomviewitem.h"
+
+CpProfileSettingForm::CpProfileSettingForm()
+: mModel(0)
+{
+ this->setHeading(tr("Profiles"));
+ this->setDescription(tr("With profiles you can quickly change audio settings of your device"));
+
+ QList<HbAbstractViewItem *> protoTypeList = itemPrototypes();
+ protoTypeList.append(new CpPersonalizationCustomViewItem);
+ setItemPrototypes(protoTypeList);
+
+ initModel();
+}
+
+CpProfileSettingForm::~CpProfileSettingForm()
+{
+ delete mModel;
+}
+
+void CpProfileSettingForm::initModel()
+{
+ mModel = new HbDataFormModel();
+
+ QStringList profileList;
+ profileList << "Normal" << "Meeting" << "Silent"; //should be got from engine.
+ foreach (const QString &profile,profileList) {
+ HbDataFormModelItem *profilePage = mModel->appendDataFormPage(profile);
+ initVolumeGroup(profilePage);
+ initRingToneGroup(profilePage);
+ initMessageToneGroup(profilePage);
+ initAlertToneGroup(profilePage);
+ initKeyAndScreenToneGroup(profilePage);
+ }
+ setModel(mModel);
+}
+
+void CpProfileSettingForm::initVolumeGroup(HbDataFormModelItem *parent)
+{
+ HbDataFormModelItem *volumeGroup = mModel->appendDataFormGroup(
+ tr("Volume"),parent);
+ mModel->appendDataFormItem(static_cast<HbDataFormModelItem::DataItemType>(MasterVolumeSliderItem),QString(),volumeGroup);
+ mModel->appendDataFormItem(HbDataFormModelItem::CheckBoxItem,tr("Ring alert vibra"),volumeGroup);
+ mModel->appendDataFormItem(HbDataFormModelItem::CheckBoxItem,tr("New message alert vibra"),volumeGroup);
+ mModel->appendDataFormItem(HbDataFormModelItem::CheckBoxItem,tr("New e-mail alert vibra"),volumeGroup);
+ mModel->appendDataFormItem(HbDataFormModelItem::CheckBoxItem,tr("Reminder alarm vibra"),volumeGroup);
+ mModel->appendDataFormItem(HbDataFormModelItem::CheckBoxItem,tr("Clock alarm vibra"),volumeGroup);
+}
+
+void CpProfileSettingForm::initRingToneGroup(HbDataFormModelItem *parent)
+{
+ HbDataFormModelItem *ringToneGroup = mModel->appendDataFormGroup(
+ tr("Ring tone"),parent);
+
+ QStringList tonesList;
+ tonesList << "Off" << "Beep" << "Default ring tone" << "set profile-specific tone";
+
+ foreach (const QString &tone,tonesList) {
+ HbDataFormModelItem *toneGroup = mModel->appendDataFormGroupPage(tone,ringToneGroup);
+ mModel->appendDataFormItem(HbDataFormModelItem::CheckBoxItem,tr("Say caller name"),toneGroup);
+ HbDataFormModelItem *threeDEffect = mModel->appendDataFormItem(
+ HbDataFormModelItem::ComboBoxItem,tr("3D effect"),toneGroup);
+
+ threeDEffect->setContentWidgetData("items",QStringList()
+ << tr("Off") << tr("Circular") << tr("Fly-by") << tr("Zigzag")
+ << tr("Meander") << tr("Chaos") << tr("Stereo widening"));
+ threeDEffect->setContentWidgetData("currentIndex",0);
+
+ HbDataFormModelItem *treeEcho = mModel->appendDataFormItem(
+ HbDataFormModelItem::ComboBoxItem,tr("3D echo"),toneGroup);
+ treeEcho->setContentWidgetData("items",QStringList()
+ << tr("Off") << tr("Living room") << tr("Cave") << tr("Railway station")
+ << tr("Forest") << tr("Duct") << tr("underwater"));
+ treeEcho->setContentWidgetData("currentIndex",0);
+ }
+}
+
+void CpProfileSettingForm::initMessageToneGroup(HbDataFormModelItem *parent)
+{
+ HbDataFormModelItem *messageToneGroup = mModel->appendDataFormGroup(
+ tr("Message tones"),parent);
+
+ HbDataFormModelItem *messageTone = mModel->appendDataFormItem(
+ HbDataFormModelItem::ComboBoxItem,tr("Message tone"),messageToneGroup);
+
+ messageTone->setContentWidgetData("items",QStringList()
+ << tr("Off") << tr("Beep") << tr("Default mesage tone") << tr("set profile-specific tone"));
+ messageTone->setContentWidgetData("currentIndex",2);
+
+ HbDataFormModelItem *emailTone = mModel->appendDataFormItem(
+ HbDataFormModelItem::ComboBoxItem,tr("E-mail tone"),messageToneGroup);
+
+ emailTone->setContentWidgetData("items",QStringList()
+ << tr("Off") << tr("Beep") << tr("Default e-mail tone") << tr("set profile-specific tone"));
+ emailTone->setContentWidgetData("currentIndex",2);
+
+}
+
+void CpProfileSettingForm::initAlertToneGroup(HbDataFormModelItem *parent)
+{
+ HbDataFormModelItem *alertToneGroup = mModel->appendDataFormGroup(
+ tr("Alert tones"),parent);
+
+ HbDataFormModelItem *reminderTone = mModel->appendDataFormItem(
+ HbDataFormModelItem::ComboBoxItem,tr("Reminder tone"),alertToneGroup);
+
+ reminderTone->setContentWidgetData("items",QStringList()
+ << tr("Off") << tr("Beep") << tr("Default reminder tone") << tr("set profile-specific tone"));
+ reminderTone->setContentWidgetData("currentIndex",2);
+
+ HbDataFormModelItem *clockAlarmTone = mModel->appendDataFormItem(
+ HbDataFormModelItem::ComboBoxItem,tr("Clock alarm tone"),alertToneGroup);
+
+ clockAlarmTone->setContentWidgetData("items",QStringList()
+ << tr("Off") << tr("Beep") << tr("Default clock alarm tone") << tr("set profile-specific tone"));
+ clockAlarmTone->setContentWidgetData("currentIndex",2);
+
+}
+
+void CpProfileSettingForm::initKeyAndScreenToneGroup(HbDataFormModelItem *parent)
+{
+ HbDataFormModelItem *keyAndScreenToneGroup= mModel->appendDataFormGroup(
+ tr("Key and screen tones"),parent);
+ mModel->appendDataFormItem(static_cast<HbDataFormModelItem::DataItemType>(MasterVolumeSliderItem),
+ tr("Key and touch screen tones"),keyAndScreenToneGroup);
+ mModel->appendDataFormItem(HbDataFormModelItem::SliderItem,
+ tr("Touch screen vibra"),keyAndScreenToneGroup);
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/cpplugins/personalizationplugin/src/cpprofilesettingform.h Fri Mar 19 09:29:29 2010 +0200
@@ -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:
+ *
+ */
+
+#ifndef CPPROFILESETTINGFORM_H
+#define CPPROFILESETTINGFORM_H
+
+#include <hbdataform.h>
+
+class HbDataFormModel;
+class HbDataFormModelItem;
+
+class CpProfileSettingForm : public HbDataForm
+{
+ Q_OBJECT
+public:
+ CpProfileSettingForm();
+ virtual ~CpProfileSettingForm();
+private:
+ void initModel();
+ void initVolumeGroup(HbDataFormModelItem *parent);
+ void initRingToneGroup(HbDataFormModelItem *parent);
+ void initMessageToneGroup(HbDataFormModelItem *parent);
+ void initAlertToneGroup(HbDataFormModelItem *parent);
+ void initKeyAndScreenToneGroup(HbDataFormModelItem *parent);
+private:
+ HbDataFormModel *mModel;
+};
+
+
+#endif //CPPROFILESETTINGFORM_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/cpplugins/personalizationplugin/src/cpprofilesgroupitemdata.cpp Fri Mar 19 09:29:29 2010 +0200
@@ -0,0 +1,59 @@
+/*
+ * 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 "cpprofilesgroupitemdata.h"
+#include <QStringList>
+#include <cpsettingformentryitemdataimpl.h>
+#include <cpbasesettingview.h>
+#include "cpprofilesettingform.h"
+
+CpProfilesGroupItemData::CpProfilesGroupItemData(CpItemDataHelper &itemDataHelper)
+: CpSettingFormItemData(HbDataFormModelItem::GroupItem,tr("Profiles"))
+{
+ initItems(itemDataHelper);
+}
+
+CpProfilesGroupItemData::~CpProfilesGroupItemData()
+{
+}
+
+namespace
+{
+ class CpProfileSettingView : public CpBaseSettingView
+ {
+ public:
+ CpProfileSettingView() : CpBaseSettingView(new CpProfileSettingForm())
+ {
+ }
+ };
+};
+
+void CpProfilesGroupItemData::initItems(CpItemDataHelper &itemDataHelper)
+{
+ HbDataFormModelItem *activeProfileItem = new HbDataFormModelItem(
+ HbDataFormModelItem::RadioButtonListItem,tr("Profiles"));
+
+ QStringList items;
+ items << tr("Normal") << tr("Meeting") << tr("Silent");
+ activeProfileItem->setContentWidgetData("items",items);
+ activeProfileItem->setContentWidgetData("selected",0);
+
+ appendChild(activeProfileItem);
+
+ HbDataFormModelItem *editProfileItem = new CpSettingFormEntryItemDataImpl<CpProfileSettingView>(
+ itemDataHelper,tr("Edit profiles"));
+ appendChild(editProfileItem);
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/cpplugins/personalizationplugin/src/cpprofilesgroupitemdata.h Fri Mar 19 09:29:29 2010 +0200
@@ -0,0 +1,35 @@
+/*
+ * 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 CPPROFILESGROUPITEMDATA_H
+#define CPPROFILESGROUPITEMDATA_H
+
+#include <cpsettingformitemdata.h>
+
+class CpItemDataHelper;
+class CpProfilesGroupItemData : public CpSettingFormItemData
+{
+ Q_OBJECT
+public:
+ explicit CpProfilesGroupItemData(CpItemDataHelper &itemDataHelper);
+ virtual ~CpProfilesGroupItemData();
+private:
+ Q_DISABLE_COPY(CpProfilesGroupItemData)
+ void initItems(CpItemDataHelper &itemDataHelper);
+};
+
+#endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/cpplugins/pincodeplugin/pincodeplugin.pri Fri Mar 19 09:29:29 2010 +0200
@@ -0,0 +1,21 @@
+#
+# 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: cppincodeplugin source files
+#
+
+# Input
+HEADERS += src/*.h
+SOURCES += src/*.cpp
+
+INCLUDEPATH += ../../seccodeui/src
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/cpplugins/pincodeplugin/pincodeplugin.pro Fri Mar 19 09:29:29 2010 +0200
@@ -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 = lib
+TARGET = cppincodeplugin
+
+CONFIG += hb plugin
+
+LIBS += -lseccodeui
+
+include ( ../cpplugincommon.pri )
+include ( pincodeplugin.pri )
+
+symbian {
+ TARGET.UID3 = 0X20028731
+}
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/cpplugins/pincodeplugin/src/cppincodeplugin.cpp Fri Mar 19 09:29:29 2010 +0200
@@ -0,0 +1,35 @@
+/*
+ * 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 "cppincodeplugin.h"
+#include "cppincodepluginview.h"
+#include <cpsettingformentryitemdataimpl.h>
+
+CpPinCodePlugin::CpPinCodePlugin()
+{
+}
+
+CpPinCodePlugin::~CpPinCodePlugin()
+{
+}
+
+QList<CpSettingFormItemData*> CpPinCodePlugin::createSettingFormItemData(CpItemDataHelper &itemDataHelper) const
+{
+ return QList<CpSettingFormItemData*>() << new CpSettingFormEntryItemDataImpl<CpPinCodePluginView>(
+ itemDataHelper,tr("PIN code"),QString());
+}
+
+Q_EXPORT_PLUGIN2(cppincodeplugin, CpPinCodePlugin);
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/cpplugins/pincodeplugin/src/cppincodeplugin.h Fri Mar 19 09:29:29 2010 +0200
@@ -0,0 +1,34 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0""
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:
+ *
+ */
+
+#ifndef CPPINCODEPLUGIN_H
+#define CPPINCODEPLUGIN_H
+
+#include <QObject>
+#include <cpplugininterface.h>
+
+class CpPinCodePlugin : public QObject, public CpPluginInterface
+{
+ Q_OBJECT
+ Q_INTERFACES(CpPluginInterface)
+public:
+ CpPinCodePlugin();
+ virtual ~CpPinCodePlugin();
+ virtual QList<CpSettingFormItemData*> createSettingFormItemData(CpItemDataHelper &itemDataHelper) const;
+};
+
+#endif //CPPINCODEPLUGIN_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/cpplugins/pincodeplugin/src/cppincodepluginview.cpp Fri Mar 19 09:29:29 2010 +0200
@@ -0,0 +1,83 @@
+/*
+ * 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 "cppincodepluginview.h"
+#include <hbdataform.h>
+#include <hbdataformmodel.h>
+#include <hbdataformmodelitem.h>
+#include <hblineedit.h>
+#include <seccodeeditdataformviewitem.h>
+#include <seccodesettings.h>
+
+CpPinCodePluginView::CpPinCodePluginView(QGraphicsItem *parent /*= 0*/)
+: CpBaseSettingView(0,parent), mSecCodeSettings(new SecCodeSettings())
+{
+ if (HbDataForm *form = settingForm()) {
+
+ QList<HbAbstractViewItem *> protoTypeList = form->itemPrototypes();
+ protoTypeList.append(new SecCodeEditDataFormViewItem());
+ form->setItemPrototypes(protoTypeList);
+
+ form->setHeading(tr("PIN code"));
+
+ HbDataFormModel *formModel = new HbDataFormModel();
+
+ HbDataFormModelItem *pinCodeRequestItem = new HbDataFormModelItem(
+ HbDataFormModelItem::ToggleValueItem,tr("PIN code requests"));
+
+ pinCodeRequestItem->setContentWidgetData("text",tr("On"));
+ pinCodeRequestItem->setContentWidgetData("additionalText",tr("Off"));
+
+ formModel->appendDataFormItem(pinCodeRequestItem);
+
+ HbDataFormModelItem *pinCodeItem = new HbDataFormModelItem(
+ static_cast<HbDataFormModelItem::DataItemType>(SecCodeEditDataFormViewItem::SecCodeEditItem),
+ tr("PIN code"));
+ pinCodeItem->setContentWidgetData("echoMode",HbLineEdit::Password);
+ pinCodeItem->setContentWidgetData("text","1111");
+ pinCodeItem->setContentWidgetData("readOnly",true);
+ form->addConnection(pinCodeItem,SIGNAL(clicked()),this,SLOT(onPinCodeClicked()));
+
+ formModel->appendDataFormItem(pinCodeItem);
+
+ HbDataFormModelItem *pin2CodeItem = new HbDataFormModelItem(
+ static_cast<HbDataFormModelItem::DataItemType>(SecCodeEditDataFormViewItem::SecCodeEditItem),
+ tr("PIN2 code"));
+ pin2CodeItem->setContentWidgetData("echoMode",HbLineEdit::Password);
+ pin2CodeItem->setContentWidgetData("text","1111");
+ pin2CodeItem->setContentWidgetData("readOnly",true);
+ form->addConnection(pin2CodeItem,SIGNAL(clicked()),this,SLOT(onPin2CodeClicked()));
+
+ formModel->appendDataFormItem(pin2CodeItem);
+
+ form->setModel(formModel);
+ }
+}
+
+CpPinCodePluginView::~CpPinCodePluginView()
+{
+ delete mSecCodeSettings;
+}
+
+void CpPinCodePluginView::onPinCodeClicked()
+{
+ mSecCodeSettings->changePinCode();
+}
+
+void CpPinCodePluginView::onPin2CodeClicked()
+{
+ mSecCodeSettings->changePin2Code();
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/cpplugins/pincodeplugin/src/cppincodepluginview.h Fri Mar 19 09:29:29 2010 +0200
@@ -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:
+ *
+ */
+#ifndef CPPINCODEPLUGINVIEW_H
+#define CPPINCODEPLUGINVIEW_H
+
+#include <cpbasesettingview.h>
+
+class SecCodeSettings;
+class CpPinCodePluginView : public CpBaseSettingView
+{
+ Q_OBJECT
+public:
+ explicit CpPinCodePluginView(QGraphicsItem *parent = 0);
+ virtual ~CpPinCodePluginView();
+private slots:
+ void onPinCodeClicked();
+ void onPin2CodeClicked();
+private:
+ SecCodeSettings *mSecCodeSettings;
+};
+
+#endif //CPPINCODEPLUGINVIEW_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/cpplugins/placeholdernoiconplugin/placeholdernoiconplugin.pri Fri Mar 19 09:29:29 2010 +0200
@@ -0,0 +1,22 @@
+#
+# 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: cpplaceholderplugin source files
+#
+
+# Input
+HEADERS += src/cpplaceholderplugin.h \
+ src/cpplaceholderentryitemdata.h
+
+SOURCES += src/cpplaceholderplugin.cpp \
+ src/cpplaceholderentryitemdata.cpp
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/cpplugins/placeholdernoiconplugin/placeholdernoiconplugin.pro Fri Mar 19 09:29:29 2010 +0200
@@ -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:
+#
+
+TEMPLATE = lib
+TARGET = cpplaceholdernoiconplugin
+
+CONFIG += hb plugin
+
+
+include ( ../cpplugincommon.pri )
+include ( placeholdernoiconplugin.pri )
+
+symbian: {
+ TARGET.UID3 = 0X20025FDD
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/cpplugins/placeholdernoiconplugin/src/cpplaceholderentryitemdata.cpp Fri Mar 19 09:29:29 2010 +0200
@@ -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:
+*
+*/
+#include "cpplaceholderentryitemdata.h"
+#include <cpbasesettingview.h>
+#include <hblabel.h>
+#include <cpitemdatahelper.h>
+#include <hbdataform.h>
+
+CpPlaceholderEntryItemData::CpPlaceholderEntryItemData(CpItemDataHelper &itemDataHelper)
+: CpSettingFormEntryItemData(itemDataHelper)
+{
+
+}
+
+CpPlaceholderEntryItemData::~CpPlaceholderEntryItemData()
+{
+}
+
+CpBaseSettingView *CpPlaceholderEntryItemData::createSettingView() const
+{
+ HbDataForm *dataform = new HbDataForm();
+ dataform->setHeading(text());
+ CpBaseSettingView *view = new CpBaseSettingView(dataform);
+ return view;
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/cpplugins/placeholdernoiconplugin/src/cpplaceholderentryitemdata.h Fri Mar 19 09:29:29 2010 +0200
@@ -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:
+*
+*/
+
+#ifndef CPPLACEHOLDERENTRYITEMDATA_H
+#define CPPLACEHOLDERENTRYITEMDATA_H
+
+#include <cpsettingformentryitemdata.h>
+
+class CpItemDataHelper;
+class CpPlaceholderEntryItemData : public CpSettingFormEntryItemData
+{
+public:
+ explicit CpPlaceholderEntryItemData(CpItemDataHelper &itemDataHelper);
+ virtual ~CpPlaceholderEntryItemData();
+private:
+ virtual CpBaseSettingView *createSettingView() const;
+};
+
+#endif /* CPPLACEHOLDERENTRYITEMDATA_H */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/cpplugins/placeholdernoiconplugin/src/cpplaceholderplugin.cpp Fri Mar 19 09:29:29 2010 +0200
@@ -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:
+ *
+ */
+#include "cpplaceholderplugin.h"
+#include "cpplaceholderentryitemdata.h"
+
+CpPlaceholderPlugin::CpPlaceholderPlugin()
+{
+}
+
+CpPlaceholderPlugin::~CpPlaceholderPlugin()
+{
+}
+
+QList<CpSettingFormItemData*> CpPlaceholderPlugin::createSettingFormItemData(CpItemDataHelper &itemDataHelper) const
+{
+ return QList<CpSettingFormItemData*>() << new CpPlaceholderEntryItemData(itemDataHelper);
+}
+
+Q_EXPORT_PLUGIN2(cpplaceholderplugin, CpPlaceholderPlugin);
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/cpplugins/placeholdernoiconplugin/src/cpplaceholderplugin.h Fri Mar 19 09:29:29 2010 +0200
@@ -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:
+ *
+ */
+#ifndef CPPLACEHOLDERPLUGIN_H
+#define CPPLACEHOLDERPLUGIN_H
+
+#include <qobject.h>
+#include <cpplugininterface.h>
+
+class CpPlaceholderPlugin : public QObject, public CpPluginInterface
+{
+ Q_OBJECT
+ Q_INTERFACES(CpPluginInterface)
+public:
+ CpPlaceholderPlugin();
+ virtual ~CpPlaceholderPlugin();
+ virtual QList<CpSettingFormItemData*> createSettingFormItemData(CpItemDataHelper &itemDataHelper) const;
+};
+
+#endif //CPPLACEHOLDERPLUGIN_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/cpplugins/placeholderplugin/image/qgn_menu_note.svg Fri Mar 19 09:29:29 2010 +0200
@@ -0,0 +1,88 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Tiny//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd">
+<svg width="100%" height="100%" viewBox="0 0 88 88">
+<linearGradient id="_20" gradientUnits="userSpaceOnUse" x1="46.99" y1="48.62" x2="57.59" y2="67.17">
+<stop stop-color="#A2C2DD" offset="0.1"/>
+<stop stop-color="#6C83BB" offset="0.71"/>
+<stop stop-color="#003D6D" offset="0.99"/>
+</linearGradient>
+<path fill="url(#_20)" d="M37.755,14.563c-0.625-0.15-3.215-0.771-3.215-0.771l-6.344,9.318 C14.325,41.71,3.561,47.928,2.801,48.401l6.468,2.128l-1.694,2.4l1.111,3.48l41.153,18.198l14.238-26.409l16.804-2.157l2.899-4.356 l-1.079-7.683l-3.737-4.507l-5.312,0.944l0.463-0.857l0.251-6.262c0,0-4.423-1.069-4.374-1.063 c-0.755-3.548-4.226-3.896-6.26-1.475c-0.013-0.005-2.825-0.708-2.818-0.712c-0.742-3.492-4.2-3.939-6.269-1.469 c-0.004-0.012-2.582-0.668-2.595-0.661c-0.749-3.501-4.18-3.806-6.163-1.437c-0.027,0.008-2.09-0.508-2.088-0.523 C43.063,12.593,39.706,12.258,37.755,14.563z"/>
+<polygon fill="#FFFFFF" points="35.11,15.12 8.336,53.049 48.798,69.047 72.646,28.459 73.573,25.04 "/>
+<linearGradient id="_21" gradientUnits="userSpaceOnUse" x1="30.63" y1="59.56" x2="27.89" y2="65.83">
+<stop stop-color="#FFFFFF" offset="0"/>
+<stop stop-color="#496DA2" offset="0.71"/>
+<stop stop-color="#235487" offset="0.99"/>
+</linearGradient>
+<polygon fill="url(#_21)" points="8.45,52.959 48.528,68.704 49.52,73.706 9.246,55.897 "/>
+<linearGradient id="_22" gradientUnits="userSpaceOnUse" x1="56.86" y1="45.11" x2="69.16" y2="54.68">
+<stop stop-color="#DEE9F3" offset="0"/>
+<stop stop-color="#235487" offset="1"/>
+</linearGradient>
+<polygon fill="url(#_22)" points="48.528,68.704 73.633,23.86 73.411,29.393 49.52,73.706 "/>
+<linearGradient id="_23" gradientUnits="userSpaceOnUse" x1="4.44" y1="38.62" x2="45.79" y2="38.62">
+<stop stop-color="#CADCEC" offset="0"/>
+<stop stop-color="#87A8CB" offset="1"/>
+</linearGradient>
+<path fill="url(#_23)" d="M34.894,14.715C18.737,39.471,4.443,48.209,4.443,48.209 c7.75,2.391,41.35,14.314,41.35,14.314L34.894,14.715z"/>
+<linearGradient id="_24" gradientUnits="userSpaceOnUse" x1="15.64" y1="58.6" x2="44.93" y2="34.82">
+<stop stop-color="#FFFFFF" offset="0.15"/>
+<stop stop-color="#A2C2DD" offset="1"/>
+</linearGradient>
+<path fill="url(#_24)" d="M10.557,50.247c11.41,4.494,35.236,12.277,35.236,12.277 c15.358-11.682,27.74-38.658,27.74-38.658l-38.697-9.279L10.557,50.247z"/>
+<linearGradient id="_25" gradientUnits="userSpaceOnUse" x1="68.03" y1="52.73" x2="41.63" y2="18.62">
+<stop stop-color="#FFFFFF" offset="0"/>
+<stop stop-color="#496DA2" offset="0.71"/>
+<stop stop-color="#235487" offset="0.99"/>
+</linearGradient>
+<polygon fill="url(#_25)" points="33.619,23.77 33.263,24.6 64.586,33.327 64.445,31.303 "/>
+<polygon fill="url(#_25)" points="30.349,28.944 29.959,29.764 60.965,39.577 60.895,37.549 "/>
+<polygon fill="url(#_25)" points="26.981,34.229 26.567,35.036 57.195,45.958 57.195,43.926 "/>
+<polyline fill="url(#_25)" points="37.03,44.815 23.809,40.569 23.396,41.375 34.393,45.297 37.03,44.815 "/>
+<path fill="#3F5AA6" d="M37.265,17.37c-1.227,0.744-1.05,2.494,0.11,3.184c1.821,1.088,4.019-0.83,2.968-2.572 c0.449-1.01,1.511-1.695,1.794-1.643l1.055,0.223C42.339,13.018,37.265,17.37,37.265,17.37z"/>
+<linearGradient id="_29" gradientUnits="userSpaceOnUse" x1="39.83" y1="18.64" x2="40.83" y2="14.3">
+<stop stop-color="#87A8CB" offset="0"/>
+<stop stop-color="#CADCEC" offset="0.5"/>
+<stop stop-color="#87A8CB" offset="1"/>
+</linearGradient>
+<path fill="url(#_29)" d="M38.914,19.569c-0.589,0.107-1.317-0.102-1.613-0.867c-0.736-5.027,5.301-6.996,5.913-2.141 C42.121,14.176,39.059,15.401,38.914,19.569z"/>
+<path fill="#3F5AA6" d="M45.395,19.34c-1.25,0.758-1.071,2.543,0.112,3.248c1.859,1.107,4.099-0.848,3.027-2.625 c0.458-1.031,1.542-1.729,1.83-1.676l1.076,0.227C50.57,14.901,45.395,19.34,45.395,19.34z"/>
+<path fill="url(#_29)" d="M47.076,21.584c-0.601,0.107-1.342-0.105-1.645-0.887c-0.75-5.129,5.407-7.137,6.031-2.184 C50.348,16.081,47.225,17.331,47.076,21.584z"/>
+<path fill="#3F5AA6" d="M54.135,21.483c-1.274,0.775-1.092,2.594,0.114,3.314c1.897,1.129,4.181-0.863,3.088-2.678 c0.468-1.051,1.574-1.762,1.867-1.709l1.099,0.232C59.414,16.956,54.135,21.483,54.135,21.483z"/>
+<path fill="url(#_29)" d="M55.85,23.772c-0.611,0.111-1.367-0.107-1.676-0.902c-0.767-5.232,5.515-7.281,6.151-2.227 C59.188,18.161,56.002,19.436,55.85,23.772z"/>
+<path fill="#3F5AA6" d="M63.214,23.67c-1.275,0.775-1.093,2.596,0.114,3.314c1.897,1.131,4.181-0.863,3.088-2.678 c0.467-1.051,1.573-1.762,1.867-1.709l1.098,0.23C68.493,19.143,63.214,23.67,63.214,23.67z"/>
+<path fill="url(#_29)" d="M64.929,25.959c-0.612,0.111-1.368-0.105-1.677-0.902c-0.766-5.23,5.515-7.279,6.151-2.229 C68.267,20.348,65.081,21.624,64.929,25.959z"/>
+<linearGradient id="_33" gradientUnits="userSpaceOnUse" x1="39.98" y1="48.02" x2="38.35" y2="40.21">
+<stop stop-color="#81C7C8" offset="0"/>
+<stop stop-color="#BFDAE1" offset="0.01"/>
+<stop stop-color="#FFFFFF" offset="1"/>
+</linearGradient>
+<polygon fill="url(#_33)" points="44.766,36.286 32.146,45.174 47.337,49.641 "/>
+<linearGradient id="_34" gradientUnits="userSpaceOnUse" x1="76.2" y1="30.96" x2="76.09" y2="43.23">
+<stop stop-color="#D6E6EC" offset="0"/>
+<stop stop-color="#298595" offset="1"/>
+</linearGradient>
+<polygon fill="url(#_34)" points="78.675,30.256 82.024,34.297 83.039,41.52 80.464,45.389 69.202,39.09 "/>
+<linearGradient id="_35" gradientUnits="userSpaceOnUse" x1="32.44" y1="33.5" x2="65.81" y2="41.63">
+<stop stop-color="#D6E6EC" offset="0"/>
+<stop stop-color="#298595" offset="1"/>
+</linearGradient>
+<polygon fill="url(#_35)" points="76.59,34.737 77.632,41.426 45.104,46.104 44.105,39.893 "/>
+<linearGradient id="_36" gradientUnits="userSpaceOnUse" x1="30.73" y1="46.42" x2="88.73" y2="44.8">
+<stop stop-color="#E6EEF4" offset="0"/>
+<stop stop-color="#2F8E9A" offset="0.44"/>
+<stop stop-color="#003D6D" offset="0.94"/>
+</linearGradient>
+<polygon fill="url(#_36)" points="77.632,41.426 80.464,45.389 47.337,49.641 45.104,46.104 "/>
+<linearGradient id="_37" gradientUnits="userSpaceOnUse" x1="45.63" y1="37.46" x2="101.75" y2="28.96">
+<stop stop-color="#D6E6EC" offset="0"/>
+<stop stop-color="#298595" offset="1"/>
+</linearGradient>
+<polygon fill="url(#_37)" points="76.59,34.737 78.675,30.256 44.766,36.286 44.105,39.893 "/>
+<linearGradient id="_38" gradientUnits="userSpaceOnUse" x1="35.44" y1="45.89" x2="34.76" y2="40.93">
+<stop stop-color="#235487" offset="0"/>
+<stop stop-color="#496DA2" offset="0.5"/>
+<stop stop-color="#235487" offset="1"/>
+</linearGradient>
+<path fill="url(#_38)" d="M38.261,40.885l-6.462,4.201l7.347,2.1C38.319,46.098,37.854,42.79,38.261,40.885z"/>
+<rect fill="none" height="88" width="88"/>
+</svg>
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/cpplugins/placeholderplugin/placeholderplugin.pri Fri Mar 19 09:29:29 2010 +0200
@@ -0,0 +1,22 @@
+#
+# 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: cpplaceholderplugin source files
+#
+
+# Input
+HEADERS += src/cpplaceholderplugin.h \
+ src/cpplaceholderentryitemdata.h
+
+SOURCES += src/cpplaceholderplugin.cpp \
+ src/cpplaceholderentryitemdata.cpp
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/cpplugins/placeholderplugin/placeholderplugin.pro Fri Mar 19 09:29:29 2010 +0200
@@ -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 = lib
+TARGET = cpplaceholderplugin
+
+CONFIG += hb plugin
+
+RESOURCES += placeholderplugin.qrc
+
+include ( ../cpplugincommon.pri )
+include ( placeholderplugin.pri )
+
+symbian: {
+ TARGET.UID3 = 0X20025FE8
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/cpplugins/placeholderplugin/placeholderplugin.qrc Fri Mar 19 09:29:29 2010 +0200
@@ -0,0 +1,5 @@
+<RCC>
+ <qresource prefix="/">
+ <file>image/qgn_menu_note.svg</file>
+ </qresource>
+</RCC>
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/cpplugins/placeholderplugin/src/cpplaceholderentryitemdata.cpp Fri Mar 19 09:29:29 2010 +0200
@@ -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:
+*
+*/
+#include "cpplaceholderentryitemdata.h"
+#include <cpbasesettingview.h>
+#include <hblabel.h>
+#include <cpitemdatahelper.h>
+#include <hbdataform.h>
+
+CpPlaceholderEntryItemData::CpPlaceholderEntryItemData(CpItemDataHelper &itemDataHelper)
+: CpSettingFormEntryItemData(itemDataHelper)
+{
+ this->setEntryItemIcon(HbIcon(":/image/qgn_menu_note.svg"));
+}
+
+CpPlaceholderEntryItemData::~CpPlaceholderEntryItemData()
+{
+}
+
+CpBaseSettingView *CpPlaceholderEntryItemData::createSettingView() const
+{
+ HbDataForm *dataform = new HbDataForm();
+ dataform->setHeading(text());
+ CpBaseSettingView *view = new CpBaseSettingView(dataform);
+ return view;
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/cpplugins/placeholderplugin/src/cpplaceholderentryitemdata.h Fri Mar 19 09:29:29 2010 +0200
@@ -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:
+*
+*/
+
+#ifndef CPPLACEHOLDERENTRYITEMDATA_H
+#define CPPLACEHOLDERENTRYITEMDATA_H
+
+#include <cpsettingformentryitemdata.h>
+
+class CpItemDataHelper;
+class CpPlaceholderEntryItemData : public CpSettingFormEntryItemData
+{
+public:
+ explicit CpPlaceholderEntryItemData(CpItemDataHelper &itemDataHelper);
+ virtual ~CpPlaceholderEntryItemData();
+private:
+ virtual CpBaseSettingView *createSettingView() const;
+};
+
+#endif /* CPPLACEHOLDERENTRYITEMDATA_H */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/cpplugins/placeholderplugin/src/cpplaceholderplugin.cpp Fri Mar 19 09:29:29 2010 +0200
@@ -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:
+ *
+ */
+#include "cpplaceholderplugin.h"
+#include "cpplaceholderentryitemdata.h"
+
+CpPlaceholderPlugin::CpPlaceholderPlugin()
+{
+}
+
+CpPlaceholderPlugin::~CpPlaceholderPlugin()
+{
+}
+
+QList<CpSettingFormItemData*> CpPlaceholderPlugin::createSettingFormItemData(CpItemDataHelper &itemDataHelper) const
+{
+ return QList<CpSettingFormItemData*>() << new CpPlaceholderEntryItemData(itemDataHelper);
+}
+
+Q_EXPORT_PLUGIN2(cpplaceholderplugin, CpPlaceholderPlugin);
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/cpplugins/placeholderplugin/src/cpplaceholderplugin.h Fri Mar 19 09:29:29 2010 +0200
@@ -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:
+ *
+ */
+#ifndef CPPLACEHOLDERPLUGIN_H
+#define CPPLACEHOLDERPLUGIN_H
+
+#include <qobject.h>
+#include <cpplugininterface.h>
+
+class CpPlaceholderPlugin : public QObject, public CpPluginInterface
+{
+ Q_OBJECT
+ Q_INTERFACES(CpPluginInterface)
+public:
+ CpPlaceholderPlugin();
+ virtual ~CpPlaceholderPlugin();
+ virtual QList<CpSettingFormItemData*> createSettingFormItemData(CpItemDataHelper &itemDataHelper) const;
+};
+
+#endif //CPPLACEHOLDERPLUGIN_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/cpplugins/privacyplugin/data/cpprivacyplugin.cpcfg Fri Mar 19 09:29:29 2010 +0200
@@ -0,0 +1,14 @@
+<childplugins>
+ <plugin displayname = "Pin code" id = "0X20028731" dll = "cppincodeplugin.dll">
+ <desc></desc>
+ </plugin>
+
+ <plugin displayname = "Device lock" id = "0X20028732" dll = "cpdevicelockplugin.dll">
+ <desc></desc>
+ </plugin>
+
+ <plugin displayname = "Advanced security" id = "0X20025FDD" dll = "cpplaceholdernoiconplugin.dll">
+ <desc></desc>
+ </plugin>
+
+</childplugins>
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/cpplugins/privacyplugin/privacyplugin.pri Fri Mar 19 09:29:29 2010 +0200
@@ -0,0 +1,19 @@
+#
+# 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: cpprivacyplugin source files
+#
+
+# Input
+HEADERS += src/cpprivacyplugin.h
+SOURCES += src/cpprivacyplugin.cpp
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/cpplugins/privacyplugin/privacyplugin.pro Fri Mar 19 09:29:29 2010 +0200
@@ -0,0 +1,40 @@
+#
+# 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 = lib
+TARGET = cpprivacyplugin
+
+CONFIG += hb plugin
+
+LIBS += -lcpframework
+
+include ( ../cpplugincommon.pri )
+include ( privacyplugin.pri )
+
+symbian: {
+ TARGET.UID3 = 0x20025FE1
+}
+
+symbian {
+ deploy.path = C:
+ headers.sources = data/cpprivacyplugin.cpcfg
+ headers.path = /resource/qt/plugins/controlpanel/config
+ DEPLOYMENT += exportheaders
+
+ # This is for new exporting system coming in garden
+ for(header, headers.sources):BLD_INF_RULES.prj_exports += "./$$header $$deploy.path$$headers.path/$$basename(header)"
+}
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/cpplugins/privacyplugin/src/cpprivacyplugin.cpp Fri Mar 19 09:29:29 2010 +0200
@@ -0,0 +1,42 @@
+/*
+ * 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 "cpprivacyplugin.h"
+#include <cpcategorysettingformitemdata.h>
+#include <cpitemdatahelper.h>
+
+CpPrivacyPlugin::CpPrivacyPlugin()
+{
+
+}
+
+CpPrivacyPlugin::~CpPrivacyPlugin()
+{
+
+}
+
+QList<CpSettingFormItemData*> CpPrivacyPlugin::createSettingFormItemData(CpItemDataHelper &/*itemDataHelper*/) const
+{
+ CpCategorySettingFormItemData *itemData =
+ new CpCategorySettingFormItemData(
+ HbDataFormModelItem::GroupItem,
+ tr("Security"),
+ QString("cpprivacyplugin.cpcfg") );
+ return QList<CpSettingFormItemData*>() << itemData;
+}
+
+Q_EXPORT_PLUGIN2(cpprivacyplugin, CpPrivacyPlugin);
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/cpplugins/privacyplugin/src/cpprivacyplugin.h Fri Mar 19 09:29:29 2010 +0200
@@ -0,0 +1,34 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0""
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:
+ *
+ */
+
+#ifndef CPPRIVACYPLUGIN_H
+#define CPPRIVACYPLUGIN_H
+
+#include <cpplugininterface.h>
+#include <qobject.h>
+
+class CpPrivacyPlugin: public QObject,public CpPluginInterface
+{
+ Q_OBJECT
+ Q_INTERFACES(CpPluginInterface)
+public:
+ CpPrivacyPlugin();
+ virtual ~CpPrivacyPlugin();
+ virtual QList<CpSettingFormItemData*> createSettingFormItemData(CpItemDataHelper &itemDataHelper) const;
+};
+
+#endif /* CPPRIVACYPLUGIN_H */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/cpprofilewrapper/cpprofilewrapper.pro Fri Mar 19 09:29:29 2010 +0200
@@ -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:
+#
+
+TEMPLATE = lib
+TARGET = cpprofilewrapper
+
+CONFIG += debug_and_release
+
+win32|mac {
+ !contains(QT_CONFIG,debug)|!contains(QT_CONFIG,release) {
+ CONFIG -= debug_and_release debug release
+ contains(QT_CONFIG,debug): CONFIG+=debug
+ contains(QT_CONFIG,release):CONFIG+=release
+ }
+}
+
+CONFIG(debug, debug|release) {
+ SUBDIRPART = debug
+} else {
+ SUBDIRPART = release
+}
+
+win32 {
+ DESTDIR = C:/ControlPanel/$$SUBDIRPART/bin
+ OBJECTS_DIR = $$PWD/../$$SUBDIRPART/tmp/$$TARGET
+}
+
+# Add the output dirs to the link path too
+LIBS += -L$$DESTDIR
+
+MOC_DIR = moc
+OBJECT_DIR = obj
+RCC_DIR = rcc
+
+DEFINES += PROFILEWRAPPER_FREEZE
+
+
+HEADERS += ../inc/cpprofilemodel.h \
+ ../inc/cpprofilewrappermacro.h \
+ src/cpprofilemodel_p.h
+SOURCES += src/cpprofilemodel.cpp
+
+win32 {
+ INCLUDEPATH += $$PWD/src
+ INCLUDEPATH += ../inc
+ SOURCES += src/cpprofilemodel_win_p.cpp
+}
+
+symbian {
+ INCLUDEPATH += $$MW_LAYER_SYSTEMINCLUDE \
+ $$MOC_DIR
+
+ SOURCES += src/cpprofilemodel_p.cpp
+
+ LIBS += -lprofileeng \
+ -lcentralrepository \
+ -lcharconv
+ TARGET.CAPABILITY = All -TCB
+ TARGET.EPOCALLOWDLLDATA = 1
+ TARGET.UID3 = 0x20025FE6
+}
+
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/cpprofilewrapper/src/cpprofilemodel.cpp Fri Mar 19 09:29:29 2010 +0200
@@ -0,0 +1,262 @@
+/*
+* 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 "cpprofilemodel.h"
+#include "cpprofilemodel_p.h"
+
+CpProfileModel::CpProfileModel()
+{
+ dptr = new CpProfileModelPrivate();
+}
+
+CpProfileModel::~CpProfileModel()
+{
+ delete dptr;
+}
+
+/*
+ * Get the result of the initiation
+ */
+int CpProfileModel::initiationFlag()
+{
+ return dptr->initiationFlag();
+}
+
+/*
+ * Get profile name with its id
+ */
+QString CpProfileModel::profileName(int profileId)
+{
+ return dptr->profileName(profileId);
+}
+
+/*
+ * Activate a profile with its id, return the operation code.
+ */
+int CpProfileModel::activateProfile(int profileId)
+{
+ return dptr->activateProfile(profileId);
+}
+
+/*
+ * Get active profile's id
+ */
+int CpProfileModel::activeProfileId()
+{
+ return dptr->activeProfileId();
+}
+
+/*
+ * Get path and file name of ring tone file
+ */
+QString CpProfileModel::ringTone()
+{
+ return dptr->ringTone();
+}
+
+/*
+ * Set path and file to ring tone
+ */
+int CpProfileModel::setRingTone(const QString& filePath)
+{
+ int err = dptr->setRingTone(filePath);
+ return err;
+}
+
+/*
+ * Get path and file name of message tone file
+ */
+QString CpProfileModel::messageTone()
+{
+ return dptr->messageTone();
+}
+
+/*
+ * Set path and file to message tone
+ */
+int CpProfileModel::setMessageTone(const QString& filePath)
+{
+ int err = dptr->setMessageTone(filePath);
+ return err;
+}
+
+/*
+ * Get path and file name of email tone file
+ */
+QString CpProfileModel::emailTone()
+{
+ return dptr->emailTone();
+}
+
+/*
+ * Set path and file to email tone
+ */
+int CpProfileModel::setEmailTone(const QString& filePath)
+{
+ int err = dptr->setEmailTone(filePath);
+ return err;
+}
+
+/*
+ * Get path and file name of calendar event tone file
+ */
+QString CpProfileModel::calendarTone()
+{
+ return dptr->calendarTone();
+}
+
+/*
+ * Set path and file to calendar event tone
+ */
+void CpProfileModel::setCalendarTone(const QString& filePath)
+{
+ dptr->setCalendarTone(filePath);
+}
+
+/*
+ * Get path and file name of clock alarm tone file
+ */
+QString CpProfileModel::alarmTone()
+{
+ return dptr->alarmTone();
+}
+
+/*
+ * Set path and file to clock alarm tone
+ */
+void CpProfileModel::setAlarmTone(const QString& filePath)
+{
+ dptr->setAlarmTone(filePath);
+}
+
+/*
+ * Get the value of master volume
+ */
+int CpProfileModel::ringVolume()
+{
+ return dptr->ringVolume();
+}
+
+/*
+ * Set master volume, the value should be between 1-10
+ */
+void CpProfileModel::setRingVolume(int volume)
+{
+ dptr->setRingVolume(volume);
+}
+
+/*
+ * Activate master volume to beep
+ */
+void CpProfileModel::activateBeep()
+{
+ dptr->activateBeep();
+}
+
+/*
+ * Get beep status in master volume
+ */
+bool CpProfileModel::isBeep()
+{
+ return dptr->isBeep();
+}
+
+/*
+ * Activate master volume to silent
+ */
+void CpProfileModel::activateSilent()
+{
+ dptr->activateSilent();
+}
+
+/*
+ * Get silent status in master volume
+ */
+bool CpProfileModel::isSilent()
+{
+ return dptr->isSilent();
+}
+
+/*
+ * Get master vibra's status
+ */
+bool CpProfileModel::vibraStatus()
+{
+ return dptr->vibraStatus();
+}
+
+/*
+ * Set master vibra's status
+ */
+void CpProfileModel::setVibraStatus(bool status)
+{
+ dptr->setVibraStatus(status);
+}
+
+/*
+ * Get keypad' volume
+ */
+int CpProfileModel::keyVolume()
+{
+ return dptr->keyVolume();
+}
+
+/*
+ * Set keypad's volume,
+ * the value of the volume should be between 0-3
+ */
+void CpProfileModel::setKeyVolume(int volume)
+{
+ dptr->setKeyVolume(volume);
+}
+
+/*
+ * Get screen tone's volume
+ */
+int CpProfileModel::screenVolume()
+{
+ return dptr->screenVolume();
+}
+
+/*
+ * Set screen tone's volume,
+ * the value of the volume should be between 0-3
+ */
+void CpProfileModel::setScreenVolume(int volume)
+{
+ dptr->setScreenVolume(volume);
+}
+
+/*
+ * Get screen vibra's level
+ */
+int CpProfileModel::screenVibra()
+{
+ return dptr->screenVibra();
+}
+
+/*
+ * Set screen vibra's level,
+ * the value of the level should be between 0-3
+ */
+void CpProfileModel::setScreenVibra(int volume)
+{
+ dptr->setScreenVibra(volume);
+}
+
+// End of file
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/cpprofilewrapper/src/cpprofilemodel_p.cpp Fri Mar 19 09:29:29 2010 +0200
@@ -0,0 +1,378 @@
+/*
+* 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 "cpprofilemodel_p.h"
+#include <e32base.h>
+#include <QString>
+#include <MProfileEngineExtended.h>
+#include <MProfileExtended.h>
+#include <MProfileName.h>
+#include <MProfileTones.h>
+#include <MProfileSetTones.h>
+#include <MProfileExtraTones.h>
+#include <MProfileSetExtraTones.h>
+#include <MProfileExtraSettings.h>
+#include <MProfileSetExtraSettings.h>
+#include <MProfileFeedbackSettings.h>
+#include <MProfileSetFeedbackSettings.h>
+
+#include <TProfileToneSettings.h>
+#include <hwrmvibrasdkcrkeys.h>
+#include <centralrepository.h>
+
+
+QString stringFromDescriptor(const TDesC& dsp)
+{
+ return QString::fromUtf16(dsp.Ptr(), dsp.Length());
+}
+
+HBufC* descriptorFromString(const QString& str)
+{
+ TPtrC ptr(reinterpret_cast<const TUint16*>(str.utf16()));
+ return ptr.Alloc();
+}
+
+CpProfileModelPrivate::CpProfileModelPrivate()
+{
+ TRAPD( err,
+ mEngine = CreateProfileEngineExtendedL();
+ UpdateProfileL();
+ mVibraCenRep = CRepository::NewL( KCRUidVibraCtrl );
+ );
+ mInitErrFlag = err;
+}
+
+void CpProfileModelPrivate::UpdateProfileL()
+{
+ mProfileExt = mEngine->ProfileL( mEngine->ActiveProfileId() );
+
+ // General tones
+ TProfileToneSettings& toneSettings = mProfileExt->ProfileSetTones().SetToneSettings();
+ mToneSettings = &toneSettings;
+
+ // Feedback settings, used to get screen tone
+ const MProfileFeedbackSettings& feedback =
+ mProfileExt->ProfileExtraSettings().ProfileFeedbackSettings();
+ mFeedbackSettings = &feedback;
+
+ // Feedback settings, used to set screen tone
+ MProfileSetFeedbackSettings& setFeedback =
+ mProfileExt->ProfileSetExtraSettings().ProfileSetFeedbackSettings();
+ mSetFeedbackSettings = &setFeedback;
+}
+
+CpProfileModelPrivate::~CpProfileModelPrivate()
+{
+ delete mVibraCenRep;
+ mVibraCenRep = NULL;
+}
+
+/*
+ * Get the result of the initiation
+ */
+int CpProfileModelPrivate::initiationFlag()
+{
+ return mInitErrFlag;
+}
+
+/*
+ * Get profile name with its id
+ */
+QString CpProfileModelPrivate::profileName(int profileId)
+{
+ if ( profileId > 2 || profileId < 0 ){
+ return "";
+ }
+
+ MProfileName* name = 0;
+ TRAPD( err,
+ *name = mEngine->ProfileL(profileId)->ProfileName();
+ );
+
+ if (name){
+ return stringFromDescriptor( name->Name() );
+ } else {
+ return "";
+ }
+
+}
+
+/*
+ * Activate a profile with its id, return the operation code.
+ */
+int CpProfileModelPrivate::activateProfile(int profileId)
+{
+ if ( profileId > 2 || profileId < 0 ){
+ return -1;
+ }
+
+ TRAPD( err,
+ mEngine->SetActiveProfileL( profileId );
+ UpdateProfileL();
+ );
+ return err;
+}
+
+/*
+ * Get active profile's id
+ */
+int CpProfileModelPrivate::activeProfileId()
+{
+ return mEngine->ActiveProfileId();
+}
+
+/*
+ * Get path and file name of ring tone file
+ */
+QString CpProfileModelPrivate::ringTone()
+{
+ return stringFromDescriptor( mProfileExt->ProfileTones().RingingTone1() );
+}
+
+/*
+ * Set path and file to ring tone
+ */
+int CpProfileModelPrivate::setRingTone(const QString& filePath)
+{
+ TRAPD(err, mProfileExt->ProfileSetTones().SetRingingTone1L( *descriptorFromString(filePath) ));
+ commitChange();
+ return err;
+}
+
+/*
+ * Get path and file name of message tone file
+ */
+QString CpProfileModelPrivate::messageTone()
+{
+ return stringFromDescriptor( mProfileExt->ProfileTones().MessageAlertTone() );
+}
+
+/*
+ * Set path and file to message tone
+ */
+int CpProfileModelPrivate::setMessageTone(const QString& filePath)
+{
+ TRAPD(err, mProfileExt->ProfileSetTones().SetMessageAlertToneL( *descriptorFromString(filePath) ));
+ commitChange();
+ return err;
+}
+
+/*
+ * Get path and file name of email tone file
+ */
+QString CpProfileModelPrivate::emailTone()
+{
+ return stringFromDescriptor( mProfileExt->ProfileExtraTones().EmailAlertTone() );
+}
+
+/*
+ * Set path and file to email tone
+ */
+int CpProfileModelPrivate::setEmailTone(const QString& filePath)
+{
+ TRAPD(err, mProfileExt->ProfileSetExtraTones().SetEmailAlertToneL( *descriptorFromString(filePath) ));
+ commitChange();
+ return err;
+}
+
+/*
+ * Get path and file name of calendar event tone file
+ */
+QString CpProfileModelPrivate::calendarTone()
+{
+ return "";
+}
+
+/*
+ * Set path and file to calendar event tone
+ */
+void CpProfileModelPrivate::setCalendarTone(const QString& filePath)
+{
+ Q_UNUSED(filePath);
+}
+
+/*
+ * Get path and file name of clock alarm tone file
+ */
+QString CpProfileModelPrivate::alarmTone()
+{
+ return "";
+}
+
+/*
+ * Set path and file to clock alarm tone
+ */
+void CpProfileModelPrivate::setAlarmTone(const QString& filePath)
+{
+ Q_UNUSED(filePath);
+}
+
+/*
+ * Get the value of master volume
+ */
+int CpProfileModelPrivate::ringVolume()
+{
+ return mToneSettings->iRingingVolume;
+}
+
+/*
+ * Set master volume, the value should be between 1-10
+ */
+void CpProfileModelPrivate::setRingVolume(int volume)
+{
+ if (volume < 0 || volume >10)
+ {
+ return;
+ }
+
+ mToneSettings->iRingingType = EProfileRingingTypeRinging;
+ mToneSettings->iRingingVolume = volume;
+ commitChange();
+}
+
+/*
+ * Activate master volume to beep
+ */
+void CpProfileModelPrivate::activateBeep()
+{
+ mToneSettings->iRingingType = EProfileRingingTypeBeepOnce;
+ commitChange();
+}
+
+/*
+ * Get beep status in master volume
+ */
+bool CpProfileModelPrivate::isBeep()
+{
+ return (EProfileRingingTypeBeepOnce == mToneSettings->iRingingType) ? true : false;
+}
+
+/*
+ * Activate master volume to silent
+ */
+void CpProfileModelPrivate::activateSilent()
+{
+ mToneSettings->iRingingType = EProfileRingingTypeSilent;
+ commitChange();
+}
+
+/*
+ * Get silent status in master volume
+ */
+bool CpProfileModelPrivate::isSilent()
+{
+ return (EProfileRingingTypeSilent == mToneSettings->iRingingType) ? true : false;
+}
+
+/*
+ * Get master vibra's status
+ */
+bool CpProfileModelPrivate::vibraStatus()
+{
+ return mToneSettings->iVibratingAlert;
+}
+
+/*
+ * Set master vibra's status
+ */
+void CpProfileModelPrivate::setVibraStatus(bool status)
+{
+ mVibraCenRep->Set(KVibraCtrlProfileVibraEnabled, status );
+ mToneSettings->iVibratingAlert = status;
+ commitChange();
+}
+
+/*
+ * Get keypad' volume
+ */
+int CpProfileModelPrivate::keyVolume()
+{
+ return mToneSettings->iKeypadVolume;
+}
+
+/*
+ * Set keypad's volume,
+ * the value of the volume should be between 0-3
+ */
+void CpProfileModelPrivate::setKeyVolume(int volume)
+{
+ if (volume < 0 || volume > 3)
+ {
+ return;
+ }
+
+ mToneSettings->iKeypadVolume = (TProfileKeypadVolume)volume;
+ commitChange();
+}
+
+/*
+ * Get screen tone's volume
+ */
+int CpProfileModelPrivate::screenVolume()
+{
+ return mFeedbackSettings->AudioFeedback();
+}
+
+/*
+ * Set screen tone's volume,
+ * the value of the volume should be between 0-3
+ */
+void CpProfileModelPrivate::setScreenVolume(int volume)
+{
+ if (volume < 0 || volume > 3)
+ {
+ return;
+ }
+
+ mSetFeedbackSettings->SetAudioFeedback( (TProfileAudioFeedback)volume );
+ commitChange();
+}
+
+/*
+ * Get screen vibra's level
+ */
+int CpProfileModelPrivate::screenVibra()
+{
+ return mFeedbackSettings->TactileFeedback();
+}
+
+/*
+ * Set screen vibra's level,
+ * the value of the level should be between 0-3
+ */
+void CpProfileModelPrivate::setScreenVibra(int volume)
+{
+ if (volume < 0 || volume > 3)
+ {
+ return;
+ }
+
+ mSetFeedbackSettings->SetTactileFeedback( (TProfileTactileFeedback)volume );
+ commitChange();
+}
+
+/*
+ * Commit changes when change settings value in profile.
+ */
+int CpProfileModelPrivate::commitChange()
+{
+ TRAPD( err, mEngine->CommitChangeL(*mProfileExt) );
+ return err;
+}
+
+// End of file
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/cpprofilewrapper/src/cpprofilemodel_p.h Fri Mar 19 09:29:29 2010 +0200
@@ -0,0 +1,83 @@
+/*
+* 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 CPPROFILEMODEL_P_H
+#define CPPROFILEMODEL_P_H
+
+#include <qglobal.h>
+
+class MProfileEngineExtended;
+class MProfileExtended;
+class MProfileFeedbackSettings;
+class MProfileSetFeedbackSettings;
+class CRepository;
+struct TProfileToneSettings;
+
+
+class CpProfileModelPrivate
+ {
+public:
+ CpProfileModelPrivate();
+ ~CpProfileModelPrivate();
+
+public:
+ int initiationFlag();
+ QString profileName(int profileId);
+ int activateProfile(int profileId);
+ int activeProfileId();
+ QString ringTone();
+ int setRingTone(const QString& filePath);
+ QString messageTone();
+ int setMessageTone(const QString& filePath);
+ QString emailTone();
+ int setEmailTone(const QString& filePath);
+ QString calendarTone();
+ void setCalendarTone(const QString& filePath);
+ QString alarmTone();
+ void setAlarmTone(const QString& filePath);
+ int ringVolume();
+ void setRingVolume(int volume);
+ void activateBeep();
+ bool isBeep();
+ void activateSilent();
+ bool isSilent();
+ bool vibraStatus();
+ void setVibraStatus(bool status);
+ int keyVolume();
+ void setKeyVolume(int volume);
+ int screenVolume();
+ void setScreenVolume(int volume);
+ int screenVibra();
+ void setScreenVibra(int volume);
+
+#ifdef Q_OS_SYMBIAN
+private:
+ void UpdateProfileL();
+ int commitChange();
+
+private:
+ MProfileEngineExtended* mEngine;
+ MProfileExtended* mProfileExt;
+ TProfileToneSettings* mToneSettings;
+ const MProfileFeedbackSettings* mFeedbackSettings;
+ MProfileSetFeedbackSettings* mSetFeedbackSettings;
+ CRepository* mVibraCenRep;
+ bool mInitErrFlag;
+#endif // Q_OS_SYMBIAN
+ };
+
+#endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/cpprofilewrapper/src/cpprofilemodel_win_p.cpp Fri Mar 19 09:29:29 2010 +0200
@@ -0,0 +1,261 @@
+/*
+* 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 "cpprofilemodel_p.h"
+#include <QString>
+
+CpProfileModelPrivate::CpProfileModelPrivate()
+{
+}
+
+CpProfileModelPrivate::~CpProfileModelPrivate()
+{
+}
+
+/*
+ * Get the result of the initiation
+ */
+int CpProfileModelPrivate::initiationFlag()
+{
+ return -1;
+}
+
+/*
+ * Get profile name with its id
+ */
+QString CpProfileModelPrivate::profileName(int profileId)
+{
+ Q_UNUSED(profileId);
+ return "";
+}
+
+/*
+ * Activate a profile with its id, return the operation code.
+ */
+int CpProfileModelPrivate::activateProfile(int profileId)
+{
+ Q_UNUSED(profileId);
+ return -1;
+}
+
+/*
+ * Get active profile's id
+ */
+int CpProfileModelPrivate::activeProfileId()
+{
+ return -1;
+}
+
+/*
+ * Get path and file name of ring tone file
+ */
+QString CpProfileModelPrivate::ringTone()
+{
+ return "";
+}
+
+/*
+ * Set path and file to ring tone
+ */
+int CpProfileModelPrivate::setRingTone(const QString& filePath)
+{
+ Q_UNUSED(filePath);
+ return -1;
+}
+
+/*
+ * Get path and file name of message tone file
+ */
+QString CpProfileModelPrivate::messageTone()
+{
+ return "";
+}
+
+/*
+ * Set path and file to message tone
+ */
+int CpProfileModelPrivate::setMessageTone(const QString& filePath)
+{
+ Q_UNUSED(filePath);
+ return -1;
+}
+
+/*
+ * Get path and file name of email tone file
+ */
+QString CpProfileModelPrivate::emailTone()
+{
+ return "";
+}
+
+/*
+ * Set path and file to email tone
+ */
+int CpProfileModelPrivate::setEmailTone(const QString& filePath)
+{
+ Q_UNUSED(filePath);
+ return -1;
+}
+
+/*
+ * Get path and file name of calendar event tone file
+ */
+QString CpProfileModelPrivate::calendarTone()
+{
+ return "";
+}
+
+/*
+ * Set path and file to calendar event tone
+ */
+void CpProfileModelPrivate::setCalendarTone(const QString& filePath)
+{
+ Q_UNUSED(filePath);
+}
+
+/*
+ * Get path and file name of clock alarm tone file
+ */
+QString CpProfileModelPrivate::alarmTone()
+{
+ return "";
+}
+
+/*
+ * Set path and file to clock alarm tone
+ */
+void CpProfileModelPrivate::setAlarmTone(const QString& filePath)
+{
+ Q_UNUSED(filePath);
+}
+
+/*
+ * Get the value of master volume
+ */
+int CpProfileModelPrivate::ringVolume()
+{
+ return -1;
+}
+
+/*
+ * Set master volume, the value should be between 1-10
+ */
+void CpProfileModelPrivate::setRingVolume(int volume)
+{
+ Q_UNUSED(volume);
+}
+
+/*
+ * Activate master volume to beep
+ */
+void CpProfileModelPrivate::activateBeep()
+{;
+}
+
+/*
+ * Get beep status in master volume
+ */
+bool CpProfileModelPrivate::isBeep()
+{
+ return false;
+}
+
+/*
+ * Activate master volume to silent
+ */
+void CpProfileModelPrivate::activateSilent()
+{
+}
+
+/*
+ * Get silent status in master volume
+ */
+bool CpProfileModelPrivate::isSilent()
+{
+ return false;
+}
+
+/*
+ * Get master vibra's status
+ */
+bool CpProfileModelPrivate::vibraStatus()
+{
+ return false;
+}
+
+/*
+ * Set master vibra's status
+ */
+void CpProfileModelPrivate::setVibraStatus(bool status)
+{
+ Q_UNUSED(status);
+}
+
+/*
+ * Get keypad' volume
+ */
+int CpProfileModelPrivate::keyVolume()
+{
+ return -1;
+}
+
+/*
+ * Set keypad's volume,
+ * the value of the volume should be between 0-3
+ */
+void CpProfileModelPrivate::setKeyVolume(int volume)
+{
+ Q_UNUSED(volume);
+}
+
+/*
+ * Get screen tone's volume
+ */
+int CpProfileModelPrivate::screenVolume()
+{
+ return -1;
+}
+
+/*
+ * Set screen tone's volume,
+ * the value of the volume should be between 0-3
+ */
+void CpProfileModelPrivate::setScreenVolume(int volume)
+{
+ Q_UNUSED(volume);
+}
+
+/*
+ * Get screen vibra's level
+ */
+int CpProfileModelPrivate::screenVibra()
+{
+ return -1;
+}
+
+/*
+ * Set screen vibra's level,
+ * the value of the level should be between 0-3
+ */
+void CpProfileModelPrivate::setScreenVibra(int volume)
+{
+ Q_UNUSED(volume);
+}
+
+
+// End of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/eabi/cpcategorymodelu.def Fri Mar 19 09:29:29 2010 +0200
@@ -0,0 +1,36 @@
+EXPORTS
+ _ZN26CpCategorySettingFormModel10initializeER16CpItemDataHelper @ 1 NONAME
+ _ZN26CpCategorySettingFormModel11qt_metacallEN11QMetaObject4CallEiPPv @ 2 NONAME
+ _ZN26CpCategorySettingFormModel11qt_metacastEPKc @ 3 NONAME
+ _ZN26CpCategorySettingFormModel16staticMetaObjectE @ 4 NONAME DATA 16
+ _ZN26CpCategorySettingFormModel19getStaticMetaObjectEv @ 5 NONAME
+ _ZN26CpCategorySettingFormModel25afterLoadingConfigPluginsER16CpItemDataHelper @ 6 NONAME
+ _ZN26CpCategorySettingFormModel26beforeLoadingConfigPluginsER16CpItemDataHelper @ 7 NONAME
+ _ZN26CpCategorySettingFormModelC1ERK7QString @ 8 NONAME
+ _ZN26CpCategorySettingFormModelC2ERK7QString @ 9 NONAME
+ _ZN26CpCategorySettingFormModelD0Ev @ 10 NONAME
+ _ZN26CpCategorySettingFormModelD1Ev @ 11 NONAME
+ _ZN26CpCategorySettingFormModelD2Ev @ 12 NONAME
+ _ZN29CpCategorySettingFormItemData10initializeER16CpItemDataHelper @ 13 NONAME
+ _ZN29CpCategorySettingFormItemData11qt_metacallEN11QMetaObject4CallEiPPv @ 14 NONAME
+ _ZN29CpCategorySettingFormItemData11qt_metacastEPKc @ 15 NONAME
+ _ZN29CpCategorySettingFormItemData16staticMetaObjectE @ 16 NONAME DATA 16
+ _ZN29CpCategorySettingFormItemData19getStaticMetaObjectEv @ 17 NONAME
+ _ZN29CpCategorySettingFormItemData25afterLoadingConfigPluginsER16CpItemDataHelper @ 18 NONAME
+ _ZN29CpCategorySettingFormItemData26beforeLoadingConfigPluginsER16CpItemDataHelper @ 19 NONAME
+ _ZN29CpCategorySettingFormItemDataC1EN19HbDataFormModelItem12DataItemTypeERK7QStringS4_PKS0_ @ 20 NONAME
+ _ZN29CpCategorySettingFormItemDataC1ERK7QStringPK19HbDataFormModelItem @ 21 NONAME
+ _ZN29CpCategorySettingFormItemDataC2EN19HbDataFormModelItem12DataItemTypeERK7QStringS4_PKS0_ @ 22 NONAME
+ _ZN29CpCategorySettingFormItemDataC2ERK7QStringPK19HbDataFormModelItem @ 23 NONAME
+ _ZN29CpCategorySettingFormItemDataD0Ev @ 24 NONAME
+ _ZN29CpCategorySettingFormItemDataD1Ev @ 25 NONAME
+ _ZN29CpCategorySettingFormItemDataD2Ev @ 26 NONAME
+ _ZNK26CpCategorySettingFormModel10metaObjectEv @ 27 NONAME
+ _ZNK29CpCategorySettingFormItemData10metaObjectEv @ 28 NONAME
+ _ZTI26CpCategorySettingFormModel @ 29 NONAME
+ _ZTI29CpCategorySettingFormItemData @ 30 NONAME
+ _ZTV26CpCategorySettingFormModel @ 31 NONAME
+ _ZTV29CpCategorySettingFormItemData @ 32 NONAME
+ _ZThn8_N29CpCategorySettingFormItemDataD0Ev @ 33 NONAME
+ _ZThn8_N29CpCategorySettingFormItemDataD1Ev @ 34 NONAME
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/eabi/cpprofilewrapperu.def Fri Mar 19 09:29:29 2010 +0200
@@ -0,0 +1,34 @@
+EXPORTS
+ _ZN14CpProfileModel10ringVolumeEv @ 1 NONAME
+ _ZN14CpProfileModel11messageToneEv @ 2 NONAME
+ _ZN14CpProfileModel11profileNameEi @ 3 NONAME
+ _ZN14CpProfileModel11screenVibraEv @ 4 NONAME
+ _ZN14CpProfileModel11setRingToneERK7QString @ 5 NONAME
+ _ZN14CpProfileModel11vibraStatusEv @ 6 NONAME
+ _ZN14CpProfileModel12activateBeepEv @ 7 NONAME
+ _ZN14CpProfileModel12calendarToneEv @ 8 NONAME
+ _ZN14CpProfileModel12screenVolumeEv @ 9 NONAME
+ _ZN14CpProfileModel12setAlarmToneERK7QString @ 10 NONAME
+ _ZN14CpProfileModel12setEmailToneERK7QString @ 11 NONAME
+ _ZN14CpProfileModel12setKeyVolumeEi @ 12 NONAME
+ _ZN14CpProfileModel13setRingVolumeEi @ 13 NONAME
+ _ZN14CpProfileModel14activateSilentEv @ 14 NONAME
+ _ZN14CpProfileModel14initiationFlagEv @ 15 NONAME
+ _ZN14CpProfileModel14setMessageToneERK7QString @ 16 NONAME
+ _ZN14CpProfileModel14setScreenVibraEi @ 17 NONAME
+ _ZN14CpProfileModel14setVibraStatusEb @ 18 NONAME
+ _ZN14CpProfileModel15activateProfileEi @ 19 NONAME
+ _ZN14CpProfileModel15activeProfileIdEv @ 20 NONAME
+ _ZN14CpProfileModel15setCalendarToneERK7QString @ 21 NONAME
+ _ZN14CpProfileModel15setScreenVolumeEi @ 22 NONAME
+ _ZN14CpProfileModel6isBeepEv @ 23 NONAME
+ _ZN14CpProfileModel8isSilentEv @ 24 NONAME
+ _ZN14CpProfileModel8ringToneEv @ 25 NONAME
+ _ZN14CpProfileModel9alarmToneEv @ 26 NONAME
+ _ZN14CpProfileModel9emailToneEv @ 27 NONAME
+ _ZN14CpProfileModel9keyVolumeEv @ 28 NONAME
+ _ZN14CpProfileModelC1Ev @ 29 NONAME
+ _ZN14CpProfileModelC2Ev @ 30 NONAME
+ _ZN14CpProfileModelD1Ev @ 31 NONAME
+ _ZN14CpProfileModelD2Ev @ 32 NONAME
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/eabi/seccodeuiu.def Fri Mar 19 09:29:29 2010 +0200
@@ -0,0 +1,37 @@
+EXPORTS
+ _ZN15SecCodeSettings11qt_metacallEN11QMetaObject4CallEiPPv @ 1 NONAME
+ _ZN15SecCodeSettings11qt_metacastEPKc @ 2 NONAME
+ _ZN15SecCodeSettings13changePinCodeEv @ 3 NONAME
+ _ZN15SecCodeSettings14changePin2CodeEv @ 4 NONAME
+ _ZN15SecCodeSettings16staticMetaObjectE @ 5 NONAME DATA 16
+ _ZN15SecCodeSettings17setPinCodeRequestEb @ 6 NONAME
+ _ZN15SecCodeSettings19getStaticMetaObjectEv @ 7 NONAME
+ _ZN15SecCodeSettingsC1EP7QObject @ 8 NONAME
+ _ZN15SecCodeSettingsC2EP7QObject @ 9 NONAME
+ _ZN15SecCodeSettingsD0Ev @ 10 NONAME
+ _ZN15SecCodeSettingsD1Ev @ 11 NONAME
+ _ZN15SecCodeSettingsD2Ev @ 12 NONAME
+ _ZN27SecCodeEditDataFormViewItem10createItemEv @ 13 NONAME
+ _ZN27SecCodeEditDataFormViewItem11qt_metacallEN11QMetaObject4CallEiPPv @ 14 NONAME
+ _ZN27SecCodeEditDataFormViewItem11qt_metacastEPKc @ 15 NONAME
+ _ZN27SecCodeEditDataFormViewItem16staticMetaObjectE @ 16 NONAME DATA 16
+ _ZN27SecCodeEditDataFormViewItem18createCustomWidgetEv @ 17 NONAME
+ _ZN27SecCodeEditDataFormViewItem19getStaticMetaObjectEv @ 18 NONAME
+ _ZN27SecCodeEditDataFormViewItemC1EP13QGraphicsItem @ 19 NONAME
+ _ZN27SecCodeEditDataFormViewItemC2EP13QGraphicsItem @ 20 NONAME
+ _ZN27SecCodeEditDataFormViewItemD0Ev @ 21 NONAME
+ _ZN27SecCodeEditDataFormViewItemD1Ev @ 22 NONAME
+ _ZN27SecCodeEditDataFormViewItemD2Ev @ 23 NONAME
+ _ZNK15SecCodeSettings10metaObjectEv @ 24 NONAME
+ _ZNK15SecCodeSettings14pinCodeRequestEv @ 25 NONAME
+ _ZNK27SecCodeEditDataFormViewItem10metaObjectEv @ 26 NONAME
+ _ZNK27SecCodeEditDataFormViewItem16canSetModelIndexERK11QModelIndex @ 27 NONAME
+ _ZTI15SecCodeSettings @ 28 NONAME
+ _ZTI27SecCodeEditDataFormViewItem @ 29 NONAME
+ _ZTV15SecCodeSettings @ 30 NONAME
+ _ZTV27SecCodeEditDataFormViewItem @ 31 NONAME
+ _ZThn16_N27SecCodeEditDataFormViewItemD0Ev @ 32 NONAME
+ _ZThn16_N27SecCodeEditDataFormViewItemD1Ev @ 33 NONAME
+ _ZThn8_N27SecCodeEditDataFormViewItemD0Ev @ 34 NONAME
+ _ZThn8_N27SecCodeEditDataFormViewItemD1Ev @ 35 NONAME
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/inc/cpcategoryglobal.h Fri Mar 19 09:29:29 2010 +0200
@@ -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:
+*
+*/
+
+#ifndef CP_CATEGORY_GLOBAL_H
+#define CP_CATEGORY_GLOBAL_H
+
+#include <QtGlobal>
+
+#ifdef BUILD_CPCATEGORY_GLOBAL
+ #define CP_CATEGORY_EXPORT Q_DECL_EXPORT
+#else
+ #define CP_CATEGORY_EXPORT Q_DECL_IMPORT
+#endif
+
+#endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/inc/cpcategorysettingformitemdata.h Fri Mar 19 09:29:29 2010 +0200
@@ -0,0 +1,46 @@
+/*
+* 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 CPCATEGORYSETTINGFORMITEMDATA_H
+#define CPCATEGORYSETTINGFORMITEMDATA_H
+
+#include <cpcategoryglobal.h>
+#include <cpsettingformitemdata.h>
+
+class CpCategorySettingFormItemDataPrivate;
+class CP_CATEGORY_EXPORT CpCategorySettingFormItemData : public CpSettingFormItemData
+{
+ Q_OBJECT
+public:
+ CpCategorySettingFormItemData(HbDataFormModelItem::DataItemType type,
+ const QString &label,
+ const QString &configFile,
+ const HbDataFormModelItem *parent = 0);
+
+ explicit CpCategorySettingFormItemData(const QString &configFile = QString(),
+ const HbDataFormModelItem *parent = 0);
+
+ virtual ~CpCategorySettingFormItemData();
+
+ void initialize(CpItemDataHelper &itemDataHelper);
+private:
+ virtual void beforeLoadingConfigPlugins(CpItemDataHelper &itemDataHelper);
+ virtual void afterLoadingConfigPlugins(CpItemDataHelper &itemDataHelper);
+private:
+ CpCategorySettingFormItemDataPrivate *d;
+};
+
+#endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/inc/cpcategorysettingformmodel.h Fri Mar 19 09:29:29 2010 +0200
@@ -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:
+*
+*/
+#ifndef CPCATEGORYSETTINGFORMMODEL_H
+#define CPCATEGORYSETTINGFORMMODEL_H
+
+#include <cpcategoryglobal.h>
+#include <hbdataformmodel.h>
+
+class CpItemDataHelper;
+class CpCategorySettingFormModelPrivate;
+
+class CP_CATEGORY_EXPORT CpCategorySettingFormModel : public HbDataFormModel
+{
+ Q_OBJECT
+public:
+ explicit CpCategorySettingFormModel(const QString &configFile);
+ virtual ~CpCategorySettingFormModel();
+ virtual void initialize(CpItemDataHelper &itemDataHelper);
+private:
+ virtual void beforeLoadingConfigPlugins(CpItemDataHelper &itemDataHelper);
+ virtual void afterLoadingConfigPlugins(CpItemDataHelper &itemDataHelper);
+private:
+ CpCategorySettingFormModelPrivate *d;
+};
+
+
+#endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/inc/cpprofilemodel.h Fri Mar 19 09:29:29 2010 +0200
@@ -0,0 +1,77 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0""
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#ifndef CPPROFILEMODEL_H
+#define CPPROFILEMODEL_H
+
+#include "cpprofilewrappermacro.h"
+#include <QtCore/qglobal.h>
+#include <QString>
+
+class CpProfileModelPrivate;
+
+enum ProfileWrapperProfileId
+ {
+ EProfileWrapperGeneralId = 0,
+ EProfileWrapperSilentId = 1,
+ EProfileWrapperMeetingId = 2
+ };
+
+class PROFILE_WRAPPER_EXPORT CpProfileModel
+ {
+public:
+ CpProfileModel();
+ ~CpProfileModel();
+
+public:
+ int initiationFlag();
+ QString profileName(int profileId);
+ int activateProfile(int profileId);
+ int activeProfileId();
+ QString ringTone();
+ int setRingTone(const QString& filePath);
+ QString messageTone();
+ int setMessageTone(const QString& filePath);
+ QString emailTone();
+ int setEmailTone(const QString& filePath);
+ QString calendarTone();
+ void setCalendarTone(const QString& filePath);
+ QString alarmTone();
+ void setAlarmTone(const QString& filePath);
+ int ringVolume();
+ void setRingVolume(int volume);
+ void activateBeep();
+ bool isBeep();
+ void activateSilent();
+ bool isSilent();
+ bool vibraStatus();
+ void setVibraStatus(bool status);
+ int keyVolume();
+ void setKeyVolume(int volume);
+ int screenVolume();
+ void setScreenVolume(int volume);
+ int screenVibra();
+ void setScreenVibra(int volume);
+
+private:
+ Q_DISABLE_COPY(CpProfileModel)
+
+private:
+ CpProfileModelPrivate* dptr;
+ };
+
+#endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/inc/cpprofilewrappermacro.h Fri Mar 19 09:29:29 2010 +0200
@@ -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:
+*
+*/
+
+#ifndef CP_PROFILEWRAPPER_MACRO_H
+#define CP_PROFILEWRAPPER_MACRO_H
+
+#include <QtGlobal>
+
+#ifdef PROFILEWRAPPER_FREEZE
+ #define PROFILE_WRAPPER_EXPORT Q_DECL_EXPORT
+#else
+ #define PROFILE_WRAPPER_EXPORT Q_DECL_IMPORT
+#endif
+
+#endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/inc/cpuids.h Fri Mar 19 09:29:29 2010 +0200
@@ -0,0 +1,57 @@
+/*
+* 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:
+* Contains all QT comtrol pannel related formal uids
+*
+*/
+#ifndef QCPUIDS_H
+#define QCPUIDS_H
+
+#define QUID_CONTROLPANNEL_UI 0X20025FD9
+#define QUID_CPFRAMEWORK_DLL 0X20025FDA
+#define QUID_CPPLUGIN_APPSETTINGS 0X20025FDC
+#define QUID_CPPLUGIN_PLACEHOLDER_NOICON 0X20025FDD
+#define QUID_CPPLUGIN_KEYTOUCH 0X20025FDE
+#define QUID_CPPLUGIN_COMMUNICATION 0X20025FDF
+#define QUID_CPPPLUGIN_LOOKFEEL 0X20025FE0
+#define QUID_CPPLUGIN_SAMPLEVIEW 0X20025FE2
+#define QUID_CPPLUGIN_SAMPLEGROUP 0X20025FE3
+#define QUID_CPPLUGIN_PRIVACY 0X20025FE1
+#define QUID_CPPLUGIN_THEME 0X20025FDB
+#define QUID_CPPLUGIN_TONES 0X20025FE4
+#define QUID_CPPLUGIN_PERSONALIZATION 0X20025FE5
+#define QUID_CPPROFILEENGWRAPPER 0X20025FE6
+#define QUID_CPPLUGIN_DEVICE 0X20025FE7
+#define QUID_CPPLUGIN_PLACEHOLDER 0X20025FE8
+
+#define QUID_CPPLUGIN_PINCODE 0X20028731
+#define QUID_CPPLUGIN_DEVICELOCK 0X20028732
+#define QUID_SECCODEUI 0X20028733
+#define QUID_LOGGER 0X20028734
+#define QUID_CPPLUGIN_DISPLAY 0X20028735
+
+
+#define QUID_CPCATEGORYMODEL_DLL 0X20028736
+#define QUID_RESERVED4 0X20028737
+#define QUID_RESERVED5 0X20028738
+#define QUID_RESERVED6 0X20028739
+#define QUID_RESERVED7 0X2002873A
+#define QUID_RESERVED8 0X2002873B
+#define QUID_RESERVED9 0X2002873C
+#define QUID_RESERVED10 0X2002873D
+#define QUID_RESERVED11 0X2002873E
+#define QUID_RESERVED12 0X2002873F
+#define QUID_DE_GSPLUGIN 0X20028740 //reserved by 9.2
+
+#endif //QCPUIDS_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/inc/inc.pri Fri Mar 19 09:29:29 2010 +0200
@@ -0,0 +1,21 @@
+#
+# 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:
+#
+
+INTERNAL_HEADERS += $$PWD/cpcategorysettingformmodel.h \
+ $$PWD/cpcategorysettingformitemdata.h \
+ $$PWD/cpcategoryglobal.h
+
+HEADERS += $$INTERNAL_HEADERS
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/seccodeui/seccodeui.pri Fri Mar 19 09:29:29 2010 +0200
@@ -0,0 +1,38 @@
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description: seccodeui source files
+#
+
+# Input
+HEADERS += src/seccodesettings.h \
+ src/seccodeuiutility.h \
+ src/seccodeedit.h \
+ src/seccodeeditdataformviewitem.h \
+ src/seccodemodel.h \
+ src/seccodemodel_p.h
+
+
+SOURCES += src/seccodesettings.cpp \
+ src/seccodeuiutility.cpp \
+ src/seccodeedit.cpp \
+ src/seccodeeditdataformviewitem.cpp \
+ src/seccodemodel.cpp
+
+symbian : {
+ SOURCES += src/seccodemodel_symbian.cpp
+}
+
+win32 : {
+ SOURCES += src/seccodemodel_win.cpp
+}
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/seccodeui/seccodeui.pro Fri Mar 19 09:29:29 2010 +0200
@@ -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:
+#
+
+TEMPLATE = lib
+TARGET = seccodeui
+
+CONFIG += hb
+
+DEFINES += BUILD_SECCODEUI
+
+MOC_DIR = moc
+OBJECT_DIR = obj
+RCC_DIR = rcc
+
+include ( seccodeui.pri )
+
+CONFIG(debug, debug|release) {
+ SUBDIRPART = debug
+} else {
+ SUBDIRPART = release
+}
+
+win32: {
+ DESTDIR = C:/ControlPanel/$$SUBDIRPART/bin
+ OBJECTS_DIR = $$PWD/../$$SUBDIRPART/tmp/$$TARGET
+}
+
+# Add the output dirs to the link path too
+LIBS += -L$$DESTDIR
+
+symbian: {
+ INCLUDEPATH += $$MW_LAYER_SYSTEMINCLUDE
+ INCLUDEPATH += $$MOC_DIR
+ TARGET.CAPABILITY = ALL -TCB
+ TARGET.EPOCALLOWDLLDATA = 1
+ TARGET.UID3 = 0x20028733
+}
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/seccodeui/src/seccodeedit.cpp Fri Mar 19 09:29:29 2010 +0200
@@ -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:
+*
+*/
+
+#include "seccodeedit.h"
+#include <QGraphicsSceneMouseEvent>
+
+SecCodeEdit::SecCodeEdit(const QString &text, QGraphicsItem *parent /*= 0*/)
+: HbLineEdit(text,parent)
+{
+}
+
+SecCodeEdit::~SecCodeEdit()
+{
+}
+
+void SecCodeEdit::mousePressEvent(QGraphicsSceneMouseEvent *event)
+{
+ if (event->button() != Qt::LeftButton) {
+ event->ignore();
+ return;
+ }
+
+ if (rect().contains(event->pos())) {
+ emit clicked();
+ event->accept();
+ }
+ else {
+ event->ignore();
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/seccodeui/src/seccodeedit.h Fri Mar 19 09:29:29 2010 +0200
@@ -0,0 +1,34 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0""
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#ifndef SECCODEEDIT_H
+#define SECCODEEDIT_H
+
+#include <hblineedit.h>
+
+class SecCodeEdit : public HbLineEdit
+{
+ Q_OBJECT
+public:
+ explicit SecCodeEdit(const QString &text, QGraphicsItem *parent = 0);
+ virtual ~SecCodeEdit();
+ void mousePressEvent(QGraphicsSceneMouseEvent *event);
+signals:
+ void clicked();
+};
+
+#endif //SECCODEEDIT_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/seccodeui/src/seccodeeditdataformviewitem.cpp Fri Mar 19 09:29:29 2010 +0200
@@ -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:
+*
+*/
+#include "seccodeeditdataformviewitem.h"
+#include "seccodeedit.h"
+
+SecCodeEditDataFormViewItem::SecCodeEditDataFormViewItem(QGraphicsItem *parent )
+: HbDataFormViewItem(parent)
+{
+}
+
+SecCodeEditDataFormViewItem::~SecCodeEditDataFormViewItem()
+{
+}
+
+HbAbstractViewItem* SecCodeEditDataFormViewItem::createItem()
+{
+ return new SecCodeEditDataFormViewItem(*this);
+}
+
+bool SecCodeEditDataFormViewItem::canSetModelIndex(const QModelIndex &index) const
+{
+ int type = index.data(HbDataFormModelItem::ItemTypeRole).toInt();
+ return type == SecCodeEditItem;
+}
+
+HbWidget *SecCodeEditDataFormViewItem::createCustomWidget()
+{
+ int type = modelIndex().data(HbDataFormModelItem::ItemTypeRole).toInt();
+
+ if (type == SecCodeEditItem) {
+ SecCodeEdit *edit = new SecCodeEdit("1234");
+ edit->setEchoMode(HbLineEdit::Password );
+ edit->setReadOnly(true);
+ return edit;
+ }
+
+ return 0;
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/seccodeui/src/seccodeeditdataformviewitem.h Fri Mar 19 09:29:29 2010 +0200
@@ -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:
+*
+*/
+
+#ifndef SECCODEEDITDATAFORMVIEWITEM_H
+#define SECCODEEDITDATAFORMVIEWITEM_H
+
+#include "seccodeuiglobal.h"
+#include <hbdataformviewitem.h>
+#include <hbdataformmodelitem.h>
+
+class SECCODEUI_EXPORT SecCodeEditDataFormViewItem : public HbDataFormViewItem
+{
+ Q_OBJECT
+public:
+ enum { SecCodeEditItem = HbDataFormModelItem::CustomItemBase + 1 };
+
+ explicit SecCodeEditDataFormViewItem(QGraphicsItem *parent = 0);
+ virtual ~SecCodeEditDataFormViewItem();
+ virtual HbAbstractViewItem* createItem();
+ virtual bool canSetModelIndex(const QModelIndex &index) const;
+protected:
+ virtual HbWidget* createCustomWidget();
+};
+
+#endif //SECCODEEDITDATAFORMVIEWITEM_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/seccodeui/src/seccodemodel.cpp Fri Mar 19 09:29:29 2010 +0200
@@ -0,0 +1,65 @@
+/*
+* 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 "seccodemodel.h"
+#include "seccodemodel_p.h"
+
+SecCodeModel::SecCodeModel(QObject * parent /*= 0*/)
+: QObject(parent),d_ptr(new SecCodeModelPrivate())
+{
+}
+
+SecCodeModel::~SecCodeModel()
+{
+ delete d_ptr;
+}
+
+bool SecCodeModel::simCardRemoved()
+{
+// return d_ptr->simCardRemoved();
+ return false;
+}
+
+
+int SecCodeModel::pinRemainingAttempts()
+{
+ // return d_ptr->pinRemainingAttempts();
+ return 3;
+}
+
+int SecCodeModel::pin2RemainingAttempts()
+{
+// return d_ptr->pin2RemainingAttempts();
+ return 3;
+}
+
+int SecCodeModel::changePinCode(const QString &oldCode,const QString &newCode,const QString &verifyCode)
+{
+ Q_UNUSED(oldCode);
+ Q_UNUSED(newCode);
+ Q_UNUSED(verifyCode);
+ return 0;
+}
+
+int SecCodeModel::changePin2Code(const QString &oldCode,const QString &newCode,const QString &verifyCode)
+{
+ Q_UNUSED(oldCode);
+ Q_UNUSED(newCode);
+ Q_UNUSED(verifyCode);
+
+ return 0;
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/seccodeui/src/seccodemodel.h Fri Mar 19 09:29:29 2010 +0200
@@ -0,0 +1,47 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0""
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#ifndef SECCODEMODEL_H
+#define SECCODEMODEL_H
+
+#include <QObject>
+
+class SecCodeModelPrivate;
+class SecCodeModel : public QObject
+{
+ Q_OBJECT
+public:
+ SecCodeModel(QObject * parent = 0);
+ virtual ~SecCodeModel();
+
+ bool simCardRemoved();
+
+ int pinRemainingAttempts();
+
+ int changePinCode(const QString &oldCode,const QString &newCode,const QString &verifyCode);
+
+ int pin2RemainingAttempts();
+
+ int changePin2Code(const QString &oldCode,const QString &newCode,const QString &verifyCode);
+
+private:
+ SecCodeModelPrivate *d_ptr;
+};
+
+
+#endif //SECCODEMODEL_H
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/seccodeui/src/seccodemodel_p.h Fri Mar 19 09:29:29 2010 +0200
@@ -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:
+*
+*/
+
+#ifndef SECCODEMODEL_P_H
+#define SECCODEMODEL_P_H
+
+class SecCodeModelPrivate
+{
+public:
+
+};
+
+#endif //SECCODEMODEL_P_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/seccodeui/src/seccodemodel_symbian.cpp Fri Mar 19 09:29:29 2010 +0200
@@ -0,0 +1,48 @@
+/*
+* 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 "seccodemodel_p.h"
+#include "seccodeuiglobal.h"
+#include <e32err.h>
+#include <exterror.h>
+
+static int symbianErrtoQtErr(int err)
+{
+ switch (err) {
+ case KErrNone:
+ return SecCode::ErrNone;
+ case KErrGsm0707IncorrectPassword:
+ return SecCode::ErrGsm0707IncorrectPassword;
+ case KErrAccessDenied:
+ return SecCode::ErrAccessDenied;
+ case KErrGsmSSPasswordAttemptsViolation:
+ return SecCode::ErrGsmSSPasswordAttemptsViolation;
+ case KErrLocked:
+ return SecCode::ErrLocked;
+ case KErrGsm0707OperationNotAllowed:
+ return SecCode::ErrGsm0707OperationNotAllowed;
+ case KErrGsm0707SIMPuk2Required:
+ return SecCode::ErrGsm0707SIMPuk2Required;
+ case KErrAbort:
+ return SecCode::ErrAbort;
+ default:
+ break;
+ }
+
+ return err;
+}
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/seccodeui/src/seccodemodel_win.cpp Fri Mar 19 09:29:29 2010 +0200
@@ -0,0 +1,18 @@
+/*
+* 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 "seccodemodel_p.h"
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/seccodeui/src/seccodesettings.cpp Fri Mar 19 09:29:29 2010 +0200
@@ -0,0 +1,169 @@
+/*
+* 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 "seccodesettings.h"
+#include "seccodemodel.h"
+#include "seccodeuiutility.h"
+
+class SecCodeSettingsPrivate
+{
+public:
+ SecCodeSettingsPrivate()
+ {
+ mSecCodeModel = new SecCodeModel();
+ }
+
+ ~SecCodeSettingsPrivate()
+ {
+ delete mSecCodeModel;
+ }
+
+ SecCodeModel *mSecCodeModel;
+};
+
+SecCodeSettings::SecCodeSettings(QObject * parent /*= 0*/)
+: QObject(parent), d_ptr(new SecCodeSettingsPrivate())
+{
+
+}
+
+SecCodeSettings::~SecCodeSettings()
+{
+ delete d_ptr;
+}
+
+bool SecCodeSettings::pinCodeRequest() const
+{
+// return d_ptr->mSecCodeModel->pinCodeRequest();
+ return true;
+}
+
+void SecCodeSettings::setPinCodeRequest(bool on)
+{
+ Q_UNUSED(on);
+}
+
+void SecCodeSettings::changePinCode()
+{
+ if (d_ptr->mSecCodeModel->simCardRemoved()) {
+ SecCodeUiUtility::showErrorMessage(tr("SIM removed."));
+ return;
+ }
+
+ if (!pinCodeRequest()) {
+ SecCodeUiUtility::showErrorMessage(tr("Set PIN code request ON."));
+ return;
+ }
+
+ QString title = SecCodeUiUtility::getPinRemainingAttemptsMessage(
+ d_ptr->mSecCodeModel->pinRemainingAttempts());
+
+ QString oldPassword = SecCodeUiUtility::getPassword(title);
+ if (oldPassword.isEmpty()) {
+ return;
+ }
+
+ QString newPassword;
+ QString verifyPassword;
+ bool firstTry (true);
+
+ do {
+ if (firstTry) {
+ firstTry = false;
+ }
+ else {
+ newPassword.clear();
+ verifyPassword.clear();
+ SecCodeUiUtility::showErrorMessage(tr("PIN does not match."));
+ }
+
+ newPassword = SecCodeUiUtility::getPassword(tr("New PIN:"));
+ if (newPassword.isEmpty()) {
+ return;
+ }
+
+ verifyPassword = SecCodeUiUtility::getPassword(tr("Verify PIN:"));;
+ if (verifyPassword.isEmpty()) {
+ return;
+ }
+ } while (verifyPassword != newPassword);
+
+ int err = d_ptr->mSecCodeModel->changePinCode(oldPassword,newPassword,verifyPassword);
+ switch (err) {
+ case SecCode::ErrNone:
+ SecCodeUiUtility::showInformationMessage(tr("Code changed."));
+ break;
+ default:
+ break;
+ }
+}
+
+
+void SecCodeSettings::changePin2Code()
+{
+ if (d_ptr->mSecCodeModel->simCardRemoved()) {
+ SecCodeUiUtility::showErrorMessage(tr("SIM removed."));
+ return;
+ }
+
+ if (!pinCodeRequest()) {
+ SecCodeUiUtility::showErrorMessage(tr("Set PIN code request ON."));
+ return;
+ }
+
+ QString title = SecCodeUiUtility::getPin2RemainingAttemptsMessage(
+ d_ptr->mSecCodeModel->pin2RemainingAttempts());
+
+ QString oldPassword = SecCodeUiUtility::getPassword(title);
+ if (oldPassword.isEmpty()) {
+ return;
+ }
+
+ QString newPassword;
+ QString verifyPassword;
+ bool firstTry (true);
+
+ do {
+ if (firstTry) {
+ firstTry = false;
+ }
+ else {
+ newPassword.clear();
+ verifyPassword.clear();
+ SecCodeUiUtility::showErrorMessage(tr("PIN2 does not match."));
+ }
+
+ newPassword = SecCodeUiUtility::getPassword(tr("New PIN2:"));
+ if (newPassword.isEmpty()) {
+ return;
+ }
+
+ verifyPassword = SecCodeUiUtility::getPassword(tr("Verify PIN2:"));;
+ if (verifyPassword.isEmpty()) {
+ return;
+ }
+ } while (verifyPassword != newPassword);
+
+ int err = d_ptr->mSecCodeModel->changePin2Code(oldPassword,newPassword,verifyPassword);
+ switch (err) {
+ case SecCode::ErrNone:
+ SecCodeUiUtility::showInformationMessage(tr("Code changed."));
+ break;
+ default:
+ break;
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/seccodeui/src/seccodesettings.h Fri Mar 19 09:29:29 2010 +0200
@@ -0,0 +1,59 @@
+/*
+* 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 SECCODESETTINGS_H
+#define SECCODESETTINGS_H
+
+#include <QObject>
+#include "seccodeuiglobal.h"
+
+class SecCodeSettingsPrivate;
+
+class SECCODEUI_EXPORT SecCodeSettings : public QObject
+{
+ Q_OBJECT
+public:
+ explicit SecCodeSettings(QObject *parent = 0);
+ virtual ~SecCodeSettings();
+
+ bool pinCodeRequest() const;
+
+ void setPinCodeRequest(bool on);
+
+ void changePinCode();
+
+ void changePin2Code();
+
+ bool deviceLock() const;
+
+ void setDeviceLock(bool on);
+
+ void changeLockCode();
+
+ int autoLockPeriod() const;
+
+ void setAutoLockPeriod(int period);
+
+ bool remoteLock() const;
+
+ void setRemoteLock(bool on,const QString &lockCode);
+
+private:
+ SecCodeSettingsPrivate *d_ptr;
+};
+
+#endif //SECCODESETTINGS_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/seccodeui/src/seccodeuiglobal.h Fri Mar 19 09:29:29 2010 +0200
@@ -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:
+*
+*/
+
+#ifndef SECCODEUIGLOBAL_H
+#define SECCODEUIGLOBAL_H
+
+#include <QtGlobal>
+
+#ifdef BUILD_SECCODEUI
+ #define SECCODEUI_EXPORT Q_DECL_EXPORT
+#else
+ #define SECCODEUI_EXPORT Q_DECL_IMPORT
+#endif
+
+namespace SecCode
+{
+ enum SecCodeErr
+ {
+ ErrNone = 0,
+ ErrGsm0707IncorrectPassword,
+ ErrAccessDenied,
+ ErrGsmSSPasswordAttemptsViolation,
+ ErrLocked,
+ ErrGsm0707OperationNotAllowed,
+ ErrGsm0707SIMPuk2Required,
+ ErrAbort,
+ };
+}
+
+#endif //SECCODEUIGLOBAL_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/seccodeui/src/seccodeuiutility.cpp Fri Mar 19 09:29:29 2010 +0200
@@ -0,0 +1,71 @@
+/*
+* 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 "seccodeuiutility.h"
+#include <QString>
+#include <hbinputdialog.h>
+#include <hbmessagebox.h>
+
+QString SecCodeUiUtility::getPassword(const QString &label,bool *ok /*= 0*/,QGraphicsItem *parent /*= 0*/)
+{
+ HbInputDialog *dlg = new HbInputDialog(parent);
+ dlg->setEchoMode(HbLineEdit::Password);
+ QString result;
+ dlg->setPromptText(label);
+ dlg->setInputMode(HbInputDialog::TextInput);
+ HbAction* action = dlg->exec();
+ if(action == dlg->secondaryAction()) { //Cancel was pressed
+ if(ok) {
+ *ok = false;
+ }
+ } else { //OK was pressed
+ if(ok) {
+ *ok = true;
+ }
+ result = dlg->textValue().toString();
+ }
+ delete dlg;
+ return result;
+}
+
+void SecCodeUiUtility::showInformationMessage(const QString &message,QGraphicsItem *parent /*= 0*/ )
+{
+ HbMessageBox::launchInformationMessageBox(message,0,0,parent);
+}
+
+void SecCodeUiUtility::showWarningMessage(const QString &message,QGraphicsItem *parent /*= 0*/)
+{
+ HbMessageBox::launchWarningMessageBox(message,0,0,parent);
+}
+
+void SecCodeUiUtility::showErrorMessage(const QString &message,QGraphicsItem *parent /*= 0*/)
+{
+ HbMessageBox::launchInformationMessageBox(message,0,0,parent);
+}
+
+QString SecCodeUiUtility::getPinRemainingAttemptsMessage(int remainingAttempts)
+{
+ Q_UNUSED(remainingAttempts);
+
+ return QString("PIN code:");
+}
+
+QString SecCodeUiUtility::getPin2RemainingAttemptsMessage(int remainingAttempts)
+{
+ Q_UNUSED(remainingAttempts);
+
+ return QString("PIN2 code:");
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/seccodeui/src/seccodeuiutility.h Fri Mar 19 09:29:29 2010 +0200
@@ -0,0 +1,35 @@
+/*
+* 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 SECCODEUIUTILITY_H
+#define SECCODEUIUTILITY_H
+
+class QString;
+class QGraphicsItem;
+
+class SecCodeUiUtility
+{
+public:
+ static QString getPassword(const QString &label,bool *ok = 0,QGraphicsItem *parent = 0);
+ static QString getPinRemainingAttemptsMessage(int remainingAttempts);
+ static QString getPin2RemainingAttemptsMessage(int remainingAttempts);
+ static void showInformationMessage(const QString &message, QGraphicsItem *parent = 0);
+ static void showWarningMessage(const QString &message, QGraphicsItem *parent = 0);
+ static void showErrorMessage(const QString &message, QGraphicsItem *parent = 0);
+};
+
+#endif //SECCODEUIUTILITY_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanelui/src/src.pro Fri Mar 19 09:29:29 2010 +0200
@@ -0,0 +1,19 @@
+#
+# 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
+SUBDIRS = cpprofilewrapper cpcategorymodel cpapplication seccodeui cpplugins
+CONFIG += ordered
\ No newline at end of file
--- a/defaultapplicationsettings/group/bld.inf Thu Dec 17 08:46:07 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,30 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Build information file for project DefaultApplicationSettings
-*
-*/
-
-
-#include <platform_paths.hrh>
-
-#include "../services_db/group/bld.inf"
-#include "../server/group/bld.inf"
-#include "../service/group/bld.inf"
-#include "../gsplugin/group/bld.inf"
-
-PRJ_EXPORTS
-
-../rom/DefaultApplicationSettings.iby CORE_APP_LAYER_IBY_EXPORT_PATH(defaultapplicationsettings.iby)
-../rom/DefaultApplicationSettingsResources.iby LANGUAGE_APP_LAYER_IBY_EXPORT_PATH(defaultapplicationsettingsresources.iby)
-
--- a/defaultapplicationsettings/gsplugin/data/10281BA0.rss Thu Dec 17 08:46:07 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,99 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: ECOM Interface definition for project General Settings Plugin
-*
-*/
-
-
-#include <registryinfo.rh>
-
-/**
-* How to use the resource definition:
-*
-* IMPLEMENTATION_INFO
-* {
-* implementation_uid = <Your implementation UID here>;
-* version_no = 1;
-* display_name = "<Your plugin name here (just for debugging)>";
-* default_data = "<One of the below UIDs your plugin will be part of>";
-* opaque_data = "<Position of your plugin in the parent listbox>";
-* }
-*
-* For example plugins wishing to use Apps Plugin as a parent use
-* KGSAppsPluginUid (defined in GSFWViewUIDs.h):
-*
-* default_data = "0x10207239";
-
-// Use this UID if plugin belongs to Main view:
-const TUid KGSMainViewUid = { 0x1020723B };
-
-
-// No item is selected in the container's listbox
-const TUid KGSNoneSelected = { 0x00000000 };
-
-// UIDs used by the sub-view plugins:
-
-// Use this UID if plugin belongs to General view:
-const TUid KGSGenPluginUid = { 0x10207237 };
-
-// Use this UID if plugin belongs to Telephony view:
-const TUid KGSTelPluginUid = { 0x1020723D };
-
-// Use this UID if plugin belongs to Connection view:
-const TUid KGSConPluginUid = { 0x10207250 };
-
-// Use this UID if plugin belongs to Applications view:
-const TUid KGSAppsPluginUid = { 0x10207239 };
-
-// Use this UID if plugin belongs to Personalisation view:
-const TUid KGSPrslnPluginUid = { 0x10207252 };
-
-// Use this UID if plugin belongs to Security view:
-const TUid KGSSecurityPluginUid = { 0x1020743A };
-
-// Use this UID if plugin belongs to Standby view:
-const TUid KGSStandbyPluginUid = { 0x1020743F };
-
-*
-* Note that position of the plugin is supported only for internally provided
-* plugins. Others, such as 3rd party plugins, are sorted according to their
-* name and plugin provider category.
-*
-* Plugin position must follow the postition defined in UI specification.
-* Position starts from 0. Use -1 if position is not to be used in sorting.
-*
-*/
-RESOURCE REGISTRY_INFO theInfo
- {
- dll_uid = 0x10281BA0; // Plugin dll UID
- interfaces =
- {
- INTERFACE_INFO
- {
- interface_uid = 0x10207236; // UID for CGSPluginInterface - do not change.
- implementations =
- {
- IMPLEMENTATION_INFO
- {
- implementation_uid = 0x10281BA1; // Plugin UID
- version_no = 1;
- display_name = "DefaultAppSettings Plugin";
- default_data = "0x10207239";
- opaque_data = "0"; // Order number. We are the first
- }
- };
- }
- };
- }
-
--- a/defaultapplicationsettings/gsplugin/data/gsdasplugin_rsc.rss Thu Dec 17 08:46:07 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,101 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Resource file for project General Settings Plugin
-*
-*/
-
-
-// INCLUDES
-#include <bldvariant.hrh>
-#include <avkon.rh>
-#include <avkon.rsg>
-#include <avkon.mbg>
-#include <eikcore.rsg>
-#include <eikon.rh>
-#include <eikon.rsg>
-#include <avkon.loc>
-#include <data_caging_paths_strings.hrh>
-
-#include <gs_das.loc>
-
-// RESOURCE IDENTIFIER
-NAME DAGS
-RESOURCE RSS_SIGNATURE { }
-RESOURCE TBUF { buf=""; }
-
-// RESOURCE DEFINITIONS
-
-//----------------------------------------------------
-//
-// r_gs_menubar_change_exit
-// Options menu with 'Exit' item.
-//
-//----------------------------------------------------
-//
-RESOURCE MENU_BAR r_gs_menubar_change_exit
- {
- titles =
- {
- MENU_TITLE
- {
- menu_pane = r_gs_menu_item_exit;
- }
- };
- }
-
-//----------------------------------------------------
-//
-// r_gs_menu_item_exit
-// Options menu item 'Exit'.
-//
-//----------------------------------------------------
-//
-RESOURCE MENU_PANE r_gs_menu_item_exit
- {
- items =
- {
- MENU_ITEM
- {
- command = EAknCmdExit;
- txt = qtn_options_exit;
- }
- };
- }
-
-//----------------------------------------------------
-//
-// r_gs_example_view_title
-// Packet data view's title.
-//
-//----------------------------------------------------
-//
-RESOURCE TBUF r_gs_defaultapp_caption
- {
- buf = qtn_da_gsp_caption;
- }
-
-//----------------------------------------------------
-//
-// r_gs_defaultapp_view
-// Default App plugin view.
-//
-//----------------------------------------------------
-//
-RESOURCE AVKON_VIEW r_gs_defaultapp_view
- {
- menubar = r_gs_menubar_change_exit;
- cba = R_AVKON_SOFTKEYS_OPTIONS_BACK__SELECT;
- }
-
-//End of File
--- a/defaultapplicationsettings/gsplugin/group/GSDasPluginIcons.mk Thu Dec 17 08:46:07 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,71 +0,0 @@
-#
-# Copyright (c) 2005 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: Icons makefile for project Default Application settings
-#
-
-ifeq (WINS,$(findstring WINS, $(PLATFORM)))
-ZDIR=\epoc32\release\$(PLATFORM)\$(CFG)\Z
-else
-ZDIR=\epoc32\data\z
-endif
-
-# ----------------------------------------------------------------------------
-# : Configure these
-# ----------------------------------------------------------------------------
-
-TARGETDIR=$(ZDIR)\resource\apps
-HEADERDIR=\epoc32\include
-ICONTARGETFILENAME=$(TARGETDIR)\gsdasplugin.mif
-HEADERFILENAME=$(HEADERDIR)\gsdasplugin.mbg
-
-do_nothing :
- @rem do_nothing
-
-MAKMAKE : do_nothing
-
-BLD : do_nothing
-
-CLEAN : do_nothing
-
-LIB : do_nothing
-
-CLEANLIB : do_nothing
-
-# ----------------------------------------------------------------------------
-# : Configure these.
-#
-# NOTE 1: DO NOT DEFINE MASK FILE NAMES! They are included automatically by
-# MifConv if the mask detph is defined.
-#
-# NOTE 2: Usually, source paths should not be included in the bitmap
-# definitions. MifConv searches for the icons in all icon directories in a
-# predefined order, which is currently \s60\icons, \s60\bitmaps2, \s60\bitmaps.
-# The directory \s60\icons is included in the search only if the feature flag
-# __SCALABLE_ICONS is defined.
-# ----------------------------------------------------------------------------
-
-RESOURCE :
- mifconv $(ICONTARGETFILENAME) /h$(HEADERFILENAME) \
- /c8,8 qgn_prop_cp_dev_def.svg
-
-
-FREEZE : do_nothing
-
-SAVESPACE : do_nothing
-
-RELEASABLES :
- @echo $(HEADERFILENAME)&& \
- @echo $(ICONTARGETFILENAME)
-
-FINAL : do_nothing
--- a/defaultapplicationsettings/gsplugin/group/bld.inf Thu Dec 17 08:46:07 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,38 +0,0 @@
-/*
-* Copyright (c) 2005-2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Build information file for project General Settings Plugin
-*
-*/
-
-#include <platform_paths.hrh>
-
-PRJ_PLATFORMS
-DEFAULT
-
-PRJ_EXPORTS
-// export loc file
-../loc/gs_das.loc APP_LAYER_LOC_EXPORT_PATH( gs_das.loc )
-
-PRJ_EXTENSIONS
-START EXTENSION s60/mifconv
- OPTION TARGETFILE gsdasplugin.mif
- OPTION HEADERFILE gsdasplugin.mbg
- OPTION SOURCES -c8,8 qgn_prop_cp_dev_def
-END
-
-
-PRJ_MMPFILES
-gsdasplugin.mmp
-
-// End of File
--- a/defaultapplicationsettings/gsplugin/group/gsdasplugin.mmp Thu Dec 17 08:46:07 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,71 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Project definition file for project General Settings Plugin
-*
-*/
-
-
-#include <data_caging_paths.hrh>
-#include <platform_paths.hrh>
-
-CAPABILITY CAP_ECOM_PLUGIN
-TARGET gsdasplugin.dll
-TARGETTYPE PLUGIN
-UID 0x10009D8D 0x10281BA0
-VENDORID VID_DEFAULT
-
-SOURCEPATH ../src
-SOURCE gs_das_implementationtable.cpp
-SOURCE gs_das.cpp
-SOURCE gs_das_emptycontainer.cpp
-
-USERINCLUDE ../inc
-USERINCLUDE ../data
-
-// Default system include paths for middleware layer modules.
-APP_LAYER_SYSTEMINCLUDE
-SYSTEMINCLUDE /epoc32/include/ecom
-
-SOURCEPATH ../data
-//ECOM resource definition
-START RESOURCE 10281BA0.rss
-TARGET gsdasplugin.rsc
-END // ECOM resource definition
-
-//Default App GS plugin resources
-START RESOURCE gsdasplugin_rsc.rss
-HEADER
-TARGETPATH RESOURCE_FILES_DIR
-LANGUAGE_IDS
-END // Default App GS plugin resources
-
-LIBRARY euser.lib
-LIBRARY ecom.lib
-LIBRARY egul.lib
-LIBRARY aknskins.lib
-LIBRARY efsrv.lib
-LIBRARY avkon.lib
-LIBRARY bafl.lib
-LIBRARY cone.lib
-LIBRARY eikcore.lib
-LIBRARY commonengine.lib//For RConeResourceLoader
-LIBRARY gsframework.lib
-LIBRARY gsecomplugin.lib
-LIBRARY defaultappclient.lib
-
-LIBRARY apparc.lib
-LIBRARY apgrfx.lib
-
-// End of File
-
--- a/defaultapplicationsettings/gsplugin/inc/gs_das.h Thu Dec 17 08:46:07 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,177 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Implements a (minimal) GS Plugin
-*
-*/
-
-
-
-#ifndef GS_DAS_H
-#define GS_DAS_H
-
-// Includes
-#include <aknview.h>
-#include <AknServerApp.h>
-#include <eikclb.h>
-#include <ConeResLoader.h>
-
-#include <gsplugininterface.h>
-#include "gs_das_emptycontainer.h"
-// Classes referenced
-class CDefaultAppClient;
-
-// Constants
-/** This is the name of the plugin's resource file */
-_LIT( KDefaultAppGSPluginResourceFileName, "z:gsdasplugin_rsc.rsc" );
-
-/** This is the plugin's UID */
-const TUid KDefaultAppGSPluginUid = { 0x10281BA1 };
-
-// CLASS DECLARATION
-
-/**
- * This class implements a GS plugin.
- *
- * This class inplements a GS plugin that acts as a client for the Default App Server, so that it can be
- * accessed from the GS application.
- *
- * @since S60 5.0
- */
-class CDefaultAppGSPlugin : public CGSPluginInterface, public MAknServerAppExitObserver
- {
-
-public: // Constructors and destructor
-
- /**
- * Symbian OS two-phased constructor
- * @return
- */
-
- static CDefaultAppGSPlugin* NewL( TAny* aInitParams );
-
- /**
- * Destructor.
- */
- ~CDefaultAppGSPlugin();
-
-public: // From CAknView
-
- /**
- * From CAknView
- * Returns the UID of the Plugin (see base class)
- *
- * @since S60 5.0
- */
- TUid Id() const;
-
- /**
- * From CAknView
- * Activates the plugin (see base class)
- *
- * @since S60 5.0
- * @param aPrevViewId see base class
- * @param aCustomMessageId see base class
- * @param aCustomMessage see base class
- */
- void DoActivateL( const TVwsViewId& aPrevViewId,
- TUid aCustomMessageId,
- const TDesC8& aCustomMessage );
-
- /**
- * From CAknView
- * Deactivates the Plugin (see base class)
- *
- * @since S60 5.0
- */
- void DoDeactivate();
-
- /**
- * From CAknView
- * Handles a menu command (see base class)
- *
- * @since S60 5.0
- * @param aCommand the command to handle
- */
- void HandleCommandL( TInt aCommand );
-
-public: // From CGSPluginInterface
-
- /**
- * From CGSPluginInterface
- * Returns the Plugin Caption (see base class)
- *
- * @since S60 5.0
- * @param aCaption placeholder for the caption
- */
- void GetCaptionL( TDes& aCaption ) const;
-
- /**
- * From CGSPluginInterface
- * Returns the plugin's icon (see CGSPluginInterface header file)
- *
- * @since S60 5.0
- * @param aIconType icon type
- */
- CGulIcon* CreateIconL( const TUid aIconType );
-
-private: // From MAknServerAppExitObserver
-
- /**
- * From MAknServerAppExitObserver
- * Handles server exits
- *
- * @since S60 5.0
- * @param aReason for the server exit
- */
- void HandleServerAppExit ( TInt aReason );
-
-private:
-
- /**
- * C++ default constructor.
- */
- CDefaultAppGSPlugin();
-
- /**
- * Symbian OS default constructor.
- */
- void ConstructL();
-
-private: // Data
-
- /**
- * The Resource Loader
- */
- RConeResourceLoader iResources; // Resouce loader.
-
- /**
- * The id of the previous View, to be activated when user pushes Back
- */
- TVwsViewId iPrevViewId;
-
- /**
- * Pointer to the Default App Client API class
- * Own.
- */
- CDefaultAppClient* iClient;
-
- /**
- * Empty Container, used to avoid screen flickering
- * Own.
- */
- CCEmptyContainer* iEmptyContainer;
- };
-
-#endif // GS_DAS_H
-// End of File
--- a/defaultapplicationsettings/gsplugin/inc/gs_das_emptycontainer.h Thu Dec 17 08:46:07 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,73 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Implements a empty container for gsplugin
-*
-*/
-
-
-#ifndef CEMPTYCONTAINER_H
-#define CEMPTYCONTAINER_H
-
-// INCLUDES
-#include <e32std.h>
-#include <e32base.h>
-#include <coecntrl.h>
-
-// CLASS DECLARATION
-
-/**
- * CCEmptyContainer
- *
- */
-class CCEmptyContainer : public CCoeControl
- {
-public:
- // Constructors and destructor
-
- /**
- * Destructor.
- */
- ~CCEmptyContainer();
-
- /**
- * Two-phased constructor.
- */
- static CCEmptyContainer* NewL ( const TRect& aRect, const CCoeControl* aParent );
-
- /**
- * Two-phased constructor.
- */
- static CCEmptyContainer* NewLC ( const TRect& aRect, const CCoeControl* aParent );
-
-public:
- // from base class CCoeControl
- TInt CountComponentControls() const;
-
- CCoeControl* ComponentControl( TInt aIndex ) const;
-
-private:
-
- /**
- * Constructor for performing 1st stage construction
- */
- CCEmptyContainer();
-
- /**
- * EPOC default constructor for performing 2nd stage construction
- */
- void ConstructL ( const TRect& aRect, const CCoeControl* aParent );
-
- };
-
-#endif // CEMPTYCONTAINER_H
--- a/defaultapplicationsettings/gsplugin/loc/gs_das.loc Thu Dec 17 08:46:07 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,25 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Localization strings for project General Settings Plugin
-*
-*/
-
-
-// d:Text of a list item in General Settings application
-// d:Item opens the Default Applications settings
-// l:list_single_large_graphic_pane_t1
-// r:5.0
-//
-#define qtn_da_gsp_caption "Default Applications"
-
--- a/defaultapplicationsettings/gsplugin/src/gs_das.cpp Thu Dec 17 08:46:07 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,255 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Implements a (minimal) GS Plugin
-*
-*/
-
-
-// Includes
-#include <aknViewAppUi.h>
-#include <StringLoader.h>
-#include <bautils.h>
-
-#include <gsdasplugin_rsc.rsg> // Plugin's own UI resources
-#include <gsdasplugin.mbg>
-
-#include "gs_das.h"
-
-#include <das_client.h>
-
-
-// Constants
-
-#ifdef __SCALABLE_ICONS
- // svg file
- _LIT( KGSDasPluginIconFileName, "\\resource\\apps\\GSDasPlugin.mif");
-#else
- // bitmap
- _LIT( KGSDasPluginIconFileName, "\\resource\\apps\\GSDasPlugin.mbm");
-#endif // __SCALABLE_ICONS
-
-
-// ========================= MEMBER FUNCTIONS ================================
-
-
-// ---------------------------------------------------------------------------
-// CDefaultAppGSPlugin::CDefaultAppGSPlugin()
-// Constructor
-//
-// ---------------------------------------------------------------------------
-//
-CDefaultAppGSPlugin::CDefaultAppGSPlugin( )
- : iResources( *iCoeEnv ), iClient(NULL)
- {
-
- }
-
-// ---------------------------------------------------------------------------
-// CDefaultAppGSPlugin::~CDefaultAppGSPlugin()
-// Destructor
-//
-// ---------------------------------------------------------------------------
-//
-CDefaultAppGSPlugin::~CDefaultAppGSPlugin()
- {
- iResources.Close();
- if(iClient)
- delete iClient;
- if( iEmptyContainer )
- {
- AppUi()->RemoveFromViewStack( *this, iEmptyContainer );
- delete iEmptyContainer;
- };
- }
-
-// ---------------------------------------------------------------------------
-// CDefaultAppGSPlugin::ConstructL()
-// Symbian OS two-phased constructor
-//
-// ---------------------------------------------------------------------------
-//
-void CDefaultAppGSPlugin::ConstructL()
- {
- // Find the resource file:
- TParse parse;
- parse.Set( KDefaultAppGSPluginResourceFileName, &KDC_RESOURCE_FILES_DIR, NULL );
- TFileName fileName( parse.FullName() );
-
- // Get language of resource file:
- BaflUtils::NearestLanguageFile( CEikonEnv::Static()->FsSession(), fileName );
-
- // Open resource file:
- iResources.OpenL( fileName );
-
- //We can call this after opening the resource file ...
- BaseConstructL( R_GS_DEFAULTAPP_VIEW );
- }
-
-// ---------------------------------------------------------------------------
-// CDefaultAppGSPlugin::NewL()
-// Static constructor
-//
-// ---------------------------------------------------------------------------
-//
-CDefaultAppGSPlugin* CDefaultAppGSPlugin::NewL( TAny* /*aInitParams*/ )
- {
- CDefaultAppGSPlugin* self = new( ELeave ) CDefaultAppGSPlugin( );
- CleanupStack::PushL( self );
- self->ConstructL();
- CleanupStack::Pop( self );
- return self;
- }
-
-
-// ========================= From CAknView ==================
-
-
-// ---------------------------------------------------------------------------
-// From class CAknView.
-// Returns the UID of the plugin (see base class)
-// ---------------------------------------------------------------------------
-//
-TUid CDefaultAppGSPlugin::Id() const
- {
- return KDefaultAppGSPluginUid;
- }
-
-
-// ---------------------------------------------------------------------------
-// From class CAknView.
-// Activates the plugin (see base class)
-// See das_servmimeapps.h for possible values of the flags (useful for R&D)
-// -0x00010000 :
-// ---------------------------------------------------------------------------
-//
-void CDefaultAppGSPlugin::DoActivateL( const TVwsViewId& aPrevViewId,
- TUid /*aCustomMessageId*/,
- const TDesC8& /*aCustomMessage*/ )
- {
- iPrevViewId = aPrevViewId;
-
- TInt flags(0); //See das_servmimeapps.h for possible values of the flags (useful for R&D)
-
- if( !iClient )
- {
- iClient=CDefaultAppClient::NewL(this);
- }
-
- iClient->ChangeDefaultsL( flags );
-
- //construct an empty control, so we avoid the screen flickering
- if( !iEmptyContainer )
- {
- iEmptyContainer = CCEmptyContainer::NewL( ClientRect(),NULL );
- iEmptyContainer->SetMopParent(this);
- AppUi()->AddToStackL(*this, iEmptyContainer);
- };
- }
-
-
-// ---------------------------------------------------------------------------
-// From class CAknView.
-// Deactivates the Plugin (see base class)
-// ---------------------------------------------------------------------------
-//
-void CDefaultAppGSPlugin::DoDeactivate()
- {
- if(iEmptyContainer)
- {
- AppUi()->RemoveFromViewStack(*this, iEmptyContainer);
- delete iEmptyContainer;
- iEmptyContainer=NULL;
- };
- }
-
-
-// ---------------------------------------------------------------------------
-// From class CAknView.
-// Handles a menu command (see base class)
-// ---------------------------------------------------------------------------
-//
-void CDefaultAppGSPlugin::HandleCommandL( TInt aCommand )
- {
- switch ( aCommand )
- {
- case EAknSoftkeyBack:
- AppUi()->ActivateLocalViewL( iPrevViewId.iViewUid );
- break;
- case EAknCmdExit:
- case EEikCmdExit:
- AppUi()->RunAppShutter();
- break;
- default:
- AppUi()->HandleCommandL( aCommand ); //also handles EAknCmdExit
- break;
- }
- }
-// ========================= From CGSPluginInterface ==================
-
-
-
-// ---------------------------------------------------------------------------
-// From class CGSPluginInterface.
-// Returns the Plugin Caption (see base class)
-// ---------------------------------------------------------------------------
-//
-void CDefaultAppGSPlugin::GetCaptionL( TDes& aCaption ) const
- {
- HBufC* result = StringLoader::LoadL( R_GS_DEFAULTAPP_CAPTION );
- aCaption.Copy( *result );
- delete result;
- }
-
-// ---------------------------------------------------------------------------
-// From class CGSPluginInterface.
-// Return the icon, if has one.
-// ---------------------------------------------------------------------------
-//
-CGulIcon* CDefaultAppGSPlugin::CreateIconL( const TUid aIconType )
- {
- //EMbm<Mbm_file_name><Bitmap_name>
- CGulIcon* icon;
-
- if( aIconType == KGSIconTypeLbxItem )
- {
- icon = AknsUtils::CreateGulIconL(
- AknsUtils::SkinInstance(),
- KAknsIIDQgnPropCpDevDef,
- KGSDasPluginIconFileName,
- EMbmGsdaspluginQgn_prop_cp_dev_def,
- EMbmGsdaspluginQgn_prop_cp_dev_def_mask );
- }
- else
- {
- icon = CGSPluginInterface::CreateIconL( aIconType );
- };
-
- return icon;
- }
-
-// ========================= From MAknServerAppExitObserver ==================
-
-// ---------------------------------------------------------------------------
-// From class MAknServerAppExitObserver.
-// Handles server exits
-// ---------------------------------------------------------------------------
-//
-void CDefaultAppGSPlugin::HandleServerAppExit( TInt aReason)
- {
- delete iClient;
- iClient=NULL;
- TRAP_IGNORE(HandleCommandL(aReason));//do not care why it leaved
- }
-
-// End of file
--- a/defaultapplicationsettings/gsplugin/src/gs_das_emptycontainer.cpp Thu Dec 17 08:46:07 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,73 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Implements a (minimal) GS Plugin
-*
-*/
-
-
-#include "gs_das_emptycontainer.h"
-
-CCEmptyContainer::CCEmptyContainer()
- {
- // No implementation required
- }
-
-CCEmptyContainer::~CCEmptyContainer()
- {
- }
-
-CCEmptyContainer* CCEmptyContainer::NewLC ( const TRect& aRect,
- const CCoeControl* aParent )
- {
- CCEmptyContainer* self = new (ELeave) CCEmptyContainer();
- CleanupStack::PushL ( self );
- self->ConstructL( aRect, aParent );
- return self;
- }
-
-CCEmptyContainer* CCEmptyContainer::NewL ( const TRect& aRect,
- const CCoeControl* aParent )
- {
- CCEmptyContainer* self = CCEmptyContainer::NewLC ( aRect, aParent );
- CleanupStack::Pop(); // self;
- return self;
- }
-
-void CCEmptyContainer::ConstructL( const TRect& aRect,const CCoeControl* aParent )
- {
- if ( aParent == NULL )
- {
- CreateWindowL();
- }
- else
- {
- SetContainerWindowL( *aParent );
- }
- SetRect( aRect );
- ActivateL();
- }
-
-TInt CCEmptyContainer::CountComponentControls() const
- {
- return 0;
- }
-
-CCoeControl* CCEmptyContainer::ComponentControl ( TInt aIndex ) const
- {
- switch( aIndex )
- {
-
- }
- return NULL;
- }
--- a/defaultapplicationsettings/gsplugin/src/gs_das_implementationtable.cpp Thu Dec 17 08:46:07 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,57 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Implementation table
-*
-*/
-
-
-// System includes
-#include <e32std.h>
-#include <implementationproxy.h>
-
-// User includes
-#include "gs_das.h"
-#include <das_client.h>
-
-// Constants
-const TImplementationProxy KDASGSPluginImplementationTable[] =
- {
- // Uid for plugin implementation:
- IMPLEMENTATION_PROXY_ENTRY( 0x10281BA1, CDefaultAppGSPlugin::NewL )
- };
-
-
-// ---------------------------------------------------------------------------
-// ImplementationGroupProxy
-// Gate/factory function
-//
-// ---------------------------------------------------------------------------
-//
-EXPORT_C const TImplementationProxy* ImplementationGroupProxy(
- TInt& aTableCount )
- {
- TInt error;
- if( !CDefaultAppClient::ServiceAvailable(error) )
- {
- //there was an error, service not found.
- aTableCount=0;
- }
- else //service was found
- aTableCount = sizeof( KDASGSPluginImplementationTable )
- / sizeof( TImplementationProxy );
-
- return KDASGSPluginImplementationTable;
- }
-
-// End of File
--- a/defaultapplicationsettings/rom/DefaultApplicationSettings.iby Thu Dec 17 08:46:07 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,44 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Image description file for project DefaultApplicationSettings
-*
-*/
-
-
-
-#ifndef DEFAULTAPPLICATIONSETTINGS_IBY
-#define DEFAULTAPPLICATIONSETTINGS_IBY
-
-#include <bldvariant.hrh>
-
-#ifdef RD_DEFAULT_APPLICATION_SETTINGS
-
-S60_APP_EXE(DefaultAppServer)
-S60_APP_AIF_RSC(DefaultAppServer)
-
-//services_db
-file=ABI_DIR\BUILD_DIR\servicesdb.dll SHARED_LIB_DIR\servicesdb.dll
-
-//client lib
-file=ABI_DIR\BUILD_DIR\defaultappclient.dll SHARED_LIB_DIR\defaultappclient.dll
-
-//gs plugin
-ECOM_PLUGIN( gsdasplugin.dll, 10281BA0.rsc )
-data=DATAZ_\BITMAP_DIR\GSDasPlugin.mif BITMAP_DIR\GSDasPlugin.mif
-
-#endif // RD_DEFAULT_APPLICATION_SETTINGS
-
-#endif // DEFAULTAPPLICATIONSETTINGS_IBY
-
-// End of File
\ No newline at end of file
--- a/defaultapplicationsettings/rom/DefaultApplicationSettingsResources.iby Thu Dec 17 08:46:07 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,37 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Image description file for project DefaultApplicationSettings
-*
-*/
-
-
-
-#ifndef DEFAULTAPPLICATIONSETTINGSRESOURCES_IBY
-#define DEFAULTAPPLICATIONSETTINGSRESOURCES_IBY
-
-#include <bldvariant.hrh>
-
-#ifdef RD_DEFAULT_APPLICATION_SETTINGS
-
-//server
-data=DATAZ_\APP_RESOURCE_DIR\defaultappserver.rsc APP_RESOURCE_DIR\defaultappserver.rsc
-
-//gs plugin
-data=DATAZ_\RESOURCE_FILES_DIR\gsdasplugin_rsc.rsc RESOURCE_FILES_DIR\gsdasplugin_rsc.rsc
-
-#endif // RD_DEFAULT_APPLICATION_SETTINGS
-
-#endif // DEFAULTAPPLICATIONSETTINGSRESOURCES_IBY
-
-// End of File
\ No newline at end of file
--- a/defaultapplicationsettings/server/data/defaultappserver.rss Thu Dec 17 08:46:07 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,460 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Resource definitions for project DefaultApp Server
-*
-*/
-
-
-#include <avkon.rh>
-#include <avkon.rsg>
-#include <avkon.hrh>
-#include <avkon.loc>
-#include <avkon.mbg>
-
-#include <eikon.rh>
-#include <eikon.rsg>
-
-#include <uikon.rh>
-
-#include <bldvariant.hrh>
-
-#include <appinfo.rh>//localisable app info
-#include <data_caging_paths_strings.hrh>
-
-#include <services_db.rh>
-#include "das_gsentries.rh"
-#include "das.hrh"
-#include <defaultappserver.loc>
-#include <services_db.loc>
-
-NAME DFAP
-RESOURCE RSS_SIGNATURE { }
-RESOURCE TBUF { buf=""; }
-
-
-
-// ---------------------------------------------------------
-// Define default menu and CBA key.
-// ---------------------------------------------------------
-//
-RESOURCE EIK_APP_INFO
- {
- menubar=r_das_menubar;
- cba = r_das_softkeys_options_back__change;//R_AVKON_SOFTKEYS_OPTIONS_BACK;
- }
-
-// ---------------------------------------------------------
-// r_das_menubar
-// Menubar for Default App Server
-// ---------------------------------------------------------
-//
-RESOURCE MENU_BAR r_das_menubar
- {
- titles=
- {
- MENU_TITLE
- {
- menu_pane = r_das_menu;
- }
- };
- }
-
-// ---------------------------------------------------------------------------
-// r_das_menu
-// Menu for Options
-// ---------------------------------------------------------------------------
-//
-RESOURCE MENU_PANE r_das_menu
- {
- items=
- {
- MENU_ITEM
- {
- flags = EEikMenuItemAction;
- command = EAknCmdOpen;
- txt = qtn_options_change;
- },
- MENU_ITEM
- {
- command = EAknCmdFindPopupActivated;
- txt = qtn_options_find;
- },
- MENU_ITEM
- {
- command = EDasCmdAdvanced;
- txt = qtn_options_advanced;
- },
- MENU_ITEM
- {
- cascade = r_das_menu_original_settings;
- txt = qtn_da_options_reset;
- },
- MENU_ITEM
- {
- command = EAknCmdHelp;
- txt = qtn_options_help;
- },
- MENU_ITEM
- {
- command = EAknCmdExit;
- txt = qtn_options_exit;
- }
- };
- }
-
-// ---------------------------------------------------------------------------
-// r_das_menu_factory_settings
-// Sub-menu for Factory settings
-// This contains one item, but additional items will be added to it
-// ---------------------------------------------------------------------------
-//
-RESOURCE MENU_PANE r_das_menu_original_settings
- {
- items =
- {
- MENU_ITEM
- {
- command = EDasCmdResetSelected;
- txt = qtn_da_options_reset_selected;
- flags = EEikMenuItemSpecific;
- },
- MENU_ITEM
- {
- command = EDasCmdResetAll;
- txt = qtn_da_options_reset_all;
- }
- };
- }
-
-// ---------------------------------------------------------------------------
-// r_das_servicesmimes_listbox
-// Listbox for the Services & MIMEs
-// ---------------------------------------------------------------------------
-//
-RESOURCE LISTBOX r_das_servicesmimes_listbox
- {
- flags = EAknListBoxSelectionList;
- }
-
-// ---------------------------------------------------------------------------
-// r_da_title_app
-// Application title
-// ---------------------------------------------------------------------------
-//
-RESOURCE TBUF r_da_title_app
- {
- buf = qtn_da_title_app;
- }
-
-// ---------------------------------------------------------------------------
-// r_da_title_main
-// Main view title
-// ---------------------------------------------------------------------------
-//
-RESOURCE TBUF r_da_title_main
- {
- buf = qtn_da_title_main;
- }
-
-// ---------------------------------------------------------------------------
-// r_da_title_popup_adv
-// Advanced settings
-// ---------------------------------------------------------------------------
-//
-RESOURCE TBUF r_da_title_advanced
- {
- buf = qtn_da_title_advanced;
- }
-
-
-
-
-// resources for the simplified view
-
-
-// ---------------------------------------------------------------------------
-// r_da_tasks
-// This is the list of tasks. For each task, there are 3 items:
-// -the task name (this will be shown in the list)
-// -the MIME label (the selected default application for the task will be set as default for Open and this MIME)
-// -a list of Services & MIMEs that belong to the task: all applications that can handle at least one Service & MIME
-// from the list, may become defaults for the task (however, only for the Services & MIMEs the application supports).
-// ---------------------------------------------------------------------------
-//
-RESOURCE DAS_GS_TASKS r_da_tasks
- {
- tasks=
- {
- DAS_GS_TASK_ENTRY
- {
- task_name = qtn_da_main_browse;
- //USE_TASK_TITLE
- task_title = qtn_da_title_popup_browse;
-
- mime_label = "application/x-web-browse";
- service_mimes =
- {
- DAS_SERVICE_MIME
- { service_uid = 0x10208DCA; mime = "text/html"; }
- };
- }, //browse web task
- DAS_GS_TASK_ENTRY
- {
- task_name = qtn_da_main_play_music;
- //
- task_title = qtn_da_title_popup_music;
-
- mime_label = "application/x-audio-play";
- service_mimes =
- {
- DAS_SERVICE_MIME
- { service_uid = 0x10208DCA; mime = "audio/mp3"; },
- DAS_SERVICE_MIME
- { service_uid = 0x10208DCA; mime = "audio/mpeg"; },
- DAS_SERVICE_MIME
- { service_uid = 0x10208DCA; mime = "audio/x-mp3"; },
- DAS_SERVICE_MIME
- { service_uid = 0x10208DCA; mime = "audio/mpegurl"; },
- DAS_SERVICE_MIME
- { service_uid = 0x10208DCA; mime = "audio/x-mpegurl"; },
- DAS_SERVICE_MIME
- { service_uid = 0x10208DCA; mime = "audio/3gpp"; },
- DAS_SERVICE_MIME
- { service_uid = 0x10208DCA; mime = "audio/3gpp2"; },
- DAS_SERVICE_MIME
- { service_uid = 0x10208DCA; mime = "audio/mp4"; },
- DAS_SERVICE_MIME
- { service_uid = 0x10208DCA; mime = "audio/aac"; },
- DAS_SERVICE_MIME
- { service_uid = 0x10208DCA; mime = "audio/basic"; },
- DAS_SERVICE_MIME
- { service_uid = 0x10208DCA; mime = "audio/amr"; },
- DAS_SERVICE_MIME
- { service_uid = 0x10208DCA; mime = "audio/amr-wb"; },
- DAS_SERVICE_MIME
- { service_uid = 0x10208DCA; mime = "audio/awb"; },
- DAS_SERVICE_MIME
- { service_uid = 0x10208DCA; mime = "audio/x-amr"; },
- DAS_SERVICE_MIME
- { service_uid = 0x10208DCA; mime = "audio/x-epoc-wve"; },
- DAS_SERVICE_MIME
- { service_uid = 0x10208DCA; mime = "audio/x-sibo-wve"; },
- DAS_SERVICE_MIME
- { service_uid = 0x10208DCA; mime = "audio/wav"; },
- DAS_SERVICE_MIME
- { service_uid = 0x10208DCA; mime = "audio/x-wav"; },
- DAS_SERVICE_MIME
- { service_uid = 0x10208DCA; mime = "audio/x-au"; },
- DAS_SERVICE_MIME
- { service_uid = 0x10208DCA; mime = "audio/au"; },
- // SERIES 60 MIDI
- DAS_SERVICE_MIME
- { service_uid = 0x10208DCA; mime = "audio/x-midi"; },
- DAS_SERVICE_MIME
- { service_uid = 0x10208DCA; mime = "audio/midi"; },
- DAS_SERVICE_MIME
- { service_uid = 0x10208DCA; mime = "audio/sp-midi"; },
- DAS_SERVICE_MIME
- { service_uid = 0x10208DCA; mime = "audio/x-beatnik-rmf"; },
- DAS_SERVICE_MIME
- { service_uid = 0x10208DCA; mime = "audio/x-rmf"; },
- DAS_SERVICE_MIME
- { service_uid = 0x10208DCA; mime = "audio/rmf"; },
- DAS_SERVICE_MIME
- { service_uid = 0x10208DCA; mime = "audio/mobile-xmf"; },
- DAS_SERVICE_MIME
- { service_uid = 0x10208DCA; mime = "audio/vnd.nokia.mobile-xmf"; },
- //qcelp
- DAS_SERVICE_MIME
- { service_uid = 0x10208DCA; mime = "audio/qcelp"; },
- DAS_SERVICE_MIME
- { service_uid = 0x10208DCA; mime = "audio/vnd.qcelp"; },
- //wma
- DAS_SERVICE_MIME
- { service_uid = 0x10208DCA; mime = "audio/x-ms-wma"; }
- //real audio (probably with system priority in the system)
- /*
- * Real Audio is commented out because leaving it here would be confusing for users:
- * If Real Audio is uncommented below, both Music Player and RealPlayer will be listed
- * as handling music. However, the Music Player can not handle the Real Audio MIMEs
- * (it can handle most of the MIMEs above this comment). The RealPlayer can only handle
- * the RealAudio MIMEs (commented here). So there is no overlapping between the 2 players.
- * This would mean that whatever the client choses as the default player between these 2,
- * they will still continue to play media as before. E.g. all mp3s, WMAs, AACs will be
- * played with the MediaPlayer even if RealPlayer is chosed as default audio player.
- *
- DAS_SERVICE_MIME
- { service_uid = 0x10208DCA; mime = "audio/vnd.rn-realaudio"; },
- DAS_SERVICE_MIME
- { service_uid = 0x10208DCA; mime = "audio/x-pn-realaudio-plugin"; },
- DAS_SERVICE_MIME
- { service_uid = 0x10208DCA; mime = "audio/x-pn-realaudio"; }
- */
- };
- }, //play music task
- DAS_GS_TASK_ENTRY
- {
- task_name = qtn_da_main_play_videos;
- //USE_TASK_TITLE
- task_title = qtn_da_title_popup_video;
-
- mime_label = "application/x-video-play";
- service_mimes =
- {
- DAS_SERVICE_MIME
- { service_uid = 0x10208DCA; mime = "video/3gpp"; },
- DAS_SERVICE_MIME
- { service_uid = 0x10208DCA; mime = "video/3gpp2"; },
- DAS_SERVICE_MIME
- { service_uid = 0x10208DCA; mime = "video/mpeg4"; },
- DAS_SERVICE_MIME
- { service_uid = 0x10208DCA; mime = "video/mp4"; },
- DAS_SERVICE_MIME
- { service_uid = 0x10208DCA; mime = "application/sdp"; },
- //following MIMEs are probably system priority in the platform player
- DAS_SERVICE_MIME
- { service_uid = 0x10208DCA; mime = "video/vnd.rn-realvideo"; },
- DAS_SERVICE_MIME
- { service_uid = 0x10208DCA; mime = "application/vnd.rn-realmedia"; },
- DAS_SERVICE_MIME
- { service_uid = 0x10208DCA; mime = "application/x-pn-realmedia"; }
- };
- }, //play videos task
- DAS_GS_TASK_ENTRY
- {
- task_name = qtn_da_main_view_images;
- //USE_TASK_TITLE
- task_title = qtn_da_title_popup_image;
-
- mime_label = "application/x-image-view";
- service_mimes =
- {
- DAS_SERVICE_MIME
- { service_uid = 0x10208DCA; mime = "image/jpeg"; },
- DAS_SERVICE_MIME
- { service_uid = 0x10208DCA; mime = "image/jpg"; },
- DAS_SERVICE_MIME
- { service_uid = 0x10208DCA; mime = "image/jp2"; },
- DAS_SERVICE_MIME
- { service_uid = 0x10208DCA; mime = "image/tiff"; },
- DAS_SERVICE_MIME
- { service_uid = 0x10208DCA; mime = "image/x-wmf"; },
- DAS_SERVICE_MIME
- { service_uid = 0x10208DCA; mime = "image/ico"; },
- DAS_SERVICE_MIME
- { service_uid = 0x10208DCA; mime = "image/gif"; },
- DAS_SERVICE_MIME
- { service_uid = 0x10208DCA; mime = "image/bmp"; },
- DAS_SERVICE_MIME
- { service_uid = 0x10208DCA; mime = "image/x-bmp"; },
- DAS_SERVICE_MIME
- { service_uid = 0x10208DCA; mime = "image/x-bitmap"; },
- DAS_SERVICE_MIME
- { service_uid = 0x10208DCA; mime = "image/x-xbitmap"; },
- DAS_SERVICE_MIME
- { service_uid = 0x10208DCA; mime = "image/x-win-bitmap"; },
- DAS_SERVICE_MIME
- { service_uid = 0x10208DCA; mime = "image/x-windows-bmp"; },
- DAS_SERVICE_MIME
- { service_uid = 0x10208DCA; mime = "image/ms-bmp"; },
- DAS_SERVICE_MIME
- { service_uid = 0x10208DCA; mime = "image/x-ms-bmp"; },
- DAS_SERVICE_MIME
- { service_uid = 0x10208DCA; mime = "image/vnd.wap.wbmp"; },
- DAS_SERVICE_MIME
- { service_uid = 0x10208DCA; mime = "image/png"; },
- DAS_SERVICE_MIME
- { service_uid = 0x10208DCA; mime = "image/x-epoc-mbm"; },
- DAS_SERVICE_MIME
- { service_uid = 0x10208DCA; mime = "image/vnd.nokia.ota-bitmap"; },
- DAS_SERVICE_MIME
- { service_uid = 0x10208DCA; mime = "image/x-ota-bitmap"; }
- };
- } //view images task
- }; //tasks
- }
-
-
-// ---------------------------------------------------------------------------
-// r_defaultappserver_localisable_app_info
-// Localisable app info
-// ---------------------------------------------------------------------------
-//
-RESOURCE LOCALISABLE_APP_INFO r_defaultappserver_localisable_app_info
- {
- short_caption = qtn_da_title_app;
- caption_and_icon =
- CAPTION_AND_ICON_INFO
- {
- caption = qtn_da_title_app;
- };
- }
-
-RESOURCE CBA r_das_softkeys_options_back__change
- {
- buttons =
- {
- CBA_BUTTON {id=EAknSoftkeyOptions; txt=text_softkey_option;},
- CBA_BUTTON {id=EAknSoftkeyBack; txt=text_softkey_back;},
- CBA_BUTTON {id=EAknCmdOpen; txt=qtn_msk_change;}
- };
- }
-
-RESOURCE DIALOG r_das_dlg
- {
- flags = EAknDialogSelectionList | EEikDialogFlagNotifyEsc;
-
- buttons = r_das_softkeys_options_back__change;
- items =
- {
- DLG_LINE
- {
- type = EAknCtDoubleListBox;
-
- id = ESelectionListControl;
- control = LISTBOX
- {
- flags = EAknListBoxSelectionList;
- };
- },
- DLG_LINE
- {
- itemflags = EEikDlgItemNonFocusing;
- id = EFindControl;
- type = EAknCtSelectionListPopupFind;
- }
- };
- }
-
-// ---------------------------------------------------------------------------
-// r_da_services_mime
-// This resource stores localized strings for the supported services, identified
-// by their Uid and generic name.
-// This resource is defined in the services_db.rh file
-// ---------------------------------------------------------------------------
-//
-RESOURCE DAS_SERVICES r_da_service_mime
- {
- services =
- {
- DAS_SERVICE_ENTRY
- {
- service_uid = 0x10208DCA; //KOpenServiceUid
- service_name = "Open";
- service_localized_name = qtn_da_service_open;
- }
- };
- }
-
-
--- a/defaultapplicationsettings/server/data/defaultappserver_reg.rss Thu Dec 17 08:46:07 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,50 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Registration resource file for Default App Server
-*
-*/
-
-
-
-// INCLUDES
-
-#include <appinfo.rh>
-#include <defaultappserver.rsg>
-#include <data_caging_paths_strings.hrh>
-
-UID2 KUidAppRegistrationResourceFile
-UID3 0x10281B9C //server app UID
-
-// RESOURCE DEFINITIONS
-// -----------------------------------------------------------------------------
-//
-// APP_REGISTRATION_INFO
-// Registration resource for Default App Server
-//
-// -----------------------------------------------------------------------------
-//
-RESOURCE APP_REGISTRATION_INFO
- {
- app_file = "defaultappserver";
- embeddability = KAppEmbeddable;
- hidden = KAppIsHidden;
- newfile=KAppDoesNotSupportNewFile;
- localisable_resource_file = APP_RESOURCE_DIR"\\defaultappserver";
- localisable_resource_id = R_DEFAULTAPPSERVER_LOCALISABLE_APP_INFO;
- service_list =
- {
- SERVICE_INFO { uid = 0x10281B9D; }
- };
- }
-// End of File
--- a/defaultapplicationsettings/server/group/bld.inf Thu Dec 17 08:46:07 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,31 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Build information file for project Default App Server
-*
-*/
-
-#include <platform_paths.hrh>
-
-PRJ_PLATFORMS
-DEFAULT
-
-PRJ_EXPORTS
-// export loc file
-../loc/defaultappserver.loc APP_LAYER_LOC_EXPORT_PATH( defaultappserver.loc )
-../loc/services_db.loc APP_LAYER_LOC_EXPORT_PATH( services_db.loc )
-
-PRJ_MMPFILES
-das_server.mmp
-
-// End of File
--- a/defaultapplicationsettings/server/group/das_server.mmp Thu Dec 17 08:46:07 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,80 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Project definition file for project Default App Server
-*
-*/
-
-
-
-#include <data_caging_paths.hrh>
-#include <platform_paths.hrh>
-
-TARGET defaultappserver.exe
-TARGETTYPE EXE
-UID 0 0x10281B9C
-
-CAPABILITY WriteDeviceData SwEvent
-VENDORID VID_DEFAULT
-
-SOURCEPATH ../src
-SOURCE das.cpp //entry point
-SOURCE das_app.cpp //Application class
-SOURCE das_doc.cpp //Document class
-SOURCE das_appui.cpp //AppUi class
-SOURCE das_srvmime_dlg.cpp //dlg class: services & MIMEs
-SOURCE das_view.cpp //standard view class, rather empty
-SOURCE das_server.cpp //server class
-SOURCE das_service.cpp //service class
-SOURCE das_servmimeapps.cpp //engine class
-
-USERINCLUDE ../inc
-
-// Default system include paths for middleware layer modules.
-APP_LAYER_SYSTEMINCLUDE
-
-START RESOURCE ../data/defaultappserver.rss
-HEADER
-TARGETPATH APP_RESOURCE_DIR
-LANGUAGE_IDS
-END // RESOURCE
-
-START RESOURCE ../data/defaultappserver_reg.rss
-DEPENDS defaultappserver.rsg
-TARGETPATH /private/10003a3f/apps
-END
-
-
-
-
-LIBRARY euser.lib
-LIBRARY apparc.lib //is this needed??
-LIBRARY apgrfx.lib
-LIBRARY apmime.lib
-LIBRARY cone.lib
-LIBRARY eikcore.lib
-LIBRARY eikcoctl.lib
-LIBRARY eikdlg.lib
-LIBRARY avkon.lib
-LIBRARY bafl.lib
-LIBRARY commonengine.lib //StringLoader
-LIBRARY serviceregistry.lib
-
-LIBRARY aknskins.lib
-LIBRARY egul.lib
-LIBRARY aknlayout2scalable.lib
-LIBRARY aknicon.lib
-LIBRARY hlplch.lib // for "Help" options menu
-LIBRARY featmgr.lib
-
-LIBRARY servicesdb.lib
--- a/defaultapplicationsettings/server/inc/das.hlp.hrh Thu Dec 17 08:46:07 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,28 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Help IDs for project Default App Server
-*
-*/
-
-
-#ifndef DAS_HLP_HRH
-#define DAS_HLP_HRH
-
-
-_LIT(KDA_HLP_MAIN,"DA_HLP_MAIN"); //GS client, simplified view
-_LIT(KDA_HLP_ADVANCED,"DA_HLP_ADVANCED"); //GS client, advanced view
-_LIT(KDA_HLP_APPLICATION,"DA_HLP_APPLICATION"); //other client
-
-#endif // DAS_HLP_HRH
-
--- a/defaultapplicationsettings/server/inc/das.hrh Thu Dec 17 08:46:07 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,30 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Resource headers for project Default App Server
-*
-*/
-
-
-#ifndef DAS_HRH
-#define DAS_HRH
-
-// DefaultApp enumerate command codes
-enum TDefaultAppCommands
- {
- EDasCmdAdvanced=100,
- EDasCmdResetAll,
- EDasCmdResetSelected
- };
-
-#endif // DAS_HRH
--- a/defaultapplicationsettings/server/inc/das_app.h Thu Dec 17 08:46:07 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,89 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: This class implements the application.
-*
-*/
-
-
-
-#ifndef C_DEFAULTAPPAPPLICATION_H
-#define C_DEFAULTAPPAPPLICATION_H
-
-#include <aknapp.h>
-
-class CDefaultAppDocument;
-class CDefaultAppServer;
-
-/** UID for the application; this should correspond to the uid defined in the mmp file */
-const TUid KUidDefaultAppServer = { 0x10281B9C };
-
-/**
- * This class implements the application.
- *
- * @since Series 60 v5.0
- */
-class CDefaultAppApplication : public CAknApplication
- {
-private: // Functions from base classes
-
- /**
- * From CApaApplication.
- * Returns application's UID (KUidDefaultAppServer).
- *
- * @since S60 v5.0
- * @return The value of KUidDefaultAppServer.
- */
- TUid AppDllUid() const;
-
- /**
- * From CApaApplication.
- * Creates CDefaultAppDocument document object.
- *
- * @since S60 v5.0
- * @return A pointer to the created document object.
- */
- CApaDocument* CreateDocumentL();
-
- /**
- * From CApaApplication.
- * Creates a new server object (CDefaultAppServer).
- *
- * @since S60 v5.0
- * @param aAppServer pointer to the newly created server object
- */
- void NewAppServerL(CApaAppServer*& aAppServer);
-
-public:
- /**
- * C++ default constructor.
- */
- CDefaultAppApplication(void);
-
-public: //data
- /**
- * Pointer to the documet class
- * Not owned.
- */
- CDefaultAppDocument* iDocument; //not owned
-
- /**
- * Pointer to the server class
- * Not owned.
- */
- CDefaultAppServer* iServer; //not owned
- };
-
-#endif // C_DEFAULTAPPAPPLICATION_H
-
-// End of File
--- a/defaultapplicationsettings/server/inc/das_appui.h Thu Dec 17 08:46:07 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,173 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: This class implements the AppUi
-*
-*/
-
-
-
-#ifndef C_DEFAULTAPPAPPUI_H
-#define C_DEFAULTAPPAPPUI_H
-
-
-#include <aknappui.h>
-#include <eikmenub.h>
-
-class CDefaultAppSrvMimeDlg;
-class CDefaultAppView;
-class CDefaultAppServMimeApps;
-
-
-
-/**
- * This class implements the AppUi.
- *
- * @since Series 60 v5.0
- */
-class CDefaultAppAppUi : public CAknAppUi
- {
-public:
-
- /**
- * Destructor.
- */
- virtual ~CDefaultAppAppUi();
-
- /**
- * C++ default constructor.
- */
- CDefaultAppAppUi();
-
- /**
- * Symbian OS default constructor.
- */
- void ConstructL();
-
- /**
- * This function completes the construction of the AppUi. This function is called after the client
- * has connected to this server instance, and all the necessary data for this construction step is
- * available.
- *
- * @since S60 v5.0
- * @param aClientUid The Uid of the client
- * @param aServiceFlags various flags that may alter what data is displayed to the user
- */
- void ConstructSrvMimeDlgL(TUid aClientUid, TInt aServiceFlags);
-
- /*
- * This functino is used to record the exist of the dialog;
- */
- void SetDialogExist( TBool aExist );
-
-public: // from CAknAppUi
-
- /**
- * From CAknAppUi.
- * Handles commands from the menu (see base class)
- *
- * @since S60 v5.0
- * @param aCommand the command being handled
- */
- void HandleCommandL(TInt aCommand);
-
- /**
- * From CAknAppUi.
- * Handles layout changes (e.g. from portrait to landscape)
- *
- * @since S60 v5.0
- * @param aType The type of resources that have changed
- */
- void HandleResourceChangeL(TInt aType);
-
- /**
- * Handles Window Server events (we are interested in catching the end key event
- * and exiting the application
- *
- * @since S60 v5.0
- * @param aEvent The event that occurred
- * @param aDestination The control associated with the event
- */
- void HandleWsEventL(const TWsEvent & aEvent, CCoeControl * aDestination);
-
-
-private:
-
- /**
- * Imports and displays the icon of the client application.
- *
- * @since S60 v5.0
- */
- void SetClientIconL(TUid aClietAppUid);
-
-public:
-
- /**
- * Pointer to the View
- * Own.
- */
- CDefaultAppView *iView;
-
- /**
- * Pointer to the dialog
- * Own.
- */
- CDefaultAppSrvMimeDlg *iDlg;
-
- /**
- * Pointer to the "engine". The engine is a place where application data is retrieved and stored.
- * Own.
- */
- CDefaultAppServMimeApps *iServMimeApps;
-
- /**
- * variable used to remember the list selection position when reloading the dialog
- * for the simplified view
- * Own.
- */
- TInt iSelectedItemSimple;
-
- /**
- * variable used to remember the list selection position when reloading the dialog
- * for the advanced view
- * Own.
- */
- TInt iSelectedItemAdvanced;
-
- /**
- * variable used to remember dialog type (simple/advanced) when reloading the dialog
- * Own.
- */
- TBool iReloadDlgAdvanced;
-
- /**
- * variable used to specify if the dialog is reloaded
- * Own.
- */
- TBool iReloadDlg;
-
- /**
- * specifies if the dialog is dismissed or reloaded
- * Own.
- */
- TBool iExitBack;
-
- TUid iClientUid;
-
-private:
- // This is used to record the exist of the dialogue.
- TBool iDialogExist;
- };
-#endif // C_DEFAULTAPPAPPUI_H
-
-//end of file
--- a/defaultapplicationsettings/server/inc/das_doc.h Thu Dec 17 08:46:07 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,74 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: This class implements the application document.
-*
-*/
-
-
-
-#ifndef C_DEFAULTAPPDOC_H
-#define C_DEFAULTAPPDOC_H
-
-#include <AknDoc.h>
-
-class CDefaultAppAppUi;
-
-/**
- * This class implements the application document.
- *
- * @since Series 60 v5.0
- */
-class CDefaultAppDocument : public CAknDocument
- {
-public:
-
- /**
- * Symbian OS two-phased constructor
- * @return
- */
- static CDefaultAppDocument* NewL(CEikApplication& aApp);
-
- /**
- * Symbian OS two-phased constructor
- * @return
- */
- static CDefaultAppDocument* NewLC(CEikApplication& aApp);
-
-// from base class CAknDocument
- /**
- * From CAknDocument.
- * Function to create the AppUi.
- *
- * @since S60 v5.0
- * @return the created AppUi instance
- */
- CEikAppUi* CreateAppUiL();
-
-private:
-
- /**
- * C++ default constructor.
- */
- CDefaultAppDocument(CEikApplication& aApp);
-public:
- /**
- * Pointer to the AppUi
- * Not owned
- */
- CDefaultAppAppUi* iDefaultAppUi; //not owned
- };
-
-#endif // C_DEFAULTAPPDOC_H
-
-// End of File
\ No newline at end of file
--- a/defaultapplicationsettings/server/inc/das_gsentries.rh Thu Dec 17 08:46:07 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,63 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Resource headers for project das_server
-*
-*/
-
-
-#ifndef DAS_GSENTRIES_RH
-#define DAS_GSENTRIES_RH
-
-// ---------------------------------------------------------------------------
-// New structure to describe a Service & MIME pair
-// ---------------------------------------------------------------------------
-//
-STRUCT DAS_SERVICE_MIME
- {
- LONG service_uid;
- LTEXT8 mime;
- }
-
-// ---------------------------------------------------------------------------
-// New structure to describe a Task.
-// A Task has a name, a MIME label and a list of associated Service & MIMEs pairs.
-// ---------------------------------------------------------------------------
-//
-STRUCT DAS_GS_TASK_ENTRY
- {
- LTEXT task_name;
-
- //task title
- LTEXT task_title;
-
- // The main service and MIME give the default application for the task.
- // The default application for the task is registered as default for the main MIME and Service
- // The default application for the task does not necessarily have to support the main MIME and Service
- // ()
- LTEXT8 mime_label;
-
- //other pairs that
- STRUCT service_mimes[]; //Type is DAS_SERVICE_MIME
- }
-
-// ---------------------------------------------------------------------------
-// New structure to describe a list of Tasks
-// ---------------------------------------------------------------------------
-//
-STRUCT DAS_GS_TASKS
- {
- STRUCT tasks[]; //Type is DAS_GS_TASK_ENTRY
- }
-
-#endif // DAS_GSENTRIES_RH
--- a/defaultapplicationsettings/server/inc/das_server.h Thu Dec 17 08:46:07 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,72 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: The Default Application server class
-*
-*/
-
-
-
-#ifndef C_DEFAULTAPPSERVER_H
-#define C_DEFAULTAPPSERVER_H
-
-#include <AknServerApp.h>
-
-class CDefaultAppApplication;
-
-/**
- * This is the main implemetation of DefaultApp server.
- *
- * @since Series 60 v5.0
- */
-class CDefaultAppServer: public CAknAppServer
- {
-public: // Constructors and destructor
-
- /**
- * Symbian OS two-phased constructor
- * @return
- */
- static CDefaultAppServer* NewL(CDefaultAppApplication *aApp);
-
-// from base class CAknAppServer
-
- /**
- * From CAknAppServer
- * Creates a service for the specified service Uid
- *
- * @since S60 v5.0
- * @param aServiceType the service type Uid
- * @return the created service
- */
- CApaAppServiceBase* CreateServiceL(TUid aServiceType) const;
-
-private:
-
- /**
- * C++ default constructor.
- */
- CDefaultAppServer(CDefaultAppApplication *aApp);
-
-public:
- /**
- * pointer to the application. After the client connects, the server side needs to announce the AppUi class, to
- * continue the construction
- * Not owned.
- */
- CDefaultAppApplication* iApp; //Not owned
- };
-
-#endif // C_DEFAULTAPPSERVER_H
-
-// End of File
--- a/defaultapplicationsettings/server/inc/das_service.h Thu Dec 17 08:46:07 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,122 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: The Default App Service implementation (server-side)
-*
-*/
-
-
-
-#ifndef C_DEFAULTAPPSERVICE_H
-#define C_DEFAULTAPPSERVICE_H
-
-#include <AknServerApp.h>
-
-class CDefaultAppServer;
-
-/**
- * This class implements the Default Application server-side service.
- *
- * @since Series 60 v5.0
- */
-class CDefaultAppService : public CAknAppServiceBase
- {
-public:
- enum TIpcMessageIds
- {
- ESetDefaultAll = RApaAppServiceBase::KServiceCmdBase
- };
-
- /**
- * Symbian OS two-phased constructor
- * @return
- */
- static CDefaultAppService* NewL(const CDefaultAppServer* aServer);
-
- /**
- * Destructor.
- */
- virtual ~CDefaultAppService();
-
-public: // from base class CAknAppServiceBase
-
- /**
- * From CAknAppServiceBase.
- * function called when a new message is received
- *
- * @since S60 v5.0
- * @param aMessage the received service message
- */
- void ServiceL(const RMessage2& aMessage);
-
- /**
- * From CAknAppServiceBase.
- * function called to check client credentials. Used to retrieve client app UID
- *
- * @since S60 v5.0
- * @param aMsg the message being received
- */
- CPolicyServer::TCustomResult SecurityCheckL(const RMessage2& aMsg, TInt& aAction, TSecurityInfo& aMissing);
-
-private: //construction
-
- /**
- * C++ constructor.
- */
- CDefaultAppService(const CDefaultAppServer* aServer);
-
- /**
- * Sets default for all the Service & MIME pairs supported by the client
- *
- * @since S60 v5.0
- * @param aMessage the received service message
- */
- void HandleSetDefaultAllL(const RMessage2& aMessage);
-
- /**
- * Function where most of the processing happens.
- * We use it so that the service request from the client returns immediately
- *
- * @since S60 v5.0
- * @param aInstance a pointer to the calling CDefaultAppService instance
- */
- static TInt IdleWorker(TAny *aInstance);
-
-public:
- /**
- * The Uid of the client application
- */
- TUid iClientUid;
-
- /**
- * Service flags requested by the client
- */
- TInt iServiceFlags;
-
- /**
- * pointer to the server
- * Not owned.
- */
- const CDefaultAppServer* iDefaultAppServer; //not owned
-
- /**
- * Active Object where most of the processing happens. We use it so that the service
- * call returns immediately.
- * Owned.
- */
- CIdle *iIdle;
- };
-
-#endif // C_DEFAULTAPPSERVICE_H
-
-// End of File
--- a/defaultapplicationsettings/server/inc/das_servmimeapps.h Thu Dec 17 08:46:07 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,533 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Keeps info about Services, MIMEs and Applications
-*
-*/
-
-
-
-#ifndef C_DEFAULTAPPSERVMIMEAPPS_H
-#define C_DEFAULTAPPSERVMIMEAPPS_H
-
-class CApaMaskedBitmap;
-class CDefaultAppServMimeApps;
-class CServicesDB;
-class RApaLsSession;
-
-/** The UID of the General Settings Application */
-const TUid KUidGS = { 0x100058EC }; //we define this here because we use it in several places
-
-/**
- * Helper class: stores an Application name, its UID and some other info (how many
- * service&MIMEs pair it supports, is it platform application or not)
- * This helper class is used to sort the list of Applications that support a Service&MIME pair
- *
- * @since S60 v5.0
- */
-class CAppHelper : public CBase
- {
-public:
- /** flags used with the app helper. */
- enum
- {
- EFlagPlatformApp =0x0001,
- EFlagNameNotOwned =0x0002
- };
-public:
-
- /**
- * Destructor.
- */
- ~CAppHelper();
-
- /**
- * Symbian OS two-phased constructor
- * @return
- */
- static CAppHelper* NewLC(const TDesC& aName, const TInt aUid);
-
- /**
- * Symbian OS two-phased constructor
- * @return
- */
- static CAppHelper* NewLC(const CAppHelper& aApp);
-
- /**
- * This function is used for ordering an array of CAppHelper objects
- *
- * @since S60 v5.0
- * @param a1 CAppHelper object
- * @param a2 CAppHelper object
- */
- static TInt OrderApplications(const CAppHelper& a1, const CAppHelper& a2);
-private:
-
- /**
- * C++ constructor
- */
- CAppHelper(const TInt aUid, const TInt aScore, const TInt aFlags=0);
-public:
-
- /**
- * the App name
- * Owned or Not Owned, depending on flags (iFlag&EFlagNameNotOwned).
- */
- HBufC* iName;
-
- /**
- * the UID of the application
- */
- TInt iUid;
-
- /**
- * the application score (how many Services & MIMEs it supports)
- */
- TInt iScore;
-
- /**
- * Object flags
- */
- TInt iFlags;
- };
-
-/**
- * Helper class: stores a Service & Mime Pair
- *
- * This class stores data specific to a Service & MIME pair:
- * -the Service + MIME string
- * -the Service Uid
- * -the MIME
- * -a list of applications (CAppHelper) that support this Service & MIME pair
- * -the list index and Uid of the default application for this Service & MIME pair
- *
- * @since S60 v5.0
- */
-class CServiceMime : public CBase
- {
- friend class CDefaultAppServMimeApps;
-public:
-
- /**
- * C++ constructor
- */
- CServiceMime();
-
- /**
- * Destructor.
- */
- ~CServiceMime();
-
- /**
- * This function is used for ordering an array of CServiceMime objects
- *
- * @since S60 v5.0
- * @param a1 CServiceMime object
- * @param a2 CServiceMime object
- */
- static TInt OrderServiceMimes(const CServiceMime& a1, const CServiceMime& a2);
-
-private:
- /**
- * String that contains the localized Service + MIME name
- * Owned.
- */
- HBufC *iServiceMime;
-
- /**
- * The Uid of the service
- */
- TUid iServiceUid;
-
- /**
- * the MIME string
- * Owned.
- */
- HBufC8 *iMime;
-
- /**
- * list of applications that support this Service & MIME pair
- * Owned (members of the array).
- */
- RPointerArray<CAppHelper> iApplications;
-
- /**
- * the UID of the default application for this Service & MIME
- */
- TUid iDefaultAppUid;
-
- /**
- * the list index for the default application
- * this has the following special values:
- * -1 : the default is (yet) unknown
- * -2 : there is a single app in the list, its priority is System
- * (this means: do not add other apps unless they have system priority)
- * -3 : there are more than one applications in the list, ALL have the System priority
- * (this also means: do not add other apps unless they have system priority)
- */
- TInt iDefaultApp;
-
- /**
- * indicates if the Service & MIME pair instance is used by a task or not
- */
- TBool iUsedByTasks;
- };
-
-
-/**
- * Helper class: stores a Task
- *
- * This class stores data specific to a Task:
- * -the task caption/title (list layout and title layout)
- * -the lists of Service (UIDs) & MIMEs associated with this task
- * -the MIME label
- * -a list of Services & MIMEs objects (and their associated application list) that correspond to the list
- * of Services & MIMEs associated with the task
- * -a list of applications (CAppHelper) that are associated with this task
- * -the UID and list index of the default application for the task, in the list(s) above.
- *
- * How this works:
- * The Service & MIME pairs associated with the task are those pairs for which changing the default application for the
- * task will have an impact: the new default becomes the default application for all these pairs, if applicable.
- * The list of candidate default applications is build from the Service & MIME pairs associated with the task: any
- * application that can handle at least one pair, is added to the list. The score corresponds to the number of pairs an
- * application is able to handle (the better the score, the more suitable the application is for the task).
- * When a new application is made default, it is also made default for Open + the MIME label. This way we can retrieve
- * the default application for the task, to display it to the user.
- * The list of Services & MIME objects are instances of CServiceMime that correspond to the list of Services & MIMEs that
- * are associated with the task (the associated Services & MIMEs is a "theoretical" list, while the CServiceMime list
- * is a list of Services & MIMEs that were found in the system. The Services & MIMEs in this object list is a subset of
- * the associated Services & MIMEs. The reunion of all Applications lists associated with each CServiceMime object in the
- * list is going to be same as the list of Applications that are associated with the Task.
- * When a new default application is selected for the task, this new default is saved in 2 ways:
- * -the new default application is made default for the Open service and the MIME label. This way, we can retrieve next
- * time the default application for the task. There is no danger to launch this default for opening the MIME label, since
- * no application is supposed to support the MIME label.
- * -the new default application is made default for all the Services & MIMEs associated with the task: for each instance
- * of CServiceMime in the list, the default is looked in the application list of the object: if it is found (which means
- * that the new default application supports that Service & MIME), then the new task default is made default for the
- * current Service & MIME too.
- *
- * @since S60 v5.0
- */
-class CMediaTask : public CBase
- {
- friend class CDefaultAppServMimeApps;
-public:
-
- /**
- * Symbian OS two-phased constructor
- * @return
- */
- static CMediaTask* NewLC( TResourceReader& aReader );
-
- /**
- * Destructor.
- */
- ~CMediaTask();
-private:
-
- /**
- * C++ constructor
- */
- CMediaTask();
-
- /**
- * Symbian constructor
- */
- void ConstructL( TResourceReader& aReader );
-private:
- /**
- * Task caption, list layout
- * Owned.
- */
- HBufC *iTaskList;
-
- /**
- * Task caption, title layout
- * Owned.
- */
- HBufC *iTaskTitle;
-
- /**
- * List of MIMEs associated with the task
- * Owned (members of the array).
- */
- RPointerArray<HBufC8> iMimes;
-
- /**
- * List of services associated with the task (1 to 1 correspondence with iMimes, they form pairs together)
- */
- RArray<TInt> iServicesUids;
-
- /**
- * the MIME label
- * Owned.
- */
- HBufC8 *iMimeLabel;
-
- /**
- * the list of real/discovered CServiceMime associated with the task
- * Not Owned (members of the array).
- */
- RPointerArray<CServiceMime> iSMs; //not owned
-
- /**
- * Application captions for the applications associated with the task
- * Owned (members of the array).
- * Application names NOT owned (names are owned by CServiceMime objects)
- */
- RPointerArray<CAppHelper> iApplications;
-
- /**
- * The UID of the default application for the task
- */
- TUid iDefaultAppUid; //the Uid for the default application
-
- /**
- * the index (in the application list) of the default application for the task
- */
- TInt iDefaultApp; //index
-
- };
-
-
-/**
- * Engine class for the application
- *
- * This class stores a list of Services and MIMEs and it may store a list of Tasks. All data handling operations
- * are implemented in this class.
- * There are 2 types of clients for the Default App Server:
- * 1. General Settings Application (using a plugin). For this type of client we have to display first a list of tasks,
- * and if the user switches to the advanced view, we have to display a list of all Services & MIMEs in the system
- * for which the user can change the default application.
- * 2. Normal applications may also be clients for the Default APp Server. For normal applications, only a list of Services
- * and MIMEs for which the cliet application is a default candidate is displayed. The task list is not constructed.
- * When the class is instantiated, it looks in the system (AppArc) and it builds all the data structures it needs. After
- * that, it can populate various lists for displaying them to the user, and can also change the default application, as
- * instructed by the user (AppUi calls the functions).
- *
- * @since S60 v5.0
- */
-class CDefaultAppServMimeApps : public CBase
- {
-public:
- /** flags used with the Set Default service. They influence what data is stored in the data structures. */
- enum
- {
- EFlagNoObserver=1,
- //R&D values
- EFlagShowAllServicesAndMimes = 0x00010000,
- EFlagGsClient = 0x00020000,
- };
-
- /**
- * Symbian OS two-phased constructor
- * @return
- */
- static CDefaultAppServMimeApps* NewL(const TUid& aAppUid, TInt aServiceFlags);
-
- /**
- * Symbian OS two-phased constructor
- * @return
- */
- static CDefaultAppServMimeApps* NewLC(const TUid& aAppUid, TInt aServiceFlags);
-
- /**
- * Destructor.
- */
- virtual ~CDefaultAppServMimeApps();
-
- /**
- * This function fills with entries a data structure used by a List Box to display Services & MIMEs or Tasks
- *
- * @since S60 v5.0
- * @param aServicesAndMimes the container for the list entries
- */
- void GetServicesAndMimesListL(CDesCArray& aServicesAndMimesArray);
-
- /**
- * This function fills a Popup-list data structure with applications specific to the selected Service & MIME or Task
- *
- * @since S60 v5.0
- * @param aIndex the index of the selected Service & MIME pair or Task
- * @param aApplicationsArray the container for the list entries
- * @param aTitle a container for the title of the list (also filled by the function)
- */
- void GetApplicationsListL(TInt aIndex, CDesCArray& aApplicationsArray, HBufC*& aTitle);
-
- /**
- * This function sets a new default, for a Service & MIME pair or for a Task.
- * The function also updates the list of Services & MIMEs (or Tasks), to display the new default application
- *
- * @since S60 v5.0
- * @param aServiceAndMimeIndex the index of the selected Service or Mime (or Task)
- * @param aDefaultAppIndex the index of the new default application
- * @param aServicesAndMimesArray the container for the list entries (to be updated)
- */
- void UpdateDefaultL(TInt aServiceAndMimeIndex, TInt aDefaultAppIndex, CDesCArray *aServicesAndMimesArray);
-
- /**
- * This function resets (removes) the defaults associated with a certain task,
- * or it can remove all the defaults
- *
- * @since S60 v5.0
- * @param aCathegory specifies the task index for which the function should reset
- * the default, or -1 if all defaults should be reset
- * @return 0 or error code (KErrArgument -> aCathegory has an invalid value)
- */
- TInt RestoreFactorySettingsL(TInt aCathegory);
-
-private: //construction
-
- /**
- * C++ constructor
- */
- CDefaultAppServMimeApps();
-
- /**
- * This function builds the info database behind this class.
- * For all available services in the resources it creats the corresponding
- * Services & MIMEs (or Tasks) instances.
- *
- * @since S60 v5.0
- * @param aAppUid the Uid of the client application
- * @param aServiceFlags different service flags requested by the client
- */
- void ConstructL(TUid aAppUid, TInt aServiceFlags);
-
- /**
- * This function builds part the info database behind this class.
- * It creates the Services & MIMEs (or Tasks) instances for the given service
- *
- * @since S60 v5.0
- * @param aServiceUid the Uid of the current service
- * @param aServiceIndex the index of the current service
- * @param aServiceFlags different service flags requested by the client
- * @param aServicesDb pointer to an instance that holds localized service names
- */
- void AddMIMEsForServiceL(TUid aServiceUid, TInt aServiceIndex, TInt aServiceFlags, CServicesDB* aServicesDb);
-
- /**
- * This function sorts the Services & MIMEs and their applications.
- * It also sorts the Serivces & MIMEs associated with tasks
- *
- * @since S60 v5.0
- */
- void BeautifyAndSortServMimeApps(void);
-
- /**
- * This function reads from the resource file the list of tasks (and associated data).
- * This function is used during construction
- *
- * @since S60 v5.0
- * @param aResourceId the resource id corresponding to the tasks resource
- */
- void GetTaskListL( TInt aResourceId );
-
- /**
- * This function adds a new Application to a list of an Service & Mime object.
- *
- * @since S60 v5.0
- * @param aServMime the Service & Mime object
- * @param aAppUid the uid of the inserted application
- * @param aPrio the priority of the inserted application for the Service & MIME of the host object
- * @param aLs pointer to a RApaLsSession object (so we do not need to create a new connection)
- */
- void InsertApplicationL(CServiceMime& aServMime, const TUid& aAppUid, const TDataTypePriority& aPrio, const RApaLsSession *aLs);
-
- /**
- * This function takes a task and a Service & MIME object. It checks all the applications that support the given
- * Service & MIME object (from its list). If an application is not in the task's application list, this function adds
- * it there, with a score of 1. If the application is already in the list, then its score is incremented.
- * The Service & MIME object is also marked as being used by a task.
- *
- * @since S60 v5.0
- * @param aTask the selected task
- * @param aServMime the selected Service & MIME object
- */
- void PopulateTaskWithApplicationsL(CMediaTask& aTask, CServiceMime* aServMime);
-
- /**
- * This function creates a string that will become en element of a list box. To create the string, the function
- * concatenates several sub-strings.
- *
- * @since S60 v5.0
- * @param aServMime the selected Service & MIME object
- * @param aInsertDefaultApp if TRUE, creates an object that also contains the name of the default application for the
- * Service & MIME pair
- * @return the created string
- */
- HBufC* GetServiceAndMimeStringLC(CServiceMime& aServMime, TBool aInsertDefaultApp) const;
-
- /**
- * This function creates a string that will become en element of a list box. To create the string, the function
- * concatenates several sub-strings.
- *
- * @since S60 v5.0
- * @param aMediaTask the selected Task object
- * @param aInsertDefaultApp if TRUE, creates an object that also contains the name of the default application for the
- * Service & MIME pair
- * @return the created string
- */
- HBufC* GetMediaTaskStringLC(CMediaTask& aMediaTask, TBool aInsertDefaultApp) const;
-
-private: //data
-
- /**
- * The list of Services & MIMEs
- * Owned (members of the array).
- */
- RPointerArray<CServiceMime> iServMimes;
-
- /**
- * The list of Tasks
- * Owned (members of the array).
- */
- RPointerArray<CMediaTask> iTasks;
-
- /**
- * The list of Services & MIMEs that are used by tasks (but otherwise would have been deleted, since they are not
- * displayed to the user, because there is no more than one default candidate for each Service & MIME in this list)
- * Owned (members of the array).
- */
- RPointerArray<CServiceMime> iTaskServMimes; //ServMimes with a single application, used in tasks
-
-public:
-
- /**
- * the list of elements, ar required by the dialog
- */
- CDesCArraySeg iList;
-
- /**
- * the UID of the client application
- */
- TUid iAppUid;
-
- /**
- * TRUE if the current view is the GS simplified view (if this var is TRUE, it also implies that GS is our client)
- */
- TBool iSimplifiedView;
-
- /**
- * if TRUE, the client application does not observe our exit. In this case do not display "Exit" in the menu, since
- * the client application will not exit when the server exits.
- */
- TBool iFlagNoObserver;
- };
-
-
-#endif // C_DEFAULTAPPSRVMIMEVIEW_H
-
-// end of file
\ No newline at end of file
--- a/defaultapplicationsettings/server/inc/das_srvmime_dlg.h Thu Dec 17 08:46:07 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,197 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: The Service & MIME list dlg
-*
-*/
-
-
-#ifndef C_DEFAULTAPPSRVMIMEDLG_H
-#define C_DEFAULTAPPSRVMIMEDLG_H
-
-
-#include <badesca.h> // CDesCArray
-#include <coecntrl.h> // CCoeControl
-#include <eiklbo.h> // MEikListBoxObserver
-
-
-#include <aknselectionlist.h>
-#include <aknsettingitemlist.h>
-
-// FORWARD DECLARATIONS
-class CAknDoubleStyleListBox;
-class CDefaultAppAppUi;
-//class CDefaultAppServMimeApps;
-
-/**
- * This is the Dialog class of the application
- *
- * This dialog displays a double list box and it can also display a pop-up list on top of it.
- * The elements of the lists are created by the engine (CDefaultAppServMimeApps class)
- *
- * @since S60 v5.0
- */
-class CDefaultAppSrvMimeDlg : public CAknSelectionListDialog,
- public MListBoxItemChangeObserver
- {
-public:
-
- /**
- * Symbian OS two-phased constructor
- * @return
- */
- static CDefaultAppSrvMimeDlg* NewL(CDefaultAppAppUi* aAppUi);
-
- /**
- * Destructor.
- */
- virtual ~CDefaultAppSrvMimeDlg();
-
-public: //from CAknSelectionListDialog
-
- /**
- * From CAknSelectionListDialog.
- * This function is called when buttons/softkeys are pressed, to check if the dlg should exit.
- * We always return EFalse, since this is a modeless & nonwaiting dialog.
- *
- * @since S60 v5.0
- * @param aButtonId the list box for which the event happened
- */
- virtual TBool OkToExitL(TInt aButtonId);
-
- /**
- * From CAknSelectionListDialog.
- * This function is called when a command is issued by the user.
- *
- * @since S60 v5.0
- * @param aCommandId the list box for which the event happened
- */
- virtual void ProcessCommandL(TInt aCommand);
-
- /**
- * From CAknSelectionListDialog.
- * This function is called during the construction of the dialog.
- * We build the list of elements here.
- *
- * @since S60 v5.0
- */
- virtual void PreLayoutDynInitL();
-
-
-public: //from CAknDialog
-
- /**
- * From CAknDialog.
- * This function is called to complete the menu construction.
- *
- * @since S60 v5.0
- * @param aResourceId the resource id
- * @param aMenuPane the menu class instance
- */
- virtual void DynInitMenuPaneL(TInt aResourceId, CEikMenuPane* aMenuPane);
-
-public: //from CCoeControl
-
- /**
- * From CCoeControl.
- * This function is called to get the help context
- *
- * @since S60 v5.0
- * @param aContext recipient for the help context
- */
- virtual void GetHelpContext(TCoeHelpContext& aContext) const;
-
- /**
- * From CCoeControl.
- * Called by the framework when the view size is changed
- *
- * @since S60 v5.0
- */
- virtual void SizeChanged();
-
- /**
- * From CCoeControl.
- * Called by the framework to process the key event
- *
- * @since S60 v5.0
- */
- virtual TKeyResponse OfferKeyEventL(const TKeyEvent &aKeyEvent, TEventCode aType);
-
-
-public: //own functions
-
- /**
- * Enables marquee for the list elements.
- *
- * @since S60 v5.0
- */
- void EnableMarqueeL();
-
-
- /**
- * Part of the popup menu construction process:
- * gets 2 icons, the selected (ticked) and empty icon
- *
- * @since S60 v5.0
- * @return an array with the 2 icons
- */
- CArrayPtr<CGulIcon>* GetPopupListIconsL() const;
-
- /**
- * Creates a pop-up list for a selected item of the list-box.
- *
- * @since S60 v5.0
- * @param aSelectedIndex the selected element (used to get the content of the pop-up list)
- */
- void OpenMenuForSelectedServiceAndMimeL(TInt aSelectedIndex);
-public:
- //from MListBoxItemChangeObserver
- void ListBoxItemsChanged(CEikListBox* aListBox);
-
-private: //construction
-
- /**
- * C++ default constructor.
- */
- CDefaultAppSrvMimeDlg(CDefaultAppAppUi* aAppUi, TInt *aSelected);
-
-private: //data
- /**
- * Pointer to the AppUi
- * Not Owned.
- */
- CDefaultAppAppUi* iDefaultAppUi;
-
- /**
- * The index of the selected element in the list. This is pointer to AppUI's index
- * Not owned.
- */
- TInt *iSelected;
-
- /**
- * Flag allowing to exit the dialog
- */
- TBool iOkToExit;
-
- /**
- * Pointer refer to CAknPopupList
- */
- CAknPopupList* iPopupList;
- };
-
-
-#endif // C_DEFAULTAPPSRVMIMEDLG_H
-
-// end of file
-
-
\ No newline at end of file
--- a/defaultapplicationsettings/server/inc/das_view.h Thu Dec 17 08:46:07 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,92 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Standard View
-*
-*/
-
-
-#ifndef C_DEFAULTAPPVIEW_H
-#define C_DEFAULTAPPVIEW_H
-
-#include <coecntrl.h> // CCoeControl
-
-
-// FORWARD DECLARATIONS
-class CDefaultAppAppUi;
-
-
-class CDefaultAppView : public CCoeControl
- {
- public: // New methods
-
- /**
- * NewL.
- * Two-phased constructor.
- * Create a CDefaultAppView object, which will draw itself to aRect.
- * @param aRect The rectangle this view will be drawn to.
- * @return a pointer to the created instance of CDefaultAppView.
- */
- static CDefaultAppView* NewL( const TRect& aRect );
-
- /**
- * NewLC.
- * Two-phased constructor.
- * Create a CDefaultAppView object, which will draw itself
- * to aRect.
- * @param aRect Rectangle this view will be drawn to.
- * @return A pointer to the created instance of CDefaultAppView.
- */
- static CDefaultAppView* NewLC( const TRect& aRect );
-
- /**
- * CDefaultAppView
- * Virtual Destructor.
- */
- virtual ~CDefaultAppView();
-
- public: // Functions from base classes
-
- /**
- * From CCoeControl, Draw
- * Draw this CDefaultAppView to the screen.
- * @param aRect the rectangle of this view that needs updating
- */
- void Draw( const TRect& aRect ) const;
-
- /**
- * From CoeControl, SizeChanged.
- * Called by framework when the view size is changed.
- */
- virtual void SizeChanged();
-
- private: // Constructors
-
- /**
- * ConstructL
- * @param aRect The rectangle this view will be drawn to.
- */
- void ConstructL(const TRect& aRect);
-
- /**
- * C++ default constructor.
- */
- CDefaultAppView();
-
- };
-
-#endif // C_DEFAULTAPPVIEW_H
-
-// end of file
-
-
\ No newline at end of file
--- a/defaultapplicationsettings/server/loc/defaultappserver.loc Thu Dec 17 08:46:07 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,139 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Localization strings for project Default App Server
-*
-*/
-
-
-/************* All views *********************/
-
-// d:Menu string (cascade), resets settings defaults to original/factory values
-// l:list_single_pane_t1_cp2/opt3
-// r:5.0
-//
-#define qtn_da_options_reset "Original settings"
-
-// d:Sub-menu string, resets selected item to original/factory value
-// l:list_single_popup_submenu_pane_t1
-// r:5.0
-//
-#define qtn_da_options_reset_selected "For selected item"
-
-// d:Sub-menu string, resets all defaults to original/factory values
-// l:list_single_popup_submenu_pane_t1
-// r:5.0
-//
-#define qtn_da_options_reset_all "For all items"
-
-
-/************* Simplified view *********************/
-
-// d:The title for this view
-// d:It describes a list of applications that are launched by default when the user performs a task that is
-// d:defined in general terms by the list items (see these items next). Examples of such tasks are:
-// d:"Play Music", "Play Videos", "View Images", "Browse web".
-// l:title_pane_t2/opt9
-// r:5.0
-//
-#define qtn_da_title_main "Default Applications"
-
-// d:Item in a list of tasks
-// d:It describes a task (in general terms) that will be performed by a selected application.
-// l:list_double_pane_t1_cp2
-// r:5.0
-//
-#define qtn_da_main_view_images "View images"
-
-// d:Same string as before, as a title for a pop-up menu list
-// d:It describes a task (in general terms) that will be performed by a selected application.
-// l:heading_pane_t1
-// r:5.0
-//
-#define qtn_da_title_popup_image "View images"
-
-// d:Item in a list of tasks
-// d:It describes a task (in general terms) that will be performed by a selected application.
-// l:list_double_pane_t1_cp2
-// r:5.0
-//
-#define qtn_da_main_play_videos "Play videos"
-
-// d:Same string as before, as a title for a pop-up menu list
-// d:It describes a task (in general terms) that will be performed by a selected application.
-// l:heading_pane_t1
-// r:5.0
-//
-#define qtn_da_title_popup_video "Play videos"
-
-// d:Item in a list of tasks
-// d:It describes a task (in general terms) that will be performed by a selected application.
-// l:list_double_pane_t1_cp2
-// r:5.0
-//
-#define qtn_da_main_play_music "Play music"
-
-// d:Same string as before, as a title for a pop-up menu list
-// d:It describes a task (in general terms) that will be performed by a selected application.
-// l:heading_pane_t1
-// r:5.0
-//
-#define qtn_da_title_popup_music "Play music"
-
-// d:Item in a list of tasks
-// d:It describes a task (in general terms) that will be performed by a selected application.
-// l:list_double_pane_t1_cp2
-// r:5.0
-//
-#define qtn_da_main_browse "Browse web"
-
-// d:Same string as before, as a title for a pop-up menu list
-// d:It describes a task (in general terms) that will be performed by a selected application.
-// l:heading_pane_t1
-// r:5.0
-//
-#define qtn_da_title_popup_browse "Browse web"
-
-
-/************* Advanced view *********************/
-
-// d:The title for this view
-// d:It describes a list of applications that are launched by default when the user performs a task
-// d:that is defined quite clear (in engineering terms :-). The task is defined by the Service performed
-// d:on a file that has a certain MIME. Examples of such tasks are:
-// d:"Open audio/mp3", "Print image/jpeg", "Open application/html", "Edit application/text".
-// d:The service name (Open, Print, Edit in the above examples) is localized, the MIME is not.
-// l:title_pane_t2/opt9
-// r:5.0
-//
-#define qtn_da_title_advanced "Advanced settings"
-
-
-
-
-/************* Application specific settings view *********************/
-// NOTE: This view is very similar with the "Advanced view", just the title is changed
-
-// d:The title for this view (the view is very similar with the "Advanced view", the only difference is that
-// d:in this view, the list is filtered so only the task specific to the client application are displayed).
-// d:The view describes a list of applications that are launched by default when the user performs a task
-// d:that is defined quite clear (in engineering terms :-). The task is defined by the Service performed
-// d:on a file that has a certain MIME. Examples of such tasks are:
-// d:"Open audio/mp3", "Print image/jpeg", "Open application/html", "Edit application/text".
-// d:The service name (Open, Print, Edit in the above examples) is localized, the MIME is not.
-
-// l:title_pane_t2/opt9
-// r:5.0
-//
-#define qtn_da_title_app "Default Applications"
-
--- a/defaultapplicationsettings/server/loc/services_db.loc Thu Dec 17 08:46:07 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,37 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Localization strings for project Services DB
-*
-*/
-
-
-
-/************* Service + MIMEs *********************/
-
-/* Examples of MIMEs:
- -audio/mpeg
- -video/3gpp
- -image/jpeg
- */
-
-
-
-// d:This is the name of a Service (it should be short)
-// d:The parameter is a MIME (non-localizable text). String is scrollable.
-// d:This is the default service, it opens a file with an application
-// l:None
-// r:5.0
-//
-#define qtn_da_service_open "Open %U"
-
--- a/defaultapplicationsettings/server/src/das.cpp Thu Dec 17 08:46:07 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,43 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Executable module to start the process and load the DefaultAppServer.
-*
-*/
-
-
-#include <e32base.h>
-#include "das_app.h"
-#include <eikstart.h>
-
-// ---------------------------------------------------------------------------
-// NewApplication()
-// constructs CDefaultAppApplication
-// Returns: CApaDocument*: created application object
-//
-// ---------------------------------------------------------------------------
-LOCAL_C CApaApplication* NewApplication()
- {
- return new CDefaultAppApplication;
- }
-
-// ---------------------------------------------------------------------------
-// E32Main()
-//
-// ---------------------------------------------------------------------------
-GLDEF_C TInt E32Main()
- {
- return EikStart::RunApplication(NewApplication);
- }
-
-// End of File
--- a/defaultapplicationsettings/server/src/das_app.cpp Thu Dec 17 08:46:07 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,58 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: This is the main application implementation of default app server.
-*
-*/
-
-
-#include "das_app.h"
-#include "das_doc.h"
-#include "das_server.h"
-
-// ---------------------------------------------------------------------------
-// Return the UID for the CSoundApplication application
-// ---------------------------------------------------------------------------
-//
-TUid CDefaultAppApplication::AppDllUid() const
- {
- return KUidDefaultAppServer;
- }
-
-// ---------------------------------------------------------------------------
-// Default constructor
-// ---------------------------------------------------------------------------
-//
-CDefaultAppApplication::CDefaultAppApplication(void) : iDocument(NULL), iServer(NULL)
- {}
-
-// ---------------------------------------------------------------------------
-// Create an CDefaultAppDocument document, and return a pointer to it
-// ---------------------------------------------------------------------------
-//
-CApaDocument* CDefaultAppApplication::CreateDocumentL()
- {
- iDocument = CDefaultAppDocument::NewL(*this);
- return (static_cast<CApaDocument*>(iDocument));
- }
-
-// ---------------------------------------------------------------------------
-// Simple function to return a server object
-// ---------------------------------------------------------------------------
-//
-void CDefaultAppApplication::NewAppServerL(CApaAppServer*& aAppServer)
- {
- aAppServer = iServer = CDefaultAppServer::NewL(this);
- }
-
-// End of File
--- a/defaultapplicationsettings/server/src/das_appui.cpp Thu Dec 17 08:46:07 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,204 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: This is the app ui implementation of default application server.
-*
-*/
-
-
-#include <eikserverapp.h>
-#include <akncontext.h>
-#include <apgicnfl.h>
-#include <AknIconArray.h>
-#include <AknsUtils.h>
-#include <aknlists.h>
-#include <defaultappserver.rsg>
-#include "das_appui.h"
-#include "das_view.h"
-#include "das_srvmime_dlg.h"
-#include "das_servmimeapps.h"
-#include "das.hrh"
-
-// ======== MEMBER FUNCTIONS ========
-
-// ---------------------------------------------------------------------------
-// Destructor
-// ---------------------------------------------------------------------------
-//
-CDefaultAppAppUi::~CDefaultAppAppUi()
- {
- if(iView)
- delete iView;
- if(iServMimeApps)
- delete iServMimeApps;
- }
-
-// ---------------------------------------------------------------------------
-// Default constructor
-// ---------------------------------------------------------------------------
-//
-CDefaultAppAppUi::CDefaultAppAppUi() : iView(NULL), iDlg(NULL), iExitBack(EFalse)
- {
- // No implementation required
- }
-
-// ---------------------------------------------------------------------------
-// Symbian constructor
-// ---------------------------------------------------------------------------
-//
-void CDefaultAppAppUi::ConstructL()
-{
- BaseConstructL(EAknEnableSkin|EAknEnableMSK|EAknSingleClickCompatible);
- // Create view object
- iView = CDefaultAppView::NewL( ClientRect() );
-}
-
-// ---------------------------------------------------------------------------
-// Continues the construction, after the client connects to the server and some data is known
-// (client UID and service flags)
-// ---------------------------------------------------------------------------
-//
-void CDefaultAppAppUi::ConstructSrvMimeDlgL(TUid aClientUid, TInt aServiceFlags)
-{
- SetClientIconL(aClientUid);
- iClientUid = aClientUid;
- iSelectedItemSimple=-1;
- iSelectedItemAdvanced=-1;
- iReloadDlgAdvanced=(aClientUid==KUidGS?EFalse:ETrue);
- iReloadDlg=ETrue;
- do
- {
- if(!iServMimeApps)
- iServMimeApps=CDefaultAppServMimeApps::NewL(aClientUid, aServiceFlags);
-
- if(iReloadDlgAdvanced)
- {
- //some settings for the advanced view
- iServMimeApps->iSimplifiedView=EFalse;
- }
- else
- {
- //some settings for the simple view
- iServMimeApps->iSimplifiedView=ETrue;
- };
- iServMimeApps->GetServicesAndMimesListL(iServMimeApps->iList);
-
- iDlg=CDefaultAppSrvMimeDlg::NewL(this);
- SetDialogExist( ETrue );
- iDlg->SetMopParent(this);
- iDlg->ExecuteLD(R_DAS_DLG);
- iDlg=NULL;
- }
- while(iReloadDlg);
-
-
- //exit the server
- if(iExitBack)
- {
- //if we exit by "Back" button, notify the client app, so that it does not exit.
- CEikAppServer* server = iEikonEnv->AppServer(); //if we do not do this, the client exits when backkey is pressed
- if ( server )
- {
- server->NotifyServerExit( EAknSoftkeyBack );
- }
- };
- //exit this application
- RunAppShutter();
-}
-
-// ---------------------------------------------------------------------------
-// From class CAknAppUi.
-// handle menu command
-// ---------------------------------------------------------------------------
-//
-void CDefaultAppAppUi::HandleCommandL(TInt aCommand)
- {
- switch (aCommand)
- {
- case EAknSoftkeyExit:
- __ASSERT_ALWAYS(0,User::Leave(KErrGeneral));
- break;
- case EEikCmdExit:
-
- Exit();
- break;
- //no need for default. We may also have other commands that we do not handle here.
- }
- }
-
-
-// ---------------------------------------------------------------------------
-// imports and displays the icon of the client application.
-// ---------------------------------------------------------------------------
-//
-void CDefaultAppAppUi::SetClientIconL(TUid aClietAppUid)
- {
- CEikStatusPane *statusPane=StatusPane();
- TUid contextPaneUid=TUid::Uid(EEikStatusPaneUidContext);
- if(statusPane && statusPane->PaneCapabilities(contextPaneUid).IsPresent())
- {
- CAknContextPane *contextPane=(CAknContextPane*)(statusPane->ControlL(contextPaneUid)); //we don't get the ownership
- MAknsSkinInstance* skinInstance = AknsUtils::SkinInstance(); //we don't get the ownership
-
- CFbsBitmap* iconBmp = NULL;
- CFbsBitmap* iconBmpMask = NULL;
-
- AknsUtils::CreateAppIconLC(skinInstance,aClietAppUid,EAknsAppIconTypeContext,
- iconBmp,iconBmpMask);
- CleanupStack::Pop(2);//the 2 icons
-
- contextPane->SetPicture(iconBmp,iconBmpMask);// ownership transfer for the 2 pictures
- }
- }
-
-// ---------------------------------------------------------------------------
-// Handles layout changes (e.g. from portrait to landscape)
-// ---------------------------------------------------------------------------
-//
-void CDefaultAppAppUi::HandleResourceChangeL(TInt aType)
- {
- CAknAppUi::HandleResourceChangeL( aType );
-
- if(iView)
- iView->HandleResourceChange(aType);
- if( iDlg && iDialogExist )
- iDlg->HandleResourceChange(aType);
-
- if ( aType == KEikDynamicLayoutVariantSwitch )
- {
- if( iView )
- iView->SetRect(ClientRect());
- if( iDlg && iDialogExist )
- iDlg->SetRect(ClientRect());
- }
- }
-
-// ---------------------------------------------------------------------------
-// Handles Window Server events (we are interested in catching the end key event
-// and exiting the application
-// ---------------------------------------------------------------------------
-//
-void CDefaultAppAppUi::HandleWsEventL(const TWsEvent & aEvent, CCoeControl * aDestination)
- {
- CAknAppUi::HandleWsEventL(aEvent,aDestination);
- }
-
-// ---------------------------------------------------------------------------
-// This functino is used to record the exist of the dialog;
-// and exiting the application
-// ---------------------------------------------------------------------------
-//
-void CDefaultAppAppUi::SetDialogExist( TBool aExist )
- {
- iDialogExist = aExist;
- }
--- a/defaultapplicationsettings/server/src/das_doc.cpp Thu Dec 17 08:46:07 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,65 +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: Implementation of the document class
-*
-*/
-
-
-
-#include "das_doc.h"
-#include "das_appui.h"
-
-// ======== MEMBER FUNCTIONS ========
-
-// ---------------------------------------------------------------------------
-// Symbian 2-phased constructor
-// ---------------------------------------------------------------------------
-//
-CDefaultAppDocument* CDefaultAppDocument::NewL(CEikApplication& aApp)
- {
- CDefaultAppDocument* self = NewLC(aApp);
- CleanupStack::Pop(self);
- return self;
- }
-
-// ---------------------------------------------------------------------------
-// Symbian 2-phased constructor
-// ---------------------------------------------------------------------------
-//
-CDefaultAppDocument* CDefaultAppDocument::NewLC(CEikApplication& aApp)
- {
- CDefaultAppDocument* self = new (ELeave) CDefaultAppDocument(aApp);
- CleanupStack::PushL(self);
- return self;
- }
-
-// ---------------------------------------------------------------------------
-// Default constructor
-// ---------------------------------------------------------------------------
-//
-CDefaultAppDocument::CDefaultAppDocument(CEikApplication& aApp) : CAknDocument(aApp), iDefaultAppUi(NULL)
- {
- // No implementation required
- }
-
-// ---------------------------------------------------------------------------
-// Instantiates CDefaultAppAppUi
-// ---------------------------------------------------------------------------
-//
-CEikAppUi* CDefaultAppDocument::CreateAppUiL()
- {
- iAppUi = iDefaultAppUi = new (ELeave) CDefaultAppAppUi;
- return (static_cast<CEikAppUi*>(iAppUi));
- }
-
--- a/defaultapplicationsettings/server/src/das_server.cpp Thu Dec 17 08:46:07 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,63 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Implementation of the server class
-*
-*/
-
-
-
-#include <eikstart.h> //for RDebug
-
-#include "das_server.h"
-#include "das_service.h"
-#include "das_app.h"
-
-const TUid KDefaultAppServiceUid = { 0x10281B9D };
-
-// ======== MEMBER FUNCTIONS ========
-
-// ---------------------------------------------------------------------------
-// Symbian 2-phased constructor
-// ---------------------------------------------------------------------------
-//
-CDefaultAppServer* CDefaultAppServer::NewL(CDefaultAppApplication* aApp)
- {
- CDefaultAppServer* self = new (ELeave) CDefaultAppServer(aApp);
- return self;
- }
-
-// ---------------------------------------------------------------------------
-// Default constructor
-// ---------------------------------------------------------------------------
-//
-CDefaultAppServer::CDefaultAppServer(CDefaultAppApplication* aApp) : iApp(aApp)
- {
- }
-
-// ---------------------------------------------------------------------------
-// From class CAknAppServer.
-// Creates a service for the specified service Uid
-// ---------------------------------------------------------------------------
-//
-CApaAppServiceBase* CDefaultAppServer::CreateServiceL(TUid aServiceType) const
- {
- RDebug::Print(_L("CDefaultAppServer::CreateServiceL"));
- if (aServiceType == KDefaultAppServiceUid)
- return CDefaultAppService::NewL(this);
- else
- return CAknAppServer::CreateServiceL(aServiceType);
- }
-
-
-// End of File
--- a/defaultapplicationsettings/server/src/das_service.cpp Thu Dec 17 08:46:07 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,125 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Implementation of the DefaultApp service
-*
-*/
-
-
-//#include <eikstart.h> //for RDebug
-#include "das_server.h"
-#include "das_service.h"
-#include "das_app.h"
-#include "das_doc.h"
-#include "das_appui.h"
-#include "das_servmimeapps.h"
-
-
-// ======== MEMBER FUNCTIONS ========
-
-// ---------------------------------------------------------------------------
-// Default constructor
-// ---------------------------------------------------------------------------
-//
-CDefaultAppService::CDefaultAppService(const CDefaultAppServer* aServer) : iDefaultAppServer(aServer)
- {
- iClientUid=TUid::Uid(0);
- }
-
-// ---------------------------------------------------------------------------
-// Destructor
-// ---------------------------------------------------------------------------
-//
-CDefaultAppService::~CDefaultAppService()
- {
- delete iIdle;
- }
-// ---------------------------------------------------------------------------
-// Symbian 2-phased constructor
-// ---------------------------------------------------------------------------
-//
-CDefaultAppService* CDefaultAppService::NewL(const CDefaultAppServer* aServer)
- {
- CDefaultAppService* self = new (ELeave) CDefaultAppService(aServer);
- return self;
- }
-
-// ---------------------------------------------------------------------------
-// From class CAknAppServiceBase.
-// function called when a new message is received
-// ---------------------------------------------------------------------------
-//
-void CDefaultAppService::ServiceL(const RMessage2& aMessage)
- {
- switch (aMessage.Function())
- {
- case ESetDefaultAll :
- HandleSetDefaultAllL(aMessage);
- break;
- default:
- CAknAppServiceBase::ServiceL(aMessage);
- }
- }
-
-// ---------------------------------------------------------------------------
-// From class CAknAppServiceBase.
-// function called to check client credentials. Used to retrieve client app UID
-// ---------------------------------------------------------------------------
-//
-CPolicyServer::TCustomResult CDefaultAppService::SecurityCheckL(const RMessage2& aMsg, TInt& /*aAction*/, TSecurityInfo& /*aMissing*/)
- {
- iClientUid=aMsg.SecureId();
- return CPolicyServer::EPass;
- }
-
-// ---------------------------------------------------------------------------
-// Sets default for all the Service & MIME pairs supported by the client
-// ---------------------------------------------------------------------------
-//
-void CDefaultAppService::HandleSetDefaultAllL(const RMessage2& aMessage)
- {
- //Get flags
- //TInt serviceFlags=aMessage.Int0();
- iServiceFlags=aMessage.Int0();
- aMessage.Complete(KErrNone);
-
- if(!iIdle)
- {
- iIdle=CIdle::NewL(CActive::EPriorityStandard);
- TCallBack cb(&IdleWorker,this);
- iIdle->Start(cb);
- };
- }
-
-// ---------------------------------------------------------------------------
-// Function where most of the processing happens.
-// We use it so that the service request from the client returns immediately
-// ---------------------------------------------------------------------------
-//
-TInt CDefaultAppService::IdleWorker(TAny *aInstance)
- {
- CDefaultAppService *service=(CDefaultAppService*)aInstance;
- //construct the view
- if ( service->iDefaultAppServer &&
- service->iDefaultAppServer->iApp &&
- service->iDefaultAppServer->iApp->iDocument &&
- service->iDefaultAppServer->iApp->iDocument->iDefaultAppUi)
- {
- service->iDefaultAppServer->iApp->iDocument->iDefaultAppUi->ConstructSrvMimeDlgL(service->iClientUid,service->iServiceFlags);
- };
- return 0; //no more work to do
- }
-
-
-
-
--- a/defaultapplicationsettings/server/src/das_servmimeapps.cpp Thu Dec 17 08:46:07 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,1073 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Keeps info about Services, MIMEs and Applications
-*
-*/
-
-
-// System includes
-#include <e32def.h> // STATIC_CAST
-#include <defaultappserver.rsg> // R_DAS_SERVICESMIMES_LISTBOX
-#include <StringLoader.h> // StringLoader
-#include <barsread.h> //TResourceRead
-#include <eikenv.h> //CEikonEnv
-#include <apgcli.h>
-#include <apgicnfl.h> // CApaMaskedBitmap
-
-#include <serviceregistry.h>
-
-#include "das_servmimeapps.h"
-#include "das_app.h" // KUidDefaultAppServer
-#include <services_db.h>
-
-#ifndef SYMBIAN_ENABLE_SPLIT_HEADERS
-#include <apmstd.h>
-#else
-#include <apmstd.h>
-#include <apmfndr.h> // KDataTypePrioritySystem
-#endif
-
-const TInt KStringMargin = 10; //10 is a sufficiently large margin
-
-// ======== MEMBER FUNCTIONS ======== CAppHelper
-
-// ---------------------------------------------------------------------------
-// Symbian 2-phased constructor
-// ---------------------------------------------------------------------------
-//
-CAppHelper* CAppHelper::NewLC(const TDesC& aName, const TInt aUid)
- {
- CAppHelper* self = new (ELeave) CAppHelper(aUid,0);
- CleanupStack::PushL(self);
- //construct iName, copy it
- self->iName = HBufC::NewL(aName.Size());
- TPtr* ptr=new (ELeave) TPtr(self->iName->Des());
- ptr->Copy(aName);
- delete ptr;
-
- return self;
- }
-
-// ---------------------------------------------------------------------------
-// Symbian 2-phased constructor
-// ---------------------------------------------------------------------------
-//
-CAppHelper* CAppHelper::NewLC(const CAppHelper& aApp)
- {
- CAppHelper* self = new (ELeave) CAppHelper(aApp.iUid,1,aApp.iFlags);
- CleanupStack::PushL(self);
- //construct iName, get pointer and flag it
- self->iName = aApp.iName;
- self->iFlags |= EFlagNameNotOwned;
- return self;
- }
-
-// ---------------------------------------------------------------------------
-// C++ Constructor
-// ---------------------------------------------------------------------------
-//
-CAppHelper::CAppHelper(const TInt aUid, const TInt aScore, const TInt aFlags):
- iName(NULL), iUid(aUid), iScore(aScore), iFlags(aFlags)
- {
- //no implementation needed
- }
-
-// ---------------------------------------------------------------------------
-// Destructor
-// ---------------------------------------------------------------------------
-//
-CAppHelper::~CAppHelper(void)
- {
- if(!( iFlags&EFlagNameNotOwned ))
- delete iName;
- iName = NULL;
- }
-// ---------------------------------------------------------------------------
-// This function is used to order Applications
-// ---------------------------------------------------------------------------
-//
-TInt CAppHelper::OrderApplications(const CAppHelper& a1, const CAppHelper& a2)
- {
- //if a1<a2 return -1, otherwise 0 or 1
- //platform applications are always first (smaller)
- if(a1.iFlags&EFlagPlatformApp && !(a2.iFlags&EFlagPlatformApp))
- return -1; //a1 is platform app, a2 is not
- if(!(a1.iFlags&EFlagPlatformApp) && a2.iFlags&EFlagPlatformApp)
- return 1; //a1 is not platform app, a2 is
-
- //look into names names
- if(*a1.iName < *a2.iName) return -1;
- if(*a1.iName > *a2.iName) return 1;
- //if we are here, strings were equal
- return 0;
- }
-
-
-// ======== MEMBER FUNCTIONS ======== CServiceMime
-
-// ---------------------------------------------------------------------------
-// C++ Constructor
-// ---------------------------------------------------------------------------
-//
-CServiceMime::CServiceMime() : iServiceMime(NULL), iMime(NULL)
- {
- iDefaultAppUid=TUid::Uid(0);
- iDefaultApp=-1;//currently we do not know the default index
- iUsedByTasks=EFalse;
- }
-
-// ---------------------------------------------------------------------------
-// Destructor
-// ---------------------------------------------------------------------------
-//
-CServiceMime::~CServiceMime()
- {
- if (iServiceMime) delete iServiceMime;
- if (iMime) delete iMime;
- for (TInt i=0 ; i<iApplications.Count() ; i++)
- delete iApplications[i];
- iApplications.Close();
- }
-
-// ---------------------------------------------------------------------------
-// This function is used to order Services & MIMEs
-// ---------------------------------------------------------------------------
-//
-TInt CServiceMime::OrderServiceMimes(const CServiceMime& a1, const CServiceMime& a2)
- {
- //if a1<a2 return -1, otherwise 0 or 1
- //we sort by the MIME, then by the service
- if(*a1.iMime<*a2.iMime)return -1;
- if(*a1.iMime>*a2.iMime)return 1;
- //if we are here, MIMEs are the same
- if(*a1.iServiceMime<*a2.iServiceMime)return -1;
- if(*a1.iServiceMime>*a2.iServiceMime)return 1;
- //if we are here, strings were equal
- return 0;
- }
-
-// ======== MEMBER FUNCTIONS ======== CMediaTask
-
-// ---------------------------------------------------------------------------
-// Symbian 2-phased constructor
-// ---------------------------------------------------------------------------
-//
-CMediaTask* CMediaTask::NewLC( TResourceReader& aReader )
- {
- CMediaTask* self = new (ELeave) CMediaTask();
- CleanupStack::PushL(self);
- self->ConstructL(aReader);
- return self;
- }
-
-// ---------------------------------------------------------------------------
-// Destructor
-// ---------------------------------------------------------------------------
-//
-CMediaTask::~CMediaTask()
- {
-
- if(iTaskList)delete iTaskList;
- if(iTaskTitle)delete iTaskTitle;
-
- if(iMimeLabel)delete iMimeLabel;
-
- iMimes.ResetAndDestroy();
- iServicesUids.Close();
-
- iSMs.Close();//elements not owned
-
- iApplications.ResetAndDestroy();
- }
-
-// ---------------------------------------------------------------------------
-// C++ Constructor
-// ---------------------------------------------------------------------------
-//
-CMediaTask::CMediaTask() : iMimeLabel(NULL), iDefaultApp(-1)
- {
- }
-
-// ---------------------------------------------------------------------------
-// The construction means reading the task details from the resource file
-// ---------------------------------------------------------------------------
-//
-void CMediaTask::ConstructL( TResourceReader& aReader )
- {
- TInt i,count;
- //read the task name
- iTaskList = aReader.ReadHBufCL();
- if( !iTaskList )User::Leave(KErrArgument);
-
- //read the task title
- iTaskTitle = aReader.ReadHBufCL();
- if( !iTaskTitle )User::Leave(KErrArgument);
-
- //read the mime label
- iMimeLabel = aReader.ReadHBufC8L();
- if( !iMimeLabel )User::Leave(KErrArgument);
-
- //read the service mimes entries
- count = aReader.ReadInt16();
- for (i=0; i<count; i++)
- {
- //read the service uid
- TInt uid=aReader.ReadInt32();
- if(uid == 0)User::Leave(KErrArgument);
- //read the mime
- HBufC8* mime=aReader.ReadHBufC8L();
- if( !mime )User::Leave(KErrArgument);
- //append both things
- iServicesUids.Append(uid);
- iMimes.Append(mime);//takes ownership
- }
- }
-
-
-// ======== MEMBER FUNCTIONS ======== CDefaultAppServMimeApps
-
-// ---------------------------------------------------------------------------
-// Symbian 2-phased constructor
-// ---------------------------------------------------------------------------
-//
-CDefaultAppServMimeApps* CDefaultAppServMimeApps::NewL(const TUid& aAppUid, TInt aServiceFlags)
- {
- CDefaultAppServMimeApps* self = CDefaultAppServMimeApps::NewLC(aAppUid, aServiceFlags);
- CleanupStack::Pop(self);
- return self;
- }
-
-// ---------------------------------------------------------------------------
-// Symbian 2-phased constructor
-// ---------------------------------------------------------------------------
-//
-CDefaultAppServMimeApps* CDefaultAppServMimeApps::NewLC(const TUid& aAppUid, TInt aServiceFlags)
- {
- CDefaultAppServMimeApps* self = new (ELeave) CDefaultAppServMimeApps();
- CleanupStack::PushL(self);
- self->ConstructL(aAppUid, aServiceFlags);
- return self;
- }
-
-// ---------------------------------------------------------------------------
-// This function builds the data structures for the dialog:
-// It reads the considered services from the resource files, then it builds the
-// task list and the associated list of Services& MIMEs and applications.
-// ---------------------------------------------------------------------------
-//
-void CDefaultAppServMimeApps::ConstructL(TUid aAppUid, TInt aServiceFlags)
- {
- //set the client app uid
- /* Uncomment this for testing the General Settings (Control Pannel) specific view from another application (R&D purpose)
- *
- TBool flagGsClient = aServiceFlags & EFlagGsClient;
- if(flagGsClient)aAppUid=KUidGS; //we mimic the GS Client.
- */
- iAppUid = aAppUid;
-
- //for all the available services, launch the AddMIMEsForServiceL function
- TResourceReader reader;
- CEikonEnv::Static()->CreateResourceReaderLC( reader, R_DA_SERVICE_MIME );
- CServicesDB* sdb = CServicesDB::NewLC(&reader);
- TInt i;
- TUid uid;
- for(i=0; i<sdb->Count(); i++)
- {
- uid = sdb->ServiceUidL(i);
- AddMIMEsForServiceL(uid,i,aServiceFlags,sdb);
- };
- CleanupStack::PopAndDestroy(sdb);
- CleanupStack::PopAndDestroy( ); // reader
- //change MIMEs & sort
- BeautifyAndSortServMimeApps();
- }
-
-// ---------------------------------------------------------------------------
-// this is by far the most complicated function in the entire subsystem
-// some more comments are needed, but after this function will be split in 2
-// ---------------------------------------------------------------------------
-//
-void CDefaultAppServMimeApps::AddMIMEsForServiceL(TUid aServiceUid, TInt aServiceIndex, TInt aServiceFlags, CServicesDB* aServicesDb)
- {
- CServiceMime *sm = NULL;
- TUid uid;
-
- RApaLsSession ls;
- TApaAppInfo info;
- CApaAppServiceInfoArray* serv=NULL;
- CServiceRegistry *sr=NULL;
- TInt i,j,k;
- TInt it,jt;//indexes for iterating inside tasks
- TInt lowerMarker, upperMarker;
- //flags
- TBool flagShowAll = EFalse;
- /*
- * Uncomment the line below to show all the Services & MIMEs in views, and not only those for which default app can be changed.
- * This can be used for R&D, to see all the MIMEs&Services in the system.
- flagShowAll = aServiceFlags & EFlagShowAllServicesAndMimes;
- */
- iFlagNoObserver = aServiceFlags & EFlagNoObserver;
-
- //check who is connecting, so that we can set the view
- if(iAppUid == KUidGS)
- {
- iSimplifiedView=ETrue; //at least in the beginning.
- //For this function, this is also a flag that says if we have GS as client or not
- GetTaskListL(R_DA_TASKS);
- }
- else iSimplifiedView=EFalse;
-
- //connect
- User::LeaveIfError( ls.Connect() );
- CleanupClosePushL( ls );
-
- //Get all the apps and MIMEs for the current service
- ls.GetAppInfo(info,iAppUid);
- serv=ls.GetServiceImplementationsLC(aServiceUid);
- lowerMarker = upperMarker = iServMimes.Count();
- //create entries for the MIMEs supported by the client application
- for (i=0; i<serv->Array().Count(); i++)
- {
- uid=serv->Array()[i].Uid();
- if( iSimplifiedView || uid == iAppUid) //this means that for app clients, we first skip all the other applications
- {
- //if iSimplifiedView is true, then we have GS as a client
- for(j=0; j<serv->Array()[i].DataTypes().Count(); j++)
- {
- TBool createSM=ETrue;
- if(iSimplifiedView)
- {
- //check if we already have an entry for this service & MIME
- for(k=lowerMarker; k<upperMarker; k++)
- if(iServMimes[k]->iMime->Des() == serv->Array()[i].DataTypes()[j].iDataType.Des8())
- {
- //we found it!
- sm=iServMimes[k];
- createSM=EFalse;
- break;//we found the sm, no need to search for it any more
- }
- //if we don't find it, we will create an entry ...
- }
-
- if(createSM)
- {
- //we have to create sm, we did not found it previously (or we were not looking for it)
- sm=new (ELeave) CServiceMime;
- CleanupStack::PushL(sm);
- sm->iMime = HBufC8::NewL(serv->Array()[i].DataTypes()[j].iDataType.Des8().Size());
- *(sm->iMime) = serv->Array()[i].DataTypes()[j].iDataType.Des8();
- //transform the MIME from audio/mpeg to audio mpeg
- HBufC *transformedMime=HBufC::NewLC(serv->Array()[i].DataTypes()[j].iDataType.Des().Size());
- TPtr *ptr=new (ELeave) TPtr(transformedMime->Des());
- CleanupStack::PushL(ptr);
- ptr->Copy(serv->Array()[i].DataTypes()[j].iDataType.Des());
- TInt location=ptr->Locate('/');
- if(location>0)ptr->Replace(location,1,_L(" "));
- //transforming done
- //sm->iServiceMime = aServicesDb->ServiceStringLC(aServiceIndex, serv->Array()[i].DataTypes()[j].iDataType.Des());
- sm->iServiceMime = aServicesDb->ServiceStringLC(aServiceIndex, transformedMime->Des());
- CleanupStack::Pop(sm->iServiceMime);
- CleanupStack::PopAndDestroy(ptr);
- CleanupStack::PopAndDestroy(transformedMime);
- //StringLoader::LoadL( R_DA_SERVICE_OPEN, serv->Array()[i].DataTypes()[j].iDataType.Des());
- sm->iServiceUid=aServiceUid;
- }
-
- //insert the client application
- InsertApplicationL(*sm, uid, serv->Array()[i].DataTypes()[j].iPriority, &ls);
-
- //get the Uid of the default application for this service and MIME
- ls.AppForDataType(serv->Array()[i].DataTypes()[j].iDataType,sm->iDefaultAppUid);
-
- if(createSM)
- {
- //sm was created this iteration, ad it.
- iServMimes.AppendL(sm);//takes ownership of sm
- upperMarker++;
- CleanupStack::Pop(sm);
-
- }
- }//for
- /*
- * If a service that has no MIME will be considered, some code must be added (probably in this place)
- */
- }//if (
-
- }
- __ASSERT_DEBUG(upperMarker == iServMimes.Count(), User::Panic( _L("upperMarker bad value"), 1));
-
- if(sr)
- {
- //we do not need it any more
- delete sr;
- sr=NULL;
- }
- if(lowerMarker == upperMarker)
- {
- //current app does not support any MIME for the current service, clean and get out of here
- CleanupStack::PopAndDestroy(serv);
- CleanupStack::PopAndDestroy(); // closes RApaLsSession
- return;
- }
-
- if(!iSimplifiedView)
- {
- //if we are here, we have MIMEs for the current service
- //iterate once more and add applications for MIMEs already in the list
- for (i=0; i<serv->Array().Count(); i++)
- {
- uid=serv->Array()[i].Uid();
- if( uid == iAppUid) continue; //we don't add our client application once more in the list (it is already there)
- for(j=0; j<serv->Array()[i].DataTypes().Count(); j++)
- for(k=lowerMarker; k<upperMarker; k++)
- if(iServMimes[k]->iMime->Des() == serv->Array()[i].DataTypes()[j].iDataType.Des8())
- {
- InsertApplicationL(*(iServMimes[k]), serv->Array()[i].Uid(), serv->Array()[i].DataTypes()[j].iPriority, &ls);
- }//if same MIME
- }
- }
-
- //before deleting some of the entries ...
- if(iSimplifiedView)
- {
- //check the service & MIMEs against the task list...
- //first, check the service against task services
- for(it=0; it<iTasks.Count(); it++)
- for(jt=0; jt<iTasks[it]->iServicesUids.Count(); jt++)
- if(aServiceUid.iUid == iTasks[it]->iServicesUids[jt])
- {
- //lets check if the MIME matches too...
- for(k=lowerMarker; k<upperMarker; k++)
- if(*iServMimes[k]->iMime == *iTasks[it]->iMimes[jt])
- {
- //this entry matches an entry in the task list
- //add the applications to the list
- PopulateTaskWithApplicationsL(*iTasks[it],iServMimes[k]);
- //link the sm, if it has more than 1 application
- break;//sm found, no need to search for it further
- }
- }
- }
-
-
-
- //iterate from the newly added entries and set the index
- for(k=lowerMarker; k<upperMarker; k++)
- {
- TBool smSetOrRemoved = EFalse;
- //check for single applications
- if( iServMimes[k]->iApplications.Count() <2 && !flagShowAll)
- {
- //this entry has a single element (that should not be shown)
- //we either delete it, or move it
- if(iServMimes[k]->iUsedByTasks)
- {
- //the sm is used by tasks, we move it
- iTaskServMimes.AppendL(iServMimes[k]);//takes ownership of sm
- }
- else
- {
- //the sm is not used by tasks, we delete it.
- delete iServMimes[k];
- }
-
- //we remove the entry from the iServMimes (so that it is not shown)
- iServMimes.Remove(k);
- k--;
- upperMarker--;
- smSetOrRemoved=ETrue;
- }
-
- //set the index
- if(!smSetOrRemoved)
- {
- for(i=0 ; i< iServMimes[k]->iApplications.Count() ; i++)
- {
- if(iServMimes[k]->iApplications[i]->iUid == iServMimes[k]->iDefaultAppUid.iUid)
- iServMimes[k]->iDefaultApp=i;
- }
- }
- };
-
- if(iSimplifiedView)
- for(it=0; it<iTasks.Count(); it++)
- if(iTasks[it]->iDefaultAppUid.iUid == 0 && iTasks[it]->iApplications.Count()>0)
- {
- //there is no uid, look for the platform App and make it the default
- for(jt=0; jt<iTasks[it]->iApplications.Count(); jt++)
- if(iTasks[it]->iApplications[jt]->iFlags & CAppHelper::EFlagPlatformApp)
- {
- iTasks[it]->iDefaultAppUid.iUid = iTasks[it]->iApplications[jt]->iUid;
- iTasks[it]->iDefaultApp=jt;
- break;//app found, no need to search for it any longer
- };
-
- //if no app found, mark the first one as default
- if(iTasks[it]->iDefaultAppUid.iUid == 0)
- {
- iTasks[it]->iDefaultAppUid.iUid = iTasks[it]->iApplications[0]->iUid;
- iTasks[it]->iDefaultApp = 0;//the index
- };
- }
- else
- for(jt=0; jt<iTasks[it]->iApplications.Count(); jt++)
- if(iTasks[it]->iApplications[jt]->iUid == iTasks[it]->iDefaultAppUid.iUid)
- {
- iTasks[it]->iDefaultApp=jt;
- break;//app found, no need to search for it any longer
- }
-
- //done, destroy serv
- CleanupStack::PopAndDestroy(serv);
- CleanupStack::PopAndDestroy( ); // closes RApaLsSession
- }
-
-// ---------------------------------------------------------------------------
-// C++ Constructor
-// ---------------------------------------------------------------------------
-//
-CDefaultAppServMimeApps::CDefaultAppServMimeApps(): iList(4)
- {
- }
-
-// ---------------------------------------------------------------------------
-// Destructor
-// ---------------------------------------------------------------------------
-//
-CDefaultAppServMimeApps::~CDefaultAppServMimeApps()
- {
- iServMimes.ResetAndDestroy();
- iTasks.ResetAndDestroy();
- iTaskServMimes.ResetAndDestroy();
- }
-
-// ---------------------------------------------------------------------------
-// This function sorts the Services & MIMEs and their applications.
-// It also sorts the Serivces & MIMEs associated with tasks
-// ---------------------------------------------------------------------------
-//
-void CDefaultAppServMimeApps::BeautifyAndSortServMimeApps(void)
- {
- //first, go through the Services & MIMEs localized names and sort them
- TLinearOrder<CServiceMime> order(&CServiceMime::OrderServiceMimes);
- iServMimes.Sort(order);
-
- //go through applications and sort them
- TInt i,j;
- for(i=0; i<iServMimes.Count(); i++)
- {
- TLinearOrder<CAppHelper> order2(&CAppHelper::OrderApplications);
- iServMimes[i]->iApplications.Sort(order2);
- //get our app index
- for(j=0; j<iServMimes[i]->iApplications.Count(); j++)
- if(iServMimes[i]->iApplications[j]->iUid == iServMimes[i]->iDefaultAppUid.iUid)
- iServMimes[i]->iDefaultApp = j;
- };
- //if we have tasks, we sort their apps too
- for(i=0; i<iTasks.Count(); i++)
- {
- TLinearOrder<CAppHelper> order2(&CAppHelper::OrderApplications);
- iTasks[i]->iApplications.Sort(order2);
- //get our app index
- for(j=0; j<iTasks[i]->iApplications.Count(); j++)
- if(iTasks[i]->iApplications[j]->iUid == iTasks[i]->iDefaultAppUid.iUid)
- iTasks[i]->iDefaultApp = j;
- };
- }
-
-
-// ---------------------------------------------------------------------------
-// This function reads from the resource file the list of tasks (and associated data).
-// This function is used during construction
-// ---------------------------------------------------------------------------
-//
-void CDefaultAppServMimeApps::GetTaskListL( TInt aResourceId )
- {
- TResourceReader reader;
- TInt i;
- CServiceRegistry* sr=CServiceRegistry::NewL();
- CleanupStack::PushL(sr);
-
- // Read tasks
-
- CEikonEnv::Static()->CreateResourceReaderLC( reader, aResourceId );
-
- TInt count = reader.ReadInt16();
- for ( i = 0; i < count; i++ )
- {
- CMediaTask* task=CMediaTask::NewLC(reader);
- // Read the default application for this task ...
- sr->GetDefault(KOpenServiceUid, *task->iMimeLabel, task->iDefaultAppUid);
-
- //add the task to the list
- iTasks.Append(task);
- CleanupStack::Pop(task);
- }
-
- CleanupStack::PopAndDestroy(); // reader
- CleanupStack::PopAndDestroy(sr);
- }
-
-// ---------------------------------------------------------------------------
-// This function adds a new Application to a list of an Service & Mime object.
-// ---------------------------------------------------------------------------
-//
-void CDefaultAppServMimeApps::InsertApplicationL(CServiceMime& aServMime, const TUid& aAppUid, const TDataTypePriority& aPrio, const RApaLsSession *aLs)
- {
- TBool addIt = ETrue;
-
- if(aPrio == KDataTypePrioritySystem)
- {
- // the application to be inserted has system priority
- if(aServMime.iDefaultApp == -1)
- {
- //we have non-system applications in the list
- //delete them ...
- aServMime.iApplications.ResetAndDestroy();
-
- //... and make the default -2 ... (it means single app with system priority)
- aServMime.iDefaultApp = -2;
- //... and add our application (after exiting from the "if")
- }
- else
- {
- //do not delete the applications, but just add our application
- //...and make the default -3 (it means multiple apps with system priority)
- aServMime.iDefaultApp = -3;
- //... and add our application (after exiting from the "if")
- }
- }
- else
- {
- // the application to be inserted does NOT have system priority
- if(aServMime.iDefaultApp < -1)
- {
- // there are only System apps in the list, do not add ours
- addIt = EFalse;
- }
- // else there are normal applications in the list, insert ours, as well
- }
- //add the application to the list
- if(addIt)
- {
- TApaAppInfo info;
- aLs->GetAppInfo(info,aAppUid);
- //find the best name for the application
- CAppHelper *app = NULL;
- if(info.iCaption.Size() != 0)
- {
- //this is for now, the preferred name
- app = CAppHelper::NewLC(info.iCaption, aAppUid.iUid);
- }
- else
- {
- //fall-back name
- app = CAppHelper::NewLC(info.iShortCaption, aAppUid.iUid);
- };
- //is the app platform application??
- if (info.iFullName.Left(1) == _L("Z") ||
- info.iFullName.Left(1) == _L("z"))
- app->iFlags |= CAppHelper::EFlagPlatformApp;
- //append the name
- aServMime.iApplications.AppendL(app);
- CleanupStack::Pop(app);
- }
- }
-
-// ---------------------------------------------------------------------------
-// This function takes a task and a Service & MIME object. It checks all the applications that support the given
-// Service & MIME object (from its list). If an application is not in the task's application list, this function adds
-// it there, with a score of 1. If the application is already in the list, then its score is incremented.
-// The Service & MIME object is also marked as being used by a task.
-// ---------------------------------------------------------------------------
-//
-void CDefaultAppServMimeApps::PopulateTaskWithApplicationsL(CMediaTask& aTask,CServiceMime* aServMime)
- {
- TInt i,j;
- TBool found;
- //add the applications to the list
- for(i=0; i<aServMime->iApplications.Count(); i++)
- {
- found=EFalse;
- for(j=0; j<aTask.iApplications.Count(); j++)
- if(aServMime->iApplications[i]->iUid == aTask.iApplications[j]->iUid)
- {
- //we found this application...
- found=ETrue;
- //... increase its score
- aTask.iApplications[j]->iScore++;
- //... and get to the next application
- break; //application found, no need to search for it any more
- }
- //if the application was not found, we have to add it!
- if(!found)
- {
- CAppHelper *app = CAppHelper::NewLC(*aServMime->iApplications[i]);
- aTask.iApplications.AppendL(app);
- CleanupStack::Pop(app);
- }
- }
- //mark the sm
- aServMime->iUsedByTasks=ETrue;
- //link the sm
- aTask.iSMs.Append(aServMime);
- }
-
-// ---------------------------------------------------------------------------
-// This function fills with entries a data structure used by a List Box to display Services & MIMEs or Tasks
-// ---------------------------------------------------------------------------
-//
-void CDefaultAppServMimeApps::GetServicesAndMimesListL(CDesCArray& aServicesAndMimesArray)
- {
- TInt i;
- aServicesAndMimesArray.Reset();
- if(iSimplifiedView)
- {
- for ( i=0 ; i<iTasks.Count() ; i++ )
- {
- TDesC* string = GetMediaTaskStringLC(*iTasks[i], ETrue);
- aServicesAndMimesArray.AppendL (*string);
- CleanupStack::PopAndDestroy(string);
- }
- }
- else
- {
- for ( i=0 ; i<iServMimes.Count() ; i++ )
- {
- TDesC* string = GetServiceAndMimeStringLC(*iServMimes[i], ETrue);
- aServicesAndMimesArray.AppendL (*string);
- CleanupStack::PopAndDestroy(string);
- }
- }
-
- }
-
-// ---------------------------------------------------------------------------
-// This function fills a Popup-list data structure with applications specific to the selected Service & MIME or Task
-// ---------------------------------------------------------------------------
-//
-void CDefaultAppServMimeApps::GetApplicationsListL(TInt aIndex, CDesCArray& aApplicationsArray, HBufC*& aTitle)
- {
- // Strings will be of the format "1\tApplication"
- _LIT (KStringAppsDefault, "1\t");
- _LIT (KStringAppsNonDefault, "0\t");
-
- TInt bufLen=20;
- HBufC *string=HBufC::NewLC(bufLen);
- HBufC *newString=NULL;
- TInt i,len;
- RPointerArray<CAppHelper> *apps=NULL;
-
- //get the proper list
- if(iSimplifiedView)
- apps = &(iTasks[aIndex]->iApplications);
- else
- apps = &(iServMimes[aIndex]->iApplications);
-
- for ( i=0 ; i<apps->Count() ; i++ )
- {
- len=(*apps)[i]->iName->Size() + KStringMargin ;
- if(len>bufLen)
- {
- newString=string->ReAllocL(len);
- if(newString != string)
- {
- CleanupStack::Pop(string);//already destroyed
- string=newString;
- CleanupStack::PushL(string);
- }
- bufLen=len;
- newString=NULL;
- }
- //copy the application into the string buffer
- TPtr ptr=string->Des();
- TBool isDefault=EFalse;
-
- if( iSimplifiedView && iTasks[aIndex]->iDefaultApp==i) isDefault=ETrue;
- if( !iSimplifiedView && iServMimes[aIndex]->iDefaultApp==i) isDefault=ETrue;
-
- if( isDefault ) ptr.Copy(KStringAppsDefault);
- else ptr.Copy(KStringAppsNonDefault);
- ptr.Append(*(*apps)[i]->iName);
-
- aApplicationsArray.AppendL (ptr);
- }
-
- CleanupStack::PopAndDestroy(string); //data in ptr is out of scope
-
- //get the title now
- if ( iSimplifiedView )
- aTitle = GetMediaTaskStringLC(*iTasks[aIndex], EFalse);
- else
- aTitle = GetServiceAndMimeStringLC(*iServMimes[aIndex], EFalse);
- CleanupStack::Pop(aTitle);
- }
-
-// ---------------------------------------------------------------------------
-// This function sets a new default, for a Service & MIME pair or for a Task.
-// The function also updates the list of Services & MIMEs (or Tasks), to display the new default application
-// ---------------------------------------------------------------------------
-//
-void CDefaultAppServMimeApps::UpdateDefaultL(TInt aServiceAndMimeIndex, TInt aDefaultAppIndex, CDesCArray *aServicesAndMimesArray)
- {
- //check for correct parameters
- if (aServiceAndMimeIndex <0 || aDefaultAppIndex <0) User::Leave(KErrArgument);
- if(iSimplifiedView)
- {
- if( aServiceAndMimeIndex >= iTasks.Count() ||
- aDefaultAppIndex >= iTasks[aServiceAndMimeIndex]->iApplications.Count())
- User::Leave(KErrArgument);
- }
- else
- {
- if( aServiceAndMimeIndex >= iServMimes.Count() ||
- aDefaultAppIndex >= iServMimes[aServiceAndMimeIndex]->iApplications.Count())
- User::Leave(KErrArgument);
- }
-
- //if we are here, parameters are within their range
- TBool doUpdate=ETrue;
- TUid defaultAppUid;
- CServiceRegistry *sr=CServiceRegistry::NewL();
- CleanupStack::PushL(sr);
-
- //update the default in the Service Registry
- if(iSimplifiedView)
- {
- TInt i,j;
- TUid serviceUid;
- //set the default for the generic MIME (and our server application)
- TDataType dt(*iTasks[aServiceAndMimeIndex]->iMimeLabel);
- defaultAppUid=TUid::Uid(iTasks[aServiceAndMimeIndex]->iApplications[aDefaultAppIndex]->iUid);
- if(sr->SetDefault(KOpenServiceUid, dt,defaultAppUid))
- {
- //if we are here, SetDefault returned an error.
- //so we do not update the default...
- doUpdate=EFalse;
- }
- //set the selected default for all the Services & MIME that it supports
- if(doUpdate)
- {
- for(i=0; i<iTasks[aServiceAndMimeIndex]->iSMs.Count(); i++)
- for(j=0; j<iTasks[aServiceAndMimeIndex]->iSMs[i]->iApplications.Count(); j++)
- if(defaultAppUid.iUid == iTasks[aServiceAndMimeIndex]->iSMs[i]->iApplications[j]->iUid )
- {
- //the selected application supports this Service & MIME pair.
- //make the app default for the pair.
- dt=*iTasks[aServiceAndMimeIndex]->iSMs[i]->iMime;
- serviceUid=iTasks[aServiceAndMimeIndex]->iSMs[i]->iServiceUid;
- sr->SetDefault(serviceUid, dt,defaultAppUid);
- //update the sm so that it reflects the new default
- iTasks[aServiceAndMimeIndex]->iSMs[i]->iDefaultAppUid=defaultAppUid;
- iTasks[aServiceAndMimeIndex]->iSMs[i]->iDefaultApp=j;
- break; //application found in sm's list, do not need to search for it any more
- }
- //update the default entries
- iTasks[aServiceAndMimeIndex]->iDefaultApp=aDefaultAppIndex;
- iTasks[aServiceAndMimeIndex]->iDefaultAppUid=defaultAppUid;
- }
-
- }
- else
- {
- TDataType dt(*iServMimes[aServiceAndMimeIndex]->iMime);
- defaultAppUid=TUid::Uid(iServMimes[aServiceAndMimeIndex]->iApplications[aDefaultAppIndex]->iUid);
- if(sr->SetDefault(iServMimes[aServiceAndMimeIndex]->iServiceUid, dt,defaultAppUid))
- {
- //if we are here, SetDefault returned an error.
- //so we do not update the default...
- doUpdate=EFalse;
- }
- //update the default entries
- if(doUpdate)
- {
- iServMimes[aServiceAndMimeIndex]->iDefaultApp=aDefaultAppIndex;
- iServMimes[aServiceAndMimeIndex]->iDefaultAppUid=defaultAppUid;
- }
- }
- CleanupStack::PopAndDestroy(sr);
-
- //check if setting the default failed
- if(!doUpdate)
- {
- //### if updating the default failed, here would be the place to put an error note to the user
- return; // or leave
- };
-
- //update the item in the list
- if (aServicesAndMimesArray)
- {
- //get the string
- TDesC* string;
- if(iSimplifiedView)
- string = GetMediaTaskStringLC(*iTasks[aServiceAndMimeIndex], ETrue);
- else
- string = GetServiceAndMimeStringLC(*iServMimes[aServiceAndMimeIndex], ETrue);
- aServicesAndMimesArray->Delete(aServiceAndMimeIndex);
- aServicesAndMimesArray->InsertL(aServiceAndMimeIndex,*string);
- CleanupStack::PopAndDestroy(string);
- }
- }
-
-// ---------------------------------------------------------------------------
-// This function creates a string that will become en element of a list box. To create the string, the function
-// concatenates several sub-strings.
-// ---------------------------------------------------------------------------
-//
-HBufC* CDefaultAppServMimeApps::GetServiceAndMimeStringLC(CServiceMime& aServMime, TBool aInsertDefaultApp) const
- {
- HBufC *string=NULL;
- TPtr *ptr=NULL;
- TInt len;
- _LIT(KTab,"\t");
-
- if(aInsertDefaultApp && aServMime.iDefaultApp >= 0) //it may be that we do not have a default ...
- len=aServMime.iApplications[aServMime.iDefaultApp]->iName->Size();
- else
- len=0;
- len+= aServMime.iServiceMime->Size();
- len+= KStringMargin ;
-
- string=HBufC::NewLC(len);
-
- //build the string, add the tabs before and after
- ptr=new (ELeave) TPtr(string->Des());
- CleanupStack::PushL(ptr);
-
- ptr->Copy(*aServMime.iServiceMime);
-
- if(aInsertDefaultApp)
- {
- ptr->Insert(0,KTab);
- ptr->Append(KTab);
-
- //add default app
- if(aServMime.iDefaultApp >= 0) //it may be that we do not have a default ...
- ptr->Append(*aServMime.iApplications[aServMime.iDefaultApp]->iName);
- }
-
- CleanupStack::PopAndDestroy(ptr);
-
- return string; //pass ownership, string also on the stack
-
- }
-
-// ---------------------------------------------------------------------------
-// This function creates a string that will become en element of a list box. To create the string, the function
-// concatenates several sub-strings.
-// ---------------------------------------------------------------------------
-//
-HBufC* CDefaultAppServMimeApps::GetMediaTaskStringLC(CMediaTask& aMediaTask, TBool aInsertDefaultApp) const
- {
- TPtr *ptr=NULL;
- TInt len = KStringMargin;
- _LIT(KTab,"\t");
- HBufC *taskName=NULL; //not owned, not deleted at the end of function
-
- //compute the string length
- if(aInsertDefaultApp)
- {
- //we insert the task list name
- taskName = aMediaTask.iTaskList;
- //we also insert the length od the default app (if we have it)
- if(aMediaTask.iDefaultApp >= 0)//it may be that we do not have a default ...
- len += aMediaTask.iApplications[aMediaTask.iDefaultApp]->iName->Size();
- }
- else
- {
- //we should insert the task title, if we have it
- taskName = aMediaTask.iTaskTitle;
- //taskName = aMediaTask.iTaskList;
- };
- len += taskName->Size();
-
- //allocate the string
- HBufC *string=HBufC::NewLC(len);
-
- //add the title
- ptr=new (ELeave) TPtr(string->Des());
- CleanupStack::PushL(ptr);
- ptr->Copy(*taskName);
-
- //add other stuff
- if(aInsertDefaultApp)
- {
- ptr->Insert(0,KTab);
- ptr->Append(KTab);
- //add default app
- if(aMediaTask.iDefaultApp >= 0) //it may be that we do not have a default ...
- ptr->Append(*aMediaTask.iApplications[aMediaTask.iDefaultApp]->iName);
- }
-
- CleanupStack::PopAndDestroy(ptr);
-
- return string; //pass ownership, string also on the stack
- }
-
-// ---------------------------------------------------------------------------
-// This function resets (removes) the defaults associated with a certain task,
-// or it can remove all the defaults
-// ---------------------------------------------------------------------------
-//
-TInt CDefaultAppServMimeApps::RestoreFactorySettingsL(TInt aCathegory)
- {
- TInt i, j;
- CServiceRegistry *sr=NULL;
-
- if(aCathegory == -1)
- {
- sr=CServiceRegistry::NewL();
-
- if ( iSimplifiedView )
- {
- for(i=0; i<iTasks.Count(); i++)
- {
- for(j=0; j<iTasks[i]->iMimes.Count(); j++)
- {
- sr->RemoveEntry(TUid::Uid(iTasks[i]->iServicesUids[j]), TDataType(*iTasks[i]->iMimes[j]));
- }
- //remove the entry that identifies the default app for the task
- sr->RemoveEntry(KOpenServiceUid, TDataType(*iTasks[i]->iMimeLabel));
- }
- }
- else
- {
- //we reset the defaults for all the services & MIME
- for(i=0; i<iServMimes.Count(); i++)
- sr->RemoveEntry(iServMimes[i]->iServiceUid, TDataType(*iServMimes[i]->iMime));
- //remove the entry that identifies the default app for the task
- for(i=0; i<iTasks.Count(); i++)
- sr->RemoveEntry(KOpenServiceUid, TDataType(*iTasks[i]->iMimeLabel));
- }
- }
- else if(iSimplifiedView && aCathegory >= 0 && aCathegory < iTasks.Count())
- {
- //we are in simplified view, restore defaults for a single task
- sr=CServiceRegistry::NewL();
- for(i=0; i<iTasks[aCathegory]->iMimes.Count(); i++)
- sr->RemoveEntry(TUid::Uid(iTasks[aCathegory]->iServicesUids[i]), TDataType(*iTasks[aCathegory]->iMimes[i]));
- //remove the entry that identifies the default app for the task
- sr->RemoveEntry(KOpenServiceUid, TDataType(*iTasks[aCathegory]->iMimeLabel));
- }
- else if(!iSimplifiedView && aCathegory >= 0 && aCathegory < iServMimes.Count())
- {
- //we are in the advanced view, restore defaults for a single Service & MIME pair
- sr=CServiceRegistry::NewL();
- sr->RemoveEntry(iServMimes[aCathegory]->iServiceUid, TDataType(*iServMimes[aCathegory]->iMime));
- }
- else return -1; //wrong aCathegory range
-
- if(sr) delete sr;
- return 0;
- }
--- a/defaultapplicationsettings/server/src/das_srvmime_dlg.cpp Thu Dec 17 08:46:07 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,530 +0,0 @@
-/*
-* Copyright (c) 2005-2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Implementation of the Services & MIME view class
-*
-*/
-
-
-
-// System includes
-#include <e32base.h>
-#include <AknIconArray.h>
-#include <gulicon.h>
-#include <AknsUtils.h>
-#include <avkon.mbg>
-
-#include <featmgr.h>
-#include <hlplch.h>
-
-#include <aknlists.h>
-#include <barsread.h>
-#include <e32def.h>
-#include <eikclbd.h>
-#include <eikmenub.h>
-
-#include <defaultappserver.rsg>
-#include <StringLoader.h>
-#include <uikon.hrh>
-#include <aknPopup.h>
-#include <akntitle.h>
-#include <aknsfld.h>
-#include <featmgr.h>
-
-#include <aknsettingitemlist.h>
-
-#include "das_srvmime_dlg.h"
-#include "das_servmimeapps.h"
-#include "das_appui.h"
-#include "das_app.h"
-#include "das.hrh"
-#include "das.hlp.hrh"
-
-
-// ======== MEMBER FUNCTIONS ========
-
-// ---------------------------------------------------------------------------
-// Symbian 2-phased constructor
-// ---------------------------------------------------------------------------
-//
-CDefaultAppSrvMimeDlg* CDefaultAppSrvMimeDlg::NewL(CDefaultAppAppUi* aAppUi)
- {
- //we first need to create a CDefaultAppServMimeApps instance
- TInt *selected;
- if(aAppUi->iReloadDlgAdvanced)
- {
- //some settings for the advanced view
- selected=&(aAppUi->iSelectedItemAdvanced);
- }
- else
- {
- //some settings for the simple view
- selected=&(aAppUi->iSelectedItemSimple);
- };
-
- //create the dialog instance (ownership of servMimeApps is passed to the dialog
- CDefaultAppSrvMimeDlg *dialog=new(ELeave)CDefaultAppSrvMimeDlg(aAppUi, selected);
- CleanupStack::PushL(dialog);
- dialog->ConstructL(R_DAS_MENUBAR);
- CleanupStack::Pop(dialog);
- return dialog;
- }
-
-// ---------------------------------------------------------------------------
-// C++ Constructor
-// ---------------------------------------------------------------------------
-//
-CDefaultAppSrvMimeDlg::CDefaultAppSrvMimeDlg(CDefaultAppAppUi* aAppUi, TInt *aSelected) :
- CAknSelectionListDialog(*aSelected, &aAppUi->iServMimeApps->iList, NULL),
- iDefaultAppUi(aAppUi), iSelected(aSelected), iOkToExit(EFalse)
- {
- //no implementation necessary
- }
-
-// ---------------------------------------------------------------------------
-// Destructor
-// ---------------------------------------------------------------------------
-//
-CDefaultAppSrvMimeDlg::~CDefaultAppSrvMimeDlg()
- {
- if ( iDefaultAppUi )
- {
- iDefaultAppUi->SetDialogExist( EFalse );
- }
-
- if ( iPopupList )
- {
- iPopupList->CancelPopup();
- iPopupList = NULL;
- }
- }
-
-
-// ---------------------------------------------------------------------------
-// From class From CAknSelectionListDialog
-// This function is called when buttons/softkeys are pressed, to check if the dlg should exit.
-// We make the checkings and return the result.
-// ---------------------------------------------------------------------------
-//
-TBool CDefaultAppSrvMimeDlg::OkToExitL(TInt aButtonId)
- {
- CAknSelectionListDialog::OkToExitL(aButtonId);
- if ( aButtonId == EAknSoftkeyOptions && iPopupList )
- {
- iPopupList->CancelPopup();
- iPopupList = NULL;
- }
- if(aButtonId == EAknSoftkeyBack || aButtonId == EAknCmdOpen || aButtonId == EAknSoftkeyOk)
- {
- ProcessCommandL(aButtonId);
- };
- if(aButtonId==EAknCmdEnd || aButtonId==EAknSoftkeyCancel)
- {
- iOkToExit=ETrue;
- iDefaultAppUi->iReloadDlg=EFalse;
- }
- return iOkToExit;
- }
-
-// ---------------------------------------------------------------------------
-// From class From CAknSelectionListDialog
-// This function is called when a command is issued by the user.
-// ---------------------------------------------------------------------------
-//
-void CDefaultAppSrvMimeDlg::ProcessCommandL(TInt aCommand)
- {
- CAknSelectionListDialog::ProcessCommandL(aCommand); //this hides the menu and takes care of find
- iEnterKeyPressed=EFalse;
-
-
- *iSelected = ListBox()->CurrentItemIndex();
- if (FindBox() && *iSelected != -1)
- *iSelected = STATIC_CAST(CAknFilteredTextListBoxModel*,ListBox()->Model())->Filter()->FilteredItemIndex(*iSelected);
- // ATTENTION: If *iSelected is -1 it means that the list is empty!
-
-
- switch(aCommand)
- {
- case EDasCmdAdvanced:
- //SwitchViewL();
-
- //make the dialog reload
- iDefaultAppUi->iReloadDlgAdvanced=ETrue;
- iOkToExit=ETrue;
- //force our exit
- TryExitL(0);
-
- break;
- case EAknCmdHelp:
- HlpLauncher::LaunchHelpApplicationL(iEikonEnv->WsSession(), iDefaultAppUi->AppHelpContextL());
- break;
- case EDasCmdResetAll:
- case EDasCmdResetSelected:
- if(aCommand==EDasCmdResetSelected)
- {
- if(*iSelected!=-1)
- iDefaultAppUi->iServMimeApps->RestoreFactorySettingsL(*iSelected);
- }
- else
- iDefaultAppUi->iServMimeApps->RestoreFactorySettingsL(-1);
-
- //common code:
- //reload the dialog
- if(!iDefaultAppUi->iServMimeApps->iSimplifiedView)
- iDefaultAppUi->iReloadDlgAdvanced=ETrue;
- iOkToExit=ETrue;
- //delete the iServMimeApps so that it will be reloaded next time
- delete iDefaultAppUi->iServMimeApps;
- iDefaultAppUi->iServMimeApps=NULL;
- //force our exit
- TryExitL(0);
- break;
- case EAknCmdExit:
- //exit the server
- iOkToExit=ETrue;
- iDefaultAppUi->iReloadDlg=EFalse;
- //force our exit
- TryExitL(0);
- break;
- case EAknSoftkeyBack:
- //we have 2 cases here:
- //if we are in the advanced view, we switch back to the simple view.
- //if we are in the simple view, then we exit the server
- if(iDefaultAppUi->iServMimeApps->iAppUid == KUidGS && !iDefaultAppUi->iServMimeApps->iSimplifiedView)
- {
- //switch back to simple view
- //make the dialog reload
- iDefaultAppUi->iReloadDlgAdvanced=EFalse;
- iOkToExit=ETrue;
- // no need to force our exit, we are comming from a TryExitL()
- }
- else
- {
- //exit the server
- iOkToExit=ETrue;
- iDefaultAppUi->iReloadDlg=EFalse;
- //tell AppUi that the exit is due a "Back" command
- iDefaultAppUi->iExitBack=ETrue;
- }
- break;
- case EAknCmdOpen:
- case EAknSoftkeyOk:
- //we have the index of the selected item in *iSelected
- OpenMenuForSelectedServiceAndMimeL(*iSelected);
- break;
- }
- }
-
-// ---------------------------------------------------------------------------
-// From class From CAknSelectionListDialog
-// Called during the construction of the dialog. We build the list of elements here.
-// ---------------------------------------------------------------------------
-//
-void CDefaultAppSrvMimeDlg::PreLayoutDynInitL()
- {
- CAknSelectionListDialog::PreLayoutDynInitL();
-
- CEikSettingsListBox* listbox=(CEikSettingsListBox*)ListBox();
- // Ownership retained by us
- listbox->CreateScrollBarFrameL( ETrue );
- listbox->ScrollBarFrame()->SetScrollBarVisibilityL(CEikScrollBarFrame::EOn, CEikScrollBarFrame::EAuto );
- listbox->UpdateScrollBarsL();
-
- //enable marquee
- EnableMarqueeL();
-
- //restore the selected item
- if(*iSelected >= 0)
- {
- listbox->SetCurrentItemIndex(*iSelected);
- };
-
- //change the title
- CEikStatusPane *statusPane=iDefaultAppUi->StatusPane();
- if(statusPane && statusPane->PaneCapabilities(TUid::Uid(EEikStatusPaneUidTitle)).IsPresent())
- {
- CAknTitlePane *titlePane=(CAknTitlePane*)(statusPane->ControlL(TUid::Uid(EEikStatusPaneUidTitle)));
- HBufC* titleString;
- //load the correct title string
- if(iDefaultAppUi->iReloadDlgAdvanced)
- {
- if(iDefaultAppUi->iClientUid == KUidGS)
- //User activated advanced view in Control Panel
- titleString=StringLoader::LoadLC(R_DA_TITLE_ADVANCED);
- else //Client is some application other than Control Panel; load app specific view.
- titleString=StringLoader::LoadLC(R_DA_TITLE_APP);
- }
- else //Simple view in Control Panel
- titleString=StringLoader::LoadLC(R_DA_TITLE_MAIN);
- titlePane->SetTextL(*titleString);
- CleanupStack::PopAndDestroy(titleString);
- };
-
- ListBox()->AddItemChangeObserverL( this );
- }
-
-// ---------------------------------------------------------------------------
-// From class CAknDialog.
-// Called when the menu is initialized.
-// ---------------------------------------------------------------------------
-//
-void CDefaultAppSrvMimeDlg::DynInitMenuPaneL(TInt aResourceId, CEikMenuPane* aMenuPane)
- {
- if (aResourceId != R_DAS_MENU) return;
- __ASSERT_ALWAYS(iDefaultAppUi->iServMimeApps,User::Leave(KErrGeneral));
-
- // for !iSimplifiedView dim the EDasCmdAdvanced
- if(!iDefaultAppUi->iServMimeApps->iSimplifiedView)
- aMenuPane->SetItemDimmed(EDasCmdAdvanced, ETrue);
-
- // if the Client is not observing when we are exiting, then dim the Exit
- if(iDefaultAppUi->iServMimeApps->iFlagNoObserver)
- aMenuPane->SetItemDimmed(EAknCmdExit, ETrue);
-
- // Help should be displayed only if the feature is supported
- // according to Feature Manager
- if (!FeatureManager::FeatureSupported(KFeatureIdHelp))
- {
- aMenuPane->SetItemDimmed(EAknCmdHelp, ETrue);
- }
- //if the findbox already exists, dim the find menu item.
- if ( FindBox()->IsVisible() )
- {
- aMenuPane->SetItemDimmed(EAknCmdFindPopupActivated, ETrue);
- }
-
- CTextListBoxModel* modelSm = ( ( CEikSettingsListBox* )ListBox() )->Model(); // not taking ownership
- TInt itemCount = modelSm->NumberOfItems();
- //if the listbox is empty, dim the change menu item.
- if (itemCount == 0)
- {
- aMenuPane->SetItemDimmed(EAknCmdOpen, ETrue);
- }
-
- }
-
-// ---------------------------------------------------------------------------
-// From class CCoeControl.
-// Called to get the help context.
-// ---------------------------------------------------------------------------
-//
-void CDefaultAppSrvMimeDlg::GetHelpContext(TCoeHelpContext& aContext) const
- {
- aContext.iMajor = KUidDefaultAppServer;
-
- //check if we have proper values
- if(!iDefaultAppUi->iServMimeApps)
- aContext.iContext = KDA_HLP_MAIN;
- else
- {
- //check for GS client
- if (iDefaultAppUi->iServMimeApps->iAppUid == KUidGS)
- {
- //the client is GS. Check for simplified or advanced view
- if (iDefaultAppUi->iServMimeApps->iSimplifiedView)
- aContext.iContext = KDA_HLP_MAIN;
- else
- aContext.iContext = KDA_HLP_ADVANCED;
- }
- else
- {
- //this is not GS client
- aContext.iContext = KDA_HLP_APPLICATION;
- };
- };
- }
-
-// ---------------------------------------------------------------------------
-// From class CCoeControl.
-// Called to get the help context.
-// ---------------------------------------------------------------------------
-//
-void CDefaultAppSrvMimeDlg::SizeChanged()
- {
- CAknSelectionListDialog::SizeChanged();
- }
-
-
-// ---------------------------------------------------------------------------
-// Enables marquee for the list elements.
-// ---------------------------------------------------------------------------
-//
-void CDefaultAppSrvMimeDlg::EnableMarqueeL()
- {
- CFormattedCellListBoxData *tmp=((CEikSettingsListBox*)(ListBox()))->ItemDrawer()->FormattedCellData();
-
- tmp->SetMarqueeParams(KMaxTInt, 6, 2000000, 10000); // Magic: loop forever
- tmp->EnableMarqueeL(ETrue);
- }
-
-
-// ---------------------------------------------------------------------------
-// Loads icons from a file and sets them in the drawer for iSavedGamesList
-// ---------------------------------------------------------------------------
-//
-CArrayPtr<CGulIcon>* CDefaultAppSrvMimeDlg::GetPopupListIconsL() const
- {
- // CGulIcon class packages two bitmaps: icon image and its mask
- // CAknIconArray inherits from CArrayPtrFlat
- CArrayPtr<CGulIcon>* iconList = new (ELeave)
- CAknIconArray(2);
- CleanupStack::PushL(iconList);
-
- TFileName iconFile( AknIconUtils::AvkonIconFileName() );
- MAknsSkinInstance* skinInstance;
- CFbsBitmap* newIconBmp = NULL;
- CFbsBitmap* newIconBmpMask = NULL;
- CGulIcon* newIcon = NULL;
-
- skinInstance = AknsUtils::SkinInstance();
-
- //creating blank icon
- AknsUtils::CreateIconLC(skinInstance,KAknsIIDQgnPropEmpty,
- newIconBmp,newIconBmpMask,iconFile,
- EMbmAvkonQgn_prop_empty,
- EMbmAvkonQgn_prop_empty_mask);
-
- newIcon = CGulIcon::NewL(newIconBmp,newIconBmpMask);
-
- CleanupStack::Pop(2);//newIconBmp & newIconBmpMask
- CleanupStack::PushL(newIcon);
- iconList->AppendL(newIcon);
-
- CleanupStack::Pop(newIcon);
-
- //creating TICK mark icon
- AknsUtils::CreateIconLC(skinInstance,KAknsIIDQgnPropSubCurrent,
- newIconBmp,newIconBmpMask,iconFile,
- EMbmAvkonQgn_prop_sub_current,
- EMbmAvkonQgn_prop_sub_current_mask);
-
- newIcon = CGulIcon::NewL(newIconBmp,newIconBmpMask);
-
- CleanupStack::Pop(2);//newIconBmp & newIconBmpMask
- CleanupStack::PushL(newIcon);
- iconList->AppendL(newIcon);
-
- CleanupStack::Pop(newIcon);
-
- CleanupStack::Pop(iconList);
-
- newIconBmp = NULL;
- newIconBmpMask = NULL;
- newIcon = NULL;
-
- return iconList;
- }
-
-
-// ---------------------------------------------------------------------------
-// Pops-up a menu list with the Applications for the selected Service & MIME item
-// ---------------------------------------------------------------------------
-//
-void CDefaultAppSrvMimeDlg::OpenMenuForSelectedServiceAndMimeL(TInt aSelectedIndex)
- {
- if(!iDefaultAppUi->iServMimeApps)User::Leave(KErrNotFound);
- if(aSelectedIndex<0)return; //there is no selected item (list is empty)
-
- CAknSingleGraphicPopupMenuStyleListBox *selectedServiceAndMime = new (ELeave) CAknSingleGraphicPopupMenuStyleListBox;
- CleanupStack::PushL(selectedServiceAndMime);
-
- if ( iPopupList != NULL )
- {
- iPopupList->CancelPopup();
- iPopupList = NULL;
- }
-
- iPopupList = CAknPopupList::NewL(selectedServiceAndMime, R_AVKON_SOFTKEYS_OK_CANCEL);
- selectedServiceAndMime->ConstructL(iPopupList,EAknListBoxMenuList);
- selectedServiceAndMime->CreateScrollBarFrameL (ETrue);
- selectedServiceAndMime->ScrollBarFrame()->SetScrollBarVisibilityL(
- CEikScrollBarFrame::EOff,
- CEikScrollBarFrame::EAuto );
-
- //construct icons
- CArrayPtr<CGulIcon>* icons=GetPopupListIconsL();
- selectedServiceAndMime->ItemDrawer()->ColumnData()->SetIconArray(icons); // passing ownership of icons
-
-
- //populate the applications list
- CTextListBoxModel* modelApps = selectedServiceAndMime->Model(); // not taking ownership
- modelApps->SetOwnershipType (ELbmOwnsItemArray);
- CDesCArray* applications = STATIC_CAST(CDesCArray*, modelApps->ItemTextArray());
- HBufC* listTitle=NULL;
- iDefaultAppUi->iServMimeApps->GetApplicationsListL(aSelectedIndex, *applications, listTitle);
-
-
- //set the title of the list
- CleanupStack::PushL(listTitle);
- iPopupList->SetTitleL(*listTitle);
- CleanupStack::PopAndDestroy(listTitle);
- //
- TInt popupOk = iPopupList->ExecuteLD();
- iPopupList = NULL;
-
- if(popupOk)
- {
- TInt selected = selectedServiceAndMime->CurrentItemIndex();
-
- //update the default in the array & list
- //get the list array first
- CTextListBoxModel* modelSm = ((CEikSettingsListBox*)ListBox())->Model(); // not taking ownership
- //modelSm->SetOwnershipType (ELbmOwnsItemArray);
- CDesCArray* servicesAndMimesArray = STATIC_CAST(CDesCArray*, modelSm->ItemTextArray());
- //do the update
- iDefaultAppUi->iServMimeApps->UpdateDefaultL(aSelectedIndex,selected,servicesAndMimesArray);
- //redraw the list
- DrawNow();
- }
- CleanupStack::PopAndDestroy(selectedServiceAndMime);
- }
-
-// ---------------------------------------------------------------------------
-// OfferKeyEventL from ccoecontrol
-// ---------------------------------------------------------------------------
-//
-TKeyResponse CDefaultAppSrvMimeDlg::OfferKeyEventL(const TKeyEvent &aKeyEvent, TEventCode aType)
- {
- if ( aKeyEvent.iCode == EKeyBackspace )
- {
- if ( FindBox()->TextLength() >0 )
- {
- return FindBox()->OfferKeyEventL( aKeyEvent, aType );
- }
- }
- return CAknSelectionListDialog::OfferKeyEventL( aKeyEvent ,aType );
- }
-
-// -----------------------------------------------------------------------------
-// CDefaultAppSrvMimeDlg::ListBoxItemsChanged (from MListBoxItemChangeObserver)
-//
-// -----------------------------------------------------------------------------
-//
-void CDefaultAppSrvMimeDlg::ListBoxItemsChanged( CEikListBox* aListBox )
- {
- if ( aListBox )
- {
- CEikButtonGroupContainer& cba = ButtonGroupContainer();
- CTextListBoxModel* modelSm = ((CEikSettingsListBox*)aListBox)->Model(); // not taking ownership
- TInt itemCount = modelSm->NumberOfItems();
- if (itemCount == 0)
- {
- cba.MakeCommandVisible(EAknCmdOpen, EFalse);
- }
- else
- {
- cba.MakeCommandVisible(EAknCmdOpen, ETrue);
- }
- }
- }
-
--- a/defaultapplicationsettings/server/src/das_view.cpp Thu Dec 17 08:46:07 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,115 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Implementation of the view class
-*
-*/
-
-
-
-// System includes
-
-#include "das_view.h"
-
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// CDefaultAppView::NewL()
-// Two-phased constructor.
-// -----------------------------------------------------------------------------
-//
-CDefaultAppView* CDefaultAppView::NewL( const TRect& aRect )
- {
- CDefaultAppView* self = CDefaultAppView::NewLC( aRect );
- CleanupStack::Pop( self );
- return self;
- }
-
-// -----------------------------------------------------------------------------
-// CDefaultAppView::NewLC()
-// Two-phased constructor.
-// -----------------------------------------------------------------------------
-//
-CDefaultAppView* CDefaultAppView::NewLC( const TRect& aRect )
- {
- CDefaultAppView* self = new ( ELeave ) CDefaultAppView;
- CleanupStack::PushL( self );
- self->ConstructL( aRect );
- return self;
- }
-
-// -----------------------------------------------------------------------------
-// CDefaultAppView::ConstructL()
-// Symbian 2nd phase constructor can leave.
-// -----------------------------------------------------------------------------
-//
-void CDefaultAppView::ConstructL( const TRect& aRect )
- {
- // Create a window for this application view
- CreateWindowL();
-
- // Set the windows size
- SetRect( aRect );
-
- // Activate the window, which makes it ready to be drawn
- ActivateL();
- }
-
-// -----------------------------------------------------------------------------
-// CDefaultAppView::CDefaultAppView()
-// C++ default constructor can NOT contain any code, that might leave.
-// -----------------------------------------------------------------------------
-//
-CDefaultAppView::CDefaultAppView()
- {
- // No implementation required
- }
-
-
-// -----------------------------------------------------------------------------
-// CDefaultAppView::~CDefaultAppView()
-// Destructor.
-// -----------------------------------------------------------------------------
-//
-CDefaultAppView::~CDefaultAppView()
- {
- // No implementation required
- }
-
-
-// -----------------------------------------------------------------------------
-// CDefaultAppView::Draw()
-// Draws the display.
-// -----------------------------------------------------------------------------
-//
-void CDefaultAppView::Draw( const TRect& /*aRect*/ ) const
- {
- // Get the standard graphics context
- CWindowGc& gc = SystemGc();
-
- // Gets the control's extent
- TRect drawRect( Rect());
-
-
- }
-
-// -----------------------------------------------------------------------------
-// CDefaultAppView::SizeChanged()
-// Called by framework when the view size is changed.
-// -----------------------------------------------------------------------------
-//
-void CDefaultAppView::SizeChanged()
- {
- DrawNow();
- }
--- a/defaultapplicationsettings/service/BWINS/defaultappclientU.DEF Thu Dec 17 08:46:07 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,8 +0,0 @@
-EXPORTS
- ??1CDefaultAppClient@@UAE@XZ @ 1 NONAME ; CDefaultAppClient::~CDefaultAppClient(void)
- ?ChangeDefaultsL@CDefaultAppClient@@QAEXH@Z @ 2 NONAME ; void CDefaultAppClient::ChangeDefaultsL(int)
- ?NewL@CDefaultAppClient@@SAPAV1@PAVMAknServerAppExitObserver@@@Z @ 3 NONAME ; class CDefaultAppClient * CDefaultAppClient::NewL(class MAknServerAppExitObserver *)
- ?NewLC@CDefaultAppClient@@SAPAV1@PAVMAknServerAppExitObserver@@@Z @ 4 NONAME ; class CDefaultAppClient * CDefaultAppClient::NewLC(class MAknServerAppExitObserver *)
- ?PairsToDisplayL@CDefaultAppClient@@QAEHXZ @ 5 NONAME ; int CDefaultAppClient::PairsToDisplayL(void)
- ?ServiceAvailable@CDefaultAppClient@@SAHAAH@Z @ 6 NONAME ; int CDefaultAppClient::ServiceAvailable(int &)
-
--- a/defaultapplicationsettings/service/EABI/defaultappclientU.DEF Thu Dec 17 08:46:07 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,14 +0,0 @@
-EXPORTS
- _ZN17CDefaultAppClient15ChangeDefaultsLEi @ 1 NONAME
- _ZN17CDefaultAppClient15PairsToDisplayLEv @ 2 NONAME
- _ZN17CDefaultAppClient16ServiceAvailableERi @ 3 NONAME
- _ZN17CDefaultAppClient4NewLEP25MAknServerAppExitObserver @ 4 NONAME
- _ZN17CDefaultAppClient5NewLCEP25MAknServerAppExitObserver @ 5 NONAME
- _ZN17CDefaultAppClientD0Ev @ 6 NONAME
- _ZN17CDefaultAppClientD1Ev @ 7 NONAME
- _ZN17CDefaultAppClientD2Ev @ 8 NONAME
- _ZTI17CDefaultAppClient @ 9 NONAME ; #<TI>#
- _ZTI18RDefaultAppService @ 10 NONAME ; #<TI>#
- _ZTV17CDefaultAppClient @ 11 NONAME ; #<VT>#
- _ZTV18RDefaultAppService @ 12 NONAME ; #<VT>#
-
--- a/defaultapplicationsettings/service/group/bld.inf Thu Dec 17 08:46:07 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,30 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Build information file for project DefaultAppServer - Service
-*
-*/
-
-
-
-PRJ_PLATFORMS
-DEFAULT
-
-PRJ_EXPORTS
-
-PRJ_MMPFILES
-das_service.mmp
-
-PRJ_TESTMMPFILES
-
-PRJ_TESTEXPORTS
--- a/defaultapplicationsettings/service/group/das_service.mmp Thu Dec 17 08:46:07 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,54 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Project definition file for project DefaultAppServer - Service
-*
-*/
-
-
-
-#include <data_caging_paths.hrh>
-#include <platform_paths.hrh>
-
-TARGET defaultappclient.dll
-TARGETTYPE DLL
-UID 0x1000008d 0x10281B9E
-
-CAPABILITY CAP_GENERAL_DLL DRM
-VENDORID VID_DEFAULT
-
-// Define directories for the .def-files of WINSCW build.
-// IMPORTANT NOTICE: The lines in the example that end with a backslash
-// must have one space after the backslash.
-#if defined(ARMCC)
-deffile ../EABI/
-#elif defined( WINSCW )
-deffile ../BWINS/
-#endif
-
-SOURCEPATH ../src
-SOURCE das_service.cpp
-SOURCE das_client.cpp
-
-USERINCLUDE ../inc
-
-// Default system include paths for middleware layer modules.
-APP_LAYER_SYSTEMINCLUDE
-
-LIBRARY euser.lib
-LIBRARY apgrfx.lib
-LIBRARY avkon.lib
-LIBRARY eikcore.lib
-LIBRARY apparc.lib
-
-//EXPORTUNFROZEN
--- a/defaultapplicationsettings/service/inc/das_service.h Thu Dec 17 08:46:07 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,68 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: This class defines the service used to change the default app.
-*
-*/
-
-
-
-#ifndef R_DEFAULTAPPSERVICE_H
-#define R_DEFAULTAPPSERVICE_H
-
-#include <AknServerApp.h>
-
-/**
- * Definition for the default app service
- *
- * This class defines the client side of the default app service.
- *
- * @lib defaultappclient.dll
- * @since S60 v5.0
- */
-class RDefaultAppService : public RAknAppServiceBase
- {
-
-private:
-
- /** messages used */
- enum TIpcMessageIds
- {
- ESetDefaultAll = RApaAppServiceBase::KServiceCmdBase
- };
-public:
-
- /**
- * Sends SetDefault message to the server
- *
- * @since S60 v5.0
- * @param aFlags service class (value is transparent for this class/function)
- * @return 0 for success, negative value on failure
- */
- TInt SetDefault( TInt aFlags );
-
-private: // From RApaAppServiceBase
-
- /**
- * From RApaAppServiceBase.
- * Returns the uid of the service
- *
- * @since S60 v5.0
- * @return the Uid of the provided service (Default App Service)
- */
- TUid ServiceUid() const;
- };
-
-
-#endif // R_DEFAULTAPPSERVICE_H
-
--- a/defaultapplicationsettings/service/src/das_client.cpp Thu Dec 17 08:46:07 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,241 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: This class implemets the Default App Client API
-*
-*/
-
-
-#include <e32std.h>
-#include <apgcli.h>
-
-
-#include <das_client.h>
-#include "das_service.h"
-
-#ifndef SYMBIAN_ENABLE_SPLIT_HEADERS
-#include <apaid.h>
-#else
-#include <apaid.h>
-#include <apaidpartner.h> // new file introduced by xSymbian
-#endif
-
-const TUid KDefaultAppServiceUid = { 0x10281B9D };
-
-
-
-// ======== MEMBER FUNCTIONS ========
-
-// ---------------------------------------------------------------------------
-// CDefaultAppClient::NewL()
-//
-//
-// ---------------------------------------------------------------------------
-//
-EXPORT_C CDefaultAppClient* CDefaultAppClient::NewL( MAknServerAppExitObserver* aObserver )
- {
- CDefaultAppClient* self = CDefaultAppClient::NewLC( aObserver );
- CleanupStack::Pop( self );
- return self;
- }
-
-// ---------------------------------------------------------------------------
-// CDefaultAppClient::NewLC()
-//
-//
-// ---------------------------------------------------------------------------
-//
-EXPORT_C CDefaultAppClient* CDefaultAppClient::NewLC( MAknServerAppExitObserver* aObserver )
- {
- CDefaultAppClient* self = new ( ELeave ) CDefaultAppClient;
- CleanupStack::PushL( self );
- self->ConstructL( aObserver );
- return self;
- }
-
-// ---------------------------------------------------------------------------
-// CDefaultAppClient::CDefaultAppClient()
-// Default constructor
-//
-// ---------------------------------------------------------------------------
-//
-CDefaultAppClient::CDefaultAppClient()
- {
- iServerAppUid.iUid = 0;
- }
-
-// ---------------------------------------------------------------------------
-// CDefaultAppClient::ConstructL()
-//
-//
-// ---------------------------------------------------------------------------
-//
-void CDefaultAppClient::ConstructL( MAknServerAppExitObserver* aObserver )
- {
- iObserver=aObserver;
- iService = new (ELeave) RDefaultAppService;
- }
-
-// ---------------------------------------------------------------------------
-// CDefaultAppClient::~CDefaultAppClient
-//
-//
-// ---------------------------------------------------------------------------
-//
-EXPORT_C CDefaultAppClient::~CDefaultAppClient()
- {
- if(iMonitor)
- {
- iMonitor->Cancel();
- delete iMonitor;
- };
- if(iService)
- {
- iService->Close();
- delete iService;
- };
-
-
-
- // iObserver is not owned
- }
-
-
-// ---------------------------------------------------------------------------
-// Function to check if a server is present in the system. If the
-// server is present, the subsequent functions should not fail due
-// to server unavailability.
-// ---------------------------------------------------------------------------
-//
-EXPORT_C TBool CDefaultAppClient::ServiceAvailable(TInt& aErrorCode)
- {
- TRAP(aErrorCode,GetServiceParamsL(NULL));
- if(aErrorCode != KErrNone) return EFalse;
- return ETrue;
- }
-
-// ---------------------------------------------------------------------------
-// Function to check the number of Service & MIME pairs the server would display if the
-// ChangeDefaultsL() would be called. The purpose of this function
-// is to allow the client application not to display an entry for starting the server, in the
-// Options menu, in case the Server's list of Service & MIME pairs is empty.
-//
-// Please note that the function may return a higher number than the actual number
-// of pairs, because it does not check for MIMEs with System priority (that would not be
-// displayed).
-// ---------------------------------------------------------------------------
-//
-EXPORT_C TInt CDefaultAppClient::PairsToDisplayL()
- {
- RApaLsSession ls;
- TInt i,j;
- TInt pairs=0;
-
- //Get own UID
- TUid clientAppUid = User::Identity();
-
- //connect
- User::LeaveIfError(ls.Connect());
-
- //we are connected, so some initialization
- CleanupClosePushL( ls );
- User::LeaveIfError(ls.GetAllApps());
-
- //get all services & MIMEs supported by our application
- CApaAppServiceInfoArray* servicesAndDataTypes=ls.GetAppServicesLC(clientAppUid);
-
- for(i=0; i<servicesAndDataTypes->Array().Count(); i++ )
- {
- const TApaAppServiceInfo currentServiceInfo = servicesAndDataTypes->Array()[i];
- for ( j = 0 ; j < currentServiceInfo.DataTypes().Count() ; j++ )
- {
- //check if there are more than one applications supporting this Service & MIME pair
- CApaAppServiceInfoArray* apps=ls.GetServiceImplementationsLC(currentServiceInfo.Uid(),currentServiceInfo.DataTypes()[j].iDataType);
-
- if(apps->Array().Count()>1)
- {
- //more that one app handles this Service & MIME
- pairs++;
- };
-
- CleanupStack::PopAndDestroy(apps);
- };
- };
-
- //clean
- CleanupStack::PopAndDestroy(servicesAndDataTypes);
- CleanupStack::PopAndDestroy(); // closes RApaLsSession
-
- return pairs;
- }
-
-// ---------------------------------------------------------------------------
-// This function launches the server, as a chained application. The client application will not be
-// available to the user until the server does not exit.
-// When the server exits, the client application gains control again. The observer (if specified
-// during instantiation (NewL) is notified that the server has exited.
-// ---------------------------------------------------------------------------
-//
-EXPORT_C void CDefaultAppClient::ChangeDefaultsL( TInt aFlags )
- {
- if(iServerAppUid.iUid == 0)
- GetServiceParamsL( &iServerAppUid );
-
- iService->ConnectChainedAppL(iServerAppUid);
-
- if(iObserver)
- iMonitor = CApaServerAppExitMonitor::NewL(*iService, *iObserver, CActive::EPriorityStandard);
- else
- aFlags|=EFlagNoObserver;
-
- iService->SetDefault(aFlags);
- }
-
-
-
-// ---------------------------------------------------------------------------
-// This function finds out the uid of the Default Application Server
-// (the application registered to handle the DefaultApp service)
-// ---------------------------------------------------------------------------
-//
-void CDefaultAppClient::GetServiceParamsL( TUid *aServerAppUid)
- {
- CApaAppServiceInfoArray* services = NULL;
- RApaLsSession ls;
- TInt count = 0; //number of services found so far.
-
- User::LeaveIfError(ls.Connect());
- CleanupClosePushL( ls );
-
- User::LeaveIfError(ls.GetServerApps( KDefaultAppServiceUid ));
-
- services = ls.GetServiceImplementationsLC( KDefaultAppServiceUid );
-
- if( services )
- {
- count = services->Array().Count();
- // get the server's Uid
- if( aServerAppUid )
- aServerAppUid->iUid = services->Array()[0].Uid().iUid;
- };
- CleanupStack::PopAndDestroy( 2 ); // destroys services + closes RApaLsSession
-
- if ( count == 0) User::Leave(KErrNotFound);
- if ( count > 1) User::Leave(KErrNotSupported);
-
- // if we are here, it means that we have a single server handling the defaults
- }
-
-
-
-
--- a/defaultapplicationsettings/service/src/das_service.cpp Thu Dec 17 08:46:07 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,44 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: This class defines the service used to change the default app.
-*
-*/
-
-
-#include "das_service.h"
-
-
-// ======== MEMBER FUNCTIONS ========
-
-
-const TUid KDefaultAppServiceUid = { 0x10281B9D };
-
-// ---------------------------------------------------------------------------
-// Sends SetDefault message to the server
-// ---------------------------------------------------------------------------
-//
-TInt RDefaultAppService::SetDefault( TInt aFlags )
- {
- return SendReceive( ESetDefaultAll, TIpcArgs( aFlags ) );
- }
-
-// ---------------------------------------------------------------------------
-// From class RApaAppServiceBase.
-// Returns the uid of the service
-// ---------------------------------------------------------------------------
-//
-TUid RDefaultAppService::ServiceUid() const
- {
- return KDefaultAppServiceUid;
- }
--- a/defaultapplicationsettings/services_db/BWINS/servicesdbU.DEF Thu Dec 17 08:46:07 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,11 +0,0 @@
-EXPORTS
- ??1CServicesDB@@UAE@XZ @ 1 NONAME ; CServicesDB::~CServicesDB(void)
- ?Count@CServicesDB@@QBEHXZ @ 2 NONAME ; int CServicesDB::Count(void) const
- ?NewL@CServicesDB@@SAPAV1@PAVTResourceReader@@@Z @ 3 NONAME ; class CServicesDB * CServicesDB::NewL(class TResourceReader *)
- ?NewLC@CServicesDB@@SAPAV1@PAVTResourceReader@@@Z @ 4 NONAME ; class CServicesDB * CServicesDB::NewLC(class TResourceReader *)
- ?ServiceNameLC@CServicesDB@@QBEPAVHBufC16@@H@Z @ 5 NONAME ; class HBufC16 * CServicesDB::ServiceNameLC(int) const
- ?ServiceNameLC@CServicesDB@@QBEPAVHBufC16@@VTUid@@@Z @ 6 NONAME ; class HBufC16 * CServicesDB::ServiceNameLC(class TUid) const
- ?ServiceStringLC@CServicesDB@@QBEPAVHBufC16@@HABVTDes16@@@Z @ 7 NONAME ; class HBufC16 * CServicesDB::ServiceStringLC(int, class TDes16 const &) const
- ?ServiceStringLC@CServicesDB@@QBEPAVHBufC16@@VTUid@@ABVTDes16@@@Z @ 8 NONAME ; class HBufC16 * CServicesDB::ServiceStringLC(class TUid, class TDes16 const &) const
- ?ServiceUidL@CServicesDB@@QBE?AVTUid@@H@Z @ 9 NONAME ; class TUid CServicesDB::ServiceUidL(int) const
-
--- a/defaultapplicationsettings/services_db/Eabi/servicesdbU.DEF Thu Dec 17 08:46:07 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,15 +0,0 @@
-EXPORTS
- _ZN11CServicesDB4NewLEP15TResourceReader @ 1 NONAME
- _ZN11CServicesDB5NewLCEP15TResourceReader @ 2 NONAME
- _ZN11CServicesDBD0Ev @ 3 NONAME
- _ZN11CServicesDBD1Ev @ 4 NONAME
- _ZN11CServicesDBD2Ev @ 5 NONAME
- _ZNK11CServicesDB11ServiceUidLEi @ 6 NONAME
- _ZNK11CServicesDB13ServiceNameLCE4TUid @ 7 NONAME
- _ZNK11CServicesDB13ServiceNameLCEi @ 8 NONAME
- _ZNK11CServicesDB15ServiceStringLCE4TUidRK6TDes16 @ 9 NONAME
- _ZNK11CServicesDB15ServiceStringLCEiRK6TDes16 @ 10 NONAME
- _ZNK11CServicesDB5CountEv @ 11 NONAME
- _ZTI11CServicesDB @ 12 NONAME DATA 12 ; #<TI>#
- _ZTV11CServicesDB @ 13 NONAME DATA 20 ; #<VT>#
-
--- a/defaultapplicationsettings/services_db/group/bld.inf Thu Dec 17 08:46:07 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,32 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Build information file for project Service DB
-*
-*/
-
-
-
-PRJ_PLATFORMS
-DEFAULT
-
-PRJ_EXPORTS
-
-
-PRJ_MMPFILES
-services_db.mmp
-
-PRJ_TESTMMPFILES
-
-
-PRJ_TESTEXPORTS
--- a/defaultapplicationsettings/services_db/group/services_db.mmp Thu Dec 17 08:46:07 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,52 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Project definition file for Services DB
-*
-*/
-
-
-
-#include <data_caging_paths.hrh>
-#include <platform_paths.hrh>
-
-TARGET servicesdb.dll
-TARGETTYPE DLL
-UID 0x1000008d 0x10281B9F
-
-CAPABILITY CAP_GENERAL_DLL DRM
-VENDORID VID_DEFAULT
-
-// Define directories for the .def-files of WINSCW build.
-// IMPORTANT NOTICE: The lines in the example that end with a backslash
-// must have one space after the backslash.
-#if defined(ARMCC)
-deffile ../Eabi/
-#elif defined( WINSCW )
-deffile ../BWINS/
-#endif
-
-
-SOURCEPATH ../src
-SOURCE services_db.cpp
-
-USERINCLUDE ../inc
-
-// Default system include paths for middleware layer modules.
-APP_LAYER_SYSTEMINCLUDE
-
-LIBRARY euser.lib
-LIBRARY commonengine.lib
-LIBRARY bafl.lib //TResourceReader
-
-//EXPORTUNFROZEN
--- a/defaultapplicationsettings/services_db/src/services_db.cpp Thu Dec 17 08:46:07 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,230 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Implements the Services DB API
-*
-*/
-
-
-#include <e32std.h>
-#include <bautils.h>
-#include <StringLoader.h>
-
-#include <services_db.h>
-
-// ======== MEMBER FUNCTIONS ========
-
-// ---------------------------------------------------------------------------
-// CServicesDB::NewLC()
-//
-//
-// ---------------------------------------------------------------------------
-//
-EXPORT_C CServicesDB* CServicesDB::NewLC( TResourceReader* aResReader )
- {
- CServicesDB* self = new (ELeave) CServicesDB();
- CleanupStack::PushL(self);
- self->ConstructL(aResReader);
- return self;
- }
-
-// ---------------------------------------------------------------------------
-// CServicesDB::NewL()
-//
-//
-// ---------------------------------------------------------------------------
-//
-EXPORT_C CServicesDB* CServicesDB::NewL( TResourceReader* aResReader )
- {
- CServicesDB* self = CServicesDB::NewLC(aResReader);
- CleanupStack::Pop(self);
- return self;
- }
-
-// ---------------------------------------------------------------------------
-// CServicesDB::CServicesDB()
-//
-//
-// ---------------------------------------------------------------------------
-//
-CServicesDB::CServicesDB()
- {
- //no implementation necessary
- }
-
-// ---------------------------------------------------------------------------
-// CServicesDB::~CServicesDB()
-//
-//
-// ---------------------------------------------------------------------------
-//
-EXPORT_C CServicesDB::~CServicesDB()
- {
- iServiceUids.Close();
- iServiceNames.ResetAndDestroy();
- iServiceLoc.ResetAndDestroy();
- }
-
-// ---------------------------------------------------------------------------
-// The class is constructed by reading the data from the specified resource id into memory
-// ---------------------------------------------------------------------------
-//
-void CServicesDB::ConstructL( TResourceReader* aResReader )
- {
- TInt i;
- TInt count = aResReader->ReadInt16();
- for ( i = 0; i < count; i++ )
- {
- //read the service uid
- TInt uid=aResReader->ReadInt32();
- if(uid == 0)User::Leave(KErrArgument);
- //read the service name
- HBufC* service=aResReader->ReadHBufCL();
- if(!service)User::Leave(KErrArgument);
- //read the localized string
- HBufC* serviceLoc=aResReader->ReadHBufCL();
- if(!serviceLoc)User::Leave(KErrArgument);
-
- //append things
- iServiceUids.Append(uid);
- iServiceNames.Append(service);//takes ownership
- iServiceLoc.Append(serviceLoc);//takes ownership
- }
- //done
- }
-
-// ---------------------------------------------------------------------------
-// Returns the number of available services
-// (the number of services read from the resource during construction)
-// ---------------------------------------------------------------------------
-//
-EXPORT_C TInt CServicesDB::Count() const
- {
- return iServiceUids.Count();
- }
-
-// ---------------------------------------------------------------------------
-// Function to return the Uid of a service (by index).
-// ---------------------------------------------------------------------------
-//
-EXPORT_C TUid CServicesDB::ServiceUidL(TInt aIndex) const
- {
- if(aIndex<0 || aIndex>=iServiceUids.Count())
- User::Leave(KErrArgument);
- return TUid::Uid(iServiceUids[aIndex]);
- }
-
-
-// ---------------------------------------------------------------------------
-// Function to return the localized name associated with a service. If the returned
-// strings accepts a parameter, this can be specified as aParam
-// ---------------------------------------------------------------------------
-//
-EXPORT_C HBufC* CServicesDB::ServiceStringLC(TInt aIndex, const TDes& aParam) const
- {
- TInt size=aParam.Size();
- HBufC *string=NULL;
-
- //check parameters
- if(aIndex<0 || aIndex>=iServiceUids.Count())
- User::Leave(KErrArgument);
-
- //get the size of the new string
- size+=iServiceLoc[aIndex]->Size();
- //allocate the string
- string = HBufC::NewLC(size);
- //create string content
- TPtr ptr=string->Des();
- if(aParam.Size())
- {
- //we have something in aParam
- //ptr.Format(*iServiceLoc[aIndex],&aParam);
- StringLoader::Format(ptr,*iServiceLoc[aIndex],-1,aParam);
- }
- else
- {
- //nothing in aParam, just copy the localized string to string
- ptr.Copy(*iServiceLoc[aIndex]);
- }
- //done, return
- return string; //string is on the stack, too
- }
-
-// ---------------------------------------------------------------------------
-// Function to return the localized name associated with a service. If the returned
-// strings accepts a parameter, this can be specified as aParam
-// ---------------------------------------------------------------------------
-//
-EXPORT_C HBufC* CServicesDB::ServiceStringLC(TUid aServiceUid, const TDes& aParam) const
- {
- HBufC* string=NULL;
- TInt i;
-
- //look for the service UIDs
- for(i=0; i<iServiceUids.Count(); i++)
- {
- if(iServiceUids[i] == aServiceUid.iUid)
- {
- string = ServiceStringLC(i,aParam);
- break;//service found
- }
- }
- if(!string)CleanupStack::PushL(string);//otherwise, string is already on the stack!
- return string;
- }
-
-// ---------------------------------------------------------------------------
-// Function to return the generic name of a service.
-// ---------------------------------------------------------------------------
-//
-EXPORT_C HBufC* CServicesDB::ServiceNameLC(TInt aIndex) const
- {
- HBufC* string=NULL;
- TInt size=0;
-
- //check parameters
- if(aIndex<0 || aIndex>=iServiceUids.Count())
- User::Leave(KErrArgument);
-
- //get the size of the new string
- size=iServiceNames[aIndex]->Size();
- //allocate the string
- string = HBufC::NewLC(size);
- //create string content
- TPtr ptr=string->Des();
- ptr.Copy(*iServiceNames[aIndex]);
- return string;
- }
-
-// ---------------------------------------------------------------------------
-// Function to return the generic name of a service.
-// ---------------------------------------------------------------------------
-//
-EXPORT_C HBufC* CServicesDB::ServiceNameLC(TUid aServiceUid) const
- {
- HBufC* string=NULL;
- TInt i;
-
- //loc for the service UIDs
- for(i=0; i<iServiceUids.Count(); i++)
- {
- if(iServiceUids[i] == aServiceUid.iUid)
- {
- string = ServiceNameLC(i);
- break;//service found
- }
- }
- if(!string)CleanupStack::PushL(string);//otherwise, string is already on the stack!
- return string;
- }
-
--- a/devmngt_plat/default_app_client_api/default_app_client_api.metaxml Thu Dec 17 08:46:07 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,18 +0,0 @@
-<?xml version="1.0" ?>
-<api id="a5a5f7d02cd304f45dac9894b0154901" dataversion="2.0">
- <name>Default App Client API</name>
- <description>API for launching the Default App Server and allow the user to change the default app for Services & MIMEs</description>
- <type>c++</type>
- <collection>DefaultApplicationSettings</collection>
- <libs>
- <lib name="defaultappclient.lib" />
- </libs>
- <release category="platform"/>
- <attributes>
- <!-- This indicates wether the api provedes separate html documentation -->
- <!-- or is the additional documentation generated from headers. -->
- <!-- If you are unsuere then the value is "no" -->
- <htmldocprovided>no</htmldocprovided>
- <adaptation>no</adaptation>
- </attributes>
-</api>
--- a/devmngt_plat/default_app_client_api/group/bld.inf Thu Dec 17 08:46:07 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,27 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: File that exports the files belonging to
-: Default App Client API
-*
-*/
-
-
-#include <platform_paths.hrh>
-
-PRJ_PLATFORMS
-DEFAULT
-
-PRJ_EXPORTS
-
-../inc/das_client.h APP_LAYER_PLATFORM_EXPORT_PATH(das_client.h)
--- a/devmngt_plat/default_app_client_api/inc/das_client.h Thu Dec 17 08:46:07 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,168 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Client interface to ask for setting the default application
-*
-*/
-
-
-
-#ifndef C_DEFAULTAPPCLIENT_H
-#define C_DEFAULTAPPCLIENT_H
-
-#include <e32def.h>
-#include <e32base.h>
-#include <aknserverapp.h>
-
-class RDefaultAppService;
-
-
-/**
- * Client API for setting the default application.
- *
- * This class defines the API that applications should use to trigger the launch of the
- * Default Application Server, that asks the user to select default applications for those
- * Service & MIME pairs for which the client application is a candidate.
- *
- * A client application should first instantiate the service, using eithe NewL() or NewLC()
- * The client application can check first if the sercive is available in the system (by using
- * the ServiceAvailable() function. The client application may also check if there is
- * anything to display (if there is any Service & MIME that the client application supports for
- * which there is at least another application supporting the pair). If there is no such pair,
- * then launching the server would display an empty list). This checking is performed using the
- * PairsToDisplayL() function.
- *
- * After the above checkings are done, the client application can ask the server to change
- * defaults by calling the ChangeDefaultsL() function.
- *
- *
- * @lib defaultappclient.dll
- * @since S60 v5.0
- */
-class CDefaultAppClient : public CBase
- {
-
-public:
-
- /** flags used to modify the service behaviour */
- enum TFlags
- {
- EFlagNoObserver=1,
- EFlagReserved1=2,
- EFlagReserved2=4
- };
-
- /**
- * Symbian OS two-phased constructor
- * @return
- */
- IMPORT_C static CDefaultAppClient* NewL(MAknServerAppExitObserver* aObserver);
-
- /**
- * Symbian OS two-phased constructor
- * @return
- */
- IMPORT_C static CDefaultAppClient* NewLC(MAknServerAppExitObserver* aObserver);
-
- /**
- * Destructor.
- */
- IMPORT_C virtual ~CDefaultAppClient();
-
- /**
- * Function to check if a server is present in the system. If the
- * server is present, the subsequent functions should not fail due
- * to server unavailability.
- *
- * @since S60 v5.0
- * @return ETrue or EFalse, depending service/server availability
- */
- IMPORT_C static TBool ServiceAvailable( TInt& aErrorCode );
-
- /**
- * Function to check the number of Service & MIME pairs the server would display if the
- * ChangeDefaultsL() would be called. The purpose of this function
- * is to allow the client application not to display an entry for starting the server, in the
- * Options menu, in case the Server's list of Service & MIME pairs is empty.
- *
- * Please note that the function may return a higher number than the actual number
- * of pairs, because it does not check for MIMEs with System priority (that would not be
- * displayed).
- *
- * @since S60 v5.0
- * @return the number of Service & MIME pairs the server would display
- */
- IMPORT_C TInt PairsToDisplayL();
-
- /**
- * This function launches the server, as a chained application. The client application will not be
- * available to the user until the server does not exit.
- * When the server exits, the client application gains control again. The observer (if specified
- * during instantiation (NewL) is notified that the server has exited.
- *
- * @since S60 v5.0
- * @param aFlags service flags
- */
- IMPORT_C void ChangeDefaultsL( TInt aFlags = 0 );
-
-
-private:
-
- /**
- * C++ default constructor.
- */
- CDefaultAppClient();
-
- /**
- * Symbian constructor.
- */
- void ConstructL( MAknServerAppExitObserver* aObserver );
-
- /**
- * This function finds out the uid of the Default Application Server
- * (the application registered to handle the DefaultApp service)
- *
- * @since S60 v5.0
- * @param aServerAppUid If parameter is non-NULL, it returns the Uid of the server there
- */
- static void GetServiceParamsL( TUid* aServerAppUid);
-
-private: // data
-
- /**
- * The UID of the server application (we discover the server)
- */
- TUid iServerAppUid;
-
- /**
- * Pointer to the service class.
- * Own.
- */
- RDefaultAppService *iService;
-
- /**
- * Pointer to the Observer to call after the operation initiated by
- * ChangeDefaultsAsyncL() has finished.
- * Not Owned.
- */
- MAknServerAppExitObserver* iObserver;
-
- /**
- * Monitor object that calls the iObserver when the server has exited.
- * Owned.
- */
- CApaServerAppExitMonitor* iMonitor;
-
- };
-
-#endif // C_DEFAULTAPPCLIENT_H
--- a/devmngt_plat/default_app_client_api/tsrc/DasClientApiTest/bwins/DasClientApiTestU.DEF Thu Dec 17 08:46:07 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-EXPORTS
- ?LibEntryL@@YAPAVCScriptBase@@AAVCTestModuleIf@@@Z @ 1 NONAME ; class CScriptBase * __cdecl LibEntryL(class CTestModuleIf &)
-
--- a/devmngt_plat/default_app_client_api/tsrc/DasClientApiTest/eabi/DasClientApiTestU.def Thu Dec 17 08:46:07 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-EXPORTS
- _Z9LibEntryLR13CTestModuleIf @ 1 NONAME
-
--- a/devmngt_plat/default_app_client_api/tsrc/DasClientApiTest/group/DasClientApiTest.bat Thu Dec 17 08:46:07 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,22 +0,0 @@
-@rem
-@rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-@rem All rights reserved.
-@rem This component and the accompanying materials are made available
-@rem under the terms of "Eclipse Public License v1.0"
-@rem which accompanies this distribution, and is available
-@rem at the URL "http://www.eclipse.org/legal/epl-v10.html".
-@rem
-@rem Initial Contributors:
-@rem Nokia Corporation - initial contribution.
-@rem
-@rem Contributors:
-@rem
-@rem Description:
-@rem
-
-copy C:\TestFramework\testframework_DasClientApiTest.ini C:\TestFramework\TestFramework.ini
-md e:\bctest
-md e:\bctest\Results
-
-ATSINTERFACE.EXE -testmodule testcombiner -config C:\TestFramework\uiDasClientApiTest.cfg
-copy c:\Logs\TestFramework\TestReport.txt e:\bctest\results\DAS_TEST.txt
\ No newline at end of file
--- a/devmngt_plat/default_app_client_api/tsrc/DasClientApiTest/group/DasClientApiTest.iby Thu Dec 17 08:46:07 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,41 +0,0 @@
-/*
-* Copyright (c) 2002-2005 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: Personalisation application localised resource IBY
-*
-*/
-
-
-/*
------------------------------------------------------------------------------
-
- DESCRIPTION
-
- stiftestframework_DasClientApiTest.iby file specifies needed test components for
- ROM image
-
------------------------------------------------------------------------------
-*/
-
-#ifndef DasClientApiTest__IBY
-#define DasClientApiTest__IBY
-
-file=ABI_DIR\BUILD_DIR\DasClientApiTest.DLL SHARED_LIB_DIR\DasClientApiTest.DLL
-
-data=\epoc32\data\z\system\data\testframework_DasClientApiTest.ini testframework\testframework_DasClientApiTest.ini
-
-data=\epoc32\data\z\system\data\tcDasClientApiTest.cfg testframework\tcDasClientApiTest.cfg
-
-data=\epoc32\data\z\system\data\ui_DasClientApiTest.cfg testframework\ui_DasClientApiTest.cfg
-
-#endif // DasClientApiTest__IBY
\ No newline at end of file
--- a/devmngt_plat/default_app_client_api/tsrc/DasClientApiTest/group/DasClientApiTest.mmp Thu Dec 17 08:46:07 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,61 +0,0 @@
-/*
-* Copyright (c) 2002 - 2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Project specification file of DasClientApiTest
-*
-*/
-
-
-#include <data_caging_paths.hrh>
-#include <platform_paths.hrh>
-
-TARGET DasClientApiTest.dll
-TARGETTYPE dll
-UID 0x1000008D 0x101FB3E3
-
-CAPABILITY ALL -TCB
-
-DEFFILE DasClientApiTest.def
-
-//START RESOURCE ../data/DasClientApiTest_reg.rss
-// TARGETPATH /private/10003a3f/apps
-//END
-
-#ifdef SBSV2
-USERINCLUDE ../inc
-
- MW_LAYER_SYSTEMINCLUDE
-
-#else // SBSV2 not defined
-USERINCLUDE ../inc
-APP_LAYER_SYSTEMINCLUDE
-
-
-SOURCEPATH ../src
-#endif // SBSV2
-
-SOURCE DasClientApiTest.cpp
-SOURCE DasClientApiTestblocks.cpp
-
-LIBRARY euser.lib
-LIBRARY stiftestinterface.lib
-LIBRARY stiftestengine.lib
-LIBRARY defaultappclient.lib//default application client
-LIBRARY avkon.lib//MAknServerAppExitObserver
-LIBRARY cone.lib
-LIBRARY eikcore.lib
-LIBRARY eiksrv.lib
-
-LANG SC
-
-// End of File
--- a/devmngt_plat/default_app_client_api/tsrc/DasClientApiTest/group/DasClientApiTest.pkg Thu Dec 17 08:46:07 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,67 +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: Installation file for STIF
-;
-;
-;
-;
-; Installation file for STIF
-;
-
-; Languages
-&EN
-
-; Provide value for uid
-#{"STIF"},(0x00000000),1,1,0,TYPE=SA
-
-; Series60 product id for S60 3.0
-[0x101F7961], 0, 0, 0, {"Series60ProductID"}
-
-; Localised Vendor name
-%{"Nokia"}
-
-; Unique Vendor name
-:"Nokia"
-
-; Logo
-; None
-
-; Package signature - Optional
-; None
-
-; Start of Package body
-
-; Condition blocks
-; None
-
-; Options list
-; None
-
-; Install files
-"\epoc32\release\armv5\urel\DasClientApiTest.dll" - "!:\Sys\Bin\DasClientApiTest.dll"
-
-"\Epoc32\winscw\c\testframework\testframework_DasClientApiTest.ini"-"!:\TestFramework\testframework_DasClientApiTest.ini"
-"\Epoc32\winscw\c\testframework\tcDasClientApiTest.cfg"-"!:\TestFramework\tcDasClientApiTest.cfg"
-"\Epoc32\winscw\c\testframework\ui_DasClientApiTest.cfg"-"!:\TestFramework\ui_DasClientApiTest.cfg"
-"\epoc32\winscw\c\DasClientApiTest.bat"-"!:\DASTest.bat"
-; Embedded SIS
-; None
-
-; End of Package body
-
-; PKG dependencies
-; None
-
-; PKG capabilities
-; None
--- a/devmngt_plat/default_app_client_api/tsrc/DasClientApiTest/group/bld.inf Thu Dec 17 08:46:07 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,68 +0,0 @@
-/*
-* Copyright (c) 2002 - 2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Build information file for project DasClientApiTest
-*
-*/
-
-
-
-PRJ_PLATFORMS
-// specify the platforms your component needs to be built for here
-// defaults to WINS MARM so you can ignore this if you just build these
-DEFAULT
-
-#ifdef SBSV2
- PRJ_TESTEXPORTS
- DasClientApiTest.iby /epoc32/rom/include/DasClientApiTest.iby
-
- ../init/testframework_DasClientApiTest.ini /epoc32/data/z/system/data/testframework.ini
-
- ../conf/ui_DasClientApiTest.cfg /epoc32/winscw/c/TestFramework/ui_DasClientApiTest.cfg
-
- ../conf/tcDasClientApiTest.cfg /epoc32/wins/c/TestFramework/tcDasClientApiTest.cfg
-
-#else // SBSV2 not defined
- PRJ_TESTEXPORTS
-
- ../init/testframework_DasClientApiTest.ini /epoc32/wins/c/TestFramework/testframework.ini
- ../init/testframework_DasClientApiTest.ini /epoc32/winscw/c/TestFramework/testframework.ini
-
- ../conf/ui_DasClientApiTest.cfg /epoc32/wins/c/TestFramework/ui_DasClientApiTest.cfg
- ../conf/ui_DasClientApiTest.cfg /epoc32/data/z/system/data/ui_DasClientApiTest.cfg
-
- ../conf/tcDasClientApiTest.cfg /epoc32/winscw/c/TestFramework/tcDasClientApiTest.cfg
- ../conf/tcDasClientApiTest.cfg /epoc32/data/z/system/data/tcDasClientApiTest.cfg
-
-#endif // SBSV2
-
-DasClientApiTest.iby /epoc32/rom/include/DasClientApiTest.iby
-../init/testframework_DasClientApiTest.ini /epoc32/data/z/system/data/testframework.ini
-../init/testframework_DasClientApiTest.ini /epoc32/winscw/c/testframework/testframework_DasClientApiTest.ini
-../conf/ui_DasClientApiTest.cfg /epoc32/winscw/c/TestFramework/ui_DasClientApiTest.cfg
-../conf/tcDasClientApiTest.cfg /epoc32/wins/c/TestFramework/tcDasClientApiTest.cfg
-
-PRJ_EXPORTS
-
-DasClientApiTest.bat /epoc32/winscw/c/DasClientApiTest.bat
-
-//testframework_DasClientApiTest.ini /epoc32/winscw/c/testframework/testframework_DasClientApiTest.ini
-//tcDasClientApiTest.cfg /epoc32/winscw/c/testframework/tcDasClientApiTest.cfg
-//ui_DasClientApiTest.cfg /epoc32/winscw/c/testframework/ui_DasClientApiTest.cfg
-
-PRJ_TESTMMPFILES
-DasClientApiTest.mmp
-
-PRJ_MMPFILES
-
-// End of File
--- a/devmngt_plat/default_app_client_api/tsrc/DasClientApiTest/inc/CClientLauncher.h Thu Dec 17 08:46:07 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,76 +0,0 @@
-/*
-* Copyright (c) 2002 - 2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: CCClientLauncher declaration.
-*
-*/
-
-#ifndef CCLIENTLAUNCHER_H
-#define CCLIENTLAUNCHER_H
-
-// INCLUDES
-#include <e32std.h>
-#include <e32base.h>
-#include <aknserverapp.h>
-#include <aknappui.h>
-
-// CLASS DECLARATION
-
-/**
- * CCClientLauncher
- *
- */
-class CCClientLauncher : public CAknAppUi,public MAknServerAppExitObserver
- {
-public:
- // Constructors and destructor
-
- /**
- * Destructor.
- */
- ~CCClientLauncher();
-
- /**
- * Two-phased constructor.
- */
- static CCClientLauncher* NewL();
-
- /**
- * Two-phased constructor.
- */
- static CCClientLauncher* NewLC();
-
-public:
- //function from CAknAppUi
- void ProcessCommandL (TInt aCommand);
-
-private:
- //function from MAknServerAppExitObserver
- //handle the exit of the server.
- void HandleServerAppExit(TInt aReason);
-
-private:
-
- /**
- * Constructor for performing 1st stage construction
- */
- CCClientLauncher();
-
- /**
- * EPOC default constructor for performing 2nd stage construction
- */
- void ConstructL();
-
- };
-
-#endif // CCLIENTLAUNCHER_H
--- a/devmngt_plat/default_app_client_api/tsrc/DasClientApiTest/inc/DasClientApiTest.h Thu Dec 17 08:46:07 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,170 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Implementation of class CDasClientApiTest
-*
-*/
-
-
-#ifndef C_DASCLIENTAPITEST_H
-#define C_DASCLIENTAPITEST_H
-
-// INCLUDES
-#include <StifLogger.h>
-#include <TestScripterInternal.h>
-#include <StifTestModule.h>
-#include <TestclassAssert.h>
-#include <aknserverapp.h>
-#include <das_client.h>
-//
-#include <CClientLauncher.h>
-// MACROS
-#define TEST_CLASS_VERSION_MAJOR 0
-#define TEST_CLASS_VERSION_MINOR 0
-#define TEST_CLASS_VERSION_BUILD 0
-// User MACROS
-#define KErrGeneral -2
-#define KFirstOption 1
-#define KSecondtOption 2
-
-//define client flags
-#define KFlagNoObserver 1
-#define KFlagReserved1 2
-#define KFlagReserved2 4
-// Logging path
-_LIT( KDasClientApiTestLogPath, "\\logs\\testframework\\DasClientApiTest\\" );
-// Log file
-_LIT( KDasClientApiTestLogFile, "DasClientApiTest.txt" );
-_LIT( KDasClientApiTestLogFileWithTitle, "DasClientApiTest_[%S].txt" );
-
-//
-/**
-* CDasClientApiTest test class for STIF Test Framework TestScripter.
-* @since S60 5.0
-*/
-
-NONSHARABLE_CLASS(CDasClientApiTest) : public CScriptBase/*,public MAknServerAppExitObserver*/
- {
-public: // Constructors and destructor
-
- /**
- * Two-phased constructor.
- */
- static CDasClientApiTest* NewL( CTestModuleIf& aTestModuleIf );
-
- /**
- * Destructor.
- */
- virtual ~CDasClientApiTest();
-
-/*private:
- //function from MAknServerAppExitObserver. is used to handle the exit of the server.
-
- void HandleServerAppExit(TInt aReason);*/
-
-public: // Functions from base classes
-
- /**
- * From CScriptBase Runs a script line.
- * @since S60 5.0
- * @param aItem Script line containing method name and parameters
- * @return Symbian OS error code
- */
- virtual TInt RunMethodL( CStifItemParser& aItem );
-
-private:
-
- /**
- * C++ default constructor.
- */
- CDasClientApiTest( CTestModuleIf& aTestModuleIf );
-
- /**
- * By default Symbian 2nd phase constructor is private.
- */
- void ConstructL();
-
- /**
- * Frees all resources allocated from test methods.
- * @since S60 5.0
- */
- void Delete();
-
- /**
- * Test method.
- * @since S60 5.0
- * @param aItem Script line containing parameters.
- * @return Symbian OS error code.
- */
- virtual TInt InitialClientL(const TInt aOption );
-
- virtual TInt CallClientNewLL( CStifItemParser& aItem );
-
- virtual TInt CallClientNewLCL( CStifItemParser& aItem );
-
- virtual TInt CallServiceAvailableL( CStifItemParser& aItem );
-
-// virtual TInt CallPairsToDisplayLL( CStifItemParser& aItem );
-
- virtual TInt CallChangeDefaultsLL( CStifItemParser& aItem );
- /**
- * Method used to log version of test class
- */
- void SendTestClassVersion();
-
- /**
- * Turn off ScreenSaver
- * @since S60 5.0
- * @return Symbian OS error code.
- */
- void TurnOffScreenSaver();
-
- /**
- * Restore ScreenSaver
- * @since S60 5.0
- * @return Symbian OS error code.
- */
- void RestoreScreenSaver();
-
-
- /**
- * In this method NewLC is called.
- * @since ?Series60_version
- * @param aResReader Resource reader to get information from Resource file
- * @return Symbian OS error code.
- */
- void CallNewlcL( MAknServerAppExitObserver* aObserver );
-
-
-private: // Data
-
- /**
- * ScreenSaver Property
- */
- TInt iOldScreenSaverProperty;
-
- /**
- * ?description_of_pointer_member
- * Not own.
- */
- //?type* ?member_name;
- CDefaultAppClient* iClient;
-
- //
- CCClientLauncher* iLauncher;
-
- };
-
-#endif // C_DASCLIENTAPITEST_H
-
-// End of File
--- a/devmngt_plat/default_app_client_api/tsrc/DasClientApiTest/src/DasClientApiTest.cpp Thu Dec 17 08:46:07 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,181 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Implementation of class CDasClientApiTest
-*
-*/
-
-
-// INCLUDE FILES
-#include <Stiftestinterface.h>
-#include <SettingServerClient.h>
-#include <ScreensaverInternalPSKeys.h>
-#include <e32property.h>
-
-#include "DasClientApiTest.h"
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// CDasClientApiTest::CDasClientApiTest
-// C++ default constructor can NOT contain any code, that
-// might leave.
-// -----------------------------------------------------------------------------
-//
-CDasClientApiTest::CDasClientApiTest( CTestModuleIf& aTestModuleIf ):
- CScriptBase( aTestModuleIf )
- {
- }
-
-// -----------------------------------------------------------------------------
-// CDasClientApiTest::ConstructL
-// Symbian 2nd phase constructor can leave.
-// -----------------------------------------------------------------------------
-//
-void CDasClientApiTest::ConstructL()
- {
- //Read logger settings to check whether test case name is to be
- //appended to log file name.
- RSettingServer settingServer;
- TInt ret = settingServer.Connect();
- if(ret != KErrNone)
- {
- User::Leave(ret);
- }
- // Struct to StifLogger settigs.
- TLoggerSettings loggerSettings;
- // Parse StifLogger defaults from STIF initialization file.
- ret = settingServer.GetLoggerSettings(loggerSettings);
- if(ret != KErrNone)
- {
- User::Leave(ret);
- }
- // Close Setting server session
- settingServer.Close();
-
- TFileName logFileName;
-
- if(loggerSettings.iAddTestCaseTitle)
- {
- TName title;
- TestModuleIf().GetTestCaseTitleL(title);
- logFileName.Format(KDasClientApiTestLogFileWithTitle, &title);
- }
- else
- {
- logFileName.Copy(KDasClientApiTestLogFile);
- }
-
- iLog = CStifLogger::NewL( KDasClientApiTestLogPath,
- logFileName,
- CStifLogger::ETxt,
- CStifLogger::EFile,
- EFalse );
-
- SendTestClassVersion();
-
- TurnOffScreenSaver();
- }
-
-// -----------------------------------------------------------------------------
-// CDasClientApiTest::NewL
-// Two-phased constructor.
-// -----------------------------------------------------------------------------
-//
-CDasClientApiTest* CDasClientApiTest::NewL( CTestModuleIf& aTestModuleIf )
- {
- CDasClientApiTest* self = new( ELeave ) CDasClientApiTest( aTestModuleIf );
-
- CleanupStack::PushL( self );
- self->ConstructL();
- CleanupStack::Pop();
-
- return self;
-
- }
-
-// Destructor
-CDasClientApiTest::~CDasClientApiTest()
- {
-
- // Delete resources allocated from test methods
- Delete();
-
- // Delete logger
- delete iLog;
-
- }
-
-//-----------------------------------------------------------------------------
-// CDasClientApiTest::SendTestClassVersion
-// Method used to send version of test class
-//-----------------------------------------------------------------------------
-//
-void CDasClientApiTest::SendTestClassVersion()
- {
- TVersion moduleVersion;
- moduleVersion.iMajor = TEST_CLASS_VERSION_MAJOR;
- moduleVersion.iMinor = TEST_CLASS_VERSION_MINOR;
- moduleVersion.iBuild = TEST_CLASS_VERSION_BUILD;
-
- TFileName moduleName;
- moduleName = _L( "DasClientApiTest.dll" );
-
- TBool newVersionOfMethod = ETrue;
- TestModuleIf().SendTestModuleVersion( moduleVersion, moduleName,
- newVersionOfMethod );
- }
-
-// ========================== OTHER EXPORTED FUNCTIONS =========================
-
-// -----------------------------------------------------------------------------
-// LibEntryL is a polymorphic Dll entry point.
-// Returns: CScriptBase: New CScriptBase derived object
-// -----------------------------------------------------------------------------
-//
-EXPORT_C CScriptBase* LibEntryL(
- CTestModuleIf& aTestModuleIf ) // Backpointer to STIF Test Framework
- {
- return ( CScriptBase* ) CDasClientApiTest::NewL( aTestModuleIf );
- }
-
-// -----------------------------------------------------------------------------
-// Turn off ScreenSaver
-// -----------------------------------------------------------------------------
-//
-void CDasClientApiTest::TurnOffScreenSaver()
- {
- //TInt Get(TUid aCategory, TUint aKey, TInt &aValue);
- TInt err1 = RProperty::Get( KPSUidScreenSaver, KScreenSaverAllowScreenSaver,
- iOldScreenSaverProperty );
- TInt err2 = RProperty::Set( KPSUidScreenSaver, KScreenSaverAllowScreenSaver,
- KScreenSaverAllowScreenSaver );
- RDebug::Printf( "screensaver property=%d err1=%d err2=%d\n",
- iOldScreenSaverProperty, err1, err2 );
- }
-
-// -----------------------------------------------------------------------------
-// Restore ScreenSaver
-// -----------------------------------------------------------------------------
-//
-void CDasClientApiTest::RestoreScreenSaver()
- {
- RProperty::Set( KPSUidScreenSaver, KScreenSaverAllowScreenSaver,
- iOldScreenSaverProperty );
- User::ResetInactivityTime();
- }
-
-
-// End of File
-
-
--- a/devmngt_plat/default_app_client_api/tsrc/DasClientApiTest/src/DasClientApiTestblocks.cpp Thu Dec 17 08:46:07 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,250 +0,0 @@
-/*
-/*
-* Copyright (c) 2002 - 2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: This cpp file has the functions to test Das Client API.
-*
-*/
-
-
-// [INCLUDE FILES]
-#include <e32svr.h>
-#include <StifParser.h>
-#include <Stiftestinterface.h>
-#include "DasClientApiTest.h"
-
-
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// CDasClientApiTest::Delete
-// Delete here all resources allocated and opened from test methods.
-// Called from destructor.
-// -----------------------------------------------------------------------------
-//
-void CDasClientApiTest::Delete()
- {
- if( iLauncher )
- {
- delete iLauncher;
- iLauncher = NULL;
- }
-
- if( iClient )
- {
- delete iClient;
- iClient = NULL;
- }
- }
-
-// -----------------------------------------------------------------------------
-// CDasClientApiTest::RunMethodL
-// Run specified method. Contains also table of test mothods and their names.
-// -----------------------------------------------------------------------------
-//
-TInt CDasClientApiTest::RunMethodL(
- CStifItemParser& aItem )
- {
-
- static TStifFunctionInfo const KFunctions[] =
- {
- // First string is the function name used in TestScripter script file.
- // Second is the actual implementation member function.
- ENTRY( "CallClientNewLL", CDasClientApiTest::CallClientNewLL ),
- ENTRY( "CallClientNewLCL", CDasClientApiTest::CallClientNewLCL ),
- ENTRY( "CallServiceAvailableL", CDasClientApiTest::CallServiceAvailableL ),
- ENTRY( "CallChangeDefaultsLL", CDasClientApiTest::CallChangeDefaultsLL ),
- // [test cases entries]
-
- };
-
- const TInt count = sizeof( KFunctions ) / sizeof( TStifFunctionInfo );
-
- return RunInternalL( KFunctions, count, aItem );
-
- }
-
-// -----------------------------------------------------------------------------
-// CDasClientApiTest::CallNewlcL
-// This function is used because we can not TRAP CServicesDB::NewLC
-// -----------------------------------------------------------------------------
-//
-void CDasClientApiTest::CallNewlcL( MAknServerAppExitObserver* aObserver )
-{
- iClient = CDefaultAppClient::NewLC( aObserver );
- CleanupStack::Pop( iClient );
-}
-
-// -----------------------------------------------------------------------------
-// CServicesDbApiTest::InitialClientL
-// This function is used to create CDefaultAppClient object. This function is used
-// to call CDefaultAppClient::NewL and CDefaultAppClient::NewLC functions.
-// -----------------------------------------------------------------------------
-//
-TInt CDasClientApiTest::InitialClientL( TInt aOption )
- {
- //launcher of the client;
- if( aOption == KFirstOption )
- {
- TRAPD( error, iClient = CDefaultAppClient::NewL( NULL ) );
- if( KErrNone != error )
- {
- iLog->Log( _L( "=>CDefaultAppClient::NewL leaves" ) );
- return error;
- }
- }
- else
- {
- TRAPD( error1, CallNewlcL( NULL ) );
- if( KErrNone != error1 )
- {
- iLog->Log( _L( "=>CDefaultAppClient::NewLC leaves" ) );
- return error1;
- }
- }
- return KErrNone;
- }
-
-// -----------------------------------------------------------------------------
-// CServicesDbApiTest::CallClientNewLL
-// Is used to test CDefaultAppClient::NewL
-// -----------------------------------------------------------------------------
-TInt CDasClientApiTest::CallClientNewLL( CStifItemParser& /*aItem*/ )
- {
- TInt result;
-
- TRAPD( error, result = InitialClientL( KFirstOption ) );
- if( KErrNone != error )
- {
- iLog->Log( _L( "CDefaultAppClient object not created with NewL." ) );
- return error;
- }
- else
- {
- if( KErrNone != result )
- {
- iLog->Log( _L( "CDefaultAppClient object not created with NewL." ) );
- return result;
- }
- else
- {
- iLog->Log( _L( "CDefaultAppClient object created with NewL." ) );
- }
- };
- return KErrNone;
- }
-
-// -----------------------------------------------------------------------------
-// CServicesDbApiTest::CallClientNewLCL
-// Is used to test CDefaultAppClient::NewLC
-// -----------------------------------------------------------------------------
-TInt CDasClientApiTest::CallClientNewLCL( CStifItemParser& /*aItem*/ )
- {
- TInt result;
- TRAPD( error, result = InitialClientL( KSecondtOption ) );
- if( KErrNone != error )
- {
- return error;
- }
- else
- {
- if( KErrNone != result )
- {
- return result;
- }
- }
- return KErrNone;
- }
-
-// -----------------------------------------------------------------------------
-// CServicesDbApiTest::CallServiceAvailableL
-// Is used to test CDefaultAppClient::ServiceAvailableL
-// -----------------------------------------------------------------------------
-TInt CDasClientApiTest::CallServiceAvailableL( CStifItemParser& /*aItem*/ )
- {
- //Initial the iClient
- TInt result;
- TRAPD( error, result = InitialClientL( KFirstOption ) );
- if( KErrNone != error )
- {
- return error;
- }
- else
- {
- if( KErrNone != result )
- {
- return result;
- }
- };
- //call the function
-
- TInt errcode;
- TBool returnvalue;
- TRAPD( callerror, returnvalue = CDefaultAppClient::ServiceAvailable( errcode ) );
- if( KErrNone != callerror )
- {
- iLog->Log(_L( "Call function ServiceAvailable failed.The function leaves,the leace code is %d"), callerror );
- return callerror;
- }
- else
- {
- if( returnvalue != KErrNone )
- {
- iLog->Log( _L( "The function returned sucessfully,But the service is not available. The error code is %d" ), errcode );
- return errcode;
- }
- else
- {
- iLog->Log( _L( "The function ServiceAvailable called success, and the service is available! " ) );
- }
- }
- return KErrNone;
- }
-
-// -----------------------------------------------------------------------------
-// CServicesDbApiTest::CallChangeDefaultsLL
-// Is used to test CDefaultAppClient::ChangeDefaultsL
-// -----------------------------------------------------------------------------
-TInt CDasClientApiTest::CallChangeDefaultsLL( CStifItemParser& /*aItem*/ )
- {
- //
- TInt result;
- TRAPD( error, result = InitialClientL( KFirstOption ) );
- if(KErrNone != error)
- {
- iLog->Log( _L( "Initial the iClient failed,the failed code is %d" ), error );
- return error;
- }
- else
- {
- if( KErrNone != result )
- {
- return result;
- }
- };
- TRAPD( errorCall, iClient->ChangeDefaultsL() );
- if( errorCall != KErrNone )
- {
- iLog->Log( _L( "Function ChangeDefaultsL is called failed. The failed code is %d" ), errorCall );
- return errorCall;
- }
- else
- {
- iLog->Log( _L( "The Function is called successfully." ) );
- }
- return KErrNone;
- }
-
-//
-// [End of File]
--- a/devmngt_plat/group/bld.inf Thu Dec 17 08:46:07 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,23 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Includes all the Domain API specific bld.inf files, which
-* export files.
-*
-*/
-
-
-
-#include "../default_app_client_api/group/bld.inf"
-#include "../services_db_api/group/bld.inf"
-
--- a/devmngt_plat/services_db_api/group/bld.inf Thu Dec 17 08:46:07 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,28 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: File that exports the files belonging to
-: Services DB API
-*
-*/
-
-
-#include <platform_paths.hrh>
-
-PRJ_PLATFORMS
-DEFAULT
-
-PRJ_EXPORTS
-
-../inc/services_db.rh APP_LAYER_PLATFORM_EXPORT_PATH(services_db.rh)
-../inc/services_db.h APP_LAYER_PLATFORM_EXPORT_PATH(services_db.h)
--- a/devmngt_plat/services_db_api/inc/services_db.h Thu Dec 17 08:46:07 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,146 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Implementation of class CServicesDB
-*
-*/
-
-
-
-#ifndef SERVICES_DB_H
-#define SERVICES_DB_H
-
-#include <e32def.h>
-#include <e32base.h>
-
-class TResourceReader;
-
-/**
- * API for retrieving various localized strings associated with services.
- *
- * This class receives a resource ID during construction (resource type is DAS_SERVICES)
- * and retrieves various info defined in this resource.
- *
- * @lib defaultappclient.dll
- * @since S60 v5.0
- */
-class CServicesDB : public CBase
- {
-
-public:
- /**
- * Symbian OS two-phased constructor
- * @return
- */
- IMPORT_C static CServicesDB* NewL( TResourceReader* aResReader );
-
- /**
- * Symbian OS two-phased constructor
- * @return
- */
- IMPORT_C static CServicesDB* NewLC( TResourceReader* aResReader );
-
- /**
- * Destructor.
- */
- IMPORT_C ~CServicesDB();
-
-public:
-
- /**
- * Returns the number of available services
- * (the number of services read from the resource during construction)
- *
- * @since S60 v5.0
- * @return number of available services/elements
- */
- IMPORT_C TInt Count() const;
-
- /**
- * Function to return the Uid of a service (by index).
- *
- * @since S60 v5.0
- * @return the uid of the service (it leaves if aIndex is not a valid index)
- */
- IMPORT_C TUid ServiceUidL(TInt aIndex) const;
-
- /**
- * Function to return the localized name associated with a service. If the returned
- * strings accepts a parameter, this can be specified as aParam
- *
- * @since S60 v5.0
- * @param aIndex the index of the service
- * @param aParam parameter for the localized string
- * @return the localized name (it leaves if aIndex is not a valid index)
- */
- IMPORT_C HBufC* ServiceStringLC(TInt aIndex, const TDes& aParam) const;
-
- /**
- * Function to return the localized name associated with a service. If the returned
- * strings accepts a parameter, this can be specified as aParam
- *
- * @since S60 v5.0
- * @param aServiceUid the Uid of the service
- * @param aParam parameter for the localized string
- * @return the localized name (NULL, if the service is not found)
- */
- IMPORT_C HBufC* ServiceStringLC(TUid aServiceUid, const TDes& aParam) const;
-
- /**
- * Function to return the generic name of a service.
- *
- * @since S60 v5.0
- * @param aIndex the index of the service
- * @return the generic name of the service (it leaves if aIndex is not a valid index)
- */
- IMPORT_C HBufC* ServiceNameLC(TInt aIndex) const;
-
- /**
- * Function to return the generic name of a service.
- *
- * @since S60 v5.0
- * @param aServiceUid the Uid of the service
- * @return the generic name of the service (NULL, if the service is not found)
- */
- IMPORT_C HBufC* ServiceNameLC(TUid aServiceUid) const;
-
-private:
-
- /**
- * C++ default constructor.
- */
- CServicesDB();
-
- /**
- * Symbian constructor.
- */
- void ConstructL( TResourceReader* aResReader );
-
-private:
- /**
- * array of service Uids
- */
- RArray<TInt> iServiceUids;
-
- /**
- * array of service names
- */
- RPointerArray<HBufC> iServiceNames;
-
- /**
- * array of service localized names
- */
- RPointerArray<HBufC> iServiceLoc;
- };
-
-#endif // SERVICES_DB_H
--- a/devmngt_plat/services_db_api/inc/services_db.rh Thu Dec 17 08:46:07 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,44 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Resource headers for project Services DB
-*
-*/
-
-
-#ifndef SERVICES_DB_RH
-#define SERVICES_DB_RH
-
-
-// ---------------------------------------------------------------------------
-// This structure defines a service entry: it holds the service uid,
-// service generic name, and service localized string
-// ---------------------------------------------------------------------------
-//
-STRUCT DAS_SERVICE_ENTRY
- {
- LONG service_uid;
- LTEXT service_name;
- LTEXT service_localized_name;
- }
-
-// ---------------------------------------------------------------------------
-// This structure defines a list of service entries
-// ---------------------------------------------------------------------------
-//
-STRUCT DAS_SERVICES
- {
- STRUCT services[]; //Type is DAS_SERVICE_ENTRY
- }
-
-#endif // SERVICES_DB_RH
--- a/devmngt_plat/services_db_api/services_db_api.metaxml Thu Dec 17 08:46:07 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,18 +0,0 @@
-<?xml version="1.0" ?>
-<api id="ae69ac471f1c896165c698e47987d2fd" dataversion="2.0">
- <name>Services DB API</name>
- <description>API for retrieving information about services: UID, generic name (in engineering English), localized name.</description>
- <type>c++</type>
- <collection>DefaultApplicationSettings</collection>
- <libs>
- <lib name="servicesdb.lib" />
- </libs>
- <release category="platform"/>
- <attributes>
- <!-- This indicates wether the api provedes separate html documentation -->
- <!-- or is the additional documentation generated from headers. -->
- <!-- If you are unsuere then the value is "no" -->
- <htmldocprovided>no</htmldocprovided>
- <adaptation>no</adaptation>
- </attributes>
-</api>
--- a/devmngt_plat/services_db_api/tsrc/ServicesDbApiTest/Bmarm/ServicesDbApiTestU.DEF Thu Dec 17 08:46:07 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-EXPORTS
- LibEntryL__FR13CTestModuleIf @ 1 NONAME R3UNUSED ; LibEntryL(CTestModuleIf &)
-
--- a/devmngt_plat/services_db_api/tsrc/ServicesDbApiTest/Bwins/ServicesDbApiTestU.DEF Thu Dec 17 08:46:07 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-EXPORTS
- ?LibEntryL@@YAPAVCScriptBase@@AAVCTestModuleIf@@@Z @ 1 NONAME ; class CScriptBase * __cdecl LibEntryL(class CTestModuleIf &)
-
--- a/devmngt_plat/services_db_api/tsrc/ServicesDbApiTest/EABI/ServicesDbApiTestU.def Thu Dec 17 08:46:07 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-EXPORTS
- _Z9LibEntryLR13CTestModuleIf @ 1 NONAME
-
--- a/devmngt_plat/services_db_api/tsrc/ServicesDbApiTest/conf/ui_ServicesDbApiTest.cfg Thu Dec 17 08:46:07 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,304 +0,0 @@
-###################################################################################
-#
-# This cfg file has tests for Services DB API
-# The resource file - ServicesDbApiTest.rss defined to test this api has the following services.
-# The tests listed below are based on this resource file services
-#
-# RESOURCE DAS_SERVICES r_da_service_mime
-# {
-# services =
-# {
-# DAS_SERVICE_ENTRY
-# {
-# service_uid = 0x101; // NOT A REAL UID - 257
-# service_name = "Open";
-# service_localized_name = "Open Localized";
-# },
-# DAS_SERVICE_ENTRY
-# {
-# service_uid = 0x102; // NOT A REAL UID - 258
-# service_name = "Upload";
-# service_localized_name = "Upload Localized";
-# },
-# DAS_SERVICE_ENTRY
-# {
-# service_uid = 0x103; // NOT A REAL UID - 259
-# service_name = "Print";
-# service_localized_name = "Print Localized %U";
-# }
-# };
-#
-###################################################################################
-
-
-[Define]
-KFirstServiceIndex 0
-KSecondServiceIndex 1
-KThirdServiceIndex 2
-KNotAServiceInResourceIndex 10
-KFirstServiceUid 257
-KSecondServiceUid 258
-KThirdServiceUid 259
-KNotAServiceInResourceUid 260
-KErrGeneral -2
-KErrArgument -6
-[Enddefine]
-
-
-# This test case is for NewL
-# 1
-[Test]
-title Initialize Services DB
-create ServicesDbApiTest foobar
-foobar InitializeSeviceDB
-delete foobar
-[Endtest]
-
-# This test case is for NewLC
-# 2
-[Test]
-title Initialize on stack
-create ServicesDbApiTest foobar
-foobar InitializeonStackSeviceDB
-delete foobar
-[Endtest]
-
-# Testing Count function
-# 3
-[Test]
-title CountSeviceDB
-create ServicesDbApiTest foobar
-foobar CountSeviceDB
-delete foobar
-[Endtest]
-
-######################################################################
-# Testing ServiceUidL function with different INDEX parameters
-######################################################################
-# 4
-[Test]
-title Test ServiceUidL - No parameter
-create ServicesDbApiTest foobar
-allownextresult KErrGeneral
-foobar ServiceUidLSeviceDB
-delete foobar
-[Endtest]
-
-#5
-[Test]
-title Test ServiceUidL 0 INDEX
-create ServicesDbApiTest foobar
-foobar ServiceUidLSeviceDB KFirstServiceIndex
-delete foobar
-[Endtest]
-
-#6
-[Test]
-title Test ServiceUidL 1 INDEX
-create ServicesDbApiTest foobar
-foobar ServiceUidLSeviceDB KSecondServiceIndex
-delete foobar
-[Endtest]
-
-#7
-[Test]
-title Test ServiceUidL 2 INDEX
-create ServicesDbApiTest foobar
-foobar ServiceUidLSeviceDB KThirdServiceIndex
-delete foobar
-[Endtest]
-
-#8
-[Test]
-title Test ServiceUidL Wrong INDEX
-create ServicesDbApiTest foobar
-allownextresult KErrArgument
-foobar ServiceUidLSeviceDB KNotAServiceInResourceIndex
-delete foobar
-[Endtest]
-
-#--------------------------------------------------------------------#
-
-######################################################################
-# Testing ServiceStringLC function with different INDEX parameters
-######################################################################
-#9
-[Test]
-title Test ServiceStringLC with No Index
-create ServicesDbApiTest foobar
-allownextresult KErrGeneral
-foobar ServiceStringLCSeviceDB
-delete foobar
-[Endtest]
-
-#10
-[Test]
-title Test ServiceStringLC with 0 Index
-create ServicesDbApiTest foobar
-foobar ServiceStringLCSeviceDB KFirstServiceIndex
-delete foobar
-[Endtest]
-
-#11
-[Test]
-title Test ServiceStringLC with 1 Index
-create ServicesDbApiTest foobar
-foobar ServiceStringLCSeviceDB KSecondServiceIndex
-delete foobar
-[Endtest]
-
-#12
-[Test]
-title Test ServiceStringLC with 2 Index
-create ServicesDbApiTest foobar
-foobar ServiceStringLCSeviceDB KThirdServiceIndex
-delete foobar
-[Endtest]
-
-#13
-[Test]
-title Test ServiceStringLC with wrong Index
-create ServicesDbApiTest foobar
-allownextresult KErrArgument
-foobar ServiceStringLCSeviceDB KNotAServiceInResourceIndex
-delete foobar
-[Endtest]
-
-#--------------------------------------------------------------------#
-
-######################################################################
-# Testing ServiceStringLC function with different UID as parameters
-######################################################################
-#14
-[Test]
-title Test ServiceStringLC with No UID
-create ServicesDbApiTest foobar
-allownextresult KErrGeneral
-foobar ServiceStringLCUIDSeviceDB
-delete foobar
-[Endtest]
-
-#15
-[Test]
-title Test ServiceStringLC with 257 UID (0x101)
-create ServicesDbApiTest foobar
-foobar ServiceStringLCUIDSeviceDB KFirstServiceUid
-delete foobar
-[Endtest]
-
-#16
-[Test]
-title Test ServiceStringLC with 258 UID (0x102)
-create ServicesDbApiTest foobar
-foobar ServiceStringLCUIDSeviceDB KSecondServiceUid
-delete foobar
-[Endtest]
-
-#17
-[Test]
-title Test ServiceStringLC with 258 UID (0x103)
-create ServicesDbApiTest foobar
-foobar ServiceStringLCUIDSeviceDB KThirdServiceUid
-delete foobar
-[Endtest]
-
-#18
-[Test]
-title Test ServiceStringLC with Wrong UID
-create ServicesDbApiTest foobar
-foobar ServiceStringLCUIDSeviceDB KNotAServiceInResourceUid
-delete foobar
-[Endtest]
-
-#--------------------------------------------------------------------#
-
-######################################################################
-# Testing ServiceNameLC function with different INDEX as parameters
-######################################################################
-#19
-[Test]
-title test ServiceNameLC with No parameter
-allownextresult KErrGeneral
-create ServicesDbApiTest foobar
-foobar ServiceNameLCSeviceDB
-delete foobar
-[Endtest]
-
-#20
-[Test]
-title test ServiceNameLC with 0 index
-create ServicesDbApiTest foobar
-foobar ServiceNameLCSeviceDB KFirstServiceIndex
-delete foobar
-[Endtest]
-
-#21
-[Test]
-title test ServiceNameLC with 1 index
-create ServicesDbApiTest foobar
-foobar ServiceNameLCSeviceDB KSecondServiceIndex
-delete foobar
-[Endtest]
-
-#22
-[Test]
-title test ServiceNameLC with 2 index
-create ServicesDbApiTest foobar
-foobar ServiceNameLCSeviceDB KThirdServiceIndex
-delete foobar
-[Endtest]
-
-#23
-[Test]
-title test ServiceNameLC with incorrect index
-create ServicesDbApiTest foobar
-allownextresult KErrArgument
-foobar ServiceNameLCSeviceDB KNotAServiceInResourceIndex
-delete foobar
-[Endtest]
-
-#--------------------------------------------------------------------#
-
-######################################################################
-# Testing ServiceNameLC function with different UID as parameters
-######################################################################
-#24
-[Test]
-title test ServiceNameLC with No Parameter
-allownextresult KErrGeneral
-create ServicesDbApiTest foobar
-foobar ServiceNameLCuidSeviceDB
-delete foobar
-[Endtest]
-
-#25
-[Test]
-title test ServiceNameLC with 257 UID (0x101)
-create ServicesDbApiTest foobar
-foobar ServiceNameLCuidSeviceDB KFirstServiceUid
-delete foobar
-[Endtest]
-
-#26
-[Test]
-title test ServiceNameLC with 258 UID (0x102)
-create ServicesDbApiTest foobar
-foobar ServiceNameLCuidSeviceDB KSecondServiceUid
-delete foobar
-[Endtest]
-
-#27
-[Test]
-title test ServiceNameLC with 259 UID (0x103)
-create ServicesDbApiTest foobar
-foobar ServiceNameLCuidSeviceDB KThirdServiceUid
-delete foobar
-[Endtest]
-
-#28
-[Test]
-title test ServiceNameLC with 260 UID
-create ServicesDbApiTest foobar
-foobar ServiceNameLCuidSeviceDB KNotAServiceInResourceUid
-delete foobar
-[Endtest]
Binary file devmngt_plat/services_db_api/tsrc/ServicesDbApiTest/data/ServicesDbApiTest.rsc has changed
--- a/devmngt_plat/services_db_api/tsrc/ServicesDbApiTest/group/ServicesDbApiTest.iby Thu Dec 17 08:46:07 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,26 +0,0 @@
-/*
-* Copyright (c) 2002-2005 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: Personalisation application localised resource IBY
-*
-*/
-
-
-#ifndef SERVICESDBAPITEST_IBY
-#define SERVICESDBAPITEST_IBY
-
-
-file=ABI_DIR/BUILD_DIR/ServicesDbApiTest.dll SHARED_LIB_DIR/ServicesDbApiTest.dll
-data=DATAZ_/RESOURCE_FILES_DIR/ServicesDbApiTest.rsc RESOURCE_FILES_DIR/ServicesDbApiTest.rsc
-
-#endif // SERVICESDBAPITEST_IBY
\ No newline at end of file
--- a/devmngt_plat/services_db_api/tsrc/ServicesDbApiTest/group/ServicesDbApiTest.mmp Thu Dec 17 08:46:07 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,84 +0,0 @@
-/*
-* Copyright (c) 2002 - 2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Project specification file of ServicesDbApiTest
-*
-*/
-
-
-#include <platform_paths.hrh>
-#include <data_caging_paths.hrh>
-
-TARGET ServicesDbApiTest.dll
-TARGETTYPE dll
-UID 0x1000008D 0x101FB3E3
-
-CAPABILITY ALL -TCB
-
-VENDORID VID_DEFAULT
-
-
-//TARGETPATH ?target_path
-DEFFILE ServicesDbApiTest.def
-
-
-APP_LAYER_SYSTEMINCLUDE
-USERINCLUDE ../inc
-
-SOURCEPATH ../src
-
-SOURCE ServicesDbApiTest.cpp
-SOURCE ServicesDbApiTestBlocks.cpp
-
-START RESOURCE ServicesDbApiTest.rss
-HEADER
-TARGETPATH RESOURCE_FILES_DIR
-END // RESOURCE
-
-
-LIBRARY euser.lib
-LIBRARY stiftestinterface.lib
-LIBRARY stiftestengine.lib
-LIBRARY eikcore.lib
-LIBRARY efsrv.lib
-LIBRARY bafl.lib
-LIBRARY cone.lib
-LIBRARY servicesdb.lib
-LIBRARY commonengine.lib
-
-LANG SC
-
-epocallowdlldata
-/*
-START WINS
-?wins_specific_information
-END
-
-START MARM
-?marm_specific_information
-END
-*/
-// Other possible keywords:
-
-// DOCUMENT ?file, that is not compiled, but added to MSVC project workspace (i.e. release notes)
-/*
-START BITMAP ?target
-TARGETPATH ?emulated_path_on_target_machine
-HEADER
-SOURCE ?color_depth ?source_bitmap
-END
-*/
-// DEFFILE ?filename
-// AIF ?filename
-
-// End of File
--- a/devmngt_plat/services_db_api/tsrc/ServicesDbApiTest/group/ServicesDbApiTest.pkg Thu Dec 17 08:46:07 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,66 +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: Installation file for STIF
-;
-;
-;
-
-; Languages
-&EN
-
-; Provide value for uid
-#{"STIF"},(0x00000000),1,1,0,TYPE=SA
-
-; Series60 product id for S60 3.0
-[0x101F7961], 0, 0, 0, {"Series60ProductID"}
-
-; Localised Vendor name
-%{"Nokia"}
-
-; Unique Vendor name
-:"Nokia"
-
-; Logo
-; None
-
-; Package signature - Optional
-; None
-
-; Start of Package body
-
-
-; Condition blocks
-; None
-
-; Options list
-; None
-
-; Install files
-"/epoc32/release/armv5/urel/ServicesDbApiTest.dll" - "c:/Sys/Bin/ServicesDbApiTest.dll"
-"/epoc32/data/z/resource/ServicesDbApiTest.rsc" - "c:/resource/ServicesDbApiTest.rsc"
-;.cfg & .ini files
-"..\init\TestFramework_SDB.ini" - "!:\TestFramework\TestFramework_SDB.ini"
-"..\conf\ui_ServicesDbApiTest.cfg" - "!:\TestFramework\ui_ServicesDbApiTest.cfg"
-;"proeng_c.bat" - "!:\proeng.bat"
-
-; Embedded SIS
-; None
-
-; End of Package body
-
-; PKG dependencies
-; None
-
-; PKG capabilities
-; None
--- a/devmngt_plat/services_db_api/tsrc/ServicesDbApiTest/group/ServicesDbApiTest_DoxyFile.txt Thu Dec 17 08:46:07 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,222 +0,0 @@
-# Doxyfile 1.4.1
-
-#---------------------------------------------------------------------------
-# Project related configuration options
-#---------------------------------------------------------------------------
-PROJECT_NAME = ServicesDbApiTest
-PROJECT_NUMBER =
-OUTPUT_DIRECTORY = P:\ServicesDbApiTest\
-CREATE_SUBDIRS = NO
-OUTPUT_LANGUAGE = English
-USE_WINDOWS_ENCODING = YES
-BRIEF_MEMBER_DESC = YES
-REPEAT_BRIEF = YES
-ABBREVIATE_BRIEF =
-ALWAYS_DETAILED_SEC = NO
-INLINE_INHERITED_MEMB = NO
-FULL_PATH_NAMES = NO
-STRIP_FROM_PATH =
-STRIP_FROM_INC_PATH =
-SHORT_NAMES = NO
-JAVADOC_AUTOBRIEF = NO
-MULTILINE_CPP_IS_BRIEF = NO
-DETAILS_AT_TOP = NO
-INHERIT_DOCS = YES
-DISTRIBUTE_GROUP_DOC = NO
-TAB_SIZE = 8
-ALIASES =
-OPTIMIZE_OUTPUT_FOR_C = YES
-OPTIMIZE_OUTPUT_JAVA = NO
-SUBGROUPING = YES
-#---------------------------------------------------------------------------
-# Build related configuration options
-#---------------------------------------------------------------------------
-EXTRACT_ALL = YES
-EXTRACT_PRIVATE = NO
-EXTRACT_STATIC = NO
-EXTRACT_LOCAL_CLASSES = NO
-EXTRACT_LOCAL_METHODS = NO
-HIDE_UNDOC_MEMBERS = NO
-HIDE_UNDOC_CLASSES = NO
-HIDE_FRIEND_COMPOUNDS = NO
-HIDE_IN_BODY_DOCS = NO
-INTERNAL_DOCS = YES
-CASE_SENSE_NAMES = YES
-HIDE_SCOPE_NAMES = NO
-SHOW_INCLUDE_FILES = YES
-INLINE_INFO = YES
-SORT_MEMBER_DOCS = YES
-SORT_BRIEF_DOCS = NO
-SORT_BY_SCOPE_NAME = NO
-GENERATE_TODOLIST = NO
-GENERATE_TESTLIST = NO
-GENERATE_BUGLIST = NO
-GENERATE_DEPRECATEDLIST= YES
-ENABLED_SECTIONS =
-MAX_INITIALIZER_LINES = 30
-SHOW_USED_FILES = YES
-SHOW_DIRECTORIES = YES
-FILE_VERSION_FILTER =
-#---------------------------------------------------------------------------
-# configuration options related to warning and progress messages
-#---------------------------------------------------------------------------
-QUIET = NO
-WARNINGS = YES
-WARN_IF_UNDOCUMENTED = YES
-WARN_IF_DOC_ERROR = YES
-WARN_NO_PARAMDOC = NO
-WARN_FORMAT = "$file:$line: $text"
-WARN_LOGFILE =
-#---------------------------------------------------------------------------
-# configuration options related to the input files
-#---------------------------------------------------------------------------
-INPUT = P:\ServicesDbApiTest\
-FILE_PATTERNS = *.h \
- *.rh \
- *.hrh
-RECURSIVE = YES
-EXCLUDE =
-EXCLUDE_SYMLINKS = NO
-EXCLUDE_PATTERNS =
-EXAMPLE_PATH =
-EXAMPLE_PATTERNS =
-EXAMPLE_RECURSIVE = NO
-IMAGE_PATH =
-INPUT_FILTER =
-FILTER_PATTERNS =
-FILTER_SOURCE_FILES = NO
-#---------------------------------------------------------------------------
-# configuration options related to source browsing
-#---------------------------------------------------------------------------
-SOURCE_BROWSER = NO
-INLINE_SOURCES = NO
-STRIP_CODE_COMMENTS = YES
-REFERENCED_BY_RELATION = YES
-REFERENCES_RELATION = YES
-VERBATIM_HEADERS = YES
-#---------------------------------------------------------------------------
-# configuration options related to the alphabetical class index
-#---------------------------------------------------------------------------
-ALPHABETICAL_INDEX = NO
-COLS_IN_ALPHA_INDEX = 5
-IGNORE_PREFIX =
-#---------------------------------------------------------------------------
-# configuration options related to the HTML output
-#---------------------------------------------------------------------------
-GENERATE_HTML = NO
-HTML_OUTPUT = html
-HTML_FILE_EXTENSION = .html
-HTML_HEADER =
-HTML_FOOTER =
-HTML_STYLESHEET =
-HTML_ALIGN_MEMBERS = YES
-GENERATE_HTMLHELP = YES
-CHM_FILE =
-HHC_LOCATION =
-GENERATE_CHI = NO
-BINARY_TOC = YES
-TOC_EXPAND = YES
-DISABLE_INDEX = YES
-ENUM_VALUES_PER_LINE = 4
-GENERATE_TREEVIEW = YES
-TREEVIEW_WIDTH = 250
-#---------------------------------------------------------------------------
-# configuration options related to the LaTeX output
-#---------------------------------------------------------------------------
-GENERATE_LATEX = NO
-LATEX_OUTPUT = latex
-LATEX_CMD_NAME = latex
-MAKEINDEX_CMD_NAME = makeindex
-COMPACT_LATEX = NO
-PAPER_TYPE = a4wide
-EXTRA_PACKAGES =
-LATEX_HEADER =
-PDF_HYPERLINKS = NO
-USE_PDFLATEX = NO
-LATEX_BATCHMODE = NO
-LATEX_HIDE_INDICES = NO
-#---------------------------------------------------------------------------
-# configuration options related to the RTF output
-#---------------------------------------------------------------------------
-GENERATE_RTF = YES
-RTF_OUTPUT = Doc
-COMPACT_RTF = YES
-RTF_HYPERLINKS = YES
-RTF_STYLESHEET_FILE =
-RTF_EXTENSIONS_FILE =
-#---------------------------------------------------------------------------
-# configuration options related to the man page output
-#---------------------------------------------------------------------------
-GENERATE_MAN = NO
-MAN_OUTPUT = man
-MAN_EXTENSION = .3
-MAN_LINKS = NO
-#---------------------------------------------------------------------------
-# configuration options related to the XML output
-#---------------------------------------------------------------------------
-GENERATE_XML = NO
-XML_OUTPUT = xml
-XML_SCHEMA =
-XML_DTD =
-XML_PROGRAMLISTING = YES
-#---------------------------------------------------------------------------
-# configuration options for the AutoGen Definitions output
-#---------------------------------------------------------------------------
-GENERATE_AUTOGEN_DEF = NO
-#---------------------------------------------------------------------------
-# configuration options related to the Perl module output
-#---------------------------------------------------------------------------
-GENERATE_PERLMOD = NO
-PERLMOD_LATEX = NO
-PERLMOD_PRETTY = YES
-PERLMOD_MAKEVAR_PREFIX =
-#---------------------------------------------------------------------------
-# Configuration options related to the preprocessor
-#---------------------------------------------------------------------------
-ENABLE_PREPROCESSING = YES
-MACRO_EXPANSION = YES
-EXPAND_ONLY_PREDEF = NO
-SEARCH_INCLUDES = YES
-INCLUDE_PATH =
-INCLUDE_FILE_PATTERNS =
-PREDEFINED = NONSHARABLE_CLASS
-EXPAND_AS_DEFINED =
-SKIP_FUNCTION_MACROS = YES
-#---------------------------------------------------------------------------
-# Configuration::additions related to external references
-#---------------------------------------------------------------------------
-TAGFILES =
-GENERATE_TAGFILE =
-ALLEXTERNALS = NO
-EXTERNAL_GROUPS = YES
-PERL_PATH = /usr/bin/perl
-#---------------------------------------------------------------------------
-# Configuration options related to the dot tool
-#---------------------------------------------------------------------------
-CLASS_DIAGRAMS = YES
-HIDE_UNDOC_RELATIONS = YES
-HAVE_DOT = NO
-CLASS_GRAPH = YES
-COLLABORATION_GRAPH = YES
-GROUP_GRAPHS = YES
-UML_LOOK = NO
-TEMPLATE_RELATIONS = YES
-INCLUDE_GRAPH = YES
-INCLUDED_BY_GRAPH = YES
-CALL_GRAPH = NO
-GRAPHICAL_HIERARCHY = YES
-DIRECTORY_GRAPH = YES
-DOT_IMAGE_FORMAT = png
-DOT_PATH =
-DOTFILE_DIRS =
-MAX_DOT_GRAPH_WIDTH = 1024
-MAX_DOT_GRAPH_HEIGHT = 1024
-MAX_DOT_GRAPH_DEPTH = 0
-DOT_TRANSPARENT = NO
-DOT_MULTI_TARGETS = NO
-GENERATE_LEGEND = YES
-DOT_CLEANUP = YES
-#---------------------------------------------------------------------------
-# Configuration::additions related to the search engine
-#---------------------------------------------------------------------------
-SEARCHENGINE = NO
--- a/devmngt_plat/services_db_api/tsrc/ServicesDbApiTest/group/ServicesDbApiTest_nrm.mmp Thu Dec 17 08:46:07 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,84 +0,0 @@
-/*
-* Copyright (c) 2002 - 2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Project specification file of ServicesDbApiTest
-*
-*/
-
-
-#include <platform_paths.hrh>
-#include <data_caging_paths.hrh>
-
-TARGET ServicesDbApiTest.dll
-TARGETTYPE dll
-UID 0x1000008D 0x101FB3E3
-
-CAPABILITY ALL -TCB
-
-VENDORID VID_DEFAULT
-
-
-//TARGETPATH ?target_path
-DEFFILE ServicesDbApiTest.def
-
-
-APP_LAYER_SYSTEMINCLUDE
-USERINCLUDE ../inc
-
-SOURCEPATH ../src
-
-SOURCE ServicesDbApiTest.cpp
-SOURCE ServicesDbApiTestBlocks.cpp
-
-START RESOURCE ServicesDbApiTest.rss
-HEADER
-TARGETPATH RESOURCE_FILES_DIR
-END // RESOURCE
-
-
-LIBRARY euser.lib
-LIBRARY stiftestinterface.lib
-LIBRARY stiftestengine.lib
-LIBRARY eikcore.lib
-LIBRARY efsrv.lib
-LIBRARY bafl.lib
-LIBRARY cone.lib
-LIBRARY servicesdb.lib
-LIBRARY commonengine.lib
-
-LANG SC
-
-epocallowdlldata
-/*
-START WINS
-?wins_specific_information
-END
-
-START MARM
-?marm_specific_information
-END
-*/
-// Other possible keywords:
-
-// DOCUMENT ?file, that is not compiled, but added to MSVC project workspace (i.e. release notes)
-/*
-START BITMAP ?target
-TARGETPATH ?emulated_path_on_target_machine
-HEADER
-SOURCE ?color_depth ?source_bitmap
-END
-*/
-// DEFFILE ?filename
-// AIF ?filename
-
-// End of File
--- a/devmngt_plat/services_db_api/tsrc/ServicesDbApiTest/group/bld.inf Thu Dec 17 08:46:07 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,62 +0,0 @@
-/*
-* Copyright (c) 2002 - 2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Build information file for project ServicesDbApiTest
-*
-*/
-
-
-
-PRJ_PLATFORMS
-// specify the platforms your component needs to be built for here
-// defaults to WINS MARM so you can ignore this if you just build these
-DEFAULT
-
-PRJ_TESTEXPORTS
-// NOTE: If using ARS requirements all export operations should be done under this.
-// 'abld test export'
-
-
-PRJ_EXPORTS
-// Specify the source file followed by its destination here
-// copy will be used to copy the source file to its destination
-// If there's no destination then the source file will be copied
-// to the same name in /epoc32/include
-// Example:
-/*
-/agnmodel/inc/AGMCOMON.H
-*/
-//IBY file
-
-
-PRJ_TESTMMPFILES
-ServicesDbApiTest.mmp
-
-PRJ_MMPFILES
-ServicesDbApiTest_nrm.mmp
-
-// Specify the .mmp files required for building the important component
-// releasables.
-//
-// Specify "tidy" if the component you need to build doesn't need to be
-// released. Specify "ignore" if the MMP file exists but should be
-// ignored.
-// Example:
-/*
-/agnmodel/group/agnmodel.mmp
-#if defined(MARM)
-/agnmodel/group/agsvexe.mmp
-#endif
-*/
-
-// End of File
--- a/devmngt_plat/services_db_api/tsrc/ServicesDbApiTest/group/proeng_c.bat Thu Dec 17 08:46:07 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,23 +0,0 @@
-rem
-rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-rem All rights reserved.
-rem This component and the accompanying materials are made available
-rem under the terms of "Eclipse Public License v1.0""
-rem which accompanies this distribution, and is available
-rem at the URL "http://www.eclipse.org/legal/epl-v10.html".
-rem
-rem Initial Contributors:
-rem Nokia Corporation - initial contribution.
-rem
-rem Contributors:
-rem
-rem Description: Copy file batch
-rem
-
-copy C:\TestFramework\testframework_ProEngWrapAPI.ini C:\TestFramework\TestFramework.ini
-md e:\BCTest
-md e:\BCTest\Results
-
-ATSINTERFACE.EXE -testmodule testscripter -config C:\TestFramework\ProEngWrapAPI.cfg
-copy c:\Logs\TestFramework\TestReport.txt e:\BCTest\results\SP_ProEngWrapAPI.txt
-
--- a/devmngt_plat/services_db_api/tsrc/ServicesDbApiTest/group/proeng_z.bat Thu Dec 17 08:46:07 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,25 +0,0 @@
-rem
-rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-rem All rights reserved.
-rem This component and the accompanying materials are made available
-rem under the terms of "Eclipse Public License v1.0""
-rem which accompanies this distribution, and is available
-rem at the URL "http://www.eclipse.org/legal/epl-v10.html".
-rem
-rem Initial Contributors:
-rem Nokia Corporation - initial contribution.
-rem
-rem Contributors:
-rem
-rem Description: Copy file batch
-rem
-
-copy z:\TestFramework\testframework_ProEngWrapAPI.ini C:\TestFramework\TestFramework.ini
-md e:\BCTest
-md e:\BCTest\Results
-
-ATSINTERFACE.EXE -testmodule testscripter -config C:\TestFramework\ProEngWrapAPI.cfg
-copy c:\Logs\TestFramework\TestReport.txt e:\BCTest\results\SP_ProEngWrapAPI.txt
-
-
-
--- a/devmngt_plat/services_db_api/tsrc/ServicesDbApiTest/inc/ServicesDbApiTest.h Thu Dec 17 08:46:07 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,264 +0,0 @@
-/*
-* Copyright (c) 2002 - 2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Implementation of class CServicesDbApiTest
-*
-*/
-
-
-
-#ifndef SERVICESDBAPITEST_H
-#define SERVICESDBAPITEST_H
-
-// INCLUDES
-#include <StifLogger.h>
-#include <TestScripterInternal.h>
-#include <StifTestModule.h>
-#include <TestclassAssert.h>
-#include <services_db.h>
-#include <ConeResLoader.h>
-#include <data_caging_path_literals.hrh>
-#include <StringLoader.h>
-#include <barsread.h>
-#include <eikenv.h>
-
-
-
-// MACROS
-#define TEST_CLASS_VERSION_MAJOR 0
-#define TEST_CLASS_VERSION_MINOR 0
-#define TEST_CLASS_VERSION_BUILD 0
-
-// Logging path
-_LIT( KServicesDbApiTestLogPath, "\\logs\\testframework\\ServicesDbApiTest\\" );
-// Log file
-_LIT( KServicesDbApiTestLogFile, "ServicesDbApiTest.txt" );
-_LIT( KServicesDbApiTestLogFileWithTitle, "ServicesDbApiTest_[%S].txt" );
-
-_LIT(KEmptyString,"");
-
-// FORWARD DECLARATIONS
-class CServicesDbApiTest;
-
-
-//Constants
-const TInt KNoOfServices = 3; // This is the number of services listed in resource file.
-const TInt KFirstOption = 0;
-const TInt KSecondOption = 1;
-const TInt KFirstServiceIndex = 0;
-const TInt KSecondServiceIndex = 1;
-const TInt KThirdServiceIndex=2;
-const TInt KFirstServiceUid = 257;
-const TInt KSecondServiceUid = 258;
-const TInt KThirdServiceUid = 259;
-const TInt KBufSize = 128;
-
-// CLASS DECLARATION
-
-/**
-* CServicesDbApiTest test class for STIF Test Framework TestScripter.
-* This class is written to test Services DB API.
-*
-* @lib ServicesDbApiTest.lib
-* @since ?Series60_version
-*/
-NONSHARABLE_CLASS(CServicesDbApiTest) : public CScriptBase
- {
- public: // Constructors and destructor
-
- /**
- * Two-phased constructor.
- */
- static CServicesDbApiTest* NewL( CTestModuleIf& aTestModuleIf );
-
- /**
- * Destructor.
- */
- virtual ~CServicesDbApiTest();
-
-
- public: // Functions from base classes
-
- /**
- * From CScriptBase Runs a script line.
- * @since ?Series60_version
- * @param aItem Script line containing method name and parameters
- * @return Symbian OS error code
- */
- virtual TInt RunMethodL( CStifItemParser& aItem );
-
-
- private:
-
- /**
- * C++ default constructor.
- */
- CServicesDbApiTest( CTestModuleIf& aTestModuleIf );
-
- /**
- * By default Symbian 2nd phase constructor is private.
- */
- void ConstructL();
-
- /**
- * Frees all resources allocated from test methods.
- * @since ?Series60_version
- */
- void Delete();
-
- /**
- * Test methods are listed below.
- */
-
- /**
- * Method used to log version of test class
- */
- void SendTestClassVersion();
-
- //[TestMethods]
-
- /**
- * Creates CServicesDB object
- * @since ?Series60_version
- * @param aOption Option to create CServicesDB object using NewL or NewLC
- * @return Symbian OS error code.
- */
- TInt CreateSeviceDBL(TInt aOption);
-
- /**
- * In this method NewLC is called.
- * @since ?Series60_version
- * @param aResReader Resource reader to get information from Resource file
- * @return Symbian OS error code.
- */
- void CallNewlcL( TResourceReader aResReader );
-
- /**
- * This method is used to test CServicesDB::NewL
- * @since ?Series60_version
- * @param No parameters required
- * @return Symbian OS error code.
- */
- TInt InitializeSeviceDB( );
-
- /**
- * This method is used to test CServicesDB::NewLC
- * @since ?Series60_version
- * @param No parameters required
- * @return Symbian OS error code.
- */
- TInt InitializeonStackSeviceDB( );
-
- /**
- * This method is used to test CServicesDB::Count
- * @since ?Series60_version
- * @param No parameters required
- * @return Symbian OS error code.
- */
- TInt CountSeviceDB();
-
- /**
- * This method is used to test CServicesDB::ServiceUidL
- * @since ?Series60_version
- * @param aItem Script line containing parameters.
- * @return Symbian OS error code.
- */
- TInt ServiceUidLSeviceDB( CStifItemParser& aItem );
-
- /**
- * This method is used to test CServicesDB::ServiceStringLC
- * with Index as parameter.
- * @since ?Series60_version
- * @param aItem Script line containing parameters.
- * @return Symbian OS error code.
- */
- TInt ServiceStringLCSeviceDB( CStifItemParser& aItem );
-
- /**
- * This method is used to test CServicesDB::ServiceStringLC
- * with UID as parameter
- * @since ?Series60_version
- * @param aItem Script line containing parameters.
- * @return Symbian OS error code.
- */
- TInt ServiceStringLCuidSeviceDB( CStifItemParser& aItem );
-
- /**
- * This method is used to test CServicesDB::ServiceNameLC
- * with Index as parameter
- * @since ?Series60_version
- * @param aItem Script line containing parameters.
- * @return Symbian OS error code.
- */
- TInt ServiceNameLCSeviceDB( CStifItemParser& aItem );
-
- /**
- * This method is used to test CServicesDB::ServiceNameLC
- * with UID as parameter
- * @since ?Series60_version
- * @param aItem Script line containing parameters.
- * @return Symbian OS error code.
- */
- TInt ServiceNameLCuidSeviceDB( CStifItemParser& aItem );
-
- /**
- * This is method encapsulates ServiceStringLC.
- * This method can be TRAPD and used to help in testing ServiceStringLC
- * @since ?Series60_version
- * @param aIndex the index of the service
- * @param aParam parameter for the localized string
- * @return Symbian OS error code.
- */
- TInt CallServiceStringLCSeviceDBL(TInt aIndex,const TDes& aParam );
-
- /**
- * This is method encapsulates ServiceStringLC.
- * This method can be TRAPD and used to help in testing ServiceStringLC
- * @since ?Series60_version
- * @param aServiceUid the Uid of the service
- * @param aParam parameter for the localized string
- * @return Symbian OS error code.
- */
- TInt CallServiceStringLCuidSeviceDBL( TUid aServiceUid, const TDes& aParam);
-
- /**
- * This is method encapsulates ServiceNameLC.
- * This method can be TRAPD and used to help in testing ServiceNameLC
- * @since ?Series60_version
- * @param aIndex the index of the service
- * @return Symbian OS error code.
- */
- TInt CallServiceNameLCSeviceDBL(TInt aIndex);
-
- /**
- * This is method encapsulates ServiceNameLC.
- * This method can be TRAPD and used to help in testing ServiceNameLC
- * @since ?Series60_version
- * @param aServiceUid the Uid of the service
- * @return Symbian OS error code.
- */
- TInt CallServiceNameLCuidSeviceDBL( TUid aServiceUid );
-
-
- private: // Data
-
- // This is the pointer to object of the class being tested
- // Through this pointer all the Exported methods are tested.
- CServicesDB *iServicesDB;
-
-
- };
-
-#endif // SERVICESDBAPITEST_H
-
-// End of File
--- a/devmngt_plat/services_db_api/tsrc/ServicesDbApiTest/init/TestFramework_SDB.ini Thu Dec 17 08:46:07 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,200 +0,0 @@
-#
-# This is STIF initialization file
-# Comment lines start with '#'-character.
-# See STIF TestFramework users guide.doc for instructions
-
-# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-# Set following test engine settings:
-# - Set Test Reporting mode. TestReportMode's possible values are:
-# + 'Summary': Summary of the tested test cases.
-# + 'Environment': Hardware and software info.
-# + 'TestCases': Test case report.
-# + 'FullReport': Set of all above ones.
-# + Example 'TestReportMode= Summary TestCases'
-#
-# - CreateTestReport setting controls report creation mode
-# + YES, Test report will created.
-# + NO, No Test report.
-#
-# - File path indicates the base path of the test report.
-# - File name indicates the name of the test report.
-#
-# - File format indicates the type of the test report.
-# + TXT, Test report file will be txt type, for example 'TestReport.txt'.
-# + HTML, Test report will be html type, for example 'TestReport.html'.
-# + XML, Test report will be xml type, for example 'TestReport.xml'.
-# Note, that xml format is available only when output is set to FILE.
-#
-# - File output indicates output source of the test report.
-# + FILE, Test report logging to file.
-# + RDEBUG, Test report logging to using rdebug.
-#
-# - File Creation Mode indicates test report overwriting if file exist.
-# + OVERWRITE, Overwrites if the Test report file exist.
-# + APPEND, Continue logging after the old Test report information if
-# report exist.
-# - Sets a device reset module's dll name(Reboot).
-# + If Nokia specific reset module is not available or it is not correct one
-# StifHWResetStub module may use as a template for user specific reset
-# module.
-# - Sets STIF test measurement disable options. e.g. pluging1 and pluging2 disablation
-# DisableMeasurement= stifmeasurementplugin01 stifmeasurementplugin02
-#
-
-[Engine_Defaults]
-
-TestReportMode= FullReport # Possible values are: 'Empty', 'Summary', 'Environment',
- 'TestCases' or 'FullReport'
-
-CreateTestReport= YES # Possible values: YES or NO
-
-TestReportFilePath= C:\LOGS\TestFramework\
-TestReportFileName= TestReport
-
-TestReportFormat= TXT # Possible values: TXT, HTML or XML
-TestReportOutput= FILE # Possible values: FILE or RDEBUG
-TestReportFileCreationMode= OVERWRITE # Possible values: OVERWRITE or APPEND
-
-DeviceResetDllName= StifResetForNokia.dll # e.g. 'StifHWResetStub.dll' for user specific reseting
-
-DisableMeasurement= stifmeasurementdisablenone # Possible values are:
- # 'stifmeasurementdisablenone', 'stifmeasurementdisableall'
- # 'stifmeasurementplugin01', 'stifmeasurementplugin02',
- # 'stifmeasurementplugin03', 'stifmeasurementplugin04',
- # 'stifmeasurementplugin05' or 'stifbappeaprofiler'
-
-Timeout= 0 # Default timeout value for each test case. In milliseconds
-UITestingSupport= YES # Possible values: YES or NO
-#SeparateProcesses= YES # Possible values: YES or NO (default: NO)
-[End_Defaults]
-# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-
-
-
-# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-# Module configurations start
-# Modules are added between module tags
-# tags. Module name is specified after ModuleName= tag, like
-# ModuleName= XXXXXXXXX
-# Modules might have initialisation file, specified as
-# IniFile= c:\testframework\YYYYYY
-# Modules might have several configuration files, like
-# TestCaseFile= c:\testframework\NormalCases.txt
-# TestCaseFile= c:\testframework\SmokeCases.txt
-# TestCaseFile= c:\testframework\ManualCases.txt
-
-# (TestCaseFile is synonym for old term ConfigFile)
-
-# Following case specifies demo module settings. Demo module
-# does not read any settings from file, so tags
-# IniFile and TestCaseFile are not used.
-# In the simplest case it is enough to specify only the
-# name of the test module when adding new test module
-
-[New_Module]
-ModuleName= testscripter
-TestCaseFile= c:\testframework\ui_ServicesDbApiTest.cfg
-[End_Module]
-
-
-# Load testmoduleXXX, optionally with initialization file and/or test case files
-#[New_Module]
-#ModuleName= testmodulexxx
-
-#TestModuleXXX used initialization file
-#IniFile= c:\testframework\init.txt
-
-#TestModuleXXX used configuration file(s)
-#TestCaseFile= c:\testframework\testcases1.cfg
-#TestCaseFile= c:\testframework\testcases2.cfg
-#TestCaseFile= c:\testframework\manualtestcases.cfg
-
-#[End_Module]
-# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-
-
-
-# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-# Set STIF logging overwrite parameters for Logger.
-# Hardware and emulator environment logging path and styles can
-# be configured from here to overwrite the Logger's implemented values.
-#
-# Settings description:
-# - Indicates option for creation log directory/directories. If log directory/directories
-# is/are not created by user they will make by software.
-# + YES, Create log directory/directories if not allready exist.
-# + NO, Log directory/directories not created. Only created one is used.
-#
-# - Overwrite emulator path setting.
-# + Example: If 'EmulatorBasePath= C:\LOGS\TestFramework\' and in code is defined
-# Logger's path 'D:\\LOGS\\Module\\' with those definition the path
-# will be 'C:\LOGS\TestFramework\LOGS\Module\'
-#
-# - Overwrite emulator's logging format.
-# + TXT, Log file(s) will be txt type(s), for example 'Module.txt'.
-# + HTML, Log file(s) will be html type(s), for example 'Module.html'.
-#
-# - Overwrited emulator logging output source.
-# + FILE, Logging to file(s).
-# + RDEBUG, Logging to using rdebug(s).
-#
-# - Overwrite hardware path setting (Same description as above in emulator path).
-# - Overwrite hardware's logging format(Same description as above in emulator format).
-# - Overwrite hardware's logging output source(Same description as above in emulator output).
-#
-# - File Creation Mode indicates file overwriting if file exist.
-# + OVERWRITE, Overwrites if file(s) exist.
-# + APPEND, Continue logging after the old logging information if file(s) exist.
-#
-# - Will thread id include to the log filename.
-# + YES, Thread id to log file(s) name, Example filename 'Module_b9.txt'.
-# + NO, No thread id to log file(s), Example filename 'Module.txt'.
-#
-# - Will time stamps include the to log file.
-# + YES, Time stamp added to each line in log file(s). Time stamp is
-# for example'12.Nov.2003 115958 LOGGING INFO'
-# + NO, No time stamp(s).
-#
-# - Will line breaks include to the log file.
-# + YES, Each logging event includes line break and next log event is in own line.
-# + NO, No line break(s).
-#
-# - Will event ranking include to the log file.
-# + YES, Event ranking number added to each line in log file(s). Ranking number
-# depends on environment's tics, for example(includes time stamp also)
-# '012 12.Nov.2003 115958 LOGGING INFO'
-# + NO, No event ranking.
-#
-# - Will write log file in unicode format.
-# + YES, Log file will be written in unicode format
-# + NO, Log will be written as normal, not unicode, file.
-#
-
-[Logger_Defaults]
-
-#NOTE: If you want to set Logger using next setting(s) remove comment(s)'#'
-#NOTE: TestEngine and TestServer logging settings cannot change here
-
-#CreateLogDirectories= YES # Possible values: YES or NO
-
-#EmulatorBasePath= C:\LOGS\TestFramework\
-#EmulatorFormat= HTML # Possible values: TXT or HTML
-#EmulatorOutput= FILE # Possible values: FILE or RDEBUG
-
-#HardwareBasePath= D:\LOGS\TestFramework\
-#HardwareFormat= HTML # Possible values: TXT or HTML
-#HardwareOutput= FILE # Possible values: FILE or RDEBUG
-
-#FileCreationMode= OVERWRITE # Possible values: OVERWRITE or APPEND
-
-#ThreadIdToLogFile= YES # Possible values: YES or NO
-#WithTimeStamp= YES # Possible values: YES or NO
-#WithLineBreak= YES # Possible values: YES or NO
-#WithEventRanking= YES # Possible values: YES or NO
-
-#FileUnicode= YES # Possible values: YES or NO
-#AddTestCaseTitle= YES # Possible values: YES or NO
-[End_Logger_Defaults]
-# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-
-# End of file
--- a/devmngt_plat/services_db_api/tsrc/ServicesDbApiTest/src/ServicesDbApiTest.cpp Thu Dec 17 08:46:07 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,155 +0,0 @@
-/*
-* Copyright (c) 2002 - 2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Implementation of class CServicesDbApiTest
-*
-*/
-
-
-
-// INCLUDE FILES
-#include <Stiftestinterface.h>
-#include "ServicesDbApiTest.h"
-#include <SettingServerClient.h>
-
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// CServicesDbApiTest::CServicesDbApiTest
-// C++ default constructor can NOT contain any code, that
-// might leave.
-// -----------------------------------------------------------------------------
-//
-CServicesDbApiTest::CServicesDbApiTest(
- CTestModuleIf& aTestModuleIf ):
- CScriptBase( aTestModuleIf )
- {
- }
-
-// -----------------------------------------------------------------------------
-// CServicesDbApiTest::ConstructL
-// Symbian 2nd phase constructor can leave.
-// -----------------------------------------------------------------------------
-//
-void CServicesDbApiTest::ConstructL()
- {
- //Read logger settings to check whether test case name is to be
- //appended to log file name.
- RSettingServer settingServer;
- TInt ret = settingServer.Connect();
- if(ret != KErrNone)
- {
- User::Leave(ret);
- }
- // Struct to StifLogger settigs.
- TLoggerSettings loggerSettings;
- // Parse StifLogger defaults from STIF initialization file.
- ret = settingServer.GetLoggerSettings(loggerSettings);
- if(ret != KErrNone)
- {
- User::Leave(ret);
- }
- // Close Setting server session
- settingServer.Close();
-
- TFileName logFileName;
-
- if(loggerSettings.iAddTestCaseTitle)
- {
- TName title;
- TestModuleIf().GetTestCaseTitleL(title);
- logFileName.Format(KServicesDbApiTestLogFileWithTitle, &title);
- }
- else
- {
- logFileName.Copy(KServicesDbApiTestLogFile);
- }
-
- iLog = CStifLogger::NewL( KServicesDbApiTestLogPath,
- logFileName,
- CStifLogger::ETxt,
- CStifLogger::EFile,
- EFalse );
-
- SendTestClassVersion();
-
- }
-
-// -----------------------------------------------------------------------------
-// CServicesDbApiTest::NewL
-// Two-phased constructor.
-// -----------------------------------------------------------------------------
-//
-CServicesDbApiTest* CServicesDbApiTest::NewL(
- CTestModuleIf& aTestModuleIf )
- {
- CServicesDbApiTest* self = new (ELeave) CServicesDbApiTest( aTestModuleIf );
-
- CleanupStack::PushL( self );
- self->ConstructL();
- CleanupStack::Pop();
-
- return self;
-
- }
-
-// Destructor
-CServicesDbApiTest::~CServicesDbApiTest()
- {
-
- // Delete resources allocated from test methods
- Delete();
-
- // Delete logger
- delete iLog;
- delete iServicesDB;
-
- }
-
-//-----------------------------------------------------------------------------
-// CServicesDbApiTest::SendTestClassVersion
-// Method used to send version of test class
-//-----------------------------------------------------------------------------
-//
-void CServicesDbApiTest::SendTestClassVersion()
- {
- TVersion moduleVersion;
- moduleVersion.iMajor = TEST_CLASS_VERSION_MAJOR;
- moduleVersion.iMinor = TEST_CLASS_VERSION_MINOR;
- moduleVersion.iBuild = TEST_CLASS_VERSION_BUILD;
-
- TFileName moduleName;
- moduleName = _L("ServicesDbApiTest.dll");
-
- TBool newVersionOfMethod = ETrue;
- TestModuleIf().SendTestModuleVersion(moduleVersion, moduleName, newVersionOfMethod);
- }
-
-// ========================== OTHER EXPORTED FUNCTIONS =========================
-
-// -----------------------------------------------------------------------------
-// LibEntryL is a polymorphic Dll entry point.
-// Returns: CScriptBase: New CScriptBase derived object
-// -----------------------------------------------------------------------------
-//
-EXPORT_C CScriptBase* LibEntryL(
- CTestModuleIf& aTestModuleIf ) // Backpointer to STIF Test Framework
- {
-
- return ( CScriptBase* ) CServicesDbApiTest::NewL( aTestModuleIf );
-
- }
-
-
-// End of File
--- a/devmngt_plat/services_db_api/tsrc/ServicesDbApiTest/src/ServicesDbApiTest.rss Thu Dec 17 08:46:07 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,62 +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: Resource definitions for project ServicesDbApiTest
-*
-*/
-// ---------------------------------------------------------------------------
-// r_da_services_mime
-// This resource stores localized strings for the supported services, identified
-// by their Uid and generic name.
-// This resource is defined in the services_db.rh file
-// ---------------------------------------------------------------------------
-//
-#include <bldvariant.hrh>
-#include <avkon.rh>
-//#include <avkon.rsg>
-//#include <avkon.mbg>
-//#include <eikcore.rsg>
-#include <eikon.rh>
-//#include <eikon.rsg>
-//#include <avkon.loc>
-//#include <data_caging_paths_strings.hrh>
-#include <services_db.rh>
-// RESOURCE IDENTIFIER
-NAME SDBT // 4 letter ID
-RESOURCE RSS_SIGNATURE { }
-RESOURCE TBUF { buf=""; }
-
-RESOURCE DAS_SERVICES r_da_service_mime
- {
- services =
- {
- DAS_SERVICE_ENTRY
- {
- service_uid = 0x101; // NOT A REAL UID
- service_name = "Open";
- service_localized_name = "Open Localized";
- },
- DAS_SERVICE_ENTRY
- {
- service_uid = 0x102; // NOT A REAL UID
- service_name = "Upload";
- service_localized_name = "Upload Localized";
- },
- DAS_SERVICE_ENTRY
- {
- service_uid = 0x103; // NOT A REAL UID
- service_name = "Print";
- service_localized_name = "Print Localized %U";
- }
- };
- }
--- a/devmngt_plat/services_db_api/tsrc/ServicesDbApiTest/src/ServicesDbApiTestBlocks.cpp Thu Dec 17 08:46:07 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,590 +0,0 @@
-/*
-* Copyright (c) 2002 - 2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: This cpp file has the functions to test Services DB API.
-*
-*/
-
-
-
-// [INCLUDE FILES]
-#include <e32svr.h>
-#include <StifParser.h>
-#include <Stiftestinterface.h>
-#include "ServicesDbApiTest.h"
-#include <ServicesDbApiTest.rsg>
-
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// CServicesDbApiTest::Delete
-// Delete here all resources allocated and opened from test methods.
-// Called from destructor.
-// -----------------------------------------------------------------------------
-//
-void CServicesDbApiTest::Delete()
- {
-
- }
-
-// -----------------------------------------------------------------------------
-// CServicesDbApiTest::RunMethodL
-// Run specified method. Contains also table of test mothods and their names.
-// -----------------------------------------------------------------------------
-//
-TInt CServicesDbApiTest::RunMethodL(
- CStifItemParser& aItem )
- {
-
- static TStifFunctionInfo const KFunctions[] =
- {
- ENTRY( "InitializeSeviceDB", CServicesDbApiTest::InitializeSeviceDB ),
- ENTRY( "InitializeonStackSeviceDB", CServicesDbApiTest::InitializeonStackSeviceDB ),
- ENTRY( "CountSeviceDB", CServicesDbApiTest::CountSeviceDB),
- ENTRY( "ServiceUidLSeviceDB", CServicesDbApiTest::ServiceUidLSeviceDB),
- ENTRY( "ServiceStringLCSeviceDB", CServicesDbApiTest::ServiceStringLCSeviceDB),
- ENTRY( "ServiceStringLCUIDSeviceDB", CServicesDbApiTest::ServiceStringLCuidSeviceDB),
- ENTRY( "ServiceNameLCSeviceDB", CServicesDbApiTest::ServiceNameLCSeviceDB),
- ENTRY( "ServiceNameLCuidSeviceDB", CServicesDbApiTest::ServiceNameLCuidSeviceDB),
- };
-
- const TInt count = sizeof( KFunctions ) /
- sizeof( TStifFunctionInfo );
-
- return RunInternalL( KFunctions, count, aItem );
-
- }
-
-
-// -----------------------------------------------------------------------------
-// CServicesDbApiTest::CreateSeviceDBL
-// This function is used to create CServicesDB object. This function is used
-// to call CServicesDB::NewL and CServicesDB::NewLC functions.
-// -----------------------------------------------------------------------------
-//
-TInt CServicesDbApiTest::CreateSeviceDBL( TInt aOption )
-{
-
- // Get CCoeEnv instance
- CEikonEnv* eikEnv = CEikonEnv::Static();
- // Initialize loader
- //open our resource file
- RConeResourceLoader resources(*eikEnv);
-
- TParse parse;
- parse.Set(_L("c:ServicesDbApiTest.rsc"), &KDC_RESOURCE_FILES_DIR, NULL );
-
- TFileName fileName( parse.FullName() );
- iLog->Log(_L("Opened Resource file named :: ")); iLog->Log(fileName);
-
- TRAPD( error, resources.OpenL(fileName) ); //Open resource file
- if ( KErrNone != error )
- {
- iLog->Log(_L("Error in opening resource file. ERROR = %d "),error); //return( error );
- //Check on Z drive if not found on C drive
- parse.Set(_L("z:ServicesDbApiTest.rsc"), &KDC_RESOURCE_FILES_DIR, NULL );
- TFileName fileName1( parse.FullName() );
- iLog->Log(_L("Opening Resource file named :: ")); iLog->Log(fileName1);
-
- TRAPD( error1 , resources.OpenL(fileName1) );
- if ( KErrNone != error1 )
- {
- iLog->Log(_L("Error in opening resource file. ERROR = %d "),error1);
- return( error1 );
- }
- }
-
- TResourceReader reader;
- eikEnv->CreateResourceReaderLC( reader, R_DA_SERVICE_MIME );
-
- if ( KFirstOption == aOption )
- {
- TRAPD( errorinNewL, iServicesDB=CServicesDB::NewL(&reader) );
- if ( KErrNone != errorinNewL )
- {
- iLog->Log(_L("=>CServicesDB::NewL leaves"));
- }
- CleanupStack::PopAndDestroy(); //reader's resource
- resources.Close();
- return ( errorinNewL );
- }
- else
- {
- TRAPD( errorinNewLC, CallNewlcL(reader) );
- if( KErrNone != errorinNewLC )
- {
- iLog->Log(_L("=>CServicesDB::NewLC leaves"));
- }
- CleanupStack::PopAndDestroy();
- resources.Close();
- return ( errorinNewLC );
- }
-}
-
-
-// -----------------------------------------------------------------------------
-// CServicesDbApiTest::CallNewlcL
-// This function is used because we can not TRAP CServicesDB::NewLC
-// -----------------------------------------------------------------------------
-//
-void CServicesDbApiTest::CallNewlcL( TResourceReader aResReader )
-{
- iServicesDB = CServicesDB::NewLC( &aResReader );
- CleanupStack::Pop();
-}
-
-
-// -----------------------------------------------------------------------------
-// CServicesDbApiTest::InitializeSeviceDB
-// Is used to test CServicesDB::NewL
-// -----------------------------------------------------------------------------
-//
-TInt CServicesDbApiTest::InitializeSeviceDB( )
-{
- TInt result;
- TRAPD( error , result = CreateSeviceDBL( KFirstOption ) );
- if ( KErrNone != error )
- { iLog->Log(_L("Services DB object not created with NewL.")); return ( error ); }
- else
- {
- if ( KErrNone != result )
- {
- iLog->Log(_L("Services DB object not created with NewL.")); return ( result );
- }
- else
- {
- iLog->Log(_L("Services DB object created with NewL."));
- }
- }
- return ( result );
-}
-
-
-// -----------------------------------------------------------------------------
-// CServicesDbApiTest::InitializeonStackSeviceDB
-// Is used to test CServicesDB::NewLC
-// -----------------------------------------------------------------------------
-//
-TInt CServicesDbApiTest::InitializeonStackSeviceDB( )
-{
- TInt result;
- TRAPD( error, result = CreateSeviceDBL( KSecondOption ) );
- if ( KErrNone != error )
- { iLog->Log(_L("Services DB object not created with NewLC.")); return ( error ); }
- else
- {
- if ( KErrNone != result )
- {
- iLog->Log(_L("Services DB object not created with NewLC.")); return ( result );
- }
- else
- {
- iLog->Log(_L("Services DB object created with NewLC."));
- }
- }
- return ( result );
-}
-
-
-// -----------------------------------------------------------------------------
-// CServicesDbApiTest::CountSeviceDB
-// Testing - IMPORT_C TInt Count() const;
-// -----------------------------------------------------------------------------
-//
-TInt CServicesDbApiTest::CountSeviceDB()
-{
- TInt result = InitializeSeviceDB();
- if ( KErrNone != result )
- {
- return ( result );
- }
- TInt nrServices=iServicesDB->Count();
- iLog->Log(_L("Number of Services listed in resource file = %d"),nrServices);
- if ( KNoOfServices != nrServices )
- {
- iLog->Log(_L("The number of services returned by CServicesDB::COUNT is incorrect"));
- return ( KErrGeneral );
- }
- return ( KErrNone );
-}
-
-// -----------------------------------------------------------------------------
-// CServicesDbApiTest::ServiceUidLSeviceDB
-// Testing - IMPORT_C TUid ServiceUidL(TInt aIndex) const;
-// -----------------------------------------------------------------------------
-//
-TInt CServicesDbApiTest::ServiceUidLSeviceDB( CStifItemParser& aItem )
-{
- TInt result = InitializeSeviceDB();
- if ( KErrNone != result )
- {
- return ( result );
- }
- TUid serviceUid;
- TInt index;
-
- if( aItem.GetNextInt(index) != KErrNone )
- {
- iLog->Log(_L("NO Index number provided, index is required parameter for testing ServiceUid "));
- return ( KErrGeneral );
- }
-
- TRAPD( error, serviceUid = iServicesDB->ServiceUidL(index) );
- if ( KErrNone != error )
- {
- iLog->Log(_L("Incorrect Index. There is no service matching the Index Number."));
- iLog->Log(_L("=> ServiceUidL leaves when index is incorrect."));
- return (error);
- }
-
- iLog->Log(_L("UID of the Service[%d]=%d"),index,serviceUid.iUid);
-
- switch (index)
- {
- case KFirstServiceIndex: if (serviceUid.iUid == 0x101)
- { iLog->Log(_L("Service UID is correct")); }
- else
- { iLog->Log(_L("Service UID is incorrect")); return ( KErrGeneral ); }
- break;
- case KSecondServiceIndex: if (serviceUid.iUid == 0x102)
- { iLog->Log(_L("Service UID is correct")); }
- else
- { iLog->Log(_L("Service UID is incorrect")); return ( KErrGeneral ); }
- break;
- case KThirdServiceIndex: if (serviceUid.iUid == 0x103)
- { iLog->Log(_L("Service UID is correct")); }
- else
- { iLog->Log(_L("Service UID is incorrect")); return ( KErrGeneral ); }
- break;
- default : break;
- };
-
- return ( KErrNone );
-}
-
-
-// -----------------------------------------------------------------------------
-// CServicesDbApiTest::ServiceStringLCSeviceDB
-// Testing - IMPORT_C HBufC* ServiceStringLC(TInt aIndex, const TDes& aParam) const;
-// -----------------------------------------------------------------------------
-//
-TInt CServicesDbApiTest::ServiceStringLCSeviceDB( CStifItemParser& aItem )
-{
- TInt result = InitializeSeviceDB();
- if ( KErrNone != result )
- {
- return ( result );
- }
- TInt index;
- TBuf<KBufSize> format(KEmptyString);
-
- if( aItem.GetNextInt(index) != KErrNone )
- {
- iLog->Log(_L("NO Index number provided, index is required parameter for testing ServiceUid "));
- return ( KErrGeneral );
- }
- TInt res;
- TRAPD( error, res = CallServiceStringLCSeviceDBL(index,format ));
- if ( KErrNone != error )
- {
- iLog->Log(_L("Incorrect Index. There is no service matching the Index Number."));
- iLog->Log(_L("=> ServiceStringLC leaves when index is incorrect."));
- return (error);
- }
-
- return ( res );
-}
-
-
-// -----------------------------------------------------------------------------
-// CServicesDbApiTest::CallServiceStringLCSeviceDBL
-// This function is used because we can not trap ServiceStringLC
-// -----------------------------------------------------------------------------
-//
-TInt CServicesDbApiTest::CallServiceStringLCSeviceDBL(TInt aIndex,const TDes& aParam )
-{
- HBufC *string;
- string=iServicesDB->ServiceStringLC(aIndex,aParam);
- iLog->Log(_L("LOCALIZED name of the Service[%d] = "),aIndex);
- iLog->Log(*string);
-
- switch (aIndex)
- {
- case KFirstServiceIndex: if(!(string->Des().Compare(_L("Open Localized"))))
- { iLog->Log(_L("LOCALIZED name is correct")); }
- else
- { iLog->Log(_L("LOCALIZED name is incorrect"));
- CleanupStack::PopAndDestroy(string); return ( KErrGeneral ); }
- break;
- case KSecondServiceIndex: if(!(string->Des().Compare(_L("Upload Localized"))))
- { iLog->Log(_L("LOCALIZED name is correct")); }
- else
- { iLog->Log(_L("LOCALIZED name is incorrect"));
- CleanupStack::PopAndDestroy(string); return ( KErrGeneral ); }
- break;
- case KThirdServiceIndex: if(!(string->Des().Compare(_L("Print Localized %U"))))
- { iLog->Log(_L("LOCALIZED name is correct")); }
- else
- { iLog->Log(_L("LOCALIZED name is incorrect"));
- CleanupStack::PopAndDestroy(string);return ( KErrGeneral ); }
- break;
- default : break;
- };
-
- CleanupStack::PopAndDestroy(string);
- return ( KErrNone );
-
-}
-
-
-// -----------------------------------------------------------------------------
-// CServicesDbApiTest::ServiceStringLCuidSeviceDB
-// Testing - IMPORT_C HBufC* ServiceStringLC(TUid aServiceUid, const TDes& aParam) const;
-// -----------------------------------------------------------------------------
-//
-TInt CServicesDbApiTest::ServiceStringLCuidSeviceDB( CStifItemParser& aItem )
-{
- TInt result = InitializeSeviceDB();
- if ( KErrNone != result )
- {
- return ( result );
- }
- TBuf<KBufSize> format(KEmptyString);
- TInt uid;
-
- if( aItem.GetNextInt(uid) != KErrNone )
- {
- iLog->Log(_L("NO UID number provided, UID is required parameter for testing ServiceStringLC "));
- return ( KErrGeneral );
- }
- TUid serviceUID= TUid::Uid(uid);
- iLog->Log(_L("serviceUID = %d"),serviceUID.iUid);
- TInt res ;
- TRAPD(error, res = CallServiceStringLCuidSeviceDBL(serviceUID,format));
- if ( KErrNone != error )
- {
- iLog->Log(_L("=> ServiceStringLC leaves. Error code = %d"),error);
- return (error);
- }
- return ( res );
-
-}
-
-
-// -----------------------------------------------------------------------------
-// CServicesDbApiTest::CallServiceStringLCuidSeviceDBL
-// This function is used because we can not trap ServiceStringLC
-// -----------------------------------------------------------------------------
-//
-TInt CServicesDbApiTest::CallServiceStringLCuidSeviceDBL( TUid aServiceUid, const TDes& aParam )
-{
- HBufC *string;
- string=iServicesDB->ServiceStringLC(aServiceUid,aParam);
- if ( NULL != string )
- {
- iLog->Log(_L("LOCALIZED name of the Service with UID(%d) = "),aServiceUid.iUid);
- iLog->Log(*string);
- }
- else
- {
- iLog->Log(_L("No matching service found, Service UID provided is incorrect"));
- }
-
- switch (aServiceUid.iUid)
- {
- case KFirstServiceUid: if(!(string->Des().Compare(_L("Open Localized"))))
- { iLog->Log(_L("LOCALIZED name is correct")); }
- else
- { iLog->Log(_L("LOCALIZED name is incorrect"));
- CleanupStack::PopAndDestroy(string); return ( KErrGeneral ); }
- break;
- case KSecondServiceUid: if(!(string->Des().Compare(_L("Upload Localized"))))
- { iLog->Log(_L("LOCALIZED name is correct")); }
- else
- { iLog->Log(_L("LOCALIZED name is incorrect"));
- CleanupStack::PopAndDestroy(string); return ( KErrGeneral ); }
- break;
- case KThirdServiceUid: if(!(string->Des().Compare(_L("Print Localized %U"))))
- { iLog->Log(_L("LOCALIZED name is correct")); }
- else
- { iLog->Log(_L("LOCALIZED name is incorrect"));
- CleanupStack::PopAndDestroy(string);return ( KErrGeneral ); }
- break;
- default : break;
- };
-
- CleanupStack::PopAndDestroy(string);
- return ( KErrNone );
-}
-
-// -----------------------------------------------------------------------------
-// CServicesDbApiTest::ServiceNameLCSeviceDB
-// Testing - IMPORT_C HBufC* ServiceNameLC(TInt aIndex) const;
-// -----------------------------------------------------------------------------
-//
-TInt CServicesDbApiTest::ServiceNameLCSeviceDB( CStifItemParser& aItem )
-{
- TInt result = InitializeSeviceDB();
- if ( KErrNone != result )
- {
- return ( result );
- }
- TInt index;
- TBuf<KBufSize> format(KEmptyString);
-
- if( aItem.GetNextInt(index) != KErrNone )
- {
- iLog->Log(_L("NO Index number provided, index is required parameter for testing ServiceNameLC "));
- return ( KErrGeneral );
- }
- iLog->Log(_L("checked till here"));
- iLog->Log(_L("index = %d"),index);
-
- TRAPD(error,TInt res = CallServiceNameLCSeviceDBL(index));
- if ( KErrNone != error )
- {
- iLog->Log(_L("Incorrect Index. There is no service matching the Index Number."));
- iLog->Log(_L("=> ServiceNameLC leaves when index is incorrect."));
- return (error);
- }
- return ( KErrNone );
-
-}
-
-
-// -----------------------------------------------------------------------------
-// CServicesDbApiTest::ServiceNameLCSeviceDB
-// This function is used because we can not trap ServiceNameLC
-// -----------------------------------------------------------------------------
-//
-TInt CServicesDbApiTest::CallServiceNameLCSeviceDBL(TInt aIndex)
-{
- HBufC *string;
- string=iServicesDB->ServiceNameLC(aIndex);
- iLog->Log(_L("GENERIC name of the Service[%d] = "),aIndex);
- iLog->Log(*string);
-
- switch (aIndex)
- {
- case KFirstServiceIndex: if(!(string->Des().Compare(_L("Open"))))
- { iLog->Log(_L("GENERIC name is correct")); }
- else
- { iLog->Log(_L("GENERIC name is incorrect"));
- CleanupStack::PopAndDestroy(string); return ( KErrGeneral ); }
- break;
- case KSecondServiceIndex: if(!(string->Des().Compare(_L("Upload"))))
- { iLog->Log(_L("GENERIC name is correct")); }
- else
- { iLog->Log(_L("GENERIC name is incorrect"));
- CleanupStack::PopAndDestroy(string); return ( KErrGeneral ); }
- break;
- case KThirdServiceIndex: if(!(string->Des().Compare(_L("Print"))))
- { iLog->Log(_L("GENERIC name is correct")); }
- else
- { iLog->Log(_L("GENERIC name is incorrect"));
- CleanupStack::PopAndDestroy(string);return ( KErrGeneral ); }
- break;
- default : break;
- };
-
- CleanupStack::PopAndDestroy(string);
- return ( KErrNone );
-
-}
-
-
-// -----------------------------------------------------------------------------
-// CServicesDbApiTest::ServiceNameLCuidSeviceDB
-// Testing - IMPORT_C HBufC* ServiceNameLC(TUid aServiceUid) const;
-// -----------------------------------------------------------------------------
-//
-TInt CServicesDbApiTest::ServiceNameLCuidSeviceDB( CStifItemParser& aItem )
-{
-
- TInt result = InitializeSeviceDB();
- if ( KErrNone != result )
- {
- return ( result );
- }
- TBuf<KBufSize> format(KEmptyString);
- TInt uid;
-
- if( aItem.GetNextInt(uid) != KErrNone )
- {
- iLog->Log(_L("NO UID number provided, UID is required parameter for testing ServiceStringLC "));
- return ( KErrGeneral );
- }
- iLog->Log(_L("checked till here"));
-
- TUid serviceUID= TUid::Uid(uid);
- iLog->Log(_L("serviceUID = %d"),serviceUID.iUid);
-
- TRAPD(error,TInt res = CallServiceNameLCuidSeviceDBL(serviceUID));
- if ( KErrNone != error )
- {
- iLog->Log(_L("=> ServiceNameLC leaves."),error);
- return (error);
- }
- return ( KErrNone );
-}
-
-
-// -----------------------------------------------------------------------------
-// CServicesDbApiTest::ServiceNameLCuidSeviceDB
-// This function is used because we can not trap ServiceNameLC
-// -----------------------------------------------------------------------------
-//
-TInt CServicesDbApiTest::CallServiceNameLCuidSeviceDBL( TUid aServiceUid )
-{
- HBufC *string;
- string=iServicesDB->ServiceNameLC(aServiceUid);
- if ( NULL != string )
- {
- iLog->Log(_L("GENERIC name of the Service with UID(%d) = "),aServiceUid.iUid);
- iLog->Log(*string);
- }
- else
- {
- iLog->Log(_L("No matching service found, Service UID provided is incorrect"));
- }
-
- switch (aServiceUid.iUid)
- {
- case KFirstServiceUid: if(!(string->Des().Compare(_L("Open"))))
- { iLog->Log(_L("GENERIC name is correct")); }
- else
- { iLog->Log(_L("GENERIC name is incorrect"));
- CleanupStack::PopAndDestroy(string); return ( KErrGeneral ); }
- break;
- case KSecondServiceUid: if(!(string->Des().Compare(_L("Upload"))))
- { iLog->Log(_L("GENERIC name is correct")); }
- else
- { iLog->Log(_L("GENERIC name is incorrect"));
- CleanupStack::PopAndDestroy(string); return ( KErrGeneral ); }
- break;
- case KThirdServiceUid: if(!(string->Des().Compare(_L("Print"))))
- { iLog->Log(_L("GENERIC name is correct")); }
- else
- { iLog->Log(_L("GENERIC name is incorrect"));
- CleanupStack::PopAndDestroy(string);return ( KErrGeneral ); }
- break;
- default : break;
- };
-
- CleanupStack::PopAndDestroy(string);
- return ( KErrNone );
-}
-
-
-// [End of File] - Do not remove
--- a/devmngt_pub/group/bld.inf Thu Dec 17 08:46:07 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,22 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Includes all the SDK API specific bld.inf files, which
-* export files.
-*
-*/
-
-
-
-
-
--- a/group/bld.inf Thu Dec 17 08:46:07 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,34 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Build information file for project settingsuis
-*
-*/
-
-
-// mw layer
-// Device management ADO
-
-//Components:
-
-//devmngt_plat
-#include "../devmngt_plat/group/bld.inf"
-
-//devmngt_pub
-#include "../devmngt_pub/group/bld.inf"
-
-#include "../defaultapplicationsettings/group/bld.inf"
-
-//systemswuis
-#include "../systemswuis/group/bld.inf"
-
--- a/layers.sysdef.xml Thu Dec 17 08:46:07 2009 +0200
+++ b/layers.sysdef.xml Fri Mar 19 09:29:29 2010 +0200
@@ -1,22 +1,14 @@
<?xml version="1.0"?>
-
-<!DOCTYPE SystemDefinition SYSTEM "sysdef_1_4_0.dtd" [
+<!DOCTYPE SystemDefinition SYSTEM "sysdef_1_5_1.dtd" [
<!ENTITY layer_real_source_path "sf/app/settingsuis" >
]>
-<SystemDefinition name="settingsuis" schema="1.4.0">
+<SystemDefinition name="settingsuis" schema="1.5.1">
<systemModel>
<layer name="app_layer">
- <module name="settingsuis">
- <unit name="settingsuis" unitID="presdo.settingsuis" bldFile="&layer_real_source_path;/group" mrp="" />
+ <module name="controlpanelui">
+ <unit unitID="controlpanelui" mrp="" bldFile="&layer_real_source_path;/controlpanelui" name="controlpanelui" proFile="controlpanelui.pro" qmakeArgs="-r -config rom"/>
</module>
</layer>
- <layer name="api_test_layer">
- <module name="settingsuis_test">
- <!--<unit unitID="presdo.settingsuis_test" mrp="" bldFile="&layer_real_source_path;/tsrc/group" name="settingsuis_test" />-->
- <unit unitID="presdo.settingsuis_test" mrp="" bldFile="&layer_real_source_path;/devmngt_plat/services_db_api/tsrc/ServicesDbApiTest/group" name="settingsuis_test" />
- </module>
- </layer>
</systemModel>
</SystemDefinition>
-
--- a/sysdef_1_4_0.dtd Thu Dec 17 08:46:07 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,86 +0,0 @@
- <!ELEMENT SystemDefinition (systemModel?, build?)>
- <!ATTLIST SystemDefinition
- name CDATA #REQUIRED
- schema CDATA #REQUIRED>
- <!ELEMENT systemModel (layer+)>
- <!ELEMENT layer (logicalset* | module*)*>
- <!ATTLIST layer
- name CDATA #REQUIRED
- levels CDATA #IMPLIED
- span CDATA #IMPLIED>
- <!ELEMENT logicalset (logicalsubset* | module* | unit* | package* | prebuilt*)*>
- <!ATTLIST logicalset name CDATA #REQUIRED>
- <!ELEMENT logicalsubset (module* | unit* | package* | prebuilt*)*>
- <!ATTLIST logicalsubset name CDATA #REQUIRED>
- <!ELEMENT module (component* | unit* | package* | prebuilt*)*>
- <!ATTLIST module
- name CDATA #REQUIRED
- level CDATA #IMPLIED>
- <!ELEMENT component (unit* | package* | prebuilt*)*>
- <!ATTLIST component name CDATA #REQUIRED>
- <!ELEMENT unit EMPTY>
- <!ATTLIST unit
- unitID ID #REQUIRED
- name CDATA #REQUIRED
- mrp CDATA #REQUIRED
- filter CDATA #IMPLIED
- bldFile CDATA #REQUIRED
- priority CDATA #IMPLIED
- contract CDATA #IMPLIED>
- <!ELEMENT package EMPTY>
- <!ATTLIST package
- name CDATA #REQUIRED
- mrp CDATA #REQUIRED
- filter CDATA #IMPLIED
- contract CDATA #IMPLIED>
- <!ELEMENT prebuilt EMPTY>
- <!ATTLIST prebuilt
- name CDATA #REQUIRED
- version CDATA #REQUIRED
- late (Y|N) #IMPLIED
- filter CDATA #IMPLIED
- contract CDATA #IMPLIED>
- <!ELEMENT build (option* | target+ | targetList+ | unitList+ | configuration+)*>
- <!ELEMENT unitList (unitRef+)>
- <!ATTLIST unitList
- name ID #REQUIRED
- description CDATA #REQUIRED>
- <!ELEMENT unitRef EMPTY>
- <!ATTLIST unitRef unit IDREF #REQUIRED>
- <!ELEMENT targetList EMPTY>
- <!ATTLIST targetList
- name ID #REQUIRED
- description CDATA #REQUIRED
- target IDREFS #REQUIRED>
- <!ELEMENT target EMPTY>
- <!ATTLIST target
- name ID #REQUIRED
- abldTarget CDATA #REQUIRED
- description CDATA #REQUIRED>
- <!ELEMENT option EMPTY>
- <!ATTLIST option
- name ID #REQUIRED
- abldOption CDATA #REQUIRED
- description CDATA #REQUIRED
- enable (Y | N | y | n) #REQUIRED>
- <!ELEMENT configuration (unitListRef+ | layerRef+ | task+)*>
- <!ATTLIST configuration
- name ID #REQUIRED
- description CDATA #REQUIRED
- filter CDATA #REQUIRED>
- <!ELEMENT task ( unitListRef* , (buildLayer | specialInstructions))>
- <!ELEMENT unitListRef EMPTY>
- <!ATTLIST unitListRef unitList IDREF #REQUIRED>
- <!ELEMENT layerRef EMPTY>
- <!ATTLIST layerRef layerName CDATA #REQUIRED>
- <!ELEMENT buildLayer EMPTY>
- <!ATTLIST buildLayer
- command CDATA #REQUIRED
- targetList IDREFS #IMPLIED
- unitParallel (Y | N | y | n) #REQUIRED
- targetParallel (Y | N | y | n) #IMPLIED>
- <!ELEMENT specialInstructions EMPTY>
- <!ATTLIST specialInstructions
- name CDATA #REQUIRED
- cwd CDATA #REQUIRED
- command CDATA #REQUIRED>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sysdef_1_5_1.dtd Fri Mar 19 09:29:29 2010 +0200
@@ -0,0 +1,88 @@
+ <!ELEMENT SystemDefinition (systemModel?, build?)>
+ <!ATTLIST SystemDefinition
+ name CDATA #REQUIRED
+ schema CDATA #REQUIRED>
+ <!ELEMENT systemModel (layer+)>
+ <!ELEMENT layer (logicalset* | module*)*>
+ <!ATTLIST layer
+ name CDATA #REQUIRED
+ levels CDATA #IMPLIED
+ span CDATA #IMPLIED>
+ <!ELEMENT logicalset (logicalsubset* | module* | unit* | package* | prebuilt*)*>
+ <!ATTLIST logicalset name CDATA #REQUIRED>
+ <!ELEMENT logicalsubset (module* | unit* | package* | prebuilt*)*>
+ <!ATTLIST logicalsubset name CDATA #REQUIRED>
+ <!ELEMENT module (component* | unit* | package* | prebuilt*)*>
+ <!ATTLIST module
+ name CDATA #REQUIRED
+ level CDATA #IMPLIED>
+ <!ELEMENT component (unit* | package* | prebuilt*)*>
+ <!ATTLIST component name CDATA #REQUIRED>
+ <!ELEMENT unit EMPTY>
+ <!ATTLIST unit
+ unitID ID #REQUIRED
+ name CDATA #REQUIRED
+ mrp CDATA #REQUIRED
+ filter CDATA #IMPLIED
+ bldFile CDATA #REQUIRED
+ priority CDATA #IMPLIED
+ contract CDATA #IMPLIED
+ proFile CDATA #IMPLIED
+ qmakeArgs CDATA #IMPLIED>
+ <!ELEMENT package EMPTY>
+ <!ATTLIST package
+ name CDATA #REQUIRED
+ mrp CDATA #REQUIRED
+ filter CDATA #IMPLIED
+ contract CDATA #IMPLIED>
+ <!ELEMENT prebuilt EMPTY>
+ <!ATTLIST prebuilt
+ name CDATA #REQUIRED
+ version CDATA #REQUIRED
+ late (Y|N) #IMPLIED
+ filter CDATA #IMPLIED
+ contract CDATA #IMPLIED>
+ <!ELEMENT build (option* | target+ | targetList+ | unitList+ | configuration+)*>
+ <!ELEMENT unitList (unitRef+)>
+ <!ATTLIST unitList
+ name ID #REQUIRED
+ description CDATA #REQUIRED>
+ <!ELEMENT unitRef EMPTY>
+ <!ATTLIST unitRef unit IDREF #REQUIRED>
+ <!ELEMENT targetList EMPTY>
+ <!ATTLIST targetList
+ name ID #REQUIRED
+ description CDATA #REQUIRED
+ target IDREFS #REQUIRED>
+ <!ELEMENT target EMPTY>
+ <!ATTLIST target
+ name ID #REQUIRED
+ abldTarget CDATA #REQUIRED
+ description CDATA #REQUIRED>
+ <!ELEMENT option EMPTY>
+ <!ATTLIST option
+ name ID #REQUIRED
+ abldOption CDATA #REQUIRED
+ description CDATA #REQUIRED
+ enable (Y | N | y | n) #REQUIRED>
+ <!ELEMENT configuration (unitListRef+ | layerRef+ | task+)*>
+ <!ATTLIST configuration
+ name ID #REQUIRED
+ description CDATA #REQUIRED
+ filter CDATA #REQUIRED>
+ <!ELEMENT task ( unitListRef* , (buildLayer | specialInstructions))>
+ <!ELEMENT unitListRef EMPTY>
+ <!ATTLIST unitListRef unitList IDREF #REQUIRED>
+ <!ELEMENT layerRef EMPTY>
+ <!ATTLIST layerRef layerName CDATA #REQUIRED>
+ <!ELEMENT buildLayer EMPTY>
+ <!ATTLIST buildLayer
+ command CDATA #REQUIRED
+ targetList IDREFS #IMPLIED
+ unitParallel (Y | N | y | n) #REQUIRED
+ targetParallel (Y | N | y | n) #IMPLIED>
+ <!ELEMENT specialInstructions EMPTY>
+ <!ATTLIST specialInstructions
+ name CDATA #REQUIRED
+ cwd CDATA #REQUIRED
+ command CDATA #REQUIRED>
--- a/systemswuis/group/bld.inf Thu Dec 17 08:46:07 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,19 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Build information file for project systemswuis
-*
-*/
-
-
-#include "../touchscreencalib/group/bld.inf"
--- a/systemswuis/touchscreencalib/PubSub/touchscprivatepskeys.h Thu Dec 17 08:46:07 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,46 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Private Publish&Subscribe definitions of the
-* Security UIs subsystem
-*
-*/
-
-
-#ifndef TOUCHSCPRIVATEPSKEYS_H
-#define TOUCHSCPRIVATEPSKEYS_H
-
-// INCLUDES
-
-//CONSTANTS
-
-// =============================================================================
-// Touch Screen Calibration API
-// =============================================================================
-
-/**
-* Touchscreen calibration P&S UID
-*/
-const TUid KPSUidTouchScreenCalibration = { 0x102828BC };
-
-/**
-* Wait a touchscreen calibration
-*/
-const TUint32 KPSTouchScreenCalibration = 0x00000000;
-enum TPSTouchScreenCalibration
- {
- ETouchScreenCalibrationWait,
- ETouchScreenCalibrationOk
- };
-
-#endif//TOUCHSCPRIVATEPSKEYS_H
--- a/systemswuis/touchscreencalib/aif/TouchScreenCalibaif.rss Thu Dec 17 08:46:07 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,31 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: RSS for creating the aif file for TouchScreenCalib.
-*
-*/
-
-
-// INCLUDES
-#include <aiftool.rh>
-
-RESOURCE AIF_DATA
-{
- app_uid = 0x102828BC;
- hidden = KAppIsHidden;
- num_icons = 0;
- embeddability = KAppNotEmbeddable;
- newfile = KAppDoesNotSupportNewFile;
-}
-
-// End of file
--- a/systemswuis/touchscreencalib/data/TouchScreenCalib.rss Thu Dec 17 08:46:07 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,55 +0,0 @@
-/*
-* Copyright (c) 2006 - 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-* This file contains all the resources for the module.
-*
-*/
-
-
-// RESOURCE IDENTIFIER
-NAME TSCA // 4 letter ID
-
-// INCLUDES
-#include <eikon.rh>
-#include <avkon.rsg>
-#include <avkon.rh>
-#include "touchscreencalib.loc"
-
-// CONSTANTS
-// -none
-
-// MACROS
-// -none
-
-// RESOURCE DEFINITIONS
-
-RESOURCE RSS_SIGNATURE { }
-
-RESOURCE TBUF { buf="touch_screen_calib"; }
-
-RESOURCE EIK_APP_INFO
- {
- status_pane = r_status_pane;
- }
-
-RESOURCE STATUS_PANE_APP_MODEL r_status_pane
- {
- layout= R_AVKON_STATUS_PANE_LAYOUT_EMPTY;
- }
-
-RESOURCE TBUF r_qtn_touch_screen_cali_instr_can { buf = qtn_touch_screen_cali_instr_can; }
-RESOURCE TBUF r_qtn_touch_screen_cali_instr_res { buf = qtn_touch_screen_cali_instr_res; }
-RESOURCE TBUF r_qtn_touch_screen_cali_instr_gen { buf = qtn_touch_screen_cali_instr_gen; }
-RESOURCE TBUF r_qtn_touch_screen_cali_cancel { buf = qtn_touch_screen_cali_cancel; }
-RESOURCE TBUF r_qtn_touch_screen_cali_done { buf = qtn_touch_screen_cali_done; }
--- a/systemswuis/touchscreencalib/data/TouchScreenCalib_anim.rss Thu Dec 17 08:46:07 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,70 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: It contains resources for Touch Screen Calibration tap target
-* animation
-*
-*/
-
-
-// RESOURCE IDENTIFIER
-NAME TSAN
-
-// INCLUDES
-#include <uikon.rh>
-#include <avkon.rh>
-#include <touchscreencalib.mbg>
-
-// RESOURCE DEFINITIONS
-
-RESOURCE RSS_SIGNATURE { }
-
-STRUCT ANIM_DURATION
- {
- WORD time;
- }
-
-RESOURCE ANIM_DURATION r_anim_duration
- {
- time = 0; //milliseconds
- }
-
-RESOURCE BMPANIM_DATA r_shutdown_anim
- {
- frameinterval = 200;
-
- playmode = EAknBitmapAnimationPlayModeCycle;
-
- bmpfile = "z:\\resource\\apps\\touchscreencalib.mbm";
-
- frames = r_target_frames;
- }
-
-RESOURCE ARRAY r_target_frames
- {
- items =
- {
- BMPANIM_FRAME { bmpid = EMbmTouchscreencalibQgn_graf_screencalib_1;
- maskid = EMbmTouchscreencalibQgn_graf_screencalib_1_mask; },
- BMPANIM_FRAME { bmpid = EMbmTouchscreencalibQgn_graf_screencalib_2;
- maskid = EMbmTouchscreencalibQgn_graf_screencalib_2_mask; },
- BMPANIM_FRAME { bmpid = EMbmTouchscreencalibQgn_graf_screencalib_3;
- maskid = EMbmTouchscreencalibQgn_graf_screencalib_3_mask; },
- BMPANIM_FRAME { bmpid = EMbmTouchscreencalibQgn_graf_screencalib_4;
- maskid = EMbmTouchscreencalibQgn_graf_screencalib_4_mask; },
- BMPANIM_FRAME { bmpid = EMbmTouchscreencalibQgn_graf_screencalib_5;
- maskid = EMbmTouchscreencalibQgn_graf_screencalib_5_mask; }
- };
- }
-
-// End of File
--- a/systemswuis/touchscreencalib/data/TouchScreenCalib_reg.rss Thu Dec 17 08:46:07 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,27 +0,0 @@
-/*
-* Copyright (c) 2006 - 2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: RSS for creating the registration file for TouchScreenCalib.
-*
-*/
-
-
-#include <appinfo.rh>
-
-UID2 KUidAppRegistrationResourceFile
-UID3 0x102828BC // application UID
-RESOURCE APP_REGISTRATION_INFO
- {
- app_file="TouchScreenCalib"; // filename of application binary (minus extension)
- hidden = KAppIsHidden;
- }
--- a/systemswuis/touchscreencalib/group/TouchScreenCalib.mmp Thu Dec 17 08:46:07 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,82 +0,0 @@
-/*
-* Copyright (c) 2006 - 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-* This is project specification file for the TouchScreenCalib.
-*
-*/
-
-
-#include <data_caging_paths.hrh>
-#include <platform_paths.hrh>
-
-TARGET touchscreencalib.exe
-TARGETTYPE exe
-UID 0x0 0x102828BC
-EPOCSTACKSIZE 0x5000
-
-VENDORID VID_DEFAULT
-CAPABILITY CAP_APPLICATION
-
-SOURCEPATH ../src
-
-SOURCE TouchScreenCalibApplication.cpp
-SOURCE TouchScreenCalibAppUi.cpp
-SOURCE TouchScreenCalibDocument.cpp
-SOURCE TouchScreenCalibView.cpp
-SOURCE TouchScreenCalibPubSubObserver.cpp
-SOURCE TouchScreenCalibSubscriber.cpp
-
-START RESOURCE ../data/TouchScreenCalib.rss
-TARGETPATH APP_RESOURCE_DIR
-HEADER
-LANGUAGE_IDS
-END // RESOURCE
-
-START RESOURCE ../data/TouchScreenCalib_anim.rss
-HEADER
-TARGETPATH APP_RESOURCE_DIR
-END // RESOURCE
-
-START RESOURCE ../data/TouchScreenCalib_reg.rss
-HEADER
-TARGETPATH /private/10003a3f/apps
-END
-
-USERINCLUDE . ../inc ../data
-USERINCLUDE ../../inc
-APP_LAYER_SYSTEMINCLUDE
-
-LIBRARY euser.lib
-LIBRARY apparc.lib
-LIBRARY cone.lib
-LIBRARY avkon.lib
-LIBRARY eikdlg.lib
-LIBRARY eikcore.lib
-LIBRARY efsrv.lib
-LIBRARY fbscli.lib
-LIBRARY commonengine.lib //use of SharedData
-LIBRARY ws32.lib
-LIBRARY aknnotify.lib //AknGlobalNote
-LIBRARY apgrfx.lib //
-LIBRARY egul.lib //DrawUtils
-LIBRARY bafl.lib
-LIBRARY aknskins.lib //for skin background
-LIBRARY cdlengine.lib //for scalable ui
-LIBRARY gdi.lib
-LIBRARY aknlayout2scalable.lib
-LIBRARY aknicon.lib
-LIBRARY centralrepository.lib
-LIBRARY starterclient.lib //use of Starter to remove splash screen
-LIBRARY touchfeedback.lib
-
--- a/systemswuis/touchscreencalib/group/bld.inf Thu Dec 17 08:46:07 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,48 +0,0 @@
-/*
-* Copyright (c) 2006 - 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: This file provides the information required for building the
-* whole of a TouchScreenCalib.
-*
-*/
-
-#include <platform_paths.hrh>
-
-PRJ_PLATFORMS
-DEFAULT
-
-PRJ_EXPORTS
-../loc/touchscreencalib.loc APP_LAYER_LOC_EXPORT_PATH(touchscreencalib.loc)
-../rom/TouchScreenCalib.iby CORE_APP_LAYER_IBY_EXPORT_PATH(touchscreencalib.iby)
-../rom/TouchScreenCalib_variant.iby CUSTOMER_APP_LAYER_IBY_EXPORT_PATH(touchscreencalib_variant.iby)
-../rom/TouchScreenCalibResources.iby LANGUAGE_APP_LAYER_IBY_EXPORT_PATH(touchscreencalibresources.iby)
-../PubSub/touchscprivatepskeys.h |../../inc/touchscprivatepskeys.h
-
-PRJ_MMPFILES
-
-TouchScreenCalib.mmp
-../tscstartupextensionplugin/group/tscstartupextensionplugin.mmp
-../tsccustcmds/group/tsccustcmds.mmp
-
-PRJ_EXTENSIONS
-
-START EXTENSION s60/mifconv
-OPTION TARGETFILE touchscreencalib.mif
-OPTION HEADERFILE touchscreencalib.mbg
-OPTION SOURCES -c16,8 Qgn_graf_screencalib \
- -c16,8 Qgn_graf_screencalib_1 \
- -c16,8 Qgn_graf_screencalib_2 \
- -c16,8 Qgn_graf_screencalib_3 \
- -c16,8 Qgn_graf_screencalib_4 \
- -c16,8 Qgn_graf_screencalib_5
-END
--- a/systemswuis/touchscreencalib/group/touchscreencalib_icons.mk Thu Dec 17 08:46:07 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,75 +0,0 @@
-#
-# Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of "Eclipse Public License v1.0""
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description: Icons makefile for project touchscreencalib
-#
-
-ifeq (WINS,$(findstring WINS, $(PLATFORM)))
-ZDIR=\epoc32\release\$(PLATFORM)\$(CFG)\z
-else
-ZDIR=\epoc32\data\z
-endif
-
-# ----------------------------------------------------------------------------
-# : Configure these
-# ----------------------------------------------------------------------------
-
-TARGETDIR=$(ZDIR)\resource\apps
-HEADERDIR=\epoc32\include
-ICONTARGETFILENAME=$(TARGETDIR)\touchscreencalib.mif
-HEADERFILENAME=$(HEADERDIR)\touchscreencalib.mbg
-
-do_nothing :
- @rem do_nothing
-
-MAKMAKE : do_nothing
-
-BLD : do_nothing
-
-CLEAN : do_nothing
-
-LIB : do_nothing
-
-CLEANLIB : do_nothing
-
-# ----------------------------------------------------------------------------
-# : Configure these.
-#
-# NOTE 1: DO NOT DEFINE MASK FILE NAMES! They are included automatically by
-# MifConv if the mask detph is defined.
-#
-# NOTE 2: Usually, source paths should not be included in the bitmap
-# definitions. MifConv searches for the icons in all icon directories in a
-# predefined order, which is currently \s60\icons, \s60\bitmaps2.
-# The directory \s60\icons is included in the search only if the feature flag
-# __SCALABLE_ICONS is defined.
-# ----------------------------------------------------------------------------
-
-RESOURCE :
- mifconv $(ICONTARGETFILENAME) /h$(HEADERFILENAME) \
- /c16,8 Qgn_graf_screencalib \
- /c16,8 Qgn_graf_screencalib_1 \
- /c16,8 Qgn_graf_screencalib_2 \
- /c16,8 Qgn_graf_screencalib_3 \
- /c16,8 Qgn_graf_screencalib_4 \
- /c16,8 Qgn_graf_screencalib_5
-
-FREEZE : do_nothing
-
-SAVESPACE : do_nothing
-
-RELEASABLES :
- @echo $(HEADERFILENAME)&& \
- @echo $(ICONTARGETFILENAME)
-
-FINAL : do_nothing
--- a/systemswuis/touchscreencalib/inc/MTouchScreenCalibPropertyResponder.h Thu Dec 17 08:46:07 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,32 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Interface of Touch screen calibration property change obsever
-*
-*/
-
-
-#ifndef MTOUCHSCREENCALIBPROPERTYRESPONDER_H
-#define MTOUCHSCREENCALIBPROPERTYRESPONDER_H
-
-// INCLUDES
-#include <e32base.h>
-
-class MTouchScreenCalibPropertyResponder
- {
-public:
- virtual void HandlePropertyChangedL( const TUid& aCategory, TUint aKey ) = 0;
- };
-#endif //MTOUCHSCREENCALIBPROPERTYRESPONDER_H
-
-// End of File
--- a/systemswuis/touchscreencalib/inc/TouchScreenCalibAppUi.h Thu Dec 17 08:46:07 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,202 +0,0 @@
-/*
-* Copyright (c) 2006 - 2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: AppUi class of the application.
-*
-*/
-
-
-#ifndef TOUCHSCREENCALIBAPPUI_H
-#define TOUCHSCREENCALIBAPPUI_H
-
-// SYSTEM INCLUDES
-#include <aknappui.h>
-#include <coecntrl.h>
-#include <StringLoader.h>
-#include <aknPopup.h>
-#include <aknlists.h>
-#include <badesca.h>
-#include <AknDef.h>
-#include <e32hal.h>
-
-// CONSTANTS
-const TInt KConvertGetCase = 0;
-const TInt KConvertSaveCase = 1;
-
-const TInt KUnknownOrientation = 0;
-const TInt KPortraitOrientation = 1;
-const TInt KLandscapeOrientation = 2;
-
-// FORWARD DECLARATIONS
-class TTouchScreenCalibLayout
- {
-public:
- TAknLayoutRect iAnimImageLayout1;
- TAknLayoutRect iAnimImageLayout2;
- TAknLayoutRect iAnimImageLayout3;
- TAknLayoutRect iAnimImageLayout4;
- };
-
-class CTouchScreenCalibView;
-class CTouchScreenCalibPubSubObserver;
-/**
-* 'AppUi' class.
-*
-*/
-class CTouchScreenCalibAppUi : public CAknAppUi, CCoeControl
-{
- public: // Constructors and destructor
-
- /**
- * C++ default constructor.
- */
- CTouchScreenCalibAppUi();
-
- /**
- * Destructor.
- */
- ~CTouchScreenCalibAppUi();
-
- // from CCoeAppUiBase
- void PrepareToExit();
-
- /**
- * Handles key events
- * @param TKeyEvent key event
- * @param TEventCode event code
- * @since S60 3.2
- */
- void HandleKeyL( const TKeyEvent& aKeyEvent, TEventCode aType );
-
- /**
- * Handles pointer events
- * @param TPoint co-ordinates
- * @since S60 3.2
- */
- void HandlePointerL( TPoint aPos );
-
- /**
- * Check current point number
- * @since S60 3.2
- * @return TInt, point number
- */
- TInt GetCalibrationStep();
-
- /**
- * Get rect of current tap animation or image
- * @since S60 3.2
- * @param TInt, point number
- * @return TRect, animation or image rect.
- */
- TRect GetAnimImageRect(TInt aPointNumber = 0);
-
- /**
- * From CAknAppUi, called when screen layout changes
- */
- void HandleScreenDeviceChangedL();
-
- /**
- * Check if first boot is going on
- * @since S60 3.2
- * @return. ETrue if first boot, otherwise EFalse
- */
- TBool FirstBoot();
-
- protected:
- /*
- * Handles changes to the application when it
- * switches to or from the foreground.
- */
- virtual void HandleForegroundEventL(TBool aForeground);
-
- private:
- /**
- * EPOC default constructor.
- */
- void ConstructL();
-
- /**
- * Update display
- * @since S60 3.2
- */
- void UpdateL();
-
- /**
- * Checks layout orientation
- * @since S60 3.2
- * @return TBool. ETrue if orientation same in driver native level and window level
- */
- TBool IsCorrectOrientation(TRect aRect);
-
- /**
- * Convert calibration or tapped points to different layout orientation
- * @since S60 3.2
- * @param Points
- * @param Convert case.
- * @return Calibration points. KConvertGetCase or KConvertSaveCase.
- */
- TDigitizerCalibration ConvertToCorrectOrientation(TDigitizerCalibration aPoints,
- TInt aConvertCase);
- /**
- * Get calibration points
- * @since S60 3.2
- * @return Calibration points
- */
- TDigitizerCalibration CalibrationPoints();
-
- /**
- * Change to next calibration point
- * @since S60 3.2
- */
- void NextCalibrationStepL();
-
- /**
- * Saves calibration
- * @since S60 3.2
- */
- void SaveCalibration();
-
- /**
- * Restart calibration at first point
- * @since S60 3.2
- */
- void ResetCalibrationStepsL();
-
- /**
- * Sets tap points to 0 values
- * @since S60 3.2
- */
- void ResetTapPoints();
-
- TDigitizerCalibration ChangeOrientation(TDigitizerCalibration aSourcePoints,
- TPoint aDestReso);
-
-
- void SetOrientation();
-
- private: //Data
- CTouchScreenCalibView* iTouchScreenCalibView; //owns
- CTouchScreenCalibPubSubObserver* iTouchScreenCalibPubSubObserver; //owns
- TDigitizerCalibration iCalibrationPoints;
- TDigitizerCalibration iTapPoints;
- TInt iCurrentCalibrationStep;
- TBool iExitting;
- TTouchScreenCalibLayout iTouchScreenCalibLayout;
- TBool iCalibrationDone;
- TInt iNativeOrientation;
- TBool iCalibrationCancel;
-};
-
-#endif // TOUCHSCREENCALIBAPPUI_H
-
-// End of file
--- a/systemswuis/touchscreencalib/inc/TouchScreenCalibApplication.h Thu Dec 17 08:46:07 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,51 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Application class of the module.
-*
-*/
-
-
-
-#ifndef TOUCHSCREENCALIBAPPLICATION_H
-#define TOUCHSCREENCALIBAPPLICATION_H
-
-// SYSTEM INCLUDES
-#include <aknapp.h>
-
-// CONSTANTS
-const TUid KUidTouchScreenCalib = { 0x102828BC };
-
-// CLASS DECLARATION
-
-/**
-* CTouchScreenCalibApp application class.
-*/
-class CTouchScreenCalibApplication : public CAknApplication
- {
- private: // from CApaApplication
- /**
- * Create CTouchScreenCalibDocument document object.
- */
- CApaDocument* CreateDocumentL();
-
- /**
- * Return KUidTouchScreenCalib.
- */
- TUid AppDllUid() const;
- };
-
-#endif // TOUCHSCREENCALIBAPPLICATION_H
-
-// End of file
-
--- a/systemswuis/touchscreencalib/inc/TouchScreenCalibDefines.h Thu Dec 17 08:46:07 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,44 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Includes some common defines used in the TouchScreenCalib application
-*
-*/
-
-
-#ifndef TOUCHSCREENCALIBDEFINES_H
-#define TOUCHSCREENCALIBDEFINES_H
-
-//CONSTANTS
-_LIT( KTouchScreenCalibAppName, "TouchScreenCalib" );
-
-// MACROS
-
-#define PANIC(aPanic) User::Panic( KTouchScreenCalibAppName, aPanic )
-
-#define TRACE_ADDPREFIX(aText) (TPtrC((const TText *)L"TouchScreenCalibApp: \"" L##aText L"\""))
-
-#ifdef _DEBUG
-#define TRACES(aMsg) RDebug::Print( TRACE_ADDPREFIX(aMsg) )
-#define TRACES1(aFormat,aP1) RDebug::Print( TRACE_ADDPREFIX(aFormat),(aP1) )
-#define TRACES2(aFormat,aP1,aP2) RDebug::Print( TRACE_ADDPREFIX(aFormat),(aP1),(aP2) )
-#define TRACES3(aFormat,aP1,aP2,aP3) RDebug::Print( TRACE_ADDPREFIX(aFormat),(aP1),(aP2),(aP3) )
-#else
-#define TRACES(aMsg)
-#define TRACES1(aFormat,aP1)
-#define TRACES2(aFormat,aP1,aP2)
-#define TRACES3(aFormat,aP1,aP2,aP3)
-#endif
-#endif // TOUCHSCREENCALIBDEFINES_H
-
-// End of File
--- a/systemswuis/touchscreencalib/inc/TouchScreenCalibDocument.h Thu Dec 17 08:46:07 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,80 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Document class of the module.
-*
-*/
-
-
-
-#ifndef TOUCHSCREENCALIBDOCUMENT_H
-#define TOUCHSCREENCALIBDOCUMENT_H
-
-// SYSTEM INCLUDES
-#include <AknDoc.h>
-
-// FORWARD DECLARATIONS
-class CEikAppUi;
-
-// CLASS DECLARATION
-
-/**
-* CTouchScreenCalibDocument application class.
-*/
-class CTouchScreenCalibDocument : public CAknDocument
-{
- public:
-
- /**
- * C++ default constructor.
- */
- CTouchScreenCalibDocument(CEikApplication& aApp): CAknDocument(aApp) { }
-
- /**
- * Two-phased constructor.
- */
- static CTouchScreenCalibDocument* NewL(CEikApplication& aApp);
-
- /**
- * Destructor.
- */
- virtual ~CTouchScreenCalibDocument();
-
- private:
- /**
- * EPOC default constructor.
- */
- void ConstructL();
-
- /**
- * This method makes an application hidden so that it is not visible
- * for example in Applications list and FastSwap window.
- * @param CApaWindowGroupName* aWgName
- * @return void
- */
- void UpdateTaskNameL( CApaWindowGroupName* aWgName );
-
- private:// from CEikDocument
-
- /**
- * Create CTouchScreenCalibAppUi object.
- */
- CEikAppUi* CreateAppUiL();
-
- private:// data
-
-};
-
-#endif
-
-//End of file
--- a/systemswuis/touchscreencalib/inc/TouchScreenCalibPubSubObserver.h Thu Dec 17 08:46:07 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,75 +0,0 @@
-/*
-* Copyright (c) 2007 - 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-* This class the handles the received indications from the Public and
-* Subscribe.
-*
-*/
-
-
-#ifndef TOUCHSCREENCALIBPUBSUBOBSERVER_H
-#define TOUCHSCREENCALIBPUBSUBOBSERVER_H
-
-// INCLUDES
-#include <e32property.h>
-#include "MTouchScreenCalibPropertyResponder.h"
-#include "TouchScreenCalibAppUi.h"
-
-// CLASS DECLARATION
-class CTouchScreenCalibAppUi;
-class CTouchScreenCalibSubscriber;
-
-class CTouchScreenCalibPubSubObserver : public CBase, public MTouchScreenCalibPropertyResponder
- {
- public: // Constructors and destructor
-
- /**
- * C++ constructor.
- */
- CTouchScreenCalibPubSubObserver( CTouchScreenCalibAppUi* aTouchScreenCalibAppUi );
-
- /**
- * Two-phased constructor.
- */
- static CTouchScreenCalibPubSubObserver* NewL( CTouchScreenCalibAppUi* aTouchScreenCalibAppUi );
-
- /**
- * Destructor.
- */
- ~CTouchScreenCalibPubSubObserver();
-
- private:
-
- /**
- * By default EPOC constructor is private.
- */
- void ConstructL();
-
- CTouchScreenCalibPubSubObserver();
-
- protected: // From MTouchScreenCalibPropertyResponder
-
- void HandlePropertyChangedL( const TUid& aCategory, TUint aKey );
-
- private: // Data
- //reference to application class
- CTouchScreenCalibAppUi* iTouchScreenCalibAppUi; //uses
- RProperty iProperty;
- CTouchScreenCalibSubscriber* iGlobalSWStateSubscriber;
- CTouchScreenCalibSubscriber* iTsyCallState;
- };
-
-#endif // TOUCHSCREENCALIBPUBSUBOBSERVER_H
-
-// End of File
--- a/systemswuis/touchscreencalib/inc/TouchScreenCalibSubscriber.h Thu Dec 17 08:46:07 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,91 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: TouchScreenCalibSubscriber (Publish & Subscribe).
-*
-*/
-
-
-#ifndef TOUCHSCREENCALIBSUBSCRIBER_H
-#define TOUCHSCREENCALIBSUBSCRIBER_H
-
-// INCLUDES
-#include <e32base.h>
-#include <e32property.h>
-#include "MTouchScreenCalibPropertyResponder.h"
-
-// CLASS DECLARATION
-/**
-* CTouchScreenCalibSubscriber
-*
-* @lib
-* @since 3.2
-*/
-
-class CTouchScreenCalibSubscriber : public CActive
-{
-public:
- /**
- * Two-phased constructor.
- */
- static CTouchScreenCalibSubscriber* NewL( MTouchScreenCalibPropertyResponder& aTouchScreenCalibPropertyResponder,
- const TUid& aCategory,
- TUint aKey );
-
- /**
- * Destructor.
- */
- ~CTouchScreenCalibSubscriber();
-
- void Subscribe();
-
-private:
- CTouchScreenCalibSubscriber( MTouchScreenCalibPropertyResponder& aTouchScreenCalibPropertyResponder,
- const TUid& aCategory, TUint
- aKey );
- void ConstructL();
-
-public: // from CActive
- /**
- * @param none
- * @return none
- */
- void RunL();
-
- /**
- * @param aError the error returned
- * @return error
- */
- TInt RunError( TInt aError );
-
- /**
- * @param none
- * @return none
- */
- void DoCancel();
-
-private: // Methods not implemented
- CTouchScreenCalibSubscriber( const CTouchScreenCalibSubscriber& ); // Copy constructor
- CTouchScreenCalibSubscriber& operator=( const CTouchScreenCalibSubscriber& );// Assigment operator
-
-private:
-
- MTouchScreenCalibPropertyResponder& iTouchScreenCalibPropertyResponder;
- RProperty iProperty;
- TUid iCategory;
- TUint iKey;
-};
-
-#endif // TOUCHSCREENCALIBSUBSCRIBER_H
-
-// End of File
--- a/systemswuis/touchscreencalib/inc/TouchScreenCalibView.h Thu Dec 17 08:46:07 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,215 +0,0 @@
-/*
-* Copyright (c) 2006 - 2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-* This class is the container class of the CTouchScreenCalibView.
-* Is used to show tap target animation.
-*
-*/
-
-
-
-#ifndef TOUCHSCREENCALIBVIEW_H
-#define TOUCHSCREENCALIBVIEW_H
-
-// SYSTEM INCLUDES
-#include <coecntrl.h>
-#include <data_caging_path_literals.hrh>
-
-#include <touchfeedback.h>
-// USER INCLUDES
-#include "TouchScreenCalibAppUi.h"
-
-// CONSTANTS
-
-// FORWARD DECLARATIONS
-class TCalibAnimImageRect
- {
-public:
- TRect iAnimImageRect1;
- TRect iAnimImageRect2;
- TRect iAnimImageRect3;
- TRect iAnimImageRect4;
- };
-
-class CTouchScreenCalibAppUi;
-class CAknBitmapAnimation;
-
-// CLASS DECLARATION
-
-/**
-* This class takes care of showing welcome animatio to the user.
-*/
-class CTouchScreenCalibView : public CCoeControl , public MCoeControlObserver
- {
- public: // Constructors and destructor
-
- /**
- * C++ default constructor.
- */
- CTouchScreenCalibView( CTouchScreenCalibAppUi* aTouchScreenCalibAppUi );
-
- /**
- * Two-phased constructor.
- */
- static CTouchScreenCalibView* NewL( CTouchScreenCalibAppUi* aTouchScreenCalibAppUi );
-
- /**
- * Destructor
- */
- ~CTouchScreenCalibView();
-
- /**
- * This handles the key events in this control.
- */
- TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType);
-
- /**
- * Update UI
- */
- void UpdateL( TAknLayoutText aTextLayout );
-
- /**
- * Prepare to draw background for ending phase
- */
- void DrawEndingBackground();
-
- /**
- * Prepare to draw background for notes
- */
- void EndTargetAnimation();
-
- /**
- * This makes the animation module to stop showing animation.
- */
- void EndAnimation();
-
- /**
- *
- */
- void SetTextL(TAknLayoutText aTextLayout);
-
- /**
- *
- */
- void SetWinPriority(TInt aPriority);
-
- private:
-
- /**
- * By default EPOC constructor is private.
- */
- void ConstructL();
-
- CTouchScreenCalibView();
-
- /**
- * Is called when size is changed.
- */
- void SizeChanged();
-
- /**
- * Returns the count of the components in the container.
- */
- TInt CountComponentControls() const;
-
- /**
- * Returns the component specified by aIndex parameter.
- */
- CCoeControl* ComponentControl(TInt aIndex) const;
-
- /**
- * Handles the event of the control.
- */
- void HandleControlEventL(CCoeControl* aControl,TCoeEvent aEventType);
-
- /**
- * Handles key events.
- * @param aKeyEvent Event to be handled
- * @param aType Type of the key event
- * @return TKeyResponse
- */
- virtual TKeyResponse HandleKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType);
-
- /**
- * Handles pointer events
- */
- virtual void HandlePointerEventL(const TPointerEvent& aPointerEvent);
-
- /**
- * Checks tapped point's validity
- * @param TPoint co-ordinates
- * @since S60 3.2
- */
- TBool Validate(TPoint aPos);
-
- /**
- * Draw white background
- * @since S60 3.2
- */
- void DrawBackground() const;
-
- /**
- * Draw texts
- * @since S60 3.2
- */
- void DrawText() const;
-
- /**
- * Draw inactive tap points
- * @since S60 3.2
- */
- void ShowImage( TRect aRect ) const;
-
- private: // Functions from base classes
-
- /**
- * From CCoeControl
- */
- void Draw( const TRect& aRect ) const;
-
- protected: // Data
-
- //Used for showing animation
- CAknBitmapAnimation *iAnim; //owns
-
- CFbsBitmap *iBitmap;
- CFbsBitmap *iBitmapMask;
-
- CTouchScreenCalibAppUi* iTouchScreenCalibAppUi; //uses
-
- //used for telling when the animation is showing
- TBool iAnimationShowing;
-
- //used for telling if animation is cancelled by user.
- TBool iAnimationCancelled;
-
- const CFont* iFont; // not owned
-
- CArrayPtr<HBufC>* iText;
-
-
- TCalibAnimImageRect iAnimImageRect;
-
- TPoint iTextTopLeft;
- TSize iTextSize;
- TInt iTextBaselineOffset;
- TRgb iTextColor;
- CGraphicsContext::TTextAlign iTextAlignment;
- TBool iCalibrationCompleted;
- MTouchFeedback* iTouchFeedback;
- };
-
-#endif // TOUCHSCREENCALIBVIEW_H
-
-// End of File
--- a/systemswuis/touchscreencalib/loc/touchscreencalib.loc Thu Dec 17 08:46:07 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,59 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Localization strings for TouchScreenCalib
-*
-*/
-
-
-// LOCALISATION STRINGS
-
-//d:Asks user to tap center of the target with stylus.
-//l:main_touch_calib_pane_t1
-//w:
-//r:3.2
-//
-#define qtn_touch_screen_cali_instr_gen "Touch screen calibration step %N of 4: Use stylus to tap center of target."
-
-//d:Used to tell user that pressing Send key cancels calibration and exits application.
-//d:This is used when TouchScreenCalib application is started from General Settings by user.
-//l:main_touch_calib_pane_t2
-//w:
-//r:3.2
-//
-#define qtn_touch_screen_cali_instr_can "To cancel press Send key."
-
-//d:Used to tell user that pressing Send key resets calibration and calibration
-//d:begins again from point 1. This is used when TouchScreenCalib application is
-//d:started when the phone is starter for the first time.
-//l:main_touch_calib_pane_t2
-//w:
-//r:3.2
-//
-#define qtn_touch_screen_cali_instr_res "To start again from point 1 press Send key."
-
-//d:This Information Note is displayed if user cancels calibration with Send key press.
-//l:popup_note_window/opt2
-//w:
-//r:5.0
-//
-#define qtn_touch_screen_cali_cancel "Calibration cancelled."
-
-//d:This Confirmation Note is dipslayed when calibration is done succesfully.
-//l:popup_note_window/opt2
-//w:
-//r:3.2
-//
-#define qtn_touch_screen_cali_done "Calibration successful!"
-
-// End of File
--- a/systemswuis/touchscreencalib/rom/TouchScreenCalib.iby Thu Dec 17 08:46:07 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,32 +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 part of the standard application framework.
-* The application gets instantiated starting from this class.
-* Provides a factory method for instantiating the document object.
-*
-*/
-#ifndef __TOUCHSCREENCALIB_IBY__
-#define __TOUCHSCREENCALIB_IBY__
-
-#if defined (__PEN_SUPPORT) && defined(__PEN_SUPPORT_CALIBRATION)
-S60_APP_EXE(TouchScreenCalib)
-S60_APP_AIF_RSC(TouchScreenCalib)
-#endif
-#if ( defined FF_TOUCHSCREENCALIB_IN_STARTUP && defined __PEN_SUPPORT && defined __PEN_SUPPORT_CALIBRATION )
-ECOM_PLUGIN( tscstartupextensionplugin.dll, tscstartupextensionplugin.rsc )
-file=ABI_DIR\BUILD_DIR\tsccustcmds.dll SHARED_LIB_DIR\tsccustcmds.dll
-#endif //FF_TOUCHSCREENCALIB_IN_STARTUP
-
-#endif
--- a/systemswuis/touchscreencalib/rom/TouchScreenCalibResources.iby Thu Dec 17 08:46:07 2009 +0200
+++ /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:
-* This class is a part of the standard application framework.
-* The application gets instantiated starting from this class.
-* Provides a factory method for instantiating the document object.
-*
-*/
-
-#ifndef __TOUCHSCREENCALIB_RESOURCES_IBY__
-#define __TOUCHSCREENCALIB_RESOURCES_IBY__
-
-#if defined (RD_SCALABLE_UI_V2) && defined(__PEN_SUPPORT) && defined(__PEN_SUPPORT_CALIBRATION)
-S60_APP_RESOURCE(TouchScreenCalib)
-#endif
-
-#endif
\ No newline at end of file
--- a/systemswuis/touchscreencalib/rom/TouchScreenCalib_variant.iby Thu Dec 17 08:46:07 2009 +0200
+++ /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:
-* This class is a part of the standard application framework.
-* The application gets instantiated starting from this class.
-* Provides a factory method for instantiating the document object.
-*
-*/
-
-#ifndef __TOUCHSCREENCALIB_VARIANT_IBY__
-#define __TOUCHSCREENCALIB_VARIANT_IBY__
-
-#if defined (RD_SCALABLE_UI_V2) && defined(__PEN_SUPPORT) && defined(__PEN_SUPPORT_CALIBRATION)
-SCALABLE_IMAGE(APP_BITMAP_DIR,APP_BITMAP_DIR,TouchScreenCalib)
-S60_APP_RESOURCE(TouchScreenCalib_anim)
-#endif
-
-#endif
\ No newline at end of file
--- a/systemswuis/touchscreencalib/src/TouchScreenCalibAppUi.cpp Thu Dec 17 08:46:07 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,722 +0,0 @@
-/*
-* Copyright (c) 2006 - 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: AppUi class of the application.
-*
-*/
-
-
-// SYSTEM INCLUDES
-#include <aknnotewrappers.h>
-#include <TouchScreenCalib.rsg>
-#include <e32property.h>
-#ifdef RD_STARTUP_ANIMATION_CUSTOMIZATION
-#include "touchscprivatepskeys.h"
-#else //RD_STARTUP_ANIMATION_CUSTOMIZATION
-#include <StartupAppInternalPSKeys.h>
-#endif //RD_STARTUP_ANIMATION_CUSTOMIZATION
-#include <aknlayoutscalable_apps.cdl.h>
-#include <layoutmetadata.cdl.h>
-#include <centralrepository.h>
-#include <starterdomaincrkeys.h>
-#include <starterclient.h> //used for RemoveSplashScreen
-
-// USER INCLUDES
-#include "TouchScreenCalibApplication.h"
-#include "TouchScreenCalibAppUi.h"
-#include "TouchScreenCalibDefines.h"
-#include "TouchScreenCalibDocument.h"
-#include "TouchScreenCalibView.h"
-#include "TouchScreenCalibPubSubObserver.h"
-
-// CONSTANTS
-
-_LIT_SECURITY_POLICY_C1(KReadDeviceDataPolicy, ECapabilityReadDeviceData);
-_LIT_SECURITY_POLICY_C1(KWriteDeviceDataPolicy, ECapabilityWriteDeviceData);
-
-// ================= MEMBER FUNCTIONS =======================
-//
-// ----------------------------------------------------
-// CTouchScreenCalibAppUi::CTouchScreenCalibAppUi()
-// ----------------------------------------------------
-CTouchScreenCalibAppUi::CTouchScreenCalibAppUi():
- iTouchScreenCalibPubSubObserver( NULL ),
- iCurrentCalibrationStep( 0 ),
- iExitting( EFalse ),
- iCalibrationDone( EFalse ),
- iCalibrationCancel( EFalse )
- {
- TRACES("CTouchScreenCalibAppUi::CTouchScreenCalibAppUi");
- iNativeOrientation = KUnknownOrientation;
- }
-
-// ----------------------------------------------------
-// CTouchScreenCalibAppUi::ConstructL()
-// ----------------------------------------------------
-void CTouchScreenCalibAppUi::ConstructL()
- {
- TRACES("CTouchScreenCalibAppUi::ConstructL()");
- TInt flags = EStandardApp|EAknEnableSkin;
-
- BaseConstructL(flags);
-
-#ifdef RD_STARTUP_ANIMATION_CUSTOMIZATION
- RProperty::Define(KPSUidTouchScreenCalibration,
-#else //RD_STARTUP_ANIMATION_CUSTOMIZATION
- RProperty::Define(KPSUidStartup,
-#endif //RD_STARTUP_ANIMATION_CUSTOMIZATION
- KPSTouchScreenCalibration,
- RProperty::EInt,
- KReadDeviceDataPolicy,
- KWriteDeviceDataPolicy );
-
- // Clearing the calibration before doing the actual calibration
- TDigitizerCalibrationType caltype = EFactory;
- UserHal::RestoreXYInputCalibration(caltype);
- ResetTapPoints();
-
-// SetOrientation();
-
- iCalibrationPoints = CalibrationPoints();
-
- // Set TSC application to be system application
- CEikonEnv& eikEnv = *CEikonEnv::Static();
- eikEnv.SetSystem( ETrue );
-
- iTouchScreenCalibLayout.iAnimImageLayout1.LayoutRect(Rect(),AknLayoutScalable_Apps::main_touch_calib_pane_g1().LayoutLine());
- iTouchScreenCalibLayout.iAnimImageLayout2.LayoutRect(Rect(),AknLayoutScalable_Apps::main_touch_calib_pane_g2().LayoutLine());
- iTouchScreenCalibLayout.iAnimImageLayout3.LayoutRect(Rect(),AknLayoutScalable_Apps::main_touch_calib_pane_g3().LayoutLine());
- iTouchScreenCalibLayout.iAnimImageLayout4.LayoutRect(Rect(),AknLayoutScalable_Apps::main_touch_calib_pane_g4().LayoutLine());
-
- iTouchScreenCalibView = CTouchScreenCalibView::NewL( this );
- AddToStackL( iTouchScreenCalibView );
-
- iTouchScreenCalibView->SetWinPriority(0);
- // Disable priority changes of window server
- eikEnv.WsSession().ComputeMode( RWsSession::EPriorityControlDisabled );
-
- UpdateL();
-
- iTouchScreenCalibPubSubObserver = CTouchScreenCalibPubSubObserver::NewL( this );
-
- if (FirstBoot())
- {
- TRACES("CTouchScreenCalibAppUi::ConstructL(): First boot ongoing");
- TRACES("CTouchScreenCalibAppUi::ConstructL(): Connect to Starter");
- RStarterSession startersession;
- if( startersession.Connect() == KErrNone )
- {
- TRACES("CTouchScreenCalibAppUi::ConstructL(): Connected to Starter");
- startersession.EndSplashScreen();
- TRACES("CTouchScreenCalibAppUi::ConstructL(): Splash screen removed");
- startersession.Close();
- }
- }
- NextCalibrationStepL();
-
- TRACES("CTouchScreenCalibAppUi::ConstructL(): End");
- }
-
-// ----------------------------------------------------
-// CTouchScreenCalibAppUi::~CTouchScreenCalibAppUi()
-// ----------------------------------------------------
-CTouchScreenCalibAppUi::~CTouchScreenCalibAppUi()
- {
- TRACES("CTouchScreenCalibAppUi::~CTouchScreenCalibAppUi()");
- if (iTouchScreenCalibView)
- {
- TRACES("CTouchScreenCalibAppUi::~CTouchScreenCalibAppUi(): delete iTouchScreenCalibView");
- RemoveFromStack( iTouchScreenCalibView );
- delete iTouchScreenCalibView;
- }
- if (iTouchScreenCalibPubSubObserver)
- {
- TRACES("CTouchScreenCalibAppUi::~CTouchScreenCalibAppUi(): delete iTouchScreenCalibPubSubObserver");
- delete iTouchScreenCalibPubSubObserver;
- }
- TRACES("CTouchScreenCalibAppUi::~CTouchScreenCalibAppUi(): End");
- }
-
-// ----------------------------------------------------
-// CTouchScreenCalibAppUi::NextCalibrationStepL()
-// ----------------------------------------------------
-void CTouchScreenCalibAppUi::NextCalibrationStepL()
- {
- TRACES("CTouchScreenCalibAppUi::NextCalibrationStepL()");
- TRACES2("CTouchScreenCalibAppUi::NextCalibrationStepL(): TapPoint1: %d %d",iTapPoints.iTl.iX, iTapPoints.iTl.iY);
- TRACES2("CTouchScreenCalibAppUi::NextCalibrationStepL(): TapPoint2: %d %d",iTapPoints.iTr.iX, iTapPoints.iTr.iY);
- TRACES2("CTouchScreenCalibAppUi::NextCalibrationStepL(): TapPoint3: %d %d",iTapPoints.iBr.iX, iTapPoints.iBr.iY);
- TRACES2("CTouchScreenCalibAppUi::NextCalibrationStepL(): TapPoint4: %d %d",iTapPoints.iBl.iX, iTapPoints.iBl.iY);
- iCurrentCalibrationStep++;
- TRACES1("CTouchScreenCalibAppUi::NextCalibrationStepL(): CurrentCalibrationStep: %d",iCurrentCalibrationStep);
-
- if (iCurrentCalibrationStep > 4)
- {
- TRACES("CTouchScreenCalibAppUi::NextCalibrationStepL(): Calibration succesfully completed. Save it and exit application.");
- SaveCalibration();
- iCalibrationDone = ETrue;
-
- iTouchScreenCalibView->EndTargetAnimation();
- iTouchScreenCalibView->SetWinPriority(ECoeWinPriorityNormal);
- TRACES("CTouchScreenCalibAppUi::NextCalibrationStepL(): Show 'Calibration Done' note");
- HBufC* noteText = CEikonEnv::Static()->AllocReadResourceLC(R_QTN_TOUCH_SCREEN_CALI_DONE );
- CAknInformationNote* note =
- new( ELeave ) CAknInformationNote( ETrue );
- note->ExecuteLD( *noteText );
- CleanupStack::PopAndDestroy( noteText );
- if ( FirstBoot() )
- {
- iTouchScreenCalibView->DrawEndingBackground();
-#ifdef RD_STARTUP_ANIMATION_CUSTOMIZATION
- RProperty::Set( KPSUidTouchScreenCalibration, KPSTouchScreenCalibration, ETouchScreenCalibrationOk );
-#else //RD_STARTUP_ANIMATION_CUSTOMIZATION
- RProperty::Set( KPSUidStartup, KPSTouchScreenCalibration, ETouchScreenCalibrationOk );
-#endif //RD_STARTUP_ANIMATION_CUSTOMIZATION
- iTouchScreenCalibView->SetWinPriority(0);
- }
- else
- {
- PrepareToExit();
- }
- }
- else
- {
- TRACES("CTouchScreenCalibAppUi::NextCalibrationStepL(): Update next step.");
- UpdateL();
- }
- TRACES("CTouchScreenCalibAppUi::NextCalibrationStepL(): End");
- }
-
-// ----------------------------------------------------
-// CTouchScreenCalibAppUi::SaveCalibration()
-// ----------------------------------------------------
-void CTouchScreenCalibAppUi::SaveCalibration()
- {
- TRACES("CTouchScreenCalibAppUi::SaveCalibration()");
-
- // Touch Screen driver supports only portrait orientation. If device is now in
- // landscape mode, convert points to portrait.
- TDigitizerCalibration tapPoints = ConvertToCorrectOrientation(iTapPoints,
- KConvertSaveCase);
- UserHal::SetXYInputCalibration(tapPoints);
- TRACES("CTouchScreenCalibAppUi::SaveCalibration(): End");
- }
-
-// ----------------------------------------------------
-// CTouchScreenCalibAppUi::ResetCalibrationStepsL()
-// ----------------------------------------------------
-void CTouchScreenCalibAppUi::ResetCalibrationStepsL()
- {
- iCurrentCalibrationStep = 0;
- ResetTapPoints();
- NextCalibrationStepL();
- }
-
-// ---------------------------------------------------------------------------
-// CTouchScreenCalibAppUi::HandleForegroundEventL(TBool aForeground)
-// ---------------------------------------------------------------------------
-void CTouchScreenCalibAppUi::HandleForegroundEventL( TBool aForeground )
- {
- // call super-class first
- CAknAppUi::HandleForegroundEventL( aForeground );
- TRACES1("CTouchScreenCalibAppUi::HandleForegroundEventL( %d )", aForeground);
- if ( aForeground )
- {
- // if we are coming to foreground
- UpdateL();
- }
- else
- {
- if (!FirstBoot())
- {
- // Take old calibration in use
- TDigitizerCalibrationType caltype = ESaved;
- UserHal::RestoreXYInputCalibration(caltype);
- PrepareToExit();
- }
- }
- }
-
-// ---------------------------------------------------------------------------
-// CTouchScreenCalibAppUi::HandleKeyL(const TKeyEvent& aKeyEvent, TEventCode /*aType*/ )
-// ---------------------------------------------------------------------------
-void CTouchScreenCalibAppUi::HandleKeyL( const TKeyEvent& aKeyEvent, TEventCode /*aType*/ )
- {
- TRACES1("CTouchScreenCalibAppUi::HandleKeyL(): %d",aKeyEvent.iCode);
-
- if (aKeyEvent.iCode == EKeyYes) //Send key
- {
- TRACES("CTouchScreenCalibAppUi::HandleKeyL(): Send Key");
- if (FirstBoot()) // Restart calibration from step 1
- {
- TRACES("CTouchScreenCalibAppUi::HandleKey(): Go to first calibration step");
- ResetCalibrationStepsL();
- }
- else// Show "Calibration cancelled" Information note.
- {
- TRACES("CTouchScreenCalibAppUi::HandleKeyL(): Show cancel note");
- iCalibrationCancel = ETrue;
-
- iTouchScreenCalibView->EndAnimation();
- iTouchScreenCalibView->SetWinPriority(ECoeWinPriorityNormal);
- HBufC* noteText = CEikonEnv::Static()->AllocReadResourceLC(R_QTN_TOUCH_SCREEN_CALI_CANCEL );
- CAknInformationNote* note =
- new( ELeave ) CAknInformationNote( ETrue );
- note->ExecuteLD( *noteText );
- CleanupStack::PopAndDestroy( noteText );
-
- // Take old calibration in use
- TDigitizerCalibrationType caltype = ESaved;
- UserHal::RestoreXYInputCalibration(caltype);
- PrepareToExit();
- }
- }
- else if ( aKeyEvent.iCode == EKeyNo || aKeyEvent.iCode == EKeyApplication0
- || ( aKeyEvent.iCode == EKeyNull && aKeyEvent.iScanCode == EStdKeyDevice7 ))
- {
- TRACES("CTouchScreenCalibAppUi::HandleKeyL(): End Key or App Key");
- if (!FirstBoot())
- {
- // Take old calibration in use
- TDigitizerCalibrationType caltype = ESaved;
- UserHal::RestoreXYInputCalibration(caltype);
- PrepareToExit();
- }
- }
- TRACES("CTouchScreenCalibAppUi::HandleKeyL(): End");
- }
-
-// ---------------------------------------------------------------------------
-// CTouchScreenCalibAppUi::HandlePointerL()
-// ---------------------------------------------------------------------------
-void CTouchScreenCalibAppUi::HandlePointerL( TPoint aPos )
- {
- TRACES("CTouchScreenCalibAppUi::HandlePointerL()");
-
- switch(iCurrentCalibrationStep)
- {
- case 1:
- TRACES("CTouchScreenCalibAppUi::HandlePointerL(): case 1");
- iTapPoints.iTl.iX = aPos.iX;
- iTapPoints.iTl.iY = aPos.iY;
- break;
- case 2:
- TRACES("CTouchScreenCalibAppUi::HandlePointerL(): case 2");
- iTapPoints.iTr.iX = aPos.iX;
- iTapPoints.iTr.iY = aPos.iY;
- break;
- case 3:
- TRACES("CTouchScreenCalibAppUi::HandlePointerL(): case 4");
- iTapPoints.iBr.iX = aPos.iX;
- iTapPoints.iBr.iY = aPos.iY;
- break;
- case 4:
- TRACES("CTouchScreenCalibAppUi::HandlePointerL(): case 3");
- iTapPoints.iBl.iX = aPos.iX;
- iTapPoints.iBl.iY = aPos.iY;
- break;
- default:
- TRACES("CTouchScreenCalibAppUi::HandlePointerL(): case default");
- break;
- }
- TRACES("CTouchScreenCalibAppUi::HandlePointerL(): End: Continue calibration");
- NextCalibrationStepL();
- }
-
-// ---------------------------------------------------------------------------
-// CTouchScreenCalibAppUi::PrepareToExit()
-// ---------------------------------------------------------------------------
-void CTouchScreenCalibAppUi::PrepareToExit()
- {
- TRACES("CTouchScreenCalibAppUi::PrepareToExit()");
- if (!iExitting)
- {
- iExitting = ETrue;
- CEikAppUi::PrepareToExit();
- Exit();
- }
- TRACES("CTouchScreenCalibAppUi::PrepareToExit(): End");
- }
-
-// ---------------------------------------------------------------------------
-// CTouchScreenCalibAppUi::ResetTapPoints()
-// ---------------------------------------------------------------------------
-void CTouchScreenCalibAppUi::ResetTapPoints()
- {
- TRACES("CTouchScreenCalibAppUi::ResetTapPoints()");
- iTapPoints.iTl.iX = 0;
- iTapPoints.iTl.iY = 0;
- iTapPoints.iTr.iX = 0;
- iTapPoints.iTr.iY = 0;
- iTapPoints.iBr.iX = 0;
- iTapPoints.iBr.iY = 0;
- iTapPoints.iBl.iX = 0;
- iTapPoints.iBl.iY = 0;
- TRACES("CTouchScreenCalibAppUi::ResetTapPoints(): End");
- }
-
-// ---------------------------------------------------------------------------
-// CTouchScreenCalibAppUi::UpdateL()
-// ---------------------------------------------------------------------------
-void CTouchScreenCalibAppUi::UpdateL()
- {
- TRACES("CTouchScreenCalibAppUi::UpdateL()");
- TRACES1("CTouchScreenCalibAppUi::UpdateL(): iCurrentCalibrationStep: %d",iCurrentCalibrationStep);
-
- TAknLayoutText textLayout;
- textLayout.LayoutText(TRect(), AknLayoutScalable_Apps::main_touch_calib_pane_t1().LayoutLine());
-
- TRACES2("CTouchScreenCalibAppUi::UpdateL(): Text rect top: X:%d Y:%d",textLayout.TextRect().iTl.iX, textLayout.TextRect().iTl.iY);
- TRACES2("CTouchScreenCalibAppUi::UpdateL(): Text rect:bottom: X:%d Y:%d",textLayout.TextRect().iBr.iX, textLayout.TextRect().iBr.iY);
-
- iTouchScreenCalibView->UpdateL(textLayout);
-
- TRACES("CTouchScreenCalibAppUi::UpdateL(): End");
- }
-
-// ---------------------------------------------------------------------------
-// CTouchScreenCalibAppUi::GetCalibrationStep()
-// ---------------------------------------------------------------------------
-TInt CTouchScreenCalibAppUi::GetCalibrationStep()
- {
- return iCurrentCalibrationStep;
- }
-
-// ---------------------------------------------------------------------------
-// CTouchScreenCalibAppUi::GetAnimImageRect()
-// ---------------------------------------------------------------------------
-TRect CTouchScreenCalibAppUi::GetAnimImageRect(TInt aPointNumber)
- {
- TRACES1("CTouchScreenCalibAppUi::GetAnimImageRect(%d)", aPointNumber);
- TRect rect;
- TInt width(0);
- TInt height(0);
-
- // If aPointNumber is 0, return current calibration point.
- if (aPointNumber == 0)
- {
- aPointNumber = GetCalibrationStep();
- }
-
- switch (aPointNumber)
- {
- case 1:
- width = iTouchScreenCalibLayout.iAnimImageLayout1.Rect().iBr.iX -
- iTouchScreenCalibLayout.iAnimImageLayout1.Rect().iTl.iX;
- height= iTouchScreenCalibLayout.iAnimImageLayout1.Rect().iBr.iY -
- iTouchScreenCalibLayout.iAnimImageLayout1.Rect().iTl.iY;
-
- rect = TRect(TPoint( iCalibrationPoints.iTl.iX - (width/2),
- iCalibrationPoints.iTl.iY - (height/2)),
- TPoint( iCalibrationPoints.iTl.iX + (width/2),
- iCalibrationPoints.iTl.iY + (height/2)));
- break;
- case 2:
- width = iTouchScreenCalibLayout.iAnimImageLayout2.Rect().iBr.iX -
- iTouchScreenCalibLayout.iAnimImageLayout2.Rect().iTl.iX;
- height= iTouchScreenCalibLayout.iAnimImageLayout2.Rect().iBr.iY -
- iTouchScreenCalibLayout.iAnimImageLayout2.Rect().iTl.iY;
-
- rect = TRect(TPoint( iCalibrationPoints.iTr.iX - (width/2),
- iCalibrationPoints.iTr.iY - (height/2)),
- TPoint( iCalibrationPoints.iTr.iX + (width/2),
- iCalibrationPoints.iTr.iY + (height/2)));
- break;
- case 3:
- width = iTouchScreenCalibLayout.iAnimImageLayout3.Rect().iBr.iX -
- iTouchScreenCalibLayout.iAnimImageLayout3.Rect().iTl.iX;
- height= iTouchScreenCalibLayout.iAnimImageLayout3.Rect().iBr.iY -
- iTouchScreenCalibLayout.iAnimImageLayout3.Rect().iTl.iY;
-
- rect = TRect(TPoint( iCalibrationPoints.iBr.iX - (width/2),
- iCalibrationPoints.iBr.iY - (height/2)),
- TPoint( iCalibrationPoints.iBr.iX + (width/2),
- iCalibrationPoints.iBr.iY + (height/2)));
- break;
- case 4:
- width = iTouchScreenCalibLayout.iAnimImageLayout4.Rect().iBr.iX -
- iTouchScreenCalibLayout.iAnimImageLayout4.Rect().iTl.iX;
- height= iTouchScreenCalibLayout.iAnimImageLayout4.Rect().iBr.iY -
- iTouchScreenCalibLayout.iAnimImageLayout4.Rect().iTl.iY;
-
- rect = TRect(TPoint( iCalibrationPoints.iBl.iX - (width/2),
- iCalibrationPoints.iBl.iY - (height/2)),
- TPoint( iCalibrationPoints.iBl.iX + (width/2),
- iCalibrationPoints.iBl.iY + (height/2)));
- break;
- default:
- break;
- }
- TRACES("CTouchScreenCalibAppUi::GetAnimImageRect(): End");
- return rect;
- }
-
-// ---------------------------------------------------------------------------
-// CTouchScreenCalibAppUi::HandleResourceChange(...)
-// ---------------------------------------------------------------------------
-void CTouchScreenCalibAppUi::HandleScreenDeviceChangedL()
- {
- TRACES("CTouchScreenCalibAppUi::HandleResourceChange()");
- CAknAppUiBase::HandleScreenDeviceChangedL();
-
- if (!iCalibrationDone && !iCalibrationCancel )
- {
- TRACES("CTouchScreenCalibAppUi::HandleResourceChange(): Restart calibration");
- iCalibrationPoints = CalibrationPoints();
- if (iTouchScreenCalibView)
- {
- RemoveFromStack( iTouchScreenCalibView );
- delete iTouchScreenCalibView;
- iTouchScreenCalibView = NULL;
- }
- iTouchScreenCalibView = CTouchScreenCalibView::NewL( this );
- AddToStackL( iTouchScreenCalibView );
- ResetCalibrationStepsL();
- }
- else
- {
- TRACES("CTouchScreenCalibAppUi::HandleResourceChange(): Update ending background");
- iTouchScreenCalibView->DrawEndingBackground();
- }
- TRACES("CTouchScreenCalibAppUi::HandleResourceChange(): End");
- }
-
-// ---------------------------------------------------------------------------
-// CTouchScreenCalibAppUi::CalibrationPoints();
-// ---------------------------------------------------------------------------
-TDigitizerCalibration CTouchScreenCalibAppUi::CalibrationPoints()
- {
- TRACES("CTouchScreenCalibAppUi::CalibrationPoints()");
- TDigitizerCalibration calibrationPoints;
-#if defined(__WINS__)
- // Dummy values for emulator for testing purposes
- TRect rect = iAvkonAppUi->ApplicationRect();
- TRACES2("CTouchScreenCalibAppUi::CalibrationPoints(): Window resolution: (%d. %d)",rect.iBr.iX,rect.iBr.iY);
-
- calibrationPoints.iTl.iX = rect.iTl.iX+50;
- calibrationPoints.iTl.iY = rect.iTl.iY+50;
- calibrationPoints.iTr.iX = rect.iBr.iX-50;
- calibrationPoints.iTr.iY = rect.iTl.iY+50;
- calibrationPoints.iBr.iX = rect.iBr.iX-50;
- calibrationPoints.iBr.iY = rect.iBr.iY-50;
- calibrationPoints.iBl.iX = rect.iTl.iX+50;
- calibrationPoints.iBl.iY = rect.iBr.iY-50;
-#else
- UserHal::CalibrationPoints(calibrationPoints);
-#endif
-
- // Orientation in driver level could be different than window orientation. Convert
- // points to correct orientation.
- if (calibrationPoints.iBr.iX > calibrationPoints.iBr.iY )
- {
- TRACES("CTouchScreenCalibAppUi::CalibrationPoints(): Native orientation: landscape");
- iNativeOrientation = KLandscapeOrientation;
- }
- else
- {
- TRACES("CTouchScreenCalibAppUi::CalibrationPoints(): Native orientation: portrait");
- iNativeOrientation = KPortraitOrientation;
- }
- calibrationPoints = ConvertToCorrectOrientation(calibrationPoints, KConvertGetCase);
-
- TRACES("CTouchScreenCalibAppUi::CalibrationPoints(): End");
- return calibrationPoints;
- }
-
-// ---------------------------------------------------------------------------
-// CTouchScreenCalibAppUi::ConvertToCorrectOrientation(TDigitizerCalibration aPoints);
-// ---------------------------------------------------------------------------
-TDigitizerCalibration CTouchScreenCalibAppUi::ConvertToCorrectOrientation(TDigitizerCalibration aPoints,
- TInt aConvertCase)
- {
- TRACES("CTouchScreenCalibAppUi::ConvertToCorrectOrientation()");
- TRACES2("CTouchScreenCalibAppUi::ConvertToCorrectOrientation(): X:%d Y:%d", aPoints.iTl.iX,aPoints.iTl.iY);
- TRACES2("CTouchScreenCalibAppUi::ConvertToCorrectOrientation(): X:%d Y:%d", aPoints.iTr.iX,aPoints.iTr.iY);
- TRACES2("CTouchScreenCalibAppUi::ConvertToCorrectOrientation(): X:%d Y:%d", aPoints.iBr.iX,aPoints.iBr.iY);
- TRACES2("CTouchScreenCalibAppUi::ConvertToCorrectOrientation(): X:%d Y:%d", aPoints.iBl.iX,aPoints.iBl.iY);
- TDigitizerCalibration points;
- TPoint destReso;
-
- TRect rect = iAvkonAppUi->ApplicationRect();
-
- if (!IsCorrectOrientation(rect))
- {
- TRACES("CTouchScreenCalibAppUi::ConvertToCorrectOrientation(): Points are not for current layout.");
- if (aConvertCase == KConvertGetCase)
- {
- destReso.iX = rect.iBr.iX;
- destReso.iY = rect.iBr.iY;
- TRACES2("CTouchScreenCalibAppUi::ConvertToCorrectOrientation(): Destin reso: X:%d Y:%d", destReso.iX,destReso.iY);
- points = ChangeOrientation(aPoints, destReso);
- }
- else
- {
- destReso.iX = rect.iBr.iY;
- destReso.iY = rect.iBr.iX;
- TRACES2("CTouchScreenCalibAppUi::ConvertToCorrectOrientation(): Destin reso: X:%d Y:%d", destReso.iX,destReso.iY);
- points = ChangeOrientation(aPoints, destReso);
- }
- }
- else
- {
- points = aPoints;
- }
-
- TRACES2("CTouchScreenCalibAppUi::ConvertToCorrectOrientation(): X:%d Y:%d", points.iTl.iX,points.iTl.iY);
- TRACES2("CTouchScreenCalibAppUi::ConvertToCorrectOrientation(): X:%d Y:%d", points.iTr.iX,points.iTr.iY);
- TRACES2("CTouchScreenCalibAppUi::ConvertToCorrectOrientation(): X:%d Y:%d", points.iBr.iX,points.iBr.iY);
- TRACES2("CTouchScreenCalibAppUi::ConvertToCorrectOrientation(): X:%d Y:%d", points.iBl.iX,points.iBl.iY);
-
- TRACES("CTouchScreenCalibAppUi::ConvertToCorrectOrientation(): End");
- return points;
- }
-
-// ---------------------------------------------------------------------------
-// CTouchScreenCalibAppUi::IsCorrectOrientation(TRect aRect)
-// ---------------------------------------------------------------------------
-TBool CTouchScreenCalibAppUi::IsCorrectOrientation(TRect aRect)
- {
- TRACES("CTouchScreenCalibAppUi::IsCorrectOrientation()");
- TBool ret(ETrue);
- TBool nativePortrait(ETrue);
-
- if (iNativeOrientation == KLandscapeOrientation)
- {
- TRACES("CTouchScreenCalibAppUi::IsCorrectOrientation(): Native orientation: landscape");
- nativePortrait = EFalse;
- }
-
- TBool windowsPortrait(ETrue);
-
- if (aRect.iBr.iX > aRect.iBr.iY)
- {
- TRACES("CTouchScreenCalibAppUi::IsCorrectOrientation(): Window orientation: landscape");
- windowsPortrait = EFalse;
- }
- else
- {
- windowsPortrait = ETrue;
- }
-
- if (nativePortrait != windowsPortrait)
- {
- ret = EFalse;
- }
-
- TRACES1("CTouchScreenCalibAppUi::IsCorrectOrientation(): End: returns %d",ret);
- return ret;
- }
-
-// ---------------------------------------------------------------------------
-// CTouchScreenCalibAppUi::ChangeOrientation(TDigitizerCalibration aPoints);
-// ---------------------------------------------------------------------------
-TDigitizerCalibration CTouchScreenCalibAppUi::ChangeOrientation(TDigitizerCalibration aSourcePoints,
- TPoint aDestReso)
- {
- TRACES("CTouchScreenCalibAppUi::ChangeOrientation()");
- TDigitizerCalibration destPoints;
-
- destPoints.iTl.iX = aSourcePoints.iTr.iY;
- destPoints.iTl.iY = aDestReso.iY - aSourcePoints.iTr.iX;
- destPoints.iTr.iX = aSourcePoints.iBr.iY;
- destPoints.iTr.iY = aDestReso.iY - aSourcePoints.iBr.iX;
- destPoints.iBr.iX = aSourcePoints.iBl.iY;
- destPoints.iBr.iY = aDestReso.iY - aSourcePoints.iBl.iX;
- destPoints.iBl.iX = aSourcePoints.iTl.iY;
- destPoints.iBl.iY = aDestReso.iY - aSourcePoints.iTl.iX;
-
-
- TRACES("CTouchScreenCalibAppUi::ChangeOrientation(): End");
- return destPoints;
- }
-
-// ---------------------------------------------------------
-// CTouchScreenCalibAppUi::FirstBoot()
-// ---------------------------------------------------------
-TBool CTouchScreenCalibAppUi::FirstBoot()
- {
- TRACES("CTouchScreenCalibAppUi::FirstBoot()");
- TInt value( 0 );
-
- TRACES("CTouchScreenCalibAppUi::FirstBoot(): Read first boot info from Central Repository ");
- CRepository* repository(NULL);
-
- TRAPD( err, repository = CRepository::NewL( KCRUidStartup ) );
- if ( err == KErrNone )
- {
- err = repository->Get( KStartupFirstBoot, value );
- }
-
- delete repository;
-
- if (value)
- {
- TRACES("CTouchScreenCalibAppUi::FirstBoot(): End, return EFalse");
- return EFalse;
- }
-
- else
- {
- TRACES("CTouchScreenCalibAppUi::FirstBoot(): End, return ETrue");
- return ETrue;
- }
- }
-
-
-/*
- * This funcntion is used to change the screen orientation to the
- * same orientation with the factory given calibration data. But it
- * is not used now. So just leave it here!
- * */
-
-
-void CTouchScreenCalibAppUi::SetOrientation()
- {
-#ifndef __WINS__
-
- TInt orientation = KUnknownOrientation;
- TInt nativeOrientation = KUnknownOrientation;
- TDigitizerCalibration Points;
- UserHal::CalibrationPoints( Points );
- if ( Points.iBr.iX > Points.iBr.iY)
- {
- orientation = KLandscapeOrientation;
- }
- else
- {
- orientation = KPortraitOrientation;
- }
- TRect rect = iAvkonAppUi->ApplicationRect();
- if ( rect.iBr.iX > rect.iBr.iY )
- {
- nativeOrientation = KLandscapeOrientation;
- }
- else
- {
- nativeOrientation = KPortraitOrientation;
- }
-
- if (orientation != nativeOrientation )
- {
- if ( orientation == KLandscapeOrientation )
- {
- SetOrientationL( CAknAppUiBase::EAppUiOrientationLandscape );
- }
- else
- {
- SetOrientationL( CAknAppUiBase::EAppUiOrientationPortrait );
- }
- }
-#endif
- }
-// End of file
--- a/systemswuis/touchscreencalib/src/TouchScreenCalibApplication.cpp Thu Dec 17 08:46:07 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,59 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-* This module implements the application core i.e. application
-* class and standard exported functions
-*
-*/
-
-
-// INCLUDE FILES
-#include "TouchScreenCalibApplication.h"
-#include "TouchScreenCalibDocument.h"
-
-// ========================= MEMBER FUNCTIONS ================================
-
-// ---------------------------------------------------------------------------
-// CTouchScreenCalibApplication::AppDllUid()
-// Returns application UID
-// ---------------------------------------------------------------------------
-TUid CTouchScreenCalibApplication::AppDllUid() const
- {
- return KUidTouchScreenCalib;
- }
-
-// ---------------------------------------------------------------------------
-// CTouchScreenCalibApplication::CreateDocumentL()
-// Creates CTouchScreenCalibDocument object
-//
-// ---------------------------------------------------------------------------
-CApaDocument* CTouchScreenCalibApplication::CreateDocumentL()
- {
- return CTouchScreenCalibDocument::NewL(*this);
- }
-
-// ===================== OTHER EXPORTED FUNCTIONS ============================
-#include <eikstart.h>
-
-LOCAL_C CApaApplication* NewApplication()
- {
- return new CTouchScreenCalibApplication;
- }
-
-GLDEF_C TInt E32Main()
- {
- return EikStart::RunApplication(NewApplication);
- }
-
-// End of file
--- a/systemswuis/touchscreencalib/src/TouchScreenCalibDocument.cpp Thu Dec 17 08:46:07 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,73 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Document class of the application.
-*
-*/
-
-
-// SYSTEM INCLUDES
-#include <apgwgnam.h>
-
-// USER INCLUDES
-#include "TouchScreenCalibDocument.h"
-#include "TouchScreenCalibAppUi.h"
-
-// ================= MEMBER FUNCTIONS =======================
-
-// ---------------------------------------------------------
-// CTouchScreenCalibDocument::~CTouchScreenCalibDocument()
-// ---------------------------------------------------------
-CTouchScreenCalibDocument::~CTouchScreenCalibDocument()
- {
- }
-
-// ---------------------------------------------------------
-// CTouchScreenCalibDocument::ConstructL()
-// ---------------------------------------------------------
-void CTouchScreenCalibDocument::ConstructL()
- {
- }
-
-// ---------------------------------------------------------
-// CTouchScreenCalibDocument::NewL()
-// ---------------------------------------------------------
-CTouchScreenCalibDocument* CTouchScreenCalibDocument::NewL(
- CEikApplication& aApp) // CTouchScreenCalibApp reference
- {
- CTouchScreenCalibDocument* self = new (ELeave) CTouchScreenCalibDocument(aApp);
- CleanupStack::PushL(self);
- self->ConstructL();
- CleanupStack::Pop(self);
- return self;
- }
-
-// ----------------------------------------------------
-// CTouchScreenCalibDocument::CreateAppUiL()
-// ----------------------------------------------------
-CEikAppUi* CTouchScreenCalibDocument::CreateAppUiL()
- {
- return new(ELeave) CTouchScreenCalibAppUi;
- }
-
-// ----------------------------------------------------
-// CTouchScreenCalibDocument::UpdateTaskNameL()
-// Makes TouchScreenCalib-application hidden in menu shell and fastswap window
-// ----------------------------------------------------
-void CTouchScreenCalibDocument::UpdateTaskNameL( CApaWindowGroupName* aWgName )
- {
- CEikDocument::UpdateTaskNameL( aWgName );
- aWgName->SetHidden( ETrue );
- }
-
-// End of file
--- a/systemswuis/touchscreencalib/src/TouchScreenCalibPubSubObserver.cpp Thu Dec 17 08:46:07 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,131 +0,0 @@
-/*
-* Copyright (c) 2007 - 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-* This class the handles the received indications from the Public and
-* Subscribe.
-*
-*/
-
-
-// SYSTEM INCLUDES
-#include <startupdomainpskeys.h>
-#include <ctsydomainpskeys.h>
-
-// USER INCLUDES
-#include "TouchScreenCalibPubSubObserver.h"
-#include "TouchScreenCalibPubSubObserver.h"
-#include "TouchScreenCalibSubscriber.h"
-#include "TouchScreenCalibDefines.h"
-
-// ================= MEMBER FUNCTIONS =======================
-
-// ----------------------------------------------------
-// CTouchScreenCalibPubSubObserver::CTouchScreenCalibPubSubObserver( CTouchScreenCalibAppUi* aTouchScreenCalibAppUi )
-// C++ default constructor can NOT contain any code, that
-// might leave.
-// ----------------------------------------------------
-CTouchScreenCalibPubSubObserver::CTouchScreenCalibPubSubObserver( CTouchScreenCalibAppUi* aTouchScreenCalibAppUi ) :
- iTouchScreenCalibAppUi( aTouchScreenCalibAppUi )
- {
- }
-
-// ----------------------------------------------------
-// CTouchScreenCalibPubSubObserver::ConstructL()
-// ----------------------------------------------------
-void CTouchScreenCalibPubSubObserver::ConstructL()
- {
- TRACES("CTouchScreenCalibPubSubObserver::ConstructL()");
-
- iGlobalSWStateSubscriber = CTouchScreenCalibSubscriber::NewL( *this,
- KPSUidStartup,
- KPSGlobalSystemState );
- iGlobalSWStateSubscriber->Subscribe();
-
- iTsyCallState = CTouchScreenCalibSubscriber::NewL( *this,
- KPSUidCtsyCallInformation,
- KCTsyCallState );
- iTsyCallState->Subscribe();
-
- TRACES("CTouchScreenCalibPubSubObserver::ConstructL(): End");
- }
-
-// ----------------------------------------------------------------------------
-// CTouchScreenCalibPubSubObserver::HandlePropertyChangedL()
-// ----------------------------------------------------------------------------
-void CTouchScreenCalibPubSubObserver::HandlePropertyChangedL( const TUid& aCategory, TUint aKey )
- {
- TRACES("CTouchScreenCalibPubSubObserver::HandlePropertyChangedL()");
- TRACES1("CTouchScreenCalibPubSubObserver::HandlePropertyChangedL(): aKey: %d",aKey );
-
- if (aCategory == KPSUidStartup && aKey == KPSGlobalSystemState)
- {
- TInt eventState;
- User::LeaveIfError( RProperty::Get ( KPSUidStartup, KPSGlobalSystemState, eventState ) );
-
- if( eventState == ESwStateCriticalPhaseOK ||
- eventState == ESwStateEmergencyCallsOnly ||
- eventState == ESwStateNormalRfOn ||
- eventState == ESwStateNormalRfOff ||
- eventState == ESwStateNormalBTSap )
- {
- TRACES("CTouchScreenCalibPubSubObserver::HandlePropertyChangedL(): Critical startup phase ready");
- iTouchScreenCalibAppUi->PrepareToExit();
- }
- }
- else if (aCategory == KPSUidCtsyCallInformation && aKey == KCTsyCallState)
- {
- TInt eventState;
- User::LeaveIfError( RProperty::Get ( KPSUidCtsyCallInformation, KCTsyCallState, eventState ) );
-
- if( eventState == EPSCTsyCallStateRinging ||
- eventState == EPSCTsyCallStateDisconnecting)
- {
- TRACES("CTouchScreenCalibPubSubObserver::HandlePropertyChangedL(): Call detected");
- iTouchScreenCalibAppUi->PrepareToExit();
- }
- }
- TRACES("CTouchScreenCalibPubSubObserver::HandlePropertyChangedL(): End");
- }
-
-// ----------------------------------------------------
-// CTouchScreenCalibPubSubObserver* CTouchScreenCalibPubSubObserver::NewL( CTouchScreenCalibAppUi* aTouchScreenCalibAppUi )
-// ----------------------------------------------------
-CTouchScreenCalibPubSubObserver* CTouchScreenCalibPubSubObserver::NewL( CTouchScreenCalibAppUi* aTouchScreenCalibAppUi )
- {
- TRACES("CTouchScreenCalibPubSubObserver::NewL()");
- CTouchScreenCalibPubSubObserver* self = new (ELeave) CTouchScreenCalibPubSubObserver( aTouchScreenCalibAppUi );
-
- CleanupStack::PushL( self );
- self->ConstructL();
- CleanupStack::Pop(); // self
-
- TRACES("CTouchScreenCalibPubSubObserver::NewL(): End");
- return self;
- }
-
-// ----------------------------------------------------
-// CTouchScreenCalibPubSubObserver::~CTouchScreenCalibPubSubObserver()
-// ----------------------------------------------------
-CTouchScreenCalibPubSubObserver::~CTouchScreenCalibPubSubObserver()
- {
- TRACES("CTouchScreenCalibPubSubObserver::~CTouchScreenCalibPubSubObserver()");
-
- delete iGlobalSWStateSubscriber;
- delete iTsyCallState;
- iProperty.Close();
-
- TRACES("CTouchScreenCalibPubSubObserver::~CTouchScreenCalibPubSubObserver(): End");
- }
-
-// End of File
--- a/systemswuis/touchscreencalib/src/TouchScreenCalibSubscriber.cpp Thu Dec 17 08:46:07 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,120 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: CTouchScreenCalibSubscriber implementation.
- *
-*/
-
-
-// INCLUDES
-#include <e32svr.h>
-#include "TouchScreenCalibAppUi.h"
-#include "TouchScreenCalibSubscriber.h"
-#include "TouchScreenCalibDefines.h"
-
-// CONSTANTS
-
-// ============================= MEMBER FUNCTIONS =============================
-
-// ----------------------------------------------------------------------------
-// CTouchScreenCalibSubscriber::NewL()
-// ----------------------------------------------------------------------------
-CTouchScreenCalibSubscriber* CTouchScreenCalibSubscriber::NewL(
- MTouchScreenCalibPropertyResponder& aTouchScreenCalibPropertyResponder,
- const TUid& aCategory,
- TUint aKey )
- {
- CTouchScreenCalibSubscriber* self = new (ELeave) CTouchScreenCalibSubscriber( aTouchScreenCalibPropertyResponder,
- aCategory,
- aKey );
- CleanupStack::PushL( self );
- self->ConstructL();
- CleanupStack::Pop(); //self
- return self;
- }
-
-// ----------------------------------------------------------------------------
-// CTouchScreenCalibSubscriber::ConstructL()
-// ----------------------------------------------------------------------------
-void CTouchScreenCalibSubscriber::ConstructL()
- {
- CActiveScheduler::Add( this );
- iProperty.Attach( iCategory, iKey );
- }
-
-// ----------------------------------------------------------------------------
-// CTouchScreenCalibSubscriber::Subscribe()
-// ----------------------------------------------------------------------------
-void CTouchScreenCalibSubscriber::Subscribe()
- {
- TRACES("CTouchScreenCalibSubscriber::Subscribe()");
- iProperty.Subscribe( iStatus );
- SetActive();
- TRACES("CTouchScreenCalibSubscriber::Subscribe(): End");
- }
-
-// ----------------------------------------------------------------------------
-// CTouchScreenCalibSubscriber::CTouchScreenCalibSubscriber()
-// ----------------------------------------------------------------------------
-CTouchScreenCalibSubscriber::CTouchScreenCalibSubscriber( MTouchScreenCalibPropertyResponder& aTouchScreenCalibPropertyResponder,
- const TUid& aCategory,
- TUint aKey ) :
- CActive( EPriorityStandard ),
- iTouchScreenCalibPropertyResponder( aTouchScreenCalibPropertyResponder ),
- iCategory( aCategory),
- iKey( aKey )
- {
- }
-
-// ----------------------------------------------------------------------------
-// CTouchScreenCalibSubscriber::RunL()
-// ----------------------------------------------------------------------------
-void CTouchScreenCalibSubscriber::RunL()
- {
- TRACES("CTouchScreenCalibSubscriber::RunL()");
- Subscribe();
- iTouchScreenCalibPropertyResponder.HandlePropertyChangedL( iCategory, iKey );
- TRACES("CTouchScreenCalibSubscriber::RunL(): End");
- }
-
-// ----------------------------------------------------------------------------
-// CTouchScreenCalibSubscriber::DoCancel()
-// ----------------------------------------------------------------------------
-void CTouchScreenCalibSubscriber::DoCancel()
- {
- iProperty.Cancel();
- }
-
-// ----------------------------------------------------------------------------
-// CTouchScreenCalibSubscriber::RunError()
-// ----------------------------------------------------------------------------
-TInt CTouchScreenCalibSubscriber::RunError( TInt aError )
- {
- return aError;
- }
-
-// ----------------------------------------------------------------------------
-// CTouchScreenCalibSubscriber::~CTouchScreenCalibSubscriber()
-// ----------------------------------------------------------------------------
-CTouchScreenCalibSubscriber::~CTouchScreenCalibSubscriber()
- {
- TRACES("CTouchScreenCalibSubscriber::~CTouchScreenCalibSubscriber()");
- Cancel();
- iProperty.Close();
- TRACES("CTouchScreenCalibSubscriber::~CTouchScreenCalibSubscriber(): End");
- }
-
-// End of File
-
-
-
--- a/systemswuis/touchscreencalib/src/TouchScreenCalibView.cpp Thu Dec 17 08:46:07 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,569 +0,0 @@
-/*
-* Copyright (c) 2006 - 2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-* This class is the container class of the CTouchScreenCalibView.
-* Is used to show tap target animation.
-*
-*/
-
-
-// SYSTEM INCLUDES
-#include <aknappui.h>
-#include <aknnotewrappers.h>
-#include <barsread.h>
-#include <AknBitmapAnimation.h>
-#include <ConeResLoader.h>
-#include <AknBidiTextUtils.h>
-#include <TouchScreenCalib_anim.rsg>
-#include <TouchScreenCalib.rsg>
-#include <touchscreencalib.mbg>
-
-// USER INCLUDES
-#include "TouchScreenCalibView.h"
-#include "TouchScreenCalibDefines.h"
-#include "TouchScreenCalibAppUi.h"
-
-// CONSTANTS
-_LIT( KTargetAnimationResource, "z:TouchScreenCalib_anim.rsc" );
-
-// ================= MEMBER FUNCTIONS =======================
-
-// ---------------------------------------------------------------------------
-// CTouchScreenCalibView::ConstructL()
-// Symbian 2nd phase constructor can leave.
-// ---------------------------------------------------------------------------
-void CTouchScreenCalibView::ConstructL()
- {
- TRACES("CTouchScreenCalibView::ConstructL()");
-
- CreateWindowL();
-
- iAnimImageRect.iAnimImageRect1 = iTouchScreenCalibAppUi->GetAnimImageRect(1);
- iAnimImageRect.iAnimImageRect2 = iTouchScreenCalibAppUi->GetAnimImageRect(2);
- iAnimImageRect.iAnimImageRect3 = iTouchScreenCalibAppUi->GetAnimImageRect(3);
- iAnimImageRect.iAnimImageRect4 = iTouchScreenCalibAppUi->GetAnimImageRect(4);
-
- // Parse filename of bitmaps
- _LIT( KDirAndFile, "z:TouchScreenCalib.mif" );
- TParse* fp1 = new(ELeave) TParse();
- fp1->Set(KDirAndFile, &KDC_APP_BITMAP_DIR, NULL);
- TFileName fileName( fp1->FullName() );
- TRACES1("CTouchScreenCalibImage::CreateIconL(): Image: %S", &(fp1->FullName()) );
- delete fp1;
-
- AknIconUtils::CreateIconL( iBitmap,
- iBitmapMask,
- fileName,
- EMbmTouchscreencalibQgn_graf_screencalib,
- EMbmTouchscreencalibQgn_graf_screencalib_mask);
-
- iAvkonAppUi->StatusPane()->MakeVisible(EFalse);
-
- TRACES("CTouchScreenCalibView::ConstructL(): Animation loading started");
- iAnim = CAknBitmapAnimation::NewL();
- iAnim->SetContainerWindowL( *this );
- iAnim->SetScaleModeForAnimationFrames(EAspectRatioPreservedAndUnusedSpaceRemoved);
- TResourceReader rr;
- RConeResourceLoader loader( *iCoeEnv );
-
- TParse* fp = new(ELeave) TParse();
- fp->Set(KTargetAnimationResource, &KDC_APP_RESOURCE_DIR, NULL);
- TRACES1("CTouchScreenCalibView::ConstructL(): Animated target resource path: %S", &fp->FullName());
- TFileName name( fp->FullName() );
- delete fp;
- TInt fileError = loader.Open( name );
- if ( fileError == KErrNone )
- {
- CleanupClosePushL( loader );
- iCoeEnv->CreateResourceReaderLC(rr, R_SHUTDOWN_ANIM);
- TRAPD(err, iAnim->ConstructFromResourceL( rr ));
- if( err == KErrNone )
- {
- TResourceReader timeReader;
- iCoeEnv->CreateResourceReaderLC(timeReader, R_ANIM_DURATION);
- CleanupStack::PopAndDestroy(); // pop timeReader
- iAnim->SetPosition(TPoint(0,0));
- iAnim->SetSize(TSize(0,0));
- TRACES("CTouchScreenCalibView::ConstructL(): animation succesfully loaded");
- }
- else
- {
- TRACES("CTouchScreenCalibView::ConstructL(): animation loading failed");
- }
- CleanupStack::PopAndDestroy(); //pop rr
- TRACES("CTouchScreenCalibView::ConstructL(): animation loading ended");
- CleanupStack::PopAndDestroy(); //pop loader
- }
- else
- {
- TRACES("CTouchScreenCalibView::ConstructL(): resource file loading failed");
- }
-
- SetRect(iAvkonAppUi->ApplicationRect());
- ActivateL();
-
- iFont = AknLayoutUtils::FontFromId(EAknLogicalFontSecondaryFont);
- iText = new( ELeave ) CArrayPtrFlat<HBufC>( 20 );
-
- TApaTask self(iCoeEnv->WsSession());
- self.SetWgId(iCoeEnv->RootWin().Identifier());
- self.BringToForeground();
-
- if (iTouchScreenCalibAppUi->FirstBoot())
- {
- Window().SetOrdinalPosition( 0, ECoeWinPriorityAlwaysAtFront + 10000 );
- }
- else
- {
- Window().SetOrdinalPosition( 0, ECoeWinPriorityHigh + 1 );
- }
- iTouchFeedback = MTouchFeedback::Instance();
-
- TRACES("CTouchScreenCalibView::ConstructL(): ConstructL ended");
- }
-
-// -----------------------------------------------------------------------------
-// CTouchScreenCalibView::NewL
-// Two-phased constructor.
-// -----------------------------------------------------------------------------
-//
-CTouchScreenCalibView* CTouchScreenCalibView::NewL( CTouchScreenCalibAppUi* aTouchScreenCalibAppUi )
- {
- TRACES("CTouchScreenCalibView::NewL()");
- CTouchScreenCalibView* self = new (ELeave) CTouchScreenCalibView( aTouchScreenCalibAppUi );
- CleanupStack::PushL(self);
- self->ConstructL();
- CleanupStack::Pop();
- return self;
- }
-
-// ---------------------------------------------------------
-// CTouchScreenCalibView::CTouchScreenCalibView()
-// ---------------------------------------------------------
-CTouchScreenCalibView::CTouchScreenCalibView( CTouchScreenCalibAppUi* aTouchScreenCalibAppUi ) :
- iTouchScreenCalibAppUi( aTouchScreenCalibAppUi ),
- iAnimationShowing( EFalse ),
- iAnimationCancelled ( EFalse ),
- iText( NULL ),
- iCalibrationCompleted( EFalse )
- {
- TRACES("CTouchScreenCalibView::CTouchScreenCalibView()");
- TRACES("CTouchScreenCalibView::CTouchScreenCalibView(): End");
- }
-
-// ---------------------------------------------------------------------------
-// CTouchScreenCalibView::UpdateL( TAknLayoutText aTextLayout )
-// ---------------------------------------------------------------------------
-void CTouchScreenCalibView::UpdateL( TAknLayoutText aTextLayout )
- {
- TRACES("CTouchScreenCalibView::UpdateL()");
-
- TRect rect = iTouchScreenCalibAppUi->GetAnimImageRect();
-
- SetTextL(aTextLayout);
- EndAnimation();
- DrawDeferred();
-
- TPoint pos = TPoint(rect.iTl.iX, rect.iTl.iY);
- TSize size = TSize(rect.iBr.iX-rect.iTl.iX, rect.iBr.iY-rect.iTl.iY);
- iAnim->SetPosition(pos);
- iAnim->SetSize(size);
-
- TRAPD(err, iAnim->StartAnimationL());
- if ( err != KErrNone )
- {
- TRACES("CTouchScreenCalibView::UpdateL(): Starting animation failed");
- }
-
- TRACES("CTouchScreenCalibView::UpdateL(): End");
- }
-
-// ---------------------------------------------------------------------------
-// CTouchScreenCalibView::DrawEndingBackground()
-// ---------------------------------------------------------------------------
-void CTouchScreenCalibView::DrawEndingBackground()
- {
- TRACES("CTouchScreenCalibView::DrawEndingBackground()");
- iCalibrationCompleted = ETrue;
- SetRect( iAvkonAppUi->ApplicationRect() );
- EndAnimation();
- DrawNow();
- TRACES("CTouchScreenCalibView::DrawEndingBackground(): End");
- }
-
-// ---------------------------------------------------------------------------
-// CTouchScreenCalibView::EndTargetAnimation()
-// ---------------------------------------------------------------------------
-void CTouchScreenCalibView::EndTargetAnimation()
- {
- TRACES("CTouchScreenCalibView::EndTargetAnimation()");
- EndAnimation();
- DrawNow();
- TRACES("CTouchScreenCalibView::EndTargetAnimation(): End");
- }
-
-// ---------------------------------------------------------------------------
-// CTouchScreenCalibView::~CTouchScreenCalibView()
-// ---------------------------------------------------------------------------
-CTouchScreenCalibView::~CTouchScreenCalibView()
- {
- TRACES("CTouchScreenCalibView::~CTouchScreenCalibView() begin");
-
- if( iAnim )
- {
- if( iAnimationShowing )
- {
- iAnim->CancelAnimation();
- TRACES("CTouchScreenCalibView::~CTouchScreenCalibView() animation cancelled");
- }
- }
- delete iAnim;
- TRACES("CTouchScreenCalibView::~CTouchScreenCalibView() iAnim deleted");
-
- if ( iText )
- {
- iText->ResetAndDestroy();
- delete iText;
- iText = NULL;
- }
-
- delete iBitmap;
- delete iBitmapMask;
-
- TRACES("CTouchScreenCalibView::~CTouchScreenCalibView() end");
- }
-
-// ---------------------------------------------------------------------------
-// CTouchScreenCalibView::ComponentControl(TInt aIndex)
-// ---------------------------------------------------------------------------
-CCoeControl* CTouchScreenCalibView::ComponentControl(TInt aIndex) const
- {
- switch ( aIndex )
- {
- case 0:
- {
- return iAnim;
- }
- default:
- {
- return NULL;
- }
- }
- }
-
-// ---------------------------------------------------------------------------
-// CTouchScreenCalibView::CountComponentControls()
-// ---------------------------------------------------------------------------
-TInt CTouchScreenCalibView::CountComponentControls() const
- {
- return iAnim ? 1 : 0; // return nbr of controls inside this container
- }
-
-// ---------------------------------------------------------------------------
-// CTouchScreenCalibView::Draw(const TRect& aRect) const
-// ---------------------------------------------------------------------------
-void CTouchScreenCalibView::Draw(const TRect& ) const
- {
- TRACES("CTouchScreenCalibView::Draw()");
- DrawBackground();
- if (!iCalibrationCompleted)
- {
- DrawText();
- ShowImage(iAnimImageRect.iAnimImageRect1);
- ShowImage(iAnimImageRect.iAnimImageRect2);
- ShowImage(iAnimImageRect.iAnimImageRect3);
- ShowImage(iAnimImageRect.iAnimImageRect4);
- }
- TRACES("CTouchScreenCalibView::Draw(): End");
- }
-
-// ---------------------------------------------------------------------------
-// CTouchScreenCalibView::SizeChanged()
-// ---------------------------------------------------------------------------
-void CTouchScreenCalibView::SizeChanged()
- {
- if( iAnim )
- {
- iAnim->SetRect(Rect());
- }
- }
-
-// ---------------------------------------------------------------------------
-// CTouchScreenCalibView::EndAnimation()
-// ---------------------------------------------------------------------------
-void CTouchScreenCalibView::EndAnimation()
- {
- TRACES("CTouchScreenCalibView::EndAnimation()");
- iAnim->CancelAnimation();
- TRACES("CTouchScreenCalibView::EndAnimation(): End");
- }
-
-// ---------------------------------------------------------------------------
-// CTouchScreenCalibView::HandleControlEventL(...)
-// ---------------------------------------------------------------------------
-void CTouchScreenCalibView::HandleControlEventL(
- CCoeControl* ,
- TCoeEvent )
- {
- //pure virtual from MCoeControlObserver
- TRACES("CTouchScreenCalibView::HandleControlEventL()");
- }
-
-// ---------------------------------------------------------------------------
-// CTouchScreenCalibView::OfferKeyEventL(...)
-// ---------------------------------------------------------------------------
-TKeyResponse CTouchScreenCalibView::OfferKeyEventL( const TKeyEvent& aKeyEvent, TEventCode aType)
- {
- TRACES("CTouchScreenCalibView::OfferKeyEventL()");
- iTouchScreenCalibAppUi->HandleKeyL( aKeyEvent, aType );
- TRACES("CTouchScreenCalibView::OfferKeyEventL(): End: return EKeyWasConsumed");
- return EKeyWasConsumed;
- }
-
-// ----------------------------------------------------
-// CTouchScreenCalibView::HandleKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType)
-// ----------------------------------------------------
-TKeyResponse CTouchScreenCalibView::HandleKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType )
- {
- TRACES("CTouchScreenCalibView::HandleKeyEventL()");
- iTouchScreenCalibAppUi->HandleKeyL( aKeyEvent, aType );
- TRACES("CTouchScreenCalibView::HandleKeyEventL(): End: return EKeyWasConsumed");
- return EKeyWasConsumed;
- }
-
-// ----------------------------------------------------
-// CTouchScreenCalibView::HandlePointerEventL(const TPointerEvent& aPointerEvent)
-// ----------------------------------------------------
-void CTouchScreenCalibView::HandlePointerEventL(const TPointerEvent& aPointerEvent)
- {
- TRACES("CTouchScreenCalibView::HandlePointerEventL()");
- if (aPointerEvent.iType == TPointerEvent::EButton1Up)
- {
- TRACES("CTouchScreenCalibView::HandlePointerEventL(): EButton1Up");
- TRACES1("CTouchScreenCalibView::HandlePointerEventL(): X = %d",aPointerEvent.iPosition.iX);
- TRACES1("CTouchScreenCalibView::HandlePointerEventL(): Y = %d",aPointerEvent.iPosition.iY);
-
- TPoint pos;
-
- pos.iX = aPointerEvent.iPosition.iX;
- pos.iY = aPointerEvent.iPosition.iY;
- if (Validate(pos))
- {
- iTouchFeedback->InstantFeedback( ETouchFeedbackBasic );
- iTouchScreenCalibAppUi->HandlePointerL( pos );
- }
- }
- TRACES("CTouchScreenCalibView::HandlePointerEventL(): End --------------- Waiting for next event -------------");
- }
-
-// ----------------------------------------------------
-// CTouchScreenCalibView::Validate(TPoint aPos)
-// ----------------------------------------------------
-TBool CTouchScreenCalibView::Validate(TPoint aPos)
- {
- TRACES("CTouchScreenCalibView::Validate()");
- TInt retval( EFalse );
-
- if ((aPos.iX > iTouchScreenCalibAppUi->GetAnimImageRect().iTl.iX) &&
- (aPos.iX < iTouchScreenCalibAppUi->GetAnimImageRect().iBr.iX) &&
- (aPos.iY > iTouchScreenCalibAppUi->GetAnimImageRect().iTl.iY) &&
- (aPos.iY < iTouchScreenCalibAppUi->GetAnimImageRect().iBr.iY))
- {
- retval = ETrue;
- }
- TRACES1("CTouchScreenCalibView::Validate(): End: Return %d",retval);
- return retval;
- }
-
-// ---------------------------------------------------------------------------
-// CTouchScreenCalibView::DrawBackground() const
-// ---------------------------------------------------------------------------
-void CTouchScreenCalibView::DrawBackground() const
- {
- TRACES("CTouchScreenCalibView::DrawBackground()");
- CWindowGc& gc = SystemGc();
- TRect rect = iAvkonAppUi->ApplicationRect();
- gc.SetPenStyle(CGraphicsContext::ENullPen);
- gc.SetBrushColor(KRgbWhite);
- gc.SetBrushStyle(CGraphicsContext::ESolidBrush);
- gc.DrawRect(rect);
- ControlEnv()->WsSession().Flush(); // force draw of the context
- TRACES("CTouchScreenCalibView::DrawBackground(): End");
- }
-
-// ---------------------------------------------------------------------------
-// CTouchScreenCalibView::DrawText()
-// ---------------------------------------------------------------------------
-void CTouchScreenCalibView::DrawText() const
- {
- TRACES("CTouchScreenCalibView::DrawText()");
-
- CWindowGc& gc = SystemGc();
-
- gc.SetPenStyle(CGraphicsContext::ENullPen);
-
- gc.UseFont( iFont );
-
- gc.SetBrushStyle(CGraphicsContext::ENullBrush);
-
- TPoint position( 0, 0 );
- TPoint topLeft;
- position = iTextTopLeft;
-
- for ( TInt index = 0 ;
- index < iText->Count();
- index++, position.iY += iTextBaselineOffset )
- {
- HBufC* text = (*iText)[ index ];
- if ( text )
- {
- topLeft = TPoint( position.iX, position.iY - iTextBaselineOffset );
- gc.SetPenColor(iTextColor);
- TRACES2("CTouchScreenCalibView::DrawText(): TopLeft: %d, %d", topLeft.iX, topLeft.iY);
- gc.DrawText( *text,
- TRect( topLeft, iTextSize ),
- iTextBaselineOffset,
- iTextAlignment );
- }
- }
- ControlEnv()->WsSession().Flush(); // force draw of the context
- gc.DiscardFont();
- TRACES("CTouchScreenCalibView::DrawText(): End");
- }
-
-// -----------------------------------------------------------------------------
-// CTouchScreenCalibView::SetTextL(TAknLayoutText aTextLayout)
-// -----------------------------------------------------------------------------
-void CTouchScreenCalibView::SetTextL(TAknLayoutText aTextLayout)
- {
- TRACES("CTouchScreenCalibView::SetTextL()");
-
- TInt textLineWidth;
-
- TRACES2("CTouchScreenCalibView::SetTextL(): Text rect top: X:%d Y:%d",aTextLayout.TextRect().iTl.iX, aTextLayout.TextRect().iTl.iY);
- TRACES2("CTouchScreenCalibView::SetTextL(): Text rect:bot: X:%d Y:%d",aTextLayout.TextRect().iBr.iX, aTextLayout.TextRect().iBr.iY);
-
- textLineWidth = aTextLayout.TextRect().Width();
-
- iTextTopLeft = TPoint(aTextLayout.TextRect().iTl.iX, aTextLayout.TextRect().iTl.iY);
-
- iTextBaselineOffset = iFont->HeightInPixels() * 4 / 3;
-
- iTextSize = TSize(textLineWidth, iTextBaselineOffset + iFont->DescentInPixels());
-
- iTextColor = aTextLayout.Color();
-
- iTextAlignment = CGraphicsContext::ECenter;
-
- HBufC* mainText1 = StringLoader::LoadLC(R_QTN_TOUCH_SCREEN_CALI_INSTR_GEN,
- iTouchScreenCalibAppUi->GetCalibrationStep());
-
- HBufC* mainText2;
- if (iTouchScreenCalibAppUi->FirstBoot())
- {
- mainText2 = CEikonEnv::Static()->AllocReadResourceLC(R_QTN_TOUCH_SCREEN_CALI_INSTR_RES );
- }
- else
- {
- mainText2 = CEikonEnv::Static()->AllocReadResourceLC(R_QTN_TOUCH_SCREEN_CALI_INSTR_CAN );
- }
-
- TBuf<256> text;
- text.Copy( mainText1->Des() );
- _LIT(KLineChange, "\n");
- text.Append(KLineChange);
- text.Append(mainText2->Des());
-
- TRACES1("CTouchScreenCalibView::SetTextL(): text: %S",&text);
-
- CArrayFix<TPtrC>* wrappedArray =
- new( ELeave ) CArrayFixFlat<TPtrC>( 10 );
- CleanupStack::PushL( wrappedArray );
-
- HBufC* dataToDestroy =
- AknBidiTextUtils::ConvertToVisualAndWrapToArrayL(
- text, textLineWidth, *iFont, *wrappedArray
- );
-
- TInt numLines( wrappedArray->Count() );
- TRACES1("CTouchScreenCalibView::SetTextL(): Number of lines: %d",numLines );
-
- if ( iText )
- {
- iText->ResetAndDestroy();
- delete iText;
- iText = NULL;
- }
- iText = new( ELeave ) CArrayPtrFlat<HBufC>( 20 );
-
- for ( TInt i = 0 ; i < numLines ; i++ )
- {
- HBufC* line = (*wrappedArray)[i].AllocLC();
- TInt lineLength = line->Length();
- TRACES1("CTouchScreenCalibView::SetTextL(): lineLength: %d",lineLength);
- if(!lineLength)
- {
- iText->AppendL( NULL );
- CleanupStack::PopAndDestroy(line); // line
- }
- else
- {
- iText->AppendL( line );
- CleanupStack::Pop(line); // line
- }
- }
- iText->AppendL( NULL );
-
- // If the last char was newline, add one extra, since
- // wrapping automatically removes it.
- if ( text[ text.Length() - 1 ] == '\n' )
- {
- iText->AppendL( NULL );
- }
-
- CleanupStack::PopAndDestroy(wrappedArray); // wrappedArray
- delete dataToDestroy;
-
- CleanupStack::PopAndDestroy(2); //mainText1, mainText2
- TRACES("CTouchScreenCalibView::SetTextL(); End");
- }
-
-// -----------------------------------------------------------------------------
-// CTouchScreenCalibView::ShowImage(TRect aRect)
-// -----------------------------------------------------------------------------
-void CTouchScreenCalibView::ShowImage(TRect aRect) const
- {
- TRACES("CTouchScreenCalibView::ShowImage()");
- CWindowGc& gc = SystemGc();
- AknIconUtils::SetSize( iBitmap, aRect.Size(), EAspectRatioPreservedAndUnusedSpaceRemoved );
- gc.SetPenStyle(CGraphicsContext::ENullPen);
- gc.SetBrushColor(KRgbRed);
- gc.SetBrushStyle(CGraphicsContext::ESolidBrush);
- gc.DrawRect(aRect);
- gc.BitBlt( TPoint(aRect.iTl.iX, aRect.iTl.iY), iBitmap ); // CWindowGc member function
- ControlEnv()->WsSession().Flush(); // force draw of the context
- TRACES("CTouchScreenCalibView::ShowImage(): End");
- }
-
-// -----------------------------------------------------------------------------
-// CTouchScreenCalibView::SetWinPriority()
-// -----------------------------------------------------------------------------
-void CTouchScreenCalibView::SetWinPriority(TInt aPriority)
- {
- TRACES("CTouchScreenCalibView::SetWinPriority()");
- Window().SetOrdinalPosition( 0, aPriority );
- TRACES("CTouchScreenCalibView::SetWinPriority(): End");
- }
-
-// End of File
--- a/systemswuis/touchscreencalib/tsccustcmds/bwins/tsccustcmdsu.def Thu Dec 17 08:46:07 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-EXPORTS
- ?CmdTSCStartupExtensionNewL@TSCCustCmdFactory@@SAPAVMSsmCustomCommand@@XZ @ 1 NONAME ; class MSsmCustomCommand * TSCCustCmdFactory::CmdTSCStartupExtensionNewL(void)
-
--- a/systemswuis/touchscreencalib/tsccustcmds/eabi/tsccustcmdsu.def Thu Dec 17 08:46:07 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,7 +0,0 @@
-EXPORTS
- _ZN17TSCCustCmdFactory26CmdTSCStartupExtensionNewLEv @ 1 NONAME
- _ZTI14CTSCSubscriber @ 2 NONAME ; #<TI>#
- _ZTI18CTSCPubSubObserver @ 3 NONAME ; #<TI>#
- _ZTV14CTSCSubscriber @ 4 NONAME ; #<VT>#
- _ZTV18CTSCPubSubObserver @ 5 NONAME ; #<VT>#
-
--- a/systemswuis/touchscreencalib/tsccustcmds/group/tsccustcmds.mmp Thu Dec 17 08:46:07 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,40 +0,0 @@
-/*
-* Copyright (c) 2007 - 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Project definition file for project TSCCustCmd
-*
-*/
-
-#include <platform_paths.hrh>
-
-TARGET tsccustcmds.dll
-TARGETTYPE DLL
-UID 0x1000008D 0x10283123
-
-CAPABILITY CAP_GENERAL_DLL
-VENDORID VID_DEFAULT
-
-SOURCEPATH ../src
-SOURCE tscstartupextension.cpp
-SOURCE tsccustcmdfactory.cpp
-SOURCE tscsubscriber.cpp
-SOURCE tscpubsubobserver.cpp
-
-USERINCLUDE ../inc
-USERINCLUDE ../../../inc
-
-
-// Default system include paths for middleware layer modules.
-APP_LAYER_SYSTEMINCLUDE
-
-LIBRARY euser.lib
--- a/systemswuis/touchscreencalib/tsccustcmds/inc/MTSCPropertyResponder.h Thu Dec 17 08:46:07 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,31 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Interface of Touch screen calibration property change obsever
-*
-*/
-
-#ifndef MTSCPROPERTYRESPONDER_H
-#define MTSCPROPERTYRESPONDER_H
-
-// INCLUDES
-#include <e32base.h>
-
-class MTSCPropertyResponder
- {
-public:
- virtual void HandlePropertyChangedL( const TUid& aCategory, TUint aKey ) = 0;
- };
-#endif //MTSCPROPERTYRESPONDER_H
-
-// End of File
--- a/systemswuis/touchscreencalib/tsccustcmds/inc/TSCPubSubObserver.h Thu Dec 17 08:46:07 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,76 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-* This class the handles the received indications from the Public and
-* Subscribe.
-*
-*/
-
-#ifndef TSCPUBSUBOBSERVER_H
-#define TSCPUBSUBOBSERVER_H
-
-// INCLUDES
-#include <e32property.h>
-#include "MTSCPropertyResponder.h"
-#include "tscstartupextension.h"
-
-
-
-// CLASS DECLARATION
-class CTSCStartupExtension;
-class CTSCSubscriber;
-
-class CTSCPubSubObserver : public CBase, public MTSCPropertyResponder
- {
- public: // Constructors and destructor
-
- /**
- * C++ constructor.
- */
- CTSCPubSubObserver( CTSCStartupExtension* aTSCStartupExtension );
-
- /**
- * Two-phased constructor.
- */
- static CTSCPubSubObserver* NewL( CTSCStartupExtension* aTSCStartupExtension );
-
- /**
- * Destructor.
- */
- ~CTSCPubSubObserver();
-
- private:
-
- /**
- * By default EPOC constructor is private.
- */
- void ConstructL();
-
- CTSCPubSubObserver();
-
- protected: // From MTSCPropertyResponder
-
- void HandlePropertyChangedL( const TUid& aCategory, TUint aKey );
-
- private: // Data
- //reference to application class
- CTSCStartupExtension * iTSCStartupExtension; //uses
-
- RProperty iProperty;
- CTSCSubscriber* iTSCSyncSubscriber;
- };
-
-#endif // TSCPUBSUBOBSERVER_H
-
-// End of File
--- a/systemswuis/touchscreencalib/tsccustcmds/inc/tsccustcmdfactory.h Thu Dec 17 08:46:07 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,35 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Custom command implementation factory.
-*
-*/
-
-#ifndef TSCCUSTCMDFACTORY_H
-#define TSCCUSTCMDFACTORY_H
-
-#include <e32def.h>
-
-class MSsmCustomCommand;
-
-/**
-* Creates custom command objects.
-*/
-class TSCCustCmdFactory
- {
-public:
-
- IMPORT_C static MSsmCustomCommand* CmdTSCStartupExtensionNewL();
- };
-
-#endif // TSCCUSTCMDFACTORY_H
--- a/systemswuis/touchscreencalib/tsccustcmds/inc/tscstartupextension.h Thu Dec 17 08:46:07 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,64 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Declaration of CTSCStartupExtension class.
-*
-*/
-
-#ifndef TSCSTARTUPEXTENSION_H
-#define TSCSTARTUPEXTENSION_H
-
-#include <e32base.h>
-#include <ssm/ssmcustomcommand.h>
-
-// FORWARD DECLARATIONS
-class CTSCPubSubObserver;
-
-/**
-*/
-NONSHARABLE_CLASS( CTSCStartupExtension )
- : public CBase,
- public MSsmCustomCommand
- {
-public:
-
- static CTSCStartupExtension * NewL();
- virtual ~CTSCStartupExtension ();
-
- void CalibrationDone();
-
-private: // From MSsmCustomCommand
-
- TInt Initialize( CSsmCustomCommandEnv* aCmdEnv );
- void Execute( const TDesC8& aParams, TRequestStatus& aStatus );
- void ExecuteCancel();
- void Release();
- void Close();
-
-private:
-
- /**
- * First phase constructor.
- */
- CTSCStartupExtension ();
-
-private: //data
-
- CTSCPubSubObserver* iTSCPubSubObserver; //owns
-
- TRequestStatus* iStatus;
- TBool iRequestSent;
-
- };
-
-#endif // TSCSTARTUPEXTENSION_H
--- a/systemswuis/touchscreencalib/tsccustcmds/inc/tscstartupextensiondef.h Thu Dec 17 08:46:07 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,45 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Includes some common defines used in the TSCStartupExtension
-*
-*/
-
-#ifndef TSCSTARTUPEXTENSIONDEF_H
-#define TSCSTARTUPEXTENSIONDEF_H
-
-#include <e32debug.h>
-
-//CONSTANTS
-_LIT( KTouchScreenCalibAppName, "TSCStartupExtension" );
-
-// MACROS
-
-#define PANIC(aPanic) User::Panic( KTouchScreenCalibAppName, aPanic )
-
-#define TRACE_ADDPREFIX(aText) (TPtrC((const TText *)L"TSCStartupExtension: \"" L##aText L"\""))
-
-#ifdef _DEBUG
-#define TRACES(aMsg) RDebug::Print( TRACE_ADDPREFIX(aMsg) )
-#define TRACES1(aFormat,aP1) RDebug::Print( TRACE_ADDPREFIX(aFormat),(aP1) )
-#define TRACES2(aFormat,aP1,aP2) RDebug::Print( TRACE_ADDPREFIX(aFormat),(aP1),(aP2) )
-#define TRACES3(aFormat,aP1,aP2,aP3) RDebug::Print( TRACE_ADDPREFIX(aFormat),(aP1),(aP2),(aP3) )
-#else
-#define TRACES(aMsg)
-#define TRACES1(aFormat,aP1)
-#define TRACES2(aFormat,aP1,aP2)
-#define TRACES3(aFormat,aP1,aP2,aP3)
-#endif
-#endif // TSCSTARTUPEXTENSIONDEF_H
-
-// End of File
--- a/systemswuis/touchscreencalib/tsccustcmds/inc/tscsubscriber.h Thu Dec 17 08:46:07 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,91 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: TSC Subscriber (Publish & Subscribe).
-*
-*/
-
-#ifndef TSCPLUGINSUBSCRIBER_H
-#define TSCPLUGINSUBSCRIBER_H
-
-// INCLUDES
-#include <e32base.h>
-#include <e32property.h>
-#include "MTSCPropertyResponder.h"
-
-// CLASS DECLARATION
-/**
-* CTSCSubscriber
-*
-* @lib tscstartupextensionplugin
-* @since 3.2
-*/
-
-class CTSCSubscriber : public CActive
-{
-public:
- /**
- * Two-phased constructor.
- */
- static CTSCSubscriber* NewL( MTSCPropertyResponder& aTSCPropertyResponder,
- const TUid& aCategory,
- TUint aKey );
-
- /**
- * Destructor.
- */
- ~CTSCSubscriber();
-
- void Subscribe();
-
-private:
- CTSCSubscriber( MTSCPropertyResponder& aTSCPropertyResponder,
- const TUid& aCategory, TUint
- aKey );
- void ConstructL();
-
-public: // from CActive
- /**
- * @param none
- * @return none
- */
- void RunL();
-
- /**
- * @param aError the error returned
- * @return error
- */
- TInt RunError( TInt aError );
-
- /**
- * @param none
- * @return none
- */
- void DoCancel();
-
-private: // Methods not implemented
- CTSCSubscriber( const CTSCSubscriber& ); // Copy constructor
- CTSCSubscriber& operator=( const CTSCSubscriber& );// Assigment operator
-
-private:
-
- MTSCPropertyResponder& iTSCPropertyResponder;
- RProperty iProperty;
- TUid iCategory;
- TUint iKey;
-};
-
-
-#endif // TSCSUBSCRIBER_H
-
-// End of File
--- a/systemswuis/touchscreencalib/tsccustcmds/src/tsccustcmdfactory.cpp Thu Dec 17 08:46:07 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,26 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Custom command implementation factory.
-*
-*/
-
-#include "tsccustcmdfactory.h"
-#include "tscstartupextension.h"
-
-// ======== MEMBER FUNCTIONS ========
-
-EXPORT_C MSsmCustomCommand* TSCCustCmdFactory::CmdTSCStartupExtensionNewL()
- {
- return CTSCStartupExtension::NewL();
- }
--- a/systemswuis/touchscreencalib/tsccustcmds/src/tscpubsubobserver.cpp Thu Dec 17 08:46:07 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,131 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-* This class the handles the received indications from the Public and
-* Subscribe.
-*
-*/
-
-// SYSTEM INCLUDES
-#ifdef RD_STARTUP_ANIMATION_CUSTOMIZATION
-#include <e32cmn.h>
-#include <touchscprivatepskeys.h>
-#else //RD_STARTUP_ANIMATION_CUSTOMIZATION
-#include <StartupAppInternalPSKeys.h>
-#endif //RD_STARTUP_ANIMATION_CUSTOMIZATION
-
-// USER INCLUDES
-#include "TSCPubSubObserver.h"
-#include "tscsubscriber.h"
-#include "tscstartupextensiondef.h"
-
-// ================= MEMBER FUNCTIONS =======================
-
-// ----------------------------------------------------
-// CTSCPubSubObserver::CTSCPubSubObserver( CTSCStartupExtension* aTSCStartupExtension )
-// C++ default constructor can NOT contain any code, that
-// might leave.
-// ----------------------------------------------------
-CTSCPubSubObserver::CTSCPubSubObserver( CTSCStartupExtension* aTSCStartupExtension ) :
- iTSCStartupExtension( aTSCStartupExtension )
- {
- }
-
-// ----------------------------------------------------
-// CTSCPubSubObserver::ConstructL()
-// ----------------------------------------------------
-void CTSCPubSubObserver::ConstructL()
- {
- TRACES("CTSCPubSubObserver::ConstructL()");
-
- iTSCSyncSubscriber = CTSCSubscriber::NewL( *this,
-#ifdef RD_STARTUP_ANIMATION_CUSTOMIZATION
- KPSUidTouchScreenCalibration,
-#else //RD_STARTUP_ANIMATION_CUSTOMIZATION
- KPSUidStartup,
-#endif //RD_STARTUP_ANIMATION_CUSTOMIZATION
- KPSTouchScreenCalibration );
- iTSCSyncSubscriber->Subscribe();
-
- TInt touchScreenCalibrationState;
-#ifdef RD_STARTUP_ANIMATION_CUSTOMIZATION
- RProperty::Get( KPSUidTouchScreenCalibration, KPSTouchScreenCalibration, touchScreenCalibrationState );
-#else //RD_STARTUP_ANIMATION_CUSTOMIZATION
- RProperty::Get( KPSUidStartup, KPSTouchScreenCalibration, touchScreenCalibrationState );
-#endif //RD_STARTUP_ANIMATION_CUSTOMIZATION
- if ( touchScreenCalibrationState == ETouchScreenCalibrationOk )
- {
- iTSCStartupExtension->CalibrationDone();
- }
-
- TRACES("CTSCPubSubObserver::ConstructL(): End");
- }
-
-// ----------------------------------------------------------------------------
-// CTSCPubSubObserver::HandlePropertyChangedL()
-// ----------------------------------------------------------------------------
-void CTSCPubSubObserver::HandlePropertyChangedL( const TUid& /*aCategory*/, TUint aKey )
- {
- TRACES("CTSCPubSubObserver::HandlePropertyChangedL()");
- TRACES1("CTSCPubSubObserver::HandlePropertyChangedL(): aKey: %d",aKey );
-
- if (aKey == KPSTouchScreenCalibration)
- {
- TInt state;
-
-#ifdef RD_STARTUP_ANIMATION_CUSTOMIZATION
- RProperty::Get( KPSUidTouchScreenCalibration, KPSTouchScreenCalibration, state );
-#else //RD_STARTUP_ANIMATION_CUSTOMIZATION
- RProperty::Get( KPSUidStartup, KPSTouchScreenCalibration, state );
-#endif //RD_STARTUP_ANIMATION_CUSTOMIZATION
-
- if ( state == ETouchScreenCalibrationOk )
- {
- iTSCStartupExtension->CalibrationDone();
- }
- }
-
- TRACES("CTSCPubSubObserver::HandlePropertyChangedL(): End");
- }
-
-// ----------------------------------------------------
-// CTSCPubSubObserver::NewL( CTSCStartupExtension* aTSCStartupExtension )
-// ----------------------------------------------------
-CTSCPubSubObserver* CTSCPubSubObserver::NewL( CTSCStartupExtension* aTSCStartupExtension )
- {
- TRACES("CTSCPubSubObserver::NewL()");
- CTSCPubSubObserver* self = new (ELeave) CTSCPubSubObserver( aTSCStartupExtension );
-
- CleanupStack::PushL( self );
- self->ConstructL();
- CleanupStack::Pop(); // self
-
- TRACES("CTSCPubSubObserver::NewL(): End");
- return self;
- }
-
-// ----------------------------------------------------
-// CTSCPubSubObserver::~CTSCPubSubObserver()
-// ----------------------------------------------------
-CTSCPubSubObserver::~CTSCPubSubObserver()
- {
- TRACES("CTSCPubSubObserver::~CTSCPubSubObserver()");
-
- delete iTSCSyncSubscriber;
- iProperty.Close();
-
- TRACES("CTSCPubSubObserver::~CTSCPubSubObserver(): End");
- }
-
-// End of File
--- a/systemswuis/touchscreencalib/tsccustcmds/src/tscstartupextension.cpp Thu Dec 17 08:46:07 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,148 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Declaration of CTSCStartupExtension class.
-*
-*/
-
-#include "tscstartupextension.h"
-#include "tscstartupextensiondef.h"
-#include "TSCPubSubObserver.h"
-
-
-// ======== MEMBER FUNCTIONS ========
-
-// ---------------------------------------------------------------------------
-// CDiskSpaceReserve::NewL
-//
-// ---------------------------------------------------------------------------
-//
-CTSCStartupExtension * CTSCStartupExtension ::NewL()
- {
- TRACES("CTSCStartupExtension :: NewL ()");
- CTSCStartupExtension * self = new ( ELeave ) CTSCStartupExtension ;
-
- return self;
- }
-
-
-// ---------------------------------------------------------------------------
-// Destructor
-//
-// ---------------------------------------------------------------------------
-//
-CTSCStartupExtension::~CTSCStartupExtension ()
- {
- TRACES("CTSCStartupExtension ::~CTSCStartupExtension ()");
-
- TRACES("CTSCStartupExtension ::~CTSCStartupExtension () End");
- }
-
-
-
-// ---------------------------------------------------------------------------
-// First phase constructor
-//
-// ---------------------------------------------------------------------------
-//
-CTSCStartupExtension::CTSCStartupExtension()
- :iRequestSent(EFalse)
- {
- }
-
-// ---------------------------------------------------------------------------
-// CTSCStartupExtension::Initialize
-//
-// ---------------------------------------------------------------------------
-//
-TInt CTSCStartupExtension::Initialize( CSsmCustomCommandEnv* /*aCmdEnv*/ )
- {
- TRACES("CTSCStartupExtension::Initialize()");
- iTSCPubSubObserver = CTSCPubSubObserver::NewL( this );
- return KErrNone;
- }
-
-
-// ---------------------------------------------------------------------------
-// CTSCStartupExtension::Execute
-//
-// ---------------------------------------------------------------------------
-//
-void CTSCStartupExtension::Execute(
- const TDesC8& /*aParams*/,
- TRequestStatus& aStatus )
- {
- TRACES("CTSCStartupExtension::ExecuteL()");
- aStatus = KRequestPending;
- iStatus = &aStatus;
- TRACES("CTSCStartupExtension::ExecuteL(): End");
- }
-
-
-// ---------------------------------------------------------------------------
-// CTSCStartupExtension::ExecuteCancel
-//
-// ---------------------------------------------------------------------------
-//
-void CTSCStartupExtension::ExecuteCancel()
- {
- // Nothing to do.
- }
-
-
-// ---------------------------------------------------------------------------
-// CTSCStartupExtension::Release
-//
-// ---------------------------------------------------------------------------
-//
-void CTSCStartupExtension::Release()
- {
- delete this;
- }
-
-
-// ---------------------------------------------------------------------------
-// CTSCStartupExtension::Close
-//
-// ---------------------------------------------------------------------------
-//
-void CTSCStartupExtension::Close()
- {
- TRACES("CTSCStartupExtension :: Close()");
- if (iTSCPubSubObserver)
- {
- delete iTSCPubSubObserver;
- iTSCPubSubObserver = NULL;
- }
- TRACES("CTSCStartupExtension :: Close() End");
- }
-
-// ---------------------------------------------------------------------------
-// CTSCStartupExtension::CalibrationDone
-//
-// ---------------------------------------------------------------------------
-//
-void CTSCStartupExtension::CalibrationDone()
- {
- TRACES("CTSCStartupExtension::CalibrationDone()");
- if (!iRequestSent)
- {
- TRACES("CTSCStartupExtension::CalibrationDone(): Send complete request");
- TInt errorCode = KErrNone;
- User::RequestComplete( iStatus, errorCode );
- iRequestSent = ETrue;
- }
- TRACES("CTSCStartupExtension::CalibrationDone(): End");
- }
-
-
--- a/systemswuis/touchscreencalib/tsccustcmds/src/tscsubscriber.cpp Thu Dec 17 08:46:07 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,119 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: TSC Subscriber (Publish & Subscribe).
-*
-*/
-
-// INCLUDES
-#include <e32svr.h>
-#include "tscstartupextension.h"
-#include "tscsubscriber.h"
-#include "tscstartupextensiondef.h"
-
-// CONSTANTS
-
-// ============================= MEMBER FUNCTIONS =============================
-
-// ----------------------------------------------------------------------------
-// CTSCSubscriber::NewL()
-// ----------------------------------------------------------------------------
-CTSCSubscriber* CTSCSubscriber::NewL(
- MTSCPropertyResponder& aTSCPropertyResponder,
- const TUid& aCategory,
- TUint aKey )
- {
- CTSCSubscriber* self = new (ELeave) CTSCSubscriber( aTSCPropertyResponder,
- aCategory,
- aKey );
- CleanupStack::PushL( self );
- self->ConstructL();
- CleanupStack::Pop(); //self
- return self;
- }
-
-// ----------------------------------------------------------------------------
-// CTSCSubscriber::ConstructL()
-// ----------------------------------------------------------------------------
-void CTSCSubscriber::ConstructL()
- {
- CActiveScheduler::Add( this );
- iProperty.Attach( iCategory, iKey );
- }
-
-// ----------------------------------------------------------------------------
-// CTSCSubscriber::Subscribe()
-// ----------------------------------------------------------------------------
-void CTSCSubscriber::Subscribe()
- {
- TRACES("CTSCSubscriber::Subscribe()");
- iProperty.Subscribe( iStatus );
- SetActive();
- TRACES("CTSCSubscriber::Subscribe(): End");
- }
-
-// ----------------------------------------------------------------------------
-// CTSCSubscriber::CTSCSubscriber()
-// ----------------------------------------------------------------------------
-CTSCSubscriber::CTSCSubscriber( MTSCPropertyResponder& aTSCPropertyResponder,
- const TUid& aCategory,
- TUint aKey ) :
- CActive( EPriorityStandard ),
- iTSCPropertyResponder( aTSCPropertyResponder ),
- iCategory( aCategory),
- iKey( aKey )
- {
- }
-
-// ----------------------------------------------------------------------------
-// CTSCSubscriber::RunL()
-// ----------------------------------------------------------------------------
-void CTSCSubscriber::RunL()
- {
- TRACES("CTSCSubscriber::RunL()");
- Subscribe();
- iTSCPropertyResponder.HandlePropertyChangedL( iCategory, iKey );
- TRACES("CTSCSubscriber::RunL(): End");
- }
-
-// ----------------------------------------------------------------------------
-// CTSCSubscriber::DoCancel()
-// ----------------------------------------------------------------------------
-void CTSCSubscriber::DoCancel()
- {
- iProperty.Cancel();
- }
-
-// ----------------------------------------------------------------------------
-// CTSCSubscriber::RunError()
-// ----------------------------------------------------------------------------
-TInt CTSCSubscriber::RunError( TInt aError )
- {
- return aError;
- }
-
-// ----------------------------------------------------------------------------
-// CTSCSubscriber::~CTSCSubscriber()
-// ----------------------------------------------------------------------------
-CTSCSubscriber::~CTSCSubscriber()
- {
- TRACES("CTSCSubscriber::~CTSCSubscriber()");
- Cancel();
- iProperty.Close();
- TRACES("CTSCSubscriber::~CTSCSubscriber(): End");
- }
-
-// End of File
-
-
-
--- a/systemswuis/touchscreencalib/tscstartupextensionplugin/data/10283123.rss Thu Dec 17 08:46:07 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,58 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Registry info resource file for TSCStartupExtensionPlugIn
-* ECOM plugin.
-*
-*/
-
-
-
-// INCLUDES
-#include "registryinfov2.rh"
-
-// RESOURCE DEFINITIONS
-// ---------------------------------------------------------
-//
-// tscstartupextensionplugin_registry_info
-// Registry info resource.
-//
-// ---------------------------------------------------------
-//
-RESOURCE REGISTRY_INFO tscstartupextensionplugin_registry_info
- {
- resource_format_version = RESOURCE_FORMAT_VERSION_2;
- dll_uid = 0x10283123;
- interfaces =
- {
- INTERFACE_INFO
- {
- interface_uid = 0x10205067; // UID of System startup extension plug-in API
- implementations =
- {
- IMPLEMENTATION_INFO
- {
- implementation_uid = 0x10283124;
- version_no = 1;
- display_name = "TSCStartupExtensionPlugIn";
- default_data = "";
- opaque_data = "";
- rom_only = 1;
- }
- };
- }
- };
- }
-
-
-// End of File
--- a/systemswuis/touchscreencalib/tscstartupextensionplugin/group/tscstartupextensionplugin.mmp Thu Dec 17 08:46:07 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,48 +0,0 @@
-/*
-* Copyright (c) 2007 - 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Project definition file for project TSCStartupExtensionPlugIn
-*
-*/
-
-
-#include <data_caging_paths.hrh>
-#include <platform_paths.hrh>
-
-TARGET tscstartupextensionplugin.dll
-CAPABILITY CAP_ECOM_PLUGIN
-TARGETTYPE PLUGIN
-UID 0x10009D8D 0x10283123
-VENDORID VID_DEFAULT
-
-SOURCEPATH ../src
-SOURCE tscstartupextensionplugin.cpp
-SOURCE implementationfactory.cpp
-SOURCE tscpluginsubscriber.cpp
-SOURCE tscpluginpubsubobserver.cpp
-
-USERINCLUDE ../inc
-USERINCLUDE ../../../inc
-
-SYSTEMINCLUDE /epoc32/include/ecom
-
-
-START RESOURCE ../data/10283123.rss
-TARGET tscstartupextensionplugin.rsc
-END
-
-
-APP_LAYER_SYSTEMINCLUDE
-
-LIBRARY euser.lib
-LIBRARY ecom.lib
--- a/systemswuis/touchscreencalib/tscstartupextensionplugin/inc/MTSCPlugInPropertyResponder.h Thu Dec 17 08:46:07 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,32 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Interface of Touch screen calibration property change obsever
-*
-*/
-
-
-#ifndef MTSCPLUGINPROPERTYRESPONDER_H
-#define MTSCPLUGINPROPERTYRESPONDER_H
-
-// INCLUDES
-#include <e32base.h>
-
-class MTSCPlugInPropertyResponder
- {
-public:
- virtual void HandlePropertyChangedL( const TUid& aCategory, TUint aKey ) = 0;
- };
-#endif //MTSCPLUGINPROPERTYRESPONDER_H
-
-// End of File
--- a/systemswuis/touchscreencalib/tscstartupextensionplugin/inc/TSCPlugInPubSubObserver.h Thu Dec 17 08:46:07 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,77 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-* This class the handles the received indications from the Public and
-* Subscribe.
-*
-*/
-
-
-#ifndef TSCPLUGINPUBSUBOBSERVER_H
-#define TSCPLUGINPUBSUBOBSERVER_H
-
-// INCLUDES
-#include <e32property.h>
-#include "MTSCPlugInPropertyResponder.h"
-#include "tscstartupextensionplugin.h"
-
-
-
-// CLASS DECLARATION
-class CTSCStartupExtensionPlugIn;
-class CTSCPlugInSubscriber;
-
-class CTSCPlugInPubSubObserver : public CBase, public MTSCPlugInPropertyResponder
- {
- public: // Constructors and destructor
-
- /**
- * C++ constructor.
- */
- CTSCPlugInPubSubObserver( CTSCStartupExtensionPlugIn* aTSCStartupExtensionPlugIn );
-
- /**
- * Two-phased constructor.
- */
- static CTSCPlugInPubSubObserver* NewL( CTSCStartupExtensionPlugIn* aTSCStartupExtensionPlugIn );
-
- /**
- * Destructor.
- */
- ~CTSCPlugInPubSubObserver();
-
- private:
-
- /**
- * By default EPOC constructor is private.
- */
- void ConstructL();
-
- CTSCPlugInPubSubObserver();
-
- protected: // From MTSCPlugInPropertyResponder
-
- void HandlePropertyChangedL( const TUid& aCategory, TUint aKey );
-
- private: // Data
- //reference to application class
- CTSCStartupExtensionPlugIn* iTSCStartupExtensionPlugIn; //uses
-
- RProperty iProperty;
- CTSCPlugInSubscriber* iTSCSyncSubscriber;
- };
-
-#endif // TSCPLUGINPUBSUBOBSERVER_H
-
-// End of File
--- a/systemswuis/touchscreencalib/tscstartupextensionplugin/inc/tscpluginsubscriber.h Thu Dec 17 08:46:07 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,92 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: TSC Subscriber (Publish & Subscribe).
-*
-*/
-
-
-#ifndef TSCPLUGINSUBSCRIBER_H
-#define TSCPLUGINSUBSCRIBER_H
-
-// INCLUDES
-#include <e32base.h>
-#include <e32property.h>
-#include "MTSCPlugInPropertyResponder.h"
-
-// CLASS DECLARATION
-/**
-* CTSCPlugInSubscriber
-*
-* @lib tscstartupextensionplugin
-* @since 3.2
-*/
-
-class CTSCPlugInSubscriber : public CActive
-{
-public:
- /**
- * Two-phased constructor.
- */
- static CTSCPlugInSubscriber* NewL( MTSCPlugInPropertyResponder& aTSCPlugInPropertyResponder,
- const TUid& aCategory,
- TUint aKey );
-
- /**
- * Destructor.
- */
- ~CTSCPlugInSubscriber();
-
- void Subscribe();
-
-private:
- CTSCPlugInSubscriber( MTSCPlugInPropertyResponder& aTSCPlugInPropertyResponder,
- const TUid& aCategory, TUint
- aKey );
- void ConstructL();
-
-public: // from CActive
- /**
- * @param none
- * @return none
- */
- void RunL();
-
- /**
- * @param aError the error returned
- * @return error
- */
- TInt RunError( TInt aError );
-
- /**
- * @param none
- * @return none
- */
- void DoCancel();
-
-private: // Methods not implemented
- CTSCPlugInSubscriber( const CTSCPlugInSubscriber& ); // Copy constructor
- CTSCPlugInSubscriber& operator=( const CTSCPlugInSubscriber& );// Assigment operator
-
-private:
-
- MTSCPlugInPropertyResponder& iTSCPlugInPropertyResponder;
- RProperty iProperty;
- TUid iCategory;
- TUint iKey;
-};
-
-
-#endif // TSCPLUGINSUBSCRIBER_H
-
-// End of File
--- a/systemswuis/touchscreencalib/tscstartupextensionplugin/inc/tscstartupextensionplugin.h Thu Dec 17 08:46:07 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,85 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Declaration of CTSCStartupExtensionPlugIn class.
-*
-*/
-
-
-#ifndef TSCSTARTUPEXTENSIONPLUGIN_H
-#define TSCSTARTUPEXTENSIONPLUGIN_H
-
-#include <systemstartupextension.h>
-
-// FORWARD DECLARATIONS
-class CTSCPlugInPubSubObserver;
-
-/**
- * System Startup Extension plug-in for executing Touch Screen Calibration
- * during system startup.
- *
- * @lib tscstartupextensionplugin.lib
- * @since S60 3.2
- */
-NONSHARABLE_CLASS( CTSCStartupExtensionPlugIn )
- : public CSystemStartupExtension
- {
-
-public:
-
- static CTSCStartupExtensionPlugIn* NewL( TAny* aConstructionParameters );
-
- virtual ~CTSCStartupExtensionPlugIn();
-
- /**
- * Execute TSC operations depending on parameters.
- *
- * @since S60 3.2
- * @param aStatus The request status to complete after the task has been
- * finished.
- */
- virtual void ExecuteL( TRequestStatus& aStatus, const TDesC& aParams );
-
- /**
- * Cancel pending request.
- *
- * @since S60 3.2
- */
- virtual void Cancel();
-
- /**
- *
- * @since S60 3.2
- * @param none
- */
- void CalibrationDone();
-
-private:
-
- CTSCStartupExtensionPlugIn( TAny* aConstructionParameters );
-
- /**
- * Second phase constructor.
- *
- */
- void ConstructL();
-
-private: //data
-
- CTSCPlugInPubSubObserver* iTSCPlugInPubSubObserver; //owns
-
- TRequestStatus* iStatus;
- TBool iRequestSent;
- };
-
-#endif // TSCSTARTUPEXTENSIONPLUGIN_H
--- a/systemswuis/touchscreencalib/tscstartupextensionplugin/inc/tscstartupextensionplugindef.h Thu Dec 17 08:46:07 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,46 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Includes some common defines used in the TSCStartupExtensionPlugIn
-*
-*/
-
-
-#ifndef TSCSTARTUPEXTENSIONPLUGINDEF_H
-#define TSCSTARTUPEXTENSIONPLUGINDEF_H
-
-#include <e32debug.h>
-
-//CONSTANTS
-_LIT( KTouchScreenCalibAppName, "TSCStartupExtensionPlugIn" );
-
-// MACROS
-
-#define PANIC(aPanic) User::Panic( KTouchScreenCalibAppName, aPanic )
-
-#define TRACE_ADDPREFIX(aText) (TPtrC((const TText *)L"TSCStartupExtensionPlugIn: \"" L##aText L"\""))
-
-#ifdef _DEBUG
-#define TRACES(aMsg) RDebug::Print( TRACE_ADDPREFIX(aMsg) )
-#define TRACES1(aFormat,aP1) RDebug::Print( TRACE_ADDPREFIX(aFormat),(aP1) )
-#define TRACES2(aFormat,aP1,aP2) RDebug::Print( TRACE_ADDPREFIX(aFormat),(aP1),(aP2) )
-#define TRACES3(aFormat,aP1,aP2,aP3) RDebug::Print( TRACE_ADDPREFIX(aFormat),(aP1),(aP2),(aP3) )
-#else
-#define TRACES(aMsg)
-#define TRACES1(aFormat,aP1)
-#define TRACES2(aFormat,aP1,aP2)
-#define TRACES3(aFormat,aP1,aP2,aP3)
-#endif
-#endif // TSCSTARTUPEXTENSIONPLUGINDEF_H
-
-// End of File
--- a/systemswuis/touchscreencalib/tscstartupextensionplugin/src/implementationfactory.cpp Thu Dec 17 08:46:07 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,43 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: TSCStartupExtensionPlugIn ECOM implementation factory.
-*
-*/
-
-
-#include "tscstartupextensionplugin.h"
-
-#include <implementationproxy.h>
-
-// Define the interface UIDs.
-const TImplementationProxy ImplementationTable[] =
- {
- IMPLEMENTATION_PROXY_ENTRY( 0x10283124, CTSCStartupExtensionPlugIn::NewL )
- };
-
-// ========================== OTHER EXPORTED FUNCTIONS =========================
-
-// -----------------------------------------------------------------------------
-// ImplementationGroupProxy.
-//
-// -----------------------------------------------------------------------------
-//
-EXPORT_C const TImplementationProxy* ImplementationGroupProxy( TInt& aTableCount )
- {
- aTableCount = sizeof( ImplementationTable ) / sizeof( TImplementationProxy );
- return ImplementationTable;
- }
-
-
-// End of File
--- a/systemswuis/touchscreencalib/tscstartupextensionplugin/src/tscpluginpubsubobserver.cpp Thu Dec 17 08:46:07 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,132 +0,0 @@
-/*
-* Copyright (c) 2007 - 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-* This class the handles the received indications from the Public and
-* Subscribe.
-*
-*/
-
-
-// SYSTEM INCLUDES
-#ifdef RD_STARTUP_ANIMATION_CUSTOMIZATION
-#include <e32cmn.h>
-#include <touchscprivatepskeys.h>
-#else //RD_STARTUP_ANIMATION_CUSTOMIZATION
-#include <StartupAppInternalPSKeys.h>
-#endif //RD_STARTUP_ANIMATION_CUSTOMIZATION
-
-// USER INCLUDES
-#include "TSCPlugInPubSubObserver.h"
-#include "tscpluginsubscriber.h"
-#include "tscstartupextensionplugindef.h"
-
-// ================= MEMBER FUNCTIONS =======================
-
-// ----------------------------------------------------
-// TSCPlugInPubSubObserver::TSCPlugInPubSubObserver( CTSCStartupExtensionPlugIn* aTSCStartupExtensionPlugIn )
-// C++ default constructor can NOT contain any code, that
-// might leave.
-// ----------------------------------------------------
-CTSCPlugInPubSubObserver::CTSCPlugInPubSubObserver( CTSCStartupExtensionPlugIn* aTSCStartupExtensionPlugIn ) :
- iTSCStartupExtensionPlugIn( aTSCStartupExtensionPlugIn )
- {
- }
-
-// ----------------------------------------------------
-// CTSCPlugInPubSubObserver::ConstructL()
-// ----------------------------------------------------
-void CTSCPlugInPubSubObserver::ConstructL()
- {
- TRACES("CTSCPlugInPubSubObserver::ConstructL()");
-
- iTSCSyncSubscriber = CTSCPlugInSubscriber::NewL( *this,
-#ifdef RD_STARTUP_ANIMATION_CUSTOMIZATION
- KPSUidTouchScreenCalibration,
-#else //RD_STARTUP_ANIMATION_CUSTOMIZATION
- KPSUidStartup,
-#endif //RD_STARTUP_ANIMATION_CUSTOMIZATION
- KPSTouchScreenCalibration );
- iTSCSyncSubscriber->Subscribe();
-
- TInt touchScreenCalibrationState;
-#ifdef RD_STARTUP_ANIMATION_CUSTOMIZATION
- RProperty::Get( KPSUidTouchScreenCalibration, KPSTouchScreenCalibration, touchScreenCalibrationState );
-#else //RD_STARTUP_ANIMATION_CUSTOMIZATION
- RProperty::Get( KPSUidStartup, KPSTouchScreenCalibration, touchScreenCalibrationState );
-#endif //RD_STARTUP_ANIMATION_CUSTOMIZATION
- if ( touchScreenCalibrationState == ETouchScreenCalibrationOk )
- {
- iTSCStartupExtensionPlugIn->CalibrationDone();
- }
-
- TRACES("CTSCPlugInPubSubObserver::ConstructL(): End");
- }
-
-// ----------------------------------------------------------------------------
-// CTSCPlugInPubSubObserver::HandlePropertyChangedL()
-// ----------------------------------------------------------------------------
-void CTSCPlugInPubSubObserver::HandlePropertyChangedL( const TUid& /*aCategory*/, TUint aKey )
- {
- TRACES("CTSCPlugInPubSubObserver::HandlePropertyChangedL()");
- TRACES1("CTSCPlugInPubSubObserver::HandlePropertyChangedL(): aKey: %d",aKey );
-
- if (aKey == KPSTouchScreenCalibration)
- {
- TInt state;
-
-#ifdef RD_STARTUP_ANIMATION_CUSTOMIZATION
- RProperty::Get( KPSUidTouchScreenCalibration, KPSTouchScreenCalibration, state );
-#else //RD_STARTUP_ANIMATION_CUSTOMIZATION
- RProperty::Get( KPSUidStartup, KPSTouchScreenCalibration, state );
-#endif //RD_STARTUP_ANIMATION_CUSTOMIZATION
-
- if ( state == ETouchScreenCalibrationOk )
- {
- iTSCStartupExtensionPlugIn->CalibrationDone();
- }
- }
-
- TRACES("CTSCPlugInPubSubObserver::HandlePropertyChangedL(): End");
- }
-
-// ----------------------------------------------------
-// CTSCPlugInPubSubObserver::NewL( CTSCStartupExtensionPlugIn* aTSCStartupExtensionPlugIn )
-// ----------------------------------------------------
-CTSCPlugInPubSubObserver* CTSCPlugInPubSubObserver::NewL( CTSCStartupExtensionPlugIn* aTSCStartupExtensionPlugIn )
- {
- TRACES("CTSCPlugInPubSubObserver::NewL()");
- CTSCPlugInPubSubObserver* self = new (ELeave) CTSCPlugInPubSubObserver( aTSCStartupExtensionPlugIn );
-
- CleanupStack::PushL( self );
- self->ConstructL();
- CleanupStack::Pop(); // self
-
- TRACES("CTSCPlugInPubSubObserver::NewL(): End");
- return self;
- }
-
-// ----------------------------------------------------
-// CTSCPlugInPubSubObserver::~CTSCPlugInPubSubObserver()
-// ----------------------------------------------------
-CTSCPlugInPubSubObserver::~CTSCPlugInPubSubObserver()
- {
- TRACES("CTSCPlugInPubSubObserver::~CTSCPlugInPubSubObserver()");
-
- delete iTSCSyncSubscriber;
- iProperty.Close();
-
- TRACES("CTSCPlugInPubSubObserver::~CTSCPlugInPubSubObserver(): End");
- }
-
-// End of File
--- a/systemswuis/touchscreencalib/tscstartupextensionplugin/src/tscpluginsubscriber.cpp Thu Dec 17 08:46:07 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,120 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: CTSCPlugInSubscriber implementation.
- *
-*/
-
-
-// INCLUDES
-#include <e32svr.h>
-#include "tscstartupextensionplugin.h"
-#include "tscpluginsubscriber.h"
-#include "tscstartupextensionplugindef.h"
-
-// CONSTANTS
-
-// ============================= MEMBER FUNCTIONS =============================
-
-// ----------------------------------------------------------------------------
-// CTSCPlugInSubscriber::NewL()
-// ----------------------------------------------------------------------------
-CTSCPlugInSubscriber* CTSCPlugInSubscriber::NewL(
- MTSCPlugInPropertyResponder& aTSCPlugInPropertyResponder,
- const TUid& aCategory,
- TUint aKey )
- {
- CTSCPlugInSubscriber* self = new (ELeave) CTSCPlugInSubscriber( aTSCPlugInPropertyResponder,
- aCategory,
- aKey );
- CleanupStack::PushL( self );
- self->ConstructL();
- CleanupStack::Pop(); //self
- return self;
- }
-
-// ----------------------------------------------------------------------------
-// CTSCPlugInSubscriber::ConstructL()
-// ----------------------------------------------------------------------------
-void CTSCPlugInSubscriber::ConstructL()
- {
- CActiveScheduler::Add( this );
- iProperty.Attach( iCategory, iKey );
- }
-
-// ----------------------------------------------------------------------------
-// CTSCPlugInSubscriber::Subscribe()
-// ----------------------------------------------------------------------------
-void CTSCPlugInSubscriber::Subscribe()
- {
- TRACES("CTSCPlugInSubscriber::Subscribe()");
- iProperty.Subscribe( iStatus );
- SetActive();
- TRACES("CTSCPlugInSubscriber::Subscribe(): End");
- }
-
-// ----------------------------------------------------------------------------
-// CTSCPlugInSubscriber::CTSCPlugInSubscriber()
-// ----------------------------------------------------------------------------
-CTSCPlugInSubscriber::CTSCPlugInSubscriber( MTSCPlugInPropertyResponder& aTSCPlugInPropertyResponder,
- const TUid& aCategory,
- TUint aKey ) :
- CActive( EPriorityStandard ),
- iTSCPlugInPropertyResponder( aTSCPlugInPropertyResponder ),
- iCategory( aCategory),
- iKey( aKey )
- {
- }
-
-// ----------------------------------------------------------------------------
-// CTSCPlugInSubscriber::RunL()
-// ----------------------------------------------------------------------------
-void CTSCPlugInSubscriber::RunL()
- {
- TRACES("CTSCPlugInSubscriber::RunL()");
- Subscribe();
- iTSCPlugInPropertyResponder.HandlePropertyChangedL( iCategory, iKey );
- TRACES("CTSCPlugInSubscriber::RunL(): End");
- }
-
-// ----------------------------------------------------------------------------
-// CTSCPlugInSubscriber::DoCancel()
-// ----------------------------------------------------------------------------
-void CTSCPlugInSubscriber::DoCancel()
- {
- iProperty.Cancel();
- }
-
-// ----------------------------------------------------------------------------
-// CTSCPlugInSubscriber::RunError()
-// ----------------------------------------------------------------------------
-TInt CTSCPlugInSubscriber::RunError( TInt aError )
- {
- return aError;
- }
-
-// ----------------------------------------------------------------------------
-// CTSCPlugInSubscriber::~CTSCPlugInSubscriber()
-// ----------------------------------------------------------------------------
-CTSCPlugInSubscriber::~CTSCPlugInSubscriber()
- {
- TRACES("CTSCPlugInSubscriber::~CTSCPlugInSubscriber()");
- Cancel();
- iProperty.Close();
- TRACES("CTSCPlugInSubscriber::~CTSCPlugInSubscriber(): End");
- }
-
-// End of File
-
-
-
--- a/systemswuis/touchscreencalib/tscstartupextensionplugin/src/tscstartupextensionplugin.cpp Thu Dec 17 08:46:07 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,124 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Implementation of CTSCStartupExtensionPlugIn class.
-*
-*/
-
-
-#include "tscstartupextensionplugin.h"
-#include "tscstartupextensionplugindef.h"
-#include "TSCPlugInPubSubObserver.h"
-
-// ======== MEMBER FUNCTIONS ========
-
-// ---------------------------------------------------------------------------
-// Constructor
-//
-// ---------------------------------------------------------------------------
-//
-CTSCStartupExtensionPlugIn* CTSCStartupExtensionPlugIn::NewL(
- TAny* aConstructionParameters )
- {
- CTSCStartupExtensionPlugIn* self =
- new( ELeave ) CTSCStartupExtensionPlugIn( aConstructionParameters );
- CleanupStack::PushL( self );
- self->ConstructL();
- CleanupStack::Pop( self );
- return self;
- }
-
-
-// ---------------------------------------------------------------------------
-// Destructor
-//
-// ---------------------------------------------------------------------------
-//
-CTSCStartupExtensionPlugIn::~CTSCStartupExtensionPlugIn()
- {
- TRACES("CTSCStartupExtensionPlugIn::~CTSCStartupExtensionPlugIn()");
- if (iTSCPlugInPubSubObserver)
- {
- delete iTSCPlugInPubSubObserver;
- }
- TRACES("CTSCStartupExtensionPlugIn::~CTSCStartupExtensionPlugIn()");
- }
-
-
-// ---------------------------------------------------------------------------
-// First phase constructor
-//
-// ---------------------------------------------------------------------------
-//
-CTSCStartupExtensionPlugIn::CTSCStartupExtensionPlugIn(
- TAny* aConstructionParameters )
- : CSystemStartupExtension( aConstructionParameters ),
- iRequestSent(EFalse)
- {
- }
-
-
-// ---------------------------------------------------------------------------
-// CTSCStartupExtensionPlugIn::ConstructL
-//
-// ---------------------------------------------------------------------------
-//
-void CTSCStartupExtensionPlugIn::ConstructL()
- {
- TRACES("CTSCStartupExtensionPlugIn::ConstructL()");
- iTSCPlugInPubSubObserver = CTSCPlugInPubSubObserver::NewL( this );
- TRACES("CTSCStartupExtensionPlugIn::ConstructL(): End");
- }
-
-// ---------------------------------------------------------------------------
-// CTSCStartupExtensionPlugIn::ExecuteL
-//
-// ---------------------------------------------------------------------------
-//
-void CTSCStartupExtensionPlugIn::ExecuteL(
- TRequestStatus& aStatus,
- const TDesC& /*aParams*/ )
- {
- TRACES("CTSCStartupExtensionPlugIn::ExecuteL()");
- aStatus = KRequestPending;
- iStatus = &aStatus;
- TRACES("CTSCStartupExtensionPlugIn::ExecuteL(): End");
- }
-
-// ---------------------------------------------------------------------------
-// CTSCStartupExtensionPlugIn::Cancel
-//
-// ---------------------------------------------------------------------------
-//
-void CTSCStartupExtensionPlugIn::Cancel()
- {
- // Nothing to do.
- }
-
-// ---------------------------------------------------------------------------
-// CTSCStartupExtensionPlugIn::CalibrationDone
-//
-// ---------------------------------------------------------------------------
-//
-void CTSCStartupExtensionPlugIn::CalibrationDone()
- {
- TRACES("CTSCStartupExtensionPlugIn::CalibrationDone()");
- if (!iRequestSent)
- {
- TRACES("CTSCStartupExtensionPlugIn::CalibrationDone(): Send complete request");
- TInt errorCode = KErrNone;
- User::RequestComplete( iStatus, errorCode );
- iRequestSent = ETrue;
- }
- TRACES("CTSCStartupExtensionPlugIn::CalibrationDone(): End");
- }
--- a/tsrc/group/bld.inf Thu Dec 17 08:46:07 2009 +0200
+++ /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: Build information file
-*
-*/
-
-PRJ_PLATFORMS
-DEFAULT
-
-PRJ_EXPORTS
-
-PRJ_MMPFILES
-
-PRJ_TESTMMPFILES
-//#include "../../devmngt_plat/settings_backgroundimage_api/tsrc/group/bld.inf"
-//#include "../../devmngt_plat/settings_framework_api/tsrc/group/bld.inf"
-//#include "../../devmngt_plat/settings_launch_api/tsrc/group/bld.inf"
-//#include "../../devmngt_plat/settings_listbox_api/tsrc/group/bld.inf"
-//#include "../../devmngt_plat/filelist_api/tsrc/group/bld.inf"
-//#include "../../devmngt_plat/profiles_engine_api/tsrc/group/bld.inf"
-
-// End of file
--- a/tsrc/group/copy_binaries_to_sys_dir.mk Thu Dec 17 08:46:07 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,41 +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: Icons makefile for project settingsuis
-#
-
-do_nothing :
- @rem do_nothing
-
-MAKMAKE : do_nothing
-
-BLD : do_nothing
-
-CLEAN : do_nothing
- del \epoc32\RELEASE\winscw\udeb\Z\sys\bin\MT_CGSLauncher.dll /f
-
-LIB : do_nothing
-
-CLEANLIB : do_nothing
-
-RESOURCE : do_nothing
-
-FREEZE : do_nothing
-
-SAVESPACE : do_nothing
-
-RELEASABLES : do_nothing
-
-FINAL :
- echo COPYING
- copy \epoc32\RELEASE\winscw\udeb\MT_CGSLauncher.dll \epoc32\RELEASE\winscw\udeb\Z\sys\bin /y