# HG changeset patch
# User jake
# Date 1275474125 -10800
# Node ID b856a9924bbc7845f4e495d430f7502cfc9437fd
initial contribution
diff -r 000000000000 -r b856a9924bbc WidgetGen.pro
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/WidgetGen.pro Wed Jun 02 13:22:05 2010 +0300
@@ -0,0 +1,27 @@
+#-------------------------------------------------
+#
+# Project created by QtCreator 2010-05-05T13:56:52
+#
+#-------------------------------------------------
+
+QT += core gui
+
+TARGET = WidgetGen
+TEMPLATE = app
+
+
+SOURCES += main.cpp\
+ mainwindow.cpp \
+ renderercreator.cpp \
+ widgetcreator.cpp \
+ publishercreator.cpp
+
+HEADERS += mainwindow.h \
+ renderercreator.h \
+ widgetcreator.h \
+ publishercreator.h
+
+FORMS += mainwindow.ui
+
+RESOURCES += \
+ widgetgen.qrc
diff -r 000000000000 -r b856a9924bbc WidgetGen.pro.user
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/WidgetGen.pro.user Wed Jun 02 13:22:05 2010 +0300
@@ -0,0 +1,113 @@
+
+
+
+ ProjectExplorer.Project.ActiveTarget
+ 0
+
+
+ ProjectExplorer.Project.EditorSettings
+
+ System
+
+
+
+ ProjectExplorer.Project.Target.0
+
+ Qt Simulator
+ Qt4ProjectManager.Target.QtSimulatorTarget
+ 0
+ 0
+
+
+ qmake
+ QtProjectManager.QMakeBuildStep
+
+
+
+ Make
+ Qt4ProjectManager.MakeStep
+ false
+
+
+
+ 2
+
+ Make
+ Qt4ProjectManager.MakeStep
+ true
+
+ clean
+
+
+
+ 1
+ false
+
+ Debug
+ Qt4ProjectManager.Qt4BuildConfiguration
+ 2
+ F:/QT/tryouts/WidgetGen/WidgetGen-build-simulator
+ 3
+ 2
+ true
+
+
+
+ qmake
+ QtProjectManager.QMakeBuildStep
+
+
+
+ Make
+ Qt4ProjectManager.MakeStep
+ false
+
+
+
+ 2
+
+ Make
+ Qt4ProjectManager.MakeStep
+ true
+
+ clean
+
+
+
+ 1
+ false
+
+ Release
+ Qt4ProjectManager.Qt4BuildConfiguration
+ 0
+ F:/QT/tryouts/WidgetGen/WidgetGen-build-simulator
+ 3
+ 2
+ true
+
+ 2
+
+ WidgetGen
+ Qt4ProjectManager.Qt4RunConfiguration
+ 2
+
+ WidgetGen.pro
+ false
+ false
+
+ false
+ false
+
+
+ 1
+
+
+
+ ProjectExplorer.Project.TargetCount
+ 1
+
+
+ ProjectExplorer.Project.Updater.FileVersion
+ 4
+
+
diff -r 000000000000 -r b856a9924bbc data/feed/group/bld.inf
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/data/feed/group/bld.inf Wed Jun 02 13:22:05 2010 +0300
@@ -0,0 +1,40 @@
+/*
+* Copyright (c) {Year(s)} {Copyright owner}.
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html".
+*
+* Initial Contributors:
+* {Name} {Company} ? Initial contribution
+*
+* Contributors:
+* {Name} {Company} ? {{Description of contribution}}
+*
+* Description:
+* {{Description of the file}}
+*
+*/
+
+#include
+
+PRJ_PLATFORMS
+DEFAULT
+
+PRJ_EXPORTS
+// Support for productization and Carbide.Ui customization
+../hsps/00/manifest.dat /epoc32/data/Z/resource/homescreen/#replace#_#replaceuid#/hsps/manifest.dat
+../hsps/00/widgetconfiguration.xml /epoc32/data/Z/resource/homescreen/#replace#_#replaceuid#/hsps/widgetconfiguration.xml
+../xuikon/00/#replace#_#replaceuid#.dat /epoc32/data/Z/resource/homescreen/#replace#_#replaceuid#/xuikon/#replace#_#replaceuid#.dat
+../xuikon/00/#replace#.css /epoc32/data/Z/resource/homescreen/#replace#_#replaceuid#/xuikon/#replace#.css
+../xuikon/00/#replace#.xml /epoc32/data/Z/resource/homescreen/#replace#_#replaceuid#/xuikon/#replace#.xml
+//../xuikon/00/#replace#.dtd /epoc32/data/Z/resource/homescreen/#replace#_#replaceuid#/xuikon/#replace#.dtd
+
+
+PRJ_EXTENSIONS
+START EXTENSION tools/dtd
+OPTION SWITCH_LOC_FILE_NAME #replace#_#replaceuid#
+OPTION DTD_TYPE widget
+END
+// End of File
diff -r 000000000000 -r b856a9924bbc data/feed/hsps/00/empty.dat
diff -r 000000000000 -r b856a9924bbc data/feed/hsps/00/manifest.dat
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/data/feed/hsps/00/manifest.dat Wed Jun 02 13:22:05 2010 +0300
@@ -0,0 +1,21 @@
+
+
+ qhd_tch
+ widget
+
+ 0x2001f48a
+ 0x101fb657
+ #replaceuid#
+
+ #replace#
+ #replace#
+ 1.0
+
+ unlimited
+
+ widgetconfiguration.xml
+
+
+ #replace#.o0000
+
+
diff -r 000000000000 -r b856a9924bbc data/feed/hsps/00/widgetconfiguration.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/data/feed/hsps/00/widgetconfiguration.xml Wed Jun 02 13:22:05 2010 +0300
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff -r 000000000000 -r b856a9924bbc data/feed/sis/backup_registration.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/data/feed/sis/backup_registration.xml Wed Jun 02 13:22:05 2010 +0300
@@ -0,0 +1,5 @@
+
+
+
+
+
diff -r 000000000000 -r b856a9924bbc data/feed/sis/replace.pkg
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/data/feed/sis/replace.pkg Wed Jun 02 13:22:05 2010 +0300
@@ -0,0 +1,19 @@
+;Language
+&EN
+; Header
+#{#replace#}, (#replaceuid#), 1,0,0
+;Localized Vendor Name
+%{"Company"}
+;Unique Vendor name
+:"Vendor"
+;Files to install
+; HSPS - general (extracting files to C drive, other drives are not searched)
+"..\hsps\00\widgetconfiguration.xml" - "c:\private\200159c0\import\2001f48a\101fb657\#replaceuid#\1.0\widgetconfiguration.xml"
+"..\hsps\00\manifest.dat" - "c:\private\200159c0\import\2001f48a\101fb657\#replaceuid#\1.0\manifest.dat"
+; HSPS - Resources for locale 0
+"..\xuikon\00\locale.dtd" - "c:\private\200159c0\import\2001f48a\101fb657\#replaceuid#\1.0\0\locale.dtd"
+"\epoc32\data\z\private\200159c0\install\#replace#\xuikon\00\#replace#.o0000" - "c:\private\200159c0\import\2001f48a\101fb657\#replaceuid#\1.0\0\#replace#.o0000"
+; HSPS - Backup
+"backup_registration.xml" - "c:\private\10202D56\import\packages\#replaceuid#\backup_registration.xml"
+; HSPS - trigger for post installations by the HSPS server
+"..\hsps\00\empty.dat" - "c:\private\200159c0\import\plugin_2001f48a_101fb657_#replaceuid#_1.0.dat"
diff -r 000000000000 -r b856a9924bbc data/feed/xuikon/00/replace.css
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/data/feed/xuikon/00/replace.css Wed Jun 02 13:22:05 2010 +0300
@@ -0,0 +1,50 @@
+widget
+{
+ direction: ltr;
+ block-progression:lr;
+}
+
+box#container
+{
+ direction: ltr;
+ block-progression: tb;
+ padding-top:3px;
+ padding-bottom:4px;
+ padding-left:5px;
+ padding-right:8px;
+ nav-index: appearance;
+}
+image
+{
+ height: 70px;
+ width: 70px;
+ padding-top:6px;
+ padding-bottom:6px;
+ padding-left:6px;
+ padding-right:5px;
+ nav-index: appearance;
+}
+
+text
+{
+ font-family: EAknLogicalFontSecondaryFont;
+ font-size: 3.5u;
+ color: "SKIN(268458534 13056 74)";
+}
+
+newsticker
+{
+ font-family: EAknLogicalFontSecondaryFont;
+ font-size: 3.5u;
+ color: "SKIN(268458534 13056 74)";
+ text-align: left;
+ _s60-scroll-behaviour: scroll-alternate;
+ /** Alternate display time */
+ _s60-display-time: 5000;
+ /** Scroll start delay */
+ _s60-start-delay: 2000;
+ /** Restart loop after title is updated */
+ _s60-restart-after-update: true;
+ /** Don't loop titles */
+ _s60-scroll-loop: false;
+}
diff -r 000000000000 -r b856a9924bbc data/feed/xuikon/00/replace.dat
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/data/feed/xuikon/00/replace.dat Wed Jun 02 13:22:05 2010 +0300
@@ -0,0 +1,12 @@
+
+
+
+ 2001CB4F
+ 101FB657
+ 11001241
+ Anything
+ #replace#
+ 1.0
+ #replace#.xml
+ #replace#.css
+
diff -r 000000000000 -r b856a9924bbc data/feed/xuikon/00/replace.dtd
diff -r 000000000000 -r b856a9924bbc data/feed/xuikon/00/replace.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/data/feed/xuikon/00/replace.xml Wed Jun 02 13:22:05 2010 +0300
@@ -0,0 +1,75 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ My first widget!
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff -r 000000000000 -r b856a9924bbc data/graphiciconstext/group/bld.inf
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/data/graphiciconstext/group/bld.inf Wed Jun 02 13:22:05 2010 +0300
@@ -0,0 +1,40 @@
+/*
+* Copyright (c) {Year(s)} {Copyright owner}.
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html".
+*
+* Initial Contributors:
+* {Name} {Company} ? Initial contribution
+*
+* Contributors:
+* {Name} {Company} ? {{Description of contribution}}
+*
+* Description:
+* {{Description of the file}}
+*
+*/
+
+#include
+
+PRJ_PLATFORMS
+DEFAULT
+
+PRJ_EXPORTS
+// Support for productization and Carbide.Ui customization
+../hsps/00/manifest.dat /epoc32/data/Z/resource/homescreen/#replace#_#replaceuid#/hsps/manifest.dat
+../hsps/00/widgetconfiguration.xml /epoc32/data/Z/resource/homescreen/#replace#_#replaceuid#/hsps/widgetconfiguration.xml
+../xuikon/00/#replace#_#replaceuid#.dat /epoc32/data/Z/resource/homescreen/#replace#_#replaceuid#/xuikon/#replace#_#replaceuid#.dat
+../xuikon/00/#replace#.css /epoc32/data/Z/resource/homescreen/#replace#_#replaceuid#/xuikon/#replace#.css
+../xuikon/00/#replace#.xml /epoc32/data/Z/resource/homescreen/#replace#_#replaceuid#/xuikon/#replace#.xml
+//../xuikon/00/#replace#.dtd /epoc32/data/Z/resource/homescreen/#replace#_#replaceuid#/xuikon/#replace#.dtd
+
+
+PRJ_EXTENSIONS
+START EXTENSION tools/dtd
+OPTION SWITCH_LOC_FILE_NAME #replace#_#replaceuid#
+OPTION DTD_TYPE widget
+END
+// End of File
diff -r 000000000000 -r b856a9924bbc data/graphiciconstext/hsps/00/empty.dat
diff -r 000000000000 -r b856a9924bbc data/graphiciconstext/hsps/00/manifest.dat
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/data/graphiciconstext/hsps/00/manifest.dat Wed Jun 02 13:22:05 2010 +0300
@@ -0,0 +1,21 @@
+
+
+ qhd_tch
+ widget
+
+ 0x2001f48a
+ 0x101fb657
+ #replaceuid#
+
+ #replace#
+ #replace#
+ 1.0
+
+ unlimited
+
+ widgetconfiguration.xml
+
+
+ #replace#.o0000
+
+
diff -r 000000000000 -r b856a9924bbc data/graphiciconstext/hsps/00/widgetconfiguration.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/data/graphiciconstext/hsps/00/widgetconfiguration.xml Wed Jun 02 13:22:05 2010 +0300
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff -r 000000000000 -r b856a9924bbc data/graphiciconstext/sis/backup_registration.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/data/graphiciconstext/sis/backup_registration.xml Wed Jun 02 13:22:05 2010 +0300
@@ -0,0 +1,5 @@
+
+
+
+
+
diff -r 000000000000 -r b856a9924bbc data/graphiciconstext/sis/replace.pkg
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/data/graphiciconstext/sis/replace.pkg Wed Jun 02 13:22:05 2010 +0300
@@ -0,0 +1,19 @@
+;Language
+&EN
+; Header
+#{#replace#}, (#replaceuid#), 1,0,0
+;Localized Vendor Name
+%{"Company"}
+;Unique Vendor name
+:"Vendor"
+;Files to install
+; HSPS - general (extracting files to C drive, other drives are not searched)
+"..\hsps\00\widgetconfiguration.xml" - "c:\private\200159c0\import\2001f48a\101fb657\#replaceuid#\1.0\widgetconfiguration.xml"
+"..\hsps\00\manifest.dat" - "c:\private\200159c0\import\2001f48a\101fb657\#replaceuid#\1.0\manifest.dat"
+; HSPS - Resources for locale 0
+"..\xuikon\00\locale.dtd" - "c:\private\200159c0\import\2001f48a\101fb657\#replaceuid#\1.0\0\locale.dtd"
+"\epoc32\data\z\private\200159c0\install\#replace#\xuikon\00\#replace#.o0000" - "c:\private\200159c0\import\2001f48a\101fb657\#replaceuid#\1.0\0\#replace#.o0000"
+; HSPS - Backup
+"backup_registration.xml" - "c:\private\10202D56\import\packages\#replaceuid#\backup_registration.xml"
+; HSPS - trigger for post installations by the HSPS server
+"..\hsps\00\empty.dat" - "c:\private\200159c0\import\plugin_2001f48a_101fb657_#replaceuid#_1.0.dat"
diff -r 000000000000 -r b856a9924bbc data/graphiciconstext/xuikon/00/replace.css
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/data/graphiciconstext/xuikon/00/replace.css Wed Jun 02 13:22:05 2010 +0300
@@ -0,0 +1,69 @@
+widget
+{
+ block-progression:rl;
+
+}
+
+image#img4
+{
+ height: 70px;
+ width: 70px;
+ padding-top:6px;
+ padding-bottom:6px;
+ padding-left:6px;
+ padding-right:5px;
+ nav-index:appearance;
+}
+
+box#focus
+{
+ padding-top:3px;
+ padding-bottom:4px;
+ padding-left:5px;
+ padding-right:8px;
+ nav-index:appearance;
+}
+box#container
+{
+ height:adaptive;
+ direction: ltr;
+ block-progression: tb;
+ margin-top: auto;
+ margin-bottom: auto;
+}
+
+box#row1
+{
+ direction: ltr;
+ block-progression:lr;
+ padding:0px;
+ margin:0px;
+ height:25px;
+}
+
+box.hidden
+{
+ display:none;
+ direction: ltr;
+ block-progression:lr;
+ padding:0px;
+ margin:0px;
+ height:25px;
+}
+
+image.icon
+{
+ height: 24px;
+ width: 24px;
+ margin-top:1px;
+}
+
+text
+{
+ height:25px;
+ margin-left:10px;
+ font-size:3.5u;
+ _s60-text-valign: top;
+ font-family: EAknLogicalFontSecondaryFont;
+ color: "SKIN(268458534 13056 74)";
+}
\ No newline at end of file
diff -r 000000000000 -r b856a9924bbc data/graphiciconstext/xuikon/00/replace.dat
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/data/graphiciconstext/xuikon/00/replace.dat Wed Jun 02 13:22:05 2010 +0300
@@ -0,0 +1,12 @@
+
+
+
+ 2001CB4F
+ 101FB657
+ 11001241
+ Anything
+ #replace#
+ 1.0
+ #replace#.xml
+ #replace#.css
+
diff -r 000000000000 -r b856a9924bbc data/graphiciconstext/xuikon/00/replace.dtd
diff -r 000000000000 -r b856a9924bbc data/graphiciconstext/xuikon/00/replace.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/data/graphiciconstext/xuikon/00/replace.xml Wed Jun 02 13:22:05 2010 +0300
@@ -0,0 +1,67 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff -r 000000000000 -r b856a9924bbc data/graphictext/group/bld.inf
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/data/graphictext/group/bld.inf Wed Jun 02 13:22:05 2010 +0300
@@ -0,0 +1,40 @@
+/*
+* Copyright (c) {Year(s)} {Copyright owner}.
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html".
+*
+* Initial Contributors:
+* {Name} {Company} ? Initial contribution
+*
+* Contributors:
+* {Name} {Company} ? {{Description of contribution}}
+*
+* Description:
+* {{Description of the file}}
+*
+*/
+
+#include
+
+PRJ_PLATFORMS
+DEFAULT
+
+PRJ_EXPORTS
+// Support for productization and Carbide.Ui customization
+../hsps/00/manifest.dat /epoc32/data/Z/resource/homescreen/#replace#_#replaceuid#/hsps/manifest.dat
+../hsps/00/widgetconfiguration.xml /epoc32/data/Z/resource/homescreen/#replace#_#replaceuid#/hsps/widgetconfiguration.xml
+../xuikon/00/#replace#_#replaceuid#.dat /epoc32/data/Z/resource/homescreen/#replace#_#replaceuid#/xuikon/#replace#_#replaceuid#.dat
+../xuikon/00/#replace#.css /epoc32/data/Z/resource/homescreen/#replace#_#replaceuid#/xuikon/#replace#.css
+../xuikon/00/#replace#.xml /epoc32/data/Z/resource/homescreen/#replace#_#replaceuid#/xuikon/#replace#.xml
+//../xuikon/00/#replace#.dtd /epoc32/data/Z/resource/homescreen/#replace#_#replaceuid#/xuikon/#replace#.dtd
+
+
+PRJ_EXTENSIONS
+START EXTENSION tools/dtd
+OPTION SWITCH_LOC_FILE_NAME #replace#_#replaceuid#
+OPTION DTD_TYPE widget
+END
+// End of File
diff -r 000000000000 -r b856a9924bbc data/graphictext/hsps/00/empty.dat
diff -r 000000000000 -r b856a9924bbc data/graphictext/hsps/00/manifest.dat
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/data/graphictext/hsps/00/manifest.dat Wed Jun 02 13:22:05 2010 +0300
@@ -0,0 +1,21 @@
+
+
+ qhd_tch
+ widget
+
+ 0x2001f48a
+ 0x101fb657
+ #replaceuid#
+
+ #replace#
+ #replace#
+ 1.0
+
+ unlimited
+
+ widgetconfiguration.xml
+
+
+ #replace#.o0000
+
+
diff -r 000000000000 -r b856a9924bbc data/graphictext/hsps/00/widgetconfiguration.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/data/graphictext/hsps/00/widgetconfiguration.xml Wed Jun 02 13:22:05 2010 +0300
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff -r 000000000000 -r b856a9924bbc data/graphictext/sis/backup_registration.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/data/graphictext/sis/backup_registration.xml Wed Jun 02 13:22:05 2010 +0300
@@ -0,0 +1,5 @@
+
+
+
+
+
diff -r 000000000000 -r b856a9924bbc data/graphictext/sis/replace.pkg
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/data/graphictext/sis/replace.pkg Wed Jun 02 13:22:05 2010 +0300
@@ -0,0 +1,19 @@
+;Language
+&EN
+; Header
+#{#replace#}, (#replaceuid#), 1,0,0
+;Localized Vendor Name
+%{"Company"}
+;Unique Vendor name
+:"Vendor"
+;Files to install
+; HSPS - general (extracting files to C drive, other drives are not searched)
+"..\hsps\00\widgetconfiguration.xml" - "c:\private\200159c0\import\2001f48a\101fb657\#replaceuid#\1.0\widgetconfiguration.xml"
+"..\hsps\00\manifest.dat" - "c:\private\200159c0\import\2001f48a\101fb657\#replaceuid#\1.0\manifest.dat"
+; HSPS - Resources for locale 0
+"..\xuikon\00\locale.dtd" - "c:\private\200159c0\import\2001f48a\101fb657\#replaceuid#\1.0\0\locale.dtd"
+"\epoc32\data\z\private\200159c0\install\#replace#\xuikon\00\#replace#.o0000" - "c:\private\200159c0\import\2001f48a\101fb657\#replaceuid#\1.0\0\#replace#.o0000"
+; HSPS - Backup
+"backup_registration.xml" - "c:\private\10202D56\import\packages\#replaceuid#\backup_registration.xml"
+; HSPS - trigger for post installations by the HSPS server
+"..\hsps\00\empty.dat" - "c:\private\200159c0\import\plugin_2001f48a_101fb657_#replaceuid#_1.0.dat"
diff -r 000000000000 -r b856a9924bbc data/graphictext/xuikon/00/replace.css
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/data/graphictext/xuikon/00/replace.css Wed Jun 02 13:22:05 2010 +0300
@@ -0,0 +1,48 @@
+widget
+{
+ block-progression:rl;
+
+}
+
+image
+{
+ height: 70px;
+ width: 70px;
+ padding-top:6px;
+ padding-bottom:6px;
+ padding-left:6px;
+ padding-right:5px;
+ nav-index:appearance;
+}
+
+box#focus
+{
+ padding-top:3px;
+ padding-bottom:4px;
+ padding-left:5px;
+ padding-right:8px;
+ nav-index:appearance;
+}
+
+box#container
+{
+ height: adaptive;
+ direction: ltr;
+ block-progression: tb;
+ margin-top: auto;
+ margin-bottom: auto;
+}
+
+text
+{
+ height:25px;
+ font-size:3.5u;
+ _s60-text-valign: top;
+ font-family: EAknLogicalFontSecondaryFont;
+ color: "SKIN(268458534 13056 74)";
+}
+
+text.hidden
+{
+ display:none;
+}
diff -r 000000000000 -r b856a9924bbc data/graphictext/xuikon/00/replace.dat
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/data/graphictext/xuikon/00/replace.dat Wed Jun 02 13:22:05 2010 +0300
@@ -0,0 +1,12 @@
+
+
+
+ 2001CB4F
+ 101FB657
+ 11001241
+ Anything
+ #replace#
+ 1.0
+ #replace#.xml
+ #replace#.css
+
diff -r 000000000000 -r b856a9924bbc data/graphictext/xuikon/00/replace.dtd
diff -r 000000000000 -r b856a9924bbc data/graphictext/xuikon/00/replace.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/data/graphictext/xuikon/00/replace.xml Wed Jun 02 13:22:05 2010 +0300
@@ -0,0 +1,49 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff -r 000000000000 -r b856a9924bbc data/iconstext/group/bld.inf
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/data/iconstext/group/bld.inf Wed Jun 02 13:22:05 2010 +0300
@@ -0,0 +1,40 @@
+/*
+* Copyright (c) {Year(s)} {Copyright owner}.
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html".
+*
+* Initial Contributors:
+* {Name} {Company} ? Initial contribution
+*
+* Contributors:
+* {Name} {Company} ? {{Description of contribution}}
+*
+* Description:
+* {{Description of the file}}
+*
+*/
+
+#include
+
+PRJ_PLATFORMS
+DEFAULT
+
+PRJ_EXPORTS
+// Support for productization and Carbide.Ui customization
+../hsps/00/manifest.dat /epoc32/data/Z/resource/homescreen/#replace#_#replaceuid#/hsps/manifest.dat
+../hsps/00/widgetconfiguration.xml /epoc32/data/Z/resource/homescreen/#replace#_#replaceuid#/hsps/widgetconfiguration.xml
+../xuikon/00/#replace#_#replaceuid#.dat /epoc32/data/Z/resource/homescreen/#replace#_#replaceuid#/xuikon/#replace#_#replaceuid#.dat
+../xuikon/00/#replace#.css /epoc32/data/Z/resource/homescreen/#replace#_#replaceuid#/xuikon/#replace#.css
+../xuikon/00/#replace#.xml /epoc32/data/Z/resource/homescreen/#replace#_#replaceuid#/xuikon/#replace#.xml
+//../xuikon/00/#replace#.dtd /epoc32/data/Z/resource/homescreen/#replace#_#replaceuid#/xuikon/#replace#.dtd
+
+
+PRJ_EXTENSIONS
+START EXTENSION tools/dtd
+OPTION SWITCH_LOC_FILE_NAME #replace#_#replaceuid#
+OPTION DTD_TYPE widget
+END
+// End of File
diff -r 000000000000 -r b856a9924bbc data/iconstext/hsps/00/empty.dat
diff -r 000000000000 -r b856a9924bbc data/iconstext/hsps/00/manifest.dat
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/data/iconstext/hsps/00/manifest.dat Wed Jun 02 13:22:05 2010 +0300
@@ -0,0 +1,21 @@
+
+
+ qhd_tch
+ widget
+
+ 0x2001f48a
+ 0x101fb657
+ #replaceuid#
+
+ #replace#
+ #replace#
+ 1.0
+
+ unlimited
+
+ widgetconfiguration.xml
+
+
+ #replace#.o0000
+
+
diff -r 000000000000 -r b856a9924bbc data/iconstext/hsps/00/widgetconfiguration.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/data/iconstext/hsps/00/widgetconfiguration.xml Wed Jun 02 13:22:05 2010 +0300
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff -r 000000000000 -r b856a9924bbc data/iconstext/sis/backup_registration.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/data/iconstext/sis/backup_registration.xml Wed Jun 02 13:22:05 2010 +0300
@@ -0,0 +1,5 @@
+
+
+
+
+
diff -r 000000000000 -r b856a9924bbc data/iconstext/sis/replace.pkg
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/data/iconstext/sis/replace.pkg Wed Jun 02 13:22:05 2010 +0300
@@ -0,0 +1,19 @@
+;Language
+&EN
+; Header
+#{#replace#}, (#replaceuid#), 1,0,0
+;Localized Vendor Name
+%{"Company"}
+;Unique Vendor name
+:"Vendor"
+;Files to install
+; HSPS - general (extracting files to C drive, other drives are not searched)
+"..\hsps\00\widgetconfiguration.xml" - "c:\private\200159c0\import\2001f48a\101fb657\#replaceuid#\1.0\widgetconfiguration.xml"
+"..\hsps\00\manifest.dat" - "c:\private\200159c0\import\2001f48a\101fb657\#replaceuid#\1.0\manifest.dat"
+; HSPS - Resources for locale 0
+"..\xuikon\00\locale.dtd" - "c:\private\200159c0\import\2001f48a\101fb657\#replaceuid#\1.0\0\locale.dtd"
+"\epoc32\data\z\private\200159c0\install\#replace#\xuikon\00\#replace#.o0000" - "c:\private\200159c0\import\2001f48a\101fb657\#replaceuid#\1.0\0\#replace#.o0000"
+; HSPS - Backup
+"backup_registration.xml" - "c:\private\10202D56\import\packages\#replaceuid#\backup_registration.xml"
+; HSPS - trigger for post installations by the HSPS server
+"..\hsps\00\empty.dat" - "c:\private\200159c0\import\plugin_2001f48a_101fb657_#replaceuid#_1.0.dat"
diff -r 000000000000 -r b856a9924bbc data/iconstext/xuikon/00/replace.css
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/data/iconstext/xuikon/00/replace.css Wed Jun 02 13:22:05 2010 +0300
@@ -0,0 +1,51 @@
+widget
+{
+ padding-top:3px;
+ padding-bottom:4px;
+ padding-left:5px;
+ padding-right:8px;
+}
+
+
+box#container
+{
+ height:adaptive;
+ margin-top: auto;
+ margin-bottom: auto;
+}
+
+box#row1
+{
+ direction: ltr;
+ block-progression:lr;
+ padding:0px;
+ margin:0px;
+ height:25px;
+}
+
+box.hidden
+{
+ display:none;
+ direction: ltr;
+ block-progression:lr;
+ padding:0px;
+ margin:0px;
+ height:25px;
+}
+
+image
+{
+ height: 24px;
+ width: 24px;
+ margin-top:1px;
+}
+
+text
+{
+ height:25px;
+ margin-left:10px;
+ font-size:3.5u;
+ _s60-text-valign: top;
+ font-family: EAknLogicalFontSecondaryFont;
+ color: "SKIN(268458534 13056 74)";
+}
\ No newline at end of file
diff -r 000000000000 -r b856a9924bbc data/iconstext/xuikon/00/replace.dat
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/data/iconstext/xuikon/00/replace.dat Wed Jun 02 13:22:05 2010 +0300
@@ -0,0 +1,12 @@
+
+
+
+ 2001CB4F
+ 101FB657
+ 11001241
+ Anything
+ #replace#
+ 1.0
+ #replace#.xml
+ #replace#.css
+
diff -r 000000000000 -r b856a9924bbc data/iconstext/xuikon/00/replace.dtd
diff -r 000000000000 -r b856a9924bbc data/iconstext/xuikon/00/replace.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/data/iconstext/xuikon/00/replace.xml Wed Jun 02 13:22:05 2010 +0300
@@ -0,0 +1,54 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff -r 000000000000 -r b856a9924bbc data/publisherif/inc/hspublisher.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/data/publisherif/inc/hspublisher.h Wed Jun 02 13:22:05 2010 +0300
@@ -0,0 +1,206 @@
+/*
+* Copyright (c) {Year(s)} {Copyright owner}.
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html".
+*
+* Initial Contributors:
+* {Name} {Company} ? Initial contribution
+*
+* Contributors:
+* {Name} {Company} ? {{Description of contribution}}
+*
+* Description:
+* {{Description of the file}}
+*
+*/
+
+
+#ifndef __HSPUBLISHER_H__
+#define __HSPUBLISHER_H__
+
+// System includes
+#include
+#include
+
+// User includes
+
+// Forward declarations
+class CHsPublisherImpl;
+class MHsWidgetObserver;
+
+// Constants
+
+// Class Definitions
+NONSHARABLE_CLASS( CHsPublisher ) : public CBase
+ {
+public:
+ // constructors and destructor
+
+ /**
+ * Constructor
+ *
+ * @param aObserver Widget observer interface
+ * @param aEnablePersist ETrue if publisher wants to save published data to SQL database for later usage.
+ * This option should be used with caution as it taxes runtime performance and resources.
+ */
+ static CHsPublisher* NewL(
+ MHsWidgetObserver& aObserver,
+ TBool aEnablePersist = EFalse );
+
+ /**
+ * Constructor
+ *
+ * @param aObserver Widget observer interface
+ * @param aEnablePersist ETrue if publisher wants to save published data to SQL database for later usage.
+ * This option should be used with caution as it taxes runtime performance and resources.
+ */
+ static CHsPublisher* NewLC(
+ MHsWidgetObserver& aObserver,
+ TBool aEnablePersist = EFalse );
+
+ /**
+ * Destructor
+ */
+ ~CHsPublisher();
+
+public:
+ // new functions
+
+ /**
+ * Publishes text to a element in widget
+ *
+ * @param aWidgetId Widget Id identifying the widget instance.
+ * @param aElementId Element id identifying the text element in the widget.
+ * @param aText Text to set.
+ * @return System wide error code.
+ */
+ TInt PublishText(
+ const TDesC& aWidgetId,
+ const TDesC8& aElementId,
+ const TDesC& aText );
+
+ /**
+ * Publishes image to an element in widget
+ *
+ * @param aWidgetId Widget Id identifying the widget instance.
+ * @param aElementId Element id identifying the iamge element in the widget.
+ * @param aImage Image to set.
+ * @param aMask Mask to set.
+ * @return System wide error code.
+ */
+ TInt PublishImage(
+ const TDesC& aWidgetId,
+ const TDesC8& aElementId,
+ const CFbsBitmap* aImage,
+ const CFbsBitmap* aMask );
+
+ /**
+ * Publishes image to an element in widget
+ *
+ * @param aWidgetId Widget Id identifying the widget instance.
+ * @param aElementId Element id identifying the image element in the widget.
+ * @param aImageHandle Image handle.
+ * @param aMaskHandle Mask handle.
+ * @return System wide error code.
+ */
+ TInt PublishImage(
+ const TDesC& aWidgetId,
+ const TDesC8& aElementId,
+ TInt aImageHandle,
+ TInt aMaskHandle );
+
+ /**
+ * Publishes image to an element in the widget.
+ *
+ * @param aWidgetId Widget Id identifying the widget instance.
+ * @param aElementId Element id identifying the image element in the widget.
+ * @param aSource Source for the image. Supported source formats are:
+ * - Filesystem path, i.e. _LIT( KMyImagePath, "c:\\data\\Installs\\MyWidget\\image.jpg");
+ * - skin( ), i.e. _LIT( KMySkinImage, "skin(270501603 8586)" );
+ * - mif( ), i.e. _LIT( KMyMifImage, "mif(c:\\data\\Installs\\MyWidget\\mymwidget.mif 16384 16385" );
+ */
+ TInt PublishImage(
+ const TDesC& aWidgetId,
+ const TDesC8& aElementId,
+ const TDesC& aSource );
+
+ /**
+ * Publishes stream to a element in widget
+ *
+ * @param aWidgetId Widget Id identifying the widget instance.
+ * @param aElementId Element id identifying the data element in the widget.
+ * @param aStream The stream as descriptor.
+ * @return System wide error code.
+ */
+ TInt PublishStream(
+ const TDesC& aWidgetId,
+ const TDesC8& aElementId,
+ const TDesC8& aStream );
+
+ /**
+ * Cleans published text from a element.
+ *
+ * @param aWidgetId Widget Id identifying the widget instance.
+ * @param aElementId Element id identifying the data element in the widget.
+ * @return System wide error code.
+ */
+ TInt CleanText( const TDesC& aWidgetId,
+ const TDesC8& aElementId );
+
+ /**
+ * Cleans published image from an element.
+ *
+ * @param aWidgetId Widget Id identifying the widget instance.
+ * @param aElementId Element id identifying the data element in the widget.
+ * @return System wide error code.
+ */
+ TInt CleanImage( const TDesC& aWidgetId,
+ const TDesC8& aElementId );
+
+ /**
+ * Starts a publish transaction. Transaction must be committed
+ * with CommitTransaction method.
+ *
+ * @param aWidget Widget Id identifying the transaction for widget instance.
+ * @return System wide error code.
+ */
+ TInt StartTransaction(
+ const TDesC& aWidgetId );
+
+ /**
+ * Commits the publish transaction and flushes changes to Homescreen.
+ *
+ * @param aWidget Widget Id identifying the transaction for the widget instance.
+ * @return System wide error code.
+ */
+ TInt CommitTransaction(
+ const TDesC& aWidgetId );
+
+private:
+ // private constructors
+
+ /**
+ * C++ default constructor
+ */
+ CHsPublisher();
+
+ /**
+ * 2nd phase constructor
+ */
+ void ConstructL(
+ MHsWidgetObserver& aObserver,
+ TBool aEnablePersist );
+
+private:
+ // data
+
+ /** HS publisher implementation, owned */
+ CHsPublisherImpl* iImpl;
+ };
+
+#endif // __HSPUBLISHER_H__
+
+// End of file
diff -r 000000000000 -r b856a9924bbc data/publisherif/inc/hspublisherimpl.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/data/publisherif/inc/hspublisherimpl.h Wed Jun 02 13:22:05 2010 +0300
@@ -0,0 +1,267 @@
+/*
+* Copyright (c) {Year(s)} {Copyright owner}.
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html".
+*
+* Initial Contributors:
+* {Name} {Company} ? Initial contribution
+*
+* Contributors:
+* {Name} {Company} ? {{Description of contribution}}
+*
+* Description:
+* {{Description of the file}}
+*
+*/
+
+
+#ifndef __HSPUBLISHERIMPL_H__
+#define __HSPUBLISHERIMPL_H__
+
+// System includes
+#include
+#include
+
+// User includes
+
+// Forward declarations
+class MHsWidgetObserver;
+class CLiwServiceHandler;
+class CLiwCriteriaItem;
+class CLiwGenericParamList;
+class MLiwInterface;
+class CFbsBitmap;
+class CTransaction;
+
+// Constants
+
+// Class declaration
+NONSHARABLE_CLASS( CHsPublisherImpl ) : public CBase,
+ public MLiwNotifyCallback
+ {
+public:
+ // constructors and destructor
+
+ /**
+ * Constructor
+ *
+ * @param aObserver Widget observer interface.
+ * @param aEnablePersist ETrue if publisher wants to save published data to SQL database for later usage.
+ * This option should be used with caution as it taxes runtime performance and resources.
+ */
+ static CHsPublisherImpl* NewL(
+ MHsWidgetObserver& aObserver,
+ TBool aEnablePersist );
+
+ /**
+ * Constructor
+ *
+ * @param aObserver Widget observer interface.
+ * @param aEnablePersist ETrue if publisher wants to save published data to SQL database for later usage.
+ * This option should be used with caution as it taxes runtime performance and resources.
+ */
+ static CHsPublisherImpl* NewLC(
+ MHsWidgetObserver& aObserver,
+ TBool aEnablePersist );
+
+ /**
+ * Destructor
+ */
+ ~CHsPublisherImpl();
+
+private:
+ // from MLiwNotifyCallback
+
+ /**
+ * Handles notifications caused by an asynchronous Execute*CmdL call
+ * or an event.
+ *
+ * @param aCmdId The service command associated to the event.
+ * @param aEventId Occured event, see LiwCommon.hrh.
+ * @param aEventParamList Event parameters, if any, as defined per
+ * each event.
+ * @param aInParamList Input parameters, if any, given in the
+ * related HandleCommmandL.
+ * @return Error code for the callback.
+ */
+ TInt HandleNotifyL( TInt aCmdId, TInt aEventId,
+ CLiwGenericParamList& aEventParamList,
+ const CLiwGenericParamList& aInParamList );
+
+public:
+ // new functions
+
+ /**
+ * Publishes text to a element in the widget.
+ *
+ * @param aWidgetId Widget Id identifying the widget instance.
+ * @param aElementId Element id identifying the text element in the widget.
+ * @param aText Text to set.
+ */
+ void PublishTextL(
+ const TDesC& aWidgetId,
+ const TDesC8& aElementId,
+ const TDesC& aText );
+
+ /**
+ * Publishes image to an element in the widget.
+ *
+ * @param aWidgetId Widget Id identifying the widget instance.
+ * @param aElementId Element id identifying the image element in the widget.
+ * @param aImage Image to set.
+ * @param aMask Mask to set.
+ */
+ void PublishImageL(
+ const TDesC& aWidgetId,
+ const TDesC8& aElementId,
+ const CFbsBitmap* aImage,
+ const CFbsBitmap* aMask );
+
+ /**
+ * Publishes image to an element in the widget.
+ *
+ * @param aWidgetId Widget Id identifying the widget instance.
+ * @param aElementId Element id identifying the image element in the widget.
+ * @param aImageHandle Handle to Image to set.
+ * @param aMaskHandle Handle to mask to set.
+ */
+ void PublishImageL(
+ const TDesC& aWidgetId,
+ const TDesC8& aElementId,
+ TInt aImageHandle,
+ TInt aMaskHandle );
+
+ /**
+ * Publishes image to an element in the widget.
+ *
+ * @param aWidgetId Widget Id identifying the widget instance.
+ * @param aElementId Element id identifying the image element in the widget.
+ * @param aSource Source for the image. Supported source formats are:
+ * - Filesystem path, i.e. _LIT( KMyImagePath, "c:\\data\\Installs\\MyWidget\\image.jpg");
+ * - skin( ), i.e. _LIT( KMySkinImage, "skin(270501603 8586)" );
+ * - mif( ), i.e. _LIT( KMyMifImage, "mif(c:\\data\\Installs\\MyWidget\\mymwidget.mif 16384 16385" );
+ */
+ void PublishImageL(
+ const TDesC& aWidgetId,
+ const TDesC8& aElementId,
+ const TDesC& aSource );
+
+ /**
+ * Publishes stream to a element in widget.
+ *
+ * @param aWidgetId Widget Id identifying the widget instance.
+ * @param aElementId Element id identifying the data element in the widget.
+ * @param aStream The stream as descriptor.
+ */
+ void PublishStreamL(
+ const TDesC& aWidgetId,
+ const TDesC8& aElementId,
+ const TDesC8& aStream );
+
+ /**
+ * Cleans published text from a element.
+ *
+ * @param aWidgetId Widget Id identifying the widget instance.
+ * @param aElementId Element id identifying the data element in the widget.
+ */
+ void CleanTextL( const TDesC& aWidgetId,
+ const TDesC8& aElementId );
+
+ /**
+ * Cleans published image from an element.
+ *
+ * @param aWidgetId Widget Id identifying the widget instance.
+ * @param aElementId Element id identifying the data element in the widget.
+ */
+ void CleanImageL( const TDesC& aWidgetId,
+ const TDesC8& aElementId );
+
+ /**
+ * Starts a publish transaction. Transaction must be committed
+ * with CommitTransaction method.
+ *
+ * @param aWidget Widget Id identifying the transaction for widget instance.
+ * @return System wide error code.
+ */
+ void StartTransactionL(
+ const TDesC& aWidgetId );
+
+ /**
+ * Commits the publish transaction and flushes changes to Homescreen.
+ *
+ * @param aWidget Widget Id identifying the transaction for the widget instance.
+ */
+ void CommitTransactionL(
+ const TDesC& aWidgetId );
+
+private:
+ // new functions
+
+ /**
+ * Attaches to CPS service.
+ */
+ void AttachL();
+
+ /**
+ * Detaches from CPS servive.
+ */
+ void DetachL();
+
+ /**
+ * Process CPS notification and delegates it to MHsWidgetObserver.
+ *
+ * @param aWidgetId The widget instance from the event was initiated.
+ * @param aEvent Event which maps to Content Model.
+ */
+ void ProcessEvent(
+ const TDesC& aWidgetId,
+ const TDesC8& aEvent ) const;
+
+ /**
+ * Gets transaction for aWidgetId.
+ *
+ * @param aWidgetId The widget instance to use in transaction look-up.
+ * @return Transaction, NULL if not found.
+ */
+ CTransaction* Transaction( const TDesC& aWidgetId ) const;
+
+private:
+ // private constructors
+
+ /**
+ * C++ constructor
+ */
+ CHsPublisherImpl(
+ MHsWidgetObserver& aObserver,
+ TBool aEnablePersist );
+
+ /**
+ * 2nd phase constructor
+ */
+ void ConstructL();
+
+private:
+ // data
+
+ /** HS Widget observer, not owned */
+ MHsWidgetObserver& iObserver;
+ /** SAPI service handler, owned */
+ CLiwServiceHandler* iServiceHandler;
+ /** CPS SAPI service, owned */
+ CLiwCriteriaItem* iCpsService;
+ /** Cps interface, owned */
+ MLiwInterface* iCpsInterface;
+ /** Publish transactions, owned */
+ RPointerArray< CTransaction > iTransactions;
+ /** Attached succesfully to CPS service */
+ TBool iCpServiceAvailable;
+ /** Flag Enable persist */
+ TBool iEnablePersist;
+ };
+
+#endif // __HSPUBLISHERIMPL_H__
+
+// End of file
diff -r 000000000000 -r b856a9924bbc data/publisherif/inc/hswidgetobserver.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/data/publisherif/inc/hswidgetobserver.h Wed Jun 02 13:22:05 2010 +0300
@@ -0,0 +1,147 @@
+/*
+* Copyright (c) {Year(s)} {Copyright owner}.
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html".
+*
+* Initial Contributors:
+* {Name} {Company} ? Initial contribution
+*
+* Contributors:
+* {Name} {Company} ? {{Description of contribution}}
+*
+* Description:
+* {{Description of the file}}
+*
+*/
+
+
+#ifndef __HSWIDGETOBSERVER_H__
+#define __HSWIDGETOBSERVER_H__
+
+// System includes
+#include
+
+// User includes
+
+// Forward declarations
+
+// Constants
+
+// Class Definitions
+class MHsWidgetObserver
+ {
+public:
+ enum EState
+ {
+ /**
+ * Widget instance should enter to suspended state.
+ * This means that Homescreen is not visible anymore.
+ */
+ ESuspend = 0,
+ /**
+ * Widget instance should enter to alive state.
+ * This means that Homescreen visible. Resource consumption and publishing is allowed.
+ */
+ EAlive,
+ /**
+ * Widget instance may enter to online state.
+ * This means that it may consume network resources.
+ */
+ EOnline,
+ /**
+ * Widget instance must enter to offline state.
+ * This means that it is not allowed to consume network resources.
+ */
+ EOffline
+ };
+
+ enum EStartReason
+ {
+ /**
+ * Widget was started because system starts-up.
+ */
+ ESystemStart = 1,
+ /**
+ * Widget was started because of Homescreen page change.
+ */
+ EPageStart,
+ /**
+ * Widget was started because of it was added to Homescreen.
+ */
+ EWidgetStart
+ };
+
+ enum EStopReason
+ {
+ /**
+ * Widget was stopped because system shutsdown.
+ */
+ ESystemStop = 1,
+ /**
+ * Widget was stopped because of Homescreen page change.
+ */
+ EPageStop,
+ /**
+ * Widget was stopped because it was removed from Homescreen.
+ */
+ EWidgetStop
+ };
+
+ /**
+ * Requests this publisher's identity.
+ *
+ * @return Publisher identity in format.
+ * The identity must map to xml element, i.e.:
+ *
+ */
+ virtual const TDesC& Identity() = 0;
+
+ /**
+ * Notifies that Homescreen has started widget.
+ *
+ * @param aWidgetId Widget Id identifying the widget instance.
+ * @param aReason Reason why Homescreen started the widget instance.
+ */
+ virtual void NotifyWidgetStarted(
+ const TDesC& aWidgetId,
+ EStartReason aReason ) = 0;
+
+ /**
+ * Notifies that Homescreen has stopped widget.
+ *
+ * @param aWidgetId Widget Id identifying the widget instance.
+ * @param aReason Reason why Homescreen stopped the widget instance.
+ */
+ virtual void NotifyWidgetStopped(
+ const TDesC& aWidgetId,
+ EStopReason aReason ) = 0;
+
+ /**
+ * Notifies that Homescreen has changed widget state.
+ *
+ * @param aWidgetId Widget Id identifying the widget instance.
+ * @param aState New state for the widget instance.
+ */
+ virtual void NotifyWidgetState(
+ const TDesC& aWidgetId,
+ EState aState ) = 0;
+
+ /**
+ * Notifies a widget specific event.
+ *
+ * @param aWidgetId Widget Id identifying the widget instance.
+ * @param aEvent Event from the widget instance.
+ * @param aParam Event parameter from the widget instance.
+ */
+ virtual void NotifyWidgetEvent(
+ const TDesC& aWidgetId,
+ const TDesC& aEvent,
+ const TDesC& aParam ) = 0;
+ };
+
+#endif // __HSWIDGETOBSERVER_H__
+
+// End of file
diff -r 000000000000 -r b856a9924bbc data/publisherif/inc/transaction.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/data/publisherif/inc/transaction.h Wed Jun 02 13:22:05 2010 +0300
@@ -0,0 +1,286 @@
+/*
+* Copyright (c) {Year(s)} {Copyright owner}.
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html".
+*
+* Initial Contributors:
+* {Name} {Company} ? Initial contribution
+*
+* Contributors:
+* {Name} {Company} ? {{Description of contribution}}
+*
+* Description:
+* {{Description of the file}}
+*
+*/
+
+
+#ifndef __TRANSACTION_H__
+#define __TRANSACTION_H__
+
+// System includes
+#include
+
+// User includes
+
+// Forward declarations
+
+// Constants
+
+// CTransactionItem Class declaration
+NONSHARABLE_CLASS( CTransactionItem ) : public CBase
+ {
+public:
+ // constrcutor and destructor
+
+ /**
+ * C++ constructor
+ */
+ CTransactionItem( const TDesC8& aElementId );
+
+ /**
+ * Destructor
+ */
+ ~CTransactionItem();
+
+public:
+ // new functions
+
+ /**
+ * Returns this transaction's element id.
+ *
+ * @return Transaction element id.
+ */
+ const TDesC8& ElementId() const;
+
+ /**
+ * Returns this transaction's content type.
+ * To be overriden by sub-classes.
+ *
+ * @return Transaction element type.
+ */
+ virtual const TDesC8& Type() const = 0;
+
+protected:
+ // data
+
+ /** Transaction's element id, owned */
+ HBufC8* iElementId;
+ };
+
+// CImageTransactionItem Class declaration
+NONSHARABLE_CLASS( CImageTransactionItem ) : public CTransactionItem
+ {
+public:
+ // constructors and destructor
+
+ /**
+ * C++ constructor
+ */
+ CImageTransactionItem(
+ const TDesC8& aElementId,
+ TInt aImageHandle,
+ TInt aMaskHandle );
+
+ /**
+ * C++ constructor
+ */
+ CImageTransactionItem(
+ const TDesC8& aElementId,
+ const TDesC& aPath );
+
+ /**
+ * Destructor
+ */
+ ~CImageTransactionItem();
+
+public:
+ // from CTransactionItem
+
+ /**
+ * @see CTransactionItem
+ */
+ const TDesC8& Type() const;
+
+public:
+ // new functions
+
+ /**
+ * Gets transaction's image handle.
+ * Notice that path and handles are mutually exclusice in one transaction.
+ *
+ * @return Image handle
+ */
+ TInt ImageHandle() const;
+
+ /**
+ * Gets transaction's mask handle.
+ * Notice that path and handles are mutually exclusice in one transaction.
+ *
+ * @return Mask handle
+ */
+ TInt MaskHandle() const;
+
+ /**
+ * Gets transaction's path.
+ * Notice that path and handles are mutually exclusice in one transaction.
+ *
+ * @return Path
+ */
+ const TDesC& Path() const;
+
+private:
+ // data
+
+ /** Transaction's data, caller must maintain the bitmap alive */
+ TInt iImageHandle;
+ /** Transaction's data, caller must maintain the bitmap alive */
+ TInt iMaskHandle;
+ /** Transaction's data, owned */
+ HBufC* iPath;
+ };
+
+// CTextTransactionItem Class declaration
+NONSHARABLE_CLASS( CTextTransactionItem ) : public CTransactionItem
+ {
+public:
+ // constructors and destructor
+
+ /**
+ * C++ constructor
+ */
+ CTextTransactionItem(
+ const TDesC8& aElementId,
+ const TDesC& aText );
+
+ /**
+ * Destructor
+ */
+ ~CTextTransactionItem();
+
+public:
+ // from CTransactionItem
+
+ /**
+ * @see CTransactionItem
+ */
+ const TDesC8& Type() const;
+
+public:
+ // new functions
+
+ /**
+ * Gets transaction's text
+ *
+ * @return Text
+ */
+ const TDesC& Text() const;
+
+private:
+ // data
+
+ /** Transaction's data, owned */
+ HBufC* iText;
+ };
+
+// CDataTransactionItem Class declaration
+NONSHARABLE_CLASS( CDataTransactionItem ) : public CTransactionItem
+ {
+public:
+ // constructors and destructor
+
+ /**
+ * C++ constructor
+ */
+ CDataTransactionItem(
+ const TDesC8& aElementId,
+ const TDesC8& aData );
+
+ /**
+ * Destructor
+ */
+ ~CDataTransactionItem();
+
+public:
+ // from CTransactionItem
+
+ /**
+ * @see CTransactionItem
+ */
+ const TDesC8& Type() const;
+
+public:
+ // new functions
+
+ /**
+ * Gets transaction's data
+ *
+ * @return Data
+ */
+ const TDesC8& Data() const;
+
+private:
+ // data
+
+ /** Transaction's data, owned */
+ HBufC8* iData;
+ };
+
+
+// CTransaction Class declaration
+NONSHARABLE_CLASS( CTransaction ) : public CBase
+ {
+public:
+ // constructors and destructor
+
+ /**
+ * C++ constructor
+ */
+ CTransaction(
+ const TDesC& aWidgetId );
+
+ /**
+ * Destructor
+ */
+ ~CTransaction();
+
+public:
+ // new functions
+
+ /**
+ * Equals operator
+ *
+ * @param aWidgetId Widget id to use in comparision
+ * @return ETrue if this transaction matches to aWidgetId, EFalse otherwise
+ */
+ TBool operator== ( const TDesC& aWidgetId ) const;
+
+ /**
+ * Appends transaction item to transaction items array.
+ *
+ * @param aItem Transaction item. This transaction takes item's ownership.
+ */
+ void AppendL( CTransactionItem* aItem );
+
+ /**
+ * Gets transaction items from this transaction.
+ *
+ * @return Transaction items.
+ */
+ const RPointerArray< CTransactionItem >& Items() const;
+
+private:
+ // data
+
+ /** Transaction items, owned */
+ mutable RPointerArray< CTransactionItem > iItems;
+ /** Transaction's id, same as widget id */
+ const TDesC& iWidgetId;
+ };
+
+#endif // __TRANSACTION_H__
+
+// End of file
diff -r 000000000000 -r b856a9924bbc data/publisherif/src/hspublisher.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/data/publisherif/src/hspublisher.cpp Wed Jun 02 13:22:05 2010 +0300
@@ -0,0 +1,205 @@
+/*
+* Copyright (c) {Year(s)} {Copyright owner}.
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html".
+*
+* Initial Contributors:
+* {Name} {Company} ? Initial contribution
+*
+* Contributors:
+* {Name} {Company} ? {{Description of contribution}}
+*
+* Description:
+* {{Description of the file}}
+*
+*/
+
+// System includes
+
+// User includes
+#include "hspublisherimpl.h"
+#include "hspublisher.h"
+
+// Constants
+
+
+// ============================= LOCAL FUNCTIONS ===============================
+
+// ============================ MEMBER FUNCTIONS ===============================
+// -----------------------------------------------------------------------------
+// CHsPublisher::NewLC()
+// Two-phased constructor
+// -----------------------------------------------------------------------------
+//
+CHsPublisher* CHsPublisher::NewLC( MHsWidgetObserver& aObserver,
+ TBool aEnablePersist )
+ {
+ CHsPublisher* self = new ( ELeave ) CHsPublisher();
+ CleanupStack::PushL( self );
+ self->ConstructL( aObserver, aEnablePersist );
+ return self;
+ }
+
+// -----------------------------------------------------------------------------
+// CHsPublisher::NewL()
+// Two-phased constructor
+// -----------------------------------------------------------------------------
+//
+CHsPublisher* CHsPublisher::NewL( MHsWidgetObserver& aObserver,
+ TBool aEnablePersist )
+ {
+ CHsPublisher* self = CHsPublisher::NewLC( aObserver, aEnablePersist );
+ CleanupStack::Pop( self );
+ return self;
+ }
+
+// -----------------------------------------------------------------------------
+// CHsPublisher::CHsPublisher()
+// C++ default constructor
+// -----------------------------------------------------------------------------
+//
+CHsPublisher::CHsPublisher()
+ {
+ }
+
+// -----------------------------------------------------------------------------
+// CHsPublisher::ConstructL()
+// 2nd phase constructor
+// -----------------------------------------------------------------------------
+//
+void CHsPublisher::ConstructL( MHsWidgetObserver& aObserver,
+ TBool aEnablePersist )
+ {
+ iImpl = CHsPublisherImpl::NewL( aObserver, aEnablePersist );
+ }
+
+// -----------------------------------------------------------------------------
+// CHsPublisher::~CHsPublisher()
+// Destructor
+// -----------------------------------------------------------------------------
+//
+CHsPublisher::~CHsPublisher()
+ {
+ delete iImpl;
+ }
+
+// -----------------------------------------------------------------------------
+// CHsPublisher::PublishText()
+//
+// -----------------------------------------------------------------------------
+//
+TInt CHsPublisher::PublishText( const TDesC& aWidgetId,
+ const TDesC8& aElementId, const TDesC& aText )
+ {
+ TRAPD( err, iImpl->PublishTextL( aWidgetId, aElementId, aText ) );
+
+ return err;
+ }
+
+// -----------------------------------------------------------------------------
+// CHsPublisher::PublishImage()
+//
+// -----------------------------------------------------------------------------
+//
+TInt CHsPublisher::PublishImage( const TDesC& aWidgetId,
+ const TDesC8& aElementId, const CFbsBitmap* aImage, const CFbsBitmap* aMask )
+ {
+ TRAPD( err, iImpl->PublishImageL( aWidgetId, aElementId, aImage, aMask ) );
+
+ return err;
+ }
+
+// -----------------------------------------------------------------------------
+// CHsPublisher::PublishImage()
+//
+// -----------------------------------------------------------------------------
+//
+TInt CHsPublisher::PublishImage( const TDesC& aWidgetId,
+ const TDesC8& aElementId, TInt aImageHandle, TInt aMaskHandle )
+ {
+ TRAPD( err, iImpl->PublishImageL(
+ aWidgetId, aElementId, aImageHandle, aMaskHandle ) );
+
+ return err;
+ }
+
+// -----------------------------------------------------------------------------
+// CHsPublisher::PublishImage()
+//
+// -----------------------------------------------------------------------------
+//
+TInt CHsPublisher::PublishImage( const TDesC& aWidgetId,
+ const TDesC8& aElementId, const TDesC& aSource )
+ {
+ TRAPD( err, iImpl->PublishImageL( aWidgetId, aElementId, aSource ) );
+
+ return err;
+ }
+
+// -----------------------------------------------------------------------------
+// CHsPublisher::PublishStream()
+//
+// -----------------------------------------------------------------------------
+//
+TInt CHsPublisher::PublishStream( const TDesC& aWidgetId,
+ const TDesC8& aElementId, const TDesC8& aStream )
+ {
+ TRAPD( err, iImpl->PublishStreamL( aWidgetId, aElementId, aStream ) );
+
+ return err;
+ }
+
+// -----------------------------------------------------------------------------
+// CHsPublisher::CleanText()
+//
+// -----------------------------------------------------------------------------
+//
+TInt CHsPublisher::CleanText( const TDesC& aWidgetId,
+ const TDesC8& aElementId )
+ {
+ TRAPD( err, iImpl->CleanTextL( aWidgetId, aElementId ) );
+
+ return err;
+ }
+
+// -----------------------------------------------------------------------------
+// CHsPublisher::CleanImage()
+//
+// -----------------------------------------------------------------------------
+//
+TInt CHsPublisher::CleanImage( const TDesC& aWidgetId,
+ const TDesC8& aElementId )
+ {
+ TRAPD( err, iImpl->CleanImageL( aWidgetId, aElementId ) );
+
+ return err;
+ }
+
+// -----------------------------------------------------------------------------
+// CHsPublisher::StartTransaction()
+//
+// -----------------------------------------------------------------------------
+//
+TInt CHsPublisher::StartTransaction( const TDesC& aWidgetId )
+ {
+ TRAPD( err, iImpl->StartTransactionL( aWidgetId ) );
+
+ return err;
+ }
+
+// -----------------------------------------------------------------------------
+// CHsPublisher::CommitTransaction()
+//
+// -----------------------------------------------------------------------------
+//
+TInt CHsPublisher::CommitTransaction( const TDesC& aWidgetId )
+ {
+ TRAPD( err, iImpl->CommitTransactionL( aWidgetId ) );
+
+ return err;
+ }
+
+// End of file
diff -r 000000000000 -r b856a9924bbc data/publisherif/src/hspublisherimpl.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/data/publisherif/src/hspublisherimpl.cpp Wed Jun 02 13:22:05 2010 +0300
@@ -0,0 +1,856 @@
+/*
+* Copyright (c) {Year(s)} {Copyright owner}.
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html".
+*
+* Initial Contributors:
+* {Name} {Company} ? Initial contribution
+*
+* Contributors:
+* {Name} {Company} ? {{Description of contribution}}
+*
+* Description:
+* {{Description of the file}}
+*
+*/
+
+// System includes
+#include
+#include
+#include
+#include
+
+// User includes
+#include "transaction.h"
+#include "hswidgetobserver.h"
+#include "hspublisherimpl.h"
+
+// Constants
+_LIT8( KCPSConfigurationIf, "IContentPublishing" );
+_LIT8( KCPS, "Service.ContentPublishing" );
+
+_LIT( KCpData, "cp_data" );
+
+_LIT( KHsWidget, "hswidget" );
+_LIT( KPublisher, "publisher" );
+_LIT( KAll, "all" );
+
+_LIT( KDataAndPublisher, "cp_data:publisher" );
+
+_LIT8( KAdd, "add" );
+_LIT8( KType, "type" );
+_LIT8( KFilter, "filter" );
+_LIT8( KFlag, "flag" );
+_LIT8( KErrorCode, "ErrorCode" );
+_LIT8( KDataMap, "data_map" );
+_LIT8( KItem, "item" );
+_LIT8( KDelete, "Delete" );
+_LIT8( KPublisherId, "publisher" );
+_LIT8( KContentType, "content_type" );
+_LIT8( KContentId, "content_id" );
+_LIT8( KOperation, "operation" );
+_LIT8( KExecute, "execute" );
+
+_LIT8( KRequestNotification, "RequestNotification" );
+_LIT8( KChangeInfo, "change_info" );
+_LIT8( KActionTrigger, "action_trigger" );
+
+_LIT8( KActionMap, "action_map" );
+_LIT8( KActive, "active" );
+
+_LIT8( KSuspend, "suspend" );
+_LIT8( KResume, "resume" );
+_LIT8( KOnline, "online" );
+_LIT8( KOffline, "offline" );
+
+_LIT8( KSystemStartup, "systemstartup" );
+_LIT8( KPageStartup, "pagestartup" );
+_LIT8( KWidgetStartup, "pluginstartup" );
+
+_LIT8( KSystemShutdown, "systemshutdown" );
+_LIT8( KPageShutdown, "pageshutdown" );
+_LIT8( KWidgetShutdown, "pluginshutdown" );
+
+const TUint KDisablePersist( 0x1000 );
+
+// Type definitions
+typedef TBuf< 256 > TVariantBuf;
+typedef TBuf8< 256 > TVariantBuf8;
+
+
+// ============================= LOCAL FUNCTIONS ===============================
+
+// ============================ MEMBER FUNCTIONS ===============================
+// -----------------------------------------------------------------------------
+// CHsPublisherImpl::NewLC()
+// Two-phased constructor
+// -----------------------------------------------------------------------------
+//
+CHsPublisherImpl* CHsPublisherImpl::NewLC( MHsWidgetObserver& aObserver,
+ TBool aEnablePersist )
+ {
+ CHsPublisherImpl* self = new ( ELeave )
+ CHsPublisherImpl( aObserver, aEnablePersist );
+
+ CleanupStack::PushL( self );
+ self->ConstructL();
+ return self;
+ }
+
+// -----------------------------------------------------------------------------
+// CHsPublisherImpl::NewL()
+// Two-phased constructor
+// -----------------------------------------------------------------------------
+//
+CHsPublisherImpl* CHsPublisherImpl::NewL( MHsWidgetObserver& aObserver,
+ TBool aEnablePersist )
+ {
+ CHsPublisherImpl* self =
+ CHsPublisherImpl::NewLC( aObserver, aEnablePersist );
+ CleanupStack::Pop( self );
+ return self;
+ }
+
+// -----------------------------------------------------------------------------
+// CHsPublisherImpl::CHsPublisherImpl()
+// C++ default constructor
+// -----------------------------------------------------------------------------
+//
+CHsPublisherImpl::CHsPublisherImpl( MHsWidgetObserver& aObserver,
+ TBool aEnablePersist )
+ : iObserver( aObserver ),
+ iEnablePersist( aEnablePersist )
+ {
+ }
+
+// -----------------------------------------------------------------------------
+// CHsPublisherImpl::ConstructL()
+// 2nd phase constructor
+// -----------------------------------------------------------------------------
+//
+void CHsPublisherImpl::ConstructL()
+ {
+ AttachL();
+ }
+
+// -----------------------------------------------------------------------------
+// CHsPublisherImpl::~CHsPublisherImpl()
+// Destructor
+// -----------------------------------------------------------------------------
+//
+CHsPublisherImpl::~CHsPublisherImpl()
+ {
+ iTransactions.ResetAndDestroy();
+
+ TRAP_IGNORE( DetachL() );
+ }
+
+// ---------------------------------------------------------------------------
+// CHsPublisherImpl::AttachL
+//
+// ---------------------------------------------------------------------------
+//
+void CHsPublisherImpl::AttachL()
+ {
+ // Attach to CPS service
+ RCriteriaArray interestList;
+ CleanupClosePushL( interestList );
+
+ iServiceHandler = CLiwServiceHandler::NewL();
+
+ iCpsService = CLiwCriteriaItem::NewL( 1, KCPSConfigurationIf, KCPS );
+
+ iCpsService->SetServiceClass( TUid::Uid( KLiwClassBase ) );
+
+ interestList.AppendL( iCpsService );
+ iServiceHandler->AttachL( interestList );
+
+ CLiwGenericParamList& inParamList( iServiceHandler->InParamListL() );
+ CLiwGenericParamList& outParamList( iServiceHandler->OutParamListL() );
+
+ iServiceHandler->ExecuteServiceCmdL(
+ *iCpsService,
+ inParamList,
+ outParamList );
+
+ TInt pos( 0 );
+
+ outParamList.FindFirst( pos, KCPSConfigurationIf );
+
+ if ( pos != KErrNotFound )
+ {
+ iCpsInterface = outParamList[pos].Value().AsInterface();
+ }
+
+ inParamList.Reset();
+ outParamList.Reset();
+
+ if ( !iCpsInterface )
+ {
+ User::Leave( KErrNotFound );
+ }
+
+ const TDesC& publisherId( iObserver.Identity() );
+
+ // Register Observer
+ CLiwDefaultMap* reqmap = CLiwDefaultMap::NewLC();
+
+ reqmap->InsertL( KPublisherId, TLiwVariant( publisherId ) );
+ reqmap->InsertL( KContentType, TLiwVariant( KAll ) );
+ reqmap->InsertL( KContentId, TLiwVariant( KAll ) );
+ reqmap->InsertL( KOperation, TLiwVariant( KExecute ) );
+
+ inParamList.AppendL( TLiwGenericParam(
+ KType, TLiwVariant( KDataAndPublisher ) ) );
+
+ inParamList.AppendL( TLiwGenericParam(
+ KFilter, TLiwVariant( reqmap ) ) );
+
+ iCpsInterface->ExecuteCmdL(
+ KRequestNotification, inParamList, outParamList, 0, this );
+
+ const TLiwGenericParam* outparam( NULL );
+
+ pos = 0;
+
+ outparam = outParamList.FindFirst( pos, KErrorCode );
+
+ TInt err( KErrNone );
+
+ if ( outparam )
+ {
+ if ( outparam->Value().AsTInt32() )
+ {
+ err = KErrGeneral;
+ }
+ }
+
+ inParamList.Reset();
+ outParamList.Reset();
+
+ User::LeaveIfError( err );
+
+ CleanupStack::PopAndDestroy( reqmap );
+
+ // Register Publisher
+ CLiwDefaultMap* datamap = CLiwDefaultMap::NewLC();
+ CLiwDefaultMap* actionmap = CLiwDefaultMap::NewLC();
+
+ datamap->InsertL( KPublisherId, TLiwVariant( publisherId ) );
+ datamap->InsertL( KContentType, TLiwVariant( KAll ) );
+ datamap->InsertL( KContentId, TLiwVariant( KAll ) );
+
+ actionmap->InsertL( KActive, TLiwVariant() );
+
+ datamap->InsertL( KActionMap, TLiwVariant( actionmap ) );
+
+ inParamList.AppendL( TLiwGenericParam(
+ KType, TLiwVariant( KPublisher ) ) );
+
+ inParamList.AppendL( TLiwGenericParam(
+ KItem, TLiwVariant( datamap ) ) );
+
+ iCpsInterface->ExecuteCmdL( KAdd, inParamList, outParamList );
+
+ outparam = NULL;
+
+ pos = 0;
+
+ outparam = outParamList.FindFirst( pos, KErrorCode );
+
+ err = KErrNone;
+
+ if ( outparam )
+ {
+ if ( outparam->Value().AsTInt32() )
+ {
+ err = KErrGeneral;
+ }
+ }
+
+ inParamList.Reset();
+ outParamList.Reset();
+
+ User::LeaveIfError( err );
+
+ CleanupStack::PopAndDestroy( 2, datamap ); // actionmap
+
+ CleanupStack::PopAndDestroy( &interestList );
+
+ iCpServiceAvailable = ETrue;
+ }
+
+// ---------------------------------------------------------------------------
+// CHsPublisherImpl::DetachL
+//
+// ---------------------------------------------------------------------------
+//
+void CHsPublisherImpl::DetachL()
+ {
+ if ( iServiceHandler && iCpsInterface )
+ {
+ CLiwGenericParamList& inParamList( iServiceHandler->InParamListL() );
+ CLiwGenericParamList& outParamList( iServiceHandler->OutParamListL() );
+
+ // Remove widget data
+ CLiwDefaultMap* cpdatamap = CLiwDefaultMap::NewLC();
+
+ const TDesC& publisherId( iObserver.Identity() );
+
+ cpdatamap->InsertL( KPublisherId, TLiwVariant( publisherId ) );
+ cpdatamap->InsertL( KContentType, TLiwVariant( KAll ) );
+ cpdatamap->InsertL( KContentId, TLiwVariant( KAll ) );
+
+ inParamList.AppendL( TLiwGenericParam(
+ KType, TLiwVariant( KCpData ) ) );
+
+ inParamList.AppendL( TLiwGenericParam(
+ KItem, TLiwVariant( cpdatamap ) ) );
+
+ TRAP_IGNORE( iCpsInterface->ExecuteCmdL(
+ KDelete, inParamList, outParamList ) );
+
+ inParamList.Reset();
+ outParamList.Reset();
+
+ CleanupStack::PopAndDestroy( cpdatamap );
+
+ // Unregister Observer
+ TRAP_IGNORE( iCpsInterface->ExecuteCmdL(
+ KRequestNotification,
+ inParamList,
+ outParamList,
+ KLiwOptCancel,
+ this ) );
+
+ // Detach from CPS service
+ if ( iCpsInterface )
+ {
+ // Close interface
+ iCpsInterface->Close();
+ }
+
+ iCpsInterface = NULL;
+
+ if ( iServiceHandler && iCpsService )
+ {
+ // Detach services from the handler
+ RCriteriaArray list;
+
+ list.Append( iCpsService );
+
+ TRAP_IGNORE( iServiceHandler->DetachL( list ) );
+
+ list.Reset();
+ }
+ }
+
+ delete iCpsService;
+ iCpsService = NULL;
+
+ delete iServiceHandler;
+ iServiceHandler = NULL;
+
+ iCpServiceAvailable = EFalse;
+ }
+
+// ---------------------------------------------------------------------------
+// CHsPublisherImpl::HandleNotifyL
+//
+// ---------------------------------------------------------------------------
+//
+TInt CHsPublisherImpl::HandleNotifyL( TInt /*aCmdId*/, TInt /*aEventId*/,
+ CLiwGenericParamList& aEventParamList,
+ const CLiwGenericParamList& /*aInParamList*/ )
+ {
+ TInt pos( 0 );
+
+ aEventParamList.FindFirst( pos, KChangeInfo );
+
+ if ( pos == KErrNotFound )
+ {
+ return pos;
+ }
+
+ const TDesC& publisherId( iObserver.Identity() );
+
+ // Get list of maps
+ TLiwVariant listvariant( aEventParamList[pos].Value() );
+ listvariant.PushL();
+
+ const CLiwList* list( listvariant.AsList() );
+
+ // Iterate through list
+ for ( TInt i = 0; i < list->Count(); i++ )
+ {
+ TVariantBuf publisher;
+ TVariantBuf contenttype;
+ TVariantBuf widgetid;
+
+ TVariantBuf8 operation;
+ TVariantBuf8 trigger;
+
+ TLiwVariant variant;
+ variant.PushL();
+
+ if ( list->AtL( i, variant ) )
+ {
+ const CLiwMap* map( variant.AsMap() );
+
+ if( map->FindL( KPublisherId, variant ) )
+ {
+ variant.Get( publisher );
+ }
+
+ if ( publisher != publisherId )
+ {
+ // Not targeted to this publisher
+ continue;
+ }
+
+ // Check what triggered a notification
+ if ( map->FindL( KOperation, variant ) )
+ {
+ variant.Get( operation );
+ }
+
+ if ( operation == KExecute() )
+ {
+ if ( map->FindL( KActionTrigger, variant ) )
+ {
+ variant.Get( trigger );
+ }
+
+ if ( map->FindL( KContentId, variant ) )
+ {
+ variant.Get( widgetid );
+ }
+
+ if ( map->FindL( KContentType, variant ) )
+ {
+ variant.Get( contenttype );
+ }
+
+ if ( contenttype == KHsWidget() )
+ {
+ // HS specific notification
+ ProcessEvent( widgetid, trigger );
+ }
+ else
+ {
+ // Widget specific notification
+ HBufC* param = HBufC::NewLC( trigger.Length() );
+ param->Des().Copy( trigger );
+
+ iObserver.NotifyWidgetEvent(
+ widgetid, contenttype, *param );
+
+ CleanupStack::PopAndDestroy( param );
+ }
+ }
+
+ CleanupStack::PopAndDestroy(); // variant
+ }
+ }
+
+ CleanupStack::PopAndDestroy(); // listvariant
+
+ return KErrNone;
+ }
+
+// -----------------------------------------------------------------------------
+// CHsPublisherImpl::ProcessEvent()
+//
+// -----------------------------------------------------------------------------
+//
+void CHsPublisherImpl::ProcessEvent( const TDesC& aWidgetId,
+ const TDesC8& aEvent ) const
+ {
+ if ( aEvent == KResume() )
+ {
+ iObserver.NotifyWidgetState(
+ aWidgetId, MHsWidgetObserver::EAlive );
+ }
+ else if ( aEvent == KSuspend() )
+ {
+ iObserver.NotifyWidgetState(
+ aWidgetId, MHsWidgetObserver::ESuspend );
+ }
+ else if ( aEvent == KOnline() )
+ {
+ iObserver.NotifyWidgetState(
+ aWidgetId, MHsWidgetObserver::EOnline );
+ }
+ else if ( aEvent == KOffline() )
+ {
+ iObserver.NotifyWidgetState(
+ aWidgetId, MHsWidgetObserver::EOffline );
+ }
+ else if ( aEvent == KSystemStartup() )
+ {
+ iObserver.NotifyWidgetStarted(
+ aWidgetId, MHsWidgetObserver::ESystemStart );
+ }
+ else if ( aEvent == KPageStartup() )
+ {
+ iObserver.NotifyWidgetStarted(
+ aWidgetId, MHsWidgetObserver::EPageStart );
+ }
+ else if ( aEvent == KWidgetStartup() )
+ {
+ iObserver.NotifyWidgetStarted(
+ aWidgetId, MHsWidgetObserver::EWidgetStart );
+ }
+ else if ( aEvent == KSystemShutdown() )
+ {
+ iObserver.NotifyWidgetStopped(
+ aWidgetId, MHsWidgetObserver::ESystemStop );
+ }
+ else if ( aEvent == KPageShutdown() )
+ {
+ iObserver.NotifyWidgetStopped(
+ aWidgetId, MHsWidgetObserver::EPageStop );
+ }
+ else if ( aEvent == KWidgetShutdown() )
+ {
+ iObserver.NotifyWidgetStopped(
+ aWidgetId, MHsWidgetObserver::EWidgetStop );
+ }
+ }
+
+// -----------------------------------------------------------------------------
+// CHsPublisherImpl::PublishTextL()
+//
+// -----------------------------------------------------------------------------
+//
+void CHsPublisherImpl::PublishTextL( const TDesC& aWidgetId,
+ const TDesC8& aElementId, const TDesC& aText )
+ {
+ __ASSERT_ALWAYS( iCpServiceAvailable, User::Invariant() );
+
+ CTransaction* tr( Transaction( aWidgetId ) );
+
+ if ( !tr )
+ {
+ // Transaction not started
+ User::Leave( KErrNotReady );
+ }
+
+ CTextTransactionItem* item =
+ new ( ELeave ) CTextTransactionItem( aElementId, aText );
+
+ CleanupStack::PushL( item );
+
+ tr->AppendL( item );
+ CleanupStack::Pop( item );
+ }
+
+// -----------------------------------------------------------------------------
+// CHsPublisherImpl::PublishImageL()
+//
+// -----------------------------------------------------------------------------
+//
+void CHsPublisherImpl::PublishImageL( const TDesC& aWidgetId,
+ const TDesC8& aElementId, const CFbsBitmap* aImage, const CFbsBitmap* aMask )
+ {
+ __ASSERT_ALWAYS( iCpServiceAvailable, User::Invariant() );
+
+ TInt imageHandle( KErrBadHandle );
+ TInt maskHandle( KErrBadHandle );
+
+ if ( aImage )
+ {
+ imageHandle = aImage->Handle();
+ }
+
+ if ( aMask )
+ {
+ maskHandle = aMask->Handle();
+ }
+
+ PublishImageL( aWidgetId, aElementId, imageHandle, maskHandle );
+ }
+
+// -----------------------------------------------------------------------------
+// CHsPublisherImpl::PublishImageL()
+//
+// -----------------------------------------------------------------------------
+//
+void CHsPublisherImpl::PublishImageL( const TDesC& aWidgetId,
+ const TDesC8& aElementId, TInt aImageHandle, TInt aMaskHandle )
+ {
+ __ASSERT_ALWAYS( iCpServiceAvailable, User::Invariant() );
+
+ CTransaction* tr( Transaction( aWidgetId ) );
+
+ if ( !tr )
+ {
+ // Transaction not started
+ User::Leave( KErrNotReady );
+ }
+
+ CImageTransactionItem* item =
+ new ( ELeave ) CImageTransactionItem(
+ aElementId, aImageHandle, aMaskHandle );
+
+ CleanupStack::PushL( item );
+
+ tr->AppendL( item );
+ CleanupStack::Pop( item );
+ }
+
+// -----------------------------------------------------------------------------
+// CHsPublisherImpl::PublishImageL()
+//
+// -----------------------------------------------------------------------------
+//
+void CHsPublisherImpl::PublishImageL( const TDesC& aWidgetId,
+ const TDesC8& aElementId, const TDesC& aSource )
+ {
+ __ASSERT_ALWAYS( iCpServiceAvailable, User::Invariant() );
+
+ CTransaction* tr( Transaction( aWidgetId ) );
+
+ if ( !tr )
+ {
+ // Transaction not started
+ User::Leave( KErrNotReady );
+ }
+
+ CImageTransactionItem* item =
+ new ( ELeave ) CImageTransactionItem( aElementId, aSource );
+ CleanupStack::PushL( item );
+
+ tr->AppendL( item );
+ CleanupStack::Pop( item );
+ }
+
+// -----------------------------------------------------------------------------
+// CHsPublisherImpl::PublishStreamL()
+//
+// -----------------------------------------------------------------------------
+//
+void CHsPublisherImpl::PublishStreamL( const TDesC& aWidgetId,
+ const TDesC8& aElementId, const TDesC8& aStream )
+ {
+ CTransaction* tr( Transaction( aWidgetId ) );
+
+ if ( !tr )
+ {
+ // Transaction not started
+ User::Leave( KErrNotReady );
+ }
+
+ CDataTransactionItem* item =
+ new ( ELeave ) CDataTransactionItem( aElementId, aStream );
+ CleanupStack::PushL( item );
+
+ tr->AppendL( item );
+ CleanupStack::Pop( item );
+ }
+
+// -----------------------------------------------------------------------------
+// CHsPublisherImpl::CleanTextL()
+//
+// -----------------------------------------------------------------------------
+//
+void CHsPublisherImpl::CleanTextL( const TDesC& aWidgetId,
+ const TDesC8& aElementId )
+ {
+ CTransaction* tr( Transaction( aWidgetId ) );
+
+ if ( !tr )
+ {
+ // Transaction not started
+ User::Leave( KErrNotReady );
+ }
+
+ CTextTransactionItem* item =
+ new ( ELeave ) CTextTransactionItem( aElementId, KNullDesC() );
+ CleanupStack::PushL( item );
+
+ tr->AppendL( item );
+ CleanupStack::Pop( item );
+ }
+
+// -----------------------------------------------------------------------------
+// CHsPublisherImpl::CleanImageL()
+//
+// -----------------------------------------------------------------------------
+//
+void CHsPublisherImpl::CleanImageL( const TDesC& aWidgetId,
+ const TDesC8& aElementId )
+ {
+ CTransaction* tr( Transaction( aWidgetId ) );
+
+ if ( !tr )
+ {
+ // Transaction not started
+ User::Leave( KErrNotReady );
+ }
+
+ CImageTransactionItem* item =
+ new ( ELeave ) CImageTransactionItem(
+ aElementId, KErrBadHandle, KErrBadHandle );
+ CleanupStack::PushL( item );
+
+ tr->AppendL( item );
+ CleanupStack::Pop( item );
+ }
+
+// -----------------------------------------------------------------------------
+// CHsPublisherImpl::StartTransactionL()
+//
+// -----------------------------------------------------------------------------
+//
+void CHsPublisherImpl::StartTransactionL( const TDesC& aWidgetId )
+ {
+ __ASSERT_ALWAYS( iCpServiceAvailable, User::Invariant() );
+
+ CTransaction* tr( Transaction( aWidgetId ) );
+
+ if ( tr )
+ {
+ // Transaction already started
+ User::Leave( KErrAlreadyExists );
+ }
+
+ // Create new transaction for this widget instance
+ tr = new ( ELeave ) CTransaction( aWidgetId );
+ CleanupStack::PushL( tr );
+
+ iTransactions.AppendL( tr );
+ CleanupStack::Pop( tr );
+ }
+
+// -----------------------------------------------------------------------------
+// CHsPublisherImpl::CommitTransactionL()
+//
+// -----------------------------------------------------------------------------
+//
+void CHsPublisherImpl::CommitTransactionL( const TDesC& aWidgetId )
+ {
+ __ASSERT_ALWAYS( iCpServiceAvailable, User::Invariant() );
+
+ CTransaction* tr( Transaction( aWidgetId ) );
+
+ if ( !tr )
+ {
+ // Transaction not started
+ User::Leave( KErrNotReady );
+ }
+
+ // Remove transaction
+ iTransactions.Remove( iTransactions.Find( tr ) );
+
+ // Transaction will be destroyed
+ CleanupStack::PushL( tr );
+
+ const RPointerArray< CTransactionItem >& items( tr->Items() );
+
+ if ( items.Count() == 0 )
+ {
+ // Nothing to publish
+ CleanupStack::PopAndDestroy( tr );
+ return;
+ }
+
+ CLiwGenericParamList& inParamList( iServiceHandler->InParamListL() );
+ CLiwGenericParamList& outParamList( iServiceHandler->OutParamListL() );
+
+ inParamList.AppendL( TLiwGenericParam(
+ KType, TLiwVariant( KCpData ) ) );
+
+ CLiwDefaultMap* cpdatamap = CLiwDefaultMap::NewLC();
+
+ const TDesC& publisherId( iObserver.Identity() );
+
+ cpdatamap->InsertL( KPublisherId, TLiwVariant( publisherId ) );
+ cpdatamap->InsertL( KContentType, TLiwVariant( KAll ) );
+ cpdatamap->InsertL( KContentId, TLiwVariant( aWidgetId ) );
+
+ CLiwDefaultMap* datamap = CLiwDefaultMap::NewLC();
+
+ for ( TInt i = 0; i < items.Count(); i++ )
+ {
+ CTransactionItem* item( items[i] );
+
+ CImageTransactionItem* image =
+ dynamic_cast< CImageTransactionItem* >( item );
+
+ CTextTransactionItem* text =
+ dynamic_cast< CTextTransactionItem* >( item );
+
+ CDataTransactionItem* data =
+ dynamic_cast< CDataTransactionItem* >( item );
+
+ if ( image )
+ {
+ const TDesC& source( image->Path() );
+
+ if ( source != KNullDesC )
+ {
+ datamap->InsertL( image->ElementId(),
+ TLiwVariant( source ) );
+ }
+ else
+ {
+ datamap->InsertL( image->ElementId(),
+ TLiwVariant( TInt32( image->ImageHandle() ) ) );
+
+ datamap->InsertL( image->ElementId(),
+ TLiwVariant( TInt32( image->MaskHandle() ) ) );
+ }
+ }
+ else if ( text )
+ {
+ datamap->InsertL( text->ElementId(),
+ TLiwVariant( text->Text() ) );
+ }
+ else if ( data )
+ {
+ datamap->InsertL( data->ElementId(),
+ TLiwVariant( data->Data() ) );
+ }
+ }
+
+ cpdatamap->InsertL( KDataMap, TLiwVariant( datamap ) );
+
+ inParamList.AppendL( TLiwGenericParam(
+ KItem, TLiwVariant( cpdatamap ) ) );
+
+ iCpsInterface->ExecuteCmdL( KAdd, inParamList, outParamList,
+ iEnablePersist ? 0 : KDisablePersist );
+
+ inParamList.Reset();
+ outParamList.Reset();
+
+ CleanupStack::PopAndDestroy( 3, tr ); // cpdatamap, datamap
+ }
+
+// -----------------------------------------------------------------------------
+// CHsPublisherImpl::Transaction()
+//
+// -----------------------------------------------------------------------------
+//
+CTransaction* CHsPublisherImpl::Transaction(
+ const TDesC& aWidgetId ) const
+ {
+ CTransaction* tr( NULL );
+
+ for ( TInt i = 0; i < iTransactions.Count(); i++ )
+ {
+ if ( *iTransactions[i] == aWidgetId )
+ {
+ tr = iTransactions[i];
+ break;
+ }
+ }
+
+ return tr;
+ }
+
+// End of file
diff -r 000000000000 -r b856a9924bbc data/publisherif/src/transaction.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/data/publisherif/src/transaction.cpp Wed Jun 02 13:22:05 2010 +0300
@@ -0,0 +1,284 @@
+/*
+* Copyright (c) {Year(s)} {Copyright owner}.
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html".
+*
+* Initial Contributors:
+* {Name} {Company} ? Initial contribution
+*
+* Contributors:
+* {Name} {Company} ? {{Description of contribution}}
+*
+* Description:
+* {{Description of the file}}
+*
+*/
+// System includes
+
+// User includes
+#include "transaction.h"
+
+// Constants
+
+// ============================= LOCAL FUNCTIONS ===============================
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CTransactionItem::CTransactionItem()
+// C++ default constructor
+// -----------------------------------------------------------------------------
+//
+CTransactionItem::CTransactionItem( const TDesC8& aElementId )
+ : iElementId( aElementId.Alloc() )
+ {
+ }
+
+// -----------------------------------------------------------------------------
+// CTransactionItem::~CTransactionItem()
+// Destructor
+// -----------------------------------------------------------------------------
+//
+CTransactionItem::~CTransactionItem()
+ {
+ delete iElementId;
+ }
+
+// -----------------------------------------------------------------------------
+// CTransactionItem::ElementId()
+//
+// -----------------------------------------------------------------------------
+//
+const TDesC8& CTransactionItem::ElementId() const
+ {
+ return iElementId ? *iElementId : KNullDesC8();
+ }
+
+// -----------------------------------------------------------------------------
+// CImageTransactionItem::CImageTransactionItem
+// C++ default constructor
+// -----------------------------------------------------------------------------
+//
+CImageTransactionItem::CImageTransactionItem( const TDesC8& aElementId,
+ TInt aImageHandle, TInt aMaskHandle )
+ : CTransactionItem( aElementId ),
+ iImageHandle( aImageHandle ),
+ iMaskHandle( aMaskHandle ),
+ iPath( NULL )
+ {
+ }
+
+// -----------------------------------------------------------------------------
+// CImageTransactionItem::CImageTransactionItem
+// C++ default constructor
+// -----------------------------------------------------------------------------
+//
+CImageTransactionItem::CImageTransactionItem( const TDesC8& aElementId,
+ const TDesC& aPath )
+ : CTransactionItem( aElementId ),
+ iImageHandle( KErrBadHandle ),
+ iMaskHandle( KErrBadHandle ),
+ iPath( aPath.Alloc() )
+ {
+ }
+
+// -----------------------------------------------------------------------------
+// CImageTransactionItem::~CImageTransactionItem()
+// Destructor
+// -----------------------------------------------------------------------------
+//
+CImageTransactionItem::~CImageTransactionItem()
+ {
+ delete iPath;
+ }
+
+// -----------------------------------------------------------------------------
+// CImageTransactionItem::Type()
+//
+// -----------------------------------------------------------------------------
+//
+const TDesC8& CImageTransactionItem::Type() const
+ {
+ _LIT8( KImage, "image" );
+
+ return KImage();
+ }
+
+// -----------------------------------------------------------------------------
+// CImageTransactionItem::ImageHandle()
+//
+// -----------------------------------------------------------------------------
+//
+TInt CImageTransactionItem::ImageHandle() const
+ {
+ return iImageHandle;
+ }
+
+// -----------------------------------------------------------------------------
+// CImageTransactionItem::MaskHandle()
+//
+// -----------------------------------------------------------------------------
+//
+TInt CImageTransactionItem::MaskHandle() const
+ {
+ return iMaskHandle;
+ }
+
+// -----------------------------------------------------------------------------
+// CImageTransactionItem::Path()
+//
+// -----------------------------------------------------------------------------
+//
+const TDesC& CImageTransactionItem::Path() const
+ {
+ return iPath ? *iPath : KNullDesC();
+ }
+
+// -----------------------------------------------------------------------------
+// CTextTransactionItem::CTextTransactionItem()
+// C++ default constructor
+// -----------------------------------------------------------------------------
+//
+CTextTransactionItem::CTextTransactionItem( const TDesC8& aElementId,
+ const TDesC& aText )
+ : CTransactionItem( aElementId ),
+ iText( aText.Alloc() )
+ {
+ }
+
+// -----------------------------------------------------------------------------
+// CTextTransactionItem::~CTextTransactionItem()
+// Destructor
+// -----------------------------------------------------------------------------
+//
+CTextTransactionItem::~CTextTransactionItem()
+ {
+ delete iText;
+ }
+
+// -----------------------------------------------------------------------------
+// CTextTransactionItem::Type()
+//
+// -----------------------------------------------------------------------------
+//
+const TDesC8& CTextTransactionItem::Type() const
+ {
+ _LIT8( KText, "text" );
+
+ return KText();
+ }
+
+// -----------------------------------------------------------------------------
+// CTextTransactionItem::Text()
+//
+// -----------------------------------------------------------------------------
+//
+const TDesC& CTextTransactionItem::Text() const
+ {
+ return iText ? *iText : KNullDesC();
+ }
+
+
+// -----------------------------------------------------------------------------
+// CDataTransactionItem::CDataTransactionItem()
+// C++ default constructor
+// -----------------------------------------------------------------------------
+//
+CDataTransactionItem::CDataTransactionItem( const TDesC8& aElementId,
+ const TDesC8& aData )
+ : CTransactionItem( aElementId ),
+ iData( aData.Alloc() )
+ {
+ }
+
+// -----------------------------------------------------------------------------
+// CDataTransactionItem::~CDataTransactionItem()
+// Destructor
+// -----------------------------------------------------------------------------
+//
+CDataTransactionItem::~CDataTransactionItem()
+ {
+ delete iData;
+ }
+
+// -----------------------------------------------------------------------------
+// CDataTransactionItem::Type()
+//
+// -----------------------------------------------------------------------------
+//
+const TDesC8& CDataTransactionItem::Type() const
+ {
+ _LIT8( KData, "data" );
+
+ return KData();
+ }
+
+// -----------------------------------------------------------------------------
+// CDataTransactionItem::Data()
+//
+// -----------------------------------------------------------------------------
+//
+const TDesC8& CDataTransactionItem::Data() const
+ {
+ return iData ? *iData : KNullDesC8();
+ }
+
+// -----------------------------------------------------------------------------
+// CTransaction::CTransaction()
+// C++ default constructor
+// -----------------------------------------------------------------------------
+//
+CTransaction::CTransaction( const TDesC& aWidgetId )
+ : iWidgetId( aWidgetId )
+ {
+ }
+
+// -----------------------------------------------------------------------------
+// CTransaction::~CTransaction()
+// Destructor
+// -----------------------------------------------------------------------------
+//
+CTransaction::~CTransaction()
+ {
+ iItems.ResetAndDestroy();
+ }
+
+// -----------------------------------------------------------------------------
+// CTransaction::operator==()
+//
+// -----------------------------------------------------------------------------
+//
+TBool CTransaction::operator== ( const TDesC& aWidgetId ) const
+ {
+ if ( iWidgetId == KNullDesC )
+ {
+ return EFalse;
+ }
+
+ return aWidgetId == iWidgetId;
+ }
+
+// -----------------------------------------------------------------------------
+// CTransaction::AppendL()
+//
+// -----------------------------------------------------------------------------
+//
+void CTransaction::AppendL( CTransactionItem* aItem )
+ {
+ User::LeaveIfError( iItems.InsertInAddressOrder( aItem ) );
+ }
+
+// -----------------------------------------------------------------------------
+// CTransaction::Items()
+//
+// -----------------------------------------------------------------------------
+//
+const RPointerArray< CTransactionItem >& CTransaction::Items() const
+ {
+ return iItems;
+ }
+
+// End of file
diff -r 000000000000 -r b856a9924bbc data/renderingplugin/data/renderer.rss
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/data/renderingplugin/data/renderer.rss Wed Jun 02 13:22:05 2010 +0300
@@ -0,0 +1,43 @@
+/*
+* Copyright (c) {Year(s)} {Copyright owner}.
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html".
+*
+* Initial Contributors:
+* {Name} {Company} ? Initial contribution
+*
+* Contributors:
+* {Name} {Company} ? {{Description of contribution}}
+*
+* Description:
+* {{Description of the file}}
+*
+*/
+
+#include
+
+RESOURCE REGISTRY_INFO theInfo
+{
+dll_uid = 0x22334454;// Apply your own uid!
+interfaces =
+{
+ INTERFACE_INFO
+ {
+ interface_uid = 0x200286DF;//Don't change!
+ implementations =
+ {
+ IMPLEMENTATION_INFO
+ {
+ implementation_uid = 0x22334455;// Apply your own uid!
+ version_no = 1;
+ display_name = "#replace#renderer";
+ default_data = "#replace#renderer";
+ opaque_data = "";
+ }
+ };
+ }
+ };
+}
diff -r 000000000000 -r b856a9924bbc data/renderingplugin/group/bld.inf
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/data/renderingplugin/group/bld.inf Wed Jun 02 13:22:05 2010 +0300
@@ -0,0 +1,24 @@
+/*
+* Copyright (c) {Year(s)} {Copyright owner}.
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html".
+*
+* Initial Contributors:
+* {Name} {Company} ? Initial contribution
+*
+* Contributors:
+* {Name} {Company} ? {{Description of contribution}}
+*
+* Description:
+* {{Description of the file}}
+*
+*/
+
+PRJ_PLATFORMS
+DEFAULT
+
+PRJ_MMPFILES
+#replace#renderer.mmp
diff -r 000000000000 -r b856a9924bbc data/renderingplugin/group/renderer.mmp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/data/renderingplugin/group/renderer.mmp Wed Jun 02 13:22:05 2010 +0300
@@ -0,0 +1,45 @@
+/*
+* Copyright (c) {Year(s)} {Copyright owner}.
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html".
+*
+* Initial Contributors:
+* {Name} {Company} ? Initial contribution
+*
+* Contributors:
+* {Name} {Company} ? {{Description of contribution}}
+*
+* Description:
+* {{Description of the file}}
+*
+*/
+
+#include
+#include
+
+TARGET #replace#renderer.dll
+TARGETTYPE PLUGIN
+UID 0x10009d8d 0x22334454
+
+CAPABILITY CAP_ECOM_PLUGIN
+
+SOURCEPATH ../src
+SOURCE #replace#renderer.cpp
+
+USERINCLUDE ../inc
+
+MW_LAYER_SYSTEMINCLUDE
+APP_LAYER_SYSTEMINCLUDE
+
+SOURCEPATH ../data
+START RESOURCE #replace#renderer.rss
+HEADER
+TARGETPATH ECOM_RESOURCE_DIR
+END
+
+LIBRARY euser.lib
+LIBRARY extrenderingplugin.lib
+LIBRARY cone.lib
diff -r 000000000000 -r b856a9924bbc data/renderingplugin/inc/renderer.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/data/renderingplugin/inc/renderer.h Wed Jun 02 13:22:05 2010 +0300
@@ -0,0 +1,138 @@
+/*
+* Copyright (c) {Year(s)} {Copyright owner}.
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html".
+*
+* Initial Contributors:
+* {Name} {Company} ? Initial contribution
+*
+* Contributors:
+* {Name} {Company} ? {{Description of contribution}}
+*
+* Description:
+* {{Description of the file}}
+*
+*/
+
+#ifndef MYRENDERINGPLUGIN_H
+#define MYRENDERINGPLUGIN_H
+
+#include
+
+// FORWARD DECLARATIONS
+
+class #replace#Renderer : public CXnExtRenderingPluginAdapter
+ {
+public:
+
+ /**
+ * Two-phased constructor.
+ * @return Pointer to created object.
+ */
+ static #replace#Renderer* NewL();
+
+ /**
+ * Two-phased constructor.
+ * @return Pointer to created object.
+ */
+ static #replace#Renderer* NewLC();
+
+ /**
+ * Destructor.
+ */
+ virtual ~#replace#Renderer();
+
+public: // from base classes
+
+ /**
+ * From CCoeControl Handles key events.
+ * @since Series 60 3.1
+ * @param aKeyEvent Key event.
+ * @param aType Event type.
+ * @return Key response
+ */
+ TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent,
+ TEventCode aType );
+
+ /**
+ * From CCoeControl
+ */
+ void SetContainerWindowL( const CCoeControl &aContainer );
+
+ /**
+ * See CCoeControl documentation
+ */
+ void HandlePointerEventL( const TPointerEvent& aPointerEvent );
+
+ /**
+ * From CCoeControl, CountComponentControls
+ * @return Number of component controls
+ */
+ TInt CountComponentControls() const;
+
+ /**
+ * From CCoeControl, ComponentControl
+ * @param aIndex index of component control
+ * @return pointer to the specified control
+ */
+ CCoeControl* ComponentControl( TInt aIndex ) const;
+
+ /**
+ * Skin change notification.
+ * See CXnControlAdapter documentation
+ * @since Series 60 3.1
+ */
+ void SkinChanged();
+
+ /**
+ * See CXnControlAdapter documentation
+ */
+ void EnterPowerSaveModeL();
+
+ /**
+ * See CXnControlAdapter documentation
+ */
+ void ExitPowerSaveModeL();
+
+ protected: // from base classes
+
+ /**
+ * From CCoeControl
+ * Called if focus changes
+ */
+ void FocusChanged( TDrawNow aDrawNow );
+
+ /**
+ * From CCoeControl
+ * Called if position or size changes
+ */
+ void SizeChanged();
+
+private: // from base classes
+
+ /**
+ * From CCoeControl, Draw
+ * See CCoeControl documentation
+ */
+ void Draw( const TRect& aRect ) const;
+
+ private:
+
+ /**
+ * C++ default constructor.
+ */
+ #replace#Renderer();
+
+ /**
+ * By default Symbian 2nd phase constructor is private.
+ */
+ void ConstructL();
+
+private: // Member data
+
+ };
+
+#endif // MYRENDERINGPLUGIN_H
diff -r 000000000000 -r b856a9924bbc data/renderingplugin/src/renderer.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/data/renderingplugin/src/renderer.cpp Wed Jun 02 13:22:05 2010 +0300
@@ -0,0 +1,189 @@
+/*
+* Copyright (c) {Year(s)} {Copyright owner}.
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html".
+*
+* Initial Contributors:
+* {Name} {Company} ? Initial contribution
+*
+* Contributors:
+* {Name} {Company} ? {{Description of contribution}}
+*
+* Description:
+* {{Description of the file}}
+*
+*/
+
+#include
+#include "#replace#Renderer.h"
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// Symbian static 1st phase constructor
+// -----------------------------------------------------------------------------
+//
+#replace#Renderer* #replace#Renderer::NewL()
+ {
+ #replace#Renderer* self = #replace#Renderer::NewLC();
+ CleanupStack::Pop( self );
+ return self;
+ }
+// -----------------------------------------------------------------------------
+// Symbian static 1st phase constructor
+// -----------------------------------------------------------------------------
+//
+#replace#Renderer* #replace#Renderer::NewLC()
+ {
+ #replace#Renderer* self = new( ELeave ) #replace#Renderer();
+ CleanupStack::PushL( self );
+ self->ConstructL();
+ return self;
+ }
+
+// -----------------------------------------------------------------------------
+// C++ destructor
+// -----------------------------------------------------------------------------
+//
+#replace#Renderer::~#replace#Renderer()
+ {
+ }
+
+// -----------------------------------------------------------------------------
+// Handles key events.
+// -----------------------------------------------------------------------------
+//
+TKeyResponse #replace#Renderer::OfferKeyEventL( const TKeyEvent& aKeyEvent,
+ TEventCode aType )
+ {
+ }
+
+// -----------------------------------------------------------------------------
+// Set window for this control
+// -----------------------------------------------------------------------------
+//
+void #replace#Renderer::SetContainerWindowL( const CCoeControl &aContainer )
+ {
+ CCoeControl::SetContainerWindowL( aContainer );
+ }
+
+// -----------------------------------------------------------------------------
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+void #replace#Renderer::HandlePointerEventL( const TPointerEvent& aPointerEvent )
+ {
+ CCoeControl::HandlePointerEventL( aPointerEvent );
+ }
+
+// -----------------------------------------------------------------------------
+// Returns the number of component controls
+// -----------------------------------------------------------------------------
+//
+TInt #replace#Renderer::CountComponentControls() const
+ {
+ return 0;
+ }
+
+// -----------------------------------------------------------------------------
+// Returns the specified control
+// -----------------------------------------------------------------------------
+//
+CCoeControl* #replace#Renderer::ComponentControl( TInt aIndex ) const
+ {
+ return NULL;
+ }
+
+// -----------------------------------------------------------------------------
+// Skin change notification.
+// -----------------------------------------------------------------------------
+//
+void #replace#Renderer::SkinChanged()
+ {
+ }
+
+// -----------------------------------------------------------------------------
+// EnterPowerSaveModeL
+// -----------------------------------------------------------------------------
+//
+void #replace#Renderer::EnterPowerSaveModeL()
+ {
+ }
+
+// -----------------------------------------------------------------------------
+// ExitPowerSaveModeL
+//
+// -----------------------------------------------------------------------------
+//
+void #replace#Renderer::ExitPowerSaveModeL()
+ {
+ }
+
+// -----------------------------------------------------------------------------
+// Called if focus changes
+// -----------------------------------------------------------------------------
+//
+void #replace#Renderer::FocusChanged( TDrawNow /*aDrawNow*/ )
+ {
+ }
+
+// -----------------------------------------------------------------------------
+// Called if position or size changes
+// -----------------------------------------------------------------------------
+//
+void #replace#Renderer::SizeChanged()
+ {
+ }
+
+// -----------------------------------------------------------------------------
+// Draws the carousel component
+// -----------------------------------------------------------------------------
+//
+void #replace#Renderer::Draw( const TRect& aRect ) const
+ {
+ CWindowGc& gc( SystemGc() );
+ gc.DrawEllipse( aRect );
+ }
+
+// -----------------------------------------------------------------------------
+// C++ default constructor
+// -----------------------------------------------------------------------------
+//
+#replace#Renderer::#replace#Renderer()
+ {
+ // Do nothing
+ }
+
+// -----------------------------------------------------------------------------
+// Symbian 2nd phase constructor can leave.
+// -----------------------------------------------------------------------------
+//
+void #replace#Renderer::ConstructL()
+ {
+ }
+
+// ============================ PUBLIC FUNCTIONS ===============================
+
+const TImplementationProxy KImplementationTable[] =
+ {
+#ifdef __EABI__
+ IMPLEMENTATION_PROXY_ENTRY( 0x22334455, #replace#Renderer::NewL )
+#else
+ { { 0x22334455 }, #replace#Renderer::NewL }
+#endif
+ };
+
+// -----------------------------------------------------------------------------
+// Returns the list of implementations provided by the plugin
+// -----------------------------------------------------------------------------
+//
+EXPORT_C const TImplementationProxy* ImplementationGroupProxy(
+ TInt& aTableCount )
+ {
+ aTableCount = sizeof( KImplementationTable ) / sizeof( TImplementationProxy );
+ return KImplementationTable;
+ }
+
diff -r 000000000000 -r b856a9924bbc data/testpublisher/.cproject
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/data/testpublisher/.cproject Wed Jun 02 13:22:05 2010 +0300
@@ -0,0 +1,33 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff -r 000000000000 -r b856a9924bbc data/testpublisher/.project
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/data/testpublisher/.project Wed Jun 02 13:22:05 2010 +0300
@@ -0,0 +1,20 @@
+
+
+ TestPublisher
+
+
+
+
+
+ com.nokia.carbide.cdt.builder.carbideCPPBuilder
+
+
+
+
+
+ org.eclipse.cdt.core.cnature
+ org.eclipse.cdt.core.ccnature
+ com.nokia.carbide.cdt.builder.carbideCPPBuilderNature
+ com.nokia.carbide.cdt.builder.carbideSBSv2BuilderNature
+
+
diff -r 000000000000 -r b856a9924bbc data/testpublisher/data/testpublisher.rls
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/data/testpublisher/data/testpublisher.rls Wed Jun 02 13:22:05 2010 +0300
@@ -0,0 +1,47 @@
+/*
+* Copyright (c) {Year(s)} {Copyright owner}.
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html".
+*
+* Initial Contributors:
+* {Name} {Company} ? Initial contribution
+*
+* Contributors:
+* {Name} {Company} ? {{Description of contribution}}
+*
+* Description:
+* {{Description of the file}}
+*
+*/
+
+// LOCALISATION STRINGS
+
+// Caption string for app.
+#define qtn_caption_string "TestPublisher"
+
+// First item in "Options" menu pane
+#define qtn_command1 "Message"
+
+// Second item in "Options" menu pane
+#define qtn_command2 "Message from file"
+
+#define qtn_help "Help"
+
+#define qtn_about "About"
+
+// Third item in "Options" menu pane
+#define qtn_exit "Exit"
+
+// When user requests ECommand1 event, text below is shown.
+#define qtn_command1_text "Test publisher!"
+
+#define qtn_loc_resource_file_1 "\\resource\\apps\\TestPublisher_0xE5555555"
+
+#define qtn_about_dialog_title "About"
+
+#define qtn_about_dialog_text "TestPublisher Version 1.0.0\n\nAuthor: \n\nSupport: \n\n(c) "
+
+// End of File
diff -r 000000000000 -r b856a9924bbc data/testpublisher/data/testpublisher.rss
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/data/testpublisher/data/testpublisher.rss Wed Jun 02 13:22:05 2010 +0300
@@ -0,0 +1,183 @@
+/*
+* Copyright (c) {Year(s)} {Copyright owner}.
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html".
+*
+* Initial Contributors:
+* {Name} {Company} ? Initial contribution
+*
+* Contributors:
+* {Name} {Company} ? {{Description of contribution}}
+*
+* Description:
+* {{Description of the file}}
+*
+*/
+
+// RESOURCE IDENTIFIER
+NAME TEST // 4 letter ID
+
+
+// INCLUDES
+#include
+#include
+#include
+#include
+#include "TestPublisher.hrh"
+#include "TestPublisher.rls"
+
+// RESOURCE DEFINITIONS
+// -----------------------------------------------------------------------------
+//
+// Define the resource file signature
+// This resource should be empty.
+//
+// -----------------------------------------------------------------------------
+//
+RESOURCE RSS_SIGNATURE
+ {
+ }
+
+// -----------------------------------------------------------------------------
+//
+// Default Document Name
+//
+// -----------------------------------------------------------------------------
+//
+RESOURCE TBUF r_default_document_name
+ {
+ buf="TEST";
+ }
+
+// -----------------------------------------------------------------------------
+//
+// Define default menu and CBA key.
+//
+// -----------------------------------------------------------------------------
+//
+RESOURCE EIK_APP_INFO
+ {
+ menubar = r_menubar;
+ cba = R_AVKON_SOFTKEYS_OPTIONS_EXIT;
+ }
+
+
+// -----------------------------------------------------------------------------
+//
+// r_menubar
+// Main menubar
+//
+// -----------------------------------------------------------------------------
+//
+RESOURCE MENU_BAR r_menubar
+ {
+ titles =
+ {
+ MENU_TITLE { menu_pane = r_menu; }
+ };
+ }
+
+
+// -----------------------------------------------------------------------------
+//
+// r_menu
+// Menu for "Options"
+//
+// -----------------------------------------------------------------------------
+//
+RESOURCE MENU_PANE r_menu
+ {
+ items =
+ {
+ // added the new Options menu command here
+ MENU_ITEM
+ {
+ command = ECommand1;
+ txt = qtn_command1;
+ },
+ MENU_ITEM
+ {
+ command = ECommand2;
+ txt = qtn_command2;
+ },
+ MENU_ITEM
+ {
+ command = EAbout;
+ txt = qtn_about;
+ },
+ MENU_ITEM
+ {
+ command = EAknSoftkeyExit;
+ txt = qtn_exit;
+ }
+ };
+ }
+
+// -----------------------------------------------------------------------------
+//
+// About dialog resource.
+//
+// -----------------------------------------------------------------------------
+//
+RESOURCE DIALOG r_about_query_dialog
+ {
+ flags = EGeneralQueryFlags | EEikDialogFlagNoBorder | EEikDialogFlagNoShadow;
+ buttons = R_AVKON_SOFTKEYS_OK_EMPTY;
+ items=
+ {
+ DLG_LINE
+ {
+ type = EAknCtPopupHeadingPane;
+ id = EAknMessageQueryHeaderId;
+ itemflags = EEikDlgItemNonFocusing;
+ control = AVKON_HEADING
+ {
+ };
+ },
+ DLG_LINE
+ {
+ type = EAknCtMessageQuery;
+ id = EAknMessageQueryContentId;
+ control = AVKON_MESSAGE_QUERY
+ {
+ };
+ }
+ };
+ }
+
+
+// -----------------------------------------------------------------------------
+//
+// Resources for messages.
+//
+// -----------------------------------------------------------------------------
+//
+RESOURCE TBUF32 r_caption_string { buf=qtn_caption_string; }
+RESOURCE TBUF32 r_about_dialog_title { buf=qtn_about_dialog_title; }
+RESOURCE TBUF r_about_dialog_text { buf=qtn_about_dialog_text; }
+RESOURCE TBUF r_command1_text { buf=qtn_command1_text; }
+
+
+// ----------------------------------------------------------------------------
+//
+// r_localisable_app_info
+//
+// ----------------------------------------------------------------------------
+//
+RESOURCE LOCALISABLE_APP_INFO r_localisable_app_info
+ {
+ short_caption = qtn_caption_string;
+ caption_and_icon =
+ CAPTION_AND_ICON_INFO
+ {
+ caption = qtn_caption_string;
+
+ number_of_icons = 1;
+ icon_file = "\\resource\\apps\\TestPublisher_0xE5555555.mif";
+ };
+ }
+
+// End of File
diff -r 000000000000 -r b856a9924bbc data/testpublisher/data/testpublisher_reg.rss
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/data/testpublisher/data/testpublisher_reg.rss Wed Jun 02 13:22:05 2010 +0300
@@ -0,0 +1,37 @@
+/*
+* Copyright (c) {Year(s)} {Copyright owner}.
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html".
+*
+* Initial Contributors:
+* {Name} {Company} ? Initial contribution
+*
+* Contributors:
+* {Name} {Company} ? {{Description of contribution}}
+*
+* Description:
+* {{Description of the file}}
+*
+*/
+
+#include "TestPublisher.hrh"
+#include "TestPublisher.rls"
+#include
+#include
+
+UID2 KUidAppRegistrationResourceFile
+UID3 _UID3
+
+RESOURCE APP_REGISTRATION_INFO
+ {
+ app_file="TestPublisher_0xE5555555";
+ localisable_resource_file = qtn_loc_resource_file_1;
+ localisable_resource_id = R_LOCALISABLE_APP_INFO;
+
+ embeddability=KAppNotEmbeddable;
+ newfile=KAppDoesNotSupportNewFile;
+ }
+
diff -r 000000000000 -r b856a9924bbc data/testpublisher/gfx/cricket.png
Binary file data/testpublisher/gfx/cricket.png has changed
diff -r 000000000000 -r b856a9924bbc data/testpublisher/gfx/f1.png
Binary file data/testpublisher/gfx/f1.png has changed
diff -r 000000000000 -r b856a9924bbc data/testpublisher/gfx/qgn_menu_TestPublisher.svg
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/data/testpublisher/gfx/qgn_menu_TestPublisher.svg Wed Jun 02 13:22:05 2010 +0300
@@ -0,0 +1,56 @@
+
+
+
diff -r 000000000000 -r b856a9924bbc data/testpublisher/gfx/tennis.png
Binary file data/testpublisher/gfx/tennis.png has changed
diff -r 000000000000 -r b856a9924bbc data/testpublisher/group/bld.inf
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/data/testpublisher/group/bld.inf Wed Jun 02 13:22:05 2010 +0300
@@ -0,0 +1,33 @@
+/*
+* Copyright (c) {Year(s)} {Copyright owner}.
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html".
+*
+* Initial Contributors:
+* {Name} {Company} ? Initial contribution
+*
+* Contributors:
+* {Name} {Company} ? {{Description of contribution}}
+*
+* Description:
+* {{Description of the file}}
+*
+*/
+
+PRJ_EXPORTS
+../gfx/f1.png /epoc32/winscw/c/data/installs/f1.png
+../gfx/cricket.png /epoc32/winscw/c/data/installs/cricket.png
+../gfx/tennis.png /epoc32/winscw/c/data/installs/tennis.png
+
+PRJ_PLATFORMS
+WINSCW ARMV5 GCCE
+
+PRJ_MMPFILES
+
+gnumakefile icons_scalable_dc.mk
+
+TestPublisher.mmp
+
diff -r 000000000000 -r b856a9924bbc data/testpublisher/group/icons_scalable_dc.mk
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/data/testpublisher/group/icons_scalable_dc.mk Wed Jun 02 13:22:05 2010 +0300
@@ -0,0 +1,48 @@
+
+ifeq (WINS,$(findstring WINS, $(PLATFORM)))
+ZDIR=$(EPOCROOT)epoc32\release\$(PLATFORM)\$(CFG)\Z
+else
+ZDIR=$(EPOCROOT)epoc32\data\z
+endif
+
+TARGETDIR=$(ZDIR)\resource\apps
+ICONTARGETFILENAME=$(TARGETDIR)\TestPublisher_0xE5555555.mif
+
+ICONDIR=..\gfx
+
+do_nothing :
+ @rem do_nothing
+
+MAKMAKE : do_nothing
+
+BLD : do_nothing
+
+CLEAN :
+ @echo ...Deleting $(ICONTARGETFILENAME)
+ del /q /f $(ICONTARGETFILENAME)
+
+LIB : do_nothing
+
+CLEANLIB : do_nothing
+
+# ----------------------------------------------------------------------------
+# NOTE: if you have JUSTINTIME enabled for your S60 3rd FP1 or newer SDK
+# and this command crashes, consider adding "/X" to the command line.
+# See
+# ----------------------------------------------------------------------------
+
+RESOURCE : $(ICONTARGETFILENAME)
+
+$(ICONTARGETFILENAME) : $(ICONDIR)\qgn_menu_TestPublisher.svg
+ mifconv $(ICONTARGETFILENAME) \
+ /c32 $(ICONDIR)\qgn_menu_TestPublisher.svg
+
+FREEZE : do_nothing
+
+SAVESPACE : do_nothing
+
+RELEASABLES :
+ @echo $(ICONTARGETFILENAME)
+
+FINAL : do_nothing
+
diff -r 000000000000 -r b856a9924bbc data/testpublisher/group/testpublisher.mmp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/data/testpublisher/group/testpublisher.mmp Wed Jun 02 13:22:05 2010 +0300
@@ -0,0 +1,80 @@
+/*
+* Copyright (c) {Year(s)} {Copyright owner}.
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html".
+*
+* Initial Contributors:
+* {Name} {Company} ? Initial contribution
+*
+* Contributors:
+* {Name} {Company} ? {{Description of contribution}}
+*
+* Description:
+* {{Description of the file}}
+*
+*/
+
+#include
+#include
+APP_LAYER_SYSTEMINCLUDE
+
+TARGET TestPublisher_0xE5555555.exe
+TARGETTYPE exe
+UID 0x100039CE 0xE5555555
+
+SOURCEPATH ..\src
+SOURCE testpublisher.cpp
+SOURCE testpublisherapplication.cpp
+SOURCE testpublisherappview.cpp
+SOURCE testpublisherappui.cpp
+SOURCE testpublisherdocument.cpp
+
+SOURCEPATH ..\..\publisherif\src
+SOURCE hspublisher.cpp
+SOURCE hspublisherimpl.cpp
+SOURCE transaction.cpp
+
+SOURCEPATH ..\data
+
+START RESOURCE testpublisher.rss
+HEADER
+TARGET TestPublisher_0xE5555555
+TARGETPATH resource\apps
+END //RESOURCE
+
+START RESOURCE testpublisher_reg.rss
+TARGET testpublisher_0xE5555555_reg
+TARGETPATH \private\10003a3f\apps
+END //RESOURCE
+
+
+
+USERINCLUDE ..\inc
+USERINCLUDE ..\..\publisherif\inc
+
+SYSTEMINCLUDE \epoc32\include
+
+LIBRARY euser.lib
+LIBRARY apparc.lib
+LIBRARY cone.lib
+LIBRARY bafl.lib
+LIBRARY eikcore.lib
+LIBRARY avkon.lib
+LIBRARY commonengine.lib
+LIBRARY aknnotify.lib
+LIBRARY liwServiceHandler.lib
+
+
+LANG SC
+
+VENDORID 0
+SECUREID 0xE5555555
+CAPABILITY ReadUserData
+
+#ifdef ENABLE_ABIV2_MODE
+ DEBUGGABLE_UDEBONLY
+#endif
+// End of File
diff -r 000000000000 -r b856a9924bbc data/testpublisher/inc/testpublisher.hrh
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/data/testpublisher/inc/testpublisher.hrh Wed Jun 02 13:22:05 2010 +0300
@@ -0,0 +1,33 @@
+/*
+* Copyright (c) {Year(s)} {Copyright owner}.
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html".
+*
+* Initial Contributors:
+* {Name} {Company} ? Initial contribution
+*
+* Contributors:
+* {Name} {Company} ? {{Description of contribution}}
+*
+* Description:
+* {{Description of the file}}
+*
+*/
+
+#ifndef __TESTPUBLISHER_HRH__
+#define __TESTPUBLISHER_HRH__
+
+#define _UID3 0xE5555555
+
+// TestPublisher enumerate command codes
+enum TTestPublisherIds
+ {
+ ECommand1 = 0x6001, // start value must not be 0
+ ECommand2,
+ EAbout
+ };
+
+#endif // __TESTPUBLISHER_HRH__
diff -r 000000000000 -r b856a9924bbc data/testpublisher/inc/testpublisher.pan
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/data/testpublisher/inc/testpublisher.pan Wed Jun 02 13:22:05 2010 +0300
@@ -0,0 +1,36 @@
+/*
+* Copyright (c) {Year(s)} {Copyright owner}.
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html".
+*
+* Initial Contributors:
+* {Name} {Company} ? Initial contribution
+*
+* Contributors:
+* {Name} {Company} ? {{Description of contribution}}
+*
+* Description:
+* {{Description of the file}}
+*
+*/
+
+#ifndef __TESTPUBLISHER_PAN__
+#define __TESTPUBLISHER_PAN__
+
+/** TestPublisher application panic codes */
+enum TTestPublisherPanics
+ {
+ ETestPublisherUi = 1
+ // add further panics here
+ };
+
+inline void Panic(TTestPublisherPanics aReason)
+ {
+ _LIT(applicationName, "TestPublisher");
+ User::Panic(applicationName, aReason);
+ }
+
+#endif // __TESTPUBLISHER_PAN__
diff -r 000000000000 -r b856a9924bbc data/testpublisher/inc/testpublisherappUi.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/data/testpublisher/inc/testpublisherappUi.h Wed Jun 02 13:22:05 2010 +0300
@@ -0,0 +1,87 @@
+/*
+* Copyright (c) {Year(s)} {Copyright owner}.
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html".
+*
+* Initial Contributors:
+* {Name} {Company} ? Initial contribution
+*
+* Contributors:
+* {Name} {Company} ? {{Description of contribution}}
+*
+* Description:
+* {{Description of the file}}
+*
+*/
+#ifndef __TESTPUBLISHERAPPUI_h__
+#define __TESTPUBLISHERAPPUI_h__
+
+// INCLUDES
+#include
+
+// FORWARD DECLARATIONS
+class CTestPublisherAppView;
+
+// CLASS DECLARATION
+/**
+ * CTestPublisherAppUi application UI class.
+ * Interacts with the user through the UI and request message processing
+ * from the handler class
+ */
+class CTestPublisherAppUi : public CAknAppUi
+ {
+public:
+ // Constructors and destructor
+
+ /**
+ * ConstructL.
+ * 2nd phase constructor.
+ */
+ void ConstructL();
+
+ /**
+ * CTestPublisherAppUi.
+ * C++ default constructor. This needs to be public due to
+ * the way the framework constructs the AppUi
+ */
+ CTestPublisherAppUi();
+
+ /**
+ * ~CTestPublisherAppUi.
+ * Virtual Destructor.
+ */
+ virtual ~CTestPublisherAppUi();
+
+private:
+ // Functions from base classes
+
+ /**
+ * From CEikAppUi, HandleCommandL.
+ * Takes care of command handling.
+ * @param aCommand Command to be handled.
+ */
+ void HandleCommandL(TInt aCommand);
+
+ /**
+ * HandleStatusPaneSizeChange.
+ * Called by the framework when the application status pane
+ * size is changed.
+ */
+ void HandleStatusPaneSizeChange();
+
+private:
+ // Data
+
+ /**
+ * The application view
+ * Owned by CTestPublisherAppUi
+ */
+ CTestPublisherAppView* iAppView;
+
+ };
+
+#endif // __TESTPUBLISHERAPPUI_h__
+// End of File
diff -r 000000000000 -r b856a9924bbc data/testpublisher/inc/testpublisherapplication.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/data/testpublisher/inc/testpublisherapplication.h Wed Jun 02 13:22:05 2010 +0300
@@ -0,0 +1,66 @@
+/*
+* Copyright (c) {Year(s)} {Copyright owner}.
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html".
+*
+* Initial Contributors:
+* {Name} {Company} ? Initial contribution
+*
+* Contributors:
+* {Name} {Company} ? {{Description of contribution}}
+*
+* Description:
+* {{Description of the file}}
+*
+*/
+
+#ifndef __TESTPUBLISHERAPPLICATION_H__
+#define __TESTPUBLISHERAPPLICATION_H__
+
+// INCLUDES
+#include
+#include "TestPublisher.hrh"
+
+// UID for the application;
+// this should correspond to the uid defined in the mmp file
+const TUid KUidTestPublisherApp =
+ {
+ _UID3
+ };
+
+// CLASS DECLARATION
+
+/**
+ * CTestPublisherApplication application class.
+ * Provides factory to create concrete document object.
+ * An instance of CTestPublisherApplication is the application part of the
+ * AVKON application framework for the TestPublisher example application.
+ */
+class CTestPublisherApplication : public CAknApplication
+ {
+public:
+ // Functions from base classes
+
+ /**
+ * From CApaApplication, AppDllUid.
+ * @return Application's UID (KUidTestPublisherApp).
+ */
+ TUid AppDllUid() const;
+
+protected:
+ // Functions from base classes
+
+ /**
+ * From CApaApplication, CreateDocumentL.
+ * Creates CTestPublisherDocument document object. The returned
+ * pointer in not owned by the CTestPublisherApplication object.
+ * @return A pointer to the created document object.
+ */
+ CApaDocument* CreateDocumentL();
+ };
+
+#endif // __TESTPUBLISHERAPPLICATION_H__
+// End of File
diff -r 000000000000 -r b856a9924bbc data/testpublisher/inc/testpublisherappview.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/data/testpublisher/inc/testpublisherappview.h Wed Jun 02 13:22:05 2010 +0300
@@ -0,0 +1,158 @@
+/*
+* Copyright (c) {Year(s)} {Copyright owner}.
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html".
+*
+* Initial Contributors:
+* {Name} {Company} ? Initial contribution
+*
+* Contributors:
+* {Name} {Company} ? {{Description of contribution}}
+*
+* Description:
+* {{Description of the file}}
+*
+*/
+
+#ifndef __TESTPUBLISHERAPPVIEW_h__
+#define __TESTPUBLISHERAPPVIEW_h__
+
+// INCLUDES
+#include
+#include
+#include
+
+#include "hswidgetobserver.h"
+
+class CHsPublisher;
+
+// CLASS DECLARATION
+class CTestPublisherAppView : public CCoeControl, public MHsWidgetObserver
+ {
+public:
+ // New methods
+
+ /**
+ * NewL.
+ * Two-phased constructor.
+ * Create a CTestPublisherAppView 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 CTestPublisherAppView.
+ */
+ static CTestPublisherAppView* NewL(const TRect& aRect);
+
+ /**
+ * NewLC.
+ * Two-phased constructor.
+ * Create a CTestPublisherAppView object, which will draw itself
+ * to aRect.
+ * @param aRect Rectangle this view will be drawn to.
+ * @return A pointer to the created instance of CTestPublisherAppView.
+ */
+ static CTestPublisherAppView* NewLC(const TRect& aRect);
+
+ /**
+ * ~CTestPublisherAppView
+ * Virtual Destructor.
+ */
+ virtual ~CTestPublisherAppView();
+
+public:
+ // Functions from base classes
+
+ /**
+ * From CCoeControl, Draw
+ * Draw this CTestPublisherAppView 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();
+
+ /**
+ * From CoeControl, HandlePointerEventL.
+ * Called by framework when a pointer touch event occurs.
+ * Note: although this method is compatible with earlier SDKs,
+ * it will not be called in SDKs without Touch support.
+ * @param aPointerEvent the information about this event
+ */
+ virtual void HandlePointerEventL(const TPointerEvent& aPointerEvent);
+
+private:
+ // from MHsWidgetObserver
+
+ /**
+ * @see MHsWidgetObserver
+ */
+ const TDesC& Identity();
+
+ /**
+ * @see MHsWidgetObserver
+ */
+ void NotifyWidgetStarted(
+ const TDesC& aWidgetId,
+ MHsWidgetObserver::EStartReason aReason );
+
+ /**
+ * @see MHsWidgetObserver
+ */
+ void NotifyWidgetStopped(
+ const TDesC& aWidgetId,
+ MHsWidgetObserver::EStopReason aReason );
+
+ /**
+ * @see MHsWidgetObserver
+ */
+ void NotifyWidgetState(
+ const TDesC& aWidgetId,
+ MHsWidgetObserver::EState aState );
+
+ /**
+ * @see MHsWidgetObserver
+ */
+ void NotifyWidgetEvent(
+ const TDesC& aWidgetId,
+ const TDesC& aEvent,
+ const TDesC& aParam );
+
+private:
+ // Constructors
+
+ /**
+ * ConstructL
+ * 2nd phase constructor.
+ * Perform the second phase construction of a
+ * CTestPublisherAppView object.
+ * @param aRect The rectangle this view will be drawn to.
+ */
+ void ConstructL(const TRect& aRect);
+
+ /**
+ * CTestPublisherAppView.
+ * C++ default constructor.
+ */
+ CTestPublisherAppView();
+
+ void PublishL( const TDesC& aWidgetId );
+private:
+ // data
+
+ /** Publisher, owned */
+ CHsPublisher* iPublisher;
+ /** Id of active widget instance, owned */
+ CDesCArrayFlat* iWidgetIds;
+ /** Flags */
+ TBitFlags iFlags;
+ /** Helper to alternate published image */
+ TBool iFeedCnt;
+ };
+
+#endif // __TESTPUBLISHERAPPVIEW_h__
+// End of File
diff -r 000000000000 -r b856a9924bbc data/testpublisher/inc/testpublisherdocument.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/data/testpublisher/inc/testpublisherdocument.h Wed Jun 02 13:22:05 2010 +0300
@@ -0,0 +1,101 @@
+/*
+* Copyright (c) {Year(s)} {Copyright owner}.
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html".
+*
+* Initial Contributors:
+* {Name} {Company} ? Initial contribution
+*
+* Contributors:
+* {Name} {Company} ? {{Description of contribution}}
+*
+* Description:
+* {{Description of the file}}
+*
+*/
+
+#ifndef __TESTPUBLISHERDOCUMENT_h__
+#define __TESTPUBLISHERDOCUMENT_h__
+
+// INCLUDES
+#include
+
+// FORWARD DECLARATIONS
+class CTestPublisherAppUi;
+class CEikApplication;
+
+// CLASS DECLARATION
+
+/**
+ * CTestPublisherDocument application class.
+ * An instance of class CTestPublisherDocument is the Document part of the
+ * AVKON application framework for the TestPublisher example application.
+ */
+class CTestPublisherDocument : public CAknDocument
+ {
+public:
+ // Constructors and destructor
+
+ /**
+ * NewL.
+ * Two-phased constructor.
+ * Construct a CTestPublisherDocument for the AVKON application aApp
+ * using two phase construction, and return a pointer
+ * to the created object.
+ * @param aApp Application creating this document.
+ * @return A pointer to the created instance of CTestPublisherDocument.
+ */
+ static CTestPublisherDocument* NewL(CEikApplication& aApp);
+
+ /**
+ * NewLC.
+ * Two-phased constructor.
+ * Construct a CTestPublisherDocument for the AVKON application aApp
+ * using two phase construction, and return a pointer
+ * to the created object.
+ * @param aApp Application creating this document.
+ * @return A pointer to the created instance of CTestPublisherDocument.
+ */
+ static CTestPublisherDocument* NewLC(CEikApplication& aApp);
+
+ /**
+ * ~CTestPublisherDocument
+ * Virtual Destructor.
+ */
+ virtual ~CTestPublisherDocument();
+
+public:
+ // Functions from base classes
+
+ /**
+ * CreateAppUiL
+ * From CEikDocument, CreateAppUiL.
+ * Create a CTestPublisherAppUi object and return a pointer to it.
+ * The object returned is owned by the Uikon framework.
+ * @return Pointer to created instance of AppUi.
+ */
+ CEikAppUi* CreateAppUiL();
+
+private:
+ // Constructors
+
+ /**
+ * ConstructL
+ * 2nd phase constructor.
+ */
+ void ConstructL();
+
+ /**
+ * CTestPublisherDocument.
+ * C++ default constructor.
+ * @param aApp Application creating this document.
+ */
+ CTestPublisherDocument(CEikApplication& aApp);
+
+ };
+
+#endif // __TESTPUBLISHERDOCUMENT_h__
+// End of File
diff -r 000000000000 -r b856a9924bbc data/testpublisher/sis/TestPublisher_S60_3_X_v_1_0_0.pkg
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/data/testpublisher/sis/TestPublisher_S60_3_X_v_1_0_0.pkg Wed Jun 02 13:22:05 2010 +0300
@@ -0,0 +1,37 @@
+; Installation file for TestPublisher application
+;
+; This is an auto-generated PKG file by Carbide.
+; This file uses variables specific to Carbide builds that will not work
+; on command-line builds. If you want to use this generated PKG file from the
+; command-line tools you will need to modify the variables with the appropriate
+; values: $(EPOCROOT), $(PLATFORM), $(TARGET)
+;
+;Language - standard language definitions
+&EN
+
+; standard SIS file header
+#{"TestPublisher"},(0xE5555555),1,0,0
+
+;Localised Vendor name
+%{"Vendor-EN"}
+
+;Unique Vendor name
+:"Vendor"
+
+;Supports Series 60 v 3.0
+[0x101F7961], 0, 0, 0, {"Series60ProductID"}
+
+;Files to install
+;You should change the source paths to match that of your environment
+;