initial contribution
authorjake
Wed, 02 Jun 2010 13:22:05 +0300
changeset 0 b856a9924bbc
child 1 b1c4884ae18f
initial contribution
WidgetGen.pro
WidgetGen.pro.user
data/feed/group/bld.inf
data/feed/hsps/00/empty.dat
data/feed/hsps/00/manifest.dat
data/feed/hsps/00/widgetconfiguration.xml
data/feed/sis/backup_registration.xml
data/feed/sis/replace.pkg
data/feed/xuikon/00/replace.css
data/feed/xuikon/00/replace.dat
data/feed/xuikon/00/replace.dtd
data/feed/xuikon/00/replace.xml
data/graphiciconstext/group/bld.inf
data/graphiciconstext/hsps/00/empty.dat
data/graphiciconstext/hsps/00/manifest.dat
data/graphiciconstext/hsps/00/widgetconfiguration.xml
data/graphiciconstext/sis/backup_registration.xml
data/graphiciconstext/sis/replace.pkg
data/graphiciconstext/xuikon/00/replace.css
data/graphiciconstext/xuikon/00/replace.dat
data/graphiciconstext/xuikon/00/replace.dtd
data/graphiciconstext/xuikon/00/replace.xml
data/graphictext/group/bld.inf
data/graphictext/hsps/00/empty.dat
data/graphictext/hsps/00/manifest.dat
data/graphictext/hsps/00/widgetconfiguration.xml
data/graphictext/sis/backup_registration.xml
data/graphictext/sis/replace.pkg
data/graphictext/xuikon/00/replace.css
data/graphictext/xuikon/00/replace.dat
data/graphictext/xuikon/00/replace.dtd
data/graphictext/xuikon/00/replace.xml
data/iconstext/group/bld.inf
data/iconstext/hsps/00/empty.dat
data/iconstext/hsps/00/manifest.dat
data/iconstext/hsps/00/widgetconfiguration.xml
data/iconstext/sis/backup_registration.xml
data/iconstext/sis/replace.pkg
data/iconstext/xuikon/00/replace.css
data/iconstext/xuikon/00/replace.dat
data/iconstext/xuikon/00/replace.dtd
data/iconstext/xuikon/00/replace.xml
data/publisherif/inc/hspublisher.h
data/publisherif/inc/hspublisherimpl.h
data/publisherif/inc/hswidgetobserver.h
data/publisherif/inc/transaction.h
data/publisherif/src/hspublisher.cpp
data/publisherif/src/hspublisherimpl.cpp
data/publisherif/src/transaction.cpp
data/renderingplugin/data/renderer.rss
data/renderingplugin/group/bld.inf
data/renderingplugin/group/renderer.mmp
data/renderingplugin/inc/renderer.h
data/renderingplugin/src/renderer.cpp
data/testpublisher/.cproject
data/testpublisher/.project
data/testpublisher/data/testpublisher.rls
data/testpublisher/data/testpublisher.rss
data/testpublisher/data/testpublisher_reg.rss
data/testpublisher/gfx/cricket.png
data/testpublisher/gfx/f1.png
data/testpublisher/gfx/qgn_menu_TestPublisher.svg
data/testpublisher/gfx/tennis.png
data/testpublisher/group/bld.inf
data/testpublisher/group/icons_scalable_dc.mk
data/testpublisher/group/testpublisher.mmp
data/testpublisher/inc/testpublisher.hrh
data/testpublisher/inc/testpublisher.pan
data/testpublisher/inc/testpublisherappUi.h
data/testpublisher/inc/testpublisherapplication.h
data/testpublisher/inc/testpublisherappview.h
data/testpublisher/inc/testpublisherdocument.h
data/testpublisher/sis/TestPublisher_S60_3_X_v_1_0_0.pkg
data/testpublisher/sis/backup_registration.xml
data/testpublisher/src/testpublisher.cpp
data/testpublisher/src/testpublisherappUi.cpp
data/testpublisher/src/testpublisherapplication.cpp
data/testpublisher/src/testpublisherappview.cpp
data/testpublisher/src/testpublisherdocument.cpp
data/text/group/bld.inf
data/text/hsps/00/empty.dat
data/text/hsps/00/manifest.dat
data/text/hsps/00/widgetconfiguration.xml
data/text/sis/backup_registration.xml
data/text/sis/replace.pkg
data/text/xuikon/00/replace.css
data/text/xuikon/00/replace.dat
data/text/xuikon/00/replace.dtd
data/text/xuikon/00/replace.xml
data/widget/group/bld.inf
data/widget/hsps/00/empty.dat
data/widget/hsps/00/manifest.dat
data/widget/hsps/00/widgetconfiguration.xml
data/widget/sis/backup_registration.xml
data/widget/sis/replace.pkg
data/widget/xuikon/00/replace.css
data/widget/xuikon/00/replace.dat
data/widget/xuikon/00/replace.dtd
data/widget/xuikon/00/replace.xml
data/widget/xuikon/00/replacerenderer.css
data/widget/xuikon/00/replacerenderer.xml
images/feeds_layout.jpg
images/graphictext_layout_1.jpg
images/graphictext_layout_2.jpg
images/graphictext_layout_3.jpg
images/iconstext_layout_1.jpg
images/iconstext_layout_2.jpg
images/iconstext_layout_3.jpg
images/text_layout_1.jpg
images/text_layout_2.jpg
images/text_layout_3.jpg
main.cpp
mainwindow.cpp
mainwindow.h
mainwindow.ui
publishercreator.cpp
publishercreator.h
renderercreator.cpp
renderercreator.h
widgetcreator.cpp
widgetcreator.h
widgetgen.qrc
--- /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
--- /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 @@
+<!DOCTYPE QtCreatorProject>
+<qtcreator>
+ <data>
+  <variable>ProjectExplorer.Project.ActiveTarget</variable>
+  <value type="int">0</value>
+ </data>
+ <data>
+  <variable>ProjectExplorer.Project.EditorSettings</variable>
+  <valuemap type="QVariantMap">
+   <value key="EditorConfiguration.Codec" type="QByteArray">System</value>
+  </valuemap>
+ </data>
+ <data>
+  <variable>ProjectExplorer.Project.Target.0</variable>
+  <valuemap type="QVariantMap">
+   <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Qt Simulator</value>
+   <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.Target.QtSimulatorTarget</value>
+   <value key="ProjectExplorer.Target.ActiveBuildConfiguration" type="int">0</value>
+   <value key="ProjectExplorer.Target.ActiveRunConfiguration" type="int">0</value>
+   <valuemap key="ProjectExplorer.Target.BuildConfiguration.0" type="QVariantMap">
+    <valuemap key="ProjectExplorer.BuildConfiguration.BuildStep.0" type="QVariantMap">
+     <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">qmake</value>
+     <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">QtProjectManager.QMakeBuildStep</value>
+     <valuelist key="QtProjectManager.QMakeBuildStep.QMakeArguments" type="QVariantList"/>
+    </valuemap>
+    <valuemap key="ProjectExplorer.BuildConfiguration.BuildStep.1" type="QVariantMap">
+     <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Make</value>
+     <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.MakeStep</value>
+     <value key="Qt4ProjectManager.MakeStep.Clean" type="bool">false</value>
+     <valuelist key="Qt4ProjectManager.MakeStep.MakeArguments" type="QVariantList"/>
+     <value key="Qt4ProjectManager.MakeStep.MakeCommand" type="QString"></value>
+    </valuemap>
+    <value key="ProjectExplorer.BuildConfiguration.BuildStepsCount" type="int">2</value>
+    <valuemap key="ProjectExplorer.BuildConfiguration.CleanStep.0" type="QVariantMap">
+     <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Make</value>
+     <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.MakeStep</value>
+     <value key="Qt4ProjectManager.MakeStep.Clean" type="bool">true</value>
+     <valuelist key="Qt4ProjectManager.MakeStep.MakeArguments" type="QVariantList">
+      <value type="QString">clean</value>
+     </valuelist>
+     <value key="Qt4ProjectManager.MakeStep.MakeCommand" type="QString"></value>
+    </valuemap>
+    <value key="ProjectExplorer.BuildConfiguration.CleanStepsCount" type="int">1</value>
+    <value key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment" type="bool">false</value>
+    <valuelist key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges" type="QVariantList"/>
+    <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Debug</value>
+    <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.Qt4BuildConfiguration</value>
+    <value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration" type="int">2</value>
+    <value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory" type="QString">F:/QT/tryouts/WidgetGen/WidgetGen-build-simulator</value>
+    <value key="Qt4ProjectManager.Qt4BuildConfiguration.QtVersionId" type="int">3</value>
+    <value key="Qt4ProjectManager.Qt4BuildConfiguration.ToolChain" type="int">2</value>
+    <value key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild" type="bool">true</value>
+   </valuemap>
+   <valuemap key="ProjectExplorer.Target.BuildConfiguration.1" type="QVariantMap">
+    <valuemap key="ProjectExplorer.BuildConfiguration.BuildStep.0" type="QVariantMap">
+     <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">qmake</value>
+     <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">QtProjectManager.QMakeBuildStep</value>
+     <valuelist key="QtProjectManager.QMakeBuildStep.QMakeArguments" type="QVariantList"/>
+    </valuemap>
+    <valuemap key="ProjectExplorer.BuildConfiguration.BuildStep.1" type="QVariantMap">
+     <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Make</value>
+     <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.MakeStep</value>
+     <value key="Qt4ProjectManager.MakeStep.Clean" type="bool">false</value>
+     <valuelist key="Qt4ProjectManager.MakeStep.MakeArguments" type="QVariantList"/>
+     <value key="Qt4ProjectManager.MakeStep.MakeCommand" type="QString"></value>
+    </valuemap>
+    <value key="ProjectExplorer.BuildConfiguration.BuildStepsCount" type="int">2</value>
+    <valuemap key="ProjectExplorer.BuildConfiguration.CleanStep.0" type="QVariantMap">
+     <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Make</value>
+     <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.MakeStep</value>
+     <value key="Qt4ProjectManager.MakeStep.Clean" type="bool">true</value>
+     <valuelist key="Qt4ProjectManager.MakeStep.MakeArguments" type="QVariantList">
+      <value type="QString">clean</value>
+     </valuelist>
+     <value key="Qt4ProjectManager.MakeStep.MakeCommand" type="QString"></value>
+    </valuemap>
+    <value key="ProjectExplorer.BuildConfiguration.CleanStepsCount" type="int">1</value>
+    <value key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment" type="bool">false</value>
+    <valuelist key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges" type="QVariantList"/>
+    <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Release</value>
+    <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.Qt4BuildConfiguration</value>
+    <value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration" type="int">0</value>
+    <value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory" type="QString">F:/QT/tryouts/WidgetGen/WidgetGen-build-simulator</value>
+    <value key="Qt4ProjectManager.Qt4BuildConfiguration.QtVersionId" type="int">3</value>
+    <value key="Qt4ProjectManager.Qt4BuildConfiguration.ToolChain" type="int">2</value>
+    <value key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild" type="bool">true</value>
+   </valuemap>
+   <value key="ProjectExplorer.Target.BuildConfigurationCount" type="int">2</value>
+   <valuemap key="ProjectExplorer.Target.RunConfiguration.0" type="QVariantMap">
+    <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">WidgetGen</value>
+    <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.Qt4RunConfiguration</value>
+    <value key="Qt4ProjectManager.Qt4RunConfiguration.BaseEnvironmentBase" type="int">2</value>
+    <valuelist key="Qt4ProjectManager.Qt4RunConfiguration.CommandLineArguments" type="QVariantList"/>
+    <value key="Qt4ProjectManager.Qt4RunConfiguration.ProFile" type="QString">WidgetGen.pro</value>
+    <value key="Qt4ProjectManager.Qt4RunConfiguration.UseDyldImageSuffix" type="bool">false</value>
+    <value key="Qt4ProjectManager.Qt4RunConfiguration.UseTerminal" type="bool">false</value>
+    <valuelist key="Qt4ProjectManager.Qt4RunConfiguration.UserEnvironmentChanges" type="QVariantList"/>
+    <value key="Qt4ProjectManager.Qt4RunConfiguration.UserSetName" type="bool">false</value>
+    <value key="Qt4ProjectManager.Qt4RunConfiguration.UserSetWorkingDirectory" type="bool">false</value>
+    <value key="Qt4ProjectManager.Qt4RunConfiguration.UserWorkingDirectory" type="QString"></value>
+   </valuemap>
+   <value key="ProjectExplorer.Target.RunConfigurationCount" type="int">1</value>
+  </valuemap>
+ </data>
+ <data>
+  <variable>ProjectExplorer.Project.TargetCount</variable>
+  <value type="int">1</value>
+ </data>
+ <data>
+  <variable>ProjectExplorer.Project.Updater.FileVersion</variable>
+  <value type="int">4</value>
+ </data>
+</qtcreator>
--- /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 <platform_paths.hrh>
+
+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  
--- /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 @@
+<?xml version="1.0"?>
+<package version="2.0">
+    <family>qhd_tch</family>
+    <type>widget</type>
+
+    <interfaceuid>0x2001f48a</interfaceuid>
+    <provideruid>0x101fb657</provideruid>
+    <configurationuid>#replaceuid#</configurationuid>
+
+    <fullname>#replace#</fullname>
+    <shortname>#replace#</shortname>
+    <version>1.0</version>
+    
+    <multiinstance>unlimited</multiinstance>
+    
+    <filexml>widgetconfiguration.xml</filexml>
+    <!-- Locale specific resources -->
+    <localization>
+        <fileresource tag="xuikon">#replace#.o0000</fileresource>
+    </localization>
+</package>
--- /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 @@
+<configuration>
+    <control>
+        <settings>
+        </settings>
+    </control>
+</configuration>
--- /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 @@
+<?xml version="1.0" standalone="yes"?>
+<backup_registration>
+<system_backup/>
+<restore requires_reboot = "no"/>
+</backup_registration>
--- /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"
--- /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;
+}
--- /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 @@
+<?xml version="1.0"?>
+<data>
+    <!-- UIDs below are not used, deprecated functionality.-->
+    <AppUid>2001CB4F</AppUid>
+    <Provideruid>101FB657</Provideruid>
+    <ThemeUid>11001241</ThemeUid>
+    <ThemeFullName>Anything</ThemeFullName>
+    <ThemeShortName>#replace#</ThemeShortName>
+    <ThemeVersion>1.0</ThemeVersion>
+    <FileXML>#replace#.xml</FileXML>
+    <FileCSS>#replace#.css</FileCSS>
+</data>
--- /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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmluiml xmlns="http://www.series60.com/xml/xmluiml/1" version="1.0">
+    <widget>
+
+        <!-- Content Publisher plug-in-->
+        <contentsource name="#replace#" value="0x20019594"/>
+        <configuration name="service" value="Service.ContentPublishing"/>
+        <configuration name="interface" value="IContentPublishing"/>
+        <configuration name="command" value="GetList"/>
+        <configuration name="publisher" value="#replaceuid#:#replace#"/>
+ 
+        <image id="img1" focusable="true" path="SKIN(270501603 6157)">
+            <actions>
+                <action>
+                    <trigger name="activate"/>
+                    <event name="#replace#/imageclicked"/>
+                </action>
+            </actions>
+            <configuration name="content_type" value="cnt1"/>
+            <property class="#replace#/graphic"/>
+        </image>
+        <box id="container" focusable="true">
+            <actions>
+                <action>
+                    <trigger name="activate"/>
+                    <event name="#replace#/textclicked"/>
+                </action>
+            </actions>
+            <text id="txt1"> My first widget!
+                <configuration name="content_type" value="cnt1"/>
+                <property class="#replace#/text1"/>
+            </text>
+            <newsticker id="nt1" >
+                <actions>
+                    <action>
+                        <trigger name="titlescrolled" titleindex="0"/>
+                        <event name="#replace#/OnTitleScrolled"/>
+                    </action>            
+                </actions>    
+                <title id="title1" titleindex="0">
+                    <property class="#replace#/title1"/>
+                    <configuration name="content_type" value="cnt2"/>
+                </title>                
+                <title id="title2" titleindex="1">
+                    <property class="#replace#/title2"/>
+                    <configuration name="content_type" value="cnt2"/>
+                </title>                
+                <title id="title3" titleindex="2">
+                    <property class="#replace#/title3"/>
+                    <configuration name="content_type" value="cnt2"/>
+                </title>                            
+            </newsticker>
+            <newsticker id="nt2" >
+                <actions>
+                    <action>
+                        <trigger name="titlescrolled" titleindex="0"/>
+                        <event name="#replace#/OnTitleScrolled"/>
+                    </action>            
+                </actions>    
+                <title id="title4" titleindex="0">
+                    <property class="#replace#/title4"/>
+                    <configuration name="content_type" value="cnt2"/>
+                </title>                
+                <title id="title5" titleindex="1">
+                    <property class="#replace#/title5"/>
+                    <configuration name="content_type" value="cnt2"/>
+                </title>                
+                <title id="title6" titleindex="2">
+                    <property class="#replace#/title6"/>
+                    <configuration name="content_type" value="cnt2"/>
+                </title>                            
+            </newsticker>
+        </box>
+    </widget>
+</xmluiml>
--- /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 <platform_paths.hrh>
+
+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  
--- /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 @@
+<?xml version="1.0"?>
+<package version="2.0">
+    <family>qhd_tch</family>
+    <type>widget</type>
+
+    <interfaceuid>0x2001f48a</interfaceuid>
+    <provideruid>0x101fb657</provideruid>
+    <configurationuid>#replaceuid#</configurationuid>
+
+    <fullname>#replace#</fullname>
+    <shortname>#replace#</shortname>
+    <version>1.0</version>
+    
+    <multiinstance>unlimited</multiinstance>
+    
+    <filexml>widgetconfiguration.xml</filexml>
+    <!-- Locale specific resources -->
+    <localization>
+        <fileresource tag="xuikon">#replace#.o0000</fileresource>
+    </localization>
+</package>
--- /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 @@
+<configuration>
+    <control>
+        <settings>
+        </settings>
+    </control>
+</configuration>
--- /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 @@
+<?xml version="1.0" standalone="yes"?>
+<backup_registration>
+<system_backup/>
+<restore requires_reboot = "no"/>
+</backup_registration>
--- /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"
--- /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
--- /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 @@
+<?xml version="1.0"?>
+<data>
+    <!-- UIDs below are not used, deprecated functionality.-->
+    <AppUid>2001CB4F</AppUid>
+    <Provideruid>101FB657</Provideruid>
+    <ThemeUid>11001241</ThemeUid>
+    <ThemeFullName>Anything</ThemeFullName>
+    <ThemeShortName>#replace#</ThemeShortName>
+    <ThemeVersion>1.0</ThemeVersion>
+    <FileXML>#replace#.xml</FileXML>
+    <FileCSS>#replace#.css</FileCSS>
+</data>
--- /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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmluiml xmlns="http://www.series60.com/xml/xmluiml/1" version="1.0">
+    <widget>
+
+        <!-- Content Publisher plug-in-->
+        <contentsource name="#replace#" value="0x20019594"/>
+        <configuration name="service" value="Service.ContentPublishing"/>
+        <configuration name="interface" value="IContentPublishing"/>
+        <configuration name="command" value="GetList"/>
+        <configuration name="publisher" value="#replaceuid#:#replace#"/>
+        
+        <image id="img4" focusable="true" _s60-initial-focus="1">
+            <actions> 
+                <action>
+                    <trigger name="activate"/>
+                    <event name="#replace#/imageclicked"/>
+                </action>
+            </actions>
+            <configuration name="content_type" value="cnt4"/>
+            <property class="#replace#/graphic"/>
+        </image>
+        <box id="focus" focusable="true">
+            <actions>
+                <action>
+                    <trigger name="activate"/>
+                    <event name="#replace#/textclicked"/>
+                </action>
+            </actions>
+            <box id="container">
+                <box id="row1">
+                    <image id="img1" class="icon">
+                        <configuration name="content_type" value="cnt1"/>
+                        <property class="#replace#/image1"/>
+                    </image>
+                    <text id="txt1">
+                        <configuration name="content_type" value="cnt1"/>
+                        <property class="#replace#/text1"/> 
+                    </text>
+                </box>
+                <box id="row2" class="hidden">
+                    <image id="img2" class="icon">
+                        <configuration name="content_type" value="cnt2"/>
+                        <property class="#replace#/image2"/>
+                    </image>
+                    <text id="txt2">
+                        <configuration name="content_type" value="cnt2"/>
+                        <property class="#replace#/text2"/>
+                        <property class="policy/emptyContent" name="row2" value="display: none"/>
+                        <property class="policy/Content" name="row2" value="display: block"/>
+                    </text>
+                </box>
+                <box id="row3" class="hidden">
+                    <image id="img3" class="icon">
+                        <configuration name="content_type" value="cnt3"/>
+                        <property class="#replace#/image3"/>
+                    </image>
+                    <text id="txt3">
+                        <configuration name="content_type" value="cnt3"/>
+                        <property class="#replace#/text3"/> 
+                        <property class="policy/emptyContent" name="row3" value="display: none"/>
+                        <property class="policy/Content" name="row3" value="display: block"/>
+                    </text>
+                </box>
+            </box>
+        </box>
+    </widget>
+</xmluiml>
--- /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 <platform_paths.hrh>
+
+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  
--- /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 @@
+<?xml version="1.0"?>
+<package version="2.0">
+    <family>qhd_tch</family>
+    <type>widget</type>
+
+    <interfaceuid>0x2001f48a</interfaceuid>
+    <provideruid>0x101fb657</provideruid>
+    <configurationuid>#replaceuid#</configurationuid>
+
+    <fullname>#replace#</fullname>
+    <shortname>#replace#</shortname>
+    <version>1.0</version>
+    
+    <multiinstance>unlimited</multiinstance>
+    
+    <filexml>widgetconfiguration.xml</filexml>
+    <!-- Locale specific resources -->
+    <localization>
+        <fileresource tag="xuikon">#replace#.o0000</fileresource>
+    </localization>
+</package>
--- /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 @@
+<configuration>
+    <control>
+        <settings>
+        </settings>
+    </control>
+</configuration>
--- /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 @@
+<?xml version="1.0" standalone="yes"?>
+<backup_registration>
+<system_backup/>
+<restore requires_reboot = "no"/>
+</backup_registration>
--- /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"
--- /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;
+}
--- /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 @@
+<?xml version="1.0"?>
+<data>
+    <!-- UIDs below are not used, deprecated functionality.-->
+    <AppUid>2001CB4F</AppUid>
+    <Provideruid>101FB657</Provideruid>
+    <ThemeUid>11001241</ThemeUid>
+    <ThemeFullName>Anything</ThemeFullName>
+    <ThemeShortName>#replace#</ThemeShortName>
+    <ThemeVersion>1.0</ThemeVersion>
+    <FileXML>#replace#.xml</FileXML>
+    <FileCSS>#replace#.css</FileCSS>
+</data>
--- /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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmluiml xmlns="http://www.series60.com/xml/xmluiml/1" version="1.0">
+    <widget>
+
+        <!-- Content Publisher plug-in-->
+        <contentsource name="#replace#" value="0x20019594"/>
+        <configuration name="service" value="Service.ContentPublishing"/>
+        <configuration name="interface" value="IContentPublishing"/>
+        <configuration name="command" value="GetList"/>
+        <configuration name="publisher" value="#replaceuid#:#replace#"/>
+ 
+        <image id="img1" focusable="true" _s60-initial-focus="1">
+            <actions> 
+                <action>
+                    <trigger name="activate"/>
+                    <event name="#replace#/imageclicked"/>
+                </action>
+            </actions>
+            <configuration name="content_type" value="cnt1"/>
+            <property class="#replace#/graphic"/>
+        </image>
+        <box id="focus" focusable="true">
+            <actions>
+                <action>
+                    <trigger name="activate"/>
+                    <event name="#replace#/textclicked"/>
+                </action>
+            </actions>
+            <box id="container">
+                <text id="row1">
+                    <configuration name="content_type" value="cnt2"/>
+                    <property class="#replace#/text1"/> 
+                </text>
+                <text id="row2" class="hidden">
+                    <configuration name="content_type" value="cnt2"/>
+                    <property class="#replace#/text2"/>
+                    <property class="policy/emptyContent" name="row2" value="display: none"/>
+                    <property class="policy/Content" name="row2" value="display: block"/>
+                </text>
+                <text id="row3" class="hidden">
+                    <configuration name="content_type" value="cnt2"/>
+                    <property class="#replace#/text3"/>
+                    <property class="policy/emptyContent" name="row3" value="display: none"/>
+                    <property class="policy/Content" name="row3" value="display: block"/>
+                </text>
+            </box>
+        </box>
+    </widget>
+</xmluiml>
--- /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 <platform_paths.hrh>
+
+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  
--- /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 @@
+<?xml version="1.0"?>
+<package version="2.0">
+    <family>qhd_tch</family>
+    <type>widget</type>
+
+    <interfaceuid>0x2001f48a</interfaceuid>
+    <provideruid>0x101fb657</provideruid>
+    <configurationuid>#replaceuid#</configurationuid>
+
+    <fullname>#replace#</fullname>
+    <shortname>#replace#</shortname>
+    <version>1.0</version>
+    
+    <multiinstance>unlimited</multiinstance>
+    
+    <filexml>widgetconfiguration.xml</filexml>
+    <!-- Locale specific resources -->
+    <localization>
+        <fileresource tag="xuikon">#replace#.o0000</fileresource>
+    </localization>
+</package>
--- /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 @@
+<configuration>
+    <control>
+        <settings>
+        </settings>
+    </control>
+</configuration>
--- /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 @@
+<?xml version="1.0" standalone="yes"?>
+<backup_registration>
+<system_backup/>
+<restore requires_reboot = "no"/>
+</backup_registration>
--- /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"
--- /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
--- /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 @@
+<?xml version="1.0"?>
+<data>
+    <!-- UIDs below are not used, deprecated functionality.-->
+    <AppUid>2001CB4F</AppUid>
+    <Provideruid>101FB657</Provideruid>
+    <ThemeUid>11001241</ThemeUid>
+    <ThemeFullName>Anything</ThemeFullName>
+    <ThemeShortName>#replace#</ThemeShortName>
+    <ThemeVersion>1.0</ThemeVersion>
+    <FileXML>#replace#.xml</FileXML>
+    <FileCSS>#replace#.css</FileCSS>
+</data>
--- /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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmluiml xmlns="http://www.series60.com/xml/xmluiml/1" version="1.0">
+    <widget focusable="true" _s60-initial-focus="1">
+        <actions> 
+            <action>
+                <trigger name="activate"/>
+                <event name="#replace#/widgetclicked"/>
+            </action>
+        </actions>
+        <!-- Content Publisher plug-in-->
+        <contentsource name="#replace#" value="0x20019594"/>
+        <configuration name="service" value="Service.ContentPublishing"/>
+        <configuration name="interface" value="IContentPublishing"/>
+        <configuration name="command" value="GetList"/>
+        <configuration name="publisher" value="#replaceuid#:#replace#"/>
+ 
+        <box id="container">
+            <box id="row1">
+                <image id="img1" >
+                    <configuration name="content_type" value="cnt1"/>
+                    <property class="#replace#/image1"/>
+                </image>
+                <text id="txt1">
+                    <configuration name="content_type" value="cnt1"/>
+                    <property class="#replace#/text1"/> 
+                </text>
+            </box>
+            <box id="row2" class="hidden">
+                <image id="img2" >
+                    <configuration name="content_type" value="cnt2"/>
+                    <property class="#replace#/image2"/>
+                </image>
+                <text id="txt2">
+                    <configuration name="content_type" value="cnt2"/>
+                    <property class="#replace#/text2"/>
+                    <property class="policy/emptyContent" name="row2" value="display: none"/>
+                    <property class="policy/Content" name="row2" value="display: block"/>
+                </text>
+            </box>
+            <box id="row3" class="hidden">
+                <image id="img3" >
+                    <configuration name="content_type" value="cnt3"/>
+                    <property class="#replace#/image3"/>
+                </image>
+                <text id="txt3">
+                    <configuration name="content_type" value="cnt3"/>
+                    <property class="#replace#/text3"/> 
+                    <property class="policy/emptyContent" name="row3" value="display: none"/>
+                    <property class="policy/Content" name="row3" value="display: block"/>
+                </text>
+            </box>
+        </box>
+    </widget>
+</xmluiml>
--- /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 <e32base.h>	
+#include <fbs.h>
+
+// 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 <text> 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 <image> 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 <image> 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 <image> 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(<majorId> <minorId>), i.e. _LIT( KMySkinImage, "skin(270501603 8586)" );
+     * - mif(<MifFileName.mif> <bitmapId> <maskId>), 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 <data> 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 <text> 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 <image> 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
--- /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 <e32base.h>    
+#include <liwcommon.h>
+
+// 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 <text> 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 <image> 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 <image> 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 <image> 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(<majorId> <minorId>), i.e. _LIT( KMySkinImage, "skin(270501603 8586)" );
+     * - mif(<MifFileName.mif> <bitmapId> <maskId>), 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 <data> 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 <text> 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 <image> 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
--- /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 <e32base.h>    
+
+// 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 <UID:PublisherName> format.
+     *         The identity must map to xml <configuration> element, i.e.:
+     *         <configuration name="publisher" value="MyUid:MyPublisherName"/>
+     */
+    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
--- /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 <e32base.h>
+
+// 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
--- /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
--- /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 <liwservicehandler.h>
+#include <liwvariant.h>
+#include <liwgenericparam.h>
+#include <fbs.h>
+
+// 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
--- /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
--- /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 <ecom/registryinfo.rh>
+
+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 = "";
+                }
+            };
+        }
+    };
+}
--- /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
--- /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 <platform_paths.hrh>
+#include <data_caging_paths.hrh>
+
+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
--- /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 <xnextrenderingpluginadapter.h>
+
+// 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
--- /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 <ecom/implementationproxy.h>
+#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;
+    }
+
--- /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 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<?fileVersion 4.0.0?>
+
+<cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
+<storageModule buildFromInf="true" buildingTestComps="true" cleanLevel="0" concurrentBuildJobs="4" defaultMMPChangedAction="0" extraSBSv2Args="" infBuildComponents="" infFileLocation="group/bld.inf" macrosFile="" makeEngineToUse="make" manageDependencies="false" moduleId="com.nokia.carbide.cdt.builder.carbideCPPBuilder" overrideMakeEngine="false" overrideWorkspaceSettings="false" promptForMMPChangedAction="false" useConcurrentBuilding="false" useDebugMode="false" useIncrementalBuilder="false" useKeepGoing="false" useMMPMacros="true"/>
+<storageModule moduleId="org.eclipse.cdt.core.settings">
+<cconfiguration id="Emulator Debug (WINSCW) [x:]">
+<storageModule buildSystemId="com.nokia.carbide.cdt.builder.CarbideConfigurationDataProvider" id="Emulator Debug (WINSCW) [x:]" moduleId="org.eclipse.cdt.core.settings" name="Emulator Debug (WINSCW) [x:]">
+<externalSettings/>
+<extensions>
+<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
+<extension id="org.eclipse.cdt.core.PE" point="org.eclipse.cdt.core.BinaryParser"/>
+<extension id="com.nokia.cdt.debug.cw.symbian.SymbianE32" point="org.eclipse.cdt.core.BinaryParser"/>
+<extension id="com.nokia.carbide.cdt.builder.MakmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+<extension id="com.nokia.carbide.cdt.builder.CarbideMakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+<extension id="com.nokia.carbide.cdt.builder.SBSv2ErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+<extension id="com.nokia.carbide.cdt.builder.MWLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+<extension id="com.nokia.carbide.cdt.builder.RCOMPErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+<extension id="com.nokia.carbide.cdt.builder.MWCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+<extension id="com.nokia.carbide.cdt.builder.MakeDefErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+</extensions>
+</storageModule>
+<storageModule moduleId="CarbideConfigurationDataProvider">
+<ENV_VAR_DATA_ID/>
+<ARGUMENTS_DATA_ID ABLDFREEZEARGSSTORAGE="-r"/>
+<ROM_BUILDER_DATA_ID ROMBUILDWORKINGDIRECTORYSTORAGE="X:\epoc32\rom\"/>
+</storageModule>
+<storageModule filesCache="X:\epoc32\include\platform_paths.hrh;C:\Symbian\Carbide\workspace\TestPublisher\group\TestPublisher.mmp;C:\Symbian\Carbide\workspace\TestPublisher\group\bld.inf;X:\epoc32\include\data_caging_paths.hrh;" includesCache="C:/Symbian/Carbide/workspace/TestPublisher/inc[LOCAL];C:/Symbian/Carbide/workspace/TestPublisher/help[LOCAL];X:/epoc32/include;X:/epoc32/include/mw;X:/epoc32/include/platform/mw;X:/epoc32/include/platform;X:/epoc32/include/app;X:/epoc32/include/platform/app;X:/epoc32/include/platform/loc;X:/epoc32/include/platform/mw/loc;X:/epoc32/include/platform/app/loc;X:/epoc32/include/platform/loc/sc;X:/epoc32/include/platform/mw/loc/sc;X:/epoc32/include/platform/app/loc/sc;X:/epoc32/include/oem;" macrosCache="__S60_51__;_UNICODE;__SYMBIAN32__;__SUPPORT_CPP_EXCEPTIONS__;__EXE__;__S60_3X__;__SERIES60_3X__;__S60_5X__;__CW32__;__WINS__;__WINSCW__;_DEBUG;" moduleId="configDataCache" sourcesCache="/TestPublisher/data;/TestPublisher/help;/TestPublisher/inc;/TestPublisher/src;" timestampCache="1274095448108" useMmpMacrosCache="true"/>
+<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
+</cconfiguration>
+</storageModule>
+</cproject>
--- /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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>TestPublisher</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>com.nokia.carbide.cdt.builder.carbideCPPBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.cdt.core.cnature</nature>
+		<nature>org.eclipse.cdt.core.ccnature</nature>
+		<nature>com.nokia.carbide.cdt.builder.carbideCPPBuilderNature</nature>
+		<nature>com.nokia.carbide.cdt.builder.carbideSBSv2BuilderNature</nature>
+	</natures>
+</projectDescription>
--- /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
--- /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 <eikon.rh>
+#include <avkon.rsg>
+#include <avkon.rh>
+#include <appinfo.rh>
+#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
--- /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 <appinfo.rh>
+#include <TestPublisher_0xE5555555.rsg>
+
+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;
+	}
+
Binary file data/testpublisher/gfx/cricket.png has changed
Binary file data/testpublisher/gfx/f1.png has changed
--- /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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Tiny//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd">
+<svg baseProfile="tiny" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="100%" height="100%" viewBox="0 0 88 87.999">
+<g>
+<g>
+<g>
+<g>
+<rect fill="none" width="88" height="87.999"/>
+</g>
+</g>
+<g>
+<linearGradient id="XMLID_7_" gradientUnits="userSpaceOnUse" x1="12.3042" y1="18.3799" x2="63.4113" y2="79.287">
+<stop offset="0" style="stop-color:#B3DDFF"/>
+<stop offset="0.8146" style="stop-color:#084296"/>
+<stop offset="1" style="stop-color:#084296"/>
+</linearGradient>
+<path fill="url(#XMLID_7_)" d="M32.135,7.415L14.363,17.432v23.167c0,0,8.926,15.351,10.468,18.001       c-2.386,1.704-15.44,11.03-15.44,11.03l21.613,12.652c0,0,12.907-9.85,14.71-11.226c1.979,1.109,16.231,9.101,16.231,9.101       l16.664-15.132c0,0-14.066-6.929-16.888-8.318c1.467-3.01,10.531-21.604,10.531-21.604l-22.298-9.59       c0,0-1.486,3.173-2.093,4.467c-2.046-0.88-6.573-2.826-6.573-2.826s-3.713,2.463-5.696,3.778       c-0.327-0.744-0.542-1.233-0.657-1.495c0.007-0.824,0.213-23.72,0.213-23.72L32.135,7.415z"/>
+<linearGradient id="XMLID_8_" gradientUnits="userSpaceOnUse" x1="40.8276" y1="52.1914" x2="16.1997" y2="21.1353">
+<stop offset="0" style="stop-color:#5AA7E0"/>
+<stop offset="1" style="stop-color:#3366CC"/>
+</linearGradient>
+<polygon fill="url(#XMLID_8_)" points="59.051,57.621 69.536,36.111 50.944,28.115 48.852,32.581 41.493,29.418 34.719,33.911        32.932,29.849 33.117,9.157 16.363,18.601 16.363,40.06 27.476,59.169 13.064,69.463 30.856,79.879 45.546,68.669        61.667,77.708 75.089,65.521 "/>
+<linearGradient id="XMLID_9_" gradientUnits="userSpaceOnUse" x1="60.585" y1="31.876" x2="53.8582" y2="45.1125">
+<stop offset="0" style="stop-color:#5AA7E0"/>
+<stop offset="1" style="stop-color:#3366CC"/>
+</linearGradient>
+<polygon fill="url(#XMLID_9_)" points="41.26,48.783 50.944,28.115 69.536,36.111 59.051,57.621 "/>
+<polygon fill="#0046B7" points="16.363,40.06 27.476,59.169 41.26,48.783 32.932,29.849 "/>
+<polygon fill="#3366CC" points="16.363,40.06 16.363,18.601 33.117,9.157 32.932,29.849 "/>
+<polygon fill="#CFECFF" points="26.696,39.23 41.493,29.418 59.523,37.168 45.546,47.954 "/>
+<path fill="#5AA7E0" d="M41.954,55.286"/>
+<polygon fill="#3366CC" points="26.696,39.23 27.476,59.169 45.546,68.669 45.546,47.954 "/>
+<polygon fill="#5AA7E0" points="13.064,69.463 27.476,59.169 45.546,68.669 30.856,79.879 "/>
+<linearGradient id="XMLID_10_" gradientUnits="userSpaceOnUse" x1="29.2085" y1="63.6836" x2="48.7102" y2="56.1976">
+<stop offset="0" style="stop-color:#5AA7E0"/>
+<stop offset="0.0056" style="stop-color:#5AA7E0"/>
+<stop offset="0.85" style="stop-color:#3366CC"/>
+<stop offset="1" style="stop-color:#3366CC"/>
+</linearGradient>
+<polygon fill="url(#XMLID_10_)" points="43.423,46.971 27.476,59.169 45.546,68.669 45.546,47.954 "/>
+<polygon fill="#0046B7" points="45.546,47.954 45.546,68.669 59.051,57.621 59.523,37.168 "/>
+<linearGradient id="XMLID_11_" gradientUnits="userSpaceOnUse" x1="45.3936" y1="59.5186" x2="59.0508" y2="59.5186">
+<stop offset="0" style="stop-color:#0046B7"/>
+<stop offset="1" style="stop-color:#3366CC"/>
+</linearGradient>
+<polygon fill="url(#XMLID_11_)" points="45.394,50.368 45.546,68.669 59.051,57.621 "/>
+<linearGradient id="XMLID_12_" gradientUnits="userSpaceOnUse" x1="60.8945" y1="68.6807" x2="57.2953" y2="58.792">
+<stop offset="0" style="stop-color:#5AA7E0"/>
+<stop offset="0.4101" style="stop-color:#5AA7E0"/>
+<stop offset="1" style="stop-color:#3366CC"/>
+</linearGradient>
+<polygon fill="url(#XMLID_12_)" points="61.667,77.708 45.546,68.669 59.051,57.621 75.089,65.521 "/>
+</g>
+</g>
+</g>
+</svg>
Binary file data/testpublisher/gfx/tennis.png has changed
--- /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
+
--- /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 <http://forum.nokia.com/document/Forum_Nokia_Technical_Library_v1_35/contents/FNTL/Build_process_fails_at_mif_file_creation_in_S60_3rd_Ed_FP1_SDK.htm>
+# ----------------------------------------------------------------------------
+
+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
+
--- /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 <platform_paths.hrh>
+#include <data_caging_paths.hrh>
+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
--- /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__
--- /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__
--- /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 <aknappui.h>
+
+// 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
--- /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 <aknapp.h>
+#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
--- /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 <coecntrl.h>
+#include <babitflags.h>
+#include <badesca.h>
+
+#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
--- /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 <akndoc.h>
+
+// 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
--- /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
+;<source> <destination>
+"$(EPOCROOT)Epoc32\release\$(PLATFORM)\$(TARGET)\TestPublisher_0xE5555555.exe"		-"!:\sys\bin\TestPublisher_0xE5555555.exe"
+"$(EPOCROOT)Epoc32\data\z\resource\apps\TestPublisher_0xE5555555.rsc"		-"!:\resource\apps\TestPublisher_0xE5555555.rsc"
+"$(EPOCROOT)Epoc32\data\z\private\10003a3f\apps\TestPublisher_0xE5555555_reg.rsc"	-"!:\private\10003a3f\import\apps\TestPublisher_0xE5555555_reg.rsc"
+"$(EPOCROOT)Epoc32\data\z\resource\apps\TestPublisher_0xE5555555.mif" -"!:\resource\apps\TestPublisher_0xE5555555.mif"
+"..\help\TestPublisher_0xE5555555.hlp"							 -"!:\resource\help\TestPublisher_0xE5555555.hlp"
+
+; Add any installation notes if applicable
+;"TestPublisher.txt"		-"!:\private\E5555555\TestPublisher.txt"
+
+;required for application to be covered by backup/restore facility 
+"..\sis\backup_registration.xml"		-"!:\private\E5555555\backup_registration.xml"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/data/testpublisher/sis/backup_registration.xml	Wed Jun 02 13:22:05 2010 +0300
@@ -0,0 +1,5 @@
+<?xml version="1.0" standalone="yes"?>
+<backup_registration>
+  <system_backup/>
+  <restore requires_reboot = "no"/>
+</backup_registration>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/data/testpublisher/src/testpublisher.cpp	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}}
+*
+*/
+
+// INCLUDE FILES
+#include <eikstart.h>
+#include "TestPublisherApplication.h"
+
+LOCAL_C CApaApplication* NewApplication()
+    {
+    return new CTestPublisherApplication;
+    }
+
+GLDEF_C TInt E32Main()
+    {
+    return EikStart::RunApplication(NewApplication);
+    }
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/data/testpublisher/src/testpublisherappUi.cpp	Wed Jun 02 13:22:05 2010 +0300
@@ -0,0 +1,145 @@
+/*
+* 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 FILES
+#include <avkon.hrh>
+#include <aknmessagequerydialog.h>
+#include <aknnotewrappers.h>
+#include <stringloader.h>
+
+#include <TestPublisher_0xE5555555.rsg>
+
+#include "TestPublisher.hrh"
+#include "TestPublisher.pan"
+#include "TestPublisherApplication.h"
+#include "TestPublisherAppUi.h"
+#include "TestPublisherAppView.h"
+
+_LIT( KText, "Test publisher!");
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+
+// -----------------------------------------------------------------------------
+// CTestPublisherAppUi::ConstructL()
+// Symbian 2nd phase constructor can leave.
+// -----------------------------------------------------------------------------
+//
+void CTestPublisherAppUi::ConstructL()
+    {
+    // Initialise app UI with standard value.
+    BaseConstructL(CAknAppUi::EAknEnableSkin);
+
+    // Create view object
+    iAppView = CTestPublisherAppView::NewL(ClientRect());
+    }
+// -----------------------------------------------------------------------------
+// CTestPublisherAppUi::CTestPublisherAppUi()
+// C++ default constructor can NOT contain any code, that might leave.
+// -----------------------------------------------------------------------------
+//
+CTestPublisherAppUi::CTestPublisherAppUi()
+    {
+    // No implementation required
+    }
+
+// -----------------------------------------------------------------------------
+// CTestPublisherAppUi::~CTestPublisherAppUi()
+// Destructor.
+// -----------------------------------------------------------------------------
+//
+CTestPublisherAppUi::~CTestPublisherAppUi()
+    {
+    if (iAppView)
+        {
+        delete iAppView;
+        iAppView = NULL;
+        }
+
+    }
+
+// -----------------------------------------------------------------------------
+// CTestPublisherAppUi::HandleCommandL()
+// Takes care of command handling.
+// -----------------------------------------------------------------------------
+//
+void CTestPublisherAppUi::HandleCommandL(TInt aCommand)
+    {
+    switch (aCommand)
+        {
+        case EEikCmdExit:
+        case EAknSoftkeyExit:
+            Exit();
+            break;
+
+        case ECommand1:
+            {
+
+            // Load a string from the resource file and display it
+            HBufC* textResource = StringLoader::LoadLC(R_COMMAND1_TEXT);
+            CAknInformationNote* informationNote;
+
+            informationNote = new (ELeave) CAknInformationNote;
+
+            // Show the information Note with
+            // textResource loaded with StringLoader.
+            informationNote->ExecuteLD(*textResource);
+
+            // Pop HBuf from CleanUpStack and Destroy it.
+            CleanupStack::PopAndDestroy(textResource);
+            }
+            break;
+        case ECommand2:
+            {
+
+            }
+            break;
+        case EAbout:
+            {
+
+            CAknMessageQueryDialog* dlg =
+                    new (ELeave) CAknMessageQueryDialog();
+            dlg->PrepareLC(R_ABOUT_QUERY_DIALOG);
+            HBufC* title = iEikonEnv->AllocReadResourceLC(
+                    R_ABOUT_DIALOG_TITLE);
+            dlg->QueryHeading()->SetTextL(*title);
+            CleanupStack::PopAndDestroy(); //title
+            HBufC* msg = iEikonEnv->AllocReadResourceLC(R_ABOUT_DIALOG_TEXT);
+            dlg->SetMessageTextL(*msg);
+            CleanupStack::PopAndDestroy(); //msg
+            dlg->RunLD();
+            }
+            break;
+        default:
+            Panic( ETestPublisherUi);
+            break;
+        }
+    }
+// -----------------------------------------------------------------------------
+//  Called by the framework when the application status pane
+//  size is changed.  Passes the new client rectangle to the
+//  AppView
+// -----------------------------------------------------------------------------
+//
+void CTestPublisherAppUi::HandleStatusPaneSizeChange()
+    {
+    iAppView->SetRect(ClientRect());
+    }
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/data/testpublisher/src/testpublisherapplication.cpp	Wed Jun 02 13:22:05 2010 +0300
@@ -0,0 +1,49 @@
+/*
+* 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 FILES
+#include "TestPublisher.hrh"
+#include "TestPublisherDocument.h"
+#include "TestPublisherApplication.h"
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CTestPublisherApplication::CreateDocumentL()
+// Creates CApaDocument object
+// -----------------------------------------------------------------------------
+//
+CApaDocument* CTestPublisherApplication::CreateDocumentL()
+    {
+    // Create an TestPublisher document, and return a pointer to it
+    return CTestPublisherDocument::NewL(*this);
+    }
+
+// -----------------------------------------------------------------------------
+// CTestPublisherApplication::AppDllUid()
+// Returns application UID
+// -----------------------------------------------------------------------------
+//
+TUid CTestPublisherApplication::AppDllUid() const
+    {
+    // Return the UID for the TestPublisher application
+    return KUidTestPublisherApp;
+    }
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/data/testpublisher/src/testpublisherappview.cpp	Wed Jun 02 13:22:05 2010 +0300
@@ -0,0 +1,359 @@
+/*
+* 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 FILES
+#include <coemain.h>
+#include <aknglobalnote.h>
+#include <aknsconstants.h>
+#include "TestPublisherAppView.h"
+#include "hspublisher.h"
+
+_LIT( KId, "#replaceuid#:#replace#" );
+
+// Type definitions
+enum TFlags
+    {
+    ERequirePublish =1,
+    EPublishAllowed
+    };
+
+
+_LIT( KGNews1, "World news!");
+_LIT( KGFeed1, "Bangkok tense as thousands remain on streets." );
+_LIT( KGFeed2, "France frees killer of former Iran PM." );
+_LIT( KGFeed3, "Lingering ash cloud spurs new rules." );
+
+_LIT( KSNews1, "Sport news!");
+_LIT( KSFeed1, "Motorsport: Webber dampens title talk." );
+_LIT( KSFeed2, "Cricket: IPL boss seeks reinstatement." );
+_LIT( KSFeed3, "Tennis: Nadal too strong for Federer." );
+
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+CTestPublisherAppView* CTestPublisherAppView::NewL(const TRect& aRect)
+    {
+    CTestPublisherAppView* self = CTestPublisherAppView::NewLC(aRect);
+    CleanupStack::Pop(self);
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+CTestPublisherAppView* CTestPublisherAppView::NewLC(const TRect& aRect)
+    {
+    CTestPublisherAppView* self = new (ELeave) CTestPublisherAppView;
+    CleanupStack::PushL(self);
+    self->ConstructL(aRect);
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// Symbian 2nd phase constructor can leave.
+// -----------------------------------------------------------------------------
+//
+void CTestPublisherAppView::ConstructL(const TRect& aRect)
+    {
+    // Create a window for this application view
+    CreateWindowL();
+
+    // Set the windows size
+    SetRect(aRect);
+
+    iWidgetIds = new (ELeave) CDesCArrayFlat(5);
+    //Create the publihser interface
+    iPublisher = CHsPublisher::NewL( *this );
+    // Activate the window, which makes it ready to be drawn
+    ActivateL();
+    }
+
+// -----------------------------------------------------------------------------
+// C++ default constructor can NOT contain any code, that might leave.
+// -----------------------------------------------------------------------------
+//
+CTestPublisherAppView::CTestPublisherAppView()
+    {
+    // No implementation required
+    }
+
+// -----------------------------------------------------------------------------
+// Destructor.
+// -----------------------------------------------------------------------------
+//
+CTestPublisherAppView::~CTestPublisherAppView()
+    {
+    delete iPublisher;
+    delete iWidgetIds;
+    }
+
+// -----------------------------------------------------------------------------
+// Draws the display.
+// -----------------------------------------------------------------------------
+//
+void CTestPublisherAppView::Draw(const TRect& /*aRect*/) const
+    {
+    // Get the standard graphics context
+    CWindowGc& gc = SystemGc();
+
+    // Gets the control's extent
+    TRect drawRect(Rect());
+
+    // Clears the screen
+    gc.Clear(drawRect);
+
+    }
+
+// -----------------------------------------------------------------------------
+// Called by framework when the view size is changed.
+// -----------------------------------------------------------------------------
+//
+void CTestPublisherAppView::SizeChanged()
+    {
+    DrawNow();
+    }
+
+// -----------------------------------------------------------------------------
+// Called by framework to handle pointer touch events.
+// Note: although this method is compatible with earlier SDKs, 
+// it will not be called in SDKs without Touch support.
+// -----------------------------------------------------------------------------
+//
+void CTestPublisherAppView::HandlePointerEventL(
+        const TPointerEvent& aPointerEvent)
+    {
+
+    // Call base class HandlePointerEventL()
+    CCoeControl::HandlePointerEventL(aPointerEvent);
+    }
+
+// -----------------------------------------------------------------------------
+//
+// 
+// -----------------------------------------------------------------------------
+//
+const TDesC& CTestPublisherAppView::Identity()
+    {
+    return KId();
+    }
+
+// -----------------------------------------------------------------------------
+//
+// 
+// -----------------------------------------------------------------------------
+//
+void CTestPublisherAppView::NotifyWidgetStarted( const TDesC& aWidgetId,     
+    MHsWidgetObserver::EStartReason /*aReason*/ )
+    {
+    TInt pos( KErrNotFound );
+    if( iWidgetIds->Find( aWidgetId, pos ) != 0)
+        {
+        iWidgetIds->AppendL( aWidgetId );
+        }
+    
+    // Publish after widget is alive, lazy.
+    iFlags.Set( ERequirePublish );
+    }
+
+// -----------------------------------------------------------------------------
+// 
+// 
+// -----------------------------------------------------------------------------
+void CTestPublisherAppView::NotifyWidgetStopped( const TDesC& aWidgetId,     
+    MHsWidgetObserver::EStopReason /*aReason*/ )
+    {
+    TInt pos( KErrNotFound );
+    if( iWidgetIds->Find( aWidgetId, pos ) == 0 )
+        {
+        // widget removed from homescreen or in invisible page
+        iWidgetIds->Delete( pos );
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// 
+// 
+// -----------------------------------------------------------------------------
+//
+void CTestPublisherAppView::NotifyWidgetState( const TDesC& aWidgetId,      
+    MHsWidgetObserver::EState aState )
+    {
+    if ( aState == MHsWidgetObserver::EAlive )
+        {
+        iFlags.Set( EPublishAllowed );
+        
+        // PublishL will determine if it is necessary to update widget data
+        TRAP_IGNORE( PublishL( aWidgetId ) );
+        }
+    else if ( aState == MHsWidgetObserver::ESuspend )
+        {
+        iFlags.Clear( EPublishAllowed );
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// 
+// 
+// -----------------------------------------------------------------------------
+//
+void CTestPublisherAppView::NotifyWidgetEvent( const TDesC& aWidgetId,    
+    const TDesC& aEvent, const TDesC& /*aParam*/ )
+    {
+    if ( aEvent == _L("imageclicked"))
+        {
+        CAknGlobalNote* globalNote = CAknGlobalNote::NewLC();
+        TInt noteId = globalNote->ShowNoteL( EAknGlobalInformationNote, _L("Image clicked"));
+        User::After( 2000 );  // waiting for 3 seconds
+        // discard note
+        globalNote->CancelNoteL( noteId );
+        CleanupStack::PopAndDestroy();
+        iPublisher->StartTransaction( aWidgetId );
+        iPublisher->PublishText(
+                aWidgetId, _L8("text2"), KGFeed3 );
+        iPublisher->CommitTransaction( aWidgetId );
+        }
+    else if ( aEvent == _L("textclicked") )
+        {
+        CAknGlobalNote* globalNote = CAknGlobalNote::NewLC();
+        TInt noteId = globalNote->ShowNoteL( EAknGlobalInformationNote, _L("Text clicked") );
+        User::After( 2000 );  // waiting for 3 seconds
+        // discard note
+        globalNote->CancelNoteL( noteId );
+        CleanupStack::PopAndDestroy();
+        iPublisher->StartTransaction( aWidgetId );
+        iPublisher->PublishText(
+            aWidgetId, _L8("text3"), KGFeed2 );
+        iPublisher->CommitTransaction( aWidgetId );
+        }
+    else if ( aEvent == _L("widgetclicked") )
+        {
+        CAknGlobalNote* globalNote = CAknGlobalNote::NewLC();
+        TInt noteId = globalNote->ShowNoteL( EAknGlobalInformationNote, _L("Widget clicked") );
+        User::After( 3000 );  // waiting for 3 seconds
+        // discard note
+        globalNote->CancelNoteL( noteId );
+        CleanupStack::PopAndDestroy();
+        iPublisher->StartTransaction( aWidgetId );
+        if( !iFeedCnt )
+            {
+            iPublisher->PublishText(
+                aWidgetId, _L8("text2"), KGFeed3 );
+            iFeedCnt = ETrue;
+            }
+        else
+            {iPublisher->PublishText(
+                    aWidgetId, _L8("text3"), KGFeed2 );
+            iFeedCnt = EFalse;
+            }
+        
+        iPublisher->CommitTransaction( aWidgetId );
+        }
+    else if( aEvent == _L("OnTitleScrolled"))
+        {
+        TInt pos( KErrNotFound );
+        if( iWidgetIds->Find( aWidgetId, pos ) == 0 && pos % 2 == 1 )
+            {
+            iPublisher->StartTransaction( aWidgetId );
+            if( iFeedCnt == 0 )
+                {
+                iPublisher->PublishImage(aWidgetId,
+                         _L8("image1"), _L("c:\\data\\Installs\\cricket.png"));
+                iFeedCnt++;
+                }
+            else if( iFeedCnt == 1 )
+                {
+                iPublisher->PublishImage(aWidgetId,
+                         _L8("image1"), _L("c:\\data\\Installs\\tennis.png"));
+                iFeedCnt++;
+                }
+            else if( iFeedCnt == 2)
+                {
+                iPublisher->PublishImage(aWidgetId,
+                         _L8("image1"), _L("c:\\data\\Installs\\f1.png"));
+                iFeedCnt = 0;
+                }
+            iPublisher->CommitTransaction( aWidgetId );
+            }
+        }
+    
+    }
+
+// -----------------------------------------------------------------------------
+// 
+// 
+// -----------------------------------------------------------------------------
+//
+void CTestPublisherAppView::PublishL( const TDesC& aWidgetId )
+    {
+    if ( iFlags.IsClear( ERequirePublish ) )
+        {        
+        // Can't publish without widget instance id or no reason to publish
+        return;
+        }
+    if ( iFlags.IsSet( EPublishAllowed ) )
+        {            
+        iPublisher->StartTransaction( aWidgetId );
+
+        iPublisher->PublishImage(aWidgetId,
+             _L8("graphic"), _L("c:\\data\\Installs\\rss.png"));
+       
+        iPublisher->PublishText( aWidgetId, _L8("text1"), KGFeed1 );                    
+        /*
+        iPublisher->PublishText( 
+                    aWidgetId, _L8("text2"), KGFeed2 );
+        iPublisher->PublishText( 
+                    aWidgetId, _L8("text3"), KGFeed3 );
+        iPublisher->PublishText( 
+                    aWidgetId, _L8("text4"), KSFeed1 );
+        */
+        iPublisher->PublishText( 
+                    aWidgetId, _L8("title1"), KGFeed1 );
+        iPublisher->PublishText( 
+                    aWidgetId, _L8("title2"), KGFeed2 );
+        iPublisher->PublishText( 
+                    aWidgetId, _L8("title4"), KGFeed3 );
+        
+        iPublisher->PublishText( 
+                    aWidgetId, _L8("title3"), KSFeed1 );
+        iPublisher->PublishText( 
+                    aWidgetId, _L8("title5"), KSFeed2 );
+        iPublisher->PublishText( 
+                    aWidgetId, _L8("title6"), KSFeed3 );
+                    
+        
+        iPublisher->PublishImage(aWidgetId,
+            _L8("image1"), _L("c:\\data\\Installs\\rss_small.png"));
+        iPublisher->PublishImage(aWidgetId,
+            _L8("image2"), _L("c:\\data\\Installs\\rss_small.png"));
+        iPublisher->PublishImage(aWidgetId,
+            _L8("image3"), _L("c:\\data\\Installs\\rss_small.png"));
+
+        iPublisher->CommitTransaction( aWidgetId );
+
+        iFlags.Clear( ERequirePublish );
+        }
+    }
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/data/testpublisher/src/testpublisherdocument.cpp	Wed Jun 02 13:22:05 2010 +0300
@@ -0,0 +1,95 @@
+/*
+* 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 FILES
+#include "TestPublisherAppUi.h"
+#include "TestPublisherDocument.h"
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CTestPublisherDocument::NewL()
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+CTestPublisherDocument* CTestPublisherDocument::NewL(CEikApplication& aApp)
+    {
+    CTestPublisherDocument* self = NewLC(aApp);
+    CleanupStack::Pop(self);
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// CTestPublisherDocument::NewLC()
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+CTestPublisherDocument* CTestPublisherDocument::NewLC(CEikApplication& aApp)
+    {
+    CTestPublisherDocument* self = new (ELeave) CTestPublisherDocument(aApp);
+
+    CleanupStack::PushL(self);
+    self->ConstructL();
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// CTestPublisherDocument::ConstructL()
+// Symbian 2nd phase constructor can leave.
+// -----------------------------------------------------------------------------
+//
+void CTestPublisherDocument::ConstructL()
+    {
+    // No implementation required
+    }
+
+// -----------------------------------------------------------------------------
+// CTestPublisherDocument::CTestPublisherDocument()
+// C++ default constructor can NOT contain any code, that might leave.
+// -----------------------------------------------------------------------------
+//
+CTestPublisherDocument::CTestPublisherDocument(CEikApplication& aApp) :
+    CAknDocument(aApp)
+    {
+    // No implementation required
+    }
+
+// ---------------------------------------------------------------------------
+// CTestPublisherDocument::~CTestPublisherDocument()
+// Destructor.
+// ---------------------------------------------------------------------------
+//
+CTestPublisherDocument::~CTestPublisherDocument()
+    {
+    // No implementation required
+    }
+
+// ---------------------------------------------------------------------------
+// CTestPublisherDocument::CreateAppUiL()
+// Constructs CreateAppUi.
+// ---------------------------------------------------------------------------
+//
+CEikAppUi* CTestPublisherDocument::CreateAppUiL()
+    {
+    // Create the application user interface, and return a pointer to it;
+    // the framework takes ownership of this object
+    return new (ELeave) CTestPublisherAppUi;
+    }
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/data/text/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 <platform_paths.hrh>
+
+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  
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/data/text/hsps/00/manifest.dat	Wed Jun 02 13:22:05 2010 +0300
@@ -0,0 +1,21 @@
+<?xml version="1.0"?>
+<package version="2.0">
+    <family>qhd_tch</family>
+    <type>widget</type>
+
+    <interfaceuid>0x2001f48a</interfaceuid>
+    <provideruid>0x101fb657</provideruid>
+    <configurationuid>#replaceuid#</configurationuid>
+
+    <fullname>#replace#</fullname>
+    <shortname>#replace#</shortname>
+    <version>1.0</version>
+    
+    <multiinstance>unlimited</multiinstance>
+    
+    <filexml>widgetconfiguration.xml</filexml>
+    <!-- Locale specific resources -->
+    <localization>
+        <fileresource tag="xuikon">#replace#.o0000</fileresource>
+    </localization>
+</package>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/data/text/hsps/00/widgetconfiguration.xml	Wed Jun 02 13:22:05 2010 +0300
@@ -0,0 +1,6 @@
+<configuration>
+    <control>
+        <settings>
+        </settings>
+    </control>
+</configuration>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/data/text/sis/backup_registration.xml	Wed Jun 02 13:22:05 2010 +0300
@@ -0,0 +1,5 @@
+<?xml version="1.0" standalone="yes"?>
+<backup_registration>
+<system_backup/>
+<restore requires_reboot = "no"/>
+</backup_registration>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/data/text/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"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/data/text/xuikon/00/replace.css	Wed Jun 02 13:22:05 2010 +0300
@@ -0,0 +1,27 @@
+widget
+{
+    padding-top:3px;
+    padding-bottom:4px;
+    padding-left:10px;
+    padding-right:8px;
+}
+
+box#container
+{
+    height:adaptive;
+    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;
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/data/text/xuikon/00/replace.dat	Wed Jun 02 13:22:05 2010 +0300
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<data>
+    <!-- UIDs below are not used, deprecated functionality.-->
+    <AppUid>2001CB4F</AppUid>
+    <Provideruid>101FB657</Provideruid>
+    <ThemeUid>11001241</ThemeUid>
+    <ThemeFullName>Anything</ThemeFullName>
+    <ThemeShortName>#replace#</ThemeShortName>
+    <ThemeVersion>1.0</ThemeVersion>
+    <FileXML>#replace#.xml</FileXML>
+    <FileCSS>#replace#.css</FileCSS>
+</data>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/data/text/xuikon/00/replace.xml	Wed Jun 02 13:22:05 2010 +0300
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmluiml xmlns="http://www.series60.com/xml/xmluiml/1" version="1.0">
+    <widget focusable="true" _s60-initial-focus="1">
+        <actions> 
+            <action>
+                <trigger name="activate"/>
+                <event name="#replace#/widgetclicked"/>
+            </action>
+        </actions>
+        <!-- Content Publisher plug-in-->
+        <contentsource name="#replace#" value="0x20019594"/>
+        <configuration name="service" value="Service.ContentPublishing"/>
+        <configuration name="interface" value="IContentPublishing"/>
+        <configuration name="command" value="GetList"/>
+        <configuration name="publisher" value="#replaceuid#:#replace#"/>
+ 
+        <box id="container">
+            <text id="txt1">
+                <configuration name="content_type" value="cnt1"/>
+                <property class="#replace#/text1"/> 
+            </text>
+            <text id="txt2" class="hidden">
+                <configuration name="content_type" value="cnt2"/>
+                <property class="#replace#/text2"/>
+                <property class="policy/emptyContent" name="txt2" value="display: none"/>
+                <property class="policy/Content" name="txt2" value="display: block"/>
+            </text>
+            <text id="txt3" class="hidden">
+                <configuration name="content_type" value="cnt3"/>
+                <property class="#replace#/text3"/> 
+                <property class="policy/emptyContent" name="txt3" value="display: none"/>
+                <property class="policy/Content" name="txt3" value="display: block"/>
+            </text>
+        </box>
+    </widget>
+</xmluiml>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/data/widget/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 <platform_paths.hrh>
+
+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  
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/data/widget/hsps/00/manifest.dat	Wed Jun 02 13:22:05 2010 +0300
@@ -0,0 +1,21 @@
+<?xml version="1.0"?>
+<package version="2.0">
+    <family>qhd_tch</family>
+    <type>widget</type>
+
+    <interfaceuid>0x2001f48a</interfaceuid>
+    <provideruid>0x101fb657</provideruid>
+    <configurationuid>#replaceuid#</configurationuid>
+
+    <fullname>#replace#</fullname>
+    <shortname>#replace#</shortname>
+    <version>1.0</version>
+    
+    <multiinstance>unlimited</multiinstance>
+    
+    <filexml>widgetconfiguration.xml</filexml>
+    <!-- Locale specific resources -->
+    <localization>
+        <fileresource tag="xuikon">#replace#.o0000</fileresource>
+    </localization>
+</package>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/data/widget/hsps/00/widgetconfiguration.xml	Wed Jun 02 13:22:05 2010 +0300
@@ -0,0 +1,6 @@
+<configuration>
+    <control>
+        <settings>
+        </settings>
+    </control>
+</configuration>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/data/widget/sis/backup_registration.xml	Wed Jun 02 13:22:05 2010 +0300
@@ -0,0 +1,5 @@
+<?xml version="1.0" standalone="yes"?>
+<backup_registration>
+<system_backup/>
+<restore requires_reboot = "no"/>
+</backup_registration>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/data/widget/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"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/data/widget/xuikon/00/replace.css	Wed Jun 02 13:22:05 2010 +0300
@@ -0,0 +1,56 @@
+widget
+{
+    direction: ltr;
+    block-progression:lr;
+}
+
+box#ntbox
+{
+    direction: ltr;
+    block-progression: tb;
+    margin-left: 5px;
+    margin-right: 3px;
+}
+image
+{
+    height: 70px;
+	width: 70px;
+	margin-left: 3px;
+	margin-top: 2px;
+	margin-bottom: 2px;
+	padding-top: 4px;
+	padding-bottom: 4px;
+	padding-left: 2px;
+	padding-right: 2px;
+		
+	nav-index: appearance;
+}
+
+text
+{
+    text-align: center;    
+    font-family: EAknLogicalFontSecondaryFont;
+    font-size: 3.5u;
+    color: "SKIN(268458534 13056 74)";
+    
+    nav-index: appearance;
+}
+
+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;
+    
+    nav-index: appearance;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/data/widget/xuikon/00/replace.dat	Wed Jun 02 13:22:05 2010 +0300
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<data>
+    <!-- UIDs below are not used, deprecated functionality.-->
+    <AppUid>2001CB4F</AppUid>
+    <Provideruid>101FB657</Provideruid>
+    <ThemeUid>11001241</ThemeUid>
+    <ThemeFullName>Anything</ThemeFullName>
+    <ThemeShortName>#replace#</ThemeShortName>
+    <ThemeVersion>1.0</ThemeVersion>
+    <FileXML>#replace#.xml</FileXML>
+    <FileCSS>#replace#.css</FileCSS>
+</data>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/data/widget/xuikon/00/replace.xml	Wed Jun 02 13:22:05 2010 +0300
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmluiml xmlns="http://www.series60.com/xml/xmluiml/1" version="1.0">
+    <widget>
+
+        <!-- Content Publisher plug-in-->
+        <contentsource name="#replace#" value="0x20019594"/>
+        <configuration name="service" value="Service.ContentPublishing"/>
+        <configuration name="interface" value="IContentPublishing"/>
+        <configuration name="command" value="GetList"/>
+        <configuration name="publisher" value="#replaceuid#:#replace#"/>
+ 
+        <image id="img1" focusable="true" path="SKIN(270501603 6157)">
+            <actions>
+                <action>
+                    <trigger name="activate"/>
+                    <event name="#replace#/imageclicked"/>
+                </action>
+            </actions>
+            <configuration name="content_type" value="cnt1"/>
+            <property class="#replace#/image1"/>
+        </image>
+        <box id="ntbox" focusable="true">
+            <actions>
+                <action>
+                    <trigger name="activate"/>
+                    <event name="#replace#/textclicked"/>
+                </action>
+            </actions>
+            <text id="txt1"> My first widget!
+                <configuration name="content_type" value="cnt1"/>
+                <property class="#replace#/text1"/>
+            </text>
+            <newsticker id="nt1" >
+                <actions>
+                    <action>
+                        <trigger name="titlescrolled" titleindex="0"/>
+                        <event name="#replace#/OnTitleScrolled"/>
+                    </action>            
+                </actions>    
+                <title id="title1" titleindex="0">
+                    <property class="#replace#/title1"/>
+                    <configuration name="content_type" value="cnt2"/>
+                </title>                
+                <title id="title2" titleindex="1">
+                    <property class="#replace#/title2"/>
+                    <configuration name="content_type" value="cnt2"/>
+                </title>                
+                <title id="title3" titleindex="2">
+                    <property class="#replace#/title3"/>
+                    <configuration name="content_type" value="cnt2"/>
+                </title>                            
+            </newsticker>
+        </box>
+    </widget>
+</xmluiml>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/data/widget/xuikon/00/replacerenderer.css	Wed Jun 02 13:22:05 2010 +0300
@@ -0,0 +1,7 @@
+widget
+{
+}
+
+text
+{
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/data/widget/xuikon/00/replacerenderer.xml	Wed Jun 02 13:22:05 2010 +0300
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmluiml xmlns="http://www.series60.com/xml/xmluiml/1" version="1.0">
+    <widget>
+
+        <!-- Content Publisher plug-in of widget -->
+        <contentsource name="#replace#" value="0x20019594"/>
+        <configuration name="service" value="Service.ContentPublishing"/>
+        <configuration name="interface" value="IContentPublishing"/>
+        <configuration name="command" value="GetList"/>
+        <configuration name="publisher" value="#replaceuid#:#replace#"/>
+        <#replace#renderer>
+            <data id="stream">
+                <property class="#replace#/widget"/>
+            </data>
+        </#replace#renderer>
+    </widget>
+</xmluiml>
Binary file images/feeds_layout.jpg has changed
Binary file images/graphictext_layout_1.jpg has changed
Binary file images/graphictext_layout_2.jpg has changed
Binary file images/graphictext_layout_3.jpg has changed
Binary file images/iconstext_layout_1.jpg has changed
Binary file images/iconstext_layout_2.jpg has changed
Binary file images/iconstext_layout_3.jpg has changed
Binary file images/text_layout_1.jpg has changed
Binary file images/text_layout_2.jpg has changed
Binary file images/text_layout_3.jpg has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Wed Jun 02 13:22:05 2010 +0300
@@ -0,0 +1,14 @@
+#include <QtGui/QApplication>
+#include "mainwindow.h"
+
+int main(int argc, char *argv[])
+{
+    QApplication a(argc, argv);
+    MainWindow w;
+#if defined(Q_WS_S60)
+    w.showMaximized();
+#else
+    w.show();
+#endif
+    return a.exec();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mainwindow.cpp	Wed Jun 02 13:22:05 2010 +0300
@@ -0,0 +1,339 @@
+#include "mainwindow.h"
+#include "ui_mainwindow.h"
+
+#include "widgetcreator.h"
+#include "renderercreator.h"
+#include "publishercreator.h"
+
+#include <QMessageBox>
+#include <QDir>
+#include <QTextStream>
+#include <QTimer>
+
+
+MainWindow::MainWindow(QWidget *parent) :
+    QMainWindow(parent), ui(new Ui::MainWindow), iLayoutIndex( 0 ), iLayoutCount( -1 )
+{
+    ui->setupUi(this);
+    iTimer = new QTimer(this);
+    connect(iTimer, SIGNAL(timeout()), this, SLOT(updateLayout()));
+}
+
+MainWindow::~MainWindow()
+{
+    delete ui;
+}
+
+void MainWindow::changeEvent(QEvent *e)
+{
+    QMainWindow::changeEvent(e);
+    switch (e->type()) {
+    case QEvent::LanguageChange:
+        ui->retranslateUi(this);
+        break;
+    default:
+        break;
+    }
+}
+
+QString MainWindow::widgetName()
+{
+    return ui->widgetName->text().toLower();
+}
+
+QString MainWindow::widgetUid()
+{
+    return ui->widgetUid->text().toLower();
+}
+
+QCheckBox& MainWindow::rendererCheckBox()
+{
+    return *ui->renderingCheckBox;
+}
+
+QString MainWindow::rendererName()
+{
+    return ui->rendererName->text();
+}
+
+QString MainWindow::rendererUid()
+{
+    return ui->rendererUid->text();
+}
+
+void MainWindow::on_pushButton_clicked()
+{
+    if( widgetName().isEmpty() || widgetUid().isEmpty() )
+    {
+        QMessageBox msgBox;
+        msgBox.setText("Widget name and UID must be given.");
+        msgBox.exec();
+        return;
+    }
+
+    bool ok;
+    uint uidVal = widgetUid().toUInt(&ok, 16 );
+    if( widgetUid().length() != 10 || !widgetUid().startsWith( "0x",Qt::CaseInsensitive ) || !ok )
+    {
+        QMessageBox msgBox;
+        msgBox.setText("UID must be in 4 byte hexadecimal format\n 0x11223344.");
+        msgBox.exec();
+        return;
+    }
+
+    if( uidVal >= 2147483648 ) //0x80000000
+    {
+        QMessageBox msgBox;
+        msgBox.setText("UID must be less than\n 0x80000000.");
+        msgBox.exec();
+        return;
+    }
+
+    generateMainBuildFile();
+
+    PublisherCreator* publisherCreator = new PublisherCreator(*this);
+    delete publisherCreator;
+    
+    WidgetCreator* widgetCreator = new WidgetCreator(*this);
+    delete widgetCreator;
+    
+    if( ui->renderingCheckBox->isChecked() )
+    {
+        if( rendererName().isEmpty() || rendererUid().isEmpty() )
+        {
+            QMessageBox msgBox;
+            msgBox.setText("Renderer name and UID must be given.");
+            msgBox.exec();
+            return;
+        }
+        if( rendererUid().length() != 10 || !rendererUid().startsWith( "0x",Qt::CaseInsensitive ))
+        {
+            QMessageBox msgBox;
+            msgBox.setText("UID must be in hexadecimal format\n 0x11223344.");
+            msgBox.exec();
+            return;
+        }
+        RendererCreator * renderer = new RendererCreator(*this);
+        delete renderer;
+    }
+/*
+    QMessageBox msgBox;
+    msgBox.setText("Widget created.");
+    msgBox.exec();
+    return;*/
+}
+
+void MainWindow::generateMainBuildFile()
+{
+    QDir dir;
+    dir.mkpath( widgetName() + "/group");
+    dir.setPath( widgetName() + "/group");
+    QFile file( dir.filePath("bld.inf"));
+    if (!file.open(QIODevice::WriteOnly | QIODevice::Text))
+        return;
+
+    QTextStream out(&file);
+    generateLicense( out );
+    
+    //out << "#include \"../publisherif/group/bld.inf\"\n";
+    out << "#include \"../testpublisher/group/bld.inf\"\n";
+    out << "#include \"../widget/group/bld.inf\"\n";
+    if( ui->renderingCheckBox->isChecked() )
+    {
+        out << "#include \"../renderingplugin/group/bld.inf\"\n\n";
+    }
+    out << "// End of File\n";
+}
+
+void MainWindow::generateLicense( QTextStream& aStream )
+{
+    aStream << "/*\n";
+    aStream << "* Copyright (c) {Year(s)} {Copyright owner}.\n";
+    aStream << "* All rights reserved.\n";
+    aStream << "* This component and the accompanying materials are made available\n";
+    aStream << "* under the terms of the \"Eclipse Public License v1.0\"\n";
+    aStream << "* which accompanies this distribution, and is available\n";
+    aStream << "* at the URL \"http://www.symbianfoundation.org/legal/sfl-v10.html\".\n";
+    aStream << "*\n";
+    aStream << "* Initial Contributors:\n";
+    aStream << "* {Name} {Company} – Initial contribution\n";
+    aStream << "*\n";
+    aStream << "* Contributors:\n";
+    aStream << "* {Name} {Company} – {{Description of contribution}}\n";
+    aStream << "*\n";
+    aStream << "* Description:\n";
+    aStream << "* {{Description of the file}}\n";
+    aStream << "*\n";
+    aStream << "*/\n\n";
+}
+
+QString MainWindow::widgetUidNoHex()
+{
+    QString uid( widgetUid() );
+    if( uid.startsWith( "0x",Qt::CaseInsensitive ))
+    {
+        return uid.right(8);
+    }
+    else
+    {
+        return uid;
+    }
+
+}
+
+void MainWindow::replaceData( QString sourceFile, QString destFile, bool noHexUid )
+{
+    QString path = QDir::currentPath();
+    QFile infile(sourceFile);
+    if (!infile.open(QIODevice::ReadWrite | QIODevice::Text))
+        return;
+
+    QTextStream in(&infile);
+
+    QFile outfile(destFile);
+    if (!outfile.open(QIODevice::ReadWrite | QIODevice::Text))
+        return;
+
+    QTextStream out(&outfile);
+
+    while (!in.atEnd())
+    {
+        QString line = in.readLine();
+        line.replace(QString("#replace#"), widgetName());
+        if( noHexUid )
+        {
+            line.replace(QString("#replaceuid#"), widgetUidNoHex());
+        }
+        else
+        {
+            line.replace(QString("#replaceuid#"), widgetUid());
+        }
+        out << line << "\n";
+    }
+}
+
+void MainWindow::on_renderingCheckBox_stateChanged(int state )
+{
+    if( state == Qt::Unchecked )
+    {
+        ui->rendererName->setEnabled( false );
+        ui->rendererUid->setEnabled( false );
+    }
+    else if ( state == Qt::Checked)
+    {
+        ui->rendererName->setEnabled( true );
+        ui->rendererUid->setEnabled( true);
+    }
+
+}
+
+QString MainWindow::widgetLayout()
+{
+    switch (iLayoutIndex)
+    {
+    case 0:
+        {
+            return QString( "feed" );
+        }
+        break;
+    case 1:
+        {
+            return QString( "text" );
+        }
+        break;
+    case 2:
+        {
+            return QString( "iconstext" );
+        }
+        break;
+    case 3:
+        {
+            return QString( "graphictext" );
+        }
+        break;
+    };
+}
+
+void MainWindow::on_comboBox_currentIndexChanged(int index)
+{
+    iLayoutIndex = index;
+    iLayoutCount = 3;
+    updateLayout();
+
+
+}
+
+void MainWindow::updateLayout()
+{
+    switch (iLayoutIndex)
+    {
+    case 0:
+        {
+            iTimer->stop();
+            showFeedsLayout();
+        }
+        break;
+    case 1:
+        {
+            showTextLayout();
+            iTimer->start(2000);
+        }
+        break;
+    case 2:
+        {
+            showIconsTextLayout();
+            iTimer->start(2000);
+        }
+        break;
+    case 3:
+        {
+            showGraphicTextLayout();
+            iTimer->start(2000);
+        }
+        break;
+    };
+
+    if( iLayoutCount > 1)
+    {
+        iLayoutCount--;
+    }
+    else
+    {
+        iLayoutCount = 3;
+    }
+}
+
+void MainWindow::showFeedsLayout()
+{
+    ui->layoutGraphics->setPixmap(QPixmap(QString::fromUtf8(":/widgets/images/feeds_layout.jpg")));
+}
+
+void MainWindow::showTextLayout()
+{
+    QString imagePath(":/widgets/images/text_layout_");
+    QString cnt;
+    cnt.setNum( iLayoutCount );
+    imagePath.append( cnt );
+    imagePath.append( ".jpg" );
+    ui->layoutGraphics->setPixmap(QPixmap(imagePath));
+}
+
+void MainWindow::showIconsTextLayout()
+{
+    QString imagePath(":/widgets/images/iconstext_layout_");
+    QString cnt;
+    cnt.setNum( iLayoutCount );
+    imagePath.append( cnt );
+    imagePath.append( ".jpg" );
+    ui->layoutGraphics->setPixmap(QPixmap(imagePath));
+}
+
+void MainWindow::showGraphicTextLayout()
+{
+    QString imagePath(":/widgets/images/graphictext_layout_");
+    QString cnt;
+    cnt.setNum( iLayoutCount );
+    imagePath.append( cnt );
+    imagePath.append( ".jpg" );
+    ui->layoutGraphics->setPixmap(QPixmap(imagePath));
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mainwindow.h	Wed Jun 02 13:22:05 2010 +0300
@@ -0,0 +1,56 @@
+#ifndef MAINWINDOW_H
+#define MAINWINDOW_H
+
+#include <QMainWindow>
+
+class QTextStream;
+class QCheckBox;
+class QTimer;
+
+namespace Ui {
+    class MainWindow;
+}
+
+class MainWindow : public QMainWindow
+{
+    Q_OBJECT
+
+public:
+    explicit MainWindow(QWidget *parent = 0);
+    ~MainWindow();
+
+    QString widgetName();
+    QString widgetUid();
+    QString widgetUidNoHex();
+    QString rendererName();
+    QString rendererUid();
+    void generateLicense( QTextStream& aStream );
+    QCheckBox& rendererCheckBox();
+    QString widgetLayout();
+
+    void replaceData( QString sourceFile, QString destFile, bool noHexUid = 0 );
+
+protected:
+    void changeEvent(QEvent *e);
+
+private:
+    void generateMainBuildFile();
+    void showFeedsLayout();
+    void showTextLayout();
+    void showIconsTextLayout();
+    void showGraphicTextLayout();
+
+private:
+    Ui::MainWindow *ui;
+    int iLayoutIndex;
+    int iLayoutCount;
+    QTimer *iTimer;
+
+private slots:
+    void on_comboBox_currentIndexChanged(int index);
+    void on_renderingCheckBox_stateChanged(int );
+    void on_pushButton_clicked();
+    void updateLayout();
+};
+
+#endif // MAINWINDOW_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mainwindow.ui	Wed Jun 02 13:22:05 2010 +0300
@@ -0,0 +1,300 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>MainWindow</class>
+ <widget class="QMainWindow" name="MainWindow">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>332</width>
+    <height>324</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>Amazing Widget Builder</string>
+  </property>
+  <widget class="QWidget" name="centralWidget">
+   <layout class="QVBoxLayout" name="verticalLayout_4">
+    <item>
+     <layout class="QVBoxLayout" name="verticalLayout_3">
+      <item>
+       <layout class="QHBoxLayout" name="horizontalLayout_4">
+        <item>
+         <layout class="QVBoxLayout" name="verticalLayout_2">
+          <item>
+           <widget class="QLabel" name="label_2">
+            <property name="font">
+             <font>
+              <pointsize>12</pointsize>
+             </font>
+            </property>
+            <property name="text">
+             <string>Widget Name</string>
+            </property>
+            <property name="buddy">
+             <cstring>widgetName</cstring>
+            </property>
+           </widget>
+          </item>
+          <item>
+           <widget class="QLabel" name="label_3">
+            <property name="font">
+             <font>
+              <pointsize>12</pointsize>
+             </font>
+            </property>
+            <property name="text">
+             <string>Widget UID</string>
+            </property>
+            <property name="buddy">
+             <cstring>widgetUid</cstring>
+            </property>
+           </widget>
+          </item>
+          <item>
+           <widget class="QLabel" name="label_6">
+            <property name="font">
+             <font>
+              <pointsize>12</pointsize>
+             </font>
+            </property>
+            <property name="text">
+             <string>Widget Layout</string>
+            </property>
+            <property name="buddy">
+             <cstring>widgetUid</cstring>
+            </property>
+           </widget>
+          </item>
+         </layout>
+        </item>
+        <item>
+         <layout class="QVBoxLayout" name="verticalLayout">
+          <item>
+           <widget class="QLineEdit" name="widgetName">
+            <property name="font">
+             <font>
+              <pointsize>12</pointsize>
+             </font>
+            </property>
+           </widget>
+          </item>
+          <item>
+           <widget class="QLineEdit" name="widgetUid">
+            <property name="font">
+             <font>
+              <pointsize>12</pointsize>
+             </font>
+            </property>
+           </widget>
+          </item>
+          <item>
+           <widget class="QComboBox" name="comboBox">
+            <property name="font">
+             <font>
+              <pointsize>12</pointsize>
+             </font>
+            </property>
+            <item>
+             <property name="text">
+              <string>Feeds layout</string>
+             </property>
+            </item>
+            <item>
+             <property name="text">
+              <string>Text layout</string>
+             </property>
+            </item>
+            <item>
+             <property name="text">
+              <string>Icons&amp;Text layout</string>
+             </property>
+            </item>
+            <item>
+             <property name="text">
+              <string>Graphic&amp;Text layout</string>
+             </property>
+            </item>
+           </widget>
+          </item>
+         </layout>
+        </item>
+       </layout>
+      </item>
+      <item>
+       <widget class="QLabel" name="layoutGraphics">
+        <property name="maximumSize">
+         <size>
+          <width>312</width>
+          <height>82</height>
+         </size>
+        </property>
+        <property name="text">
+         <string/>
+        </property>
+        <property name="pixmap">
+         <pixmap resource="widgetgen.qrc">:/widgets/images/feeds_layout.jpg</pixmap>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <layout class="QHBoxLayout" name="horizontalLayout_6">
+        <item>
+         <spacer name="horizontalSpacer_3">
+          <property name="orientation">
+           <enum>Qt::Horizontal</enum>
+          </property>
+          <property name="sizeHint" stdset="0">
+           <size>
+            <width>40</width>
+            <height>20</height>
+           </size>
+          </property>
+         </spacer>
+        </item>
+        <item>
+         <widget class="QCheckBox" name="renderingCheckBox">
+          <property name="font">
+           <font>
+            <pointsize>12</pointsize>
+           </font>
+          </property>
+          <property name="text">
+           <string>Custom Rendering Plug-in</string>
+          </property>
+         </widget>
+        </item>
+        <item>
+         <spacer name="horizontalSpacer_4">
+          <property name="orientation">
+           <enum>Qt::Horizontal</enum>
+          </property>
+          <property name="sizeHint" stdset="0">
+           <size>
+            <width>40</width>
+            <height>20</height>
+           </size>
+          </property>
+         </spacer>
+        </item>
+       </layout>
+      </item>
+      <item>
+       <layout class="QHBoxLayout" name="horizontalLayout_2">
+        <item>
+         <widget class="QLabel" name="label_4">
+          <property name="font">
+           <font>
+            <pointsize>12</pointsize>
+           </font>
+          </property>
+          <property name="text">
+           <string>Renderer Name</string>
+          </property>
+          <property name="buddy">
+           <cstring>rendererName</cstring>
+          </property>
+         </widget>
+        </item>
+        <item>
+         <widget class="QLineEdit" name="rendererName">
+          <property name="enabled">
+           <bool>false</bool>
+          </property>
+         </widget>
+        </item>
+       </layout>
+      </item>
+      <item>
+       <layout class="QHBoxLayout" name="horizontalLayout_3">
+        <item>
+         <widget class="QLabel" name="label_5">
+          <property name="font">
+           <font>
+            <pointsize>12</pointsize>
+           </font>
+          </property>
+          <property name="text">
+           <string>Renderer UID  </string>
+          </property>
+          <property name="buddy">
+           <cstring>rendererUid</cstring>
+          </property>
+         </widget>
+        </item>
+        <item>
+         <widget class="QLineEdit" name="rendererUid">
+          <property name="enabled">
+           <bool>false</bool>
+          </property>
+         </widget>
+        </item>
+       </layout>
+      </item>
+      <item>
+       <layout class="QHBoxLayout" name="horizontalLayout">
+        <item>
+         <spacer name="horizontalSpacer">
+          <property name="orientation">
+           <enum>Qt::Horizontal</enum>
+          </property>
+          <property name="sizeHint" stdset="0">
+           <size>
+            <width>40</width>
+            <height>20</height>
+           </size>
+          </property>
+         </spacer>
+        </item>
+        <item>
+         <widget class="QPushButton" name="pushButton">
+          <property name="maximumSize">
+           <size>
+            <width>150</width>
+            <height>16777215</height>
+           </size>
+          </property>
+          <property name="font">
+           <font>
+            <pointsize>12</pointsize>
+           </font>
+          </property>
+          <property name="text">
+           <string>Generate</string>
+          </property>
+         </widget>
+        </item>
+        <item>
+         <spacer name="horizontalSpacer_2">
+          <property name="orientation">
+           <enum>Qt::Horizontal</enum>
+          </property>
+          <property name="sizeHint" stdset="0">
+           <size>
+            <width>40</width>
+            <height>20</height>
+           </size>
+          </property>
+         </spacer>
+        </item>
+       </layout>
+      </item>
+     </layout>
+    </item>
+   </layout>
+  </widget>
+ </widget>
+ <layoutdefault spacing="6" margin="11"/>
+ <tabstops>
+  <tabstop>widgetName</tabstop>
+  <tabstop>widgetUid</tabstop>
+  <tabstop>renderingCheckBox</tabstop>
+  <tabstop>rendererName</tabstop>
+  <tabstop>rendererUid</tabstop>
+  <tabstop>pushButton</tabstop>
+ </tabstops>
+ <resources>
+  <include location="widgetgen.qrc"/>
+ </resources>
+ <connections/>
+</ui>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/publishercreator.cpp	Wed Jun 02 13:22:05 2010 +0300
@@ -0,0 +1,97 @@
+#include <QFile>
+#include <QDir>
+
+#include "publishercreator.h"
+
+PublisherCreator::PublisherCreator(MainWindow& aUi) : iUi( aUi )
+{
+    copyFiles();
+}
+
+void PublisherCreator::copyFiles()
+{
+    QDir dir;
+
+    // Copy publisher interface as is
+    dir.mkpath( iUi.widgetName() + "/publisherif/inc");
+    QFile::copy ( "data/publisherif/inc/hspublisher.h",
+                  iUi.widgetName() + "/publisherif/inc/hspublisher.h");
+    QFile::copy ( "data/publisherif/inc/hspublisherimpl.h",
+                  iUi.widgetName() + "/publisherif/inc/hspublisherimpl.h");
+    QFile::copy ( "data/publisherif/inc/hswidgetobserver.h",
+                  iUi.widgetName() + "/publisherif/inc/hswidgetobserver.h");
+    QFile::copy ( "data/publisherif/inc/transaction.h",
+                  iUi.widgetName() + "/publisherif/inc/transaction.h");
+
+
+    dir.mkpath( iUi.widgetName() + "/publisherif/src");
+    QFile::copy ( "data/publisherif/src/hspublisher.cpp",
+                  iUi.widgetName() + "/publisherif/src/hspublisher.cpp");
+    QFile::copy ( "data/publisherif/src/hspublisherimpl.cpp",
+                  iUi.widgetName() + "/publisherif/src/hspublisherimpl.cpp");
+    QFile::copy ( "data/publisherif/src/transaction.cpp",
+                  iUi.widgetName() + "/publisherif/src/transaction.cpp");
+
+    // Copy test publisher
+    dir.mkpath( iUi.widgetName() + "/testpublisher/data");
+    QFile::copy ( "data/testpublisher/data/testpublisher.rls",
+                  iUi.widgetName() + "/testpublisher/data/testpublisher.rls");
+    QFile::copy ( "data/testpublisher/data/testpublisher.rss",
+                  iUi.widgetName() + "/testpublisher/data/testpublisher.rss");
+    QFile::copy ( "data/testpublisher/data/testpublisher_reg.rss",
+                  iUi.widgetName() + "/testpublisher/data/testpublisher_reg.rss");
+
+    dir.mkpath( iUi.widgetName() + "/testpublisher/gfx");
+    QFile::copy ( "data/testpublisher/gfx/qgn_menu_TestPublisher.svg",
+                  iUi.widgetName() + "/testpublisher/gfx/qgn_menu_TestPublisher.svg");
+    QFile::copy ( "data/testpublisher/gfx/f1.png",
+                  iUi.widgetName() + "/testpublisher/gfx/f1.png");
+    QFile::copy ( "data/testpublisher/gfx/cricket.png",
+                  iUi.widgetName() + "/testpublisher/gfx/cricket.png");
+    QFile::copy ( "data/testpublisher/gfx/tennis.png",
+                  iUi.widgetName() + "/testpublisher/gfx/tennis.png");
+
+    dir.mkpath( iUi.widgetName() + "/testpublisher/group");
+    QFile::copy ( "data/testpublisher/group/bld.inf",
+                  iUi.widgetName() + "/testpublisher/group/bld.inf");
+    QFile::copy ( "data/testpublisher/group/icons_scalable_dc.mk",
+                  iUi.widgetName() + "/testpublisher/group/icons_scalable_dc.mk");
+    QFile::copy ( "data/testpublisher/group/testpublisher.mmp",
+                  iUi.widgetName() + "/testpublisher/group/testpublisher.mmp");
+
+    dir.mkpath( iUi.widgetName() + "/testpublisher/inc");
+    QFile::copy ( "data/testpublisher/inc/testpublisher.hrh",
+                  iUi.widgetName() + "/testpublisher/inc/testpublisher.hrh");
+    QFile::copy ( "data/testpublisher/inc/testpublisher.pan",
+                  iUi.widgetName() + "/testpublisher/inc/testpublisher.pan");
+    QFile::copy ( "data/testpublisher/inc/testpublisherapplication.h",
+                  iUi.widgetName() + "/testpublisher/inc/testpublisherapplication.h");
+    QFile::copy ( "data/testpublisher/inc/testpublisherappui.h",
+                  iUi.widgetName() + "/testpublisher/inc/testpublisherappui.h");
+    QFile::copy ( "data/testpublisher/inc/testpublisherappview.h",
+                  iUi.widgetName() + "/testpublisher/inc/testpublisherappview.h");
+    QFile::copy ( "data/testpublisher/inc/testpublisherdocument.h",
+                  iUi.widgetName() + "/testpublisher/inc/testpublisherdocument.h");
+
+    dir.mkpath( iUi.widgetName() + "/testpublisher/sis");
+    QFile::copy ( "data/testpublisher/sis/backup_registration.xml",
+                  iUi.widgetName() + "/testpublisher/sis/backup_registration.xml");
+    QFile::copy ( "data/testpublisher/sis/TestPublisher_S60_3_X_v_1_0_0.pkg",
+                  iUi.widgetName() + "/testpublisher/sis/TestPublisher_S60_3_X_v_1_0_0.pkg");
+
+    dir.mkpath( iUi.widgetName() + "/testpublisher/src");
+    QFile::copy ( "data/testpublisher/src/testpublisher.cpp",
+                  iUi.widgetName() + "/testpublisher/src/testpublisher.cpp");
+    QFile::copy ( "data/testpublisher/src/testpublisherapplication.cpp",
+                  iUi.widgetName() + "/testpublisher/src/testpublisherapplication.cpp");
+    QFile::copy ( "data/testpublisher/src/testpublisherappui.cpp",
+                  iUi.widgetName() + "/testpublisher/src/testpublisherappui.cpp");
+    //QFile::copy ( "data/testpublisher/src/testpublisherappview.cpp",
+    //              iUi.widgetName() + "/testpublisher/src/testpublisherappview.cpp");
+    QFile::copy ( "data/testpublisher/src/testpublisherdocument.cpp",
+                  iUi.widgetName() + "/testpublisher/src/testpublisherdocument.cpp");
+
+    iUi.replaceData("data/testpublisher/src/testpublisherappview.cpp",
+                iUi.widgetName() + "/testpublisher/src/testpublisherappview.cpp" );
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/publishercreator.h	Wed Jun 02 13:22:05 2010 +0300
@@ -0,0 +1,18 @@
+#ifndef PUBLISHERCREATOR_H
+#define PUBLISHERCREATOR_H
+
+#include "mainwindow.h"
+
+class PublisherCreator
+{
+public:
+    PublisherCreator(MainWindow& aUi);
+
+private:
+    void copyFiles();
+
+private:
+    MainWindow& iUi;
+};
+
+#endif // PUBLISHERCREATOR_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/renderercreator.cpp	Wed Jun 02 13:22:05 2010 +0300
@@ -0,0 +1,78 @@
+#include "renderercreator.h"
+#include <QDir>
+#include <QTextStream>
+
+
+RendererCreator::RendererCreator(MainWindow& aUi) : iUi( aUi )
+{
+    generateFolders();
+    generateResource();
+    generateBuildFile();
+    generateMMP();
+    generateHeader();
+    generateSource();
+}
+
+void RendererCreator::generateFolders()
+{
+    QDir dir;
+    dir.mkpath( iUi.widgetName() + "/renderingplugin");
+    dir.setPath( iUi.widgetName() + "/renderingplugin");
+    dir.mkpath( "data" );
+    dir.mkpath( "group" );
+    dir.mkpath( "inc" );
+    dir.mkpath( "src" );
+}
+
+void RendererCreator::generateResource()
+{
+    iUi.replaceData("data/renderingplugin/data/renderer.rss",
+                iUi.widgetName() + "/renderingplugin/data/" + iUi.rendererName() +  "renderer.rss");
+}
+
+void RendererCreator::generateBuildFile()
+{
+    iUi.replaceData("data/renderingplugin/group/bld.inf",
+                 iUi.widgetName() + "/renderingplugin/group/bld.inf");
+}
+
+void RendererCreator::generateMMP()
+{
+    iUi.replaceData("data/renderingplugin/group/renderer.mmp",
+                iUi.widgetName() + "/renderingplugin/group/" + iUi.rendererName() +  "renderer.mmp");
+}
+
+void RendererCreator::generateHeader()
+{
+    iUi.replaceData("data/renderingplugin/inc/renderer.h",
+                 iUi.widgetName() + "/renderingplugin/inc/" + iUi.rendererName() +  "renderer.h");
+}
+
+void RendererCreator::generateSource()
+{
+    iUi.replaceData("data/renderingplugin/src/renderer.cpp",
+                iUi.widgetName() + "/renderingplugin/src/" + iUi.rendererName() +  "renderer.cpp");
+}
+
+void RendererCreator::replaceData( QString sourceFile, QString destFile )
+{
+    QFile infile(sourceFile);
+    if (!infile.open(QIODevice::ReadWrite | QIODevice::Text))
+        return;
+
+    QTextStream in(&infile);
+
+    QFile outfile(destFile);
+    if (!outfile.open(QIODevice::ReadWrite | QIODevice::Text))
+        return;
+
+    QTextStream out(&outfile);
+
+    while (!in.atEnd())
+    {
+        QString line = in.readLine();
+        line.replace(QString("#replace#"), iUi.rendererName());
+        line.replace(QString("#replaceuid#"), iUi.rendererUid());
+        out << line << "\n";
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/renderercreator.h	Wed Jun 02 13:22:05 2010 +0300
@@ -0,0 +1,27 @@
+#ifndef RENDERERCREATOR_H
+#define RENDERERCREATOR_H
+
+#include <QObject>
+
+#include "mainwindow.h"
+
+class RendererCreator : public QObject
+{
+public:
+    RendererCreator(MainWindow& aUi);
+    
+private:
+    void generateFolders();
+    void generateResource();
+    void generateBuildFile();
+    void generateMMP();
+    void generateHeader();
+    void generateSource();
+
+    void replaceData( QString sourceFile, QString destFile );
+
+private:
+    MainWindow& iUi;
+};
+
+#endif // RENDERERCREATOR_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/widgetcreator.cpp	Wed Jun 02 13:22:05 2010 +0300
@@ -0,0 +1,142 @@
+#include "widgetcreator.h"
+#include <QDir>
+#include <QTextStream>
+#include <QCheckBox>
+
+WidgetCreator::WidgetCreator(MainWindow& aUi, QObject *parent ) :
+    QObject(parent), iUi( aUi )
+{
+    generateFolders();
+    generateBuildFile();
+    generateHSPSManifest();
+    generateEmptyDat();
+    generateHSPSConf();
+    generateXml();
+    generateCss();
+    generateDat();
+    generateDtd();
+    generatePkg();
+    generateBur();
+}
+
+
+
+QString WidgetCreator::widgetName()
+{
+    return iUi.widgetName();
+}
+
+QString WidgetCreator::widgetUid()
+{
+    return iUi.widgetUid();
+}
+
+QString WidgetCreator::widgetLayout()
+{
+    return iUi.widgetLayout();
+}
+
+void WidgetCreator::generateFolders()
+{    
+    QDir dir;
+    dir.mkpath( widgetName() + "/widget");
+    dir.setPath( widgetName() + "/widget" );
+    dir.mkpath( "group" );
+    dir.mkpath( "hsps/00" );
+    dir.mkpath( "xuikon/00" );
+    dir.mkpath( "sis" );
+}
+
+void WidgetCreator::generateBuildFile()
+{
+    iUi.replaceData("data/" + widgetLayout() +"/group/bld.inf", widgetName() + "/widget/group/bld.inf", 1);
+}
+
+void WidgetCreator::generateHSPSManifest()
+{
+    iUi.replaceData("data/" + widgetLayout() +"/hsps/00/manifest.dat",
+                widgetName() + "/widget/hsps/00/manifest.dat");
+}
+
+void WidgetCreator::generateHSPSConf()
+{
+    iUi.replaceData( "data/" + widgetLayout() +"/hsps/00/widgetconfiguration.xml",
+                 widgetName() + "/widget/hsps/00/widgetconfiguration.xml" );
+}
+
+void WidgetCreator::generateEmptyDat()
+{
+    QDir dir;
+    dir.setPath( widgetName() + "/widget/hsps/00");
+    QFile file(dir.filePath("empty.dat"));
+    if (!file.open(QIODevice::ReadWrite | QIODevice::Text))
+        return;
+}
+
+void WidgetCreator::generateXml()
+{
+    if( iUi.rendererCheckBox().isChecked())
+    {
+        iUi.replaceData( "data/" + widgetLayout() +"/xuikon/00/replacerenderer.xml",
+             widgetName() + "/widget/xuikon/00/" + iUi.widgetName() +  ".xml");
+    }
+    else
+    {
+        iUi.replaceData( "data/" + widgetLayout() +"/xuikon/00/replace.xml",
+             widgetName() + "/widget/xuikon/00/" + iUi.widgetName() +  ".xml");
+    }
+
+}  
+        
+void WidgetCreator::generateCss()
+{
+    if( iUi.rendererCheckBox().isChecked())
+    {
+        iUi.replaceData( "data/" + widgetLayout() +"/xuikon/00/replacerenderer.css",
+             widgetName() + "/widget/xuikon/00/" + iUi.widgetName() +  ".css");
+    }
+    else
+    {
+        iUi.replaceData( "data/" + widgetLayout() +"/xuikon/00/replace.css",
+             widgetName() + "/widget/xuikon/00/" + iUi.widgetName() +  ".css");
+    }
+}
+
+void WidgetCreator::generateDat()
+{
+    iUi.replaceData("data/" + widgetLayout() +"/xuikon/00/replace.dat",
+                widgetName() + "/widget/xuikon/00/" + widgetName() + "_" + iUi.widgetUidNoHex() + ".dat");
+}
+
+void WidgetCreator::generateDtd()
+{
+    QDir dir;
+    dir.setPath( widgetName() + "/widget/xuikon/00");
+    QFile file(dir.filePath(widgetName()+".dtd"));
+    if (!file.open(QIODevice::ReadWrite | QIODevice::Text))
+        return;
+
+}
+
+void WidgetCreator::generatePkg()
+{
+    iUi.replaceData("data/" + widgetLayout() +"/sis/replace.pkg",
+                widgetName() + "/widget/sis/"+ widgetName() + ".pkg", 1); // 1 =no hex uid used
+   }
+
+void WidgetCreator::generateBur()
+{
+    QDir dir;
+    dir.setPath( widgetName() + "/widget/sis");
+    QFile file(dir.filePath("backup_registration.xml"));
+    if (!file.open(QIODevice::ReadWrite | QIODevice::Text))
+        return;
+
+    QTextStream out(&file);
+
+    out << "<?xml version=\"1.0\" standalone=\"yes\"?>\n"
+    << "<backup_registration>\n"
+    << "<system_backup/>\n"
+    << "<restore requires_reboot = \"no\"/>\n"
+    << "</backup_registration>\n";
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/widgetcreator.h	Wed Jun 02 13:22:05 2010 +0300
@@ -0,0 +1,42 @@
+#ifndef WIDGETCREATOR_H
+#define WIDGETCREATOR_H
+
+#include <QObject>
+
+#include "mainwindow.h"
+
+class QString;
+
+class WidgetCreator : public QObject
+{
+    Q_OBJECT
+public:
+    explicit WidgetCreator( MainWindow& aUi, QObject *parent = 0);
+
+signals:
+
+public slots:
+
+private:
+    void generateFolders();
+    void generateBuildFile();
+    void generateHSPSManifest();
+    void generateEmptyDat();
+    void generateHSPSConf();
+    void generateXml();
+    void generateCss();
+    void generateDat();
+    void generateDtd();
+    void generatePkg();
+    void generateBur();
+
+    QString widgetName();
+    QString widgetUid();
+    QString widgetLayout();
+
+private:
+    MainWindow& iUi;
+
+};
+
+#endif // WIDGETCREATOR_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/widgetgen.qrc	Wed Jun 02 13:22:05 2010 +0300
@@ -0,0 +1,14 @@
+<RCC>
+    <qresource prefix="/widgets">
+        <file>images/feeds_layout.jpg</file>
+        <file>images/text_layout_3.jpg</file>
+        <file>images/iconstext_layout_1.jpg</file>
+        <file>images/iconstext_layout_2.jpg</file>
+        <file>images/iconstext_layout_3.jpg</file>
+        <file>images/text_layout_1.jpg</file>
+        <file>images/text_layout_2.jpg</file>
+        <file>images/graphictext_layout_1.jpg</file>
+        <file>images/graphictext_layout_2.jpg</file>
+        <file>images/graphictext_layout_3.jpg</file>
+    </qresource>
+</RCC>