201027
authorhgs
Fri, 09 Jul 2010 14:19:08 +0300
changeset 102 8b8b34fa9751
parent 100 0920c6a9b6c8
child 106 e78d6e055a5b
201027
activityfw/activitydatabase/activitydatabase.pro
activityfw/activitydatabase/bwins/hsactivitydbclientu.def
activityfw/activitydatabase/eabi/hsactivitydbclientu.def
activityfw/activitydatabase/hsactivitydbclient/hsactivitydbclient.pro
activityfw/activitydatabase/hsactivitydbclient/inc/hsactivitydbasyncrequestobserver.h
activityfw/activitydatabase/hsactivitydbclient/inc/hsactivitydbclient.h
activityfw/activitydatabase/hsactivitydbclient/s60/inc/hsactivitydbasyncrequest_p.h
activityfw/activitydatabase/hsactivitydbclient/s60/inc/hsactivitydbclient_p.h
activityfw/activitydatabase/hsactivitydbclient/s60/src/hsactivitydbasyncrequest_p.cpp
activityfw/activitydatabase/hsactivitydbclient/s60/src/hsactivitydbclient_p.cpp
activityfw/activitydatabase/hsactivitydbclient/src/hsactivitydbclient.cpp
activityfw/activitydatabase/hsactivitydbserver/group/bld.inf
activityfw/activitydatabase/hsactivitydbserver/group/hsactivitydbserver.mmp
activityfw/activitydatabase/hsactivitydbserver/hsactivitydbserver.pro
activityfw/activitydatabase/hsactivitydbserver/inc/afbroadcasttask.h
activityfw/activitydatabase/hsactivitydbserver/inc/afdataprovidertask.h
activityfw/activitydatabase/hsactivitydbserver/inc/afobservertask.h
activityfw/activitydatabase/hsactivitydbserver/inc/afqueries.h
activityfw/activitydatabase/hsactivitydbserver/inc/afserver.h
activityfw/activitydatabase/hsactivitydbserver/inc/afsession.h
activityfw/activitydatabase/hsactivitydbserver/inc/afstorage.h
activityfw/activitydatabase/hsactivitydbserver/inc/afstorageasynctask.h
activityfw/activitydatabase/hsactivitydbserver/inc/afstoragesynctask.h
activityfw/activitydatabase/hsactivitydbserver/inc/aftask.h
activityfw/activitydatabase/hsactivitydbserver/inc/aftaskstorage.h
activityfw/activitydatabase/hsactivitydbserver/inc/afthumbnailtask.h
activityfw/activitydatabase/hsactivitydbserver/src/afbroadcasttask.cpp
activityfw/activitydatabase/hsactivitydbserver/src/afdataprovidertask.cpp
activityfw/activitydatabase/hsactivitydbserver/src/afobservertask.cpp
activityfw/activitydatabase/hsactivitydbserver/src/afserver.cpp
activityfw/activitydatabase/hsactivitydbserver/src/afsession.cpp
activityfw/activitydatabase/hsactivitydbserver/src/afstorage.cpp
activityfw/activitydatabase/hsactivitydbserver/src/afstorageasynctask.cpp
activityfw/activitydatabase/hsactivitydbserver/src/afstoragesynctask.cpp
activityfw/activitydatabase/hsactivitydbserver/src/afthumbnailtask.cpp
activityfw/activitydatabase/hsactivitydbserver/src/main.cpp
activityfw/activitydatabase/inc/activitycmd.h
activityfw/activitydatabase/inc/hsactivitydbclientinterface.h
activityfw/activitydatabase/s60/inc/afentry.h
activityfw/activitydatabase/s60/inc/hsactivityglobals.h
activityfw/activitydatabase/s60/inc/hsserializer.h
activityfw/activitydatabase/s60/src/afentry.cpp
activityfw/activitydatabase/s60/src/hsserializer.cpp
activityfw/activityserviceplugin/activityserviceplugin.pro
activityfw/activityserviceplugin/inc/activityserviceplugin.h
activityfw/activityserviceplugin/inc/afactivityclient.h
activityfw/activityserviceplugin/inc/afactivitymanager.h
activityfw/activityserviceplugin/inc/afclient.h
activityfw/activityserviceplugin/inc/aflauncher.h
activityfw/activityserviceplugin/inc/afmanager.h
activityfw/activityserviceplugin/inc/afserviceplugin.h
activityfw/activityserviceplugin/inc/applicationlauncher.h
activityfw/activityserviceplugin/s60/src/applicationlauncher_p.cpp
activityfw/activityserviceplugin/src/activityserviceplugin.cpp
activityfw/activityserviceplugin/src/afactivityclient.cpp
activityfw/activityserviceplugin/src/afactivitymanager.cpp
activityfw/activityserviceplugin/src/afclient.cpp
activityfw/activityserviceplugin/src/aflauncher.cpp
activityfw/activityserviceplugin/src/afmanager.cpp
activityfw/activityserviceplugin/src/afserviceplugin.cpp
activityfw/activityserviceplugin/src/applicationlauncher.cpp
activityfw/storage/bwins/afstorageclientu.def
activityfw/storage/client/client.pro
activityfw/storage/client/inc/afstorageentry.h
activityfw/storage/eabi/afstorageclientu.def
common.pri
contentstorage/caclient/s60/src/camenuiconutility.cpp
contentstorage/casoftwareregistry/casoftwareregistry.pro
contentstorage/casoftwareregistry/s60/inc/casoftwareregistry_p.h
contentstorage/casoftwareregistry/s60/src/casoftwareregistry_p.cpp
contentstorage/casoftwareregistry/src/casoftwareregistry.cpp
contentstorage/casoftwareregistry/stub/inc/casoftwareregistry_p.h
contentstorage/casoftwareregistry/stub/src/casoftwareregistry_p.cpp
contentstorage/casrv/caappscanner/inc/caappscannerhandler.h
contentstorage/casrv/caappscanner/inc/casrvappscanner.h
contentstorage/casrv/caappscanner/src/caappscannerhandler.cpp
contentstorage/casrv/caappscanner/src/casrvappscanner.cpp
contentstorage/casrv/calocalizerscanner/src/calocalizerscannerproxy.cpp
contentstorage/casrv/caprogresscanner/data/caprogresscanner.rss
contentstorage/casrv/caprogresscanner/group/bld.inf
contentstorage/casrv/caprogresscanner/group/caprogresscanner.mmp
contentstorage/casrv/caprogresscanner/inc/caprogresscanner.h
contentstorage/casrv/caprogresscanner/src/caprogresscanner.cpp
contentstorage/casrv/caprogresscanner/src/proxy.cpp
contentstorage/casrv/casrvmgr/bwins/casrvmanageru.def
contentstorage/casrv/casrvmgr/eabi/casrvmanageru.def
contentstorage/casrv/casrvmgr/inc/casrvmanager.h
contentstorage/casrv/casrvmgr/inc/casrvplugin.h
contentstorage/casrv/casrvmgr/src/casrvmanager.cpp
contentstorage/casrv/causifscanner/inc/causifscanner.h
contentstorage/casrv/causifscanner/src/causifscanner.cpp
contentstorage/casrv/cawidgetscanner/inc/cawidgetstoragehandler.h
contentstorage/casrv/cawidgetscanner/src/cawidgetscannerplugin.cpp
contentstorage/casrv/cawidgetscanner/src/cawidgetstoragehandler.cpp
contentstorage/castorage/data/stub/castorage.db
contentstorage/group/camenu.mmp
contentstorage/group/group.pro
contentstorage/srvinc/caprogressnotifier.h
contentstorage/srvinc/casrv.h
contentstorage/srvsrc/caprogressnotifier.cpp
contentstorage/srvsrc/casrv.cpp
contentstorage/srvsrc/castorageproxy.cpp
homescreensrv.pro
homescreensrv_plat/contentstorage_api/casoftwareregistry.h
homescreensrv_plat/taskswitcher_api/tspropertydefs.h
hsappkeyhandler/src/hsappkeyplugin.cpp
tsdevicedialog/common.pri
tsdevicedialog/tsdevicedialog.pro
tsdevicedialog/tsdevicedialogplugin/inc/tsdataroles.h
tsdevicedialog/tsdevicedialogplugin/resource/layout.docml
tsdevicedialog/tsdevicedialogplugin/src/tsactivitymodelitem.cpp
tsdevicedialog/tsdevicedialogplugin/src/tsdevicedialogcontainer.cpp
tsdevicedialog/tsdevicedialogplugin/src/tsdevicedialogplugin.cpp
tsdevicedialog/tsdevicedialogplugin/src/tsentrymodelitem.cpp
tsdevicedialog/tsdevicedialogplugin/src/tstasksgriditem.cpp
tstaskmonitor/backstepping/backstepping.pro
tstaskmonitor/backstepping/bwins/tsbacksteppingu.def
tstaskmonitor/backstepping/eabi/tsbacksteppingu.def
tstaskmonitor/backstepping/group/bld.inf
tstaskmonitor/backstepping/group/tsbackstepping.mmp
tstaskmonitor/backstepping/inc/tsbackstepping.h
tstaskmonitor/backstepping/inc/tsbacksteppingactivation.h
tstaskmonitor/backstepping/src/tsbackstepping.cpp
tstaskmonitor/backstepping/src/tsbacksteppingactivation.cpp
tstaskmonitor/client/client.pri
tstaskmonitor/client/client.pro
tstaskmonitor/client/inc/tstask.h
tstaskmonitor/client/inc/tstaskmonitor.h
tstaskmonitor/client/inc/tstaskmonitor_global.h
tstaskmonitor/client/s60/inc/tsapplicationtask.h
tstaskmonitor/client/s60/inc/tsscreenshotclient.h
tstaskmonitor/client/s60/inc/tsscreenshotclientimpl.h
tstaskmonitor/client/s60/inc/tssession.h
tstaskmonitor/client/s60/inc/tstaskmonitor_p.h
tstaskmonitor/client/s60/inc/tstaskmonitorclient.h
tstaskmonitor/client/s60/inc/tstaskmonitorclientimpl.h
tstaskmonitor/client/s60/inc/tstaskmonitorobserver.h
tstaskmonitor/client/s60/inc/tstasksettings_p.h
tstaskmonitor/client/s60/src/tsapplicationtask.cpp
tstaskmonitor/client/s60/src/tsscreenshotclient.cpp
tstaskmonitor/client/s60/src/tsscreenshotclientimpl.cpp
tstaskmonitor/client/s60/src/tssession.cpp
tstaskmonitor/client/s60/src/tstask.cpp
tstaskmonitor/client/s60/src/tstaskmonitor_p.cpp
tstaskmonitor/client/s60/src/tstaskmonitorclient.cpp
tstaskmonitor/client/s60/src/tstaskmonitorclientimpl.cpp
tstaskmonitor/client/s60/src/tstasksettings_p.cpp
tstaskmonitor/client/src/tstaskmonitor.cpp
tstaskmonitor/client/src/tstasksettings.cpp
tstaskmonitor/client/stub/inc/tsentry.h
tstaskmonitor/client/stub/inc/tstaskmonitor_p.h
tstaskmonitor/client/stub/inc/tstasksettings_p.h
tstaskmonitor/client/stub/src/tsentry.cpp
tstaskmonitor/client/stub/src/tstask.cpp
tstaskmonitor/client/stub/src/tstaskmonitor_p.cpp
tstaskmonitor/client/stub/src/tstasksettings_p.cpp
tstaskmonitor/inc/tstaskmonitorglobals.h
tstaskmonitor/rom.pri
tstaskmonitor/rom/tstaskmonitor_core.iby
tstaskmonitor/screenshotplugin/group/bld.inf
tstaskmonitor/screenshotplugin/group/tsscreenshotplugin.mmp
tstaskmonitor/screenshotplugin/inc/tsscreenshotplugin.h
tstaskmonitor/screenshotplugin/screenshotplugin.pro
tstaskmonitor/screenshotplugin/src/tsscreenshotmain.cpp
tstaskmonitor/screenshotplugin/src/tsscreenshotplugin.cpp
tstaskmonitor/screenshotplugin/src/tsscreenshotplugin.rss
tstaskmonitor/server/group/bld.inf
tstaskmonitor/server/group/hsrunningappmonitor.mmp
tstaskmonitor/server/inc/hsdataobservertask.h
tstaskmonitor/server/inc/hsdataprovider.h
tstaskmonitor/server/inc/hsdataprovidertask.h
tstaskmonitor/server/inc/hsrunningappserver.h
tstaskmonitor/server/inc/hsrunningappsession.h
tstaskmonitor/server/inc/tsdatalist.h
tstaskmonitor/server/inc/tsdatastorage.h
tstaskmonitor/server/inc/tsdatatask.h
tstaskmonitor/server/inc/tsrunningappstorage.h
tstaskmonitor/server/inc/tsscreenshotprovider.h
tstaskmonitor/server/server.pro
tstaskmonitor/server/src/hsdataobservertask.cpp
tstaskmonitor/server/src/hsdataprovidertask.cpp
tstaskmonitor/server/src/hsrunningappserver.cpp
tstaskmonitor/server/src/hsrunningappsession.cpp
tstaskmonitor/server/src/main.cpp
tstaskmonitor/server/src/tsdatalist.cpp
tstaskmonitor/server/src/tsdatatask.cpp
tstaskmonitor/server/src/tsrunningappstorage.cpp
tstaskmonitor/server/src/tsscreenshotprovider.cpp
tstaskmonitor/server/tsrc/tsrc.pro
tstaskmonitor/sis/stubs/createstubs.bat
tstaskmonitor/sis/stubs/taskmonitor_stub.pkg
tstaskmonitor/sis/stubs/taskmonitor_stub.sis
tstaskmonitor/sis/taskmonitor.pkg
tstaskmonitor/tstaskmonitor.pro
tstaskmonitor/utils/inc/tsdataobserver.h
tstaskmonitor/utils/inc/tsentry.h
tstaskmonitor/utils/inc/tsentrykey.h
tstaskmonitor/utils/inc/tsentrykeygenerator.h
tstaskmonitor/utils/inc/tsutils.h
tstaskmonitor/utils/src/tsentry.cpp
tstaskmonitor/utils/src/tsentrykey.cpp
tstaskmonitor/utils/src/tsentrykeygenerator.cpp
--- a/activityfw/activitydatabase/activitydatabase.pro	Tue Jun 29 10:20:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,20 +0,0 @@
-#
-# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description: 
-#
-
-TEMPLATE = subdirs
-
-SUBDIRS += hsactivitydbclient \
-           hsactivitydbserver
--- a/activityfw/activitydatabase/bwins/hsactivitydbclientu.def	Tue Jun 29 10:20:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,32 +0,0 @@
-EXPORTS
-	?launchActivity@HsActivityDbClient@@UAEHABV?$QHash@VQString@@VQVariant@@@@@Z @ 1 NONAME ; int HsActivityDbClient::launchActivity(class QHash<class QString, class QVariant> const &)
-	?connect@HsActivityDbClient@@QAEHXZ @ 2 NONAME ; int HsActivityDbClient::connect(void)
-	?asyncRequestCompleated@HsActivityDbClient@@UAEXHHABVQString@@@Z @ 3 NONAME ; void HsActivityDbClient::asyncRequestCompleated(int, int, class QString const &)
-	?trUtf8@HsActivityDbClient@@SA?AVQString@@PBD0@Z @ 4 NONAME ; class QString HsActivityDbClient::trUtf8(char const *, char const *)
-	?applicationActivities@HsActivityDbClient@@UAEHAAV?$QList@V?$QHash@VQString@@VQVariant@@@@@@ABV?$QHash@VQString@@VQVariant@@@@@Z @ 5 NONAME ; int HsActivityDbClient::applicationActivities(class QList<class QHash<class QString, class QVariant> > &, class QHash<class QString, class QVariant> const &)
-	?getThumbnail@HsActivityDbClient@@QAEHVQSize@@VQString@@1PAX@Z @ 6 NONAME ; int HsActivityDbClient::getThumbnail(class QSize, class QString, class QString, void *)
-	?dataChanged@HsActivityDbClient@@IAEXXZ @ 7 NONAME ; void HsActivityDbClient::dataChanged(void)
-	?qt_metacast@HsActivityDbClient@@UAEPAXPBD@Z @ 8 NONAME ; void * HsActivityDbClient::qt_metacast(char const *)
-	?qt_metacall@HsActivityDbClient@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 9 NONAME ; int HsActivityDbClient::qt_metacall(enum QMetaObject::Call, int, void * *)
-	?waitActivity@HsActivityDbClient@@UAEHABV?$QHash@VQString@@VQVariant@@@@@Z @ 10 NONAME ; int HsActivityDbClient::waitActivity(class QHash<class QString, class QVariant> const &)
-	?activities@HsActivityDbClient@@UAEHAAV?$QList@V?$QHash@VQString@@VQVariant@@@@@@@Z @ 11 NONAME ; int HsActivityDbClient::activities(class QList<class QHash<class QString, class QVariant> > &)
-	?notifyDataChange@HsActivityDbClient@@QAEHXZ @ 12 NONAME ; int HsActivityDbClient::notifyDataChange(void)
-	?trUtf8@HsActivityDbClient@@SA?AVQString@@PBD0H@Z @ 13 NONAME ; class QString HsActivityDbClient::trUtf8(char const *, char const *, int)
-	?asyncRequestCompleated@HsActivityDbClient@@UAEXHH@Z @ 14 NONAME ; void HsActivityDbClient::asyncRequestCompleated(int, int)
-	??0HsActivityDbClient@@QAE@PAVQObject@@@Z @ 15 NONAME ; HsActivityDbClient::HsActivityDbClient(class QObject *)
-	?tr@HsActivityDbClient@@SA?AVQString@@PBD0@Z @ 16 NONAME ; class QString HsActivityDbClient::tr(char const *, char const *)
-	?getStaticMetaObject@HsActivityDbClient@@SAABUQMetaObject@@XZ @ 17 NONAME ; struct QMetaObject const & HsActivityDbClient::getStaticMetaObject(void)
-	??_EHsActivityDbClient@@UAE@I@Z @ 18 NONAME ; HsActivityDbClient::~HsActivityDbClient(unsigned int)
-	?removeApplicationActivities@HsActivityDbClient@@UAEHABV?$QHash@VQString@@VQVariant@@@@@Z @ 19 NONAME ; int HsActivityDbClient::removeApplicationActivities(class QHash<class QString, class QVariant> const &)
-	?metaObject@HsActivityDbClient@@UBEPBUQMetaObject@@XZ @ 20 NONAME ; struct QMetaObject const * HsActivityDbClient::metaObject(void) const
-	?tr@HsActivityDbClient@@SA?AVQString@@PBD0H@Z @ 21 NONAME ; class QString HsActivityDbClient::tr(char const *, char const *, int)
-	?addActivity@HsActivityDbClient@@UAEHABV?$QHash@VQString@@VQVariant@@@@0@Z @ 22 NONAME ; int HsActivityDbClient::addActivity(class QHash<class QString, class QVariant> const &, class QHash<class QString, class QVariant> const &)
-	?asyncRequestCompleated@HsActivityDbClient@@UAEXHHABVQPixmap@@PAX@Z @ 23 NONAME ; void HsActivityDbClient::asyncRequestCompleated(int, int, class QPixmap const &, void *)
-	?staticMetaObject@HsActivityDbClient@@2UQMetaObject@@B @ 24 NONAME ; struct QMetaObject const HsActivityDbClient::staticMetaObject
-	?updateActivity@HsActivityDbClient@@UAEHABV?$QHash@VQString@@VQVariant@@@@0@Z @ 25 NONAME ; int HsActivityDbClient::updateActivity(class QHash<class QString, class QVariant> const &, class QHash<class QString, class QVariant> const &)
-	??1HsActivityDbClient@@UAE@XZ @ 26 NONAME ; HsActivityDbClient::~HsActivityDbClient(void)
-	?thumbnailRequested@HsActivityDbClient@@IAEXVQPixmap@@PAX@Z @ 27 NONAME ; void HsActivityDbClient::thumbnailRequested(class QPixmap, void *)
-	?activityRequested@HsActivityDbClient@@IAEXABVQString@@@Z @ 28 NONAME ; void HsActivityDbClient::activityRequested(class QString const &)
-	?removeActivity@HsActivityDbClient@@UAEHABV?$QHash@VQString@@VQVariant@@@@@Z @ 29 NONAME ; int HsActivityDbClient::removeActivity(class QHash<class QString, class QVariant> const &)
-	?activityData@HsActivityDbClient@@UAEHAAVQVariant@@ABV?$QHash@VQString@@VQVariant@@@@@Z @ 30 NONAME ; int HsActivityDbClient::activityData(class QVariant &, class QHash<class QString, class QVariant> const &)
-
--- a/activityfw/activitydatabase/eabi/hsactivitydbclientu.def	Tue Jun 29 10:20:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,44 +0,0 @@
-EXPORTS
-	_ZN18HsActivityDbClient10activitiesER5QListI5QHashI7QString8QVariantEE @ 1 NONAME
-	_ZN18HsActivityDbClient11addActivityERK5QHashI7QString8QVariantES5_ @ 2 NONAME
-	_ZN18HsActivityDbClient11dataChangedEv @ 3 NONAME
-	_ZN18HsActivityDbClient11qt_metacallEN11QMetaObject4CallEiPPv @ 4 NONAME
-	_ZN18HsActivityDbClient11qt_metacastEPKc @ 5 NONAME
-	_ZN18HsActivityDbClient12getThumbnailE5QSize7QStringS1_Pv @ 6 NONAME
-	_ZN18HsActivityDbClient12waitActivityERK5QHashI7QString8QVariantE @ 7 NONAME
-	_ZN18HsActivityDbClient14launchActivityERK5QHashI7QString8QVariantE @ 8 NONAME
-	_ZN18HsActivityDbClient14removeActivityERK5QHashI7QString8QVariantE @ 9 NONAME
-	_ZN18HsActivityDbClient14updateActivityERK5QHashI7QString8QVariantES5_ @ 10 NONAME
-	_ZN18HsActivityDbClient16notifyDataChangeEv @ 11 NONAME
-	_ZN18HsActivityDbClient16staticMetaObjectE @ 12 NONAME DATA 16
-	_ZN18HsActivityDbClient17activityRequestedERK7QString @ 13 NONAME
-	_ZN18HsActivityDbClient18thumbnailRequestedE7QPixmapPv @ 14 NONAME
-	_ZN18HsActivityDbClient19getStaticMetaObjectEv @ 15 NONAME
-	_ZN18HsActivityDbClient21applicationActivitiesER5QListI5QHashI7QString8QVariantEERKS4_ @ 16 NONAME
-	_ZN18HsActivityDbClient22asyncRequestCompleatedEii @ 17 NONAME
-	_ZN18HsActivityDbClient22asyncRequestCompleatedEiiRK7QPixmapPv @ 18 NONAME
-	_ZN18HsActivityDbClient22asyncRequestCompleatedEiiRK7QString @ 19 NONAME
-	_ZN18HsActivityDbClient27removeApplicationActivitiesERK5QHashI7QString8QVariantE @ 20 NONAME
-	_ZN18HsActivityDbClient7connectEv @ 21 NONAME
-	_ZN18HsActivityDbClientC1EP7QObject @ 22 NONAME
-	_ZN18HsActivityDbClientC2EP7QObject @ 23 NONAME
-	_ZN18HsActivityDbClientD0Ev @ 24 NONAME
-	_ZN18HsActivityDbClientD1Ev @ 25 NONAME
-	_ZN18HsActivityDbClientD2Ev @ 26 NONAME
-	_ZNK18HsActivityDbClient10metaObjectEv @ 27 NONAME
-	_ZTI18HsActivityDbClient @ 28 NONAME
-	_ZTV18HsActivityDbClient @ 29 NONAME
-	_ZThn12_N18HsActivityDbClient22asyncRequestCompleatedEii @ 30 NONAME
-	_ZThn12_N18HsActivityDbClient22asyncRequestCompleatedEiiRK7QPixmapPv @ 31 NONAME
-	_ZThn12_N18HsActivityDbClient22asyncRequestCompleatedEiiRK7QString @ 32 NONAME
-	_ZThn8_N18HsActivityDbClient10activitiesER5QListI5QHashI7QString8QVariantEE @ 33 NONAME
-	_ZThn8_N18HsActivityDbClient11addActivityERK5QHashI7QString8QVariantES5_ @ 34 NONAME
-	_ZThn8_N18HsActivityDbClient12waitActivityERK5QHashI7QString8QVariantE @ 35 NONAME
-	_ZThn8_N18HsActivityDbClient14launchActivityERK5QHashI7QString8QVariantE @ 36 NONAME
-	_ZThn8_N18HsActivityDbClient14removeActivityERK5QHashI7QString8QVariantE @ 37 NONAME
-	_ZThn8_N18HsActivityDbClient14updateActivityERK5QHashI7QString8QVariantES5_ @ 38 NONAME
-	_ZThn8_N18HsActivityDbClient21applicationActivitiesER5QListI5QHashI7QString8QVariantEERKS4_ @ 39 NONAME
-	_ZThn8_N18HsActivityDbClient27removeApplicationActivitiesERK5QHashI7QString8QVariantE @ 40 NONAME
-	_ZN18HsActivityDbClient12activityDataER8QVariantRK5QHashI7QStringS0_E @ 41 NONAME
-	_ZThn8_N18HsActivityDbClient12activityDataER8QVariantRK5QHashI7QStringS0_E @ 42 NONAME
-
--- a/activityfw/activitydatabase/hsactivitydbclient/hsactivitydbclient.pro	Tue Jun 29 10:20:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,60 +0,0 @@
-#
-# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description: 
-#
-
-TEMPLATE = lib
-TARGET = hsactivitydbclient
-
-QT        += core \
-             sql
-
-HEADERS   += inc/hsactivitydbclient.h
-
-SOURCES   += src/hsactivitydbclient.cpp
-
-DEFINES += ACTIVITY_LIB
-
-symbian{
-TARGET.UID3 = 0xE467C21E
-
-HEADERS   += ../s60/inc/afentry.h \
-             ../s60/inc/hsserializer.h \
-             s60/inc/hsactivitydbclient_p.h \
-			 s60/inc/hsactivitydbasyncrequest_p.h
-
-SOURCES   += ../s60/src/afentry.cpp \
-             ../s60/src/hsserializer.cpp \
-             s60/src/hsactivitydbclient_p.cpp \
-			 s60/src/hsactivitydbasyncrequest_p.cpp
-
-LIBS      += -lxqutils \
-             -lestor \
-             -lfbscli
-
-
-hsactivitydbclientdll.sources = hsactivitydbclient.dll
-hsactivitydbclientdll.path = $$SHARED_LIB_DIR
-DEPLOYMENT += hsactivitydbclientdll
-
-BLD_INF_RULES.prj_exports += "../inc/hsactivitydbclientinterface.h /epoc32/include/hsactivitydbclientinterface.h" \
-                             "../inc/activitycmd.h /epoc32/include/activitycmd.h" \
-                             "inc/hsactivitydbclient.h /epoc32/include/hsactivitydbclient.h" \
-							 "inc/hsactivitydbasyncrequestobserver.h /epoc32/include/hsactivitydbasyncrequestobserver.h"
-DEPLOYMENT += api
-TARGET.CAPABILITY = ALL -TCB
-TARGET.EPOCALLOWDLLDATA = 1
-TARGET.UID3 = 0x200267B3
-MMP_RULES += EXPORTUNFROZEN
-}
--- a/activityfw/activitydatabase/hsactivitydbclient/inc/hsactivitydbasyncrequestobserver.h	Tue Jun 29 10:20:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,55 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-#ifndef HSACTIVITYDBASYNCREQUESTOBSERVER_H
-#define HSACTIVITYDBASYNCREQUESTOBSERVER_H
-#include <QString>
-#include <QPixmap>
-
-class HsActivityDbAsyncRequestObserver
-{
-public:
-    /**
-     * Function inform observer about asynchronous request results
-     * @param result - request result
-     * @param requestType - request type
-     * @param data - respons data
-     */
-    virtual void asyncRequestCompleated(int result,
-                                        int requestType,
-                                        const QString &data)=0;
-
-    /**
-     * Function inform observer about asynchronous request results
-     * @param result - request result
-     * @param requestType - request type
-     * @param pixmap - pixmap respons
-     */
-    virtual void asyncRequestCompleated(int result,
-                                        int requestType,
-                                        const QPixmap& pixmap, 
-                                        void* userData)=0;
-    
-    /**
-     * Function inform observer about asynchronous request results
-     * @param result - request result
-     * @param requestType - request type
-     */
-    virtual void asyncRequestCompleated(int result,
-                                        int requestType)=0;
-};
-#endif // HSACTIVITYDBASYNCREQUESTOBSERVER_H
--- a/activityfw/activitydatabase/hsactivitydbclient/inc/hsactivitydbclient.h	Tue Jun 29 10:20:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,156 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-#ifndef HSACTIVITYDBCLIENT_H
-#define HSACTIVITYDBCLIENT_H
-#include <QObject>
-#include <hsactivitydbasyncrequestobserver.h>
-#include "hsactivitydbclientinterface.h"
-
-#ifdef ACTIVITY_LIB
-    #define ACTIVITY_EXPORT Q_DECL_EXPORT
-#else
-    #define ACTIVITY_EXPORT Q_DECL_IMPORT
-#endif
-
-class HsActivityDbClientPrivate;
-
-/**
- * Class implemets HsActivityDbClientInterface and is responsible for activity data management.
- */
-class ACTIVITY_EXPORT HsActivityDbClient:   public QObject,
-                                            public HsActivityDbClientInterface,
-                                            public HsActivityDbAsyncRequestObserver
-{
-    Q_OBJECT
-public:
-    /**
-     * Constructor
-     */
-    HsActivityDbClient(QObject* =0);
-
-    /**
-     * Destructor
-     */
-    ~HsActivityDbClient();
-
-    /**
-     * Establish connection with activity server
-     * @return 0 on succees, error code otherwise
-     */
-    int connect();
-
-    /**
-     * Interface implementation.
-     * @see int HsActivityDbAsyncRequestObserver::asyncRequestCompleated(int, int, const QString&)
-     */
-    void asyncRequestCompleated(int, int, const QString &);
-
-    /**
-     * Interface implementation.
-     * @see int HsActivityDbAsyncRequestObserver::asyncRequestCompleated(int, int, QPixmap&)
-     */
-    void asyncRequestCompleated(int, int, const QPixmap&, void*);
-    
-
-    /**
-     * Interface implementation.
-     * @see int HsActivityDbAsyncRequestObserver::asyncRequestCompleated(int, int)
-     */
-    void asyncRequestCompleated(int result,
-                                int requestType);
-
-    int addActivity(const QVariantHash &, const QVariantHash &);
-
-    int updateActivity(const QVariantHash &, const QVariantHash &);
-
-    /**
-     * Interface implementation.
-     * @see int HsActivityDbClientInterface::deleteActivity(const QVariantHash &)
-     */
-    int removeActivity(const QVariantHash &activity);
-
-    /**
-     * Interface implementation.
-     * @see int HsActivityDbClientInterface::deleteApplicationActivities(const QVariantHash &)
-     */
-    int removeApplicationActivities(const QVariantHash &activity);
-
-    /**
-     * Interface implementation.
-     * @see int HsActivityDbClientInterface::activities(QList<QVariantHash>&)
-     */
-    int activities(QList<QVariantHash> &);
-
-    /**
-     * Interface implementation.
-     * @see int HsActivityDbClientInterface::applicationActivities(QList<QVariantHash> &, const QVariantHash &)
-     */
-    int applicationActivities(QList<QVariantHash> &,
-                              const QVariantHash &);
-
-    /**
-     * Interface implementation.
-     * @see int HsActivityDbClientInterface::activityData(QVariant &, const QVariantHash &)
-     */
-    int activityData(QVariant &result, const QVariantHash &activity);
-                              
-    /**
-     * Interface implementation.
-     * @see int HsActivityDbClientInterface::waitActivity(const QVariantHash &)
-     */
-    int waitActivity(const QVariantHash &activity);
-    
-    /**
-     * Interface implementation.
-     * @see int HsActivityDbClientInterface::launchActivity(const QVariantHash &)
-     */
-    int launchActivity(const QVariantHash &);
-    
-    /**
-     */
-    //getThumbnail(resolution, thumbnailPath, "image/png", data)
-    int getThumbnail(QSize size, QString imagePath, QString mimeType, void* userDdata);
-    
-    int notifyDataChange();
-
-signals:
-    /**
-     * Function notify about runtime activity change
-     * @param activityId - requested activity name
-     */
-    void activityRequested(const QString &activityId);
-
-    /**
-     * Function notify about runtime activity change
-     * @param thumbnailPixmap - requested thumbnail
-     */
-    void thumbnailRequested(QPixmap thumbnailPixmap, void *userData);
-    
-    void dataChanged();
-    
-private:
-    /**
-     * Private client implementation.
-     * Own.
-     */
-    HsActivityDbClientPrivate *d_ptr;
-    
-    friend class HsActivityDbClientPrivate;
-};
-
-#endif //HSACTIVITYDBCLIENT_H
--- a/activityfw/activitydatabase/hsactivitydbclient/s60/inc/hsactivitydbasyncrequest_p.h	Tue Jun 29 10:20:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,114 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-#ifndef HSACTIVITYDBASYNCREQUESTPRIVATE_H
-#define HSACTIVITYDBASYNCREQUESTPRIVATE_H
-#include <e32base.h>
-#include <QVariant>
-#include <QPixmap>
-#include <hsactivitydbasyncrequestobserver.h>
-#include <activitycmd.h>
-
-class HsActivityDbClientPrivate;
-
-/**
- * Class is responsible for async. request handling
- */
-class HsActivityDbAsyncRequestPrivate : public CActive
-
-{
-public:
-    
-    enum TAsyncRequest{
-        EWaitActivity = WaitActivity,
-        EWaitGetThumbnail = GetThumbnail,
-        ENotifyDataChange = NotifyChange
-    };
-    
-private:
-    static HsActivityDbAsyncRequestPrivate*
-    NewLC(HsActivityDbAsyncRequestObserver &, 
-          HsActivityDbClientPrivate &,
-          TAsyncRequest,
-          void* userData = 0);
-    
-public:
-    
-    static void waitActivityLD(HsActivityDbAsyncRequestObserver &, 
-                               HsActivityDbClientPrivate &,
-                               const QVariantHash &);
-    
-    static void notifyDataChangeLD(HsActivityDbAsyncRequestObserver &, 
-                                   HsActivityDbClientPrivate &);
-    
-    static void getThumbnailLD(HsActivityDbAsyncRequestObserver &,
-                               HsActivityDbClientPrivate &, 
-                               QSize, 
-                               const QString&, 
-                               const QString&, 
-                               void *);
-    
-
-    /**
-     * Destructor
-     */
-    ~HsActivityDbAsyncRequestPrivate();
-
-private:
-    /**
-     * Function create subscription to current ativity changes
-     * @param condition - activity filetering rules
-     */
-    void waitActivity(const QVariantHash &condition);
-    
-    /**
-     */
-    void getThumbnail(QSize size, QString imagePath, QString  mimeType);
-    
-    void notifyDataChange();
-protected:
-    /**
-     * Interface implementation.
-     * @see void CActive::DoCancel()
-     */
-    void DoCancel();
-
-    /**
-     * Interface implementation.
-     * @see void CActive::DoCancel()
-     */
-    void RunL();
-private:
-    /**
-     * Constructor
-     */
-    HsActivityDbAsyncRequestPrivate(HsActivityDbAsyncRequestObserver &, 
-                                    HsActivityDbClientPrivate &,
-                                    TAsyncRequest,
-                                    void* userData);
-private:
-    HsActivityDbAsyncRequestObserver &mObserver;
-    HsActivityDbClientPrivate &mSession;
-    const TAsyncRequest mRequestType;
-    TPckgBuf<int> mTaskId;
-    TPckgBuf<int> mDataSize;
-    TPckgBuf<int> mBitmapId;
-    HBufC* mBitmapPath;
-    HBufC8* mBitmapMimeType;
-    RBuf8 mDataBuf;
-    void *const mUserData;
-};
-#endif // HSACTIVITYDBCLIENTPRIVATE_H
--- a/activityfw/activitydatabase/hsactivitydbclient/s60/inc/hsactivitydbclient_p.h	Tue Jun 29 10:20:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,108 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-#ifndef HSACTIVITYDBCLIENTPRIVATE_H
-#define HSACTIVITYDBCLIENTPRIVATE_H
-#include "hsactivitydbclientinterface.h"
-#include <e32base.h>
-#include <hsactivitydbasyncrequestobserver.h>
-
-class HsActivityDbAsyncRequestPrivate;
-/**
- * Class implemets HsActivityDbClientInterface and is responsible for
- * activity data management on S60 enviroment.
- */
-class HsActivityDbClientPrivate : protected RSessionBase,
-                                  public HsActivityDbClientInterface
-{
-public:
-    HsActivityDbClientPrivate(HsActivityDbAsyncRequestObserver &);
-
-    ~HsActivityDbClientPrivate();
-
-    int connect();
-
-    int addActivity(const QVariantHash &privateData, 
-                    const QVariantHash &publicData);
-
-    int updateActivity(const QVariantHash &privateData, 
-                       const QVariantHash &publicData);
-
-    int removeActivity(const QVariantHash &activity);
-
-    int removeApplicationActivities(const QVariantHash &activity);
-
-    int activities(QList<QVariantHash> &);
-
-    int applicationActivities(QList<QVariantHash>&, const QVariantHash &);
-
-    int activityData(QVariant &result, const QVariantHash &activity);
-    
-    int waitActivity(const QVariantHash &activity);
-    
-    int getThumbnail(QSize size, QString imagePath, QString  mimeType, void *userDdata);
-    
-    int notifyDataChange();
-
-    int launchActivity(const QVariantHash &);
-
-    int cancelWaitActivity();
-
-    int cancelNotifyDataChange();
-
-public:
-    void getData(int taskId, RBuf8 &dst);
-
-    void sendDataAsync(int func,const TIpcArgs &data, TRequestStatus &status);
-
-public:
-    void PushL(HsActivityDbAsyncRequestPrivate * task);
-
-    void Pop(HsActivityDbAsyncRequestPrivate *task);
-
-private:
-    void startServerL();
-
-    void connectL();
-
-    void execSimpleRequestL(int function, 
-                            const QVariantHash &privateData, 
-                            const QVariantHash &publicData);
-
-
-    void activitiesL(QList<QVariantHash>& result);
-
-    void applicationActivitiesL(QList<QVariantHash>& result,
-                                const QVariantHash &cond);
-
-    void activityDataL(QVariant &result, const QVariantHash &activity);
-
-    void launchActivityL(const QVariantHash &activity);
-
-    void getThumbnailL(QSize size, QString imagePath, QString  mimeType, void *userDdata);
-
-    int checkDataConstraint(int func, const QVariantHash &data);
-
-    int execute(int func, const QVariantHash &privateData, const QVariantHash &publicData);
-
-    int execute(int func, QList<QVariantHash>&dst, const QVariantHash &src);
-
-private:
-    RPointerArray<HsActivityDbAsyncRequestPrivate> mAsyncTasks;
-    HsActivityDbAsyncRequestObserver& mObserver;
-};
-#endif // HSACTIVITYDBCLIENTPRIVATE_H
--- a/activityfw/activitydatabase/hsactivitydbclient/s60/src/hsactivitydbasyncrequest_p.cpp	Tue Jun 29 10:20:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,225 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-#include "hsactivitydbasyncrequest_p.h"
-#include "hsactivitydbclient_p.h"
-#include "hsactivitydbclient.h"
-#include <fbs.h>
-#include <XQConversions>
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-HsActivityDbAsyncRequestPrivate*
-HsActivityDbAsyncRequestPrivate::NewLC(HsActivityDbAsyncRequestObserver &observer,
-                                      HsActivityDbClientPrivate &session, 
-                                      TAsyncRequest requestType,
-                                      void* userData)
-{
-    HsActivityDbAsyncRequestPrivate *self = 
-    new(ELeave)HsActivityDbAsyncRequestPrivate(observer, session, requestType, userData);
-    CleanupStack::PushL(self);
-    self->mDataBuf.CreateL(64);
-    return self;
-}
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void HsActivityDbAsyncRequestPrivate::waitActivityLD(
-                                HsActivityDbAsyncRequestObserver & observer, 
-                                HsActivityDbClientPrivate & session, 
-                                const QVariantHash &activity)
-{
-    HsActivityDbAsyncRequestPrivate *self =
-        HsActivityDbAsyncRequestPrivate::NewLC(observer, 
-                                               session, 
-                                               EWaitActivity);
-    self->mSession.PushL(self);
-    CleanupStack::Pop(self);
-    self->waitActivity(activity);
-}
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void HsActivityDbAsyncRequestPrivate::notifyDataChangeLD(
-                                   HsActivityDbAsyncRequestObserver &observer, 
-                                   HsActivityDbClientPrivate &session)
-{
-    HsActivityDbAsyncRequestPrivate *self = 
-        HsActivityDbAsyncRequestPrivate::NewLC(observer, 
-                                              session,
-                                              ENotifyDataChange);
-    self->mSession.PushL(self);
-    CleanupStack::Pop(self);
-    self->notifyDataChange();
-}
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void HsActivityDbAsyncRequestPrivate::getThumbnailLD(HsActivityDbAsyncRequestObserver &observer,
-                                      HsActivityDbClientPrivate &session, 
-                                      QSize size, 
-                                      const QString &imagePath, 
-                                      const QString &mimeType, 
-                                      void *userDdata)
-{
-    HsActivityDbAsyncRequestPrivate *instance = 
-        HsActivityDbAsyncRequestPrivate::NewLC(observer, session, EWaitGetThumbnail, userDdata);
-    session.PushL(instance);
-    CleanupStack::Pop(instance);
-    instance->getThumbnail( size, imagePath, mimeType);
-}
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-HsActivityDbAsyncRequestPrivate::HsActivityDbAsyncRequestPrivate(HsActivityDbAsyncRequestObserver &observer,
-                                                                 HsActivityDbClientPrivate &session,
-                                                                 TAsyncRequest requestType, 
-                                                                 void* userData)
-    :
-    CActive(EPriorityStandard),
-    mObserver(observer),
-    mSession(session),
-    mRequestType(requestType),
-    mUserData(userData)
-{
-    CActiveScheduler::Add(this);
-}
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-HsActivityDbAsyncRequestPrivate::~HsActivityDbAsyncRequestPrivate()
-{
-    mDataBuf.Close();
-    Cancel();
-    delete mBitmapPath;
-    delete mBitmapMimeType;
-}
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void HsActivityDbAsyncRequestPrivate::DoCancel()
-{
-    if (IsActive()) {
-        switch (mRequestType) {
-        case EWaitActivity: mSession.cancelWaitActivity(); break;
-        case ENotifyDataChange: mSession.cancelNotifyDataChange(); break;
-        };
-    }
-}
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void HsActivityDbAsyncRequestPrivate::RunL()
-{
-    switch (mRequestType) {
-    case WaitActivity: {
-        QString data;
-        if (KErrNone == iStatus.Int()) {
-            RBuf8 buff;
-            CleanupClosePushL(buff);
-            if (0 < mDataSize()) {
-                buff.CreateL(mDataSize());
-            }
-            mSession.getData(mTaskId(), buff);
-            data = QString::fromAscii(reinterpret_cast<const char *>(buff.Ptr()),
-                                      buff.Length());
-            CleanupStack::PopAndDestroy(&buff);
-        }
-        mObserver.asyncRequestCompleated(iStatus.Int(), mRequestType, data);
-        mSession.Pop(this);
-        delete this;
-        break;
-        }
-    case EWaitGetThumbnail: {
-        QPixmap pixmap;
-        if (KErrNone == iStatus.Int()) {
-            CFbsBitmap* bitmap = new (ELeave) CFbsBitmap;
-            CleanupStack::PushL(bitmap);
-            User::LeaveIfError(bitmap->Duplicate(mBitmapId()));
-            mSession.getData(mTaskId(), mDataBuf);//ACK Bitmap copy
-            pixmap = QPixmap::fromSymbianCFbsBitmap(bitmap);
-            CleanupStack::PopAndDestroy(bitmap);
-        }
-        mObserver.asyncRequestCompleated(iStatus.Int(), mRequestType, pixmap, mUserData);
-        mSession.Pop(this);
-        delete this;
-        break;
-        }
-    case ENotifyDataChange: {
-        mObserver.asyncRequestCompleated(iStatus.Int(),mRequestType);
-        mSession.Pop(this);
-        delete this;
-        }
-    }
-}
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void HsActivityDbAsyncRequestPrivate::waitActivity(const QVariantHash &condition)
-{
-    iStatus = KRequestPending;
-    SetActive();
-    mDataSize = condition.find(ActivityApplicationKeyword).value().toInt();
-    TPtrC8 actId(KNullDesC8);
-    TPtrC8 desc(KNullDesC8);
-    mSession.sendDataAsync(mRequestType, TIpcArgs(&mDataSize, &actId, &desc, &mTaskId), iStatus);
-}
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void HsActivityDbAsyncRequestPrivate::getThumbnail(QSize size, QString imagePath, QString  mimeType)
-{
-    iStatus = KRequestPending;
-    SetActive();
-    mBitmapId = size.width();
-    mTaskId = size.height();
-    mBitmapPath = XQConversions::qStringToS60Desc(imagePath);
-    mBitmapMimeType = XQConversions::qStringToS60Desc8(mimeType);
-    mSession.sendDataAsync(mRequestType, TIpcArgs(&mBitmapId, &mTaskId, mBitmapPath, mBitmapMimeType), iStatus);
-}
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void HsActivityDbAsyncRequestPrivate::notifyDataChange()
-{
-    iStatus = KRequestPending;
-    SetActive();
-    mSession.sendDataAsync(ENotifyDataChange, TIpcArgs(), iStatus);
-}
--- a/activityfw/activitydatabase/hsactivitydbclient/s60/src/hsactivitydbclient_p.cpp	Tue Jun 29 10:20:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,643 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-#include <fbs.h>
-#include <s32mem.h>
-
-#include <qvariant.h>
-#include <XQConversions>
-
-#include "hsactivitydbclient_p.h"
-#include "hsactivitydbasyncrequest_p.h"
-#include "hsactivityglobals.h"
-#include "hsserializer.h"
-#include "afentry.h"
-
-
-
-// -----------------------------------------------------------------------------
-/**
- * Constructor
- */
-HsActivityDbClientPrivate::HsActivityDbClientPrivate(HsActivityDbAsyncRequestObserver &observer):
-    mObserver(observer)
-{
-
-}
-
-// -----------------------------------------------------------------------------
-/**
- * Destructor
- */
-HsActivityDbClientPrivate::~HsActivityDbClientPrivate()
-{
-    mAsyncTasks.ResetAndDestroy();
-    Close();
-}
-
-// -----------------------------------------------------------------------------
-/**
- * Function establish connection to activity server
- * @return 0 on succees, error code otherwise
- */
-int HsActivityDbClientPrivate::connect()
-{
-    TRAPD(errNo, connectL());
-    return errNo;
-}
-
-// -----------------------------------------------------------------------------
-/**
- * Interface implementation.
- * @see int HsActivityDbClientInterface::addActivity(const QVariantHash &)
- */
-int HsActivityDbClientPrivate::addActivity(const QVariantHash &privateData,
-                                           const QVariantHash &publicData)
-{
-    return execute(AddActivity, privateData, publicData);
-    
-}
-
-// -----------------------------------------------------------------------------
-/**
- * Interface implementation.
- * @see int HsActivityDbClientInterface::updateActivity(const QVariantHash &)
- */
-int HsActivityDbClientPrivate::updateActivity(const QVariantHash &privateData,
-                                              const QVariantHash &publicData)
-{
-    return execute(UpdateActivity, privateData, publicData);
-}
-
-// -----------------------------------------------------------------------------
-/**
- * Interface implementation.
- * @see int HsActivityDbClientInterface::removeActivity(const QVariantHash &)
- */
-int HsActivityDbClientPrivate::removeActivity(const QVariantHash &activity)
-{
-    return execute(RemoveActivity, QVariantHash(), activity);
-}
-
-// -----------------------------------------------------------------------------
-/**
- * Interface implementation.
- * @see int HsActivityDbClientInterface::removeApplicationActivities(const QVariantHash &)
-*/
-
-int HsActivityDbClientPrivate::removeApplicationActivities(const QVariantHash &activity)
-{
-    return execute(RemoveApplicationActivities, QVariantHash(), activity);
-}
-
-// -----------------------------------------------------------------------------
-/**
- * Interface implementation.
- * @see int HsActivityDbClientInterface::activities(QList<QVariantHash> &);
- */
-int HsActivityDbClientPrivate::activities(QList<QVariantHash>& result)
-{
-    return execute(Activities, result, QVariantHash());
-}
-
-// -----------------------------------------------------------------------------
-/**
- * Interface implementation.
- * @see int HsActivityDbClientInterface::applicationActivities(QList<QVariantHash> &, const QVariantHash &)
- */
-int HsActivityDbClientPrivate::applicationActivities(QList<QVariantHash>& result,
-        const QVariantHash &condition)
-{
-    return execute(ApplicationActivities, result, condition);
-}
-
-// -----------------------------------------------------------------------------
-/**
- * Interface implementation.
- * @see int HsActivityDbClientInterface::activityData(QVariant &, const QVariantHash &)
- */
-int HsActivityDbClientPrivate::activityData(QVariant &result, const QVariantHash &activity)
-{
-    TRAPD(errNo,
-    User::LeaveIfError(checkDataConstraint(ApplicationActivity, activity));
-    activityDataL(result, activity);)
-    return errNo;
-}
-
-// -----------------------------------------------------------------------------
-/**
- * Interface implementation.
- * @see int HsActivityDbClientInterface::waitActivity(const QVariantHash &)
- */
-int HsActivityDbClientPrivate::waitActivity(const QVariantHash &activity)
-{
-    return execute(WaitActivity, QVariantHash(), activity);
-}
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-int HsActivityDbClientPrivate::getThumbnail(QSize size, QString imagePath, QString  mimeType, void *userDdata)
-{
-    TRAPD(errNo, getThumbnailL(size, imagePath, mimeType, userDdata);)
-    return errNo;
-}
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-int HsActivityDbClientPrivate::notifyDataChange()
-{
-    return execute(NotifyChange, QVariantHash(), QVariantHash());
-}
-
-// -----------------------------------------------------------------------------
-/**
- * Interface implementation.
- * @see int HsActivityDbClientInterface::launchActivity(const QVariantHash &)
- */
-int HsActivityDbClientPrivate::launchActivity(const QVariantHash &activity)
-{
-    return execute(LaunchActivity, QVariantHash(), activity);
-}
-
-// -----------------------------------------------------------------------------
-/**
- * Interface implementation.
- * @see int HsActivityDbClientInterface::cancelWaitActivity()
- */
-int HsActivityDbClientPrivate::cancelWaitActivity()
-{
-    return SendReceive(CancelWait, TIpcArgs());
-}
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-int HsActivityDbClientPrivate::cancelNotifyDataChange()
-{
-    return SendReceive(CancelNotify, TIpcArgs());
-}
-
-// -----------------------------------------------------------------------------
-/**
- * Function start activity server process.
- * Function can leave on failure.
- */
-void HsActivityDbClientPrivate::startServerL()
-{
-    RProcess server;
-    const TUidType uid(KNullUid, KNullUid, KActivityServerUid);
-    User::LeaveIfError(server.Create(KActivityServerName, KNullDesC, uid));
-    TRequestStatus stat;
-    server.Rendezvous(stat);
-    if (stat != KRequestPending) {
-        server.Kill(0);
-    } else {
-        server.Resume();
-    }
-    User::WaitForRequest(stat);
-    int errNo = (EExitPanic == server.ExitType()) ?
-                KErrGeneral : stat.Int();
-    if (KErrCancel == errNo) {
-        errNo = KErrNone;
-    }
-    server.Close();
-    User::LeaveIfError(errNo);
-}
-
-// -----------------------------------------------------------------------------
-/**
- * Function establish connection to activity server.
- * Function can leave on failure
- */
-void HsActivityDbClientPrivate::connectL()
-{
-    const int asyncMessageSlots(12);
-    const int maxRetry(4);
-
-    TInt retry = maxRetry;
-    TInt errNo(KErrNone);
-    do {
-        errNo = CreateSession(KActivityServerName, TVersion(0, 0, 0), asyncMessageSlots);
-        if (KErrNotFound != errNo && KErrServerTerminated != errNo) {
-            retry =0;
-        } else {
-            TRAP(errNo, startServerL());
-            if (KErrNone != errNo && KErrAlreadyExists != errNo) {
-                retry =0;
-                errNo = CreateSession(KActivityServerName, TVersion(0, 0, 0), asyncMessageSlots);
-            }
-        }
-    } while (--retry > 0);
-    User::LeaveIfError(errNo);
-}
-
-// -----------------------------------------------------------------------------
-/**
- * Function execute remote call request.
- * @param function - remote function identyfier
- * @param activity - remote function parameters
- */
-void HsActivityDbClientPrivate::execSimpleRequestL(int function,
-                                                   const QVariantHash &privateData,
-                                                   const QVariantHash &publicData)
-{
-
-    TPckgBuf<TInt> bitmapHdl(0);
-    int flags(0);
-    if(publicData.end() != publicData.find(ActivityPersistence) &&
-       publicData[ActivityPersistence].toBool()) {
-        flags |= CAfEntry::Persistent;
-    }
-    if(publicData.end() != publicData.find(ActivityVisibility) &&
-       !publicData[ActivityVisibility].toBool()) {
-        flags |= CAfEntry::Invisible;
-    }
-    CFbsBitmap* bitmap(0);
-    if (publicData.end() != publicData.find(ActivityScreenshotKeyword)) {
-        bitmap = publicData[ActivityScreenshotKeyword].value<QPixmap>().toSymbianCFbsBitmap();
-        if (bitmap) {
-            CleanupStack::PushL(bitmap);
-            bitmapHdl = bitmap->Handle();
-        }
-        
-        
-    }
-
-    RBuf8 prvBuffer, pubBuffer, data;
-    CleanupClosePushL(data);
-    CleanupClosePushL(prvBuffer);
-    CleanupClosePushL(pubBuffer);
-
-    prvBuffer << privateData;
-    if (publicData.end() != publicData.find(ActivityScreenshotKeyword)) {
-        QVariantHash localData(publicData);
-        localData.remove(ActivityScreenshotKeyword);
-        pubBuffer << localData;
-    } else {
-        pubBuffer << publicData;
-    }
-    
-    HBufC *actId = XQConversions::qStringToS60Desc(publicData[ActivityActivityKeyword].toString());
-    CleanupStack::PushL(actId);
-    CAfEntry *entry = CAfEntry::NewL(flags,
-                                     publicData[ActivityApplicationKeyword].toInt(),
-                                     *actId,
-                                     KNullDesC,
-                                     prvBuffer,
-                                     pubBuffer);
-    CleanupStack::PopAndDestroy(actId);
-    CleanupStack::PopAndDestroy(&pubBuffer);
-    CleanupStack::PopAndDestroy(&prvBuffer);
-
-    CleanupStack::PushL(entry);
-    data.CreateL(entry->Size());
-    RDesWriteStream stream(data);
-    CleanupClosePushL(stream);
-    stream << (*entry);
-    CleanupStack::PopAndDestroy(&stream);
-    CleanupStack::PopAndDestroy(entry);
-    User::LeaveIfError(SendReceive(function, TIpcArgs(&data, &bitmapHdl)));
-    
-    CleanupStack::PopAndDestroy(&data);
-    if (0 != bitmap) {
-        CleanupStack::PopAndDestroy(bitmap);
-    }
-
-}
-
-// -----------------------------------------------------------------------------
-/**
- * Function retrieve all stored activity
- * Function can leave on failure
- * @param result - list of activity
- */
-void HsActivityDbClientPrivate::activitiesL(QList<QVariantHash>& result)
-{
-    result.clear();
-
-    RBuf8 buffer;
-    CleanupClosePushL(buffer);
-
-    TPckgBuf<int> emptyFilter(0), length(0), taskId(0);
-    User::LeaveIfError(SendReceive(Activities,
-                                   TIpcArgs(&emptyFilter, &length, &taskId)));
-
-    CAfEntry::ReallocL(buffer, length());
-
-    User::LeaveIfError(SendReceive(GetData, TIpcArgs(&taskId, &buffer)));
-
-    RPointerArray<CAfEntry> entries;
-    CleanupClosePushL(entries);
-
-    entries << buffer;
-    buffer.Close();//release unneeded resources
-
-
-    while(entries.Count()) {
-        QVariantHash publicData;
-        publicData << entries[0]->Data(CAfEntry::Public);
-        publicData.insert(ActivityScreenshotKeyword,
-                          QString::fromUtf16(entries[0]->ImageSrc().Ptr(),
-                                             entries[0]->ImageSrc().Length()));
-        result.append(publicData);
-        entries.Remove(0);
-    }
-    CleanupStack::PopAndDestroy(&entries);
-    CleanupStack::PopAndDestroy(&buffer);
-}
-
-// -----------------------------------------------------------------------------
-/**
- * Function retrieve all stored activity
- * Function can leave on failure
- * @param result - list of activity
- * @param cond - request conditions
- */
-void HsActivityDbClientPrivate::applicationActivitiesL(QList<QVariantHash>& result,
-                                                     const QVariantHash & condition)
-{
-    result.clear();
-
-    RBuf8 buffer;
-    CleanupClosePushL(buffer);
-    CAfEntry *entry = CAfEntry::NewLC(0,
-                                      condition[ActivityApplicationKeyword].toInt(),
-                                      KNullDesC,
-                                      KNullDesC,
-                                      KNullDesC8,
-                                      KNullDesC8);//filtering using application id only
-    CAfEntry::ReallocL(buffer, entry->Size());
-    RDesWriteStream writer(buffer);
-    CleanupClosePushL(writer);
-    writer << (*entry);
-    CleanupStack::PopAndDestroy(&writer);
-    CleanupStack::PopAndDestroy(entry);
-
-    TPckgBuf<int> length(0), taskId(0);
-    User::LeaveIfError(SendReceive(ApplicationActivities,
-                                   TIpcArgs(&buffer, &length, &taskId)));
-
-    CAfEntry::ReallocL(buffer, length());
-
-    User::LeaveIfError(SendReceive(GetData, TIpcArgs(&taskId, &buffer)));
-
-    RPointerArray<CAfEntry> entries;
-    CleanupClosePushL(entries);
-
-    entries << buffer;
-    buffer.Close();//release unneeded resources
-
-
-    while(entries.Count()) {
-        QVariantHash publicData;
-        publicData << entries[0]->Data(CAfEntry::Public);
-        publicData.insert(ActivityScreenshotKeyword,
-                          QString::fromUtf16(entries[0]->ImageSrc().Ptr(),
-                                             entries[0]->ImageSrc().Length()));
-        result.append(publicData);
-        entries.Remove(0);
-    }
-    CleanupStack::PopAndDestroy(&entries);
-    CleanupStack::PopAndDestroy(&buffer);
-}
-
-// -----------------------------------------------------------------------------
-/**
- * Function retrieve private data of stored activity
- * Function can leave on failure
- * @param result - list of activity
- * @param activity - request conditions
- */
-void HsActivityDbClientPrivate::activityDataL(QVariant &result, const QVariantHash &activity)
-{
-    result.clear();
-
-    RBuf8 buffer;
-    CleanupClosePushL(buffer);
-
-    {   // prepare entry to send
-        HBufC *activityId = XQConversions::qStringToS60Desc(activity[ActivityActivityKeyword].toString());
-        CleanupStack::PushL(activityId);
-
-        CAfEntry *entry = CAfEntry::NewLC(0,
-                                          activity[ActivityApplicationKeyword].toInt(),
-                                          *activityId,
-                                          KNullDesC,
-                                          KNullDesC8,
-                                          KNullDesC8);//filtering using application id only
-        CAfEntry::ReallocL(buffer, entry->Size());
-        RDesWriteStream writer(buffer);
-        CleanupClosePushL(writer);
-        writer << (*entry);
-        CleanupStack::PopAndDestroy(&writer);
-        CleanupStack::PopAndDestroy(entry);
-        CleanupStack::PopAndDestroy(activityId);
-    }
-
-    {   // get data
-        TPckgBuf<int> length(0), taskId(0);
-        User::LeaveIfError(SendReceive(ApplicationActivity, TIpcArgs(&buffer, &length, &taskId)));
-
-        CAfEntry::ReallocL(buffer, length());
-        User::LeaveIfError(SendReceive(GetData, TIpcArgs(&taskId, &buffer)));
-    }
-
-    {   // read data to Qt structure
-        CAfEntry *entry = CAfEntry::NewLC();
-        RDesReadStream reader(buffer);
-        CleanupClosePushL(reader);
-        entry->InternalizeL(reader);
-        CleanupStack::PopAndDestroy(&reader);
-
-        buffer.Close(); //release unneeded resources
-
-        QVariantHash privateData;
-        privateData << entry->Data(CAfEntry::Private);
-        result = privateData.value(ActivityDataKeyword);
-
-        CleanupStack::PopAndDestroy(entry);
-    }
-    CleanupStack::PopAndDestroy(&buffer);
-}
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void HsActivityDbClientPrivate::launchActivityL(const QVariantHash &activity)
-{
-    TPckgC<TInt> applicationId(activity[ActivityApplicationKeyword].toInt());
-    HBufC8 *activityId = XQConversions::qStringToS60Desc8(activity[ActivityActivityKeyword].toString());
-    CleanupStack::PushL(activityId);
-    TPtrC8 empty(KNullDesC8);
-    User::LeaveIfError(SendReceive(LaunchActivity,
-                                   TIpcArgs(&applicationId, activityId, &empty, &empty)));
-    CleanupStack::PopAndDestroy(activityId);
-
-}
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void HsActivityDbClientPrivate::getThumbnailL(QSize size, QString imagePath, QString  mimeType, void *userDdata)
-{
-    HsActivityDbAsyncRequestPrivate::getThumbnailLD(mObserver,
-                              *this, size, imagePath, mimeType, userDdata);
-}
-
-// -----------------------------------------------------------------------------
-/**
- * Function get cached data from server
- * @param taskId - request task id
- * @param dst - destination, preallocated buffer
- */
-void HsActivityDbClientPrivate::getData(int taskId, RBuf8 &data)
-{
-    TPckgBuf<int> requestId(taskId);
-    SendReceive(GetData, TIpcArgs(&requestId, &data));
-}
-
-// -----------------------------------------------------------------------------
-/**
- * Function initialize aync request
- * @param func - requested function
- * @param data - request data
- * @param status - request status
- */
-void HsActivityDbClientPrivate::sendDataAsync(int func,
-                                              const TIpcArgs &data,
-                                              TRequestStatus& status)
-{
-    SendReceive(func, data, status);
-}
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void HsActivityDbClientPrivate::PushL(HsActivityDbAsyncRequestPrivate * task)
-{
-    (KErrNotFound == mAsyncTasks.Find(task)) ?
-        mAsyncTasks.AppendL(task):
-        User::Leave(KErrAlreadyExists);
-}
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void HsActivityDbClientPrivate::Pop(HsActivityDbAsyncRequestPrivate *task)
-{
-    const TInt offset(mAsyncTasks.Find(task));
-    if (KErrNotFound != offset) {
-        mAsyncTasks.Remove(offset);
-    }
-}
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-int HsActivityDbClientPrivate::execute(int func, const QVariantHash &privateData, const QVariantHash &publicData)
-{
-    TRAPD(errNo,
-    User::LeaveIfError(checkDataConstraint(func, publicData));
-    switch (func) {
-    case AddActivity:
-    case UpdateActivity:
-    case RemoveActivity:
-    case RemoveApplicationActivities:
-        execSimpleRequestL(func, privateData, publicData);
-        break;
-    
-    case LaunchActivity:
-        launchActivityL(publicData);
-        break;
-    
-    case NotifyChange:
-        HsActivityDbAsyncRequestPrivate::notifyDataChangeLD(mObserver, *this);
-        break;
-    
-    case WaitActivity:
-        HsActivityDbAsyncRequestPrivate::waitActivityLD(mObserver,*this, publicData);
-        break;
-    
-    }
-    
-    )
-    return errNo;
-}
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-int HsActivityDbClientPrivate::execute(int func, 
-                                       QList<QVariantHash>&dst, 
-                                       const QVariantHash &src)
-{
-    TRAPD(errNo,
-    User::LeaveIfError(checkDataConstraint(func, src));
-    switch (func) {
-    case Activities: activitiesL(dst);break;
-    case ApplicationActivities: applicationActivitiesL(dst, src); break;
-    }
-    )
-    return errNo;
-}
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-int HsActivityDbClientPrivate::checkDataConstraint(int func, const QVariantHash &data)
-{
-    int retVal(KErrNone);
-    QStringList constraints;
-    switch(func) {
-    case AddActivity:
-    case UpdateActivity:
-        constraints << ActivityApplicationKeyword 
-                    << ActivityActivityKeyword 
-                    << ActivityScreenshotKeyword;
-        break;
-    
-    case ApplicationActivity:
-    case LaunchActivity:
-    case RemoveActivity:
-        constraints << ActivityApplicationKeyword
-                    << ActivityActivityKeyword;
-                    break;
-    
-    case WaitActivity:
-    case RemoveApplicationActivities:
-        constraints << ActivityApplicationKeyword;
-        break;
-    }
-    foreach (QString constraint, constraints) {
-        if (data.end() == data.find(constraint)) {
-            retVal = KErrCorrupt;
-            break;
-        }
-    }
-    return retVal;
-}
--- a/activityfw/activitydatabase/hsactivitydbclient/src/hsactivitydbclient.cpp	Tue Jun 29 10:20:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,212 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-#include "hsactivitydbclient.h"
-#include "hsactivitydbclient_p.h"
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-HsActivityDbClient::HsActivityDbClient(QObject *obj)
-    :
-    QObject(obj),
-    d_ptr(0)
-{
-    d_ptr = new HsActivityDbClientPrivate(*this);
-}
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-HsActivityDbClient::~HsActivityDbClient()
-{
-    delete d_ptr;
-}
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-int HsActivityDbClient::connect()
-{
-    return d_ptr->connect();
-}
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void HsActivityDbClient::asyncRequestCompleated(int result,
-                                                int requestType, 
-                                                const QString& data)
-{
-    switch (requestType) {
-        case WaitActivity:
-            if (KErrCancel != result) {
-                waitActivity(QVariantHash());
-            }            
-            if (KErrNone == result) {
-                emit activityRequested(data);
-            }
-            
-            break;
-    }
-}
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void HsActivityDbClient::asyncRequestCompleated(int result,
-                                                int requestType, 
-                                                const QPixmap& pixmap,
-                                                void* userData)
-{
-    switch (requestType) {
-        case GetThumbnail:
-            emit thumbnailRequested(0 == result ? pixmap : QPixmap(), 
-                                    userData);
-            break;
-    }
-}
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void HsActivityDbClient::asyncRequestCompleated(int result,int requestType)
-{
-    switch(requestType) {
-    case NotifyChange:
-        if (KErrCancel != result) {
-            d_ptr->notifyDataChange();
-        }
-        if (KErrNone == result) {
-            emit dataChanged();
-        }
-        break;
-    }
-}
-
-// -----------------------------------------------------------------------------
-/**
- * Interface implementation.
- * @see int HsActivityDbClientInterface::addActivity(const QVariantHash&)
- */
-int HsActivityDbClient::addActivity(const QVariantHash &privateData, 
-                                    const QVariantHash &publicData)
-{
-    return d_ptr->addActivity(privateData, publicData);
-}
-
-// -----------------------------------------------------------------------------
-/**
- * Interface implementation.
- * @see int HsActivityDbClientInterface::updateActivity(const QVariantHash&)
- */
-int HsActivityDbClient::updateActivity(const QVariantHash &privateData, 
-                                       const QVariantHash &publicData)
-{
-    return d_ptr->updateActivity(privateData, publicData);
-}
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-int HsActivityDbClient::removeActivity(const QVariantHash &activity)
-{
-    return d_ptr->removeActivity(activity);
-}
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-int HsActivityDbClient::removeApplicationActivities(const QVariantHash &activity)
-{
-    return d_ptr->removeApplicationActivities(activity);
-}
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-int HsActivityDbClient::activities(QList<QVariantHash>& result)
-{
-    return d_ptr->activities(result);
-}
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-int HsActivityDbClient::applicationActivities(QList<QVariantHash> & result,
-        const QVariantHash &conditions)
-{
-    return d_ptr->applicationActivities(result, conditions);
-}
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-int HsActivityDbClient::activityData(QVariant &result, const QVariantHash &activity)
-{
-    return d_ptr->activityData(result, activity);
-}
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-int HsActivityDbClient::waitActivity(const QVariantHash &activity)
-{
-    QVariantHash condition(activity);
-    RProcess process;
-    condition.insert(ActivityApplicationKeyword, 
-                     static_cast<int>(process.SecureId().iId));
-    return d_ptr->waitActivity(condition);
-}
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-int HsActivityDbClient::launchActivity(const QVariantHash &activity)
-{
-    return d_ptr->launchActivity(activity);
-}
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-int HsActivityDbClient::getThumbnail(QSize size, QString imagePath, QString mimeType, void* userDdata)
-{
-    return d_ptr->getThumbnail(size, imagePath, mimeType, userDdata);
-}
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-int HsActivityDbClient::notifyDataChange()
-{
-    return  d_ptr->notifyDataChange();
-}
--- a/activityfw/activitydatabase/hsactivitydbserver/group/bld.inf	Tue Jun 29 10:20:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,21 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-PRJ_PLATFORMS
-DEFAULT
-
-PRJ_MMPFILES
-hsactivitydbserver.mmp
--- a/activityfw/activitydatabase/hsactivitydbserver/group/hsactivitydbserver.mmp	Tue Jun 29 10:20:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,59 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-TARGET          hsactivitydbserver.exe
-TARGETTYPE      exe
-UID             0 0x200267B4
-
-MW_LAYER_SYSTEMINCLUDE 
-
-USERINCLUDE     ../inc
-USERINCLUDE     ../../inc
-USERINCLUDE     ../../s60/inc
-USERINCLUDE     ../../../../inc
-
-SOURCEPATH      ../src
-SOURCE          main.cpp
-SOURCE          afserver.cpp
-SOURCE          afsession.cpp
-SOURCE          afstorage.cpp
-SOURCE          afdataprovidertask.cpp
-SOURCE          afbroadcasttask.cpp
-SOURCE          afstoragesynctask.cpp
-SOURCE          afstorageasynctask.cpp
-SOURCE          afobservertask.cpp
-SOURCE          afthumbnailtask.cpp
-
-SOURCEPATH      ../../s60/src
-SOURCE          afentry.cpp
-
-LIBRARY        euser.lib 
-LIBRARY        estor.lib
-LIBRARY        edbms.lib  
-LIBRARY        efsrv.lib
-LIBRARY        bafl.lib
-LIBRARY        fbscli.lib
-LIBRARY        hash.lib 
-LIBRARY        bitmaptransforms.lib
-LIBRARY        imageconversion.lib
-LIBRARY        tsutils.lib
-
-CAPABILITY     ALL -TCB
-EPOCHEAPSIZE   0x100000 0x600000 // 1MB - 6MB
-
-#ifdef ENABLE_ABIV2_MODE
-DEBUGGABLE_UDEBONLY
-#endif
\ No newline at end of file
--- a/activityfw/activitydatabase/hsactivitydbserver/hsactivitydbserver.pro	Tue Jun 29 10:20:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,20 +0,0 @@
-#
-# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description:
-#
-
-TEMPLATE = subdirs
-
-BLD_INF_RULES.prj_exports += "$${LITERAL_HASH}include \"group/bld.inf\""
-    
--- a/activityfw/activitydatabase/hsactivitydbserver/inc/afbroadcasttask.h	Tue Jun 29 10:20:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,33 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-#ifndef AFBROADCASTTASK_H
-#define AFBROADCASTTASK_H
-
-// INCLUDES
-#include <e32std.h>
-#include <e32base.h>
-
-#include "aftaskstorage.h"
-#include "aftask.h"
-
-class AfBroadcastTask
-{
-public:
-    static void ExecuteL(MAfTaskStorage& storage, const RMessage2& msg);
-};
-
-#endif // AFBROADCASTTASK_H
--- a/activityfw/activitydatabase/hsactivitydbserver/inc/afdataprovidertask.h	Tue Jun 29 10:20:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,37 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-#ifndef AFDATAPROVIDERTASK_H
-#define AFDATAPROVIDERTASK_H
-
-// INCLUDES
-#include <e32std.h>
-#include <e32base.h>
-
-#include "aftaskstorage.h"
-#include "aftask.h"
-
-class AfDataProviderTask
-{
-public:
-    static void ExecuteL(MAfTaskStorage& storage, const RMessage2& msg);
-
-private:
-    static void ProvideDataL(const RMessage2& msg, const CAfTask& src);
-
-};
-
-#endif // AFDATAPROVIDERTASK_H
--- a/activityfw/activitydatabase/hsactivitydbserver/inc/afobservertask.h	Tue Jun 29 10:20:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,56 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-#ifndef AFOBSERVERTASK_H
-#define AFOBSERVERTASK_H
-
-// INCLUDES
-#include <e32std.h>
-#include <e32base.h>
-
-#include "aftask.h"
-#include "aftaskstorage.h"
-
-class CAfObserverTask : public CAfTask
-{
-public:
-    ~CAfObserverTask();
-
-    static void ExecuteLD(MAfTaskStorage& globalStorage, 
-                          MAfTaskStorage& localStorage,
-                          const RMessage2& msg);
-
-    const TDesC8& Data() const;
-
-    void BroadcastReceivedL(const RMessage2& );
-
-private:
-    CAfObserverTask(MAfTaskStorage& globalStorage, 
-                    MAfTaskStorage& localStorage,
-                    const RMessage2& msg);
-
-    void WriteResponseL();
-
-    TBool IsSessionTask(const CSession2* session);
-
-private:
-    MAfTaskStorage& mGlobalStorage;
-    MAfTaskStorage& mLocalStorage;
-    const RMessage2 mMsg;
-    RBuf8 mData;
-};
-
-#endif // AFOBSERVERTASK_H
--- a/activityfw/activitydatabase/hsactivitydbserver/inc/afqueries.h	Tue Jun 29 10:20:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,38 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-#ifndef AFQUERIES_H
-#define AFQUERIES_H
-
-
-#include <e32base.h>
-
-_LIT( KSelectRow, "SELECT * FROM Activities WHERE ApplicationId=%S AND ActivityName='%S'");
-_LIT( KSelectRows, "SELECT * FROM Activities");
-_LIT( KSelectAppRows, "SELECT * FROM Activities WHERE ApplicationId=%S");
-_LIT( KDeleteRow, "DELETE FROM Activities WHERE ApplicationId=%S AND ActivityName='%S'");
-_LIT( KDeleteRows, "DELETE FROM Activities WHERE ApplicationId=%S");
-_LIT( KDeleteNonPersistentActivities, "DELETE FROM Activities WHERE Flags<%S");
-
-_LIT(KApplicationColumnName, "ApplicationId");
-_LIT(KActivityColumnName, "ActivityName");
-_LIT(KFlagsColumnName, "Flags");
-_LIT(KDataColumnName, "Data");
-
-_LIT(KActivityTableName, "Activities");
-_LIT(KActivityIndexName, "ActivitiesKey");
-#endif  // AFQUERIES_H
-
--- a/activityfw/activitydatabase/hsactivitydbserver/inc/afserver.h	Tue Jun 29 10:20:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,62 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-#ifndef AFSERVER_H
-#define AFSERVER_H
-
-#define __E32SVR_H__
-
-// INCLUDES
-#include <e32std.h>
-#include <e32base.h>
-#include <f32file.h>    // RFs
-
-#include "aftaskstorage.h"
-
-class CAfStorage;
-
-class CAfServer : public CServer2,
-                  public MAfTaskStorage
-{
-public:
-    ~CAfServer();
-
-    static CAfServer* NewLC();
-
-public:
-    void PushL(CAfTask *);
-    
-    void Pop(CAfTask *);
-    
-    const RPointerArray<CAfTask>& StorageData() const;
-    
-
-private:
-    CAfServer();
-
-    void ConstructL();
-
-    CSession2* NewSessionL(const TVersion& version, const RMessage2& message) const;
-
-    void RemoveNotValidTasks(const CSession2* session);
-
-private:
-    RFs mFsSession;
-    CAfStorage* mStorage;
-    RPointerArray<CAfTask> mObservers;
-};
-
-#endif // AFSERVER_H
--- a/activityfw/activitydatabase/hsactivitydbserver/inc/afsession.h	Tue Jun 29 10:20:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,68 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-#ifndef AFSESSION_H
-#define AFSESSION_H
-
-#ifndef __E32SVR_H__
-#define __E32SVR_H__
-#endif 
-// INCLUDES
-#include <e32std.h>
-#include <e32base.h>
-#include <f32file.h>
-
-#include "aftaskstorage.h"
-
-class CAfStorage;
-
-class CAfSession : public CSession2,
-                   public MAfTaskStorage
-{
-public:
-    ~CAfSession();
-
-    static CAfSession* NewL(RFs& fileSession,
-                            MAfTaskStorage& taskStorage, 
-                            CAfStorage&storage);
-
-public:
-    void PushL(CAfTask *);
-
-    void Pop(CAfTask *);
-
-    const RPointerArray<CAfTask>& StorageData() const;
-
-    void RemoveNotValidTasks(const CSession2* session);
-
-private:
-    CAfSession(RFs& fileSession,
-               MAfTaskStorage& taskStorage, 
-               CAfStorage& storage);
-
-    void ConstructL();
-
-private:
-    void ServiceL(const RMessage2& message);
-
-private:
-    RFs& mFileSession; 
-    MAfTaskStorage& mTasksStorage;
-    CAfStorage& mStorage;
-    RPointerArray<CAfTask> mRunningTasks;
-};
-
-#endif // AFSESSION_H
--- a/activityfw/activitydatabase/hsactivitydbserver/inc/afstorage.h	Tue Jun 29 10:20:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,100 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-#ifndef AFSTORAGE_H
-#define AFSTORAGE_H
-
-#define __E32SVR_H__
-
-#include <e32std.h>
-#include <e32base.h>
-#include <d32dbms.h>    // RDbStoreDatabase
-#include <s32file.h>    // CFileStore & CPermanentFileStore
-#include "afentry.h"
-
-class CAfStorage : public CBase
-    {
-public:
-    ~CAfStorage();
-
-    static CAfStorage* NewL(RFs& session);
-
-    void AddActivityL(CAfEntry &entry);
-    
-    void UpdateActivityL(CAfEntry &entry);
-
-    void DeleteActivityL(CAfEntry &entry);
-
-    void DeleteActivitiesL(CAfEntry &entry);
-
-    void ActivitiesL(RPointerArray<CAfEntry> &dst);
-
-    void ActivitiesL(RPointerArray<CAfEntry> &dst, TInt appId);
-    
-    void ActivityL(CAfEntry *&dst, CAfEntry &src);
-
-    RFs& Fs();
-
-private:
-    CAfStorage(RFs& session);
-
-    void ConstructL();
-
-    void CreateDbL(const TDesC& databaseFile);
-
-    void OpenDbL(const TDesC& databaseFile);
-
-    void CreateTableL();
-
-    void DeleteNonPersistentActivitiesL();
-
-    void GetActivitiesL(const TDesC& dst);
-
-    HBufC* SelectRowLC(TInt appId, const TDesC& actId) const;
-
-    HBufC* SelectRowsLC(TInt appId) const;
-
-    HBufC* DeleteRowLC(TInt appId, const TDesC& actId) const;
-    
-    HBufC* DeleteRowsLC(TInt appId) const;
-
-    HBufC* BuildQueryLC(const TDesC& format, TInt appId, const TDesC& actId) const;
-    
-    void ActivitiesL(RPointerArray<CAfEntry>& dst, 
-                     const TDesC& query, 
-                     CAfEntry::AccessRights rights,
-                     TInt limit = 0);
-
-    void ActivitiesL(RPointerArray<CAfEntry>& dst, 
-                     RDbView& query, 
-                     CAfEntry::AccessRights rights,
-                     TInt limit = 0);
-
-    void GetActivityForUpdateL(RDbView& query, TInt appId, const TDesC& actId);
-
-    void ReadDataL(RBuf& dst, RDbRowSet& src, TInt offset) const;
-
-    void ExternalizeDataL(RDbRowSet &dst,const CAfEntry & src, TInt offset) const;
-
-    void InternalizeDataL(CAfEntry &dst, RDbRowSet& src, TInt offset) const;
-
-private:
-    RFs& mFsSession;
-    RDbStoreDatabase mActDb;/* For database operations                 */
-    CFileStore* mFileStore;  /* For creating and opening database files */
-};
-
-#endif //AFSTORAGE_H
--- a/activityfw/activitydatabase/hsactivitydbserver/inc/afstorageasynctask.h	Tue Jun 29 10:20:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,65 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-#ifndef AFSTORAGEASYNCTASK_H
-#define AFSTORAGEASYNCTASK_H
-
-// INCLUDES
-#include <e32std.h>
-#include <e32base.h>
-
-#include "aftask.h"
-#include "aftaskstorage.h"
-#include "afstorage.h"
-
-class CAfStorageAsyncTask : public CAfTask
-{
-public:
-    ~CAfStorageAsyncTask();
-
-    static void ExecuteLD(MAfTaskStorage& taskStorage, 
-                          CAfStorage& dataStorage, 
-                          const RMessage2& msg);
-
-    const TDesC8& Data() const;
-
-    void BroadcastReceivedL(const RMessage2 &);
-
-private:
-    CAfStorageAsyncTask();
-
-    void ExecuteL(CAfStorage& dataStorage, const RMessage2& msg);
-
-    void AllActivitiesL(CAfStorage& dataStorage, const RMessage2& msg);
-
-    void ApplicationActivitiesL(CAfStorage& dataStorage, const RMessage2& msg);
-
-    void ApplicationActivityL(CAfStorage& dataStorage, const RMessage2& msg);
-
-    void WriteResponseL(const RMessage2& msg);
-
-    TBool IsSessionTask(const CSession2* session);
-
-    void ExternalizeL();
-    
-    void ExternalizeL(const CAfEntry &entry);
-
-private:
-    RBuf8 mExternalizedData;
-    RPointerArray<CAfEntry> mInternalizedData;
-};
-
-#endif // AFSTORAGEASYNCTASK_H
--- a/activityfw/activitydatabase/hsactivitydbserver/inc/afstoragesynctask.h	Tue Jun 29 10:20:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,69 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-#ifndef AFSTORAGESYNCTASK_H
-#define AFSTORAGESYNCTASK_H
-
-// INCLUDES
-#include <e32std.h>
-#include <e32base.h>
-
-#include "aftask.h"
-#include "afstorage.h"
-#include "aftaskstorage.h"
-
-class CAfEntry;
-/**
- *  CActivityStorageSyncTask
- * 
- */
-class AfStorageSyncTask
-    {
-public:
-    static void ExecuteL(MAfTaskStorage& observers,
-                         CAfStorage& dataStorage, 
-                         const RMessage2& msg);
-
-private:
-    static void AddActivityL(CAfStorage& dataStorage, 
-                             const RMessage2& msg);
-
-    static void UpdateActivityL(CAfStorage& dataStorage, 
-                                const RMessage2& msg);
-
-    static void DeleteActivityL(CAfStorage& dataStorage, 
-                                const RMessage2& msg);
-
-    static void DeleteApplicationActivitiesL(CAfStorage& dataStorage, 
-                                             const RMessage2& msg);
-
-    static void NotifyChangeL(MAfTaskStorage& observers,
-                              const RMessage2& msg);
-
-    static void ReadEntryL(CAfEntry& entry, const RMessage2& msg);
-
-    static void CreateThumbnailL(const TDesC &path, TInt hdl);
-
-    static void ThumbnailPathL(RBuf &dst, 
-                               RFs& fileSystem, 
-                               TInt uid, 
-                               const TDesC &activityName);
-
-    static HBufC8* Md5HexDigestL(const TDes8 &string);
-
-    };
-
-#endif // AFSTORAGESYNCTASK_H
--- a/activityfw/activitydatabase/hsactivitydbserver/inc/aftask.h	Tue Jun 29 10:20:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,43 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-#ifndef AFTASK_H
-#define AFTASK_H
-
-#include <e32base.h>
-
-class CAfTask: public CBase
-{
-public:
-    /**
-     * Return task data 
-     */
-    virtual const TDesC8& Data() const =0;
-    
-    /**
-     * Notify instance about incoming broadcast message.
-     * @param msg - broadcast message
-     */
-    virtual void BroadcastReceivedL(const RMessage2& msg) =0;
-    
-    /**
-     * Returns ETrue if task is related with session argument
-     */
-    virtual TBool IsSessionTask(const CSession2* session) =0;
-};
-
-#endif  //AFTASK_H
-
--- a/activityfw/activitydatabase/hsactivitydbserver/inc/aftaskstorage.h	Tue Jun 29 10:20:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,48 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-#ifndef AFTASKSTORAGE_H
-#define AFTASKSTORAGE_H
-#include <e32base.h>
-class CAfTask;
-class MAfTaskStorage
-{
-public:
-    /**
-     * Register new task instance in storage. Ownership is transfered to storage.
-     * @param task - instance that need to be registered
-     */
-    virtual void PushL(CAfTask * task)=0;
-    
-    /**
-     * Unregister task instance from storage. Ownership is transfered to caller.
-     * @param task - instance that need to be unregistered
-     */
-    virtual void Pop(CAfTask *)=0;
-    
-    /**
-     * List of registered tasks
-     */
-    virtual const RPointerArray<CAfTask>& StorageData() const =0;
-
-    /**
-     * Removes not valid task
-     */
-    virtual void RemoveNotValidTasks(const CSession2* session) =0;
-};
-
-#endif  //AFTASKSTORAGE_H
-
--- a/activityfw/activitydatabase/hsactivitydbserver/inc/afthumbnailtask.h	Tue Jun 29 10:20:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,62 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-#ifndef AFTHUMBNAILTASK_H
-#define AFTHUMBNAILTASK_H
-
-#ifndef __E32SVR_H__
-#define __E32SVR_H__
-#endif
-
-#include <e32std.h>
-#include <e32base.h>
-#include <f32file.h>
-
-#include "aftask.h"
-#include "aftaskstorage.h"
-#include "tsgraphicfilescalinghandler.h"
-
-class CFbsBitmap;
-
-class CAfThumbnailTask : public CAfTask,
-                         public MImageReadyCallBack
-{
-public:
-    ~CAfThumbnailTask();
-
-    static void ExecuteLD(MAfTaskStorage& taskStorage,
-                          const RMessage2& message);
-
-private:
-    CAfThumbnailTask(MAfTaskStorage& storage, const RMessage2 msg);
-
-    void ConstructL();
-
-    void ImageReadyCallBack(TInt error, const CFbsBitmap *bitmap );
-
-    const TDesC8& Data()const;
-
-    void BroadcastReceivedL(const RMessage2& );
-
-    TBool IsSessionTask(const CSession2* session);
-
-private:
-    MAfTaskStorage& mStorage; 
-    const RMessage2 mMsg;
-    CBase* mService;
-};
-
-#endif // AFTHUMBNAILTASK_H
--- a/activityfw/activitydatabase/hsactivitydbserver/src/afbroadcasttask.cpp	Tue Jun 29 10:20:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,37 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-#include "afbroadcasttask.h"
-
-// -----------------------------------------------------------------------------
-/**
- * Handle broadccast message request
- * @param storage - observer tasks storage
- * @param msg - request message that will be provided to observers
- */
-void AfBroadcastTask::ExecuteL(MAfTaskStorage& storage, 
-                               const RMessage2& msg)
-{
-    const RPointerArray<CAfTask> &tasks(storage.StorageData());
-    for (TInt iter(tasks.Count() - 1); iter >= 0 ; --iter ) {
-        if(EFalse == msg.IsNull()) {
-            (tasks[iter])->BroadcastReceivedL(msg);
-        }
-    }
-    if(EFalse == msg.IsNull()) {
-        msg.Complete(KErrNone);
-    }
-}
--- a/activityfw/activitydatabase/hsactivitydbserver/src/afdataprovidertask.cpp	Tue Jun 29 10:20:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,58 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-#include "afdataprovidertask.h"
-#include "activitycmd.h"
-
-// -----------------------------------------------------------------------------
-/**
- * Handle data request. Deliver data stored in other task.
- * @param storage - data tasks storage
- * @param msg - request message
- */
-void AfDataProviderTask::ExecuteL(MAfTaskStorage& storage, 
-                                  const RMessage2& msg)
-{
-    TPckgBuf<void*> requestId;
-    CAfTask* taskPtr(0);
-    msg.Read(KRequestIdOffset, requestId);
-    
-    for (TInt iter(0);iter <storage.StorageData().Count();++iter) {
-        taskPtr = storage.StorageData()[iter];
-        if (taskPtr == requestId()) {//compare requested task address with storage objects
-            ProvideDataL(msg, *taskPtr);
-            storage.Pop(taskPtr);
-            delete taskPtr;
-            return;
-        }
-    }
-    User::Leave(KErrNotFound);
-}
-
-// -----------------------------------------------------------------------------
-/**
- * Write response data to request message
- * @param msg - destination message
- * @param src - data source
- */
-void AfDataProviderTask::ProvideDataL(const RMessage2& msg, 
-                                      const CAfTask& src)
-{
-    if (EFalse ==msg.IsNull()) {
-        msg.WriteL(KResponseDataOffset, src.Data());
-        msg.Complete(KErrNone);
-    }
-}
--- a/activityfw/activitydatabase/hsactivitydbserver/src/afobservertask.cpp	Tue Jun 29 10:20:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,145 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-#include "afobservertask.h"
-#include "activitycmd.h"
-
-// -----------------------------------------------------------------------------
-/**
- * Constructor for performing 1st stage construction
- * @param globalStorage - global observers storage
- * @param localStorage - local observers storage
- * @param msg - request message
- */
-CAfObserverTask::CAfObserverTask(MAfTaskStorage& globalStorage, 
-                                 MAfTaskStorage& localStorage, 
-                                 const RMessage2& msg)
-:
-    mGlobalStorage(globalStorage),
-    mLocalStorage(localStorage),
-    mMsg(msg)
-{
-    // No implementation required
-}
-
-// -----------------------------------------------------------------------------
-/**
- * Destructor.
- */
-CAfObserverTask::~CAfObserverTask()
-{
-    mData.Close();
-}
-
-// -----------------------------------------------------------------------------
-/**
- * Handle observer request. 
- * @param globalStorage - global observers storage
- * @param localStorage - local observers storage
- * @param msg - request message
- */
-
-void CAfObserverTask::ExecuteLD(MAfTaskStorage& globalStorage, 
-                                MAfTaskStorage& localStorage, 
-                                const RMessage2& msg)
-{
-    CAfObserverTask *self = new(ELeave)CAfObserverTask(globalStorage, 
-                                                       localStorage, 
-                                                       msg);
-    CleanupStack::PushL(self);
-    globalStorage.PushL(self);
-    CleanupStack::Pop(self);
-}
-
-// -----------------------------------------------------------------------------
-/**
- * Interface implementation
- * @see CActivityTask::Data()
- */
-const TDesC8& CAfObserverTask::Data() const
-{
-    return mData;
-}
-
-// -----------------------------------------------------------------------------
-/**
- * Interface implementation
- * @see CActivityTask::BroadcastReceivedL(const RMessage2&)
- */
-void CAfObserverTask::BroadcastReceivedL(const RMessage2& msg)
-{
-    if(EFalse != mMsg.IsNull()) {
-        mGlobalStorage.Pop(this);//
-        mLocalStorage.Pop(this);
-        delete this;
-    } else if (WaitActivity == mMsg.Function() &&
-               LaunchActivity == msg.Function()) {
-               TPckgBuf<TInt> observerdId;
-               mMsg.ReadL(KRequestAppIdOffset, observerdId);
-
-        TPckgBuf<TInt> requestedId;
-        msg.ReadL(KRequestAppIdOffset, requestedId);
-        if (observerdId() == requestedId()) {
-            if (msg.GetDesLength(KRequestActOffset) > mData.MaxLength()) {
-                mData.ReAllocL(msg.GetDesLength(1));
-            }
-            msg.ReadL(KRequestActOffset, mData, 0);
-            WriteResponseL();
-            mLocalStorage.PushL(this);
-            mGlobalStorage.Pop(this);
-            mMsg.Complete(KErrNone);
-        }
-    } else if (WaitActivity == mMsg.Function() &&
-               CancelWait == msg.Function() &&
-               mMsg.Session() == msg.Session()) {
-        mGlobalStorage.Pop(this);
-        mMsg.Complete(KErrCancel);
-        delete this;
-    } else if (NotifyChange == mMsg.Function() &&
-               CancelNotify == msg.Function() &&
-               mMsg.Session() == msg.Session()) {
-        mGlobalStorage.Pop(this);
-        mMsg.Complete(KErrCancel);
-        delete this;
-    } else if(NotifyChange == mMsg.Function() &&
-              (AddActivity == msg.Function() ||
-               UpdateActivity == msg.Function() ||
-               RemoveActivity == msg.Function() ||
-               RemoveApplicationActivities == msg.Function())){
-        mMsg.Complete(KErrNone);
-        mGlobalStorage.Pop(this);
-        delete this;
-    }
-}
-
-// -----------------------------------------------------------------------------
-/**
- * Write response data to requested message 
- */
-void CAfObserverTask::WriteResponseL()
-{
-    mMsg.WriteL(KResponseDataSizeOffset, TPckgBuf<TInt>(mData.Length()));//write data size
-    mMsg.WriteL(KResponseIdOffset, TPckgBuf<CBase*>(this));//task identyfier
-}
-
-// -----------------------------------------------------------------------------
-/**
- * Returns ETrue if task is related with session argument
- */
-TBool CAfObserverTask::IsSessionTask(const CSession2* session)
-{
-    return mMsg.Session() == session ? ETrue : EFalse;
-}
--- a/activityfw/activitydatabase/hsactivitydbserver/src/afserver.cpp	Tue Jun 29 10:20:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,134 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-#include <fbs.h>
-
-#include "afserver.h"
-#include "afsession.h"
-#include "afstorage.h"
-#include "aftask.h"
-
-_LIT( KActivityServerName, "hsactivitydbserver" );
-_LIT(KObserverAlreadyExists, "Observer task exists");
-
-// -----------------------------------------------------------------------------
-/**
- * Constructor for performing 1st stage construction
- */
-CAfServer::CAfServer()
-:
-CServer2( EPriorityStandard )
-{
-    // No implementation required
-}
-
-// -----------------------------------------------------------------------------
-/**
- * Destructor.
- */
-CAfServer::~CAfServer()
-{
-    delete mStorage;
-    mFsSession.Close();
-    mObservers.ResetAndDestroy();
-    RFbsSession::Disconnect();
-}
-
-// -----------------------------------------------------------------------------
-/**
- * Two-phased constructor.
- */
-CAfServer* CAfServer::NewLC()
-{
-    CAfServer* self = new (ELeave) CAfServer();
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    return self;
-}
-
-// -----------------------------------------------------------------------------
-/**
- * Default constructor for performing 2nd stage construction
- */
-void CAfServer::ConstructL()
-{
-    StartL(KActivityServerName);
-    User::LeaveIfError(mFsSession.Connect());
-    User::LeaveIfError(RFbsSession::Connect(mFsSession));
-    mStorage = CAfStorage::NewL(mFsSession);
-    mObservers.Array();
-}
-
-// -----------------------------------------------------------------------------
-/**
- * Interface implementation
- * @see CServer2::NewSessionL(const TVersion&, const RMessage2&)
- */
-CSession2* CAfServer::NewSessionL(const TVersion &, const RMessage2&) const
-{
-    return CAfSession::NewL(const_cast<CAfServer*>(this)->mFsSession, 
-                            *const_cast<CAfServer*>(this), 
-                            *mStorage);
-}
-
-// -----------------------------------------------------------------------------
-/**
- * Interface implementation
- * @see MAfTaskStorage::PushL(CAfTask *)
- */
-void CAfServer::PushL(CAfTask * task)
-{
-    (KErrNotFound == mObservers.Find(task)) ?
-     mObservers.AppendL(task) :
-     User::Panic(KObserverAlreadyExists, KErrAlreadyExists);
-}
-
-// -----------------------------------------------------------------------------
-/**
- * Interface implementation
- * @see MAfTaskStorage::Pop(CActivityTask *)
- */
-void CAfServer::Pop(CAfTask *task)
-{
-    const TInt offset(mObservers.Find(task));
-    if (KErrNotFound != offset) {
-        mObservers.Remove(offset);
-    }
-}
-
-// -----------------------------------------------------------------------------
-/**
- * Interface implementation
- * @see MAfTaskStorage::StorageData()
- */
-const RPointerArray<CAfTask>& CAfServer::StorageData() const
-{
-    return mObservers;
-}
-
-// -----------------------------------------------------------------------------
-/**
- * Removes not valid task
- */
-void CAfServer::RemoveNotValidTasks(const CSession2* session)
-{
-    for (TInt i=mObservers.Count()-1; i>=0; --i) {
-        if( mObservers[i]->IsSessionTask(session) ) {
-            delete mObservers[i];
-            mObservers.Remove(i);
-        }
-    }
-}
--- a/activityfw/activitydatabase/hsactivitydbserver/src/afsession.cpp	Tue Jun 29 10:20:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,177 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-#include "afsession.h"
-#include "aftask.h"
-#include "activitycmd.h"
-
-#include "afstorageasynctask.h"
-#include "afstoragesynctask.h"
-#include "afobservertask.h"
-#include "afbroadcasttask.h"
-#include "afdataprovidertask.h"
-#include "afthumbnailtask.h"
-
-_LIT(KTaskAlreadyExists, "Activity task exists");
-
-// -----------------------------------------------------------------------------
-/**
- * Constructor for performing 1st stage construction
- * @param fileSession - initialized file system session
- * @param taskStorage - global observers storage
- * @param storage - data storage
- */
-
-CAfSession::CAfSession(RFs& fileSession, 
-                       MAfTaskStorage& taskStorage, 
-                       CAfStorage& storage)
-:
-mFileSession(fileSession),
-mTasksStorage(taskStorage),
-mStorage(storage)
-{
-    // No implementation required
-}
-
-// -----------------------------------------------------------------------------
-/**
- * Destructor.
- */
-CAfSession::~CAfSession()
-{
-    RemoveNotValidTasks(this);
-    mTasksStorage.RemoveNotValidTasks(this);
-}
-
-// -----------------------------------------------------------------------------
-/**
- * Two-phased constructor.
- * @param fileSession - initialized file system session
- * @param taskStorage - global observers storage
- * @param storage - data storage
- */
-CAfSession* CAfSession::NewL(RFs& fileSession,
-                             MAfTaskStorage& taskStorage,
-                             CAfStorage& storage)
-{
-    CAfSession* self = new (ELeave) CAfSession(fileSession, 
-                                               taskStorage, 
-                                               storage);
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    CleanupStack::Pop(self);
-    return self;
-}
-
-// -----------------------------------------------------------------------------
-/**
- * EPOC default constructor for performing 2nd stage construction
- */
-void CAfSession::ConstructL()
-{
-}
-
-// -----------------------------------------------------------------------------
-/**
- * Implements interface
- * @see void CSession2::ServiceL(const RMessage2&)
- */
-void CAfSession::ServiceL(const RMessage2& message)
-{
-    switch (message.Function()) {
-    case AddActivity:
-    case UpdateActivity:
-    case RemoveActivity:
-    case RemoveApplicationActivities:
-        AfStorageSyncTask::ExecuteL(mTasksStorage, mStorage, message);
-        break;
-    
-    case ApplicationActivity:
-    case Activities:
-    case ApplicationActivities:
-        CAfStorageAsyncTask::ExecuteLD(*this, mStorage, message);
-        break;
-    
-    case WaitActivity:
-    case NotifyChange:
-        CAfObserverTask::ExecuteLD(mTasksStorage, *this, message);
-        break;
-    
-    case GetThumbnail:
-        CAfThumbnailTask::ExecuteLD(*this, message);
-        break;
-    
-    case LaunchActivity:
-    case CancelWait:
-    case CancelNotify:
-        AfBroadcastTask::ExecuteL(mTasksStorage, message);
-        break;
-    
-    case GetData:
-        AfDataProviderTask::ExecuteL(*this,message);
-        break;
-    
-    default:
-        message.Complete(CServer2::EBadMessageNumber);
-        break;
-    }
-}
-
-// -----------------------------------------------------------------------------
-/**
- * Interface implementation
- * @see MAfTaskStorage::PushL(CAfTask *)
- */
-void CAfSession::PushL(CAfTask * task)
-{
-    (KErrNotFound == mRunningTasks.Find(task)) ?
-     mRunningTasks.AppendL(task) :
-     User::Panic(KTaskAlreadyExists, KErrAlreadyExists);
-}
-
-// -----------------------------------------------------------------------------
-/**
- * Interface implementation
- * @see MAfTaskStorage::Pop(CAfTask *)
- */
-void CAfSession::Pop(CAfTask *task)
-{
-    const TInt offset(mRunningTasks.Find(task));
-    if (KErrNotFound != offset) {
-        mRunningTasks.Remove(offset);
-    }
-}
-
-// -----------------------------------------------------------------------------
-/**
- * Interface implementation
- * @see MAfTaskStorage::StorageData()
- */
-const RPointerArray<CAfTask>& CAfSession::StorageData() const
-{
-    return mRunningTasks;
-}
-
-// -----------------------------------------------------------------------------
-/**
- * Removes not valid task
- */
-void CAfSession::RemoveNotValidTasks(const CSession2* session)
-{
-    if (session == this) {
-        mRunningTasks.ResetAndDestroy();
-    }
-}
--- a/activityfw/activitydatabase/hsactivitydbserver/src/afstorage.cpp	Tue Jun 29 10:20:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,505 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-#include "afstorage.h"
-#include "afqueries.h"
-#include "afentry.h"
-#include <bautils.h>
-#include <s32mem.h>
-
-_LIT(KDbName, "activity.db");
-_LIT(KDbDrive, "c:");
-const TInt KMaxPathLength = 256;
-
-// -----------------------------------------------------------------------------
-LOCAL_C void CleanupResetAndDestroy(TAny*  item)
-{
-    RPointerArray<CAfEntry> *array = static_cast< RPointerArray<CAfEntry>* >(item);
-    array->ResetAndDestroy();
-    array->Close();
-}
-
-// -----------------------------------------------------------------------------
-/**
- * Constructor for performing 1st stage construction
- * @param session - initialized session to file system
- */
-CAfStorage::CAfStorage(RFs& session)
-:
-mFsSession(session)
-{
-    // No implementation required
-}
-
-// -----------------------------------------------------------------------------
-/**
- * Destructor.
- */
-CAfStorage::~CAfStorage()
-{
-}
-
-// -----------------------------------------------------------------------------
-/**
- * Two-phased constructor.
- * @param session - initialized session to file system
- */
-CAfStorage* CAfStorage::NewL(RFs& session)
-{
-    CAfStorage* self = new (ELeave) CAfStorage(session);
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    CleanupStack::Pop(); // self;
-    return self;
-}
-
-// -----------------------------------------------------------------------------
-/**
- * EPOC default constructor for performing 2nd stage construction
- */
-void CAfStorage::ConstructL()
-{
-    RBuf path;
-    CleanupClosePushL( path );
-    path.CreateL(KMaxPathLength);
-    User::LeaveIfError(mFsSession.PrivatePath(path ));
-    path.Append(KDbName);
-    path.Insert(0, KDbDrive);
-    BaflUtils::EnsurePathExistsL(mFsSession, path);
-    BaflUtils::FileExists(mFsSession, path) ? OpenDbL(path) : CreateDbL(path);
-    CleanupStack::PopAndDestroy(&path);
-
-    DeleteNonPersistentActivitiesL();
-}
-
-// -----------------------------------------------------------------------------
-/**
- * Create database and its structure
- * @param databaseFile - database file path
- */
-void CAfStorage::CreateDbL(const TDesC& databaseFile)
-{
-    mFileStore = CPermanentFileStore::ReplaceL(mFsSession,
-                                               databaseFile,
-                                               EFileRead|EFileWrite);
-    mFileStore->SetTypeL(mFileStore->Layout());// Set file store type
-    TStreamId id = mActDb.CreateL(mFileStore);// Create stream object
-    mFileStore->SetRootL(id);// Keep database id as root of store
-    mFileStore->CommitL();// Complete creation by commiting
-    CreateTableL();
-}
-
-// -----------------------------------------------------------------------------
-/**
- * Open database
- * @param databaseFile - database file path
- */
-void CAfStorage::OpenDbL(const TDesC& databaseFile)
-{
-    mFileStore = CPermanentFileStore::OpenL(mFsSession,
-                                            databaseFile,
-                                            EFileRead|EFileWrite);
-    mFileStore->SetTypeL(mFileStore->Layout()); /* Set file store type*/
-    mActDb.OpenL(mFileStore,mFileStore->Root());
-    CDbTableNames* tables = mActDb.TableNamesL();
-    CleanupStack::PushL(tables);
-    if (0 == tables->Count()) {
-        CreateTableL();
-    }
-    CleanupStack::PopAndDestroy(tables);
-}
-
-// -----------------------------------------------------------------------------
-/**
- * Create database structure
- */
-void CAfStorage::CreateTableL()
-{
-    // Add the columns to column set
-    CDbColSet* actColSet = CDbColSet::NewLC();
-
-    TDbCol appName(KApplicationColumnName, EDbColInt64);
-    appName.iAttributes = TDbCol::ENotNull;
-    actColSet->AddL(appName);
-
-    TDbCol actName(KActivityColumnName, EDbColText16);// Using default length
-    actName.iAttributes = TDbCol::ENotNull;
-    actColSet->AddL(actName);
-
-    TDbCol actFlags(KFlagsColumnName, EDbColInt32);
-    actFlags.iAttributes = TDbCol::ENotNull;
-    actColSet->AddL(actFlags);
-
-    actColSet->AddL(TDbCol(KDataColumnName, EDbColLongBinary));// Stream Data
-
-    // Create the table
-    User::LeaveIfError(mActDb.CreateTable(KActivityTableName,
-                                         *actColSet));
-
-    CleanupStack::PopAndDestroy(actColSet);
-}
-
-// -----------------------------------------------------------------------------
-/**
- * Delete non-persistent activities
- */
-void CAfStorage::DeleteNonPersistentActivitiesL()
-{
-    HBufC *query(BuildQueryLC(KDeleteNonPersistentActivities(), CAfEntry::Persistent, KNullDesC));
-    User::LeaveIfError(mActDb.Execute(*query));
-    CleanupStack::PopAndDestroy(query);
-}
-
-// -----------------------------------------------------------------------------
-/**
- * Register new activity
- * @param appId - application id
- * @param actId - activity id
- * @param flags - activity flags
- * @param imgSrc - activity thumbnail source
- * @param privateData - activity private data
- * @param publicData - activity public data
- */
-void CAfStorage::AddActivityL(CAfEntry& entry)
-{
-    //verify if row already exists
-    TInt errNo(KErrNone);
-    RDbView view;
-    CleanupClosePushL(view);
-    TRAP( errNo, GetActivityForUpdateL(view, entry.ApplicationId(), entry.ActivityId()));
-    if (KErrNone == errNo) {
-        User::Leave(KErrAlreadyExists);
-    }
-    CleanupStack::PopAndDestroy(&view);
-
-    //write table
-    RDbTable table;
-    CleanupClosePushL(table);
-    User::LeaveIfError(table.Open(mActDb, KActivityTableName, table.EUpdatable));
-    CDbColSet *row = table.ColSetL();
-    CleanupStack::PushL(row);
-
-    table.InsertL();
-    TRAP(errNo,
-    table.SetColL(row->ColNo(KApplicationColumnName), TInt64(entry.ApplicationId()));
-    table.SetColL(row->ColNo(KActivityColumnName), entry.ActivityId());
-    table.SetColL(row->ColNo(KFlagsColumnName), entry.Flags());
-    ExternalizeDataL(table, entry, row->ColNo(KDataColumnName));
-    table.PutL();)
-    if (KErrNone != errNo) {
-        table.Cancel();
-        User::Leave(errNo);
-    }
-    CleanupStack::PopAndDestroy(row);
-    CleanupStack::PopAndDestroy(&table);
-}
-
-// -----------------------------------------------------------------------------
-/**
- * Update activity
- * @param entry - activity data
- */
-void CAfStorage::UpdateActivityL(CAfEntry& entry)
-{
-    RDbView view;
-    CleanupClosePushL(view);
-    GetActivityForUpdateL(view, entry.ApplicationId(), entry.ActivityId());
-    view.UpdateL();
-    TRAPD(errNo,
-    CDbColSet* colSet = view.ColSetL();
-    CleanupStack::PushL(colSet);
-
-    view.SetColL(colSet->ColNo(KFlagsColumnName), entry.Flags());
-    ExternalizeDataL(view, entry, colSet->ColNo(KDataColumnName));
-
-    view.PutL();
-    if (KErrNone != errNo) {
-        view.Cancel();
-        User::Leave(errNo);
-    }
-    CleanupStack::PopAndDestroy(colSet);)
-
-    if (KErrNone != errNo) {
-        view.Cancel();
-        User::Leave(errNo);
-    }
-    CleanupStack::PopAndDestroy(&view);
-}
-
-// -----------------------------------------------------------------------------
-/**
- * Delete activity
- * @param appId - application id
- * @param actId - activity id
- */
-void CAfStorage::DeleteActivityL(CAfEntry& entry)
-{
-    HBufC *query(DeleteRowLC(entry.ApplicationId(), entry.ActivityId()));
-    User::LeaveIfError(mActDb.Execute(*query));
-    CleanupStack::PopAndDestroy(query);
-}
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CAfStorage::DeleteActivitiesL(CAfEntry& entry)
-{
-    HBufC *query(DeleteRowsLC(entry.ApplicationId()));
-    User::LeaveIfError(mActDb.Execute(*query));
-    CleanupStack::PopAndDestroy(query);
-}
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CAfStorage::ActivitiesL(RPointerArray<CAfEntry>& dst)
-{
-    ActivitiesL(dst, KSelectRows(), CAfEntry::Public);
-}
-
-// -----------------------------------------------------------------------------
-/**
- * Serialize application activity into the buffer
- * @param dst - destination buffer
- * @param appId - application id
- */
-void CAfStorage::ActivitiesL(RPointerArray<CAfEntry>& dst,TInt appId)
-{
-    HBufC *query(SelectRowsLC(appId));
-    ActivitiesL(dst, *query, CAfEntry::Private);
-    CleanupStack::PopAndDestroy(query);
-}
-
-// -----------------------------------------------------------------------------
-/**
- * Serialize application activity into the buffer
- * @param dst - destination entry
- * @param src - condition pattern
- */
-void CAfStorage::ActivityL(CAfEntry *&dst, CAfEntry& src)
-{
-    HBufC *query = SelectRowLC(src.ApplicationId(), src.ActivityId());
-    RPointerArray<CAfEntry> array;
-    CleanupStack::PushL(TCleanupItem(CleanupResetAndDestroy,&array));
-    ActivitiesL(array, *query, CAfEntry::Private, 1);
-    if (0 >= array.Count()) {
-        User::Leave(KErrNotFound);
-    }
-    dst = array[0];
-    array.Remove(0);
-    CleanupStack::PopAndDestroy(&array);
-    CleanupStack::PopAndDestroy(query);
-}
-
-// -----------------------------------------------------------------------------
-/**
- * Provide initialized file system session
- * @return file system session
- */
-RFs& CAfStorage::Fs()
-{
-    return mFsSession;
-}
-
-// -----------------------------------------------------------------------------
-/**
- * Format query to select activity row
- * @param appId - application id
- * @param actId - activity id
- * @return formated sql query
- */
-HBufC* CAfStorage::SelectRowLC(TInt appId, const TDesC& actId) const
-{
-    return BuildQueryLC(KSelectRow(),appId, actId);
-}
-
-// -----------------------------------------------------------------------------
-/**
- * Format query to select activities for application
- * @param appId - application id
- * @return formated sql query
- */
-HBufC* CAfStorage::SelectRowsLC(TInt appId) const
-{
-    return BuildQueryLC(KSelectAppRows(), appId, KNullDesC);
-}
-
-// -----------------------------------------------------------------------------
-/**
- * Format query to delete activity
- * @param appId - application id
- * @param actId - activity id
- * @return formated sql query
- */
-HBufC* CAfStorage::DeleteRowLC(TInt appId, const TDesC& actId) const
-{
-    return BuildQueryLC(KDeleteRow(),appId, actId);
-}
-
-// -----------------------------------------------------------------------------
-/**
- * Format query to delete activities for application
- * @param appId - application id
- * @return formated sql query
- */
-HBufC* CAfStorage::DeleteRowsLC(TInt appId) const
-{
-    return BuildQueryLC(KDeleteRows(),appId, KNullDesC);
-}
-
-// -----------------------------------------------------------------------------
-/**
- * Format sql query
- * @format - sql format string
- * @param appId - application id
- * @param actId - activity id
- * @return formated sql query
- */
-HBufC* CAfStorage::BuildQueryLC(const TDesC& format,
-                                      TInt appId,
-                                      const TDesC& actId) const
-{
-    TBuf<16> appName;
-    appName.AppendNum(appId);
-    RBuf actName;
-    CleanupClosePushL(actName);
-    actName.CreateL(actId.Length());
-    actName.Copy(actId);
-    HBufC* query = HBufC::NewL(format.Length() +
-                               appName.Length() +
-                               actName.Length() );
-    query->Des().AppendFormat(format, &appName, &actName);
-    CleanupStack::PopAndDestroy(&actName);
-    CleanupStack::PushL(query);
-    return query;
-}
-
-// -----------------------------------------------------------------------------
-/**
- * Execute sql query and result serialize into buffer
- * @param dst - destination result buffer
- * @param query - sql activity query
- */
-void CAfStorage::ActivitiesL(RPointerArray<CAfEntry>& dst, const TDesC& query, CAfEntry::AccessRights rights, TInt limit)
-{
-    RDbView view;// Create a view on the database
-    CleanupClosePushL(view);
-    User::LeaveIfError(view.Prepare(mActDb, TDbQuery(query), view.EReadOnly));
-    User::LeaveIfError(view.EvaluateAll());
-    ActivitiesL(dst, view, rights, limit);
-    CleanupStack::PopAndDestroy(&view);
-}
-
-// -----------------------------------------------------------------------------
-/**
- * Return view deserialisd into entries array
- * @param dst - destination result
- * @param query - view
- * @param rights - acess rights
- */
-void CAfStorage::ActivitiesL(RPointerArray<CAfEntry>& dst, RDbView& src, CAfEntry::AccessRights rights, TInt limit)
-{
-    CDbColSet* row = src.ColSetL();
-    CleanupStack::PushL(row);
-
-    const TInt flagsOffset(row->ColNo(KFlagsColumnName)),
-               applicationOffset(row->ColNo(KApplicationColumnName)),
-               activityOffset(row->ColNo(KActivityColumnName)),
-               dataOffset(row->ColNo(KDataColumnName));
-
-    RBuf activityName;
-    CleanupClosePushL(activityName);
-
-    for (src.FirstL(); src.AtRow(); src.NextL()) {
-        if(0 < limit && dst.Count() >= limit) {
-            break;
-        }
-        src.GetL();
-        ReadDataL(activityName, src, activityOffset);
-
-        CAfEntry *entry = CAfEntry::NewLC(src.ColInt32(flagsOffset),
-                                          src.ColInt64(applicationOffset),
-                                          activityName,
-                                          KNullDesC,
-                                          KNullDesC8,
-                                          KNullDesC8);
-        if (CAfEntry::Public == rights && (entry->Flags() & CAfEntry::Invisible)) {
-            CleanupStack::PopAndDestroy(entry);
-            continue;
-        }
-        InternalizeDataL(*entry, src, dataOffset);
-        
-        if (CAfEntry::Public == rights || 0 >= limit) {
-            entry->SetDataL(KNullDesC8(), CAfEntry::Private);
-        }
-        dst.AppendL(entry);
-        CleanupStack::Pop(entry);
-    }
-
-    CleanupStack::PopAndDestroy(&activityName);
-    CleanupStack::PopAndDestroy(row);
-}
-
-// -----------------------------------------------------------------------------
-/**
- * Get activity for update
- * @param query - destination query result
- * @param appId - application id
- * @param actId - activity id
- */
-void CAfStorage::GetActivityForUpdateL(RDbView& view, TInt appId, const TDesC& actId)
-{
-    HBufC* query(SelectRowLC(appId, actId));
-    User::LeaveIfError(view.Prepare(mActDb, TDbQuery(*query), view.EUpdatable));
-    CleanupStack::PopAndDestroy(query);
-    User::LeaveIfError(view.EvaluateAll());
-    if (!view.FirstL()) {
-        User::Leave(KErrNotFound);
-    }
-}
-
-// -----------------------------------------------------------------------------
-void CAfStorage::ReadDataL(RBuf& dst, RDbRowSet& src, TInt offset) const
-{
-    const TInt length(src.ColLength(offset));
-    CAfEntry::ReallocL(dst, length);
-    RDbColReadStream srcStream;
-    srcStream.OpenLC(src,offset);
-    srcStream.ReadL(dst, src.ColLength(offset));
-    CleanupStack::PopAndDestroy(&srcStream);
-}
-
-// -----------------------------------------------------------------------------
-void CAfStorage::ExternalizeDataL(RDbRowSet& dst,const CAfEntry &src, TInt offset) const
-{
-    RDbColWriteStream dbStream;
-    CleanupClosePushL(dbStream);
-    dbStream.OpenL(dst, offset);
-    src.ExternalizeDataOnlyL(dbStream);
-    CleanupStack::PopAndDestroy(&dbStream);
-}
-
-// -----------------------------------------------------------------------------
-void CAfStorage::InternalizeDataL(CAfEntry & dst, RDbRowSet& src, TInt offset) const
-{
-    RDbColReadStream dbStream;
-    CleanupClosePushL(dbStream);
-    dbStream.OpenL(src, offset);
-    dst.InternalizeDataOnlyL(dbStream);
-    CleanupStack::PopAndDestroy(&dbStream);
-}
--- a/activityfw/activitydatabase/hsactivitydbserver/src/afstorageasynctask.cpp	Tue Jun 29 10:20:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,221 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-#include <s32mem.h>
-
-#include "afstorageasynctask.h"
-#include "activitycmd.h"
-
-_LIT(KUnsupportedStorageAsyncTask, "Unsupported async storage task");
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-LOCAL_C void ReadEntryL(CAfEntry& entry, const RMessage2& msg)
-{
-    RBuf8 serializedEntry;
-    CleanupClosePushL(serializedEntry);
-    serializedEntry.CreateL(msg.GetDesLengthL(0));
-    msg.ReadL(0, serializedEntry);
-    RDesReadStream reader(serializedEntry);
-    CleanupClosePushL(reader);
-    
-    reader >> entry;
-    
-    CleanupStack::PopAndDestroy(&reader);
-    CleanupStack::PopAndDestroy(&serializedEntry);
-}
-// -----------------------------------------------------------------------------
-/**
- * Constructor for performing 1st stage construction
- */
-CAfStorageAsyncTask::CAfStorageAsyncTask()
-{
-    // No implementation required
-}
-
-// -----------------------------------------------------------------------------
-/**
- * Destructor.
- */
-CAfStorageAsyncTask::~CAfStorageAsyncTask()
-{
-    mExternalizedData.Close();
-    mInternalizedData.ResetAndDestroy();
-}
-
-// -----------------------------------------------------------------------------
-/**
- * Handle asynchronous data storage requests
- * @param taskStorage - data tasks storage
- * @param dataStorage - data storage
- * @param msg - request message
- */
-void CAfStorageAsyncTask::ExecuteLD(MAfTaskStorage& taskStorage, 
-                                    CAfStorage& dataStorage, 
-                                    const RMessage2& msg)
-{
-    CAfStorageAsyncTask* self = new (ELeave) CAfStorageAsyncTask();
-    CleanupStack::PushL(self);
-    self->ExecuteL(dataStorage, msg);
-    taskStorage.PushL(self);
-    CleanupStack::Pop(self);
-    if (EFalse == msg.IsNull()) {
-        msg.Complete(KErrNone);
-    }
-}
-
-// -----------------------------------------------------------------------------
-/**
- * Interface implementation
- * @see CActivityTask::Data()
- */
-const TDesC8& CAfStorageAsyncTask::CAfStorageAsyncTask::Data() const
-{
-    return mExternalizedData;
-}
-
-// -----------------------------------------------------------------------------
-/**
- * Interface implementation
- * @see CActivityTask::BroadcastReceivedL(const RMessage2 &)
- */
-void CAfStorageAsyncTask::BroadcastReceivedL(const RMessage2& )
-{
-    // No implementation required
-}
-
-// -----------------------------------------------------------------------------
-/**
- * Handle asynchronous data storage requests
- * @param dataStorage - data storage
- * @param msg - request message
- */
-void CAfStorageAsyncTask::ExecuteL(CAfStorage& dataStorage, 
-                                   const RMessage2& msg)
-{
-    switch (msg.Function()) {
-    case Activities:
-        AllActivitiesL(dataStorage, msg);
-        break;
-    case ApplicationActivities:
-        ApplicationActivitiesL(dataStorage, msg);
-        break;
-    case ApplicationActivity:
-        ApplicationActivityL(dataStorage, msg);
-        break;
-    default:
-        //this code shouldn't be called. fatal error: means wrong session implementation 
-        User::Panic(KUnsupportedStorageAsyncTask, KErrGeneral);
-    };
-}
-
-// -----------------------------------------------------------------------------
-/**
- * Handle getting all activities request
- * @param dataStorage - data storage
- * @param msg - requested message
- */
-void CAfStorageAsyncTask::AllActivitiesL(CAfStorage& dataStorage, 
-                                         const RMessage2& msg)
-{
-    dataStorage.ActivitiesL(mInternalizedData);
-    ExternalizeL();
-    WriteResponseL(msg);
-}
-
-// -----------------------------------------------------------------------------
-/**
- * Handle getting application activities request
- * @param dataStorage - data storage
- * @param msg - requested message
- */
-void CAfStorageAsyncTask::ApplicationActivitiesL(CAfStorage& dataStorage, 
-                                                 const RMessage2& msg)
-{
-    CAfEntry *entry = CAfEntry::NewLC();
-    ReadEntryL(*entry, msg);
-    dataStorage.ActivitiesL(mInternalizedData, entry->ApplicationId());
-    CleanupStack::PopAndDestroy(entry);
-    ExternalizeL();
-    WriteResponseL(msg);
-}
-
-// -----------------------------------------------------------------------------
-/**
- * Handle getting application activity request
- * @param dataStorage - data storage
- * @param msg - requested message
- */
-void CAfStorageAsyncTask::ApplicationActivityL(CAfStorage& dataStorage, 
-                                               const RMessage2& msg)
-{
-    CAfEntry *src(CAfEntry::NewLC()) , *dst(0);
-    ReadEntryL(*src, msg);
-    dataStorage.ActivityL(dst, *src);
-    CleanupStack::PushL(dst);
-    ExternalizeL(*dst);
-    CleanupStack::PopAndDestroy(dst);
-    CleanupStack::PopAndDestroy(src);
-    WriteResponseL(msg);
-}
-
-// -----------------------------------------------------------------------------
-void CAfStorageAsyncTask::ExternalizeL()
-{
-    mExternalizedData << mInternalizedData;
-    mInternalizedData.ResetAndDestroy();
-}
-
-// -----------------------------------------------------------------------------
-/**
- * Externalzie entry into output buffer
- * @param entry - source entry
- */
-void CAfStorageAsyncTask::ExternalizeL(const CAfEntry &entry)
-{
-    CAfEntry::ReallocL(mExternalizedData, entry.Size());
-    RDesWriteStream writer(mExternalizedData);
-    CleanupClosePushL(writer);
-    writer << entry;
-    CleanupStack::PopAndDestroy(&writer);
-}
-
-// -----------------------------------------------------------------------------
-/**
- * Write response data into request message
- * @param msg - destination message
- */
-void CAfStorageAsyncTask::WriteResponseL(const RMessage2& msg)
-{
-    if (EFalse == msg.IsNull()) {
-        msg.WriteL(1, 
-                   TPckgBuf<TInt>(mExternalizedData.Length()));//write data size
-        msg.WriteL(2, 
-                   TPckgBuf<CBase*>(this));//task identyfier
-    }
-}
-
-// -----------------------------------------------------------------------------
-/**
- * Returns ETrue if task is related with session argument
- */
-
-TBool CAfStorageAsyncTask::IsSessionTask(const CSession2* /*session*/)
-{
-	return EFalse;
-}
--- a/activityfw/activitydatabase/hsactivitydbserver/src/afstoragesynctask.cpp	Tue Jun 29 10:20:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,260 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-#include <s32mem.h>
-#include <hash.h>
-#include <fbs.h>
-#include <bautils.h>
-
-#include "afstoragesynctask.h"
-#include "activitycmd.h"
-#include "afentry.h"
-const TInt KMaxPathLength = 256;
-
-_LIT(KUnsupportedStorageSyncTask, "Unsupported sync storage task");
-
-// -----------------------------------------------------------------------------
-/**
- * Handle synchronous data storage requests
- * @param dataStorage - data storage
- * @param msg - request message
- */
-void AfStorageSyncTask::ExecuteL(MAfTaskStorage& observers,
-                                 CAfStorage& dataStorage, 
-                                 const RMessage2& msg)
-{
-    switch (msg.Function()) {
-    case AddActivity: 
-        AddActivityL(dataStorage, msg);
-        break;
-    case UpdateActivity:
-        UpdateActivityL(dataStorage, msg);
-        break;
-    case RemoveActivity:
-        DeleteActivityL(dataStorage, msg);
-        break;
-    case RemoveApplicationActivities:
-        DeleteApplicationActivitiesL(dataStorage, msg);
-        break;
-    default:
-        //this code shouldn't be called. fatal error: means wrong session implementation 
-        User::Panic(KUnsupportedStorageSyncTask, KErrGeneral);
-    };
-    msg.Complete(KErrNone);
-    NotifyChangeL(observers, msg);
-}
-
-// -----------------------------------------------------------------------------
-/**
- * Handle adding new activity.
- * @param dataStorage - data storage
- * @param msg - request message
- */
-void AfStorageSyncTask::AddActivityL(CAfStorage& dataStorage, 
-                                     const RMessage2& msg)
-{
-    //Read message and bitmap handle
-    TPckgBuf<TInt> bitmapHdl(0);
-    CAfEntry *entry = CAfEntry::NewLC();
-    ReadEntryL(*entry, msg);
-    msg.ReadL(1, bitmapHdl);
-    
-    RBuf thumbnailPath;
-    CleanupClosePushL(thumbnailPath);
-    ThumbnailPathL(thumbnailPath, 
-                   dataStorage.Fs(), 
-                   entry->ApplicationId(), 
-                   entry->ActivityId());
-    CreateThumbnailL(thumbnailPath, bitmapHdl());
-    entry->SetImageSrcL(thumbnailPath);
-    dataStorage.AddActivityL(*entry);
-    CleanupStack::PopAndDestroy(&thumbnailPath);
-    
-    CleanupStack::PopAndDestroy(entry);
-}
-
-// -----------------------------------------------------------------------------
-/**
- * Handle updating existing activiy
- * @param dataStorage - data storage
- * @param msg - request message
- */
-void AfStorageSyncTask::UpdateActivityL(CAfStorage& dataStorage, 
-                                        const RMessage2& msg)
-{
-    TPckgBuf<TInt> bitmapHdl(0);
-    CAfEntry *entry = CAfEntry::NewLC();
-    ReadEntryL(*entry, msg);
-    msg.ReadL(1, bitmapHdl);
-        
-    RBuf thumbnailPath;
-    CleanupClosePushL(thumbnailPath);
-    ThumbnailPathL(thumbnailPath, 
-                   dataStorage.Fs(), 
-                   entry->ApplicationId(), 
-                   entry->ActivityId());
-    CreateThumbnailL(thumbnailPath, bitmapHdl());
-    entry->SetImageSrcL(thumbnailPath);
-    dataStorage.UpdateActivityL(*entry);
-    CleanupStack::PopAndDestroy(&thumbnailPath);
-    CleanupStack::PopAndDestroy(entry);
-}
-
-// -----------------------------------------------------------------------------
-/**
- * Handle removing activity.
- * @param dataStorage - data storage
- * @param msg - request message
- */
-void AfStorageSyncTask::DeleteActivityL(CAfStorage& dataStorage, 
-                                        const RMessage2& msg)
-{
-    CAfEntry *entry = CAfEntry::NewLC();
-    ReadEntryL(*entry, msg);
-    dataStorage.DeleteActivityL(*entry);
-    CleanupStack::PopAndDestroy(entry);
-}
-
-// -----------------------------------------------------------------------------
-/**
- * Handle removing all application activities.
- * @param dataStorage - data storage
- * @param msg - request message
- */
-void AfStorageSyncTask::DeleteApplicationActivitiesL(CAfStorage& dataStorage, 
-                                                     const RMessage2& msg)
-{
-    CAfEntry *entry = CAfEntry::NewLC();
-    ReadEntryL(*entry, msg);
-    dataStorage.DeleteActivitiesL(*entry);
-    CleanupStack::PopAndDestroy(entry);
-}
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void AfStorageSyncTask::NotifyChangeL(MAfTaskStorage& observers,
-                                      const RMessage2& msg)
-{
-    const RPointerArray<CAfTask> &table(observers.StorageData());
-    for (TInt iter(table.Count() - 1); 0 <= iter; --iter) {
-        table[iter]->BroadcastReceivedL(msg);
-    }
-}
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void AfStorageSyncTask::ReadEntryL(CAfEntry& entry, const RMessage2& msg)
-{
-    RBuf8 serializedEntry;
-    CleanupClosePushL(serializedEntry);
-    serializedEntry.CreateL(msg.GetDesLengthL(0));
-    msg.ReadL(0, serializedEntry);
-    RDesReadStream reader(serializedEntry);
-    CleanupClosePushL(reader);
-    
-    reader >> entry;
-    
-    CleanupStack::PopAndDestroy(&reader);
-    CleanupStack::PopAndDestroy(&serializedEntry);
-}
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void AfStorageSyncTask::CreateThumbnailL(const TDesC &path, TInt hdl)
-{
-    if (0 >= hdl) {
-        User::Leave(KErrCorrupt);
-    }
-    CFbsBitmap *bitmap = new (ELeave) CFbsBitmap;
-    CleanupStack::PushL(bitmap);
-    User::LeaveIfError(bitmap->Duplicate(hdl));
-    User::LeaveIfError(bitmap->Save(path));
-    CleanupStack::PopAndDestroy(bitmap);
-}
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void AfStorageSyncTask::ThumbnailPathL(RBuf &dst, 
-                                       RFs& fileSystem, 
-                                       TInt uid, 
-                                       const TDesC &activityName)
-{
-    _LIT(KUidFormat, "%+08x\\");
-    _LIT(KExtFormat, ".mbm");
-    //Generate activity hash
-    RBuf8 buff8;
-    CleanupClosePushL(buff8);
-    buff8.CreateL(activityName.Length());
-    buff8.Copy(activityName);
-    HBufC8 *activityHash = Md5HexDigestL(buff8);
-    CleanupStack::PopAndDestroy(&buff8);
-    CleanupStack::PushL(activityHash);
-    
-    //Get private path
-    RBuf privatePath;
-    CleanupClosePushL(privatePath);
-    privatePath.CreateL(KMaxPathLength);
-    User::LeaveIfError(fileSystem.PrivatePath(privatePath));
-    
-    //Format activity path
-    privatePath.AppendFormat( KUidFormat, uid);
-    
-    const TInt requiredSize(privatePath.Length() + 
-                            activityHash->Length() + 
-                            KExtFormat().Length());
-    CAfEntry::ReallocL(dst, requiredSize);
-    
-    //Copy path
-    dst.Copy(privatePath);
-    privatePath.Copy(*activityHash);//reuse already allocated buffer to convert 8 -> 16
-    dst.Append(privatePath);
-    dst.Append(KExtFormat());
-    
-    CleanupStack::PopAndDestroy(&privatePath);
-    CleanupStack::PopAndDestroy(activityHash);
-    
-    BaflUtils::EnsurePathExistsL(fileSystem, dst);
-}
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-HBufC8* AfStorageSyncTask::Md5HexDigestL(const TDes8 &string)
-{
-    _LIT8(KMd5HexFormat, "%+02x");
-    CMD5* md5 = CMD5::NewL();
-    CleanupStack::PushL(md5);
-    
-    TPtrC8 hashedSig(md5->Hash(string));
-    
-    HBufC8* buf = HBufC8::NewL(hashedSig.Length() * 2);
-    TPtr8 bufPtr = buf->Des();
-    
-    for(TInt i(0); i< hashedSig.Length(); ++i) {
-        bufPtr.AppendFormat(KMd5HexFormat,hashedSig[i]);
-    }
-    CleanupStack::PopAndDestroy(md5);
-    return buf;
-}
--- a/activityfw/activitydatabase/hsactivitydbserver/src/afthumbnailtask.cpp	Tue Jun 29 10:20:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,135 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-#include "afthumbnailtask.h"
-#include "activitycmd.h"
-
-#include <fbs.h>
-
-// -----------------------------------------------------------------------------
-/**
- * Constructor for performing 1st stage construction
- */
-CAfThumbnailTask::CAfThumbnailTask(MAfTaskStorage& storage, 
-                                   const RMessage2 msg)
-:
-    mStorage(storage), 
-    mMsg(msg)
-{
-    // No implementation required
-}
-
-// -----------------------------------------------------------------------------
-/**
- * Destructor.
- */
-CAfThumbnailTask::~CAfThumbnailTask()
-{
-    delete mService;
-}
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CAfThumbnailTask::ExecuteLD(MAfTaskStorage& taskStorage,
-                                 const RMessage2& message)
-{
-    CAfThumbnailTask *self = new (ELeave)CAfThumbnailTask(taskStorage, 
-                                                                      message);
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    taskStorage.PushL(self);
-    CleanupStack::Pop(self);
-}
-
-// -----------------------------------------------------------------------------
-/**
- * EPOC default constructor for performing 2nd stage construction
- */
-void CAfThumbnailTask::ConstructL()
-{
-    TPckgBuf<int> width(0), height(0);
-    RBuf path;
-    RBuf8 mime;
-    CleanupClosePushL(path);
-    CleanupClosePushL(mime);
-    mMsg.ReadL(0, width);
-    mMsg.ReadL(1, height);
-    path.CreateL(mMsg.GetDesLengthL(2));
-    mMsg.ReadL(2, path);
-    mime.CreateL(mMsg.GetDesLengthL(3));
-    mMsg.ReadL(3, mime);
-    
-    CFbsBitmap *bitmap = new (ELeave) CFbsBitmap();
-    CleanupStack::PushL(bitmap);
-    User::LeaveIfError(bitmap->Load(path));
-    mService = CTsGraphicFileScalingHandler::NewL(*this, 
-                                                  *bitmap, 
-                                                  TSize(width(), height()), 
-                                                  CTsGraphicFileScalingHandler::EKeepAspectRatioByExpanding);
-    CleanupStack::PopAndDestroy(bitmap);
-
-    CleanupStack::PopAndDestroy(&mime);
-    CleanupStack::PopAndDestroy(&path);
-}
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CAfThumbnailTask::ImageReadyCallBack(TInt error,const CFbsBitmap *bitmap)
-{
-    if (EFalse == mMsg.IsNull() &&
-        KErrNone == error) {
-        mMsg.Write(0, TPckgBuf<int>(const_cast<CFbsBitmap*>(bitmap)->Handle()));
-        mMsg.Write(1, TPckgBuf<void *>(this));
-        mMsg.Complete(error);
-    } else {
-        if (EFalse == mMsg.IsNull()) {
-         mMsg.Complete(error);
-        }
-        mStorage.Pop(this);
-        delete this;
-    }
-}
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-const TDesC8& CAfThumbnailTask::Data() const
-{
-    return KNullDesC8();
-}
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CAfThumbnailTask::BroadcastReceivedL(const RMessage2&)
-{
-}
-
-// -----------------------------------------------------------------------------
-/**
- * Returns ETrue if task is related with session argument
- */
-TBool CAfThumbnailTask::IsSessionTask(const CSession2* session)
-{
-    return mMsg.Session() == session ? ETrue : EFalse;
-}
--- a/activityfw/activitydatabase/hsactivitydbserver/src/main.cpp	Tue Jun 29 10:20:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,63 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-#include "afserver.h"
-#include <e32base.h>
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-LOCAL_C void StartActivityServerL()
-{
-    CActiveScheduler* activeScheduler = new( ELeave ) CActiveScheduler;
-    CleanupStack::PushL( activeScheduler );
-    CActiveScheduler::Install( activeScheduler );
-    CAfServer* serverObject = CAfServer::NewLC();
-    RProcess::Rendezvous( KErrNone );
-    CActiveScheduler::Start();
-    CleanupStack::PopAndDestroy( serverObject );
-    CleanupStack::PopAndDestroy( activeScheduler );
-}
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-LOCAL_C TInt StartActivityServer()
-{
-    __UHEAP_MARK;
-    TInt errNo(KErrNoMemory);
-    CTrapCleanup* cleanupStack = CTrapCleanup::New();
-    if (cleanupStack) {
-        TRAP(errNo, StartActivityServerL());
-        delete cleanupStack;
-    }
-    __UHEAP_MARKEND;
-    if (KErrNone != errNo) {
-        RProcess::Rendezvous(errNo);
-    }
-    return errNo;
-}
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-TInt E32Main()
-{
-    return StartActivityServer();
-}
--- a/activityfw/activitydatabase/inc/activitycmd.h	Tue Jun 29 10:20:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,48 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-#ifndef ACTIVITYCMD_H
-#define ACTIVITYCMD_H
-
-const TInt KRequestAppIdOffset(0);
-const TInt KRequestActOffset(1);
-const TInt KRequestData(2);
-const TInt KRequestIdOffset(0);
-
-const TInt KResponseDataSizeOffset(0);
-const TInt KResponseIdOffset(3);
-const TInt KResponseDataOffset(1);
-
-
-enum ActivityCmd {
-    AddActivity =0,
-    UpdateActivity,
-    RemoveActivity,
-    RemoveApplicationActivities,
-    Activities,
-    ApplicationActivities,
-    ApplicationActivity,
-    WaitActivity,
-    LaunchActivity,
-    GetThumbnail,
-    GetData,
-    NotifyChange,
-    CancelWait,
-    CancelNotify
-};
-
-#endif  //ACTIVITYCMD_H
-
--- a/activityfw/activitydatabase/inc/hsactivitydbclientinterface.h	Tue Jun 29 10:20:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,106 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-#ifndef HSACTIVITYDBCLIENTINTERFACE_H
-#define HSACTIVITYDBCLIENTINTERFACE_H
-#include <qvariant.h>
-#include <activitycmd.h>
-/**
- * Enumerate supported functions
- */
-
-const char ActivityApplicationKeyword [] = ":ApplicationId";
-const char ActivityActivityKeyword [] = ":ActivityName";
-const char ActivityParametersKeyword [] = ":ActivityParams";
-const char ActivityPersistence [] = ":ActivityPersistence";
-const char ActivityVisibility [] = ":ActivityVisibility";
-const char ActivityScreenshotKeyword [] = "screenshot";
-const char ActivityDataKeyword [] = ":ActivityData";
-const char ActivityApplicationName[] = ":ApplicationName";
-
-class HsActivityDbClientInterface
-{
-public:
-
-    /**
-     * Function save provided avtivity in activity storage
-     * @param activity - activity to store
-     * @return 0 on succees, error code otherwise
-     */
-    virtual int addActivity(const QVariantHash &privateData,
-                            const QVariantHash &publicData) =0;
-
-    /**
-     * Function update exiting activity
-     * @param activity - filtering rules
-     * @return 0 on succees, error code otherwise
-     */
-    virtual int updateActivity(const QVariantHash &privateData,
-                               const QVariantHash &publicData) =0;
-
-    /**
-     * Function delete activity
-     * @param activity - filtering rules
-     * @return 0 on succees, error code otherwise
-     */
-    virtual int removeActivity(const QVariantHash &activity) =0;
-
-    /**
-     * Function delete activity for application
-     * @param activity - filtering rules
-     * @return 0 on succees, error code otherwise
-     */
-    virtual int removeApplicationActivities(const QVariantHash &activity) =0;
-
-    /**
-     * Function return list of all activity
-     * @param result - destination list
-     * @return 0 on succees, error code otherwise
-     */
-    virtual int activities(QList<QVariantHash>& result) =0;
-
-    /**
-     * Function return list of all activity
-     * @param result - destination list,
-     * @param activity - filtering rules
-     * @return 0 on succees, error code otherwise
-     */
-    virtual int applicationActivities(QList<QVariantHash>& result,
-                                      const QVariantHash &activity) =0;
-
-    /**
-     * Function returns data for activity
-     * @param result - activity data
-     * @param activity - filtering rules
-     * @return 0 on succees, error code otherwise
-     */
-    virtual int activityData(QVariant &result, const QVariantHash &activity) = 0;
-                                      
-    /**
-     * Function subscribe to activity
-     * @param  activity - filtering rules
-     * @return 0 on succees, error code otherwise
-     */
-    virtual int waitActivity(const QVariantHash &activity)=0;
-
-    /**
-     * Function launch application activity
-     * @param activity - filtering rules
-     * @return 0 on succees, error code otherwise
-     */
-    virtual int launchActivity(const QVariantHash &activity)=0;
-};
-#endif //HSACTIVITYDBCLIENTINTERFACE_H
--- a/activityfw/activitydatabase/s60/inc/afentry.h	Tue Jun 29 10:20:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,130 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-#ifndef AFENTRYDATA_H
-#define AFENTRYDATA_H
-
-#include <e32base.h>
-#include <s32strm.h>
-class RDbColWriteStream;
-class RDbColReadStream;
-const TInt KAfMask(0x0001);
-
-#ifdef AF_ADD_MASK
-#undef AF_ADD_MASK
-#endif
-#define AF_ADD_MASK(n) (KAfMask << n)
-
-class CAfEntry: public CBase
-{
-public:
-    enum AccessRights {
-    Private =0,
-    Public
-    };
-
-    enum Flags {
-    Invisible = KAfMask,
-    Persistent = 0x40000000,
-    };
-
-public:
-    static CAfEntry* NewL();
-
-    static CAfEntry* NewLC();
-
-    static CAfEntry* NewL(TInt flags,
-                          TInt applicationId,
-                          const TDesC &activityId,
-                          const TDesC &imgSrc,
-                          const TDesC8 &privateData,
-                          const TDesC8 &publicData);
-
-    static CAfEntry* NewLC(TInt flags,
-                           TInt applicationId,
-                           const TDesC &activityId,
-                           const TDesC &imgSrc,
-                           const TDesC8 &privateData,
-                           const TDesC8 &publicData);
-
-    ~CAfEntry();
-
-    TInt Size() const;
-
-    TInt DataSize() const;
-
-    void ExternalizeL(RWriteStream &stream) const;
-
-    void InternalizeL(RReadStream &stream);
-
-    void ExternalizeDataOnlyL(RWriteStream &stream) const;
-
-    void InternalizeDataOnlyL(RReadStream &stream);
-
-    TInt Flags() const;
-
-    TInt ApplicationId() const;
-
-    const TDesC& ActivityId() const;
-
-    const TDesC& ImageSrc() const;
-
-    void SetImageSrcL(const TDesC& src);
-
-    const TDesC8& Data(CAfEntry::AccessRights rights) const;
-
-    void SetDataL(const TDesC8& src, CAfEntry::AccessRights rights);
-
-    static void ReallocL(RBuf8 &dst,TInt length);
-
-    static void ReallocL(RBuf &dst,TInt length);
-
-    static void CopyL(RBuf8 &dst,const TDesC8 &src);
-
-    static void CopyL(RBuf &dst,const TDesC &src);
-
-private:
-    CAfEntry();
-
-    void ConstructL(TInt flags,
-                    TInt applicationId,
-                    const TDesC &activityId,
-                    const TDesC &imgSrc,
-                    const TDesC8 &privateData,
-                    const TDesC8 &publicData);
-
-    static void InternalizeL(RBuf8 &dst, RReadStream &src);
-
-    static void InternalizeL(RBuf &dst, RReadStream &src);
-
-    static void ExternalizeL(RWriteStream &dst,const TDesC8 & src);
-
-    static void ExternalizeL(RWriteStream &dst,const TDesC& src);
-private:
-    TInt mFlags;
-    TInt mAppId;
-    RBuf mActivityId;
-    RBuf mImgSrc;
-    RBuf8 mPrivateData;
-    RBuf8 mPublicData;
-
-};
-
-RPointerArray<CAfEntry>& operator <<(RPointerArray<CAfEntry>& dst, const TDesC8 &src);
-
-RBuf8& operator << (RBuf8 &dst, const RPointerArray<CAfEntry>& src);
-
-#endif
--- a/activityfw/activitydatabase/s60/inc/hsactivityglobals.h	Tue Jun 29 10:20:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,26 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-#ifndef ACTIVITYSYMBIAN_H
-#define ACTIVITYSYMBIAN_H
-
-#include <e32base.h>
-const TUid KActivityServerUid = {0x200267B4};
-_LIT(KActivityServerName, "hsactivitydbserver");
-_LIT(KErr400, "Bad Reqest");
-_LIT(KErr403, "Access denied");
-
-#endif
--- a/activityfw/activitydatabase/s60/inc/hsserializer.h	Tue Jun 29 10:20:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,32 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-#ifndef HSSERIALIZER_H
-#define HSSERIALIZER_H
-
-#include <qvariant.h>
-
-/**
- * Operator serialize VarinatHash to RBuf8
- */
-RBuf8 &operator <<(RBuf8 &dst, const QVariantHash &src);
-
-/**
- * Operator deserialize RBuf8 to VarinatHash
- */
-QVariantHash &operator <<(QVariantHash &dst, const TDesC8 &src);
-
-#endif
--- a/activityfw/activitydatabase/s60/src/afentry.cpp	Tue Jun 29 10:20:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,446 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-#include "afentry.h"
-#include <s32mem.h>
-
-// -----------------------------------------------------------------------------
-/**
- * Two-phase constructor. Create and initialize instance
- * @return entry instance
- */
-CAfEntry* CAfEntry::NewL()
-{
-    CAfEntry *self = CAfEntry::NewLC();
-    CleanupStack::Pop(self);
-    return self;
-}
-
-// -----------------------------------------------------------------------------
-/**
- * Two-phase constructor. Create, initialize and push instance into cleanup stack
- * @return entry instance
- */
-CAfEntry* CAfEntry::NewLC()
-{
-    CAfEntry *self = new (ELeave)CAfEntry();
-    CleanupStack::PushL(self);
-    return self;
-}
-
-// -----------------------------------------------------------------------------
-/**
- * Two-phase constructor. Create and initialize instance
- * @param flags - entry flags
- * @param applicationId - application unique identifier
- * @param activityId - activity unique identifier
- * @param imgSrc - thumbanail source
- * @param privateData - privated application data
- * @param publicData - public activity data
- * @return entry instance
- */
-CAfEntry* CAfEntry::NewL(TInt flags,
-                         TInt applicationId,
-                         const TDesC &activityId,
-                         const TDesC &imgSrc,
-                         const TDesC8 &privateData,
-                         const TDesC8 &publicData)
-{
-    CAfEntry* self = CAfEntry::NewLC(flags, 
-                                     applicationId, 
-                                     activityId, 
-                                     imgSrc, 
-                                     privateData, 
-                                     publicData);
-    CleanupStack::Pop(self);
-    return self;
-}
-
-// -----------------------------------------------------------------------------
-/**
- * Two-phase constructor. Create, initialize and push instance into cleanup stack
- * @param flags - entry flags
- * @param applicationId - application unique identifier
- * @param activityId - activity unique identifier
- * @param imgSrc - thumbanail source
- * @param privateData - privated application data
- * @param publicData - public activity data
- * @return entry instance
- */
-CAfEntry* CAfEntry::NewLC(TInt flags,
-                          TInt applicationId,
-                          const TDesC &activityId,
-                          const TDesC &imgSrc,
-                          const TDesC8 &privateData,
-                          const TDesC8 &publicData)
-{
-    CAfEntry *self = CAfEntry::NewLC();
-    self->ConstructL(flags, 
-                     applicationId, 
-                     activityId, 
-                     imgSrc, 
-                     privateData, 
-                     publicData);
-    return self;
-}
-
-// -----------------------------------------------------------------------------
-/**
- * First phase constructor
- */
-CAfEntry::CAfEntry()
-{
-}
-
-// -----------------------------------------------------------------------------
-/**
- * Second phase constructor. Initialize instance
- * @param flags - entry flags
- * @param applicationId - application unique identifier
- * @param activityId - activity unique identifier
- * @param imgSrc - thumbanail source
- * @param privateData - privated application data
- * @param publicData - public activity data 
- */
-void CAfEntry::ConstructL(TInt flags,
-                          TInt applicationId,
-                          const TDesC &activityId,
-                          const TDesC &imgSrc,
-                          const TDesC8 &privateData,
-                          const TDesC8 &publicData)
-{
-    mFlags = flags;
-    mAppId = applicationId;
-    CopyL(mActivityId, activityId);
-    CopyL(mImgSrc, imgSrc);
-    CopyL(mPrivateData, privateData);
-    CopyL(mPublicData, publicData);
-}
-
-// -----------------------------------------------------------------------------
-/**
- * Destructor. Release allocated resources 
- */
-CAfEntry::~CAfEntry()
-{
-    mActivityId.Close();
-    mPrivateData.Close();
-    mPublicData.Close();
-    mImgSrc.Close();
-}
-
-// -----------------------------------------------------------------------------
-/**
- * Provide size of serialized entry
- * @return size of serialized entry instance
- */
-TInt CAfEntry::Size() const
-{
-    return (sizeof(TInt) * 3) + //flags + appId + actId size info 
-           mActivityId.Size() + //actId content size
-           DataSize(); //data size
-           
-}
-
-// -----------------------------------------------------------------------------
-/**
- * Provide size of serialized entry
- * @return size of serialized entry instance
- */
-TInt CAfEntry::DataSize() const
-{
-    return (sizeof(TInt) * 3) + //privData size info + pubData size info + imgSrc size info
-            mImgSrc.Size() + //imgSize content size
-            mPrivateData.Size() + //privData content size
-            mPublicData.Size(); //pubData content size 
-}
-// -----------------------------------------------------------------------------
-/**
- * Serialize entry content into output stream.
- * @param stream - output stream
- */
-void CAfEntry::ExternalizeL(RWriteStream &stream) const
-{
-    stream.WriteInt32L(mFlags);
-    stream.WriteInt32L(mAppId);
-    ExternalizeL(stream, mActivityId);
-    ExternalizeDataOnlyL(stream);
-}
-
-// -----------------------------------------------------------------------------
-/**
- * Deserialize entry content from input stream
- * @param stream - input stream
- */
-void CAfEntry::InternalizeL(RReadStream &stream)
-{
-    mFlags = stream.ReadInt32L();
-    mAppId = stream.ReadInt32L();
-    InternalizeL(mActivityId, stream);
-    InternalizeDataOnlyL(stream);
-}
-
-// -----------------------------------------------------------------------------
-/**
- * Serialize entry content into output stream.
- * @param stream - output stream
- */
-void CAfEntry::ExternalizeDataOnlyL(RWriteStream &stream) const
-{
-    ExternalizeL(stream, mImgSrc);
-    ExternalizeL(stream, mPrivateData);
-    ExternalizeL(stream, mPublicData);
-}
-
-// -----------------------------------------------------------------------------
-/**
- * Deserialize entry content from input stream
- * @param stream - input stream
- */
-void CAfEntry::InternalizeDataOnlyL(RReadStream &stream)
-{
-    
-    InternalizeL(mImgSrc, stream);
-    InternalizeL(mPrivateData, stream);
-    InternalizeL(mPublicData, stream);
-    
-}
-
-// -----------------------------------------------------------------------------
-/**
- * Provide access to activity flags
- * @return activity flags 
- */
-TInt CAfEntry::Flags() const
-{
-    return mFlags;
-}
-
-// -----------------------------------------------------------------------------
-/**
- * Provide access to activity identifier.
- * @return activity identifier
- */
-TInt CAfEntry::ApplicationId() const
-{
-    return mAppId;
-}
-
-// -----------------------------------------------------------------------------
-/**
- * Provide access to activity identifier.
- * @return activity identifier
- */
-const TDesC& CAfEntry::ActivityId() const
-{
-    return mActivityId;
-}
-
-// -----------------------------------------------------------------------------
-/**
- * Provide access to activity data.
- * @param rights - type of requested data
- * @return activity data
- */
-const TDesC8& CAfEntry::Data(CAfEntry::AccessRights rights) const
-{
-    return Private == rights ? mPrivateData : mPublicData;
-}
-
-// -----------------------------------------------------------------------------
-/**
- * Provide access to activity data.
- * @param rights - type of requested data
- * @return activity data
- */
-void CAfEntry::SetDataL(const TDesC8& src, CAfEntry::AccessRights rights)
-{
-    CopyL(Private == rights ? mPrivateData : mPublicData, src);
-}
-
-// -----------------------------------------------------------------------------
-/**
- * Provide access to activity thumbail path
- * @return path to activity thumbnail 
- */
-const TDesC& CAfEntry::ImageSrc() const
-{
-    return mImgSrc;
-}
-
-// -----------------------------------------------------------------------------
-/**
- * Set new value of image source
- */
-void CAfEntry::SetImageSrcL(const TDesC& src)
-{
-    CopyL(mImgSrc, src);
-}
-
-// -----------------------------------------------------------------------------
-/**
- * Reallocate blob buffer to requested size
- * @param dst - destination buffer
- * @param length - requested length
- */
-void CAfEntry::ReallocL(RBuf8 &dst,TInt length)
-{
-    if (0 < length) {
-        if (dst.MaxLength() < length) {
-            dst.ReAllocL(length);
-        }
-    } else {
-        dst.Close();
-    }
-}
-
-// -----------------------------------------------------------------------------
-/**
- * Reallocate text buffer to requested size
- * @param dst - destination buffer
- * @param length - requested length
- */
-void CAfEntry::ReallocL(RBuf &dst,TInt length)
-{
-    if (0 < length) {
-        if (dst.MaxLength() < length) {
-            dst.ReAllocL(length);
-        }
-    } else {
-        dst.Close();
-    }
-}
-// -----------------------------------------------------------------------------
-/**
- * Copy blob content from input stream
- * @param dst - destination buffer
- * @param src - source buffer
- */
-void CAfEntry::CopyL(RBuf8 &dst,const TDesC8 &src)
-{
-    ReallocL(dst, src.Length());
-    if(0 < src.Length()) {
-        dst.Copy(src);
-    }
-}
-
-// -----------------------------------------------------------------------------
-/**
- * Copy text content from input buffer
- * @param dst - destination buffer
- * @param src - source buffer
- */
-void CAfEntry::CopyL(RBuf &dst,const TDesC &src)
-{
-    ReallocL(dst, src.Length());
-    if(0 < src.Length()) {
-        dst.Copy(src);
-    }
-}
-
-// -----------------------------------------------------------------------------
-/**
- * Deserialize blob content from input stream
- * @param dst - destination buffer
- * @param src - input stream
- */
-void CAfEntry::InternalizeL(RBuf8 &dst, RReadStream &src)
-{
-    const TInt length(src.ReadInt32L());
-    ReallocL(dst, length);
-    if (0 < length) {
-        src.ReadL(dst, length);
-    }
-}
-
-// -----------------------------------------------------------------------------
-/**
- * Deserialize text content from input stream
- * @param dst - destination buffer
- * @param src - input stream
- */
-void CAfEntry::InternalizeL(RBuf &dst, RReadStream &src)
-{
-    const TInt length(src.ReadInt32L());
-    ReallocL(dst, length);
-    if (0 < length) {
-        src.ReadL(dst, length);
-    }
-}
-
-// -----------------------------------------------------------------------------
-/**
- * Serialize blob content into output stream
- * @param dst - destination stream
- * @param src - input buffer
- */
-void CAfEntry::ExternalizeL(RWriteStream &dst,const TDesC8 & src)
-{
-    dst.WriteInt32L(src.Length());
-    if (src.Length()) {
-        dst.WriteL(src, src.Length());
-    }
-}
-
-// -----------------------------------------------------------------------------
-/**
- * Serialize text content into output stream
- * @param dst - destination stream
- * @param src - input buffer
- */
-void CAfEntry::ExternalizeL(RWriteStream &dst,const TDesC& src)
-{
-    dst.WriteInt32L(src.Length());
-    if (src.Length()) {
-        dst.WriteL(src, src.Length());
-    }
-}
-
-// -----------------------------------------------------------------------------
-RPointerArray<CAfEntry>& operator <<(RPointerArray<CAfEntry>& dst, const TDesC8 &src)
-{
-    dst.ResetAndDestroy();
-    RDesReadStream srcStream(src);
-    CleanupClosePushL(srcStream);
-    int numOfItems(srcStream.ReadInt32L());
-    for (int i(0); i < numOfItems; ++i) {
-        CAfEntry *entry = CAfEntry::NewLC();
-        srcStream >> (*entry);
-        dst.AppendL(entry);
-        CleanupStack::Pop(entry);
-    }
-    CleanupStack::PopAndDestroy(&srcStream);
-    return dst;
-}
-
-// -----------------------------------------------------------------------------
-RBuf8& operator <<(RBuf8 &dst, const RPointerArray<CAfEntry>& src)
-{
-    int iter(0), 
-        requiredSize(sizeof(int));
-    for(iter =0; iter< src.Count(); ++iter) {
-        requiredSize += src[iter]->Size();
-    }
-    CAfEntry::ReallocL(dst, requiredSize);
-    RDesWriteStream dstStream(dst);
-    CleanupClosePushL(dstStream);
-    dstStream.WriteInt32L(src.Count());
-    for (iter =0; iter < src.Count(); ++iter) {
-        dstStream << *(src[iter]);
-    }
-    CleanupStack::PopAndDestroy(&dstStream);
-    return dst;
-}
--- a/activityfw/activitydatabase/s60/src/hsserializer.cpp	Tue Jun 29 10:20:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,50 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-#include <s32mem.h>
-#include "hsserializer.h"
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-RBuf8 &operator <<(RBuf8 &dst, const QVariantHash &src)
-{
-    QByteArray buffer;
-    QDataStream stream(&buffer, QIODevice::WriteOnly);
-
-    QT_TRYCATCH_LEAVING(stream << src);
-    const int dataLength(buffer.length());
-    const unsigned char *dataPtr(reinterpret_cast<const unsigned char *>(buffer.constData()));
-    if (dst.MaxLength() < dataLength) {
-        dst.ReAllocL(dataLength);
-    }
-    dst.Copy(dataPtr, dataLength);
-    return dst;
-}
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-QVariantHash &operator <<(QVariantHash &dst, const TDesC8 &src)
-{
-    QByteArray buffer(QByteArray::fromRawData(reinterpret_cast<const char *>(src.Ptr()),
-                                               src.Length()) );
-
-    QDataStream stream(&buffer, QIODevice::ReadOnly);
-    QT_TRYCATCH_LEAVING(stream >> dst);
-    return dst;
-}
--- a/activityfw/activityserviceplugin/activityserviceplugin.pro	Tue Jun 29 10:20:30 2010 +0300
+++ b/activityfw/activityserviceplugin/activityserviceplugin.pro	Fri Jul 09 14:19:08 2010 +0300
@@ -23,15 +23,15 @@
 INCLUDEPATH += ./inc \
                ../../inc
 
-HEADERS +=  ./inc/activityserviceplugin.h \
-            ./inc/afactivityclient.h \
-            ./inc/afactivitymanager.h \
-            ./inc/applicationlauncher.h \
+HEADERS +=  ./inc/afserviceplugin.h \
+            ./inc/afclient.h \
+            ./inc/afmanager.h \
+            ./inc/aflauncher.h \
 
-SOURCES +=  ./src/activityserviceplugin.cpp \
-            ./src/afactivityclient.cpp \
-            ./src/afactivitymanager.cpp \
-            ./src/applicationlauncher.cpp \
+SOURCES +=  ./src/afserviceplugin.cpp \
+            ./src/afclient.cpp \
+            ./src/afmanager.cpp \
+            ./src/aflauncher.cpp \
 
 symbian {
     INCLUDEPATH += ./s60/inc \
--- a/activityfw/activityserviceplugin/inc/activityserviceplugin.h	Tue Jun 29 10:20:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,35 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-#ifndef ACTIVITYSERVICEPLUGIN_H
-#define ACTIVITYSERVICEPLUGIN_H
-
-#include <QObject>
-#include <qserviceplugininterface.h>
-
-QTM_USE_NAMESPACE
-
-class ActivityServicePlugin : public QObject, public QServicePluginInterface
-{
-    Q_OBJECT
-    Q_INTERFACES(QtMobility::QServicePluginInterface)
-
-public:
-    QObject *createInstance(const QServiceInterfaceDescriptor &descriptor, QServiceContext *context, QAbstractSecuritySession *session);
-
-};
-
-#endif //ACTIVITYSERVICEPLUGIN_H
--- a/activityfw/activityserviceplugin/inc/afactivityclient.h	Tue Jun 29 10:20:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,51 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-#ifndef AFACTIVITYCLIENT_H
-#define AFACTIVITYCLIENT_H
-
-#include <QObject>
-#include <QVariant>
-#include <QString>
-
-#include <afstorageclient.h>
-
-class ActivityClient : public QObject
-{
-
-    Q_OBJECT
-
-public:
-    ActivityClient(const QSharedPointer<AfStorageClient> &serviceProvider,QObject *parent = 0);
-    ~ActivityClient();
-
-public slots:
-    bool addActivity(const QString &activityId, const QVariant &data, const QVariantHash &parameters);
-    bool removeActivity(const QString &activityId);
-    bool updateActivity(const QString &activityId, const QVariant &data, const QVariantHash &parameters);
-    QList<QVariantHash> activities() const;
-    QVariant activityData(const QString &activityId) const;
-    QVariantHash parseCommandLine(const QStringList &commandLineParams) const;
-
-signals:
-    void activityRequested(const QString &activityId);
-
-private:
-    QSharedPointer<AfStorageClient> mServiceProvider;
-    bool mIsconnected;
-};
-
-#endif // AFACTIVITYCLIENT_H
--- a/activityfw/activityserviceplugin/inc/afactivitymanager.h	Tue Jun 29 10:20:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,56 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-#ifndef AFACTIVITYMANAGER_H
-#define AFACTIVITYMANAGER_H
-
-#include <QObject>
-#include <QVariant>
-#include <QList>
-#include <QPixmap>
-#include <QSize>
-
-#include <afstorageclient.h>
-
-class ActivityManager : public QObject
-{
-
-    Q_OBJECT
-
-public:
-    ActivityManager(const QSharedPointer<AfStorageClient> &serviceProvider, QObject *parent = 0);
-    ~ActivityManager();
-
-public slots:
-    QList<QVariantHash> activitiesList();
-    void launchActivity(const QString &uri);
-    void launchActivity(const QUrl &uri);
-    void launchActivity(int applicationId, const QString &activityId, const QVariantHash& parameters = QVariantHash());
-    void getThumbnail(QSize resolution,const QString &thumbnailPath, void *data =0);
-
-signals:
-    void thumbnailReady(QPixmap, void *);
-    void dataChanged();
-
-private:
-    void launchActivity(const QVariantHash& activity);
-    QUrl activityToUri(const QVariantHash& activity) const;
-
-private:
-    QSharedPointer<AfStorageClient> mServiceProvider;
-};
-
-#endif // AFACTIVITYMANAGER_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/activityfw/activityserviceplugin/inc/afclient.h	Fri Jul 09 14:19:08 2010 +0300
@@ -0,0 +1,54 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+#ifndef AFCLIENT_H
+#define AFCLIENT_H
+
+#include <QObject>
+#include <QVariant>
+#include <QString>
+
+#include <afstorageclient.h>
+
+class AfClient : public QObject
+{
+
+    Q_OBJECT
+
+public:
+    AfClient(const QSharedPointer<AfStorageClient> &serviceProvider,QObject *parent = 0);
+    ~AfClient();
+
+public slots:
+    bool addActivity(const QString &activityId, const QVariant &data, const QVariantHash &parameters);
+    bool removeActivity(const QString &activityId);
+    bool updateActivity(const QString &activityId, const QVariant &data, const QVariantHash &parameters);
+    QList<QVariantHash> activities() const;
+    QVariant activityData(const QString &activityId) const;
+    QVariantHash parseCommandLine(const QStringList &commandLineParams) const;
+
+private slots:
+    void bringToForeground();
+    
+signals:
+    void activityRequested(const QString &activityId);
+
+private:
+    QSharedPointer<AfStorageClient> mServiceProvider;
+    bool mIsconnected;
+};
+
+#endif // AFCLIENT_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/activityfw/activityserviceplugin/inc/aflauncher.h	Fri Jul 09 14:19:08 2010 +0300
@@ -0,0 +1,42 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+#ifndef AFLAUNCHER_H
+#define AFLAUNCHER_H
+
+class ApplicationLauncherPrivate;
+
+#include <QString>
+#include <QUrl>
+
+class AfLauncher
+{
+
+public:
+    AfLauncher();
+    ~AfLauncher();
+
+public:
+    bool isRunning(int applicationId);
+    void startApplication(int applicationId, const QUrl &uri);
+    void bringToForeground(int applicationId);
+
+private:
+    ApplicationLauncherPrivate *d_ptr;
+
+};
+
+#endif // AFLAUNCHER_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/activityfw/activityserviceplugin/inc/afmanager.h	Fri Jul 09 14:19:08 2010 +0300
@@ -0,0 +1,56 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+#ifndef AFMANAGER_H
+#define AFMANAGER_H
+
+#include <QObject>
+#include <QVariant>
+#include <QList>
+#include <QPixmap>
+#include <QSize>
+
+#include <afstorageclient.h>
+
+class AfManager : public QObject
+{
+
+    Q_OBJECT
+
+public:
+    AfManager(const QSharedPointer<AfStorageClient> &serviceProvider, QObject *parent = 0);
+    ~AfManager();
+
+public slots:
+    QList<QVariantHash> activitiesList();
+    void launchActivity(const QString &uri);
+    void launchActivity(const QUrl &uri);
+    void launchActivity(int applicationId, const QString &activityId, const QVariantHash& parameters = QVariantHash());
+    void getThumbnail(QSize resolution,const QString &thumbnailPath, void *data =0);
+
+signals:
+    void thumbnailReady(QPixmap, void *);
+    void dataChanged();
+
+private:
+    void launchActivity(const QVariantHash& activity);
+    QUrl activityToUri(const QVariantHash& activity) const;
+
+private:
+    QSharedPointer<AfStorageClient> mServiceProvider;
+};
+
+#endif // AFMANAGER_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/activityfw/activityserviceplugin/inc/afserviceplugin.h	Fri Jul 09 14:19:08 2010 +0300
@@ -0,0 +1,35 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+#ifndef AFSERVICEPLUGIN_H
+#define AFSERVICEPLUGIN_H
+
+#include <QObject>
+#include <qserviceplugininterface.h>
+
+QTM_USE_NAMESPACE
+
+class AfServicePlugin : public QObject, public QServicePluginInterface
+{
+    Q_OBJECT
+    Q_INTERFACES(QtMobility::QServicePluginInterface)
+
+public:
+    QObject *createInstance(const QServiceInterfaceDescriptor &descriptor, QServiceContext *context, QAbstractSecuritySession *session);
+
+};
+
+#endif //AFSERVICEPLUGIN_H
--- a/activityfw/activityserviceplugin/inc/applicationlauncher.h	Tue Jun 29 10:20:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,42 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-#ifndef APPLICATIONLAUNCHER_H
-#define APPLICATIONLAUNCHER_H
-
-class ApplicationLauncherPrivate;
-
-#include <QString>
-#include <QUrl>
-
-class ApplicationLauncher
-{
-
-public:
-    ApplicationLauncher();
-    ~ApplicationLauncher();
-
-public:
-    bool isRunning(int applicationId);
-    void startApplication(int applicationId, const QUrl &uri);
-    void bringToForeground(int applicationId);
-
-private:
-    ApplicationLauncherPrivate *d_ptr;
-
-};
-
-#endif // APPLICATIONLAUNCHER_H
--- a/activityfw/activityserviceplugin/s60/src/applicationlauncher_p.cpp	Tue Jun 29 10:20:30 2010 +0300
+++ b/activityfw/activityserviceplugin/s60/src/applicationlauncher_p.cpp	Fri Jul 09 14:19:08 2010 +0300
@@ -34,7 +34,7 @@
 {
     QString commandLine = QString("-activity %1").arg(QString(uri.toEncoded()));
 
-    QT_TRAP_THROWING( {
+    TRAP_IGNORE(
         HBufC *commandLineAsDescriptor = XQConversions::qStringToS60Desc(commandLine);
         CleanupStack::PushL(commandLineAsDescriptor);
 
@@ -43,20 +43,15 @@
         CleanupClosePushL(apaLsSession);
 
         TApaAppInfo appInfo;
-        TInt retVal = apaLsSession.GetAppInfo(appInfo, TUid::Uid(applicationId));
+        User::LeaveIfError(apaLsSession.GetAppInfo(appInfo, TUid::Uid(applicationId)));
 
-        if (retVal == KErrNone) {
-            RProcess application;
-            User::LeaveIfError(application.Create(appInfo.iFullName, *commandLineAsDescriptor));
-            application.Resume();
-        } else {
-            // @todo ?
-        }
+        RProcess application;
+        User::LeaveIfError(application.Create(appInfo.iFullName, *commandLineAsDescriptor));
+        application.Resume();
 
         CleanupStack::PopAndDestroy(&apaLsSession);
         CleanupStack::PopAndDestroy(commandLineAsDescriptor);
-    }
-                    );
+    );
 }
 
 void ApplicationLauncherPrivate::bringToForeground(int applicationId)
--- a/activityfw/activityserviceplugin/src/activityserviceplugin.cpp	Tue Jun 29 10:20:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,41 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-#include "activityserviceplugin.h"
-
-#include <qserviceinterfacedescriptor.h>
-#include <qabstractsecuritysession.h>
-#include <qservicecontext.h>
-
-#include "afactivityclient.h"
-#include "afactivitymanager.h"
-
-QObject *ActivityServicePlugin::createInstance(const QServiceInterfaceDescriptor &descriptor, QServiceContext *context, QAbstractSecuritySession *session)
-{
-    Q_UNUSED(context);
-    Q_UNUSED(session);
-
-    if (descriptor.interfaceName() == "com.nokia.qt.activities.ActivityClient") {
-        return new ActivityClient(QSharedPointer<AfStorageClient>(new AfStorageClient()));
-    } else if (descriptor.interfaceName() == "com.nokia.qt.activities.ActivityManager") {
-        return new ActivityManager(QSharedPointer<AfStorageClient>(new AfStorageClient()));
-    } else {
-        return NULL;
-    }
-}
-
-Q_EXPORT_PLUGIN2(activityserviceplugin, ActivityServicePlugin)
--- a/activityfw/activityserviceplugin/src/afactivityclient.cpp	Tue Jun 29 10:20:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,138 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-#include <QCoreApplication>
-#include <QStringList>
-#include <QTimer>
-#include <QUrl>
-#include <QDebug>
-#include <QDir>
-
-#include <afstorageentry.h>
-#include <afstorageglobals.h>
-
-#include "afactivityclient.h"
-ActivityClient::ActivityClient(const QSharedPointer<AfStorageClient> &serviceProvider, QObject *parent) 
-: 
-    QObject(parent),
-    mServiceProvider(serviceProvider),
-    mIsconnected(false)
-{
-    mIsconnected = ( KErrNone == mServiceProvider->connect());
-    if( mIsconnected) {
-        mServiceProvider->waitActivity();
-    }
-    connect(mServiceProvider.data(), SIGNAL(activityRequested(QString)), this, SIGNAL(activityRequested(QString)));
-}
-
-ActivityClient::~ActivityClient()
-{
-}
-
-bool ActivityClient::addActivity(const QString &activityId, const QVariant &data, const QVariantHash &parameters)
-{
-    bool result(mIsconnected);
-    if (result) {
-        QVariantHash publicData(parameters);
-        
-        QPixmap screenshot(publicData[ActivityScreenshotKeyword].value<QPixmap>());
-        publicData.remove(ActivityScreenshotKeyword);
-        
-        RProcess process;
-        publicData.insert(ActivityApplicationKeyword, static_cast<int>(process.SecureId().iId));
-        publicData.insert(ActivityActivityKeyword, activityId);
-        AfStorageEntry entry(process.SecureId().iId, activityId, data, publicData);
-        result = (KErrNone == mServiceProvider->addActivity(entry, screenshot));
-    }
-    return result;
-}
-
-bool ActivityClient::removeActivity(const QString &activityId)
-{
-    bool result(mIsconnected);
-    if (result) {
-        RProcess process;
-        AfStorageEntry entry(process.SecureId().iId, activityId);
-        result = (KErrNone == mServiceProvider->removeActivity(entry));
-    }
-    return result;
-}
-
-bool ActivityClient::updateActivity(const QString &activityId, const QVariant &data, const QVariantHash &parameters)
-{
-    bool result(mIsconnected);
-    if (result) {
-        QVariantHash publicData(parameters);
-        QPixmap screenshot(publicData[ActivityScreenshotKeyword].value<QPixmap>());
-        publicData.remove(ActivityScreenshotKeyword);
-        RProcess process;
-        publicData.insert(ActivityApplicationKeyword, static_cast<int>(process.SecureId().iId));
-        publicData.insert(ActivityActivityKeyword, activityId);
-        AfStorageEntry entry(process.SecureId().iId, activityId, data, publicData);
-        result = (KErrNone == mServiceProvider->updateActivity(entry, screenshot));
-    }
-    return result;
-}
-
-QList<QVariantHash> ActivityClient::activities() const
-{
-    QList<QVariantHash> retVal;
-    if (mIsconnected) {
-        RProcess process;
-        AfStorageEntry entry(process.SecureId().iId);
-        QList<AfStorageEntry> activities;
-        mServiceProvider->applicationActivities(activities, entry);
-        
-        QList<AfStorageEntry>::iterator iter(activities.begin());
-        for (; activities.end() != iter; iter = activities.erase(iter)) {
-            retVal.append((*iter).publicData());
-        }
-    }
-    return retVal;
-}
-
-QVariant ActivityClient::activityData(const QString &activityId) const
-{
-    QVariant data;
-    if (mIsconnected) {
-        RProcess process;
-        AfStorageEntry entry(static_cast<int>(process.SecureId().iId), activityId), result;
-        if (0 == mServiceProvider->activityData(result, entry)) {
-            data = result.privateData();
-        }
-    }
-    return data;
-}
-
-QVariantHash ActivityClient::parseCommandLine(const QStringList &commandLineParams) const
-{
-     QVariantHash activityParams;
-    int activityMarkerIndex = commandLineParams.indexOf("-activity");
-    if (activityMarkerIndex != -1 && commandLineParams.count() - 1 > activityMarkerIndex) {
-        QUrl activityUri = QUrl::fromEncoded(commandLineParams.at(activityMarkerIndex+1).toAscii());
-        if (activityUri.scheme() == "appto") {
-            QList<QPair<QString, QString> > parameters = activityUri.queryItems();
-            for (QList<QPair<QString, QString> >::const_iterator i = parameters.constBegin(); i != parameters.constEnd(); ++i) {
-                activityParams.insert(i->first, i->second);
-            }
-
-            if (activityParams.contains("activityname") && !activityParams.value("activityname").toString().isEmpty()) {
-                return activityParams;
-            }
-        }
-    }
-    return QVariantHash();
-}
--- a/activityfw/activityserviceplugin/src/afactivitymanager.cpp	Tue Jun 29 10:20:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,142 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-#include <QStringList>
-#include <QUrl>
-
-#include <afstorageclient.h>
-#include <afstorageentry.h>
-#include <afstorageglobals.h>
-
-#include "afactivitymanager.h"
-#include "applicationlauncher.h"
-
-ActivityManager::ActivityManager(const QSharedPointer<AfStorageClient> &serviceProvider, 
-                                 QObject *parent) 
-: 
-    QObject(parent), 
-    mServiceProvider(serviceProvider)
-{
-    if(0 == mServiceProvider->connect()){
-        mServiceProvider->notifyDataChange();
-    }
-    connect(mServiceProvider.data(),
-            SIGNAL(thumbnailRequested(QPixmap, void *)),
-            this,
-            SIGNAL(thumbnailReady(QPixmap, void *)));
-    connect(mServiceProvider.data(),
-            SIGNAL(dataChanged()),
-            this,
-            SIGNAL(dataChanged()));
-}
-
-ActivityManager::~ActivityManager()
-{
-}
-
-QList<QVariantHash> ActivityManager::activitiesList()
-{
-    QList<AfStorageEntry> results;
-    mServiceProvider->activities(results);
-    
-    QList<QVariantHash> retVal;
-    QList<AfStorageEntry>::iterator iter(results.begin());
-    for (; iter != results.end(); iter = results.erase(iter)) {
-        retVal.append((*iter).publicData());
-    }
-    return retVal;
-}
-
-void ActivityManager::launchActivity(const QUrl &uri)
-{
-    if (uri.scheme() != "appto")
-        return;
-
-    bool conversionOk(false);
-    int applicationId = uri.host().toUInt(&conversionOk, 16);   
-    if (!conversionOk)
-        return;
-        
-    QVariantHash activity;
-    activity.insert(ActivityApplicationKeyword, applicationId);
-    
-    QVariantHash parameters;
-    QList<QPair<QString, QString> > uriParams = uri.queryItems();
-    for (QList<QPair<QString, QString> >::const_iterator i = uriParams.constBegin(); i != uriParams.constEnd(); ++i) {
-        parameters.insert(i->first, i->second);
-    }
-
-    if (parameters.contains("activityname")) {
-        activity.insert(ActivityActivityKeyword, parameters.value("activityname").toString());
-        parameters.remove("activityname");
-    }
-    
-    activity.insert(ActivityParametersKeyword, parameters);
-    
-    launchActivity(activity);
-}
-
-void ActivityManager::launchActivity(const QString &uri)
-{
-    qWarning("AfActivityManager::launchActivity(const QString &uri) is deprecated, use AfActivityManager::launchActivity(const QUrl &uri) instead");
-    launchActivity(QUrl(uri));
-}
-
-void ActivityManager::launchActivity(int applicationId, const QString &activityId, const QVariantHash& parameters)
-{
-    QVariantHash activity;
-    activity.insert(ActivityApplicationKeyword, applicationId);
-    activity.insert(ActivityActivityKeyword, activityId);
-    activity.insert(ActivityParametersKeyword, parameters);
-    
-    launchActivity(activity);
-}
-
-void ActivityManager::getThumbnail(QSize resolution,const QString &thumbnailPath, void *data)
-{
-    mServiceProvider->getThumbnail(resolution, thumbnailPath, data);
-}
-
-void ActivityManager::launchActivity(const QVariantHash& activity)
-{
-    ApplicationLauncher applicationLauncher;
-    int applicationId = activity.value(ActivityApplicationKeyword).toInt();
-    AfStorageEntry entry(applicationId, 
-                         activity[ActivityActivityKeyword].toString());
-    if (applicationLauncher.isRunning(applicationId)) {
-        mServiceProvider->launchActivity(entry);
-        applicationLauncher.bringToForeground(applicationId);
-    } else {
-        applicationLauncher.startApplication(applicationId, activityToUri(activity));
-    }
-}
-
-QUrl ActivityManager::activityToUri(const QVariantHash& activity) const
-{
-    QUrl uri;
-    uri.setScheme("appto");
-    uri.setHost(QString("%1").arg(activity.value(ActivityApplicationKeyword).toUInt(), 8, 16, QChar('0')));
-    
-    if (activity.contains(ActivityActivityKeyword))
-        uri.addQueryItem("activityname", activity.value(ActivityActivityKeyword).toString());
-    
-    QVariantHash parameters = activity.value(ActivityParametersKeyword).toHash();
-    foreach(const QString &key, parameters.keys()) {
-        uri.addQueryItem(key, parameters.value(key).toString());
-    } 
-    return uri;
-}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/activityfw/activityserviceplugin/src/afclient.cpp	Fri Jul 09 14:19:08 2010 +0300
@@ -0,0 +1,150 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+#include "afclient.h"
+
+#include <QCoreApplication>
+#include <QStringList>
+#include <QTimer>
+#include <QUrl>
+#include <QDebug>
+#include <QDir>
+
+#include <afstorageentry.h>
+#include <afstorageglobals.h>
+
+#include "aflauncher.h"
+
+AfClient::AfClient(const QSharedPointer<AfStorageClient> &serviceProvider, QObject *parent) 
+: 
+    QObject(parent),
+    mServiceProvider(serviceProvider),
+    mIsconnected(false)
+{
+    mIsconnected = ( KErrNone == mServiceProvider->connect());
+    if( mIsconnected) {
+        mServiceProvider->waitActivity();
+    }
+    connect(mServiceProvider.data(), SIGNAL(activityRequested(QString)), this, SIGNAL(activityRequested(QString)));
+    connect(mServiceProvider.data(), SIGNAL(activityRequested(QString)), this, SLOT(bringToForeground()));
+}
+
+AfClient::~AfClient()
+{
+}
+
+bool AfClient::addActivity(const QString &activityId, const QVariant &data, const QVariantHash &parameters)
+{
+    bool result(mIsconnected);
+    if (result) {
+        QVariantHash publicData(parameters);
+        
+        QPixmap screenshot(publicData[ActivityScreenshotKeyword].value<QPixmap>());
+        publicData.remove(ActivityScreenshotKeyword);
+        
+        RProcess process;
+        publicData.insert(ActivityApplicationKeyword, static_cast<int>(process.SecureId().iId));
+        publicData.insert(ActivityActivityKeyword, activityId);
+        AfStorageEntry entry(process.SecureId().iId, activityId, data, publicData);
+        result = (KErrNone == mServiceProvider->addActivity(entry, screenshot));
+    }
+    return result;
+}
+
+bool AfClient::removeActivity(const QString &activityId)
+{
+    bool result(mIsconnected);
+    if (result) {
+        RProcess process;
+        AfStorageEntry entry(process.SecureId().iId, activityId);
+        result = (KErrNone == mServiceProvider->removeActivity(entry));
+    }
+    return result;
+}
+
+bool AfClient::updateActivity(const QString &activityId, const QVariant &data, const QVariantHash &parameters)
+{
+    bool result(mIsconnected);
+    if (result) {
+        QVariantHash publicData(parameters);
+        QPixmap screenshot(publicData[ActivityScreenshotKeyword].value<QPixmap>());
+        publicData.remove(ActivityScreenshotKeyword);
+        RProcess process;
+        publicData.insert(ActivityApplicationKeyword, static_cast<int>(process.SecureId().iId));
+        publicData.insert(ActivityActivityKeyword, activityId);
+        AfStorageEntry entry(process.SecureId().iId, activityId, data, publicData);
+        result = (KErrNone == mServiceProvider->updateActivity(entry, screenshot));
+    }
+    return result;
+}
+
+QList<QVariantHash> AfClient::activities() const
+{
+    QList<QVariantHash> retVal;
+    if (mIsconnected) {
+        RProcess process;
+        AfStorageEntry entry(process.SecureId().iId);
+        QList<AfStorageEntry> activities;
+        mServiceProvider->applicationActivities(activities, entry);
+        
+        QList<AfStorageEntry>::iterator iter(activities.begin());
+        for (; activities.end() != iter; iter = activities.erase(iter)) {
+            retVal.append((*iter).publicData());
+        }
+    }
+    return retVal;
+}
+
+QVariant AfClient::activityData(const QString &activityId) const
+{
+    QVariant data;
+    if (mIsconnected) {
+        RProcess process;
+        AfStorageEntry entry(static_cast<int>(process.SecureId().iId), activityId), result;
+        if (0 == mServiceProvider->activityData(result, entry)) {
+            data = result.privateData();
+        }
+    }
+    return data;
+}
+
+QVariantHash AfClient::parseCommandLine(const QStringList &commandLineParams) const
+{
+     QVariantHash activityParams;
+    int activityMarkerIndex = commandLineParams.indexOf("-activity");
+    if (activityMarkerIndex != -1 && commandLineParams.count() - 1 > activityMarkerIndex) {
+        QUrl activityUri = QUrl::fromEncoded(commandLineParams.at(activityMarkerIndex+1).toAscii());
+        if (activityUri.scheme() == "appto") {
+            QList<QPair<QString, QString> > parameters = activityUri.queryItems();
+            for (QList<QPair<QString, QString> >::const_iterator i = parameters.constBegin(); i != parameters.constEnd(); ++i) {
+                activityParams.insert(i->first, i->second);
+            }
+
+            if (activityParams.contains("activityname") && !activityParams.value("activityname").toString().isEmpty()) {
+                return activityParams;
+            }
+        }
+    }
+    return QVariantHash();
+}
+
+void AfClient::bringToForeground()
+{
+    // process all update events from widgets to prevent flickering
+    QCoreApplication::processEvents();
+    RProcess process;
+    AfLauncher().bringToForeground(process.SecureId().iId);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/activityfw/activityserviceplugin/src/aflauncher.cpp	Fri Jul 09 14:19:08 2010 +0300
@@ -0,0 +1,43 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#include "aflauncher.h"
+#include "applicationlauncher_p.h"
+
+AfLauncher::AfLauncher() : d_ptr(new ApplicationLauncherPrivate())
+{
+}
+
+AfLauncher::~AfLauncher()
+{
+    delete d_ptr;
+}
+
+bool AfLauncher::isRunning(int applicationId)
+{
+    return d_ptr->isRunning(applicationId);
+}
+
+void AfLauncher::startApplication(int applicationId, const QUrl &uri)
+{
+    d_ptr->startApplication(applicationId, uri);
+}
+
+void AfLauncher::bringToForeground(int applicationId)
+{
+    d_ptr->bringToForeground(applicationId);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/activityfw/activityserviceplugin/src/afmanager.cpp	Fri Jul 09 14:19:08 2010 +0300
@@ -0,0 +1,141 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#include <QStringList>
+#include <QUrl>
+
+#include <afstorageclient.h>
+#include <afstorageentry.h>
+#include <afstorageglobals.h>
+
+#include "afmanager.h"
+#include "aflauncher.h"
+
+AfManager::AfManager(const QSharedPointer<AfStorageClient> &serviceProvider, 
+                     QObject *parent) 
+: 
+    QObject(parent), 
+    mServiceProvider(serviceProvider)
+{
+    if(0 == mServiceProvider->connect()){
+        mServiceProvider->notifyDataChange();
+    }
+    connect(mServiceProvider.data(),
+            SIGNAL(thumbnailRequested(QPixmap, void *)),
+            this,
+            SIGNAL(thumbnailReady(QPixmap, void *)));
+    connect(mServiceProvider.data(),
+            SIGNAL(dataChanged()),
+            this,
+            SIGNAL(dataChanged()));
+}
+
+AfManager::~AfManager()
+{
+}
+
+QList<QVariantHash> AfManager::activitiesList()
+{
+    QList<AfStorageEntry> results;
+    mServiceProvider->activities(results);
+    
+    QList<QVariantHash> retVal;
+    QList<AfStorageEntry>::iterator iter(results.begin());
+    for (; iter != results.end(); iter = results.erase(iter)) {
+        retVal.append((*iter).publicData());
+    }
+    return retVal;
+}
+
+void AfManager::launchActivity(const QUrl &uri)
+{
+    if (uri.scheme() != "appto")
+        return;
+
+    bool conversionOk(false);
+    int applicationId = uri.host().toUInt(&conversionOk, 16);   
+    if (!conversionOk)
+        return;
+        
+    QVariantHash activity;
+    activity.insert(ActivityApplicationKeyword, applicationId);
+    
+    QVariantHash parameters;
+    QList<QPair<QString, QString> > uriParams = uri.queryItems();
+    for (QList<QPair<QString, QString> >::const_iterator i = uriParams.constBegin(); i != uriParams.constEnd(); ++i) {
+        parameters.insert(i->first, i->second);
+    }
+
+    if (parameters.contains("activityname")) {
+        activity.insert(ActivityActivityKeyword, parameters.value("activityname").toString());
+        parameters.remove("activityname");
+    }
+    
+    activity.insert(ActivityParametersKeyword, parameters);
+    
+    launchActivity(activity);
+}
+
+void AfManager::launchActivity(const QString &uri)
+{
+    qWarning("AfManager::launchActivity(const QString &uri) is deprecated, use AfManager::launchActivity(const QUrl &uri) instead");
+    launchActivity(QUrl(uri));
+}
+
+void AfManager::launchActivity(int applicationId, const QString &activityId, const QVariantHash& parameters)
+{
+    QVariantHash activity;
+    activity.insert(ActivityApplicationKeyword, applicationId);
+    activity.insert(ActivityActivityKeyword, activityId);
+    activity.insert(ActivityParametersKeyword, parameters);
+    
+    launchActivity(activity);
+}
+
+void AfManager::getThumbnail(QSize resolution,const QString &thumbnailPath, void *data)
+{
+    mServiceProvider->getThumbnail(resolution, thumbnailPath, data);
+}
+
+void AfManager::launchActivity(const QVariantHash& activity)
+{
+    AfLauncher applicationLauncher;
+    int applicationId = activity.value(ActivityApplicationKeyword).toInt();
+    AfStorageEntry entry(applicationId, 
+                         activity[ActivityActivityKeyword].toString());
+    if (applicationLauncher.isRunning(applicationId)) {
+        mServiceProvider->launchActivity(entry);
+    } else {
+        applicationLauncher.startApplication(applicationId, activityToUri(activity));
+    }
+}
+
+QUrl AfManager::activityToUri(const QVariantHash& activity) const
+{
+    QUrl uri;
+    uri.setScheme("appto");
+    uri.setHost(QString("%1").arg(activity.value(ActivityApplicationKeyword).toUInt(), 8, 16, QChar('0')));
+    
+    if (activity.contains(ActivityActivityKeyword))
+        uri.addQueryItem("activityname", activity.value(ActivityActivityKeyword).toString());
+    
+    QVariantHash parameters = activity.value(ActivityParametersKeyword).toHash();
+    foreach(const QString &key, parameters.keys()) {
+        uri.addQueryItem(key, parameters.value(key).toString());
+    } 
+    return uri;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/activityfw/activityserviceplugin/src/afserviceplugin.cpp	Fri Jul 09 14:19:08 2010 +0300
@@ -0,0 +1,41 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#include "afserviceplugin.h"
+
+#include <qserviceinterfacedescriptor.h>
+#include <qabstractsecuritysession.h>
+#include <qservicecontext.h>
+
+#include "afclient.h"
+#include "afmanager.h"
+
+QObject *AfServicePlugin::createInstance(const QServiceInterfaceDescriptor &descriptor, QServiceContext *context, QAbstractSecuritySession *session)
+{
+    Q_UNUSED(context);
+    Q_UNUSED(session);
+
+    if (descriptor.interfaceName() == "com.nokia.qt.activities.ActivityClient") {
+        return new AfClient(QSharedPointer<AfStorageClient>(new AfStorageClient()));
+    } else if (descriptor.interfaceName() == "com.nokia.qt.activities.ActivityManager") {
+        return new AfManager(QSharedPointer<AfStorageClient>(new AfStorageClient()));
+    } else {
+        return NULL;
+    }
+}
+
+Q_EXPORT_PLUGIN2(activityserviceplugin, AfServicePlugin)
--- a/activityfw/activityserviceplugin/src/applicationlauncher.cpp	Tue Jun 29 10:20:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,43 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-#include "applicationlauncher.h"
-#include "applicationlauncher_p.h"
-
-ApplicationLauncher::ApplicationLauncher() : d_ptr(new ApplicationLauncherPrivate())
-{
-}
-
-ApplicationLauncher::~ApplicationLauncher()
-{
-    delete d_ptr;
-}
-
-bool ApplicationLauncher::isRunning(int applicationId)
-{
-    return d_ptr->isRunning(applicationId);
-}
-
-void ApplicationLauncher::startApplication(int applicationId, const QUrl &uri)
-{
-    d_ptr->startApplication(applicationId, uri);
-}
-
-void ApplicationLauncher::bringToForeground(int applicationId)
-{
-    d_ptr->bringToForeground(applicationId);
-}
--- a/activityfw/storage/bwins/afstorageclientu.def	Tue Jun 29 10:20:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,44 +0,0 @@
-EXPORTS
-	?updateActivity@AfStorageClient@@QAEHABVAfStorageEntry@@ABVQPixmap@@@Z @ 1 NONAME ; int AfStorageClient::updateActivity(class AfStorageEntry const &, class QPixmap const &)
-	?tr@AfStorageClient@@SA?AVQString@@PBD0H@Z @ 2 NONAME ; class QString AfStorageClient::tr(char const *, char const *, int)
-	?asyncRequestCompleated@AfStorageClient@@EAEXHHABVQString@@@Z @ 3 NONAME ; void AfStorageClient::asyncRequestCompleated(int, int, class QString const &)
-	??_EAfStorageClient@@UAE@I@Z @ 4 NONAME ; AfStorageClient::~AfStorageClient(unsigned int)
-	?dataChanged@AfStorageClient@@IAEXXZ @ 5 NONAME ; void AfStorageClient::dataChanged(void)
-	?waitActivity@AfStorageClient@@QAEHXZ @ 6 NONAME ; int AfStorageClient::waitActivity(void)
-	?asyncRequestCompleated@AfStorageClient@@EAEXHH@Z @ 7 NONAME ; void AfStorageClient::asyncRequestCompleated(int, int)
-	?applicationId@AfStorageEntry@@QBEHXZ @ 8 NONAME ; int AfStorageEntry::applicationId(void) const
-	?removeActivity@AfStorageClient@@QAEHABVAfStorageEntry@@@Z @ 9 NONAME ; int AfStorageClient::removeActivity(class AfStorageEntry const &)
-	?qt_metacall@AfStorageClient@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 10 NONAME ; int AfStorageClient::qt_metacall(enum QMetaObject::Call, int, void * *)
-	??_EAfStorageEntry@@QAE@I@Z @ 11 NONAME ; AfStorageEntry::~AfStorageEntry(unsigned int)
-	?data@AfStorageEntry@@QBEPBVCAfEntry@@XZ @ 12 NONAME ; class CAfEntry const * AfStorageEntry::data(void) const
-	?getStaticMetaObject@AfStorageClient@@SAABUQMetaObject@@XZ @ 13 NONAME ; struct QMetaObject const & AfStorageClient::getStaticMetaObject(void)
-	?activityData@AfStorageClient@@QAEHAAVAfStorageEntry@@ABV2@@Z @ 14 NONAME ; int AfStorageClient::activityData(class AfStorageEntry &, class AfStorageEntry const &)
-	?activityRequested@AfStorageClient@@IAEXABVQString@@@Z @ 15 NONAME ; void AfStorageClient::activityRequested(class QString const &)
-	?getThumbnail@AfStorageClient@@QAEHVQSize@@VQString@@PAX@Z @ 16 NONAME ; int AfStorageClient::getThumbnail(class QSize, class QString, void *)
-	?metaObject@AfStorageClient@@UBEPBUQMetaObject@@XZ @ 17 NONAME ; struct QMetaObject const * AfStorageClient::metaObject(void) const
-	??0AfStorageEntry@@QAE@V?$QSharedPointer@VCAfEntry@@@@@Z @ 18 NONAME ; AfStorageEntry::AfStorageEntry(class QSharedPointer<class CAfEntry>)
-	??0AfStorageClient@@QAE@PAVQObject@@@Z @ 19 NONAME ; AfStorageClient::AfStorageClient(class QObject *)
-	?thumbnailRequested@AfStorageClient@@IAEXVQPixmap@@PAX@Z @ 20 NONAME ; void AfStorageClient::thumbnailRequested(class QPixmap, void *)
-	?staticMetaObject@AfStorageClient@@2UQMetaObject@@B @ 21 NONAME ; struct QMetaObject const AfStorageClient::staticMetaObject
-	?activities@AfStorageClient@@QAEHAAV?$QList@VAfStorageEntry@@@@@Z @ 22 NONAME ; int AfStorageClient::activities(class QList<class AfStorageEntry> &)
-	?publicData@AfStorageEntry@@QBE?AV?$QHash@VQString@@VQVariant@@@@XZ @ 23 NONAME ; class QHash<class QString, class QVariant> AfStorageEntry::publicData(void) const
-	??1AfStorageEntry@@QAE@XZ @ 24 NONAME ; AfStorageEntry::~AfStorageEntry(void)
-	??0AfStorageEntry@@QAE@ABV0@@Z @ 25 NONAME ; AfStorageEntry::AfStorageEntry(class AfStorageEntry const &)
-	?launchActivity@AfStorageClient@@QAEHABVAfStorageEntry@@@Z @ 26 NONAME ; int AfStorageClient::launchActivity(class AfStorageEntry const &)
-	?trUtf8@AfStorageClient@@SA?AVQString@@PBD0H@Z @ 27 NONAME ; class QString AfStorageClient::trUtf8(char const *, char const *, int)
-	?removeApplicationActivities@AfStorageClient@@QAEHABVAfStorageEntry@@@Z @ 28 NONAME ; int AfStorageClient::removeApplicationActivities(class AfStorageEntry const &)
-	?trUtf8@AfStorageClient@@SA?AVQString@@PBD0@Z @ 29 NONAME ; class QString AfStorageClient::trUtf8(char const *, char const *)
-	?applicationActivities@AfStorageClient@@QAEHAAV?$QList@VAfStorageEntry@@@@ABVAfStorageEntry@@@Z @ 30 NONAME ; int AfStorageClient::applicationActivities(class QList<class AfStorageEntry> &, class AfStorageEntry const &)
-	?connect@AfStorageClient@@QAEHXZ @ 31 NONAME ; int AfStorageClient::connect(void)
-	?tr@AfStorageClient@@SA?AVQString@@PBD0@Z @ 32 NONAME ; class QString AfStorageClient::tr(char const *, char const *)
-	?notifyDataChange@AfStorageClient@@QAEHXZ @ 33 NONAME ; int AfStorageClient::notifyDataChange(void)
-	?imageSrc@AfStorageEntry@@QBE?AVQString@@XZ @ 34 NONAME ; class QString AfStorageEntry::imageSrc(void) const
-	?asyncRequestCompleated@AfStorageClient@@EAEXHHABVQPixmap@@PAX@Z @ 35 NONAME ; void AfStorageClient::asyncRequestCompleated(int, int, class QPixmap const &, void *)
-	??0AfStorageEntry@@QAE@HABVQString@@ABVQVariant@@ABV?$QHash@VQString@@VQVariant@@@@@Z @ 36 NONAME ; AfStorageEntry::AfStorageEntry(int, class QString const &, class QVariant const &, class QHash<class QString, class QVariant> const &)
-	?addActivity@AfStorageClient@@QAEHABVAfStorageEntry@@ABVQPixmap@@@Z @ 37 NONAME ; int AfStorageClient::addActivity(class AfStorageEntry const &, class QPixmap const &)
-	?privateData@AfStorageEntry@@QBE?AVQVariant@@XZ @ 38 NONAME ; class QVariant AfStorageEntry::privateData(void) const
-	??1AfStorageClient@@UAE@XZ @ 39 NONAME ; AfStorageClient::~AfStorageClient(void)
-	?activityId@AfStorageEntry@@QBE?AVQString@@XZ @ 40 NONAME ; class QString AfStorageEntry::activityId(void) const
-	?flags@AfStorageEntry@@QBEHXZ @ 41 NONAME ; int AfStorageEntry::flags(void) const
-	?qt_metacast@AfStorageClient@@UAEPAXPBD@Z @ 42 NONAME ; void * AfStorageClient::qt_metacast(char const *)
-
--- a/activityfw/storage/client/client.pro	Tue Jun 29 10:20:30 2010 +0300
+++ b/activityfw/storage/client/client.pro	Fri Jul 09 14:19:08 2010 +0300
@@ -35,14 +35,14 @@
              ../s60/inc/afserializer.h \
              s60/inc/afstorageclient_p.h \
              s60/inc/afstorageclientimp.h \
-			 s60/inc/afasyncrequest_p.h \
+             s60/inc/afasyncrequest_p.h \
              s60/inc/afthumbnailrequest_p.h
 
 SOURCES   += ../s60/src/afentry.cpp \
              ../s60/src/afserializer.cpp \
              s60/src/afstorageclient_p.cpp \
              s60/src/afstorageclientimp.cpp \
-			 s60/src/afasyncrequest_p.cpp \
+             s60/src/afasyncrequest_p.cpp \
              s60/src/afthumbnailrequest_p.cpp
 
 LIBS      += -lxqutils \
@@ -56,11 +56,13 @@
 BLD_INF_RULES.prj_exports += "../inc/afstorageglobals.h /epoc32/include/afstorageglobals.h" \
                              "../inc/afcmd.h /epoc32/include/afcmd.h" \
                              "inc/afstorageclient.h |../../../inc/afstorageclient.h" \
+                             "../s60/inc/afentry.h |../../../inc/afentry.h" \
                              "inc/afstorageentry.h |../../../inc/afstorageentry.h" \
-							 "inc/afasyncrequestobserver.h |../../../inc/afasyncrequestobserver.h"
+                             "inc/afasyncrequestobserver.h |../../../inc/afasyncrequestobserver.h"
 DEPLOYMENT += api
 TARGET.CAPABILITY = ALL -TCB
 TARGET.EPOCALLOWDLLDATA = 1
+
 TARGET.UID3 = 0x200267B3
 MMP_RULES += EXPORTUNFROZEN
 }
--- a/activityfw/storage/client/inc/afstorageentry.h	Tue Jun 29 10:20:30 2010 +0300
+++ b/activityfw/storage/client/inc/afstorageentry.h	Fri Jul 09 14:19:08 2010 +0300
@@ -19,8 +19,8 @@
 
 #include <qvariant.h>
 #include <qsharedpointer.h>
+#include <afentry.h>
 
-class CAfEntry;
 
 #ifdef ACTIVITY_LIB
     #define ACTIVITY_EXPORT Q_DECL_EXPORT
--- a/activityfw/storage/eabi/afstorageclientu.def	Tue Jun 29 10:20:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,48 +0,0 @@
-EXPORTS
-	_ZN14AfStorageEntryC1E14QSharedPointerI8CAfEntryE @ 1 NONAME
-	_ZN14AfStorageEntryC1ERKS_ @ 2 NONAME
-	_ZN14AfStorageEntryC1EiRK7QStringRK8QVariantRK5QHashIS0_S3_E @ 3 NONAME
-	_ZN14AfStorageEntryC2E14QSharedPointerI8CAfEntryE @ 4 NONAME
-	_ZN14AfStorageEntryC2ERKS_ @ 5 NONAME
-	_ZN14AfStorageEntryC2EiRK7QStringRK8QVariantRK5QHashIS0_S3_E @ 6 NONAME
-	_ZN15AfStorageClient10activitiesER5QListI14AfStorageEntryE @ 7 NONAME
-	_ZN15AfStorageClient11addActivityERK14AfStorageEntryRK7QPixmap @ 8 NONAME
-	_ZN15AfStorageClient11dataChangedEv @ 9 NONAME
-	_ZN15AfStorageClient11qt_metacallEN11QMetaObject4CallEiPPv @ 10 NONAME
-	_ZN15AfStorageClient11qt_metacastEPKc @ 11 NONAME
-	_ZN15AfStorageClient12activityDataER14AfStorageEntryRKS0_ @ 12 NONAME
-	_ZN15AfStorageClient12getThumbnailE5QSize7QStringPv @ 13 NONAME
-	_ZN15AfStorageClient12waitActivityEv @ 14 NONAME
-	_ZN15AfStorageClient14launchActivityERK14AfStorageEntry @ 15 NONAME
-	_ZN15AfStorageClient14removeActivityERK14AfStorageEntry @ 16 NONAME
-	_ZN15AfStorageClient14updateActivityERK14AfStorageEntryRK7QPixmap @ 17 NONAME
-	_ZN15AfStorageClient16notifyDataChangeEv @ 18 NONAME
-	_ZN15AfStorageClient16staticMetaObjectE @ 19 NONAME DATA 16
-	_ZN15AfStorageClient17activityRequestedERK7QString @ 20 NONAME
-	_ZN15AfStorageClient18thumbnailRequestedE7QPixmapPv @ 21 NONAME
-	_ZN15AfStorageClient19getStaticMetaObjectEv @ 22 NONAME
-	_ZN15AfStorageClient21applicationActivitiesER5QListI14AfStorageEntryERKS1_ @ 23 NONAME
-	_ZN15AfStorageClient22asyncRequestCompleatedEii @ 24 NONAME
-	_ZN15AfStorageClient22asyncRequestCompleatedEiiRK7QPixmapPv @ 25 NONAME
-	_ZN15AfStorageClient22asyncRequestCompleatedEiiRK7QString @ 26 NONAME
-	_ZN15AfStorageClient27removeApplicationActivitiesERK14AfStorageEntry @ 27 NONAME
-	_ZN15AfStorageClient7connectEv @ 28 NONAME
-	_ZN15AfStorageClientC1EP7QObject @ 29 NONAME
-	_ZN15AfStorageClientC2EP7QObject @ 30 NONAME
-	_ZN15AfStorageClientD0Ev @ 31 NONAME
-	_ZN15AfStorageClientD1Ev @ 32 NONAME
-	_ZN15AfStorageClientD2Ev @ 33 NONAME
-	_ZNK14AfStorageEntry10activityIdEv @ 34 NONAME
-	_ZNK14AfStorageEntry10publicDataEv @ 35 NONAME
-	_ZNK14AfStorageEntry11privateDataEv @ 36 NONAME
-	_ZNK14AfStorageEntry13applicationIdEv @ 37 NONAME
-	_ZNK14AfStorageEntry4dataEv @ 38 NONAME
-	_ZNK14AfStorageEntry5flagsEv @ 39 NONAME
-	_ZNK14AfStorageEntry8imageSrcEv @ 40 NONAME
-	_ZNK15AfStorageClient10metaObjectEv @ 41 NONAME
-	_ZTI15AfStorageClient @ 42 NONAME
-	_ZTV15AfStorageClient @ 43 NONAME
-	_ZThn8_N15AfStorageClient22asyncRequestCompleatedEii @ 44 NONAME
-	_ZThn8_N15AfStorageClient22asyncRequestCompleatedEiiRK7QPixmapPv @ 45 NONAME
-	_ZThn8_N15AfStorageClient22asyncRequestCompleatedEiiRK7QString @ 46 NONAME
-
--- a/common.pri	Tue Jun 29 10:20:30 2010 +0300
+++ b/common.pri	Fri Jul 09 14:19:08 2010 +0300
@@ -79,7 +79,7 @@
     # add platfrom API for windows
     INCLUDEPATH += \                
                 $$PWD/homescreensrv_plat/contentstorage_api \
-                $$PWD/homescreensrv_plat/hswidgetmodel_api \                
+                $$PWD/homescreensrv_plat/hswidgetmodel_api \
                 $$PWD/homescreensrv_plat/homescreen_information_api/inc
 }
 
--- a/contentstorage/caclient/s60/src/camenuiconutility.cpp	Tue Jun 29 10:20:30 2010 +0300
+++ b/contentstorage/caclient/s60/src/camenuiconutility.cpp	Fri Jul 09 14:19:08 2010 +0300
@@ -225,7 +225,7 @@
  
     if (entry.entryTypeName() == XQConversions::s60DescToQString(
             KCaTypeWidget)) {
-        icon.addBadge(Qt::AlignBottom | Qt::AlignLeft,
+        icon.addBadge(Qt::AlignBottom | Qt::AlignRight,
 		    HbIcon("qtg_small_homescreen"));
     }
     return icon;
--- a/contentstorage/casoftwareregistry/casoftwareregistry.pro	Tue Jun 29 10:20:30 2010 +0300
+++ b/contentstorage/casoftwareregistry/casoftwareregistry.pro	Fri Jul 09 14:19:08 2010 +0300
@@ -24,7 +24,8 @@
 DEPENDPATH += ./inc \
               ./src
 INCLUDEPATH += ./inc \
-            ../inc
+            ../inc \
+            ../cautils/inc
             
 symbian: {
 
--- a/contentstorage/casoftwareregistry/s60/inc/casoftwareregistry_p.h	Tue Jun 29 10:20:30 2010 +0300
+++ b/contentstorage/casoftwareregistry/s60/inc/casoftwareregistry_p.h	Fri Jul 09 14:19:08 2010 +0300
@@ -26,7 +26,7 @@
 class QStringList;
 class CaSoftwareRegistry;
 
-namespace Usif 
+namespace Usif
 {
     class CComponentEntry;
 }
@@ -45,24 +45,32 @@
         QString &componentName,
         QStringList &applicationsUids,
         QString &confirmationMessage);
-    
+
     bool getApplicationsUids(int componentId,
         QStringList &appUids);
 
     DetailMap entryDetails(int componentId) const;
-    
-    DetailMap entryDetails(
-        const Usif::CComponentEntry& entry) const;
+
+    QList<DetailMap> retrieveLogEntries() const;
+    QList<DetailMap> retrieveLogEntriesL() const;
+
 private:
+    DetailMap entryDetailsL(
+            const Usif::CComponentEntry& entry) const;
     void getUninstallDetailsL(int componentId,
         QString &componentName,
         QStringList &appUids,
         QString &confirmationMessage);
     void getApplicationsUidsL(int componentId,
         QStringList &appUids);
+    DetailMap entryDetailsL(int componentId) const;
+    //TODO int should be changed to const Usif::TScrComponentOperationType&
+    //when the problem with usif headers is solved
+    QString operationTypeL(int operationType) const;
+    QString operationTime(TTime time) const;
 private:
     CaSoftwareRegistry *const m_q;
-
+    friend class T_CaSoftwareRegistry;
 };
 
 #endif // CASOFTWAREREGISTRY_P_H
--- a/contentstorage/casoftwareregistry/s60/src/casoftwareregistry_p.cpp	Tue Jun 29 10:20:30 2010 +0300
+++ b/contentstorage/casoftwareregistry/s60/src/casoftwareregistry_p.cpp	Fri Jul 09 14:19:08 2010 +0300
@@ -15,42 +15,35 @@
  *
  */
 #include <HbParameterLengthLimiter>
+#include <HbExtendedLocale>
 #include <QMetaType>
 #include <QScopedPointer>
 #include <QStringList>
-
+#include <QDateTime>
+#undef SYMBIAN_ENABLE_SPLIT_HEADERS //TODO this is work around
+#include <usif/scr/screntries.h>
 #include <usif/scr/scr.h>
-#include <usif/scr/screntries.h>
 #include <xqconversions.h>
 #include <driveinfo.h>
 
 #include "casoftwareregistry.h"
 #include "casoftwareregistry_p.h"
+#include "cadefs.h"
+#include "caarraycleanup.inl"
 
 using namespace Usif;
 
 _LIT(KConfirmMessageKey, "MIDlet-Delete-Confirm");
+_LIT(KCaScrPropertyDomainCategory, "Domain-Category");
+_LIT(KCaScrPropertyMidletDescryption, "MIDlet-Description");
+const int maxLogsCount = 20;
 
-template <typename RClass>
-struct RClassDeleter
-{
-    static inline void cleanup(RClass *ptr)
-    {
-        ptr->Close();
-    }
-};
-
-typedef QScopedPointer<RSoftwareComponentRegistry, 
-    RClassDeleter<RSoftwareComponentRegistry> > ScrScopedPointer;
-    
-typedef QScopedPointer<RFs, 
-    RClassDeleter<RFs> > RFSScopedPointer;
 /*!
  Constructor
  \param servicePublic Pointer to object of the public class.
  */
 CaSoftwareRegistryPrivate::CaSoftwareRegistryPrivate(
-    CaSoftwareRegistry *servicePublic):
+        CaSoftwareRegistry *servicePublic):
     m_q(servicePublic)
 {
 }
@@ -74,15 +67,15 @@
  */
 
 bool CaSoftwareRegistryPrivate::getUninstallDetails(int componentId,
-    QString &componentName,
-    QStringList &applicationsUids,
-    QString &confirmationMessage)
+        QString &componentName,
+        QStringList &applicationsUids,
+        QString &confirmationMessage)
 {
     TRAPD(error, getUninstallDetailsL(componentId,
-        componentName,
-        applicationsUids,
-        confirmationMessage)
-         );
+            componentName,
+            applicationsUids,
+            confirmationMessage)
+             );
     return error == KErrNone;
 }
 
@@ -95,7 +88,7 @@
  */
 
 bool CaSoftwareRegistryPrivate::getApplicationsUids(int componentId,
-    QStringList &applicationsUids)
+        QStringList &applicationsUids)
 {
     TRAPD(error, getApplicationsUidsL(componentId, applicationsUids));
     return error == KErrNone;
@@ -112,9 +105,9 @@
       null string means the lack of the message.
  */
 void CaSoftwareRegistryPrivate::getUninstallDetailsL(int componentId,
-    QString &componentName,
-    QStringList &appUids,
-    QString &confirmationMessage)
+        QString &componentName,
+        QStringList &appUids,
+        QString &confirmationMessage)
 {
     componentName.clear();
     appUids.clear();
@@ -132,18 +125,18 @@
 
         CComponentEntry *entry = CComponentEntry::NewLC();
         softwareComponentRegistry.GetComponentL(componentId, *entry);
-        softwareComponentRegistry.GetAppUidsForComponentL(componentIdValue,
-            appUidsArray);
+        softwareComponentRegistry.GetAppUidsForComponentL(
+                componentIdValue, appUidsArray);
 
-        CPropertyEntry *confirmationProperty =
-            softwareComponentRegistry.GetComponentPropertyL(componentId,
-            KConfirmMessageKey);
-        if (confirmationProperty &&
-            confirmationProperty->PropertyType() ==
-                CPropertyEntry::ELocalizedProperty) {
-            confirmationMessageProperty =
-                static_cast<CLocalizablePropertyEntry *>(
-                    confirmationProperty);
+        CPropertyEntry *confirmationProperty
+                = softwareComponentRegistry.GetComponentPropertyL(
+                        componentId, KConfirmMessageKey);
+        if (confirmationProperty
+                && confirmationProperty->PropertyType()
+                        == CPropertyEntry::ELocalizedProperty) {
+            confirmationMessageProperty
+                    = static_cast<CLocalizablePropertyEntry *>(
+                            confirmationProperty);
         } else {
             delete confirmationProperty;
             confirmationProperty = NULL;
@@ -156,7 +149,7 @@
             }
             if (confirmationMessageProperty) {
                 confirmationMessage = XQConversions::s60DescToQString(
-                    confirmationMessageProperty->StrValue());
+                        confirmationMessageProperty->StrValue());
             }
         );
 
@@ -184,8 +177,8 @@
         CleanupClosePushL(softwareComponentRegistry);
         User::LeaveIfError(softwareComponentRegistry.Connect());
 
-        softwareComponentRegistry.GetAppUidsForComponentL(componentIdValue,
-            appUidsArray);
+        softwareComponentRegistry.GetAppUidsForComponentL(
+                componentIdValue, appUidsArray);
 
         QT_TRYCATCH_LEAVING(
             for (TInt i = 0; i<appUidsArray.Count(); i++) {
@@ -199,30 +192,71 @@
 /*!
  \param componentId Component id of the entry which details are requested for.
  \return Map of component details if component id was greater than 0 or
- empty map otherwise. 
+ empty map otherwise.
  */
 CaSoftwareRegistryPrivate::DetailMap CaSoftwareRegistryPrivate::entryDetails(
     int componentId) const
 {
     CaSoftwareRegistry::DetailMap result;
+    TRAP_IGNORE(result=entryDetailsL(componentId));
+    return result;
+}
+
+/*!
+ \param componentId Component id of the entry which details are requested for.
+ \return Map of component details if component id was greater than 0 or
+ empty map otherwise.
+ */
+CaSoftwareRegistryPrivate::DetailMap CaSoftwareRegistryPrivate::entryDetailsL(
+    int componentId) const
+{
+    CaSoftwareRegistry::DetailMap result;
 
     if (componentId >= 1) {
-        RSoftwareComponentRegistry softwareComponentRegistry;
-        ScrScopedPointer scr(&softwareComponentRegistry);
-        if (scr->Connect() == KErrNone) {
-            
-            QScopedPointer<CComponentEntry> entry;
-            
-            QT_TRAP_THROWING(entry.reset(CComponentEntry::NewL()));
-            
+        RSoftwareComponentRegistry scr;
+        CleanupClosePushL(scr);
+        if (scr.Connect() == KErrNone) {
+            CComponentEntry* entry = CComponentEntry::NewLC();
+
             TBool resultCode = EFalse;
-            TRAPD(leaveCode, resultCode = scr->GetComponentL(componentId, *entry));
-            if (leaveCode == KErrNone && resultCode) {
-                result = entryDetails(*entry);
+            resultCode = scr.GetComponentL(componentId, *entry);
+            if ( resultCode) {
+                result = entryDetailsL(*entry);
             }
+
+            if (entry->SoftwareType().Compare(KSoftwareTypeJava) == 0) {
+                CPropertyEntry* domainProperty =
+                    scr.GetComponentPropertyL(componentId,
+                        KCaScrPropertyDomainCategory);
+                CleanupStack::PushL(domainProperty);
+                if (domainProperty &&
+                    domainProperty->PropertyType() ==
+                        CPropertyEntry::ELocalizedProperty) {
+                    result[CaSoftwareRegistry::componentProtectionDomainKey()] =
+                        XQConversions::s60DescToQString(
+                            static_cast<CLocalizablePropertyEntry*>(
+                                domainProperty)->StrValue());
+                }
+
+                CPropertyEntry *midletDescryption =
+                    scr.GetComponentPropertyL(componentId,
+                        KCaScrPropertyMidletDescryption);
+                CleanupStack::PushL(midletDescryption);
+                if (midletDescryption &&
+                    midletDescryption->PropertyType() ==
+                        CPropertyEntry::ELocalizedProperty) {
+                    result[CaSoftwareRegistry::componentDescriptionKey()] =
+                        XQConversions::s60DescToQString(
+                            static_cast<CLocalizablePropertyEntry*>(
+                                midletDescryption)->StrValue());
+                }
+                CleanupStack::PopAndDestroy(midletDescryption);
+                CleanupStack::PopAndDestroy(domainProperty);
+            }
+            CleanupStack::PopAndDestroy(entry);
         }
+        CleanupStack::PopAndDestroy(&scr);
     }
-    
     return result;
 }
 
@@ -230,97 +264,182 @@
  \param entry Software registry entry providing details.
  \return Map with details for the component represented by \entry.
  */
-CaSoftwareRegistryPrivate::DetailMap CaSoftwareRegistryPrivate::entryDetails(
+CaSoftwareRegistryPrivate::DetailMap CaSoftwareRegistryPrivate::entryDetailsL(
     const CComponentEntry& entry) const
 {
     CaSoftwareRegistry::DetailMap detailMap;
-    
-    detailMap[CaSoftwareRegistry::componentNameKey()] = 
+
+    detailMap[CaSoftwareRegistry::componentNameKey()] =
         XQConversions::s60DescToQString(entry.Name());
-        
-    detailMap[CaSoftwareRegistry::componentVersionKey()] = 
+
+    detailMap[CaSoftwareRegistry::componentVersionKey()] =
         XQConversions::s60DescToQString(entry.Version());
-    
-    detailMap[CaSoftwareRegistry::componentVendorKey()] = 
+
+    detailMap[CaSoftwareRegistry::componentVendorKey()] =
         XQConversions::s60DescToQString(entry.Vendor());
-        
+
     QString drives;
     QString drv;
-    TChar drive;    
-    
+    TChar drive;
+
     const TInt driveListLen(entry.InstalledDrives().Length());
     for (TInt i( 0 ); i < driveListLen; ++i) {
         if (entry.InstalledDrives()[i] != '\0') {
-            
+
             if (!drives.isEmpty()) {
                 drives = drives.append(",");
-            }  
+            }
             drv = QString(QChar('A'+ i)).append(":");
             if(DriveInfo::GetDefaultDrive(
-                    DriveInfo::EDefaultPhoneMemory, drive ) == KErrNone 
-                    && QChar('A'+ i) == QChar(drive))
-                {
-                drives = drives.append(
-                        HbParameterLengthLimiter("txt_applib_dialog_1_device_memory").arg(
-                          QString(QChar('A'+ i))));
-                }
-            else if(DriveInfo::GetDefaultDrive(
-                    DriveInfo::EDefaultMassStorage, drive ) == KErrNone 
-                    && QChar('A'+ i) == QChar(drive))
-                {
-                drives = drives.append(
-                        HbParameterLengthLimiter("txt_applib_dialog_1_mass_storage").arg(
-                          QString(QChar('A'+ i))));
-                }
-            else if(DriveInfo::GetDefaultDrive(
-                    DriveInfo::EDefaultRemovableMassStorage, drive ) == KErrNone 
-                    && QChar('A'+ i) == QChar(drive))
-                {
+                    DriveInfo::EDefaultPhoneMemory, drive ) == KErrNone
+                    && QChar('A'+ i) == QChar(drive)) {
+                drives = drives.append(HbParameterLengthLimiter(
+                        "txt_applib_dialog_1_device_memory").arg(
+                                QString(QChar('A'+ i))));
+            } else if(DriveInfo::GetDefaultDrive(
+                    DriveInfo::EDefaultMassStorage, drive ) == KErrNone
+                    && QChar('A'+ i) == QChar(drive)) {
+                drives = drives.append(HbParameterLengthLimiter(
+                        "txt_applib_dialog_1_mass_storage").arg(
+                                QString(QChar('A'+ i))));
+                } else if(DriveInfo::GetDefaultDrive(
+                    DriveInfo::EDefaultRemovableMassStorage, drive ) == KErrNone
+                    && QChar('A'+ i) == QChar(drive)) {
                 RFs fs;
-                RFSScopedPointer fSPointer(&fs);
+                CleanupClosePushL(fs);
                 if (fs.Connect() == KErrNone) {
                     TInt driveNumber;
                     TVolumeInfo tv;
                     DriveInfo::GetDefaultDrive(
-                            DriveInfo::EDefaultRemovableMassStorage, driveNumber );
-                    qt_symbian_throwIfError(fs.Volume(tv, driveNumber));
-                    if(tv.iName.Length()) { 
-                        drives = drives.append(
-                                HbParameterLengthLimiter("txt_applib_dialog_1_2").arg(
-                                   QString(QChar('A'+ i))).arg(
-                                           XQConversions::s60DescToQString(tv.iName)));                       
-                    }
-                    else {
-                        drives = drives.append(
-                            HbParameterLengthLimiter("txt_applib_dialog_1_memory_card").arg(
-                              QString(QChar('A'+ i))));           
+                            DriveInfo::EDefaultRemovableMassStorage,
+                            driveNumber );
+                    User::LeaveIfError(fs.Volume(tv, driveNumber));
+                    if(tv.iName.Length()) {
+                        drives = drives.append(HbParameterLengthLimiter(
+                                "txt_applib_dialog_1_2").arg(
+                                        QString(QChar('A'+ i))).arg(
+                                                XQConversions::s60DescToQString(
+                                                        tv.iName)));
+                    } else {
+                        drives = drives.append(HbParameterLengthLimiter(
+                                "txt_applib_dialog_1_memory_card").arg(
+                                        QString(QChar('A'+ i))));
                     }
                 }
+                CleanupStack::PopAndDestroy(&fs);
             } else {
-                drives = drives.append(QChar('A'+ i)).append(":");   
+                drives = drives.append(QChar('A'+ i)).append(":");
             }
         }
     }
-    
     detailMap[CaSoftwareRegistry::componentDriveInfoKey()] = drives;
-    
 
     static const TInt64 KKilo = 1024;
     static const TInt64 KMega = KKilo * KKilo;
     if(entry.ComponentSize() >= KMega) {
-        detailMap[CaSoftwareRegistry::componentSizeKey()] = 
-            HbParameterLengthLimiter("txt_applib_dialog_l1_mb").arg(
-                    static_cast<double>(entry.ComponentSize() / KMega));
+        detailMap[CaSoftwareRegistry::componentSizeKey()]
+                  = HbParameterLengthLimiter("txt_applib_dialog_l1_mb").arg(
+                          static_cast<double>(entry.ComponentSize() / KMega));
+    } else {
+        detailMap[CaSoftwareRegistry::componentSizeKey()]
+                  = HbParameterLengthLimiter("txt_applib_dialog_l1_kb").arg(
+                          static_cast<double>(entry.ComponentSize() / KKilo));
     }
-    else {
-        detailMap[CaSoftwareRegistry::componentSizeKey()] = 
-            HbParameterLengthLimiter("txt_applib_dialog_l1_kb").arg(
-                    static_cast<double>(entry.ComponentSize() / KKilo));
-    }
-
-    
-    detailMap[CaSoftwareRegistry::componentTypeKey()] = 
+    detailMap[CaSoftwareRegistry::componentTypeKey()] =
         XQConversions::s60DescToQString(entry.SoftwareType());
 
     return detailMap;
 }
+
+/*!
+ \param entry Software registry entry providing details.
+ \return Map with details for the component represented by \entry.
+ */
+QList<CaSoftwareRegistryPrivate::DetailMap>
+        CaSoftwareRegistryPrivate::retrieveLogEntries() const
+{
+    QList<CaSoftwareRegistryPrivate::DetailMap> logMap;
+    TRAP_IGNORE(logMap = retrieveLogEntriesL());
+    return logMap;
+}
+
+/*!
+ \param entry Software registry entry providing installation log.
+ \return List of Maps with installation log.
+ */
+QList<CaSoftwareRegistryPrivate::DetailMap>
+        CaSoftwareRegistryPrivate::retrieveLogEntriesL() const
+{
+    QList<CaSoftwareRegistryPrivate::DetailMap> logList;
+
+    RSoftwareComponentRegistry scr;
+    CleanupClosePushL(scr);
+    User::LeaveIfError(scr.Connect());
+
+    RPointerArray<CScrLogEntry> logEntries;
+    CleanupResetAndDestroyPushL(logEntries);
+    scr.RetrieveLogEntriesL(logEntries);
+
+    // 50 log items or less - ui spec
+    TInt lastLog(0);
+    if (logEntries.Count() > maxLogsCount) {
+        lastLog = logEntries.Count() - maxLogsCount;
+    }
+    // iteration through most recent log to the last
+    for (TInt i = logEntries.Count() - 1; i >= lastLog; i--) {
+        CScrLogEntry* entry = logEntries[i];
+        DetailMap logMap;
+        logMap[CaSoftwareRegistry::componentNameKey()]
+               = XQConversions::s60DescToQString(entry->ComponentName());
+        logMap[CaSoftwareRegistry::componentVersionKey()]
+               = XQConversions::s60DescToQString(entry->ComponentVersion());
+        logMap[CaSoftwareRegistry::componentTimeKey()]
+               = operationTime(entry->OperationTime());
+        logMap[CaSoftwareRegistry::componentOperationTypeKey()]
+               = operationTypeL(entry->OperationType());
+        logList.append(logMap);
+    }
+    CleanupStack::PopAndDestroy(&logEntries);
+    CleanupStack::PopAndDestroy(&scr);
+
+    return logList;
+}
+
+/*!
+ \param operation type.
+ \return string representing operation type.
+ */
+QString CaSoftwareRegistryPrivate::operationTypeL(int operationType) const
+{
+    QString opType;
+    switch (operationType) {
+        case EScrCompInstall:
+            opType = CaSoftwareRegistry::componentInstallValue();
+            break;
+        case EScrCompUnInstall:
+            opType = CaSoftwareRegistry::componentUninstallValue();
+            break;
+        case EScrCompUpgrade:
+            opType = CaSoftwareRegistry::componentUpgradeValue();
+            break;
+        case EScrCompHidden:
+            opType = CaSoftwareRegistry::componentHiddenValue();
+            break;
+        default:
+            User::Leave(KErrNotSupported);
+            break;
+    }
+    return opType;
+}
+
+/*!
+ \param operation type.
+ \return string representing operation type.
+ */
+QString CaSoftwareRegistryPrivate::operationTime(TTime time) const
+{
+    TDateTime dt = time.DateTime();
+    QDate date(dt.Year(), dt.Month()+1, dt.Day());
+    HbExtendedLocale hbLoc;
+    return hbLoc.format(date, r_qtn_date_usual_with_zero);
+}
--- a/contentstorage/casoftwareregistry/src/casoftwareregistry.cpp	Tue Jun 29 10:20:30 2010 +0300
+++ b/contentstorage/casoftwareregistry/src/casoftwareregistry.cpp	Fri Jul 09 14:19:08 2010 +0300
@@ -42,12 +42,12 @@
  Subsequent calls to CaSoftwareRegistry::create() may return pointers to different
  instances. It is a case when between the calls instance counter of the created
  object dropped to 0 and it was deleted.
- 
+
  */
 
 /*! \typedef typedef QHash<QString, QString> DetailMap;
  * Defines map type for component details.
- * 
+ *
  */
 
 /*!
@@ -57,7 +57,7 @@
 
 
 // Initialization of a static member variable.
-QWeakPointer<CaSoftwareRegistry> CaSoftwareRegistry::m_instance = 
+QWeakPointer<CaSoftwareRegistry> CaSoftwareRegistry::m_instance =
     QWeakPointer<CaSoftwareRegistry>();
 
 
@@ -149,7 +149,7 @@
  \endcode
  \param componentId Component id of the entry details are requested for.
  \return Map of the component details if component id was greater than 0 or
- empty map otherwise. 
+ empty map otherwise.
 
  */
 CaSoftwareRegistry::DetailMap CaSoftwareRegistry::entryDetails(
@@ -159,6 +159,16 @@
 }
 
 /*!
+ The method provides installation details from USIF.
+ \return QList of DetailMap.
+ */
+QList<CaSoftwareRegistry::DetailMap>
+        CaSoftwareRegistry::retrieveLogEntries() const
+{
+    return m_d->retrieveLogEntries();
+}
+
+/*!
  * \return Component name key in CaSoftwareRegistry::DetailMap.
  */
 QString CaSoftwareRegistry::componentNameKey()
@@ -195,6 +205,15 @@
 }
 
 /*!
+ * \return Component protection domainkey in CaSoftwareRegistry::DetailMap.
+ */
+QString CaSoftwareRegistry::componentProtectionDomainKey()
+{
+    static const QString key("protectiondomain");
+    return key;
+}
+
+/*!
  * \return Component size info key in CaSoftwareRegistry::DetailMap.
  */
 QString CaSoftwareRegistry::componentSizeKey()
@@ -212,3 +231,72 @@
     return key;
 }
 
+/*!
+ * \return Component description key in CaSoftwareRegistry::DetailMap.
+ */
+QString CaSoftwareRegistry::componentDescriptionKey()
+{
+    static const QString key("description");
+    return key;
+}
+
+/*!
+ * \return Component instalation/uninstallation
+ * time key in CaSoftwareRegistry::DetailMap.
+ */
+QString CaSoftwareRegistry::componentTimeKey()
+{
+    static const QString key("time");
+    return key;
+}
+
+/*!
+ * \return Component instalation/uninstallation/upgrade/hidden
+ * operation type key in CaSoftwareRegistry::DetailMap.
+ */
+QString CaSoftwareRegistry::componentOperationTypeKey()
+{
+    static const QString key("operationType");
+    return key;
+}
+
+/*!
+ * \return Component instalation
+ * operation value in CaSoftwareRegistry::DetailMap.
+ */
+QString CaSoftwareRegistry::componentInstallValue()
+{
+    static const QString value("install");
+    return value;
+}
+
+/*!
+ * \return Component uninstallation
+ * operation value in CaSoftwareRegistry::DetailMap.
+ */
+QString CaSoftwareRegistry::componentUninstallValue()
+{
+    static const QString value("uninstall");
+    return value;
+}
+
+/*!
+ * \return Component upgrade
+ * operation value in CaSoftwareRegistry::DetailMap.
+ */
+QString CaSoftwareRegistry::componentUpgradeValue()
+{
+    static const QString value("upgrade");
+    return value;
+}
+
+/*!
+ * \return Component hidden
+ * operation value in CaSoftwareRegistry::DetailMap.
+ */
+QString CaSoftwareRegistry::componentHiddenValue()
+{
+    static const QString value("hidden");
+    return value;
+}
+
--- a/contentstorage/casoftwareregistry/stub/inc/casoftwareregistry_p.h	Tue Jun 29 10:20:30 2010 +0300
+++ b/contentstorage/casoftwareregistry/stub/inc/casoftwareregistry_p.h	Fri Jul 09 14:19:08 2010 +0300
@@ -28,20 +28,21 @@
 {
 public:
     typedef QHash<QString, QString> DetailMap;
-    
+
     explicit CaSoftwareRegistryPrivate(
         CaSoftwareRegistry *softwareRegistryPublic);
     ~CaSoftwareRegistryPrivate();
 
-    bool getApplicationsUids(int componentId,
-        QStringList &applicationsUids);
-
     bool getUninstallDetails(int componentId,
         QString &componentName,
         QStringList &applicationsUids,
         QString &confirmationMessage);
 
+    bool getApplicationsUids(int componentId,
+        QStringList &appUids);
     DetailMap entryDetails(int componentId) const;
+
+    QList<DetailMap> retrieveLogEntries() const;
 private:
 
     CaSoftwareRegistry *const m_q;
--- a/contentstorage/casoftwareregistry/stub/src/casoftwareregistry_p.cpp	Tue Jun 29 10:20:30 2010 +0300
+++ b/contentstorage/casoftwareregistry/stub/src/casoftwareregistry_p.cpp	Fri Jul 09 14:19:08 2010 +0300
@@ -88,20 +88,33 @@
     int componentId) const
 {
     CaSoftwareRegistry::DetailMap detailMap;
-    
+
     if (componentId >=1) {
-        detailMap[CaSoftwareRegistry::componentNameKey()] = "no data";
-            
-        detailMap[CaSoftwareRegistry::componentVersionKey()] = "no data";
-        
-        detailMap[CaSoftwareRegistry::componentVendorKey()] = "no data";
-                
-        detailMap[CaSoftwareRegistry::componentDriveInfoKey()] = "no data";
-        
-        detailMap[CaSoftwareRegistry::componentSizeKey()] = "no data";
-        
-        detailMap[CaSoftwareRegistry::componentTypeKey()] = "no data";
+        detailMap[CaSoftwareRegistry::componentNameKey()]       = "no data";
+        detailMap[CaSoftwareRegistry::componentVersionKey()]    = "no data";
+        detailMap[CaSoftwareRegistry::componentVendorKey()]     = "no data";
+		detailMap[CaSoftwareRegistry::componentProtectionDomainKey()] = "no data";
+        detailMap[CaSoftwareRegistry::componentDriveInfoKey()]  = "no data";
+        detailMap[CaSoftwareRegistry::componentSizeKey()]       = "no data";
+        detailMap[CaSoftwareRegistry::componentTypeKey()]       = "no data";
+        detailMap[CaSoftwareRegistry::componentDescriptionKey()] = "no data";
     }
-    return detailMap;    
+    return detailMap;
 }
 
+/*!
+ \param entry Software registry entry providing details.
+ \return Map with details for the component represented by \entry.
+ */
+QList<CaSoftwareRegistryPrivate::DetailMap>
+        CaSoftwareRegistryPrivate::retrieveLogEntries() const
+{
+    QList<CaSoftwareRegistryPrivate::DetailMap> logList;
+    DetailMap logMap;
+    logMap[CaSoftwareRegistry::componentNameKey()]          = "no data";
+    logMap[CaSoftwareRegistry::componentVersionKey()]       = "no data";
+    logMap[CaSoftwareRegistry::componentTimeKey()]          = "no data";
+    logMap[CaSoftwareRegistry::componentOperationTypeKey()] = "no data";
+    logList.append(logMap);
+    return logList;
+}
--- a/contentstorage/casrv/caappscanner/inc/caappscannerhandler.h	Tue Jun 29 10:20:30 2010 +0300
+++ b/contentstorage/casrv/caappscanner/inc/caappscannerhandler.h	Fri Jul 09 14:19:08 2010 +0300
@@ -59,9 +59,11 @@
     /**
      * Symbien 2nd phase constructor.
      * @param aCaStorageProxy storage.
+     * @param aSoftwareRegistry software component registry.
      * @param aUtils storage utils.
      */
     void ConstructL( CCaStorageProxy& aCaStorageProxy,
+            Usif::RSoftwareComponentRegistry& aSoftwareRegistry,
             CCaSrvEngUtils& aUtils );
 
 private:
--- a/contentstorage/casrv/caappscanner/inc/casrvappscanner.h	Tue Jun 29 10:20:30 2010 +0300
+++ b/contentstorage/casrv/caappscanner/inc/casrvappscanner.h	Fri Jul 09 14:19:08 2010 +0300
@@ -30,10 +30,7 @@
 class CCaInnerEntry;
 class CCaStorageProxy;
 class CCaSrvEngUtils;
-namespace Swi
-    {
-    class RSisRegistryEntry;
-    }
+
 
 /**
  * Application scanner.
@@ -70,9 +67,11 @@
     /**
      * Two-phased constructor.
      * @param aCaStorageProxy storage.
+     * @param aSoftwareRegistry software component registry.
      * @param aUtils storage utils.
      */
     static CCaSrvAppScanner* NewL( CCaStorageProxy& aCaStorageProxy,
+            Usif::RSoftwareComponentRegistry& aSoftwareRegistry,
             CCaSrvEngUtils& aUtils );
 
 private:
@@ -81,9 +80,11 @@
     /**
      * Constructor.
      * @param aCaStorageProxy storage.
+     * @param aSoftwareRegistry software component registry.
      * @param aUtils storage utils.
      */
     CCaSrvAppScanner( CCaStorageProxy& aCaStorageProxy,
+            Usif::RSoftwareComponentRegistry& aSoftwareRegistry,
             CCaSrvEngUtils& aUtils );
 
     /**
@@ -161,9 +162,10 @@
     /**
      * Updates application's removable and visible flags.
      * @param aItem menu item.
+     * @param aMmcId MMC ID of currently inserted MMC, or 0.
      * @return ETrue if flags were updated.
      */
-    TBool HandleRemovableVisibleFlagsUpdateL( CCaInnerEntry* aItem );
+    TBool HandleRemovableFlagAndMmcAttrUpdateL( CCaInnerEntry* aItem, TUint aMmcId );
 
     /**
      * Removes application unninstall flag.
@@ -177,7 +179,7 @@
      * @param aItem menu item.
      * @return ETrue if flags were updated.
      */
-    TBool HandleMissingVisibleFlagsUpdate( CCaInnerEntry* aItem );
+    TBool HandleMissingFlagsUpdate( CCaInnerEntry* aItem );
 
     /**
      * Updates visible flag.
@@ -199,14 +201,8 @@
      * @param aMmcId MMC ID of currently inserted MMC, or 0.
      * @return ETrue if mmc attribute was updated.
      */
-    TBool HandleMmcAttrUpdateL( CCaInnerEntry* aItem, TUint aMmcId );
-
-    /**
-     * Check if application is in rom.
-     * Add new menu item referring to this application.
-     * @return ETrue if app is in rom.
-     */
-    TBool IsInRomL( TInt aUid );
+    TBool HandleMmcAttrUpdateL( const Usif::CComponentEntry* aEntry, 
+            CCaInnerEntry* aItem, TUint aMmcId );
 
     /**
      * Get applications from AppArc.
@@ -262,6 +258,55 @@
     TInt AddAppEntryL( TUint aUid, TUint aCurrentMmcId );
 
     /**
+     * Set CWRT ettributes to entry.
+     * @param aEntry CCaInnerEntry with application.
+     * @return ETrue if app info was updatedd
+     */
+    TBool SetCWRTAppL( CCaInnerEntry* aEntry );
+
+    /**
+     * Set Java attributes to entry.
+     * @param aEntry CCaInnerEntry with application.
+     * @return ETrue if app info was updatedd
+     */
+    TBool SetJavaAppL( CCaInnerEntry* aEntry );
+
+    /**
+     * Set information from TApaAppInfo to entry.
+     * @param aEntry CCaInnerEntry with application.
+     * @param info application informations from AppArc.
+     * @return ETrue if app info was updatedd
+     */
+    TBool SetAppCaptionL( CCaInnerEntry* aEntry, TApaAppInfo* info );
+
+    /**
+     * Gets component id from entry.
+     * @param aEntry CCaInnerEntry with application.
+     * @return component id
+     */
+    TInt GetComponentIdFromEntryL( CCaInnerEntry* aEntry );
+
+    /**
+     * Sets new attribute value.
+     * @param aEntry CCaInnerEntry with application.
+     * @param aKey attribute name.
+     * @param aValue attribute value.
+     * @return ETrue if attribute was updated or added
+     */
+    TBool AddAttributeL(
+            CCaInnerEntry* aEntry,
+            const TDesC& aKey,
+            const TDesC& aValue );
+    
+    /**
+     * Removes attribute from entry.
+     * @param aEntry CCaInnerEntry with application.
+     * @param aKey attribute name.
+     * @return ETrue if attribute was removed
+     */
+    TBool RemoveAttributeL( CCaInnerEntry* aEntry, const TDesC& aKey );
+
+    /**
      * Set information from TApaAppInfo to entry.
      * @param aEntry CCaInnerEntry with application.
      * @return ETrue if app info was updatedd
@@ -284,10 +329,10 @@
     void SetMissingFlagL( CCaInnerEntry* aEntry );
 
     /**
-     * Clear "visible" flag (and also "missing" and "used").
+     * Clear all flags.
      * @param aEntry entry.
      */
-    void ClearVisibleFlagL( CCaInnerEntry* aEntry );
+    void ClearAllFlagsL( CCaInnerEntry* aEntry );
 
     /**
      * Check currently inserted MMC card, update and save MMC history.
@@ -300,40 +345,17 @@
      * @return Current MMC id or 0.
      */
     TUint CurrentMmcId() const;
-
+    
     /**
-     * Check if file is on a given default drive type.
-     * @param aFileName File name.
+     * Check if drive letter is on a given default drive type.
+     * @param aDriveLetter drive letter .
      * @param aDefaultDrive default drive type
      * @return ETrue if aFileName is on a given default drive type.
      */
-    TBool IsFileInDrive( const TDesC& aFileName,
-            const DriveInfo::TDefaultDrives& aDefaultDrive ) const;
-
-    /**
-     * Check if application is installed on a given drive type.
-     * @param aUid app uid.
-     * @param aDefaultDrive default drive type.
-     * @return ETrue if app is installed on a given drive type.
-     */
-    TBool IsAppInDriveL( const TUid aUid,
+    TBool IsCharInDrive( const TChar& aDriveLetter,
             const DriveInfo::TDefaultDrives& aDefaultDrive ) const;
 
     /**
-     * Check if application is installed on MMC.
-     * @param aUid app uid.
-     * @return ETrue if app is installed on MMC.
-     */
-    TBool IsInMmcL( const TUid aUid ) const;
-
-    /**
-     * Check if application is installed on mass storage.
-     * @param aUid app uid.
-     * @return ETrue if app is installed on mass storage.
-     */
-    TBool IsInMassStorageL( const TUid aUid ) const;
-
-    /**
      * Check if drive's status is EDriveInUse.
      * @param aDefaultDrive default drive type.
      * @return ETrue if drive is in use.
@@ -381,7 +403,7 @@
      * @param aEntry entry being updated with component id attribute.
      * @return ETrue when component id attribute of the entry has been added or changed.
      */
-    TBool UpdateComponentIdL( CCaInnerEntry& aEntry ) const;
+    TBool UpdateComponentIdL( CCaInnerEntry& aEntry );
 
 private:
     // data
@@ -389,9 +411,9 @@
     RApaLsSession iApaLsSession; ///< AppArc session. Own.
     CCaSrvMmcHistory* iMmcHistory; ///< MMC history. Own.
     RFs iFs; ///< File Server Session. Own.
-    Usif::RSoftwareComponentRegistry iSoftwareRegistry;
-
+    
     CCaStorageProxy& iCaStorageProxy; ///< Not own
+    Usif::RSoftwareComponentRegistry& iSoftwareRegistry; ///< Not own
     CCaSrvEngUtils& iSrvEngUtils; ///< Not own
 
     TInt iCollectionDownloadId;
--- a/contentstorage/casrv/caappscanner/src/caappscannerhandler.cpp	Tue Jun 29 10:20:30 2010 +0300
+++ b/contentstorage/casrv/caappscanner/src/caappscannerhandler.cpp	Fri Jul 09 14:19:08 2010 +0300
@@ -24,7 +24,8 @@
     CCaAppScannerHandler* self = new (ELeave) CCaAppScannerHandler(
             aPluginParams);
     CleanupStack::PushL(self);
-    self->ConstructL(*aPluginParams->storageProxy, *aPluginParams->engUtils);
+    self->ConstructL(*aPluginParams->storageProxy,
+	    *aPluginParams->softwareRegistry, *aPluginParams->engUtils);
     CleanupStack::Pop();
     return self;
     }
@@ -39,9 +40,11 @@
     }
 
 void CCaAppScannerHandler::ConstructL(CCaStorageProxy& aCaStorageProxy,
+        Usif::RSoftwareComponentRegistry& aSoftwareRegistry,
         CCaSrvEngUtils& aUtils)
     {
-    iScanner = CCaSrvAppScanner::NewL(aCaStorageProxy, aUtils);
+    iScanner = CCaSrvAppScanner::NewL(aCaStorageProxy, aSoftwareRegistry,
+	    aUtils);
     }
 
 //  End of File
--- a/contentstorage/casrv/caappscanner/src/casrvappscanner.cpp	Tue Jun 29 10:20:30 2010 +0300
+++ b/contentstorage/casrv/caappscanner/src/casrvappscanner.cpp	Fri Jul 09 14:19:08 2010 +0300
@@ -34,6 +34,8 @@
 
 using namespace Usif;
 
+
+
 // ==================== LOCAL FUNCTIONS ====================
 
 /**
@@ -69,10 +71,11 @@
 // ---------------------------------------------------------
 //
 CCaSrvAppScanner* CCaSrvAppScanner::NewL( CCaStorageProxy& aCaStorageProxy,
+        Usif::RSoftwareComponentRegistry& aSoftwareRegistry,
         CCaSrvEngUtils& aUtils )
     {
     CCaSrvAppScanner* scanner = new ( ELeave ) CCaSrvAppScanner(
-            aCaStorageProxy, aUtils );
+            aCaStorageProxy, aSoftwareRegistry, aUtils );
     CleanupStack::PushL( scanner );
     scanner->ConstructL();
     CleanupStack::Pop( scanner );
@@ -86,7 +89,6 @@
 CCaSrvAppScanner::~CCaSrvAppScanner()
     {
     Cancel();
-    iSoftwareRegistry.Close();
     iApaLsSession.Close();
     delete iMmcHistory;
     iFs.Close();
@@ -97,9 +99,11 @@
 // ---------------------------------------------------------
 //
 CCaSrvAppScanner::CCaSrvAppScanner( CCaStorageProxy& aCaStorageProxy,
+        Usif::RSoftwareComponentRegistry& aSoftwareRegistry,
         CCaSrvEngUtils& aUtils ) :
     CActive( CActive::EPriorityStandard ),
-    iCaStorageProxy( aCaStorageProxy ), iSrvEngUtils( aUtils )
+    iCaStorageProxy( aCaStorageProxy ),
+    iSoftwareRegistry(aSoftwareRegistry), iSrvEngUtils( aUtils )
     {
     CActiveScheduler::Add( this );
     }
@@ -126,7 +130,6 @@
     iMmcHistory->LoadL( iFs, KCaMmcHistoryFname() );
 
     User::LeaveIfError( iApaLsSession.Connect() );
-    User::LeaveIfError( iSoftwareRegistry.Connect() );
     iApaLsSession.SetNotify( EFalse, iStatus );
     iCollectionDownloadId = 0;
     iAllCollectionId = 0;
@@ -164,15 +167,14 @@
 				{
                 id = AddAppEntryL(
                         updatedAppsInfo[i].iAppUid.iUid, UpdateMmcHistoryL() );
+                AddEntryToDownloadedCollectionL( id );
 				}
 			else
 			    {
                 ASSERT( resultArray.Count() == 1 );
                 id = resultArray[0]->GetId();
                 UpdateAppEntryL( resultArray[0], UpdateMmcHistoryL(), ETrue );
-                AddEntryToPredefinedCollectionL( resultArray[0], ETrue );
-			    }
-            AddEntryToDownloadedCollectionL( id );
+                }
             MakeNotEmptyCollectionsVisibleL();
 			}
 		else if( action == TApaAppUpdateInfo::EAppNotPresent )
@@ -255,25 +257,40 @@
 // ---------------------------------------------------------
 //
 void CCaSrvAppScanner::UpdateAppEntryL(
-        CCaInnerEntry* aEntry, TUint aMmcId, TBool aAlwaysUpdate  )
+        CCaInnerEntry* aEntry, TUint aMmcId, TBool aAlwaysUpdate )
     {
-    TBool toUpdate = HandleMmcAttrUpdateL( aEntry, aMmcId );
-    TBool missingVisibleFlagChanged =
-        HandleMissingVisibleFlagsUpdate( aEntry );
-    toUpdate = missingVisibleFlagChanged || toUpdate;
-    toUpdate = HandleRemovableVisibleFlagsUpdateL( aEntry ) || toUpdate;
+    TBool missingFlagChanged = HandleMissingFlagsUpdate( aEntry );
+    TBool visibleFlagChanged = HandleVisibleFlagUpdate( aEntry );
+
+
+    // To handle case with mmc card. When mmc attritube is updated then
+    // used flag should be change. When aplication is update but
+    // it is not appear then this flag should be change too.
+    if( aAlwaysUpdate && !missingFlagChanged )
+        {
+        HandleUsedFlagUpdate( aEntry );
+        }
+    TBool toUpdate = missingFlagChanged || visibleFlagChanged;
     toUpdate = SetApaAppInfoL( aEntry ) || toUpdate;
+    toUpdate = HandleRemovableFlagAndMmcAttrUpdateL( aEntry, aMmcId ) || toUpdate;
     toUpdate = RemoveUninstallFlagL( aEntry ) || toUpdate;
 
     if( toUpdate || aAlwaysUpdate )
         {
         //update app in storage
-        HandleUsedFlagUpdate( aEntry );
         TItemAppearance itemAppearanceChange = EItemAppearanceNotChanged;
-        if( missingVisibleFlagChanged )
+        if( missingFlagChanged || visibleFlagChanged )
             {
             itemAppearanceChange = EItemAppeared;
             }
+        if( !missingFlagChanged )
+            {
+            AddEntryToPredefinedCollectionL( aEntry, ETrue );
+            if ( aEntry->GetFlags() & ERemovable )
+                {
+                AddEntryToDownloadedCollectionL( aEntry->GetId() );
+                }
+            }
         iCaStorageProxy.AddL( aEntry, EFalse, itemAppearanceChange );
         }
     }
@@ -283,42 +300,63 @@
 // ---------------------------------------------------------
 //
 TBool CCaSrvAppScanner::HandleMmcAttrUpdateL(
+        const Usif::CComponentEntry* aEntry,
         CCaInnerEntry* aItem, TUint aMmcId )
     {
-    TBool toUpdate( ETrue );
-    if( IsInMmcL( TUid::Uid( aItem->GetUid() ) ) )
+    TBool toChange( EFalse );
+    if( aEntry && aEntry->IsRemovable() )
         {
-        //app is instaled on mmc - KCaAttrMmcId attribute update
-        RBuf uidString;
-        uidString.CleanupClosePushL();
-        uidString.CreateL(KUidChars);
-        uidString.Format( KHexFormat, aMmcId );
-        aItem->AddAttributeL( KCaAttrMmcId, uidString );
-        CleanupStack::PopAndDestroy( &uidString );
-        }
-    else if ( IsInMassStorageL( TUid::Uid( aItem->GetUid() ) ) )
-        {
-        //its app installed on mass storage, we need to leave it
-        //in case of connecting usb in mass storage mode
-        aItem->AddAttributeL( KCaAttrMmcId, KCaMassStorage );
+        TChar currentDriveLetter;
+        if ( aEntry->SoftwareType().Compare(KCaAttrAppTypeValueNative()) != 0 )
+            {
+            TDriveList driveList = aEntry->InstalledDrives();
+            for ( TInt driveNr=EDriveY; driveNr >= EDriveA; driveNr-- )
+                {
+                if ( driveList[driveNr] )
+                    {
+                    User::LeaveIfError( iFs.DriveToChar( driveNr,
+                            currentDriveLetter ) );
+                    }
+                }
+            }
+        else
+            {
+            TApaAppInfo* appInfo = new ( ELeave ) TApaAppInfo();
+            if( !iApaLsSession.GetAppInfo( *appInfo,
+                    TUid::Uid( aItem->GetUid() ) ) )
+                {
+                currentDriveLetter = appInfo->iFullName[0];
+                }
+            }
+
+        if( IsCharInDrive( currentDriveLetter,
+                DriveInfo::EDefaultRemovableMassStorage ) )
+            {
+            //app is instaled on mmc - KCaAttrMmcId attribute update
+            RBuf uidString;
+            uidString.CleanupClosePushL();
+            uidString.CreateL( KUidChars );
+            uidString.Format( KHexFormat, aMmcId );
+            toChange = AddAttributeL( aItem, KCaAttrMmcId, uidString );
+            CleanupStack::PopAndDestroy( &uidString );
+            }
+        else if ( IsCharInDrive( currentDriveLetter, DriveInfo::EDefaultMassStorage ) )
+            {
+            //its app installed on mass storage, we need to leave it
+            //in case of connecting usb in mass storage mode
+            toChange = AddAttributeL( aItem, KCaAttrMmcId, KCaMassStorage );
+            }
+        else
+            {
+            toChange = RemoveAttributeL( aItem, KCaAttrMmcId );
+            }
         }
     else
         {
-        RBuf attrVal;
-        attrVal.CleanupClosePushL();
-        attrVal.CreateL( KCaMaxAttrValueLen );
-        if( aItem->FindAttribute( KCaAttrMmcId, attrVal ) )
-            {
-            aItem->RemoveAttributeL( KCaAttrMmcId );
-            }
-        else
-            {
-            toUpdate = EFalse;
-            }
-        CleanupStack::PopAndDestroy( &attrVal );
+        toChange = RemoveAttributeL( aItem, KCaAttrMmcId );
         //its installed on c: drive - remove attribute
         }
-    return toUpdate;
+    return toChange;
     }
 
 // ---------------------------------------------------------
@@ -359,11 +397,23 @@
 //
 // ---------------------------------------------------------
 //
-TBool CCaSrvAppScanner::HandleRemovableVisibleFlagsUpdateL(
-        CCaInnerEntry* aItem )
+TBool CCaSrvAppScanner::HandleRemovableFlagAndMmcAttrUpdateL(
+        CCaInnerEntry* aItem, TUint aMmcId )
     {
     TBool toChange( EFalse );
-    if( ( aItem->GetFlags() & EVisible ) && IsInRomL( aItem->GetUid() ) )
+    TComponentId compId = GetComponentIdFromEntryL( aItem );
+
+    TBool isRemovable( EFalse );
+    if( compId )
+        {
+        CComponentEntry* entry = CComponentEntry::NewLC();
+        iSoftwareRegistry.GetComponentL( compId , *entry );
+        isRemovable = entry->IsRemovable();
+        toChange = HandleMmcAttrUpdateL( entry, aItem, aMmcId );
+        CleanupStack::PopAndDestroy( entry );
+        }
+
+    if( ( aItem->GetFlags() & EVisible ) && !isRemovable )
         {
         if( ( aItem->GetFlags() & ERemovable ) != 0 )
             {
@@ -373,7 +423,7 @@
         }
     else
         {
-        if( ( aItem->GetFlags() & ERemovable ) == 0 )
+        if( ( aItem->GetFlags() & ERemovable ) == 0 && isRemovable )
             {
             aItem->SetFlags( aItem->GetFlags() | ERemovable );
             toChange = ETrue;
@@ -401,15 +451,14 @@
 //
 // ---------------------------------------------------------
 //
-TBool CCaSrvAppScanner::HandleMissingVisibleFlagsUpdate(
+TBool CCaSrvAppScanner::HandleMissingFlagsUpdate(
         CCaInnerEntry* aItem )
     {
     TBool ret( EFalse );
-    if( aItem->GetFlags() & EMissing ||
-        !( aItem->GetFlags() & EVisible ) )
+    if( aItem->GetFlags() & EMissing )
         {
-        //application found so we unset "missing" and set "visible" flags
-        aItem->SetFlags( aItem->GetFlags() & ~EMissing | EVisible );
+        //application found so we unset "missing" flag
+        aItem->SetFlags( aItem->GetFlags() & ~EMissing );
         ret = ETrue;
         }
     return ret;
@@ -789,8 +838,7 @@
     appEntry->SetRole( EItemEntryRole );
 
     SetApaAppInfoL( appEntry );
-    HandleRemovableVisibleFlagsUpdateL( appEntry );
-    HandleMmcAttrUpdateL( appEntry, aCurrentMmcId );
+    HandleRemovableFlagAndMmcAttrUpdateL( appEntry, aCurrentMmcId );
 
     iCaStorageProxy.AddL( appEntry );
     id = appEntry->GetId();
@@ -812,26 +860,8 @@
     CleanupStack::PushL(info);
     if( KErrNone == iSrvEngUtils.GetAppInfo( *aEntry, *info ) )
         {
-        RBuf attrVal;
-        attrVal.CleanupClosePushL();
-        attrVal.CreateL( KCaMaxAttrValueLen );
-        aEntry->FindAttribute( KCaAttrShortName, attrVal );
-        if( attrVal.Compare( info->iShortCaption ) != KErrNone
-                || aEntry->GetText().Compare( info->iCaption )
-                        != KErrNone )
-            {
-            aEntry->SetTextL( info->iCaption );
-            aEntry->AddAttributeL( KCaAttrShortName, info->iShortCaption );
-            changed = ETrue;
-            }
-
-
-        if ( UpdateComponentIdL( *aEntry ) )
-            {
-            changed = ETrue;
-            }
-
-        CleanupStack::PopAndDestroy( &attrVal );
+        changed = SetAppCaptionL( aEntry, info ) || changed;
+        changed = UpdateComponentIdL( *aEntry ) || changed;
 
         // check if its java app and add attr for entries
         TUid appTypeUid;
@@ -839,55 +869,11 @@
             {
             if( appTypeUid == KMidletApplicationTypeUid )
                 {
-                aEntry->AddAttributeL(
-                        KCaAttrAppType,
-                        KCaAttrAppTypeValueJava );
-
-                TComponentId compId =
-                        iSoftwareRegistry.GetComponentIdForAppL( info->iUid );
-                CPropertyEntry* propertyEntry =
-                    iSoftwareRegistry.GetComponentPropertyL( compId, KCaScrPropertyAppSettings );
-                CleanupStack::PushL( propertyEntry );
-                if ( propertyEntry &&
-                        propertyEntry->PropertyType() == CPropertyEntry::ELocalizedProperty )
-                    {
-                    aEntry->AddAttributeL(
-                            KCaAttrAppSettingsPlugin,
-                            static_cast<CLocalizablePropertyEntry*>(propertyEntry)->StrValue() );
-                    }
-                CleanupStack::PopAndDestroy( propertyEntry );
+                changed = SetJavaAppL( aEntry ) || changed;
                 }
-            else if ( appTypeUid == KCWRTApplicationTypeUid )
+            else if( appTypeUid == KCWRTApplicationTypeUid )
                 {
-                aEntry->AddAttributeL(
-                        KCaAttrAppType,
-                        KCaAttrAppTypeValueCWRT );
-                TComponentId compId =
-                        iSoftwareRegistry.GetComponentIdForAppL( info->iUid );
-                CPropertyEntry* isMiniview =
-                                        iSoftwareRegistry.GetComponentPropertyL( compId,
-                                                KCaScrPropertyIsMiniviewSupported );
-                CleanupStack::PushL( isMiniview );
-                // check first if we support mini view
-                if (isMiniview && isMiniview->PropertyType() == CPropertyEntry::EIntProperty &&
-                        static_cast<CIntPropertyEntry*>(isMiniview)->IntValue())
-                    {
-                    CPropertyEntry* appId =
-                        iSoftwareRegistry.GetComponentPropertyL( compId, KCaScrPropertyAppId );
-                    CleanupStack::PushL( appId );
-                    if ( appId &&
-                         appId->PropertyType() == CPropertyEntry::ELocalizedProperty )
-                        {
-                        aEntry->AddAttributeL(
-                                            KCaAttrAppWidgetUri,
-                                            KCaAttrAppWidgetUriCWRTValue );
-                        aEntry->AddAttributeL(
-                                            KCaAttrAppWidgetParamWebAppId,
-                                            static_cast<CLocalizablePropertyEntry*>(appId)->StrValue() );
-                        }
-                    CleanupStack::PopAndDestroy( appId );
-                    }
-                CleanupStack::PopAndDestroy( isMiniview );
+                changed = SetCWRTAppL( aEntry ) || changed;
                 }
             }
         }
@@ -895,6 +881,129 @@
     return changed;
     }
 
+// ---------------------------------------------------------------------------
+//
+// ---------------------------------------------------------------------------
+//
+TBool CCaSrvAppScanner::SetAppCaptionL(
+        CCaInnerEntry* aEntry, TApaAppInfo* info )
+    {
+    TBool changed(EFalse);
+    if( aEntry->GetText().Compare( info->iCaption ) != KErrNone )
+        {
+        aEntry->SetTextL( info->iCaption );
+        changed = ETrue;
+        }
+    changed = AddAttributeL( aEntry, KCaAttrShortName, info->iShortCaption )
+            || changed;
+
+    return changed;
+    }
+
+// ---------------------------------------------------------------------------
+//
+// ---------------------------------------------------------------------------
+//
+TBool CCaSrvAppScanner::SetJavaAppL( CCaInnerEntry* aEntry )
+    {
+    TBool changed = AddAttributeL(
+            aEntry, KCaAttrAppType, KCaAttrAppTypeValueJava );
+    TComponentId compId = GetComponentIdFromEntryL( aEntry );
+    CPropertyEntry* propertyEntry = iSoftwareRegistry.GetComponentPropertyL(
+            compId, KCaScrPropertyAppSettings );
+    CleanupStack::PushL( propertyEntry );
+
+    if( propertyEntry
+            && propertyEntry->PropertyType()
+                    == CPropertyEntry::ELocalizedProperty )
+        {
+        changed = AddAttributeL( aEntry, KCaAttrAppSettingsPlugin,
+                static_cast<CLocalizablePropertyEntry*>(
+                        propertyEntry)->StrValue() ) || changed;
+        }
+    CleanupStack::PopAndDestroy( propertyEntry );
+    return changed;
+    }
+
+// ---------------------------------------------------------------------------
+//
+// ---------------------------------------------------------------------------
+//
+TBool CCaSrvAppScanner::SetCWRTAppL( CCaInnerEntry* aEntry )
+    {
+    TBool changed = AddAttributeL( aEntry, KCaAttrAppType, KCaAttrAppTypeValueCWRT );
+    TComponentId compId = GetComponentIdFromEntryL( aEntry );
+
+    CPropertyEntry* isMiniview = iSoftwareRegistry.GetComponentPropertyL(
+            compId, KCaScrPropertyIsMiniviewSupported );
+    CleanupStack::PushL( isMiniview );
+
+    // check first if we support mini view
+    if( isMiniview && isMiniview->PropertyType() == CPropertyEntry::EIntProperty
+            && static_cast<CIntPropertyEntry*>( isMiniview)->IntValue() )
+        {
+        CPropertyEntry* appId = iSoftwareRegistry.GetComponentPropertyL(
+                compId, KCaScrPropertyAppId );
+        CleanupStack::PushL( appId );
+
+        if ( appId
+                && appId->PropertyType() == CPropertyEntry::ELocalizedProperty )
+            {
+            changed = AddAttributeL(
+                    aEntry, KCaAttrAppWidgetUri, KCaAttrAppWidgetUriCWRTValue )
+                        || changed;
+            changed = AddAttributeL( aEntry, KCaAttrAppWidgetParamWebAppId,
+                    static_cast<CLocalizablePropertyEntry*>(
+                            appId)->StrValue() ) || changed;
+            }
+        CleanupStack::PopAndDestroy( appId );
+        }
+    CleanupStack::PopAndDestroy( isMiniview );
+    return changed;
+    }
+
+// ---------------------------------------------------------
+//
+// ---------------------------------------------------------
+//
+TBool CCaSrvAppScanner::AddAttributeL( CCaInnerEntry* aEntry, const TDesC& aKey,
+        const TDesC& aValue )
+    {
+    TBool changed(EFalse);
+    RBuf attrValue;
+    attrValue.CleanupClosePushL();
+    attrValue.CreateL( KCaMaxAttrValueLen );
+
+    TBool found = aEntry->FindAttribute( aKey, attrValue );
+    if( !( found && attrValue.Compare( aValue ) == KErrNone ) )
+        {
+        aEntry->AddAttributeL( aKey, aValue );
+        changed = ETrue;
+        }
+    CleanupStack::PopAndDestroy( &attrValue );
+    return changed;
+    }
+
+// ---------------------------------------------------------
+//
+// ---------------------------------------------------------
+//
+TBool CCaSrvAppScanner::RemoveAttributeL( CCaInnerEntry* aEntry,
+        const TDesC& aKey )
+    {
+    TBool toChange( EFalse );
+    RBuf attrVal;
+    attrVal.CleanupClosePushL();
+    attrVal.CreateL( KCaMaxAttrValueLen );
+    if( aEntry->FindAttribute( KCaAttrMmcId, attrVal ) )
+        {
+        aEntry->RemoveAttributeL( aKey );
+        toChange = ETrue;
+        }
+    CleanupStack::PopAndDestroy( &attrVal );
+    return toChange;
+    }
+
 // ---------------------------------------------------------
 //
 // ---------------------------------------------------------
@@ -924,12 +1033,12 @@
             else
                 {
                 aCaEntries[i]->RemoveAttributeL( KCaAttrMmcId() );
-                ClearVisibleFlagL( aCaEntries[i] );
+                ClearAllFlagsL( aCaEntries[i] );
                 }
             }
         else
             {
-            ClearVisibleFlagL( aCaEntries[i] );
+            ClearAllFlagsL( aCaEntries[i] );
             }
         CleanupStack::PopAndDestroy( &attrVal );
         }
@@ -952,16 +1061,11 @@
 //
 // ---------------------------------------------------------
 //
-void CCaSrvAppScanner::ClearVisibleFlagL( CCaInnerEntry* aEntry )
+void CCaSrvAppScanner::ClearAllFlagsL( CCaInnerEntry* aEntry )
     {
     if( aEntry->GetFlags() & EVisible )
         {
-        aEntry->SetFlags(
-                aEntry->GetFlags() &
-                ~EUninstall &
-                ~EVisible &
-                ~EMissing &
-                ~EUsed );
+        aEntry->SetFlags( 0 );
         iCaStorageProxy.AddL( aEntry, EFalse, EItemDisappeared );
         }
     }
@@ -1008,23 +1112,19 @@
 //
 // ---------------------------------------------------------
 //
-TBool CCaSrvAppScanner::IsFileInDrive(
-    const TDesC& aFileName,
-    const DriveInfo::TDefaultDrives& aDefaultDrive ) const
+TBool CCaSrvAppScanner::IsCharInDrive( const TChar& aDriveLetter,
+        const DriveInfo::TDefaultDrives& aDefaultDrive ) const
     {
     TBool retVal( EFalse );
-    if ( aFileName.Length()>0 )
+    TInt mmcDrive;
+    TInt err = DriveInfo::GetDefaultDrive( aDefaultDrive, mmcDrive );
+    if( !err )
         {
-        TInt mmcDrive;
-        TInt err = DriveInfo::GetDefaultDrive( aDefaultDrive, mmcDrive );
-        if( !err )
+        TInt fileDrive;
+        err = RFs::CharToDrive( aDriveLetter, fileDrive );
+        if( !err && fileDrive == mmcDrive )
             {
-            TInt fileDrive;
-            err = RFs::CharToDrive( aFileName[0], fileDrive );
-            if( !err && fileDrive == mmcDrive )
-                {
-                retVal = ETrue;
-                }
+            retVal = ETrue;
             }
         }
     return retVal;
@@ -1034,52 +1134,6 @@
 //
 // ---------------------------------------------------------
 //
-TBool CCaSrvAppScanner::IsAppInDriveL(
-        const TUid aUid,
-        const DriveInfo::TDefaultDrives& aDefaultDrive ) const
-    {
-    TBool ret( EFalse );
-    TApaAppInfo* appInfo = new ( ELeave ) TApaAppInfo();
-    TInt err = iApaLsSession.GetAppInfo( *appInfo, aUid );
-    if( !err && IsFileInDrive( appInfo->iFullName, aDefaultDrive ) )
-        {
-        ret = ETrue;
-        }
-    delete appInfo;
-    return ret;
-    }
-
-// ---------------------------------------------------------
-//
-// ---------------------------------------------------------
-//
-TBool CCaSrvAppScanner::IsInMmcL( const TUid aUid ) const
-    {
-    return IsAppInDriveL( aUid, DriveInfo::EDefaultRemovableMassStorage );
-    }
-
-// ---------------------------------------------------------
-//
-// ---------------------------------------------------------
-//
-TBool CCaSrvAppScanner::IsInMassStorageL( const TUid aUid ) const
-    {
-    return IsAppInDriveL( aUid, DriveInfo::EDefaultMassStorage );
-    }
-
-// ---------------------------------------------------------
-//
-// ---------------------------------------------------------
-//
-TBool CCaSrvAppScanner::IsInRomL( TInt aUid )
-    {
-    return IsAppInDriveL( TUid::Uid( aUid ), DriveInfo::EDefaultRom );
-    }
-
-// ---------------------------------------------------------
-//
-// ---------------------------------------------------------
-//
 TBool CCaSrvAppScanner::IsDriveInUse(
         const DriveInfo::TDefaultDrives& aDefaultDrive )
     {
@@ -1158,17 +1212,38 @@
 
 // ---------------------------------------------------------
 //
-// ---------------------------------------------------------//
-TBool CCaSrvAppScanner::UpdateComponentIdL( CCaInnerEntry& aEntry ) const
+// ---------------------------------------------------------
+//
+TInt CCaSrvAppScanner::GetComponentIdFromEntryL( CCaInnerEntry* aEntry )
+    {
+    TInt id(0);
+    RBuf componentId;
+    componentId.CleanupClosePushL();
+    componentId.CreateL( KCaMaxAttrValueLen );
+
+    TBool found = aEntry->FindAttribute( KCaComponentId, componentId );
+    if( found )
+        {
+        TLex parser;
+        parser.Assign( componentId );
+        parser.Val( id );
+        }
+    CleanupStack::PopAndDestroy( &componentId );
+
+    return id;
+    }
+
+// ---------------------------------------------------------
+//
+// ---------------------------------------------------------
+//
+TBool CCaSrvAppScanner::UpdateComponentIdL( CCaInnerEntry& aEntry )
     {
     TBool updated( EFalse );
+    TComponentId componentId( 0 );
 
-    TUid uid;
-    TInt err(KErrNone);
-    TComponentId componentId( 0 );
-    TRAP(err, componentId =
-            iSoftwareRegistry.GetComponentIdForAppL(
-            uid.Uid( aEntry.GetUid() ) ) )
+    TRAPD(err, componentId = iSoftwareRegistry.GetComponentIdForAppL(
+            TUid::Uid( aEntry.GetUid() ) ) )
 
     if ( componentId > 0 && err == KErrNone )
         {
@@ -1177,24 +1252,9 @@
         newComponentId.CreateL( sizeof(TComponentId) + 1 );
         newComponentId.AppendNum( componentId );
 
-        RBuf oldComponentId;
-        oldComponentId.CleanupClosePushL();
-        oldComponentId.CreateL( KCaMaxAttrValueLen );
-
-        const TBool componentIdAttributeFound =
-            aEntry.FindAttribute( KCaComponentId, oldComponentId );
+        // 'add' or 'update' the component id attribute value
+        updated = AddAttributeL( &aEntry, KCaComponentId, newComponentId );
 
-        if ( !componentIdAttributeFound
-            || oldComponentId.Compare( newComponentId ) != 0 )
-            {
-            // 'add' or 'update' the component id attribute value
-            aEntry.AddAttributeL( KCaComponentId,
-                newComponentId );
-
-            updated = ETrue;
-            }
-
-        CleanupStack::PopAndDestroy( &oldComponentId );
         CleanupStack::PopAndDestroy( &newComponentId );
         }
     return updated;
--- a/contentstorage/casrv/calocalizerscanner/src/calocalizerscannerproxy.cpp	Tue Jun 29 10:20:30 2010 +0300
+++ b/contentstorage/casrv/calocalizerscanner/src/calocalizerscannerproxy.cpp	Fri Jul 09 14:19:08 2010 +0300
@@ -19,7 +19,6 @@
 #include <f32file.h>
 #include <qtranslator.h>
 #include <calocalizationentry.h>
-#include <QLocale>
 #include <hbtextresolversymbian.h>
 
 //#include "cainternaltypes.h"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/contentstorage/casrv/caprogresscanner/data/caprogresscanner.rss	Fri Jul 09 14:19:08 2010 +0300
@@ -0,0 +1,50 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: caprogresscanner.rss
+* ECOM DLL UID:           20022F86
+* ECOM interface UID:    (KCaSrvPluginInterfaceUid)
+* ECOM Implementation:    20022F87
+*
+*/
+
+#include <ecom/registryinfo.rh>
+#include "casrvpluginuids.hrh"
+
+RESOURCE REGISTRY_INFO theInfo
+    {
+    // UID for the DLL
+    dll_uid = 0x20022F86;
+    // Declare array of interface info
+    interfaces =
+        {
+        INTERFACE_INFO
+            {
+            // UID of interface that is implemented
+            interface_uid = KCaSrvPluginInterfaceUid;
+            implementations =
+                {
+                // Info for App Scanner
+                IMPLEMENTATION_INFO
+                    {
+                    implementation_uid = 0x20022F87;
+                    version_no         = 1;
+                    display_name       = "Progress Scanner";
+                    default_data       = "PROGRESSCANNER";
+                    opaque_data        = "";
+                    }
+                };
+            }
+        };
+    }
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/contentstorage/casrv/caprogresscanner/group/bld.inf	Fri Jul 09 14:19:08 2010 +0300
@@ -0,0 +1,31 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: bld.inf
+*
+*/
+
+PRJ_PLATFORMS
+// specify the platforms your component needs to be built for here
+// defaults to WINS ARMI ARM4 THUMB so you can ignore this if you just build these
+
+PRJ_EXPORTS
+
+
+PRJ_MMPFILES
+// Specify the .mmp files required for building the important component
+// releasables. Note that you should specify any .mmp files for test
+// programs further down the file.
+caprogresscanner.mmp
+
+PRJ_TESTMMPFILES
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/contentstorage/casrv/caprogresscanner/group/caprogresscanner.mmp	Fri Jul 09 14:19:08 2010 +0300
@@ -0,0 +1,60 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: caprogresscanner.mmp
+*
+*/
+
+// To get the MW_LAYER_SYSTEMINCLUDE-definition
+#include <platform_paths.hrh>
+
+TARGET caprogresscanner.dll
+TARGETTYPE PLUGIN
+
+// ECom Dll recognition UID followed by the unique UID for this dll
+UID 0x10009D8D 0x20022F86
+SECUREID 0x20022F86
+CAPABILITY CAP_ECOM_PLUGIN
+
+SOURCEPATH      ../src
+SOURCE          proxy.cpp
+SOURCE          caprogresscanner.cpp
+
+USERINCLUDE     ../inc
+USERINCLUDE     ../../casrvmgr/inc
+USERINCLUDE     ../../../inc
+USERINCLUDE     ../../../cautils/inc
+USERINCLUDE     ../../../srvinc
+
+
+MW_LAYER_SYSTEMINCLUDE
+
+SOURCEPATH      ../data
+START RESOURCE  caprogresscanner.rss
+    LANG    sc
+    TARGET  caprogresscanner.rsc
+END
+
+LIBRARY         euser.lib
+LIBRARY         ECom.lib
+LIBRARY         camenu.lib
+LIBRARY         cautils.lib
+LIBRARY         apparc.lib
+LIBRARY         apgrfx.lib
+LIBRARY         bafl.lib
+LIBRARY         efsrv.lib
+LIBRARY         platformenv.lib
+
+LIBRARY         sifnotification.lib
+LIBRARY         scrclient.lib
+LIBRARY         sif.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/contentstorage/casrv/caprogresscanner/inc/caprogresscanner.h	Fri Jul 09 14:19:08 2010 +0300
@@ -0,0 +1,125 @@
+/*
+ * Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:  ?Description
+ *
+ */
+
+#ifndef CAPROGRESSCANER_H
+#define CAPROGRESSCANER_H
+
+#include <e32base.h>
+#include <usif/sif/sifnotification.h>
+#include <usif/usifcommon.h>
+#include <usif/sif/sifcommon.h>
+#include <usif/scr/scr.h>
+
+#include "casrvplugin.h"
+#include "castorage_global.h"
+
+using namespace Usif; 
+
+class CCaStorageProxy;
+class CCaInnerEntry;
+
+/**
+ *  Uninstall Progress notifier.
+ *
+ *  @since S60 v5.0
+ */
+NONSHARABLE_CLASS( CCaProgresScanner ) : public CCaSrvPlugin, 
+        public MSifOperationsHandler
+    {
+
+public:
+    /**
+     * Creates an instance of CCaProgresScanner.
+     * @param aPLuginParam plugin param consist of storage, storage utils and scr.
+     */
+IMPORT_C static CCaProgresScanner* NewL( TPluginParams* aPLuginParam );
+
+    /**
+     * Destructor.
+     */
+    virtual ~CCaProgresScanner();
+
+private:
+
+    /**
+     * Constructor.
+     * @param aPLuginParam plugin param consist of storage, storage utils and scr.
+     */
+    CCaProgresScanner( TPluginParams* aPLuginParam );
+
+    /**
+     * Symbian 2nd phase constructor.
+     */
+    void ConstructL( );
+    
+    void UpdateProgressL( const CSifOperationProgressData& aProgressData );
+    void EndOperationL(TInt aError);
+    void MarkEntrysForUnistallL(TUint aKey, TComponentId aComponentId);
+
+public:
+    /**
+     * From MSifOperationsHandler
+     */
+    void StartOperationHandler(TUint aKey, const CSifOperationStartData& aStartData);
+
+    /**
+     * From MSifOperationsHandler
+     */
+    void EndOperationHandler(const CSifOperationEndData& aEndData);
+
+    /**
+     * From MSifOperationsHandler
+     */
+    void ProgressOperationHandler(const CSifOperationProgressData& aProgressData);
+    
+private:
+
+    /**
+     * USIF notifier
+     * Own.
+     * 
+     * Commented out since USIF notifications do not
+     * work on MCL wk20
+     */
+    CSifOperationsNotifier* iNotifier;
+    
+    /**
+     * Not Own.
+     * Reference to the Storage Proxy.
+     */
+    CCaStorageProxy& iStorageProxy;
+    
+    /**
+     * Reference to Software component registry. Not own.
+     */
+    RSoftwareComponentRegistry& iSoftwareRegistry;
+
+    /**
+     * All entries with componentID of uninstalling application
+     */
+    RPointerArray<CCaInnerEntry> iResultArrayItems;
+    
+    TUint iKey;
+    
+    CA_STORAGE_TEST_FRIEND_CLASS    (T_casrvProgresScaner)    
+    };
+
+
+#endif /* CAPROGRESSCANER_H */
+
+// End of File
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/contentstorage/casrv/caprogresscanner/src/caprogresscanner.cpp	Fri Jul 09 14:19:08 2010 +0300
@@ -0,0 +1,194 @@
+/*
+ * Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:  ?Description
+ *
+ */
+
+#include <s32mem.h>
+
+#include <usif/scr/scr.h>
+#include <usif/scr/screntries.h>
+
+#include "caprogresscanner.h"
+#include "castorageproxy.h"
+#include "cainnerquery.h"
+#include "cainnerentry.h"
+#include "caarraycleanup.inl"
+#include "casrvplugin.h"
+
+using namespace Usif;
+
+// ---------------------------------------------------------------------------
+//
+// ---------------------------------------------------------------------------
+//
+EXPORT_C CCaProgresScanner* CCaProgresScanner::NewL(
+        TPluginParams* aPluginParam )
+    {
+    CCaProgresScanner* self = new ( ELeave ) CCaProgresScanner(
+            aPluginParam );
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+// ---------------------------------------------------------------------------
+//
+// ---------------------------------------------------------------------------
+//
+CCaProgresScanner::~CCaProgresScanner()
+    {
+    delete iNotifier;
+    iResultArrayItems.ResetAndDestroy();
+    }
+
+// ---------------------------------------------------------------------------
+//
+// ---------------------------------------------------------------------------
+//
+CCaProgresScanner::CCaProgresScanner( TPluginParams* aPluginParam ) :
+        iStorageProxy( *aPluginParam->storageProxy ),
+        iSoftwareRegistry( *aPluginParam->softwareRegistry )
+    {
+    }
+
+// ---------------------------------------------------------------------------
+//
+// ---------------------------------------------------------------------------
+//
+void CCaProgresScanner::ConstructL()
+    {
+    iNotifier = CSifOperationsNotifier::NewL( *this );
+    }
+
+// ---------------------------------------------------------------------------
+//
+// ---------------------------------------------------------------------------
+//
+void CCaProgresScanner::StartOperationHandler( TUint aKey,
+        const CSifOperationStartData& aStartData )
+    {
+    TInt err( KErrNone );
+    TComponentId componentId( 0 );
+    iResultArrayItems.ResetAndDestroy();
+
+    TRAP(err, componentId = iSoftwareRegistry.GetComponentIdL(
+        aStartData.GlobalComponentId(), aStartData.SoftwareType() ));
+    if ( !err )
+        TRAP(err, MarkEntrysForUnistallL(aKey, componentId));
+
+    }
+
+// ---------------------------------------------------------------------------
+//
+// ---------------------------------------------------------------------------
+//
+void CCaProgresScanner::EndOperationHandler(
+        const CSifOperationEndData& aEndData )
+    {
+    TInt err = KErrNone;
+    TRAP( err, EndOperationL( aEndData.ErrorCode() ) );
+    iResultArrayItems.ResetAndDestroy();
+    }
+
+// ---------------------------------------------------------------------------
+//
+// ---------------------------------------------------------------------------
+//
+void CCaProgresScanner::ProgressOperationHandler(
+        const CSifOperationProgressData& aProgressData )
+    {
+    TInt err = KErrNone;
+    TRAP( err, UpdateProgressL( aProgressData ) );
+    }
+
+// ---------------------------------------------------------------------------
+//
+// ---------------------------------------------------------------------------
+//
+void CCaProgresScanner::UpdateProgressL(
+        const CSifOperationProgressData& aProgressData )
+    {
+    RBuf totalProgressBuf;
+    totalProgressBuf.CleanupClosePushL();
+    totalProgressBuf.CreateL( sizeof(TComponentId) + 1 );
+    totalProgressBuf.AppendNum( aProgressData.CurrentProgess() );
+
+    if ( iResultArrayItems.Count() && aProgressData.Phase() == EUninstalling )
+        {
+        for ( int i = 0; i < iResultArrayItems.Count(); i++ )
+            {
+            iResultArrayItems[i]->AddAttributeL( KCaAppUninstallProgress,
+                    totalProgressBuf );
+            iStorageProxy.AddL( iResultArrayItems[i], ETrue,
+                    EItemUninstallProgressChanged );
+            }
+        }
+
+    CleanupStack::PopAndDestroy( &totalProgressBuf );
+    }
+
+// ---------------------------------------------------------------------------
+//
+// ---------------------------------------------------------------------------
+//
+void CCaProgresScanner::EndOperationL( TInt aError )
+    {
+    if ( aError )
+        {
+        for ( int i = 0; i < iResultArrayItems.Count(); i++ )
+            {
+            iResultArrayItems[i]->SetFlags( iResultArrayItems[i]->GetFlags()
+                    & ~EUninstall );
+            iStorageProxy.AddL( iResultArrayItems[i] );
+            }
+        }
+    iNotifier->CancelSubscribeL( iKey );
+    }
+
+// ---------------------------------------------------------------------------
+//
+// ---------------------------------------------------------------------------
+//
+void CCaProgresScanner::MarkEntrysForUnistallL( TUint aKey,
+        TComponentId aComponentId )
+    {
+    RBuf componentIdBuf;
+    componentIdBuf.CleanupClosePushL();
+    componentIdBuf.CreateL( sizeof(TComponentId) + 1 );
+    componentIdBuf.AppendNum( aComponentId );
+
+    // find entry by componentID
+    CCaInnerQuery *innerQuery = CCaInnerQuery::NewLC();
+    innerQuery->SetRole( CCaInnerQuery::Item );
+    innerQuery->AddAttributeL( KCaAttrComponentId, componentIdBuf );
+
+    iStorageProxy.GetEntriesL( innerQuery, iResultArrayItems );
+
+    if ( iResultArrayItems.Count() )
+        {
+        for ( int i = 0; i < iResultArrayItems.Count(); i++ )
+            {
+            iResultArrayItems[i]->SetFlags( iResultArrayItems[i]->GetFlags()
+                    | EUninstall );
+            iStorageProxy.AddL( iResultArrayItems[i] );
+            }
+        // subscribe for progress notifier
+        iKey = aKey;
+        iNotifier->SubscribeL( aKey, ETrue );
+        }
+    CleanupStack::PopAndDestroy( innerQuery );
+    CleanupStack::PopAndDestroy( &componentIdBuf );
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/contentstorage/casrv/caprogresscanner/src/proxy.cpp	Fri Jul 09 14:19:08 2010 +0300
@@ -0,0 +1,47 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: proxy.cpp
+ *
+ */
+
+#include <e32std.h>
+#include <ecom/implementationproxy.h>
+#include "caprogresscanner.h"
+
+const TUint KCaProgresScannerImplProxyUid = 0x20022F87;
+
+// Provides a key value pair table, this is used to identify
+// the correct construction function for the requested interface.
+const TImplementationProxy ImplementationTable[] =
+    {
+    IMPLEMENTATION_PROXY_ENTRY(KCaProgresScannerImplProxyUid,
+        CCaProgresScanner::NewL)
+    };
+
+#ifdef COVERAGE_MEASUREMENT
+#pragma CTC SKIP
+#endif //COVERAGE_MEASUREMENT (proxy for instantiation)
+
+// Function used to return an instance of the proxy table.
+EXPORT_C const TImplementationProxy* ImplementationGroupProxy(
+        TInt& aTableCount )
+    {
+    aTableCount = sizeof( ImplementationTable ) / sizeof(TImplementationProxy);
+    return ImplementationTable;
+    }
+
+#ifdef COVERAGE_MEASUREMENT
+#pragma CTC ENDSKIP
+#endif //COVERAGE_MEASUREMENT
+
--- a/contentstorage/casrv/casrvmgr/bwins/casrvmanageru.def	Tue Jun 29 10:20:30 2010 +0300
+++ b/contentstorage/casrv/casrvmgr/bwins/casrvmanageru.def	Fri Jul 09 14:19:08 2010 +0300
@@ -1,4 +1,4 @@
 EXPORTS
-	?NewL@CCaSrvManager@@SAPAV1@AAVCCaStorageProxy@@PAVCCaSrvEngUtils@@@Z @ 1 NONAME ; class CCaSrvManager * CCaSrvManager::NewL(class CCaStorageProxy &, class CCaSrvEngUtils *)
-	?LoadOperationErrorCodeL@CCaSrvManager@@QAEHXZ @ 2 NONAME ; int CCaSrvManager::LoadOperationErrorCodeL(void)
+	?LoadOperationErrorCodeL@CCaSrvManager@@QAEHXZ @ 1 NONAME ; int CCaSrvManager::LoadOperationErrorCodeL(void)
+	?NewL@CCaSrvManager@@SAPAV1@AAVCCaStorageProxy@@PAVRSoftwareComponentRegistry@Usif@@PAVCCaSrvEngUtils@@@Z @ 2 NONAME ; class CCaSrvManager * CCaSrvManager::NewL(class CCaStorageProxy &, class Usif::RSoftwareComponentRegistry *, class CCaSrvEngUtils *)
 
--- a/contentstorage/casrv/casrvmgr/eabi/casrvmanageru.def	Tue Jun 29 10:20:30 2010 +0300
+++ b/contentstorage/casrv/casrvmgr/eabi/casrvmanageru.def	Fri Jul 09 14:19:08 2010 +0300
@@ -1,4 +1,4 @@
 EXPORTS
-	_ZN13CCaSrvManager4NewLER15CCaStorageProxyP14CCaSrvEngUtils @ 1 NONAME
-	_ZN13CCaSrvManager23LoadOperationErrorCodeLEv @ 2 NONAME
+	_ZN13CCaSrvManager23LoadOperationErrorCodeLEv @ 1 NONAME
+	_ZN13CCaSrvManager4NewLER15CCaStorageProxyPN4Usif26RSoftwareComponentRegistryEP14CCaSrvEngUtils @ 2 NONAME
 
--- a/contentstorage/casrv/casrvmgr/inc/casrvmanager.h	Tue Jun 29 10:20:30 2010 +0300
+++ b/contentstorage/casrv/casrvmgr/inc/casrvmanager.h	Fri Jul 09 14:19:08 2010 +0300
@@ -24,7 +24,11 @@
 #include <e32hashtab.h>
 #include "casrvplugin.h"
 
+
 class CCaSrvEngUtils;
+namespace Usif{
+    class RSoftwareComponentRegistry;
+}
 
 /**
  *
@@ -48,6 +52,7 @@
      * @param aUtils storage utils.
      */
     IMPORT_C static CCaSrvManager* NewL( CCaStorageProxy& aCaStorageProxy,
+            Usif::RSoftwareComponentRegistry* aSoftwareRegistry,
             CCaSrvEngUtils* aUtils = NULL );
 
     /**
@@ -57,6 +62,7 @@
      * @param aUtils storage utils.
      */
     static CCaSrvManager* NewLC( CCaStorageProxy& aCaStorageProxy,
+            Usif::RSoftwareComponentRegistry* aSoftwareRegistry,
             CCaSrvEngUtils* aUtils = NULL );
 
     /**
@@ -79,6 +85,7 @@
      * @param aUtils storage utils.
      */
     void ConstructL( CCaStorageProxy& aCaStorageProxy,
+            Usif::RSoftwareComponentRegistry* aSoftwareRegistry,
             CCaSrvEngUtils* aUtils = NULL );
 
     /**
--- a/contentstorage/casrv/casrvmgr/inc/casrvplugin.h	Tue Jun 29 10:20:30 2010 +0300
+++ b/contentstorage/casrv/casrvmgr/inc/casrvplugin.h	Fri Jul 09 14:19:08 2010 +0300
@@ -24,11 +24,15 @@
 
 class CCaStorageProxy;
 class CCaSrvEngUtils;
+namespace Usif{
+    class RSoftwareComponentRegistry;
+}
 
 struct TPluginParams
     {
     CCaStorageProxy* storageProxy;
     CCaSrvEngUtils* engUtils;
+    Usif::RSoftwareComponentRegistry* softwareRegistry;
     };
 
 /**
--- a/contentstorage/casrv/casrvmgr/src/casrvmanager.cpp	Tue Jun 29 10:20:30 2010 +0300
+++ b/contentstorage/casrv/casrvmgr/src/casrvmanager.cpp	Fri Jul 09 14:19:08 2010 +0300
@@ -50,11 +50,12 @@
 // ---------------------------------------------------------------------------
 //
 CCaSrvManager* CCaSrvManager::NewLC( CCaStorageProxy& aCaStorageProxy,
+        Usif::RSoftwareComponentRegistry* aSoftwareRegistry,
         CCaSrvEngUtils* aUtils )
     {
     CCaSrvManager* self = new ( ELeave ) CCaSrvManager();
     CleanupStack::PushL( self );
-    self->ConstructL( aCaStorageProxy, aUtils );
+    self->ConstructL( aCaStorageProxy, aSoftwareRegistry, aUtils);
     return self;
     }
 
@@ -62,10 +63,12 @@
 //
 // ---------------------------------------------------------------------------
 //
-EXPORT_C CCaSrvManager* CCaSrvManager::NewL(
-        CCaStorageProxy& aCaStorageProxy, CCaSrvEngUtils* aUtils )
+EXPORT_C CCaSrvManager* CCaSrvManager::NewL( CCaStorageProxy& aCaStorageProxy,
+        Usif::RSoftwareComponentRegistry* aSoftwareRegistry,
+        CCaSrvEngUtils* aUtils )
     {
-    CCaSrvManager* self = CCaSrvManager::NewLC( aCaStorageProxy, aUtils );
+    CCaSrvManager* self = CCaSrvManager::NewLC( aCaStorageProxy,
+	        aSoftwareRegistry, aUtils );
     CleanupStack::Pop(); // self;
     return self;
     }
@@ -75,12 +78,13 @@
 // ---------------------------------------------------------------------------
 //
 void CCaSrvManager::ConstructL( CCaStorageProxy& aCaStorageProxy,
+        Usif::RSoftwareComponentRegistry* aSoftwareRegistry,
         CCaSrvEngUtils* aUtils )
     {
     iPluginParams = new TPluginParams();
     iPluginParams->storageProxy = &aCaStorageProxy;
     iPluginParams->engUtils = aUtils;
-
+    iPluginParams->softwareRegistry = aSoftwareRegistry;
     LoadPluginsL();
     }
 
--- a/contentstorage/casrv/causifscanner/inc/causifscanner.h	Tue Jun 29 10:20:30 2010 +0300
+++ b/contentstorage/casrv/causifscanner/inc/causifscanner.h	Fri Jul 09 14:19:08 2010 +0300
@@ -52,7 +52,7 @@
 
     /**
      * Two-phased constructor.
-     * @param aPLuginParam plugin param consist of storage, storage utils.
+     * @param aPLuginParam plugin param consist of storage, storage utils and scr.
      * @retval New object.
      */
     static CCaUsifScanner* NewL( TPluginParams* aPluginParams );
@@ -85,8 +85,10 @@
     /**
      * Constructor
      * @param aStorageProxy Storage handler.
+     * @param aSoftwareRegistry software component registry.
      */
-    CCaUsifScanner( CCaStorageProxy& aStorageProxy );
+    CCaUsifScanner( CCaStorageProxy& aStorageProxy,
+	        RSoftwareComponentRegistry& aSoftwareRegistry );
 
     /**
      * Second phased constructor.
@@ -184,9 +186,9 @@
     CCaMmcWatcher* iMmcWatcher;
 
     /**
-     * Software component registry. Own.
+     * Software component registry. Not own.
      */
-    RSoftwareComponentRegistry iSoftwareRegistry;
+    RSoftwareComponentRegistry& iSoftwareRegistry;
 
     };
 
--- a/contentstorage/casrv/causifscanner/src/causifscanner.cpp	Tue Jun 29 10:20:30 2010 +0300
+++ b/contentstorage/casrv/causifscanner/src/causifscanner.cpp	Fri Jul 09 14:19:08 2010 +0300
@@ -35,7 +35,7 @@
 CCaUsifScanner* CCaUsifScanner::NewL( TPluginParams* aPluginParams )
     {
     CCaUsifScanner* self = new ( ELeave ) CCaUsifScanner(
-            *aPluginParams->storageProxy );
+            *aPluginParams->storageProxy, *aPluginParams->softwareRegistry );
     CleanupStack::PushL( self );
     self->ConstructL();
     CleanupStack::Pop( self );
@@ -46,8 +46,9 @@
 //
 // ---------------------------------------------------------------------------
 //
-CCaUsifScanner::CCaUsifScanner( CCaStorageProxy& aStorageProxy ) :
-    iStorageProxy( aStorageProxy )
+CCaUsifScanner::CCaUsifScanner( CCaStorageProxy& aStorageProxy,
+    RSoftwareComponentRegistry& aSoftwareRegistry ) :
+        iStorageProxy( aStorageProxy ), iSoftwareRegistry(aSoftwareRegistry)
     {
     }
 
@@ -69,8 +70,6 @@
     User::LeaveIfError( iFs.Connect() );
     iMmcWatcher = CCaMmcWatcher::NewL( iFs, this );
 
-    User::LeaveIfError( iSoftwareRegistry.Connect() );
-
     UpdateUsifListL();
     }
 
@@ -80,7 +79,6 @@
 //
 CCaUsifScanner::~CCaUsifScanner()
     {
-    iSoftwareRegistry.Close();
     delete iMmcWatcher;
     iFs.Close();
     delete iJavaInstallNotifier;
--- a/contentstorage/casrv/cawidgetscanner/inc/cawidgetstoragehandler.h	Tue Jun 29 10:20:30 2010 +0300
+++ b/contentstorage/casrv/cawidgetscanner/inc/cawidgetstoragehandler.h	Fri Jul 09 14:19:08 2010 +0300
@@ -49,8 +49,10 @@
      * Two-phased constructor.
      */
     static CCaWidgetStorageHandler* NewL( CCaStorageProxy* aStorage,
+            Usif::RSoftwareComponentRegistry& aSoftwareRegistry,
             RFs& aFs );
     static CCaWidgetStorageHandler* NewLC( CCaStorageProxy* aStorage,
+            Usif::RSoftwareComponentRegistry& aSoftwareRegistry,
             RFs& aFs );
 
     /**
@@ -124,7 +126,8 @@
     /**
      * C++ default constructor.
      */
-    CCaWidgetStorageHandler( CCaStorageProxy* aStorage, RFs& aFs );
+    CCaWidgetStorageHandler( CCaStorageProxy* aStorage,
+            Usif::RSoftwareComponentRegistry& aSoftwareRegistry, RFs& aFs );
 
     /**
      * By default Symbian 2nd phase constructor is private.
@@ -169,7 +172,10 @@
      */
     CCaWidgetScannerParser* iParser;
 
-    Usif::RSoftwareComponentRegistry iSoftwareRegistry;
+    /*
+     * Software Component Registry. Not own
+     */
+    Usif::RSoftwareComponentRegistry& iSoftwareRegistry;
     };
 
 #endif      // C_WIDGETSTORAGEHANDLER_H
--- a/contentstorage/casrv/cawidgetscanner/src/cawidgetscannerplugin.cpp	Tue Jun 29 10:20:30 2010 +0300
+++ b/contentstorage/casrv/cawidgetscanner/src/cawidgetscannerplugin.cpp	Fri Jul 09 14:19:08 2010 +0300
@@ -68,7 +68,8 @@
     iInstallNotifier = CCaWidgetScannerInstallNotifier::NewL( this,
             KUidSystemCategory, KSAUidSoftwareInstallKeyValue );
     iStorageHandler = CCaWidgetStorageHandler::NewL(
-            aPluginParams->storageProxy, iFs );
+            aPluginParams->storageProxy,
+			*aPluginParams->softwareRegistry, iFs );
     SynchronizeL();
     }
 
--- a/contentstorage/casrv/cawidgetscanner/src/cawidgetstoragehandler.cpp	Tue Jun 29 10:20:30 2010 +0300
+++ b/contentstorage/casrv/cawidgetscanner/src/cawidgetstoragehandler.cpp	Fri Jul 09 14:19:08 2010 +0300
@@ -40,7 +40,8 @@
 // -----------------------------------------------------------------------------
 //
 CCaWidgetStorageHandler::CCaWidgetStorageHandler( CCaStorageProxy* aStorage,
-        RFs& aFs )
+        Usif::RSoftwareComponentRegistry& aSoftwareRegistry, RFs& aFs ) :
+            iSoftwareRegistry(aSoftwareRegistry)
     {
     iStorage = aStorage;
     iFs = aFs;
@@ -52,7 +53,6 @@
 //
 void CCaWidgetStorageHandler::ConstructL()
     {
-    User::LeaveIfError( iSoftwareRegistry.Connect() );
     iParser = CCaWidgetScannerParser::NewL( iFs );
     }
 
@@ -61,9 +61,10 @@
 // -----------------------------------------------------------------------------
 //
 CCaWidgetStorageHandler* CCaWidgetStorageHandler::NewL(
-        CCaStorageProxy* aStorage, RFs& aFs )
+        CCaStorageProxy* aStorage,
+        Usif::RSoftwareComponentRegistry& aSoftwareRegistry, RFs& aFs )
     {
-    CCaWidgetStorageHandler* self = NewLC( aStorage, aFs );
+    CCaWidgetStorageHandler* self = NewLC( aStorage, aSoftwareRegistry, aFs );
     CleanupStack::Pop( self );
     return self;
     }
@@ -73,10 +74,11 @@
 // -----------------------------------------------------------------------------
 //
 CCaWidgetStorageHandler* CCaWidgetStorageHandler::NewLC(
-        CCaStorageProxy* aStorage, RFs& aFs )
+        CCaStorageProxy* aStorage,
+        Usif::RSoftwareComponentRegistry& aSoftwareRegistry, RFs& aFs )
     {
     CCaWidgetStorageHandler* self = new ( ELeave ) CCaWidgetStorageHandler(
-            aStorage, aFs );
+            aStorage, aSoftwareRegistry, aFs );
     CleanupStack::PushL( self );
     self->ConstructL();
     return self;
@@ -89,7 +91,6 @@
 CCaWidgetStorageHandler::~CCaWidgetStorageHandler()
     {
     delete iParser;
-    iSoftwareRegistry.Close();
     iWidgets.ResetAndDestroy();
     }
 
Binary file contentstorage/castorage/data/stub/castorage.db has changed
--- a/contentstorage/group/camenu.mmp	Tue Jun 29 10:20:30 2010 +0300
+++ b/contentstorage/group/camenu.mmp	Fri Jul 09 14:19:08 2010 +0300
@@ -12,7 +12,7 @@
 * Contributors:
 *
 * Description:
-*  Version     : %version: 19.1.9 % << Don't touch! Updated by Synergy at check-out.
+*  Version     : %version: 19.1.10 % << Don't touch! Updated by Synergy at check-out.
 *
 */
 
@@ -37,9 +37,8 @@
 SOURCE          cainstallstrategy.cpp
 SOURCE          cammcwatcher.cpp
 SOURCE          casrvengutils.cpp
-SOURCE			casrvnotifier.cpp
+SOURCE	        casrvnotifier.cpp
 SOURCE          castorageproxy.cpp
-SOURCE          caprogressnotifier.cpp
 
 
 USERINCLUDE     ../srvinc
@@ -65,8 +64,6 @@
 LIBRARY         bafl.lib
 LIBRARY         casrvmanager.lib
 
-LIBRARY         sifnotification.lib
-LIBRARY         sif.lib
 LIBRARY         scrclient.lib
 
 // HB LIBRARIES
--- a/contentstorage/group/group.pro	Tue Jun 29 10:20:30 2010 +0300
+++ b/contentstorage/group/group.pro	Fri Jul 09 14:19:08 2010 +0300
@@ -40,6 +40,7 @@
     "../casrv/cawidgetscanner/group/cawidgetscanner.mmp" \
     "../casrv/carunningappmonitor/group/carunningappmonitor.mmp" \
     "../casrv/causifscanner/group/causifscanner.mmp" \
+    "../casrv/caprogresscanner/group/caprogresscanner.mmp" \
     
 tests_krakow {
         BLD_INF_RULES.prj_mmpfiles += \
--- a/contentstorage/srvinc/caprogressnotifier.h	Tue Jun 29 10:20:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,113 +0,0 @@
-/*
- * Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
- * All rights reserved.
- * This component and the accompanying materials are made available
- * under the terms of "Eclipse Public License v1.0"
- * which accompanies this distribution, and is available
- * at the URL "http://www.eclipse.org/legal/epl-v10.html".
- *
- * Initial Contributors:
- * Nokia Corporation - initial contribution.
- *
- * Contributors:
- *
- * Description:  ?Description
- *
- */
-
-#ifndef CAPROGRESSNOTIFIER_H
-#define CAPROGRESSNOTIFIER_H
-
-#include <e32base.h>
-#include <usif/sif/sifnotification.h>
-#include <usif/usifcommon.h> 
-
-#include "castorage_global.h"
-using namespace Usif; 
-
-class CCaStorageProxy;
-class CCaInnerEntry;
-
-/**
- *  Uninstall Progress notifier.
- *
- *  @since S60 v5.0
- */
-NONSHARABLE_CLASS( CCaProgressNotifier ) : public CBase, 
-        public MSifOperationsHandler
-    {
-
-public:
-    /**
-     * Creates an instance of CCaProgressNotifier.
-     * @param aCaStorageProxy Reference to storage.
-     */
-IMPORT_C static CCaProgressNotifier* NewL( CCaStorageProxy& aCaStorageProxy);
-
-    /**
-     * Destructor.
-     */
-    virtual ~CCaProgressNotifier();
-
-private:
-
-    /**
-     * Constructor.
-     */
-    CCaProgressNotifier( CCaStorageProxy& aCaStorageProxy );
-
-    /**
-     * Symbian 2nd phase constructor.
-     * @param aCaStorageProxy Reference to storage.
-     */
-    void ConstructL( );
-    
-    void UpdateProgressL( const CSifOperationProgressData& aProgressData );
-    void EndOperationL(TInt aError);
-    TComponentId ComponentIdL(const TDesC& aGlobalComponentId, const TDesC& aSwType);
-    void MarkEntrysForUnistallL(TUint aKey, TComponentId aComponentId);
-
-public:
-    /**
-     * From MSifOperationsHandler
-     */
-    void StartOperationHandler(TUint aKey, const CSifOperationStartData& aStartData);
-
-    /**
-     * From MSifOperationsHandler
-     */
-    void EndOperationHandler(const CSifOperationEndData& aEndData);
-
-    /**
-     * From MSifOperationsHandler
-     */
-    void ProgressOperationHandler(const CSifOperationProgressData& aProgressData);
-    
-private:
-
-    /**
-     * USIF notifier
-     * Own.
-     * 
-     * Commented out since USIF notifications do not
-     * work on MCL wk20
-     */
-    CSifOperationsNotifier* iNotifier;
-    
-    /**
-     * Not Own.
-     * Reference to the Storage Proxy.
-     */
-    CCaStorageProxy& iStorageProxy;
-    
-    RPointerArray<CCaInnerEntry> iResultArrayItems;
-    
-    TUint iKey;
-    
-    };
-
-
-#endif /* CAPROGRESSNOTIFIER_H */
-
-// End of File
-
--- a/contentstorage/srvinc/casrv.h	Tue Jun 29 10:20:30 2010 +0300
+++ b/contentstorage/srvinc/casrv.h	Fri Jul 09 14:19:08 2010 +0300
@@ -20,12 +20,12 @@
 
 //  INCLUDES
 #include <e32base.h>
+#include <usif/scr/scr.h>
 
 // FORWARD DECLARATION
 class CCaSrvEngUtils;
 class CCaSrvManager;
 class CCaStorageProxy;
-class CCaProgressNotifier;
 
 // GLOBAL FUNCTIONS
 /**
@@ -114,17 +114,17 @@
      * Utils. Own.
      */
     CCaSrvEngUtils* iSrvEngUtils;
+    
+    /*
+     * Software Component Registry. Own.
+     */
+    Usif::RSoftwareComponentRegistry iSoftwareRegistry;
 
     /*
      * Srv plugin manager. Own.
      */
     CCaSrvManager* iSrvManager;
 
-    /*
-     * Uninstall progress notifier
-     */
-    CCaProgressNotifier* iProgressNotifier;
-
     };
 
 #endif // CASRV_H
--- a/contentstorage/srvsrc/caprogressnotifier.cpp	Tue Jun 29 10:20:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,208 +0,0 @@
-/*
- * Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
- * All rights reserved.
- * This component and the accompanying materials are made available
- * under the terms of "Eclipse Public License v1.0"
- * which accompanies this distribution, and is available
- * at the URL "http://www.eclipse.org/legal/epl-v10.html".
- *
- * Initial Contributors:
- * Nokia Corporation - initial contribution.
- *
- * Contributors:
- *
- * Description:  ?Description
- *
- */
-
-#include <s32mem.h>
-
-#include <usif/scr/scr.h>
-#include <usif/scr/screntries.h>
-
-#include "caprogressnotifier.h"
-#include "castorageproxy.h"
-#include "cainnerquery.h"
-#include "cainnerentry.h"
-#include "caarraycleanup.inl"
-
-using namespace Usif;
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-EXPORT_C CCaProgressNotifier* CCaProgressNotifier::NewL(
-        CCaStorageProxy& aCaStorageProxy )
-    {
-    CCaProgressNotifier* self = new ( ELeave ) CCaProgressNotifier(
-            aCaStorageProxy );
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    CleanupStack::Pop( self );
-    return self;
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-CCaProgressNotifier::~CCaProgressNotifier()
-    {
-    delete iNotifier;
-    iResultArrayItems.ResetAndDestroy();
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-CCaProgressNotifier::CCaProgressNotifier( CCaStorageProxy& aCaStorageProxy ) :
-    iStorageProxy( aCaStorageProxy )
-    {
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CCaProgressNotifier::ConstructL()
-    {
-    iNotifier = CSifOperationsNotifier::NewL( *this );
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CCaProgressNotifier::StartOperationHandler( TUint aKey,
-        const CSifOperationStartData& aStartData )
-    {
-    TInt err( KErrNone );
-    TComponentId componentId;
-    iResultArrayItems.ResetAndDestroy();
-
-    TRAP(err, componentId = ComponentIdL( aStartData.GlobalComponentId(),
-                    aStartData.SoftwareType() ));
-    if ( !err )
-        TRAP(err, MarkEntrysForUnistallL(aKey, componentId));
-
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CCaProgressNotifier::EndOperationHandler(
-        const CSifOperationEndData& aEndData )
-    {
-    TInt err = KErrNone;
-    TRAP(err, EndOperationL(aEndData.ErrorCode()));
-    iResultArrayItems.ResetAndDestroy();
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CCaProgressNotifier::ProgressOperationHandler(
-        const CSifOperationProgressData& aProgressData )
-    {
-    TInt err = KErrNone;
-    TRAP(err, UpdateProgressL(aProgressData));
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CCaProgressNotifier::UpdateProgressL(
-        const CSifOperationProgressData& aProgressData )
-    {
-    RBuf totalProgressBuf;
-    totalProgressBuf.CleanupClosePushL();
-    totalProgressBuf.CreateL( sizeof(TComponentId) + 1 );
-    totalProgressBuf.AppendNum( aProgressData.CurrentProgess() );
-
-    if ( iResultArrayItems.Count() && aProgressData.Phase() == EUninstalling )
-        {
-        for ( int i = 0; i < iResultArrayItems.Count(); i++ )
-            {
-            iResultArrayItems[i]->AddAttributeL( KCaAppUninstallProgress,
-                    totalProgressBuf );
-            iStorageProxy.AddL( iResultArrayItems[i], ETrue,
-                    EItemUninstallProgressChanged );
-            }
-        }
-
-    CleanupStack::PopAndDestroy( &totalProgressBuf );
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CCaProgressNotifier::EndOperationL( TInt aError )
-    {
-    if ( aError )
-        {
-        for ( int i = 0; i < iResultArrayItems.Count(); i++ )
-            {
-            iResultArrayItems[i]->SetFlags( iResultArrayItems[i]->GetFlags()
-                    & ~EUninstall );
-            iStorageProxy.AddL( iResultArrayItems[i] );
-            }
-        }
-    iNotifier->CancelSubscribeL( iKey );
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-TComponentId CCaProgressNotifier::ComponentIdL(
-        const TDesC& aGlobalComponentId, const TDesC& aSwType )
-    {
-    RSoftwareComponentRegistry registry;
-    User::LeaveIfError( registry.Connect() );
-    CleanupClosePushL( registry );
-    TComponentId componentId = registry.GetComponentIdL( aGlobalComponentId,
-            aSwType );
-    CleanupStack::PopAndDestroy( &registry ); // registry    
-    return componentId;
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CCaProgressNotifier::MarkEntrysForUnistallL( TUint aKey,
-        TComponentId aComponentId )
-    {
-    RBuf componentIdBuf;
-    componentIdBuf.CleanupClosePushL();
-    componentIdBuf.CreateL( sizeof(TComponentId) + 1 );
-    componentIdBuf.AppendNum( aComponentId );
-
-    // find entry by componentID
-    CCaInnerQuery *innerQuery = CCaInnerQuery::NewLC();
-    innerQuery->SetRole( CCaInnerQuery::Item );
-    innerQuery->AddAttributeL( KCaAttrComponentId, componentIdBuf );
-
-    iStorageProxy.GetEntriesL( innerQuery, iResultArrayItems );
-
-    if ( iResultArrayItems.Count() )
-        {
-        for ( int i = 0; i < iResultArrayItems.Count(); i++ )
-            {
-            iResultArrayItems[i]->SetFlags( iResultArrayItems[i]->GetFlags()
-                    | EUninstall );
-            iStorageProxy.AddL( iResultArrayItems[i] );
-            }
-        // subscribe for progress notifier
-        iKey = aKey;
-        iNotifier->SubscribeL( aKey, ETrue );
-        }
-    CleanupStack::PopAndDestroy( innerQuery );
-    CleanupStack::PopAndDestroy( &componentIdBuf );
-    }
--- a/contentstorage/srvsrc/casrv.cpp	Tue Jun 29 10:20:30 2010 +0300
+++ b/contentstorage/srvsrc/casrv.cpp	Fri Jul 09 14:19:08 2010 +0300
@@ -24,7 +24,6 @@
 #include "casrvengutils.h"
 #include "castorageproxy.h"
 #include "casrvmanager.h"
-#include "caprogressnotifier.h"
 
 // ==================== LOCAL FUNCTIONS ====================
 
@@ -124,8 +123,8 @@
         delete session;
         }
     delete iSrvManager;
+    iSoftwareRegistry.Close();
     delete iSrvEngUtils;
-    delete iProgressNotifier;
     delete iStorageProxy;
     }
 
@@ -156,8 +155,9 @@
     iSessionCount = 0;
     iStorageProxy = CCaStorageProxy::NewL();
     iSrvEngUtils = CCaSrvEngUtils::NewL();
-    iProgressNotifier = CCaProgressNotifier::NewL( *iStorageProxy );
-    iSrvManager = CCaSrvManager::NewL( *iStorageProxy, iSrvEngUtils );
+    User::LeaveIfError( iSoftwareRegistry.Connect() );
+    iSrvManager = CCaSrvManager::NewL( *iStorageProxy,
+        &iSoftwareRegistry, iSrvEngUtils);
     TInt errCode = iSrvManager->LoadOperationErrorCodeL();
     if( KSqlErrNotDb <= errCode && errCode <= KSqlErrGeneral )
         {
@@ -166,7 +166,8 @@
         delete iSrvManager;
         iSrvManager = NULL;
         iStorageProxy->LoadDataBaseFromRomL();
-        iSrvManager = CCaSrvManager::NewL( *iStorageProxy, iSrvEngUtils );
+        iSrvManager = CCaSrvManager::NewL( *iStorageProxy,
+            &iSoftwareRegistry, iSrvEngUtils );
         }
     }
 
--- a/contentstorage/srvsrc/castorageproxy.cpp	Tue Jun 29 10:20:30 2010 +0300
+++ b/contentstorage/srvsrc/castorageproxy.cpp	Fri Jul 09 14:19:08 2010 +0300
@@ -363,6 +363,7 @@
     RArray<TInt> parentArray;
     CleanupClosePushL( parentArray );
     parentArray.AppendL( aGroupId );
+    iStorage->GetParentsIdsL( parentArray, parentArray );
     for( TInt i = 0; i < iHandlerNotifier.Count(); i++ )
         {
         iHandlerNotifier[i]->GroupContentChanged( parentArray );
--- a/homescreensrv.pro	Tue Jun 29 10:20:30 2010 +0300
+++ b/homescreensrv.pro	Fri Jul 09 14:19:08 2010 +0300
@@ -21,7 +21,7 @@
             homescreensrv_plat \
             tsrc
 symbian:SUBDIRS += activityfw
-symbian:SUBDIRS += tstaskmonitor
+symbian:SUBDIRS += taskswitcher
 symbian:SUBDIRS += hsappkeyhandler
 symbian:SUBDIRS += tsdevicedialog
 
--- a/homescreensrv_plat/contentstorage_api/casoftwareregistry.h	Tue Jun 29 10:20:30 2010 +0300
+++ b/homescreensrv_plat/contentstorage_api/casoftwareregistry.h	Fri Jul 09 14:19:08 2010 +0300
@@ -34,34 +34,44 @@
  */
 class CACLIENT_EXPORT CaSoftwareRegistry: public QObject
 {
-    
-Q_OBJECT    
+
+Q_OBJECT
 
     explicit CaSoftwareRegistry(QObject *parent = 0);
 
     ~CaSoftwareRegistry();
-    
+
 public:
-    
+
     static QSharedPointer<CaSoftwareRegistry> create();
-    
+
     typedef QHash<QString, QString> DetailMap;
-    
+
     bool getUninstallDetails(int componentId,
         QString &componentName,
         QStringList &applicationsUids,
         QString &confirmationMessage);
-    
+
     bool getApplicationsUids(int componentId, QStringList &applicationsUids);
-    
+
     DetailMap entryDetails(int componentId) const;
-    
+
+    QList<DetailMap> retrieveLogEntries() const;
+
     static QString componentNameKey();
     static QString componentVersionKey();
     static QString componentVendorKey();
     static QString componentDriveInfoKey();
+    static QString componentProtectionDomainKey();
     static QString componentSizeKey();
     static QString componentTypeKey();
+    static QString componentDescriptionKey();
+    static QString componentTimeKey();
+    static QString componentOperationTypeKey();
+    static QString componentInstallValue();
+    static QString componentUninstallValue();
+    static QString componentUpgradeValue();
+    static QString componentHiddenValue();
 private:
     /**
      * Pointer to a private implementation.
@@ -77,7 +87,7 @@
     friend class QtSharedPointer::ExternalRefCount<CaSoftwareRegistry>;
 
     Q_DISABLE_COPY(CaSoftwareRegistry)
-    
+
 };
 
 #endif // CA_SOFTWARE_REGISTRY_H
--- a/homescreensrv_plat/taskswitcher_api/tspropertydefs.h	Tue Jun 29 10:20:30 2010 +0300
+++ b/homescreensrv_plat/taskswitcher_api/tspropertydefs.h	Fri Jul 09 14:19:08 2010 +0300
@@ -19,7 +19,7 @@
 
 namespace TsProperty {
 
-#if defined(Q_OS_SYMBIAN)
+#if defined(__SYMBIAN32__) || defined(SYMBIAN)
     const TUid KCategory = {0x20022fc5};
     const TUint KVisibilityKey = 0x2002677F;
 #endif    
--- a/hsappkeyhandler/src/hsappkeyplugin.cpp	Tue Jun 29 10:20:30 2010 +0300
+++ b/hsappkeyhandler/src/hsappkeyplugin.cpp	Fri Jul 09 14:19:08 2010 +0300
@@ -20,8 +20,10 @@
 #include <eikenv.h>
 #include <apgtask.h>
 #include <apgcli.h>
+#include <e32property.h>
 #include <hb/hbcore/hbdevicedialogsymbian.h>
 #include <hb/hbcore/hbsymbianvariant.h> 
+#include <tspropertydefs.h>
 #include "hsappkeyplugin.h"
 
 const TUid KHSAppUid  = { 0x20022F35 };
@@ -46,12 +48,6 @@
 CHsAppKeyPlugin* CHsAppKeyPlugin::NewL()
 {
     CHsAppKeyPlugin* self = new (ELeave) CHsAppKeyPlugin;
-    self->iEikEnv->RootWin().CaptureLongKey(EKeyApplication0, 
-                                            EKeyApplication0, 
-                                            0, 
-                                            0, 
-                                            0, 
-                                            ELongCaptureWaitShort);
     return self;
 }
     
@@ -119,7 +115,16 @@
     key.iCode = EKeyApplication0;
     key.iScanCode = EStdKeyApplication0;
     key.iModifiers = 0;
+    key.iRepeats = 0;
     aKeyEventArray.Append(key);
+    
+    TKeyEvent longkey;
+    longkey.iCode = EKeyApplication0;
+    longkey.iScanCode = EStdKeyApplication0;
+    longkey.iModifiers = 0;
+    longkey.iRepeats = 1;
+    aKeyEventArray.Append(longkey);
+
 }
 
 // ---------------------------------------------------------------------------
@@ -160,15 +165,20 @@
 void CHsAppKeyPlugin::HandleLongPressL()
 {
     if( !mDialog ) {
-         mDialog = CHbDeviceDialogSymbian ::NewL();
-        
-        CHbSymbianVariantMap* params = CHbSymbianVariantMap::NewL();
-        
+        TInt value( 0 );
+        RProperty::Get( TsProperty::KCategory, 
+                    TsProperty::KVisibilityKey,
+                    value );
+        if(!value){
+            mDialog = CHbDeviceDialogSymbian::NewL();
+    
+            CHbSymbianVariantMap* params = CHbSymbianVariantMap::NewL();
         if(KErrNone != mDialog->Show(KTsPluginName,*params,this)) {
             delete mDialog;
             mDialog = 0;
+            }
+        delete params;
         }
-        delete params;
     }
 }
 //  End of File
--- a/tsdevicedialog/common.pri	Tue Jun 29 10:20:30 2010 +0300
+++ b/tsdevicedialog/common.pri	Fri Jul 09 14:19:08 2010 +0300
@@ -72,6 +72,5 @@
 win32 {
     # add platfrom API for windows
     INCLUDEPATH += \
-                $$PWD/../../homescreensrv/homescreensrv_plat/contentstorage_api \
-                $$PWD/../../homescreensrv/homescreensrv_plat/hswidgetmodel_api \
+                $$PWD/../../homescreensrv/homescreensrv_plat/contentstorage_api
 }
--- a/tsdevicedialog/tsdevicedialog.pro	Tue Jun 29 10:20:30 2010 +0300
+++ b/tsdevicedialog/tsdevicedialog.pro	Fri Jul 09 14:19:08 2010 +0300
@@ -19,23 +19,24 @@
 coverage {
     SUBDIRS += ../activityfw
     SUBDIRS += ../hsappkeyhandler
-    SUBDIRS += ../tstaskmonitor
+    SUBDIRS += ../taskswitcher
 }
 
 SUBDIRS += tsdevicedialogplugin
 
 tests {
+    SUBDIRS += ../internal/tstestutils
     SUBDIRS += internal/tstestrunner    
     SUBDIRS += tsdevicedialogplugin/tsrc
     SUBDIRS += ../activityfw/activityserviceplugin/tsrc
     SUBDIRS += ../activityfw/storage/client/t_afstorageclient
     SUBDIRS += ../hsappkeyhandler/tsrc/t_hsappkeyhandler
-    SUBDIRS += ../tstaskmonitor/client/tsrc
-    SUBDIRS += ../tstaskmonitor/server/tsrc
-    SUBDIRS += ../tstaskmonitor/screenshotplugin/tsrc
+    SUBDIRS += ../taskswitcher/client/tsrc
+    SUBDIRS += ../taskswitcher/server/tsrc
+    SUBDIRS += ../taskswitcher/screenshotplugin/tsrc
     SUBDIRS += ../activityfw/tsutils/tsrc
-    SUBDIRS += ../tstaskmonitor/utils/tsrc
-    SUBDIRS += ../tstaskmonitor/backstepping/tsrc
+    SUBDIRS += ../taskswitcher/utils/tsrc
+    SUBDIRS += ../taskswitcher/backstepping/tsrc
 }
 
 symbian:include(rom.pri)
--- a/tsdevicedialog/tsdevicedialogplugin/inc/tsdataroles.h	Tue Jun 29 10:20:30 2010 +0300
+++ b/tsdevicedialog/tsdevicedialogplugin/inc/tsdataroles.h	Fri Jul 09 14:19:08 2010 +0300
@@ -20,6 +20,7 @@
 namespace TsDataRoles {
     enum EntryAttributes {
         Closable = Qt::UserRole + 1,
+        Active,
     };
 }
 
--- a/tsdevicedialog/tsdevicedialogplugin/resource/layout.docml	Tue Jun 29 10:20:30 2010 +0300
+++ b/tsdevicedialog/tsdevicedialogplugin/resource/layout.docml	Fri Jul 09 14:19:08 2010 +0300
@@ -3,12 +3,14 @@
     <widget name="tsdevicedialog" type="HbDialog">
         <widget name="heading" role="HbDialog:headingWidget" type="HbLabel">
             <string name="alignment" value="AlignVCenter|AlignHCenter" />
-            <string locid="txt_tsw_title_task_switcher" name="plainText" value="Task switcher" />
+            <string locid="txt_ts_title_task_switcher" name="plainText" value="Task switcher" />
         </widget>
         <widget name="taskgrid" role="HbDialog:contentWidget" type="TsTasksGrid">
             <widget name="item" role="HbAbstractView:prototype" type="TsTasksGridItem"/>
             <bool name="longPressEnabled" value="FALSE"/>
+            <bool name="itemRecycling" value="TRUE"/>
             <enums name="horizontalScrollBarPolicy" value="ScrollBarAlwaysOff"/>
+            <bool name="swapDimensionsOnOrientationChange" value="FALSE"/>
         </widget>            
         <bool name="backgroundFaded" value="TRUE"/>
         <string name="dismissPolicy" value="TapOutside"/>
@@ -31,8 +33,8 @@
         </widget>
         <widget name="taskgrid">
             <string name="scrollDirections" value="Horizontal"/>
-            <integer name="rowCount" value="2"/>
-            <integer name="columnCount" value="1"/>
+            <integer name="rowCount" value="1"/>
+            <integer name="columnCount" value="2"/>
         </widget>
     </section>
 </hbdocument>
--- a/tsdevicedialog/tsdevicedialogplugin/src/tsactivitymodelitem.cpp	Tue Jun 29 10:20:30 2010 +0300
+++ b/tsdevicedialog/tsdevicedialogplugin/src/tsactivitymodelitem.cpp	Fri Jul 09 14:19:08 2010 +0300
@@ -74,6 +74,8 @@
             return decorationRole();
         case TsDataRoles::Closable:
             return QVariant(false);
+        case TsDataRoles::Active:
+            return QVariant(false);
         default:
             return QVariant(QVariant::Invalid);
     }
--- a/tsdevicedialog/tsdevicedialogplugin/src/tsdevicedialogcontainer.cpp	Tue Jun 29 10:20:30 2010 +0300
+++ b/tsdevicedialog/tsdevicedialogplugin/src/tsdevicedialogcontainer.cpp	Fri Jul 09 14:19:08 2010 +0300
@@ -62,7 +62,7 @@
     connect(dialog, SIGNAL(aboutToClose()), this, SIGNAL(deviceDialogClosed()));
     
     connect(this, SIGNAL(deviceDialogClosed()), this, SLOT(notifyDialogClosed()));    
-    mVisibilityPublisher.setValue(TsProperty::KVisibilityPath, true);
+    mVisibilityPublisher.setValue(TsProperty::KVisibilityPath, static_cast<int>(true));
     mVisibilityPublisher.sync();
 }
 
@@ -114,6 +114,6 @@
 
 void TsDeviceDialogContainer::notifyDialogClosed()
 {
-    mVisibilityPublisher.setValue(TsProperty::KVisibilityPath, false);
+    mVisibilityPublisher.setValue(TsProperty::KVisibilityPath, static_cast<int>(false));
     mVisibilityPublisher.sync();
 }
--- a/tsdevicedialog/tsdevicedialogplugin/src/tsdevicedialogplugin.cpp	Tue Jun 29 10:20:30 2010 +0300
+++ b/tsdevicedialog/tsdevicedialogplugin/src/tsdevicedialogplugin.cpp	Fri Jul 09 14:19:08 2010 +0300
@@ -130,7 +130,7 @@
     Q_UNUSED(deviceDialogType)
 
     info->group = GenericDeviceDialogGroup;
-    info->flags = NoDeviceDialogFlags;
+    info->flags = SingleInstance;
     info->priority = DefaultPriority;
 
     return true;
--- a/tsdevicedialog/tsdevicedialogplugin/src/tsentrymodelitem.cpp	Tue Jun 29 10:20:30 2010 +0300
+++ b/tsdevicedialog/tsdevicedialogplugin/src/tsentrymodelitem.cpp	Fri Jul 09 14:19:08 2010 +0300
@@ -56,17 +56,13 @@
             return QVariant(mEntry->name());
         case Qt::DecorationRole:
             {
-                QPixmap icon = mEntry->screenshot().isNull() ? 
-                               mEntry->icon() :
-                               mEntry->screenshot();
-                if (icon.isNull()) {
-                    return HbIcon("qtg_large_application");
-                } else {
-                    return QVariant::fromValue<HbIcon>(HbIcon(icon));
-                }
+            QPixmap icon = mEntry->screenshot();
+            return QVariant::fromValue<HbIcon>(HbIcon(icon));
             }
         case TsDataRoles::Closable:
             return QVariant(mEntry->isClosable());
+        case TsDataRoles::Active:
+            return QVariant(mEntry->isActive());
         default:
             return QVariant(QVariant::Invalid);
     }
--- a/tsdevicedialog/tsdevicedialogplugin/src/tstasksgriditem.cpp	Tue Jun 29 10:20:30 2010 +0300
+++ b/tsdevicedialog/tsdevicedialogplugin/src/tstasksgriditem.cpp	Fri Jul 09 14:19:08 2010 +0300
@@ -54,7 +54,7 @@
     applicationLabelFrame->frameDrawer().setFrameType(HbFrameDrawer::NinePieces);
     applicationLabelFrame->frameDrawer().setFrameGraphicsName("qtg_fr_multimedia_trans");
 
-    mActiveLabel = new HbTextItem(hbTrId("txt_tsw_label_active"), this);
+    mActiveLabel = new HbTextItem(hbTrId("txt_ts_label_active"), this);
     mActiveLabelFrame = new HbFrameItem(this);
     mActiveLabelFrame->frameDrawer().setFrameType(HbFrameDrawer::NinePieces);
     mActiveLabelFrame->frameDrawer().setFrameGraphicsName("qtg_fr_multimedia_trans");
@@ -88,14 +88,21 @@
 {
     mScreenshotLabel->setIcon(modelIndex().data(Qt::DecorationRole).value<HbIcon>());
     mApplicationNameLabel->setText(modelIndex().data(Qt::DisplayRole).toString());
-    QVariant status(modelIndex().data(TsDataRoles::Closable));
-    const bool isClosable(status.isValid() && status.toBool());
+    
+    QVariant closableData(modelIndex().data(TsDataRoles::Closable));
+    const bool isClosable(closableData.isValid() && closableData.toBool());
     if (isClosable) {
         mDeleteButton->show();
+    } else {
+        mDeleteButton->hide();
+    }
+    
+    QVariant activeData(modelIndex().data(TsDataRoles::Active));
+    const bool isActive(activeData.isValid() && activeData.toBool());
+    if (isActive) {
         mActiveLabel->show();
         mActiveLabelFrame->show();
     } else {
-        mDeleteButton->hide();
         mActiveLabel->hide();
         mActiveLabelFrame->hide();
     }
--- a/tstaskmonitor/backstepping/backstepping.pro	Tue Jun 29 10:20:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,20 +0,0 @@
-#
-# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description:
-#
-
-TEMPLATE = subdirs
-symbian {
-    BLD_INF_RULES.prj_exports += "$${LITERAL_HASH}include \"group/bld.inf\""
-    }
--- a/tstaskmonitor/backstepping/bwins/tsbacksteppingu.def	Tue Jun 29 10:20:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,5 +0,0 @@
-EXPORTS
-	?NewL@CTsBackstepping@@SAPAV1@AAVMTsWindowGroupsMonitor@@@Z @ 1 NONAME ; class CTsBackstepping * CTsBackstepping::NewL(class MTsWindowGroupsMonitor &)
-	?NewLC@CTsBackstepping@@SAPAV1@AAVMTsWindowGroupsMonitor@@@Z @ 2 NONAME ; class CTsBackstepping * CTsBackstepping::NewLC(class MTsWindowGroupsMonitor &)
-	??1CTsBackstepping@@UAE@XZ @ 3 NONAME ; CTsBackstepping::~CTsBackstepping(void)
-
--- a/tstaskmonitor/backstepping/eabi/tsbacksteppingu.def	Tue Jun 29 10:20:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,9 +0,0 @@
-EXPORTS
-	_ZN15CTsBackstepping4NewLER22MTsWindowGroupsMonitor @ 1 NONAME
-	_ZN15CTsBackstepping5NewLCER22MTsWindowGroupsMonitor @ 2 NONAME
-	_ZN15CTsBacksteppingD0Ev @ 3 NONAME
-	_ZN15CTsBacksteppingD1Ev @ 4 NONAME
-	_ZN15CTsBacksteppingD2Ev @ 5 NONAME
-	_ZTI15CTsBackstepping @ 6 NONAME
-	_ZTV15CTsBackstepping @ 7 NONAME
-
--- a/tstaskmonitor/backstepping/group/bld.inf	Tue Jun 29 10:20:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,21 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-PRJ_PLATFORMS
-DEFAULT
-
-PRJ_MMPFILES
-tsbackstepping.mmp
--- a/tstaskmonitor/backstepping/group/tsbackstepping.mmp	Tue Jun 29 10:20:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,39 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-TARGET         tsbackstepping.dll
-TARGETTYPE     dll
-UID            0x1000008d  0x200267AD
-SECUREID       0x200267AD
-CAPABILITY     ALL -TCB
-
-EPOCHEAPSIZE   0x100000 0x600000 // 1MB - 6MB
-
-MW_LAYER_SYSTEMINCLUDE
-
-USERINCLUDE    ../inc
-USERINCLUDE     ../../../inc
-
-SOURCEPATH     ../src
-SOURCE         tsbackstepping.cpp
-
-LIBRARY        euser.lib 
-LIBRARY        ws32.lib // for RWsSession
-LIBRARY        apgrfx.lib // for TApaTask / TApaTasksList
-LIBRARY        tsutils.lib
-
-DEBUGLIBRARY    flogger.lib
--- a/tstaskmonitor/backstepping/inc/tsbackstepping.h	Tue Jun 29 10:20:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,43 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-#ifndef __CBACKSTEPPING_H
-#define __CBACKSTEPPING_H
-
-#include <w32std.h>
-#include <tswindowgroupsobserver.h>
-
-
-class CTsBackstepping : public CTsWindowGroupsObserver
-{
-public:
-    IMPORT_C static CTsBackstepping* NewL(MTsWindowGroupsMonitor &);
-    IMPORT_C static CTsBackstepping* NewLC(MTsWindowGroupsMonitor &);
-    IMPORT_C virtual ~CTsBackstepping();
-
-private:
-    CTsBackstepping(MTsWindowGroupsMonitor &);
-    void ConstructL();
-
-    void HandleWindowGroupChanged(MTsResourceManager &, 
-                                  const TArray<RWsSession::TWindowGroupChainInfo> &);
-                                  
-    void HandleWindowGroupChangedL(MTsResourceManager &, 
-                                  const TArray<RWsSession::TWindowGroupChainInfo> &);
-};
-
-#endif // __CBACKSTEPPING_H
--- a/tstaskmonitor/backstepping/inc/tsbacksteppingactivation.h	Tue Jun 29 10:20:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,78 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-#ifndef CTSBACKSTEPPINGWAITINGDLE_H
-#define CTSBACKSTEPPINGWAITINGDLE_H
-
-#include <e32base.h>
-
-class RProperty;
-class MTsWindowGroupsMonitor;
-
-
-NONSHARABLE_CLASS(CTsBacksteppingActivation) : public CActive
-    {
-public:
-    /**
-    * Two-phased constructor.
-    * @param aPriority priority for the timer.
-    * @return new instance of CTeleWaitingIdle.
-    */
-    static CTsBacksteppingActivation* NewL(MTsWindowGroupsMonitor &monitor);
-    /**
-    * destructor
-    */
-    virtual ~CTsBacksteppingActivation();
-
-protected:
-    /**
-     * @see CActive.
-     */
-    void RunL();
-    
-    /**
-     * @see CActive::RunError(TInt)
-     */
-    TInt RunError(TInt);
-    
-    /**
-     * @see CActive.
-     */
-    void DoCancel();  
-
-private:
-    /**
-    * constructor.
-    * @return new instance of CTeleWaitingIdle.
-    */
-    CTsBacksteppingActivation(MTsWindowGroupsMonitor &monitor);
-    
-    void ConstructL();
-    
-    void Subscribe();
-
-private:
-    MTsWindowGroupsMonitor &mMonitor;
-    
-    // Central Repository.
-    RProperty mProperty;
-    
-    // Backstepping engine. Own
-    CBase* mEngine;
-    };
-
-#endif /* CTSBACKSTEPPINGWAITINGDLE_H */
--- a/tstaskmonitor/backstepping/src/tsbackstepping.cpp	Tue Jun 29 10:20:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,140 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-#include <w32std.h>// key event
-#include <apgwgnam.h>// for CApaWindowGroupName
-#include <apgtask.h>
-#include <coedef.h>
-#include <f32file.h>
-#include <flogger.h>
-#include <e32property.h>
-#include <startupdomainpskeys.h>
-
-#include "tsbackstepping.h"
-
-const TUid KHSUid = {0x20022f35};
-
-
-/** 
- *  CTsBackstepping::NewL
- *  two phase constructor
- */
-EXPORT_C CTsBackstepping* CTsBackstepping::NewL(MTsWindowGroupsMonitor &monitor)
-  {
-  RDebug::Print(_L("CTsBackstepping::NewL"));
-  CTsBackstepping* self = CTsBackstepping::NewLC(monitor);
-  CleanupStack::Pop(self);
-  return self;
-  }
-
-/** 
- *  CTsBackstepping::NewLC
- *  two phase constructor
- */
-EXPORT_C CTsBackstepping* CTsBackstepping::NewLC(MTsWindowGroupsMonitor &monitor)
-{ 
-  CTsBackstepping* self = new (ELeave) CTsBackstepping(monitor);
-  CleanupStack::PushL(self);
-  self->ConstructL();
-  return self;
-}
-
-/** 
- * CTsBackstepping::CTsBackstepping
- * constructor
- */
-CTsBackstepping::CTsBackstepping(MTsWindowGroupsMonitor &monitor)
-:
-CTsWindowGroupsObserver(monitor)
-{
-}
-
-
-/** 
- *  CTsBackstepping::~CTsBackstepping
- *  deconstructor
- */
-EXPORT_C CTsBackstepping::~CTsBackstepping()
-{
-}
-
-/** 
- *  CTsBackstepping::ConstructL
- *  two phase constructor
- */
-void CTsBackstepping::ConstructL ()
-{
-    RDebug::Print(_L("CTsBackstepping::ConstructL"));
-    BaseConstructL();
-}
-
-/** 
- * CTsBackstepping::AnalyseWindowStackL
- * Analyzes window stack and move homescreen to proper position
- */
-void CTsBackstepping::HandleWindowGroupChanged(MTsResourceManager &resource, const TArray<RWsSession::TWindowGroupChainInfo> &windowGroups)
-{
-    TRAP_IGNORE(HandleWindowGroupChangedL(resource, windowGroups));
-}
-
-/** 
- * CTsBackstepping::AnalyseWindowStackL
- * Analyzes window stack and move homescreen to proper position
- */
-void CTsBackstepping::HandleWindowGroupChangedL(MTsResourceManager &resource,
-                                                const TArray<RWsSession::TWindowGroupChainInfo> &windowGroups)
-{  
-    RDebug::Print(_L("CTsBackstepping::GetWindowCaption"));
-    
-    CApaWindowGroupName *windowGroupName = CApaWindowGroupName::NewLC(resource.WsSession());
-    
-    TInt count(windowGroups.Count());
-    TInt pos(0);
-    TInt whereToJump(1);
-    for (TInt i=0; i<count; i++) {//iterate through list and give debug info
-        windowGroupName->ConstructFromWgIdL(windowGroups[i].iId);
-        if (windowGroupName->AppUid() != TUid::Null()) {
-            // find the window group id and check that it has no parent
-            if ( windowGroups[i].iParentId <= 0 ) {
-                RDebug::Print( _L("CTsBackstepping::GetWindowCaption wgid:%d is standalone view"), windowGroups[i].iId);
-                //check if it is homescreen 
-                if (windowGroupName->AppUid() == KHSUid) {
-                    RDebug::Print(_L("CTsBackstepping::GetWindowCaption Homescreen position = %d ; list:%d/%d"), pos, i, count);
-                    if (pos <= 1) {// HS is in foreground or second in line - do nothing 
-                        RDebug::Print(_L("CTsBackstepping::nothing to be done - it will stop checking here"));
-                    } else {//we should move homescreen to be second (ommit embeded views) from top
-                        RDebug::Print(_L("CTsBackstepping::moving homescreen to be second from top"));
-                        RDebug::Print(_L("CTsBackstepping::whereToJump = %d"), whereToJump);
-                        resource.WsSession().SetWindowGroupOrdinalPosition(windowGroups[i].iId, whereToJump);
-                    }
-                    // and break
-                    break;
-                }
-                pos++;
-            } else {
-                // only embeded items for first standalone launch should be counted
-                if (!pos) {
-                    ++whereToJump;
-                }
-                RDebug::Print(_L("CTsBackstepping::GetWindowCaption wgid:%d is embedded view"), windowGroups[i].iId);
-            }
-        }
-    }
-    CleanupStack::PopAndDestroy(windowGroupName);
-}
-
-// end of file
--- a/tstaskmonitor/backstepping/src/tsbacksteppingactivation.cpp	Tue Jun 29 10:20:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,137 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-#include <e32property.h>
-#include <startupdomainpskeys.h>
-#include <flogger.h>
-#include <w32std.h>
-
-#include "tsbacksteppingactivation.h"
-#include "tsbackstepping.h"
-
- // ============================ MEMBER FUNCTIONS ===============================
-// -----------------------------------------------------------------------------
-// CBacksteppingActivation::NewL
-// Two-phased constructor.
-// -----------------------------------------------------------------------------
-//
-CTsBacksteppingActivation* CTsBacksteppingActivation::NewL(MTsWindowGroupsMonitor &monitor)
-{
-    RDebug::Print(_L("CBacksteppingActivation::NewL"));
-    CTsBacksteppingActivation* self = new( ELeave ) CTsBacksteppingActivation(monitor);
-    self->ConstructL();
-    return self;
-}
-
-// -----------------------------------------------------------------------------
-// CBacksteppingWaitingIdle::CBacksteppingWaitingIdle
-// C++ default constructor can NOT contain any code, that
-// might leave.
-// -----------------------------------------------------------------------------
-//
-CTsBacksteppingActivation::CTsBacksteppingActivation(MTsWindowGroupsMonitor &monitor) 
-:
-    CActive(EPriorityLow),
-    mMonitor(monitor)
-{
-    CActiveScheduler::Add(this);
-}
-
-// -----------------------------------------------------------------------------
-// CBacksteppingActivation::ConstructL()
-// -----------------------------------------------------------------------------
-//
-void CTsBacksteppingActivation::ConstructL() 
-{
-    User::LeaveIfError(mProperty.Attach(KPSUidStartup, KPSIdlePhase1Ok));
-    iStatus = KRequestPending;
-    SetActive();
-    TRequestStatus* status(&iStatus);
-    User::RequestComplete(status);
-}
-
-// -----------------------------------------------------------------------------
-// CBacksteppingActivation::~CBacksteppingActivation
-// Destructor
-// -----------------------------------------------------------------------------
-//
-CTsBacksteppingActivation::~CTsBacksteppingActivation()
-{
-    Cancel();
-    delete mEngine;
-    mProperty.Close();
-}
-
-// -----------------------------------------------------------------------------
-// CBacksteppingActivation::DoCancel
-// 
-// -----------------------------------------------------------------------------
-//
-void CTsBacksteppingActivation::DoCancel()
-{
-    if ( IsActive() && mProperty.Handle() ) {
-        mProperty.Cancel();
-    }
-}
-
-// -----------------------------------------------------------------------------
-// CBacksteppingActivation::RunL
-// 
-// -----------------------------------------------------------------------------
-//
-void CTsBacksteppingActivation::RunL()
-{
-    User::LeaveIfError(iStatus.Int());
-    
-    TInt state(~EIdlePhase1Ok);
-    User::LeaveIfError(mProperty.Get(state));
-    
-    if (EIdlePhase1Ok == state) {
-        if (0 == mEngine) {
-            mEngine = CTsBackstepping::NewL(mMonitor);
-        }
-    } else {
-        delete mEngine;
-        mEngine = 0;
-    }
-    Subscribe();
-}
-
-// -----------------------------------------------------------------------------
-// CBacksteppingActivation::RunError
-// 
-// -----------------------------------------------------------------------------
-//
-TInt CTsBacksteppingActivation::RunError(TInt error)
-{
-    if (KErrCancel != error) {
-        Subscribe();
-    }
-    return KErrNone;
-}
-
-// -----------------------------------------------------------------------------
-// CBacksteppingActivation::Subscribe
-// 
-// -----------------------------------------------------------------------------
-//
-void CTsBacksteppingActivation::Subscribe()
-{
-    mProperty.Subscribe(iStatus);
-    SetActive();
-}
-// end of file
--- a/tstaskmonitor/client/client.pri	Tue Jun 29 10:20:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,74 +0,0 @@
-#
-# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description:
-#
-
-INCLUDEPATH +=  $$PWD/inc
-
-HEADERS +=  $$PWD/inc/tstaskmonitor_global.h \
-            $$PWD/inc/tstaskmonitor.h \
-            $$PWD/inc/tstask.h \
-            
-SOURCES +=  $$PWD/src/tstaskmonitor.cpp \
-            
-symbian {
-    INCLUDEPATH +=  $$PWD/s60/inc \
-                    $$PWD/../inc \
-                    $$PWD/../utils/inc \   
-                    $$PWD/../../inc \   
-
-    HEADERS +=  $$PWD/s60/inc/tstaskmonitorobserver.h \
-                $$PWD/s60/inc/tstaskmonitorclient.h \
-                $$PWD/s60/inc/tstaskmonitorclientimpl.h \
-                $$PWD/s60/inc/tssession.h \
-                $$PWD/../utils/inc/tsentry.h \
-                $$PWD/../utils/inc/tsentrykey.h \
-                $$PWD/../utils/inc/tsutils.h \
-                $$PWD/s60/inc/tstaskmonitor_p.h \
-                $$PWD/s60/inc/tsapplicationtask.h \
-                $$PWD/s60/inc/tsscreenshotclient.h \
-                $$PWD/s60/inc/tsscreenshotclientimpl.h \
-                $$PWD/s60/inc/tstasksettings_p.h \
-                $$PWD/../../homescreensrv_plat/taskswitcher_api/tstasksettings.h \
-                
-    SOURCES +=  $$PWD/s60/src/tstaskmonitorclient.cpp \
-                $$PWD/s60/src/tstaskmonitorclientimpl.cpp \
-                $$PWD/s60/src/tssession.cpp \
-                $$PWD/../utils/src/tsentry.cpp \
-                $$PWD/../utils/src/tsentrykey.cpp \                              
-                $$PWD/s60/src/tstaskmonitor_p.cpp \
-                $$PWD/s60/src/tstask.cpp \
-                $$PWD/s60/src/tsapplicationtask.cpp \
-                $$PWD/s60/src/tsscreenshotclient.cpp \
-                $$PWD/s60/src/tsscreenshotclientimpl.cpp \
-                $$PWD/src/tstasksettings.cpp \
-                $$PWD/s60/src/tstasksettings_p.cpp \
-
-    LIBS    +=  -lxqutils \
-                -lestor \
-                -lfbscli
-
-} else {
-    INCLUDEPATH +=  $$PWD/stub/inc \
-
-    HEADERS +=  $$PWD/stub/inc/tstaskmonitor_p.h \
-                $$PWD/stub/inc/tsentry.h \
-                $$PWD/stub/inc/tstasksettings_p.h \
-                
-    SOURCES +=  $$PWD/stub/src/tstaskmonitor_p.cpp \
-                $$PWD/stub/src/tstask.cpp \
-                $$PWD/stub/src/tsentry.cpp \
-                $$PWD/stub/src/tstasksettings_p.cpp \
-                
-}
--- a/tstaskmonitor/client/client.pro	Tue Jun 29 10:20:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,45 +0,0 @@
-#
-# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description: 
-#
-
-TEMPLATE = lib
-TARGET = tstaskmonitorclient
-
-CONFIG += dll
-    
-DEFINES += TSTASKMONITOR_LIB
-            
-symbian {
-    dll.sources = tstaskmonitorclient.dll
-    dll.path = $$SHARED_LIB_DIR
-    DEPLOYMENT += dll
-    LIBS += -ltsutils -lws32 -lapgrfx -lcone
-
-    BLD_INF_RULES.prj_exports +=    "s60\inc\tstaskmonitorclient.h" \
-                                    "s60\inc\tstaskmonitorobserver.h" \
-                                    "inc\tstaskmonitor.h" \
-                                    "inc\tstask.h" \
-                                    "inc\tstaskmonitor_global.h" \
-                                    "s60\inc\tsscreenshotclient.h" \
-
-    TARGET.UID3 = 0x200267AF    
-    TARGET.CAPABILITY = ALL -TCB
-    TARGET.EPOCALLOWDLLDATA = 1    
-    
-    # temporary, remove when API is stable enough
-    MMP_RULES += EXPORTUNFROZEN
-}
-
-include(client.pri)
--- a/tstaskmonitor/client/inc/tstask.h	Tue Jun 29 10:20:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,47 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-#ifndef TSTASK_H
-#define TSTASK_H
-
-#include <QPixmap>
-#include <QString>
-
-#include "tstaskmonitor_global.h"
-
-class CTsEntry;
-
-class TsTask
-{
-    
-public:
-    TsTask(CTsEntry* entry);
-    TSTASKMONITOR_EXPORT virtual ~TsTask();
-    
-    TSTASKMONITOR_EXPORT virtual void open() = 0;
-    TSTASKMONITOR_EXPORT virtual void close() = 0;
-    
-    TSTASKMONITOR_EXPORT bool isClosable() const;
-    TSTASKMONITOR_EXPORT QPixmap icon() const;
-    TSTASKMONITOR_EXPORT QPixmap screenshot() const;
-    TSTASKMONITOR_EXPORT QString name() const;
-    
-protected:
-    CTsEntry* mEntry;
-
-};
-
-#endif //TSTASK_H
--- a/tstaskmonitor/client/inc/tstaskmonitor.h	Tue Jun 29 10:20:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,45 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-#ifndef TSTASKMONITOR_H
-#define TSTASKMONITOR_H
-
-#include <QObject>
-#include <QSharedPointer>
-
-#include "tstaskmonitor_global.h"
-#include "tstask.h"
-
-class TsTaskMonitorPrivate;
-
-class TSTASKMONITOR_EXPORT TsTaskMonitor : public QObject
-{
-    Q_OBJECT
-    
-public:
-    TsTaskMonitor(QObject *parent = 0);
-    ~TsTaskMonitor();
-    QList< QSharedPointer<TsTask> > taskList();
-
-signals:
-    void taskListChanged();
-    
-private:
-    TsTaskMonitorPrivate *d_ptr;   
-    friend class TsTaskMonitorPrivate;
-};
-
-#endif //TSTASKMONITOR_H
--- a/tstaskmonitor/client/inc/tstaskmonitor_global.h	Tue Jun 29 10:20:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,32 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-#ifndef TSTASKMONITOR_GLOBAL_H
-#define TSTASKMONITOR_GLOBAL_H
-
-#include <qglobal.h>
-
-#ifdef TSTASKMONITOR_LIB
-    #define TSTASKMONITOR_EXPORT Q_DECL_EXPORT
-#else
-    #ifdef TSTASKMONITOR_TEST
-        #define TSTASKMONITOR_EXPORT
-    #else
-        #define TSTASKMONITOR_EXPORT Q_DECL_IMPORT
-    #endif
-#endif
-
-#endif //TSTASKMONITOR_GLOBAL_H
--- a/tstaskmonitor/client/s60/inc/tsapplicationtask.h	Tue Jun 29 10:20:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,38 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-#ifndef TSAPPLICATIONTASK_H
-#define TSAPPLICATIONTASK_H
-
-#include "tstask.h"
-
-#include <w32std.h>
-
-class TsApplicationTask : public TsTask
-{
-    
-public:
-    TsApplicationTask(RWsSession &wsSession, CTsEntry* entry);
-    
-    virtual void open();
-    virtual void close();
-
-private:
-    RWsSession &mWsSession;
-    
-};
-
-#endif //TSAPPLICATIONTASK_H
--- a/tstaskmonitor/client/s60/inc/tsscreenshotclient.h	Tue Jun 29 10:20:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,48 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-#ifndef TSSCREENSHOTCLIENT_H
-#define TSSCREENSHOTCLIENT_H
-
-#include <e32base.h>
-
-#include "tstaskmonitorglobals.h"
-
-class CFbsBitmap;
-class CTsScreenshotClientImpl;
-
-NONSHARABLE_CLASS( CTsScreenshotClient ) : public CBase
-{
-public:
-    IMPORT_C static CTsScreenshotClient* NewL();
-    IMPORT_C static CTsScreenshotClient* NewLC();
-    IMPORT_C ~CTsScreenshotClient();
-
-public:
-    IMPORT_C TInt RegisterScreenshot(CFbsBitmap *screenshot, TInt wgId, UpdatePriority priority = Normal);
-    IMPORT_C void RegisterScreenshot(TRequestStatus &status, CFbsBitmap *screenshot, TInt wgId, UpdatePriority priority = Normal);
-    IMPORT_C TInt UnregisterScreenshot(TInt wgId);
-    IMPORT_C TInt SetVisibility(TInt wgId, Visibility value);
-
-private:
-    CTsScreenshotClient();
-    void ConstructL();
-
-private:
-    CTsScreenshotClientImpl* iImpl;
-};
-
-#endif  // TSSCREENSHOTCLIENT_H
--- a/tstaskmonitor/client/s60/inc/tsscreenshotclientimpl.h	Tue Jun 29 10:20:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,47 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-#ifndef TSSCREENSHOTCLIENTIMPL_H
-#define TSSCREENSHOTCLIENTIMPL_H
-
-#include <e32base.h>
-
-#include "tstaskmonitorglobals.h"
-#include "tssession.h"
-
-class CFbsBitmap;
-
-NONSHARABLE_CLASS( CTsScreenshotClientImpl ) : public CBase
-{
-public:
-    static CTsScreenshotClientImpl* NewL();
-    static CTsScreenshotClientImpl* NewLC();
-    ~CTsScreenshotClientImpl();
-
-public:
-    TInt RegisterScreenshot(CFbsBitmap *screenshot, TInt wgId, UpdatePriority priority);
-    void RegisterScreenshot(TRequestStatus &status, CFbsBitmap *screenshot, TInt wgId, UpdatePriority priority);
-    TInt UnregisterScreenshot(TInt wgId);
-    TInt SetVisibility(TInt wgId, Visibility value);
-
-private:
-    CTsScreenshotClientImpl();
-    void ConstructL();
-
-    RTsSession iSession;
-};
-
-#endif  // TSSCREENSHOTCLIENTIMPL_H
--- a/tstaskmonitor/client/s60/inc/tssession.h	Tue Jun 29 10:20:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,45 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-#ifndef TSSESSION_H
-#define TSSESSION_H
-
-#include <e32base.h>
-
-#include "tstaskmonitorglobals.h"
-#include "tsentry.h"
-
-NONSHARABLE_CLASS( RTsSession ) : public RSessionBase
-{
-public:
-    TInt Connect();
-
-public: // task monitor API
-    void TaskListL(RTsFswArray& tasks);
-    void Subscribe(TRequestStatus& aStatus);
-    void CancelSubscribe();
-
-public: // screenshots API
-    TInt RegisterScreenshot(CFbsBitmap *screenshot, TInt wgId, UpdatePriority priority);
-    void RegisterScreenshot(TRequestStatus &status, CFbsBitmap *screenshot, TInt wgId, UpdatePriority priority);
-    TInt UnregisterScreenshot(TInt wgId);
-    TInt SetVisibility(TInt wgId, Visibility value);
-    
-private:
-    TInt StartServer();
-};
-
-#endif  // TSSESSION_H
--- a/tstaskmonitor/client/s60/inc/tstaskmonitor_p.h	Tue Jun 29 10:20:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,49 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-#ifndef TSTASKMONITOR_P_H
-#define TSTASKMONITOR_P_H
-
-#include "tstaskmonitorobserver.h"
-
-#include <w32std.h>
-
-#include <QList>
-#include <QSharedPointer>
-
-class TsTask;
-class TsTaskMonitor;
-class CTsTaskMonitorClient;
-
-class TsTaskMonitorPrivate : public MTsTaskMonitorObserver
-{
-public:
-    TsTaskMonitorPrivate(TsTaskMonitor *q);
-    virtual ~TsTaskMonitorPrivate();
-    
-public:
-    QList< QSharedPointer<TsTask> > taskList();
-
-public:
-    virtual void HandleRunningAppChange();
-
-private:
-    TsTaskMonitor *q_ptr;
-    CTsTaskMonitorClient *mClient;
-    RWsSession &mWsSession;
-};
-
-#endif //TSTASKMONITOR_P_H
--- a/tstaskmonitor/client/s60/inc/tstaskmonitorclient.h	Tue Jun 29 10:20:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,47 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-#ifndef TSTASKMONITORCLIENT_H
-#define TSTASKMONITORCLIENT_H
-
-#include <e32base.h>
-
-#include "tsentry.h"
-
-class MTsTaskMonitorObserver;
-class CTsTaskMonitorClientImpl;
-
-NONSHARABLE_CLASS( CTsTaskMonitorClient ) : public CBase
-{
-public:
-    static CTsTaskMonitorClient* NewL();
-    static CTsTaskMonitorClient* NewLC();
-    ~CTsTaskMonitorClient();
-
-public:
-    void TaskListL(RTsFswArray& tasks);
-    void Subscribe(MTsTaskMonitorObserver& aObserver);
-    void CancelSubscribe();
-
-private:
-    CTsTaskMonitorClient();
-    void ConstructL();
-
-private:
-    CTsTaskMonitorClientImpl* iImpl;
-};
-
-#endif  // TSTASKMONITORCLIENT_H
--- a/tstaskmonitor/client/s60/inc/tstaskmonitorclientimpl.h	Tue Jun 29 10:20:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,52 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-#ifndef TSTASKMONITORCLIENTIMPL_H
-#define TSTASKMONITORCLIENTIMPL_H
-
-#include <e32base.h>
-
-#include "tsentry.h"
-#include "tssession.h"
-
-class MTsTaskMonitorObserver;
-
-NONSHARABLE_CLASS( CTsTaskMonitorClientImpl ) : public CActive
-{
-public:
-    static CTsTaskMonitorClientImpl* NewL();
-    static CTsTaskMonitorClientImpl* NewLC();
-    ~CTsTaskMonitorClientImpl();
-
-public:
-    void TaskListL(RTsFswArray& tasks);
-
-    void Subscribe(MTsTaskMonitorObserver& aObserver);
-    void CancelSubscribe();
-
-private:
-    void RunL();
-    void DoCancel();
-
-private:
-    CTsTaskMonitorClientImpl();
-    void ConstructL();
-
-    RTsSession iSession;
-    MTsTaskMonitorObserver* iObserver; // not owned
-};
-
-#endif  // TSTASKMONITORCLIENTIMPL_H
--- a/tstaskmonitor/client/s60/inc/tstaskmonitorobserver.h	Tue Jun 29 10:20:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,36 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Client API
- *
-*/
-
-#ifndef TSTASKMONITOROBSERVER_H
-#define TSTASKMONITOROBSERVER_H
-
-#include <e32base.h>
-
-/**
- * Observer interface for getting notifications about fast swap content changes.
- */
-class MTsTaskMonitorObserver
-    {
-public:
-    /**
-     * Called when there is a change in the fast swap content.
-     * The data can be queried via CTsTaskMonitorClient::TaskListL
-     */
-    virtual void HandleRunningAppChange() = 0;
-    };
-
-#endif //TSTASKMONITOROBSERVER_H
--- a/tstaskmonitor/client/s60/inc/tstasksettings_p.h	Tue Jun 29 10:20:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,43 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-#ifndef TSTASKSETTINGS_P_H
-#define TSTASKSETTINGS_P_H
-
-#include <QPixmap>
-
-class CTsScreenshotClient;
-
-class TsTaskSettingsPrivate
-{
-public:
-    TsTaskSettingsPrivate();
-    ~TsTaskSettingsPrivate();
-
-public:
-    bool registerScreenshot(const QPixmap &screenshot);
-    bool unregisterScreenshot();
-    bool setVisibility(bool visibility);
-
-private:
-    int wgId();
-    
-private:
-    CTsScreenshotClient *mClient;   
-    
-};
-
-#endif //TSTASKSETTINGS_P_H
--- a/tstaskmonitor/client/s60/src/tsapplicationtask.cpp	Tue Jun 29 10:20:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,43 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-#include "tsapplicationtask.h"
-
-#include <apgtask.h>
-#include <eikenv.h>
-#include <AknDef.h>
-
-#include "tsentry.h"
-
-TsApplicationTask::TsApplicationTask(RWsSession &wsSession, CTsEntry* entry) : TsTask(entry), mWsSession(wsSession)
-{
-}
-
-void TsApplicationTask::open()
-{
-    TApaTaskList taskList(mWsSession);
-    TApaTask task = taskList.FindApp(mEntry->AppUid());
-    task.BringToForeground();
-}
-
-void TsApplicationTask::close()
-{
-    TWsEvent event;
-    event.SetTimeNow();
-    event.SetType(KAknShutOrHideApp);
-    mWsSession.SendEventToWindowGroup(mEntry->Key().WindowGroupId(), event);
-}
--- a/tstaskmonitor/client/s60/src/tsscreenshotclient.cpp	Tue Jun 29 10:20:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,70 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-#include <s32mem.h>
-
-#include "tsscreenshotclient.h"
-#include "tsscreenshotclientimpl.h"
-
-EXPORT_C CTsScreenshotClient *CTsScreenshotClient::NewL()
-{
-    CTsScreenshotClient* self = NewLC();
-    CleanupStack::Pop(self);
-    return self;
-}
-
-EXPORT_C CTsScreenshotClient *CTsScreenshotClient::NewLC()
-{
-    CTsScreenshotClient* self = new (ELeave) CTsScreenshotClient;
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    return self;
-}
-
-void CTsScreenshotClient::ConstructL()
-{
-    iImpl = CTsScreenshotClientImpl::NewL();
-}
-
-CTsScreenshotClient::CTsScreenshotClient()
-{
-}
-
-EXPORT_C CTsScreenshotClient::~CTsScreenshotClient()
-{
-    delete iImpl;
-}
-
-EXPORT_C TInt CTsScreenshotClient::RegisterScreenshot(CFbsBitmap *screenshot, TInt wgId, UpdatePriority priority)
-{
-    return iImpl->RegisterScreenshot(screenshot, wgId, priority);
-}
-
-EXPORT_C void CTsScreenshotClient::RegisterScreenshot(TRequestStatus &status, CFbsBitmap *screenshot, TInt wgId, UpdatePriority priority)
-{
-    iImpl->RegisterScreenshot(status, screenshot, wgId, priority);
-}
-
-EXPORT_C TInt CTsScreenshotClient::UnregisterScreenshot(TInt wgId)
-{
-    return iImpl->UnregisterScreenshot(wgId);
-}
-
-EXPORT_C TInt CTsScreenshotClient::SetVisibility(TInt wgId, Visibility value)
-{
-    return iImpl->SetVisibility(wgId, value);
-}
--- a/tstaskmonitor/client/s60/src/tsscreenshotclientimpl.cpp	Tue Jun 29 10:20:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,69 +0,0 @@
-    /*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-#include <e32base.h>
-
-#include "tsscreenshotclientimpl.h"
-
-CTsScreenshotClientImpl* CTsScreenshotClientImpl::NewL()
-{
-    CTsScreenshotClientImpl* self = NewLC();
-    CleanupStack::Pop(self);
-    return self;
-}
-
-CTsScreenshotClientImpl* CTsScreenshotClientImpl::NewLC()
-{
-    CTsScreenshotClientImpl* self = new (ELeave) CTsScreenshotClientImpl;
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    return self;
-}
-
-CTsScreenshotClientImpl::CTsScreenshotClientImpl()
-{
-}
-
-CTsScreenshotClientImpl::~CTsScreenshotClientImpl()
-{
-    iSession.Close();
-}
-
-void CTsScreenshotClientImpl::ConstructL()
-{
-    User::LeaveIfError(iSession.Connect());
-}
-
-TInt CTsScreenshotClientImpl::RegisterScreenshot(CFbsBitmap *screenshot, TInt wgId, UpdatePriority priority)
-{
-    return iSession.RegisterScreenshot(screenshot, wgId, priority);
-}
-
-void CTsScreenshotClientImpl::RegisterScreenshot(TRequestStatus &status, CFbsBitmap *screenshot, TInt wgId, UpdatePriority priority)
-{
-    iSession.RegisterScreenshot(status, screenshot, wgId, priority);
-}
-
-TInt CTsScreenshotClientImpl::UnregisterScreenshot(TInt wgId)
-{
-    return iSession.UnregisterScreenshot(wgId);
-}
-
-TInt CTsScreenshotClientImpl::SetVisibility(TInt wgId, Visibility value)
-{
-    return iSession.SetVisibility(wgId, value);
-}
--- a/tstaskmonitor/client/s60/src/tssession.cpp	Tue Jun 29 10:20:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,148 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-#include <s32mem.h>
-#include <fbs.h>
-
-#include "tssession.h"
-
-TInt RTsSession::Connect()
-{
-    TInt retry = 4;
-    TInt error(KErrNone);
-    do {
-        error = CreateSession(KRunningAppServerName, TVersion(0, 0, 0));
-        if (KErrNotFound != error && KErrServerTerminated != error) {
-            retry = 0;
-        } else {
-            error = StartServer();
-            if (KErrNone != error && KErrAlreadyExists != error) {
-                retry = 0;
-                error = CreateSession(KRunningAppServerName, TVersion(0, 0, 0));
-            }
-        }
-    } while (--retry > 0);
-    return error;
-}
-
-TInt RTsSession::StartServer()
-{
-    RProcess server;
-    if (TInt error = server.Create(KRunningAppServerName, KNullDesC, TUidType(KNullUid, KNullUid, KRunningAppServerUid))) {
-        return error;
-    }
-
-    TRequestStatus status;
-    server.Rendezvous(status);
-    if (status != KRequestPending) {
-        server.Kill(0);
-    } else {
-        server.Resume();
-    }
-
-    User::WaitForRequest(status);
-    TInt error = (EExitPanic == server.ExitType()) ? KErrGeneral : status.Int();
-    if (KErrCancel == error) {
-        error = KErrNone;
-    }
-    server.Close();
-
-    return error;
-}
-
-void RTsSession::TaskListL(RTsFswArray& tasks)
-{
-    for (;;) {
-        TPckgBuf<TInt> dataSize;
-        User::LeaveIfError(SendReceive(GetRunningAppInfo, TIpcArgs(&dataSize)));
-        HBufC8* data = HBufC8::NewLC(dataSize());
-        TPtr8 dataPointer(data->Des());
-        TInt err = SendReceive(FlushData, TIpcArgs(&dataPointer, dataSize()));
-        if (err == KErrNone) {
-            RDesReadStream dataStream(dataPointer);
-            CleanupClosePushL(dataStream);
-            CTsEntry::InternalizeArrayL(dataStream, tasks);
-            CleanupStack::PopAndDestroy(&dataStream);
-        } else if (err != KErrCorrupt) {
-            User::Leave(err);
-        }
-        CleanupStack::PopAndDestroy(data);
-        if (err == KErrNone) {
-            break;
-        }
-        // If result was KErrCorrupt then the size received from GetRunningAppInfo is
-        // not valid anymore so restart the whole procedure.
-    }
-}
-
-void RTsSession::Subscribe(TRequestStatus& aStatus)
-{
-    SendReceive(SubscribeRunningAppChanges, aStatus);
-}
-
-void RTsSession::CancelSubscribe()
-{
-    SendReceive(CancelSubscribeRunningAppChanges);
-}
-
-TInt RTsSession::RegisterScreenshot(CFbsBitmap *screenshot, TInt wgId, UpdatePriority priority)
-{
-    TPckgBuf<TInt> screenshotPackage(screenshot->Handle());
-    TPckgBuf<TInt> wgIdPackage(wgId);
-    TPckgBuf<TInt> priorityPackage(priority);
-
-    TIpcArgs arguments;
-    arguments.Set(ScreenshotHandle, &screenshotPackage);
-    arguments.Set(WindowsGroup, &wgIdPackage);
-    arguments.Set(AdditionalParameters, &KNullDesC8);
-    arguments.Set(Priority, &priorityPackage);
-
-    return SendReceive(RegisterScreenshotMessage, arguments);
-}
-
-void RTsSession::RegisterScreenshot(TRequestStatus &status, CFbsBitmap *screenshot, TInt wgId, UpdatePriority priority)
-{
-    TPckgBuf<TInt> screenshotPackage(screenshot->Handle());
-    TPckgBuf<TInt> wgIdPackage(wgId);
-    TPckgBuf<TInt> priorityPackage(priority);
-
-    TIpcArgs arguments;
-    arguments.Set(ScreenshotHandle, &screenshotPackage);
-    arguments.Set(WindowsGroup, &wgIdPackage);
-    arguments.Set(AdditionalParameters, &KNullDesC8);
-    arguments.Set(Priority, &priorityPackage);
-
-    SendReceive(RegisterScreenshotMessage, arguments, status);
-}
-
-TInt RTsSession::UnregisterScreenshot(TInt wgId)
-{
-    TPckgBuf<TInt> wgIdPackage(wgId);
-    
-    TIpcArgs arguments;
-    arguments.Set(WindowsGroup, &wgIdPackage);
-    arguments.Set(AdditionalParameters, &KNullDesC8);
-    
-    return SendReceive(UnregisterScreenshotMessage, arguments);
-}
-
-TInt RTsSession::SetVisibility(TInt wgId, Visibility value)
-{
-    TPckgBuf<TInt> windowGroup(wgId), visibilityValue(value);
-    
-    TIpcArgs arguments(&windowGroup, &visibilityValue);
-    return SendReceive(VisibilityChange, arguments);
-}
--- a/tstaskmonitor/client/s60/src/tstask.cpp	Tue Jun 29 10:20:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,93 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-#include "tstask.h"
-
-#include <XQConversions>
-
-#include "tsentry.h"
-
-/*!
-    @class TsTask
-    @ingroup publicApi
-    @brief TsTask object represents a single task.
-    
-    This class is one of the Qt interfaces for Task Monitor server. It can be
-    used to set custom screenshot of the task, or to change the task visibility.
-*/
-
-/*!
-    @internal
-    Constructor. 
-    Takes ownership over @a entry.
-*/
-TsTask::TsTask(CTsEntry* entry) : mEntry(entry)
-{
-}
-
-/*!
-    Destructor.
-*/
-TsTask::~TsTask()
-{
-    delete mEntry;
-}
-
-/*!
-    @return True if it's possible to close the task, false otherwise.
-*/
-bool TsTask::isClosable() const
-{
-    return mEntry->CloseableApp();
-}
-
-/*!
-    @return Icon of the task.
-*/
-QPixmap TsTask::icon() const
-{
-    QPixmap pixmap = QPixmap::fromSymbianCFbsBitmap(mEntry->AppIconBitmap());
-    QPixmap mask = QPixmap::fromSymbianCFbsBitmap(mEntry->AppIconMask());
-    // @todo QPixmap::setAlphaChannel() is deprecated, change to code using QPainter
-    pixmap.setAlphaChannel(mask);
-    return pixmap;
-}
-
-/*!
-    @return Screenshot of the task.
-*/
-QPixmap TsTask::screenshot() const
-{
-    return QPixmap::fromSymbianCFbsBitmap(mEntry->Screenshot());
-}
-
-/*!
-    @return Name of the task.
-*/
-QString TsTask::name() const
-{
-    return XQConversions::s60DescToQString(mEntry->AppName());
-}
-
-/*!
-    @fn TsTask::open()
-    Start or bring the task to foreground.
-*/
-
-/*!
-    @fn TsTask::close()
-    Close the task.
-*/
--- a/tstaskmonitor/client/s60/src/tstaskmonitor_p.cpp	Tue Jun 29 10:20:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,73 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-#include "tstaskmonitor_p.h"
-#include "tstaskmonitor.h"
-
-#include <eikenv.h>
-
-#include "tstaskmonitorclient.h"
-#include "tsapplicationtask.h"
-
-#include "tsutils.h"
-using TaskSwitcher::CleanupResetAndDestroyPushL;
-
-TsTaskMonitorPrivate::TsTaskMonitorPrivate(TsTaskMonitor *q) : q_ptr(q), mClient(0), mWsSession(CEikonEnv::Static()->WsSession())
-{
-    QT_TRAP_THROWING(mClient = CTsTaskMonitorClient::NewL());
-    mClient->Subscribe(*this);
-}
-
-TsTaskMonitorPrivate::~TsTaskMonitorPrivate()
-{
-    mClient->CancelSubscribe();
-    delete mClient;
-}
-
-QList< QSharedPointer<TsTask> > TsTaskMonitorPrivate::taskList()
-{
-    QList< QSharedPointer<TsTask> > tasks;
-
-    QT_TRAP_THROWING (    
-        RPointerArray<CTsEntry> entries;   
-        CleanupResetAndDestroyPushL<CTsEntry>(entries);
-        mClient->TaskListL(entries);
-        
-        // TsTask claims ownership of CTsFswEntry, so we have to remove entries from 
-        // entries array after adding task to tasks array to prevent double delete of
-        // CTsFswEntry objects in case of leave (for example due to OOM) in the middle 
-        // of the loop below.
-        while (entries.Count()) {
-            CTsEntry *firstEntry = entries[0];
-            CleanupStack::PushL(firstEntry);
-            entries.Remove(0);
-            
-            // @todo switch by entry type
-            QT_TRYCATCH_LEAVING(tasks.append(QSharedPointer<TsTask>(new TsApplicationTask(mWsSession, firstEntry))));
-            
-            CleanupStack::Pop(firstEntry);
-        }
-        
-        CleanupStack::PopAndDestroy(&entries);    
-    );
-    
-    return tasks;
-}
-
-void TsTaskMonitorPrivate::HandleRunningAppChange()
-{
-    emit q_ptr->taskListChanged();
-}
--- a/tstaskmonitor/client/s60/src/tstaskmonitorclient.cpp	Tue Jun 29 10:20:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,65 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-#include <s32mem.h>
-
-#include "tstaskmonitorclient.h"
-#include "tstaskmonitorclientimpl.h"
-
-CTsTaskMonitorClient *CTsTaskMonitorClient::NewL()
-{
-    CTsTaskMonitorClient* self = NewLC();
-    CleanupStack::Pop(self);
-    return self;
-}
-
-CTsTaskMonitorClient *CTsTaskMonitorClient::NewLC()
-{
-    CTsTaskMonitorClient* self = new (ELeave) CTsTaskMonitorClient;
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    return self;
-}
-
-void CTsTaskMonitorClient::ConstructL()
-{
-    iImpl = CTsTaskMonitorClientImpl::NewL();
-}
-
-CTsTaskMonitorClient::CTsTaskMonitorClient()
-{
-}
-
-CTsTaskMonitorClient::~CTsTaskMonitorClient()
-{
-    delete iImpl;
-}
-
-void CTsTaskMonitorClient::TaskListL(RTsFswArray& tasks)
-{
-    iImpl->TaskListL(tasks);
-}
-
-void CTsTaskMonitorClient::Subscribe(MTsTaskMonitorObserver& aObserver)
-{
-    iImpl->Subscribe(aObserver);
-}
-
-void CTsTaskMonitorClient::CancelSubscribe()
-{
-    iImpl->CancelSubscribe();
-}
--- a/tstaskmonitor/client/s60/src/tstaskmonitorclientimpl.cpp	Tue Jun 29 10:20:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,85 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-#include <e32base.h>
-
-#include "tsentry.h"
-#include "tstaskmonitorclientimpl.h"
-#include "tstaskmonitorobserver.h"
-
-CTsTaskMonitorClientImpl* CTsTaskMonitorClientImpl::NewL()
-{
-    CTsTaskMonitorClientImpl* self = NewLC();
-    CleanupStack::Pop(self);
-    return self;
-}
-
-CTsTaskMonitorClientImpl* CTsTaskMonitorClientImpl::NewLC()
-{
-    CTsTaskMonitorClientImpl* self = new (ELeave) CTsTaskMonitorClientImpl;
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    return self;
-}
-
-CTsTaskMonitorClientImpl::CTsTaskMonitorClientImpl() : CActive(CActive::EPriorityStandard)
-{
-    CActiveScheduler::Add(this);
-}
-
-CTsTaskMonitorClientImpl::~CTsTaskMonitorClientImpl()
-{
-    Cancel();
-    iSession.Close();
-}
-
-void CTsTaskMonitorClientImpl::ConstructL()
-{
-    User::LeaveIfError(iSession.Connect());
-}
-
-void CTsTaskMonitorClientImpl::TaskListL(RTsFswArray& tasks)
-{
-    iSession.TaskListL(tasks);
-}
-
-void CTsTaskMonitorClientImpl::Subscribe(MTsTaskMonitorObserver& aObserver)
-{
-    Cancel();
-    iObserver = &aObserver;
-    iSession.Subscribe(iStatus);
-    SetActive();
-}
-
-void CTsTaskMonitorClientImpl::CancelSubscribe()
-{
-    Cancel();
-}
-
-void CTsTaskMonitorClientImpl::RunL()
-{
-    if (iStatus == KErrNone && iObserver) {
-        iSession.Subscribe(iStatus);
-        SetActive();
-        iObserver->HandleRunningAppChange();
-    }
-}
-
-void CTsTaskMonitorClientImpl::DoCancel()
-{
-    iSession.CancelSubscribe();
-}
--- a/tstaskmonitor/client/s60/src/tstasksettings_p.cpp	Tue Jun 29 10:20:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,60 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-#include "tstasksettings_p.h"
-
-#include <fbs.h>
-#include <coecntrl.h>
-#include <QScopedPointer>
-#include <QApplication>
-#include <QDesktopWidget>
-
-#include "tsscreenshotclient.h"
-#include "tstaskmonitorglobals.h"
-
-TsTaskSettingsPrivate::TsTaskSettingsPrivate() : mClient(0)
-{
-    QT_TRAP_THROWING(mClient = CTsScreenshotClient::NewL());
-}
-
-TsTaskSettingsPrivate::~TsTaskSettingsPrivate()
-{
-    delete mClient;
-}
-
-bool TsTaskSettingsPrivate::registerScreenshot(const QPixmap &screenshot)
-{    
-    QScopedPointer<CFbsBitmap> bitmap(screenshot.toSymbianCFbsBitmap());
-    if (bitmap.isNull()) 
-        return false;
-
-    return KErrNone == mClient->RegisterScreenshot(bitmap.data(), wgId());
-}
-
-bool TsTaskSettingsPrivate::unregisterScreenshot()
-{
-    return KErrNone == mClient->UnregisterScreenshot(wgId());
-}
-
-bool TsTaskSettingsPrivate::setVisibility(bool visibility)
-{
-    return (KErrNone == mClient->SetVisibility(wgId(), visibility ? Visible : Invisible));
-}
-
-int TsTaskSettingsPrivate::wgId()
-{
-    return QApplication::desktop()->winId()->ControlEnv()->RootWin().WindowGroupId();
-}
--- a/tstaskmonitor/client/src/tstaskmonitor.cpp	Tue Jun 29 10:20:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,71 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-#include "tstaskmonitor.h"
-#include "tstaskmonitor_p.h"
-
-#include "tstask.h"
-
-/*!
-    @class TsTaskMonitor
-    @ingroup publicApi
-    @brief TsTaskMonitor gives access to list of running tasks.
-    
-    This class is one of the Qt interfaces for Task Monitor server. It can be
-    used to retrieve list of running tasks and receive notifications about the
-    changes of this list.
-*/
-
-/*!
-    Constructor.
-*/
-TsTaskMonitor::TsTaskMonitor(QObject *parent) : QObject(parent), d_ptr(0)
-{
-    d_ptr = new TsTaskMonitorPrivate(this);
-}
-
-/*!
-    Destructor.
-*/
-TsTaskMonitor::~TsTaskMonitor()
-{
-    delete d_ptr;
-}
-
-/*!
-    \return Current list of tasks from Task Monitor server.
-
-    \sa TsTask, taskListChanged()
-*/
-QList< QSharedPointer<TsTask> > TsTaskMonitor::taskList()
-{
-    return d_ptr->taskList();
-}
-
-/*!
-    @fn TsTaskMonitor::taskListChanged()
-
-    This signal is emitted when task list changes in any way:
-    - the new task is started
-    - running task is terminated
-    - parameters of one task change (for example image representing the task is updated)
-
-    No data is passed within this signal, user should retrieve task list
-    using taskList().
-
-    \sa taskList()
-*/
--- a/tstaskmonitor/client/src/tstasksettings.cpp	Tue Jun 29 10:20:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,73 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-#include "tstasksettings.h"
-#include "tstasksettings_p.h"
-
-/*!
-    @class TsTaskSettings
-    @ingroup publicApi
-    @brief TsTaskSettings allows application to alter the way it will be 
-    handled by TsTaskMonitor.
-    
-    This class is one of the Qt interfaces for Task Monitor server. It can be
-    used to set custom screenshot of the task, or to change the task visibility.
-*/
-
-/*!
-    Constructor.
-*/
-TsTaskSettings::TsTaskSettings() : d_ptr(new TsTaskSettingsPrivate())
-{
-}
-
-/*!
-    Destructor.
-*/
-TsTaskSettings::~TsTaskSettings()
-{
-    delete d_ptr;
-}
-
-/*!
-    Overwrites default screenshot of task with \a screenshot. If \a 
-    screenshot is null, this method will return false.
-    @return True if the screenshot is successfully saved, false otherwise.
-*/
-bool TsTaskSettings::registerScreenshot(const QPixmap &screenshot)
-{
-    return d_ptr->registerScreenshot(screenshot);
-}
-
-/*!
-    Removes custom screenshot saved with registerScreenshot(). If there was no
-    saved screenshot, this method will return false.
-    @return True if the screenshot is successfully removed, false otherwise.
-*/
-bool TsTaskSettings::unregisterScreenshot()
-{
-    return d_ptr->unregisterScreenshot();
-}
-
-/*!
-    Changes the \a visibilty of task. Hidden tasks are not present on the task
-    list returned by TsTaskMonitor::taskList().
-    @return True if the visibility is changed successfully, false otherwise.
-*/
-bool TsTaskSettings::setVisibility(bool visibility)
-{
-    return d_ptr->setVisibility(visibility);
-}
--- a/tstaskmonitor/client/stub/inc/tsentry.h	Tue Jun 29 10:20:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,26 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-#ifndef TSFSWENTRY_H
-#define TSFSWENTRY_H
-
-class CTsEntry
-{
-public:
-    CTsEntry();
-};
-
-#endif //TSFSWENTRY_H
--- a/tstaskmonitor/client/stub/inc/tstaskmonitor_p.h	Tue Jun 29 10:20:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,37 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-#ifndef TSTASKMONITOR_P_H
-#define TSTASKMONITOR_P_H
-
-#include <QList>
-#include <QSharedPointer>
-
-#include "tstask.h"
-
-class TsTaskMonitor;
-
-class TsTaskMonitorPrivate
-{
-public:
-    TsTaskMonitorPrivate(TsTaskMonitor *q);
-    
-public:
-    QList< QSharedPointer<TsTask> > taskList();
-    
-};
-
-#endif //TSTASKMONITOR_P_H
--- a/tstaskmonitor/client/stub/inc/tstasksettings_p.h	Tue Jun 29 10:20:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,29 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-#ifndef TSTASKSETTINGS_P_H
-#define TSTASKSETTINGS_P_H
-
-#include <QPixmap>
-
-class TsTaskSettingsPrivate
-{
-public:
-    bool registerScreenshot(const QPixmap &screenshot);
-    bool unregisterScreenshot();
-};
-
-#endif //TSTASKSETTINGS_P_H
--- a/tstaskmonitor/client/stub/src/tsentry.cpp	Tue Jun 29 10:20:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,22 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-#include "tsentry.h"
-
-CTsEntry::CTsEntry()
-{
-}
--- a/tstaskmonitor/client/stub/src/tstask.cpp	Tue Jun 29 10:20:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,48 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-#include "tstask.h"
-#include "tsentry.h"
-
-TsTask::TsTask(CTsEntry* entry) : mEntry(entry)
-{
-}
-
-TsTask::~TsTask()
-{
-    delete mEntry;
-}
-
-bool TsTask::isClosable() const
-{
-    return false;
-}
-
-QPixmap TsTask::icon() const
-{
-    return QPixmap();
-}
-
-QPixmap TsTask::screenshot() const
-{
-    return QPixmap();
-}
-
-QString TsTask::name() const
-{
-    return QString();
-}
--- a/tstaskmonitor/client/stub/src/tstaskmonitor_p.cpp	Tue Jun 29 10:20:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,28 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-#include "tstaskmonitor_p.h"
-
-TsTaskMonitorPrivate::TsTaskMonitorPrivate(TsTaskMonitor *q)
-{
-    Q_UNUSED(q);
-}
-
-QList< QSharedPointer<TsTask> > TsTaskMonitorPrivate::taskList()
-{
-    return QList< QSharedPointer<TsTask> >();
-}
--- a/tstaskmonitor/client/stub/src/tstasksettings_p.cpp	Tue Jun 29 10:20:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,28 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-#include "tstasksettings_p.h"
-
-bool TsTaskSettingsPrivate::registerScreenshot(const QPixmap &screenshot)
-{
-    Q_UNUSED(screenshot);
-    return true;
-}
-
-bool TsTaskSettingsPrivate::unregisterScreenshot()
-{
-    return true;
-}
--- a/tstaskmonitor/inc/tstaskmonitorglobals.h	Tue Jun 29 10:20:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,57 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-#ifndef RUNNINGAPPGLOBALS_H
-#define RUNNINGAPPGLOBALS_H
-
-#include <e32base.h>
-
-_LIT(KRunningAppServerName, "hsrunningappmonitor");
-const TUid KRunningAppServerUid = {0x200267B0};
-const TInt KRequestDataSizeOffset(0); 
-const TInt KRequestDataBufferOffset(0);
-
-enum RunningAppCmd {
-    GetRunningAppInfo =0,
-    SubscribeRunningAppChanges,
-    UpdateScreenshot,
-    FlushData,
-    CancelSubscribeRunningAppChanges,
-    RegisterScreenshotMessage,
-    UnregisterScreenshotMessage,
-    VisibilityChange
-};
-
-enum UpdatePriority {
-    Low = 0,
-    Normal,
-    High
-};
-
-enum Visibility {
-    Invisible =0,
-    Visible
-};
-
-enum ScreenshotMessageOffsets {
-    ScreenshotHandle = 0,
-    WindowsGroup,
-    AdditionalParameters,
-    Priority
-};
-
-#endif  //RUNNINGAPPGLOBALS_H
-
--- a/tstaskmonitor/rom.pri	Tue Jun 29 10:20:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,20 +0,0 @@
-#
-# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description:
-#
-
-BLD_INF_RULES.prj_exports += "$${LITERAL_HASH}include <platform_paths.hrh>"
-BLD_INF_RULES.prj_exports += "rom/tstaskmonitor_core.iby  CORE_APP_LAYER_IBY_EXPORT_PATH(tstaskmonitor_core.iby)"
-BLD_INF_RULES.prj_exports += "./sis/stubs/taskmonitor_stub.sis  /epoc32/release/winscw/udeb/z/system/install/taskmonitor_stub.sis"
-BLD_INF_RULES.prj_exports += "./sis/stubs/taskmonitor_stub.sis  /epoc32/data/z/system/install/taskmonitor_stub.sis"
--- a/tstaskmonitor/rom/tstaskmonitor_core.iby	Tue Jun 29 10:20:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,31 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-#ifndef __TSTASKMONITOR_CORE_IBY__
-#define __TSTASKMONITOR_CORE_IBY__
-
-file=ABI_DIR\BUILD_DIR\tstaskmonitorclient.dll              SHARED_LIB_DIR\tstaskmonitorclient.dll
-file=ABI_DIR\BUILD_DIR\hsrunningappmonitor.exe              PROGRAMS_DIR\hsrunningappmonitor.exe
-
-file=ABI_DIR\BUILD_DIR\tsbackstepping.dll                   SHARED_LIB_DIR\tsbackstepping.dll
-
-
-ECOM_PLUGIN( tsscreenshotplugin.dll, tsscreenshotplugin.rsc )
-
-// stub sis
-data=ZSYSTEM/install/taskmonitor_stub.sis                  system/install/taskmonitor_stub.sis
-
-#endif //__TSTASKMONITOR_CORE_IBY__
--- a/tstaskmonitor/screenshotplugin/group/bld.inf	Tue Jun 29 10:20:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,21 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-PRJ_PLATFORMS
-DEFAULT
-
-PRJ_MMPFILES
-tsscreenshotplugin.mmp
--- a/tstaskmonitor/screenshotplugin/group/tsscreenshotplugin.mmp	Tue Jun 29 10:20:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,42 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-TARGET          tsscreenshotplugin.dll
-TARGETTYPE      PLUGIN 
-UID             0x10009D8D 0x200267AE
-CAPABILITY      CAP_ECOM_PLUGIN
-VENDORID        VID_DEFAULT
-
-OPTION_REPLACE  ARMCC --arm -O3 --cpu 6
-
-MW_LAYER_SYSTEMINCLUDE
-
-USERINCLUDE     ../inc
-
-SOURCEPATH      ../src
-SOURCE          tsscreenshotmain.cpp
-SOURCE          tsscreenshotplugin.cpp
-
-RESOURCE        tsscreenshotplugin.rss
-
-LIBRARY         ecom.lib
-LIBRARY         euser.lib
-LIBRARY         wsgraphicdrawer.lib
-LIBRARY         fbscli.lib
-LIBRARY         estor.lib
-LIBRARY         gdi.lib 
-LIBRARY         tstaskmonitorclient.lib
-DEBUGLIBRARY    flogger.lib
--- a/tstaskmonitor/screenshotplugin/inc/tsscreenshotplugin.h	Tue Jun 29 10:20:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,87 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-#ifndef TSSCREENSHOTPLUGIN_H
-#define TSSCREENSHOTPLUGIN_H
-
-#include <w32std.h>
-#include <graphics/wsgraphicdrawerinterface.h>
-#include <graphics/wsgraphicdrawer.h>
-
-class CTsScreenshotPlugin: public CWsGraphicDrawer, 
-                           public MWsEventHandler
-{
-public:
-    /**
-     * Two phase constructor 
-     */
-    
-    static CTsScreenshotPlugin* NewL();
-    
-    /**
-     * Destructor
-     */
-    ~CTsScreenshotPlugin();
-
-private:
-    /**
-     * From CWsGraphicDrawer.
-     * @see CWsGraphicDrawer::DoDraw(MWsGc&, const TRect&, const TDesC8&) const
-     */ 
-    void DoDraw(MWsGc&, const TRect&, const TDesC8&) const;
-    
-    /**
-     * From CWsGraphicDrawer
-     * @see CWsGraphicDrawer::HandleMessage(const TDesC8&)
-     */
-    void HandleMessage(const TDesC8&);
-    
-    void HandleMessageL(const TDesC8&);
-    
-    /**
-     * From CWsGraphicDrawer
-     * @see CWsGraphicDrawer::ConstructL(MWsGraphicDrawerEnvironment&, const TGraphicDrawerId& , MWsClient&, const TDesC8&)
-     */
-    void ConstructL(MWsGraphicDrawerEnvironment& env, 
-                    const TGraphicDrawerId& id, 
-                    MWsClient& owner, 
-                    const TDesC8& data);
-    
-    /**
-     * From MWsEventHandler.
-     * 
-     * @see MWsEventHandler::DoHandleEvent(const TWservCrEvent&)
-     */
-    void DoHandleEvent(const TWservCrEvent& event);
-    
-    /**
-     * Function take screenshot od current display
-     * @param screenshot identyfier
-     */
-    void TakeScreenshot(TInt);
-        
-    /**
-     * Function take screenshot od current display
-     * @param screenshot identyfier
-     */
-    void TakeScreenshotL(TInt);
-
-private:
-    RPointerArray<CFbsBitmap> mCache;
-    TInt mWindowGroupId;
-};
-
-#endif //TSSCREENSHOTPLUGIN_H
--- a/tstaskmonitor/screenshotplugin/screenshotplugin.pro	Tue Jun 29 10:20:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,20 +0,0 @@
-#
-# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description:
-#
-
-TEMPLATE = subdirs
-
-BLD_INF_RULES.prj_exports += "$${LITERAL_HASH}include \"group/bld.inf\""
-    
--- a/tstaskmonitor/screenshotplugin/src/tsscreenshotmain.cpp	Tue Jun 29 10:20:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,39 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-#include <ecom/implementationproxy.h>
-#include "tsscreenshotplugin.h"
-
-const TInt KImpId( 0x200267AE );
-
-// --------------------------------------------------------------------------
-// KImplementationTable
-// --------------------------------------------------------------------------
-//    
-LOCAL_C const TImplementationProxy KImplementationTable[] = 
-{
-    IMPLEMENTATION_PROXY_ENTRY(KImpId, CTsScreenshotPlugin::NewL)
-};
-
-// --------------------------------------------------------------------------
-// ImplementationGroupProxy
-// --------------------------------------------------------------------------
-//    
-EXPORT_C const TImplementationProxy* ImplementationGroupProxy(TInt& aTableCount)
-{
-    aTableCount = (sizeof(KImplementationTable) / sizeof(TImplementationProxy));
-    return KImplementationTable;
-}
--- a/tstaskmonitor/screenshotplugin/src/tsscreenshotplugin.cpp	Tue Jun 29 10:20:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,176 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-#include "tsscreenshotplugin.h"
-#include "tstaskmonitorglobals.h"
-#include <graphics/wsscreendevice.h>
-#include <s32mem.h>
-
-const TInt KMsgSize(5);
-const TInt KInvalidGroupId(~0);
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//
-CTsScreenshotPlugin* CTsScreenshotPlugin::NewL()
-{
-    //no second step construction is required here
-    //window server will initialize plugin later
-    return new(ELeave)CTsScreenshotPlugin();
-}
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//
-void CTsScreenshotPlugin::ConstructL(MWsGraphicDrawerEnvironment& env, 
-                                     const TGraphicDrawerId& id, 
-                                     MWsClient& owner, 
-                                     const TDesC8& /*data*/ )
-{
-    BaseConstructL(env, id, owner);
-    env.RegisterEventHandler(this, 
-                             this, 
-                             TWservCrEvent::EWindowGroupChanged |
-                             TWservCrEvent::EDeviceOrientationChanged);
-    mWindowGroupId = KInvalidGroupId;
-}
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//
-CTsScreenshotPlugin::~CTsScreenshotPlugin()
-{
-    Env().UnregisterEventHandler(this);
-    mCache.ResetAndDestroy();
-}
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//
-void CTsScreenshotPlugin::DoDraw(MWsGc&, const TRect&, const TDesC8&) const
-{
-    //plugin is not a real drawer
-    //no implementation required
-}
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//
-void CTsScreenshotPlugin::HandleMessage(const TDesC8& msg)
-{
-    TRAP_IGNORE(HandleMessageL(msg));
-}
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//
-void CTsScreenshotPlugin::HandleMessageL(const TDesC8& msg)
-{
-    TInt parsedMsg[KMsgSize];
-    RDesReadStream msgStream(msg);
-    for (TInt iter(0); iter < KMsgSize; ++iter) {
-        parsedMsg[iter] = msgStream.ReadInt32L(); 
-    }
-    
-    if (RegisterScreenshotMessage == parsedMsg[0]) { //Screenshot registeration ACK 
-        for(TInt iter(0); iter < mCache.Count(); ++iter) {
-            if (mCache[iter]->Handle() == parsedMsg[ScreenshotHandle + 1]) {
-                //bitmap is not needed no more
-                delete mCache[iter];
-                mCache.Remove(iter);
-                break;
-            }
-        }
-    }
-}
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//
-void CTsScreenshotPlugin::DoHandleEvent(const TWservCrEvent& event)
-{
-    switch (event.Type()) {
-    case TWservCrEvent::EWindowGroupChanged:
-        if (KInvalidGroupId != mWindowGroupId) {
-            TakeScreenshot(mWindowGroupId);
-        }
-        mWindowGroupId = event.WindowGroupIdentifier();
-        break;
-    case TWservCrEvent::EDeviceOrientationChanged:
-        TakeScreenshot(mWindowGroupId);
-        break;
-    }
-}
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//
-void CTsScreenshotPlugin::TakeScreenshot(TInt id)
-{
-    TRAP_IGNORE(TakeScreenshotL(id);)
-}
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//
-void CTsScreenshotPlugin::TakeScreenshotL(TInt id)
-{
-    if(0 >= Env().ScreenCount()) {
-        User::Leave(KErrCorrupt);
-    }
-    const TInt screenId(0); //use local variable in case of changing screen selection policy
-    const MWsScreenConfig* const screenConfig = 
-        Env().Screen(screenId)->ObjectInterface<MWsScreenConfig>();
-    const MWsScreenDevice* const screenDevice = 
-        static_cast<MWsScreenDevice*>(Env().Screen(screenId)->ResolveObjectInterface(MWsScreenDevice::EWsObjectInterfaceId));
-    
-    User::LeaveIfNull(screenConfig);
-    User::LeaveIfNull(screenDevice);
-    
-    //prepare destination bitmap
-    CFbsBitmap *bitmap = new (ELeave) CFbsBitmap();
-    CleanupStack::PushL(bitmap);
-    
-    
-    User::LeaveIfError(bitmap->Create(screenConfig->SizeInPixels(), 
-                                screenConfig->DisplayMode()));
-    
-    screenDevice->CopyScreenToBitmapL(bitmap, 
-                                      screenConfig->SizeInPixels());
-    
-    
-    //prepare and send message
-    TInt msg[KMsgSize] = {RegisterScreenshotMessage};
-    
-    msg[WindowsGroup + 1] = id;
-    msg[ScreenshotHandle + 1] = bitmap->Handle();
-    msg[Priority + 1] = Low;
-    msg[AdditionalParameters + 1] = 0; //unused
-    
-    const TPckgC<TInt[sizeof(msg) / sizeof(TInt)]> buf(msg);
-    
-    User::LeaveIfError(SendMessage(buf));
-    
-    mCache.AppendL(bitmap);
-    CleanupStack::Pop(bitmap);
-    
-}
-
--- a/tstaskmonitor/screenshotplugin/src/tsscreenshotplugin.rss	Tue Jun 29 10:20:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,42 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  ECOM registration file
-*
-*/
-
-
-#include <ecom/registryinfo.rh>
-
-RESOURCE REGISTRY_INFO theInfo
-	{
-	dll_uid = 0x200267AE;
-	interfaces =
-		{
-		INTERFACE_INFO
-			{
-			interface_uid = 0x10281924;
-			implementations =
-				{
-				IMPLEMENTATION_INFO
-					{
-					implementation_uid = 0x200267AE;
-					version_no = 1;
-					display_name = "tsscreenshotplugin";
-					default_data = "";
-					opaque_data = "";
-					}
-				};
-			}
-		};
-	}
--- a/tstaskmonitor/server/group/bld.inf	Tue Jun 29 10:20:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,21 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-PRJ_PLATFORMS
-DEFAULT
-
-PRJ_MMPFILES
-hsrunningappmonitor.mmp
--- a/tstaskmonitor/server/group/hsrunningappmonitor.mmp	Tue Jun 29 10:20:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,63 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-TARGET          hsrunningappmonitor.exe
-TARGETTYPE      exe
-UID             0 0x200267B0
-
-USERINCLUDE     ../inc
-USERINCLUDE     ../../inc
-USERINCLUDE     ../../../inc
-USERINCLUDE     ../../utils/inc
-USERINCLUDE     ../../backstepping/inc
-
-MW_LAYER_SYSTEMINCLUDE 
-
-SOURCEPATH      ../src
-SOURCE          main.cpp
-SOURCE          hsrunningappserver.cpp
-SOURCE          hsrunningappsession.cpp
-SOURCE          hsdataobservertask.cpp
-SOURCE          hsdataprovidertask.cpp
-SOURCE          tsdatatask.cpp
-
-SOURCE          tsrunningappstorage.cpp
-SOURCE          tsdatalist.cpp
-SOURCE          tsscreenshotprovider.cpp
-
-SOURCEPATH      ../../utils/src
-SOURCE          tsentrykey.cpp
-SOURCE          tsentrykeygenerator.cpp
-SOURCE          tsentry.cpp
-
-
-LIBRARY         euser.lib 
-LIBRARY         estor.lib
-LIBRARY         apparc.lib
-LIBRARY         ws32.lib
-LIBRARY         apgrfx.lib
-LIBRARY         fbscli.lib
-LIBRARY         bitgdi.lib
-LIBRARY         aknicon.lib
-LIBRARY         tsutils.lib
-LIBRARY         tsbackstepping.lib
-
-CAPABILITY     ALL -TCB
-EPOCHEAPSIZE   0x100000 0x600000 // 1MB - 6MB
-
-#ifdef ENABLE_ABIV2_MODE
-DEBUGGABLE_UDEBONLY
-#endif
--- a/tstaskmonitor/server/inc/hsdataobservertask.h	Tue Jun 29 10:20:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,37 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-#ifndef DATAOBSERVERTASK_H
-#define DATAOBSERVERTASK_H
-#include "tsdataobserver.h"
-#include <e32base.h>
-class CHsDataObserverTask: public CHsDataObserver
-{
-public:
-    ~CHsDataObserverTask();
-    static void ExecuteLD(MHsDataObserverStorage& storage,const RMessage2& msg);
-
-private:
-    CHsDataObserverTask(MHsDataObserverStorage& storage, const RMessage2& msg);
-    void DataChanged();
-    void Cancel(const RMessage2& reason);
-
-private:
-    MHsDataObserverStorage& mStorage;
-    const RMessage2 mMsg;
-    TBool mDataChanged;
-};
-#endif //DATAOBSERVERTASK_H
--- a/tstaskmonitor/server/inc/hsdataprovider.h	Tue Jun 29 10:20:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,26 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-#ifndef DATAPROVIDER_H
-#define DATAPROVIDER_H
-
-#include <e32base.h>
-class MHsDataProvider {
-public:
-    virtual const TDesC8& Data() const = 0;
-};
-
-#endif //DATAPROVIDR_H
--- a/tstaskmonitor/server/inc/hsdataprovidertask.h	Tue Jun 29 10:20:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,27 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-#ifndef DATAPROVIDERTASK_H
-#define DATAPROVIDERTASK_H
-
-#include "hsdataprovider.h"
-
-class HsDataProviderTask {
-public:
-    static void ExecuteL(const MHsDataProvider& provider, const RMessage2& msg);
-};
-
-#endif //DATAPROVIDER_H
--- a/tstaskmonitor/server/inc/hsrunningappserver.h	Tue Jun 29 10:20:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,83 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-#ifndef RUNNINGAPPSERVER_H
-#define RUNNINGAPPSERVER_H
-
-// INCLUDES
-#include <e32std.h>
-#include <e32base.h>
-#include <w32std.h>
-#include "tsdataobserver.h"
-
-class CRunningAppStorage;
-class CTsResourceManager;
-class CTsWindowGroupsMonitor;
-/**
- *  CRunningAppServer
- * 
- */
-class CRunningAppServer : public CServer2,
-                          public MHsDataObserver,
-                          public MHsDataObserverStorage
-{
-public:
-    /**
-     * Destructor.
-     */
-    ~CRunningAppServer();
-
-    /**
-     * Two-phased constructor.
-     */
-    static CRunningAppServer* NewLC();
-    
-public: //MHsDataObserver
-    void DataChanged();
-    
-public: //MHsDataObserverStorage
-    void PushL(CHsDataObserver*);
-    void Pop(CHsDataObserver*);
-    void Cancel(const RMessage2&);
-
-private:
-    /**
-     * Constructor for performing 1st stage construction
-     */
-    CRunningAppServer();
-
-    /**
-     * Default constructor for performing 2nd stage construction
-     */
-    void ConstructL();
-
-    /**
-     * Interface implementation
-     * @see CServer2::NewSessionL(const TVersion&, const RMessage2&)
-     */
-    CSession2* NewSessionL(const TVersion& version, const RMessage2& message) const;
-private:
-    RPointerArray<CHsDataObserver> mObservers;
-    RWsSession mWsSession;
-    CTsResourceManager* mResources;
-    CTsWindowGroupsMonitor* mMonitor;
-    CRunningAppStorage* mStorage;
-    
-    CBase *mScreenshotProviderStarter;
-    CBase *mBacksteppingEngine;
-};
-
-#endif // RUNNINGAPPSERVER_H
--- a/tstaskmonitor/server/inc/hsrunningappsession.h	Tue Jun 29 10:20:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,77 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-#ifndef RUNNINGAPPSESSION_H
-#define RUNNINGAPPSESSION_H
-
-// INCLUDES
-#include <e32std.h>
-#include <e32base.h>
-#include "tsdataobserver.h"
-#include "hsdataprovider.h"
-#include "tsdatastorage.h"
-/**
- *  CActivitySession
- * 
- */
-class CRunningAppSession : public CSession2
-{
-public:
-    // Constructors and destructor
-
-    /**
-     * Destructor.
-     */
-    ~CRunningAppSession();
-
-    /**
-     * Two-phased constructor.
-     * @param fileSession - initialized file system session
-     * @param taskStorage - global observers storage
-     * @param storage - data storage
-     */
-    static CRunningAppSession* NewL(MHsDataObserverStorage& observerStorage, 
-                                    const MHsDataProvider& dataProvider,
-                                    MTsDataStorage& dataStorage);
-
-private:
-
-    /**
-     * Constructor for performing 1st stage construction
-     */
-    CRunningAppSession(MHsDataObserverStorage& observerStorage, 
-                       const MHsDataProvider& dataProvider,
-                       MTsDataStorage& dataStorage);
-
-    /**
-     * EPOC default constructor for performing 2nd stage construction
-     */
-    void ConstructL();
-
-private:
-    /**
-     * Implements interface
-     * @see void CSession2::ServiceL(const RMessage2&)
-     */
-    void ServiceL(const RMessage2& message);
-
-private:
-    MHsDataObserverStorage& mObserverStorage;
-    const MHsDataProvider& mDataProvider;
-    MTsDataStorage& mDataStorage;
-};
-
-#endif // RUNNINGAPPSESSION_H
--- a/tstaskmonitor/server/inc/tsdatalist.h	Tue Jun 29 10:20:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,115 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Non-closeable app list class
- *
-*/
-
-
-#ifndef TSDATALIST_H
-#define TSDATALIST_H
-
-#include <e32base.h>
-#include <tswindowgroupsobserver.h>
-#include "tsentry.h"
-#include "tsdatastorage.h"
-#include "tsdataobserver.h"
-
-class CApaWindowGroupName;
-class CFbsBitmap;
-
-NONSHARABLE_CLASS( CTsDataList ) : public CTsWindowGroupsObserver,
-                                   public MTsDataStorage
-    {
-public:
-    static CTsDataList* NewL(MTsResourceManager& resources, 
-                             MTsWindowGroupsMonitor &monitor, 
-                             MHsDataObserver& observer);
-
-    ~CTsDataList();
-
-private:
-    CTsDataList(MTsResourceManager& resources,
-                MTsWindowGroupsMonitor &monitor, 
-                MHsDataObserver& observer);
-
-    void ConstructL();
-
-public:
-    const RTsFswArray& Data() const;
-
-    void HandleWindowGroupChanged(MTsResourceManager &,
-                                  const TArray<RWsSession::TWindowGroupChainInfo> &);
-
-    TBool IsHiddenUid( TUid uid );
-
-    void UpdateL(TInt key,const CFbsBitmap& data, TInt param, TInt priority);
-    
-    void UpdateL(TInt key, const Visibility& data, TInt param);
-
-    void RemoveL(TInt key, TInt param);
-
-private:
-    void CollectAppsL(RTsFswArray& appsList,
-                      const TArray<RWsSession::TWindowGroupChainInfo> &wgList);
-
-    void AddEntryL(const TTsEntryKey& key, 
-                   const TUid& appUid,
-                   CApaWindowGroupName* wgName,
-                   RTsFswArray& newList );
-
-    TBool ConsiderOldDataL( const TTsEntryKey& key );
-
-    HBufC* FindAppNameLC(CApaWindowGroupName* windowName,
-                         const TUid& appUid,
-                         TInt wgId );
-
-    void FitDataToList( RTsFswArray& listToFit);
-
-    TBool CheckIfExists(const CTsEntry& entry,
-                        const RTsFswArray& newList) const;
-
-    void GetAppIconL(const TUid& appUid,
-                     CFbsBitmap*& bitmapArg, 
-                     CFbsBitmap*& maskArg);
-
-    TInt FindEntry(const RTsFswArray& list, const TTsEntryKey& key ) const;
-
-    TBool EstablishOrder(const RArray<TTsEntryKey>& keyList);
-
-    TBool VerifyApplicationL(TUid);
-
-    TTsEntryKey GenerateKeyL(TInt);
-
-    void CompressLookupTable(RArray<TUid> &array);
-
-    void UpdateLookupTableL(RArray<TUid> &array, TInt offset);
-
-private:
-    /**
-     * Resource manager. Not own
-     */
-    MTsResourceManager& mResources;
-    
-    MHsDataObserver &mObserver;
-    
-    RTsFswArray mData; // current fsw content, i.e. the task list
-
-    // list of hidden uids
-    RArray<TUid> mHiddenUids;
-    
-    // list of allowed uids
-    RArray<TUid> mAllowedUids;
-    };
-
-#endif //TSDATALIST_H
--- a/tstaskmonitor/server/inc/tsdatastorage.h	Tue Jun 29 10:20:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,30 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-#ifndef DATASTORAGE_H
-#define DATASTORAGE_H
-
-#include <e32base.h>
-#include "tstaskmonitorglobals.h"
-class CFbsBitmap;
-class MTsDataStorage {
-public:
-    virtual void UpdateL(TInt key, const CFbsBitmap& data, TInt param, TInt priority) =0;
-    virtual void UpdateL(TInt key, const Visibility& data, TInt param) =0;
-    virtual void RemoveL(TInt key, TInt param) =0;
-};
-
-#endif //DATASTORAGE_H
--- a/tstaskmonitor/server/inc/tsdatatask.h	Tue Jun 29 10:20:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,37 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-#ifndef TSDATATASK_H
-#define TSDATATASK_H
-#include "tstaskmonitorglobals.h"
-#include "tsdatastorage.h"
-class TsDataTask
-{
-public:
-    static void ExecuteL(MTsDataStorage& dataStorage, const RMessage2& msg);
-
-private:
-    static void RegisterScreenshotL(MTsDataStorage& dataStorage, 
-                                    const RMessage2& msg);
-    
-    static void UnregisterScreenshotL(MTsDataStorage& dataStorage, 
-                                      const RMessage2& msg);
-    
-    static void VisibilityChangeL(MTsDataStorage& dataStorage, 
-                                  const RMessage2& msg);
-};
-
-#endif //TSDATATASK_H
--- a/tstaskmonitor/server/inc/tsrunningappstorage.h	Tue Jun 29 10:20:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,86 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-#ifndef RUNNINGAPPSTORAGE_H
-#define RUNNINGAPPSTORAGE_H
-
-// INCLUDES
-#include <e32std.h>
-#include <e32base.h>
-
-#include "tsdataobserver.h"
-#include "hsdataprovider.h"
-#include "tsdatastorage.h"
-
-class CTsDataList;
-class MTsResourceManager;
-class MTsWindowGroupsMonitor;
-
-/**
- *  CRunningAppServer
- * 
- */
-class CRunningAppStorage : public CBase,
-                           public MHsDataProvider, 
-                           public MHsDataObserver,
-                           public MTsDataStorage 
-{
-public:
-    /**
-     * Destructor.
-     */
-    ~CRunningAppStorage();
-
-    /**
-     * Two-phased constructor.
-     */
-    static CRunningAppStorage* NewL(MHsDataObserver& observer,
-                                    MTsResourceManager& resources,
-                                    MTsWindowGroupsMonitor &wsMonitor);
-    
-public: //MHsDataObserver
-    const TDesC8& Data() const; 
-    
-    //MHsDataChangeProvider
-    void DataChanged();
-    
-    void UpdateL(TInt key,const CFbsBitmap& data, TInt param, TInt priority);
-    
-    void UpdateL(TInt key, const Visibility& data, TInt param);
-    
-    void RemoveL(TInt key, TInt param);
-
-private:
-    /**
-     * Constructor for performing 1st stage construction
-     */
-    CRunningAppStorage(MHsDataObserver& observer);
-
-    /**
-     * Default constructor for performing 2nd stage construction
-     */
-    void ConstructL(MTsResourceManager& resources,
-                    MTsWindowGroupsMonitor &wsMonitor);
-    
-    void DataChangedL();
-
-private:
-    MHsDataObserver& mObserver;
-    RBuf8 mData;
-    CTsDataList* mEngine;
-};
-
-#endif // RUNNINGAPPSERVER_H
--- a/tstaskmonitor/server/inc/tsscreenshotprovider.h	Tue Jun 29 10:20:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,35 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-#ifndef TSSCREENSHOTPROVIDER_H
-#define TSSCREENSHOTPROVIDER_H
-#include "tsdatastorage.h"
-#include <w32std.h>
-
-class CTsScreenshotProvider: public CWsGraphic
-{
-public:
-    static CTsScreenshotProvider* NewL(MTsDataStorage&);
-private:
-    CTsScreenshotProvider(MTsDataStorage&);
-    void HandleMessage(const TDesC8&);
-    void HandleMessageL(const TDesC8&);
-    void OnReplace();
-private:
-    MTsDataStorage& mStorage;
-};
-
-#endif //TSSCREENSHOTTASK_H
--- a/tstaskmonitor/server/server.pro	Tue Jun 29 10:20:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,20 +0,0 @@
-#
-# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description:
-#
-
-TEMPLATE = subdirs
-
-BLD_INF_RULES.prj_exports += "$${LITERAL_HASH}include \"group/bld.inf\""
-    
--- a/tstaskmonitor/server/src/hsdataobservertask.cpp	Tue Jun 29 10:20:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,78 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-#include "hsdataobservertask.h"
-#include "tstaskmonitorglobals.h"
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-CHsDataObserverTask::CHsDataObserverTask(MHsDataObserverStorage& storage, 
-                                         const RMessage2& msg)
-:
-    mStorage(storage),
-    mMsg(msg)
-{
-    // No implementation required
-}
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-CHsDataObserverTask::~CHsDataObserverTask()
-{
-    if (EFalse == mMsg.IsNull()) {
-        mMsg.Complete(mDataChanged ? KErrNone : KErrCancel);
-    }
-}
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CHsDataObserverTask::ExecuteLD(MHsDataObserverStorage& storage,const RMessage2& msg)
-{
-    CHsDataObserver *self = new (ELeave)CHsDataObserverTask(storage, msg);
-    CleanupStack::PushL(self);
-    storage.PushL(self);
-    CleanupStack::Pop(self);
-}
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CHsDataObserverTask::DataChanged()
-{
-    mDataChanged = ETrue;
-    mStorage.Pop(this);
-    delete this; 
-}
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CHsDataObserverTask::Cancel(const RMessage2& reason)
-{
-    if (CancelSubscribeRunningAppChanges == reason.Function() &&
-        mMsg.Session() == reason.Session()) {
-        mStorage.Pop(this);
-        delete this;
-   }
-}
--- a/tstaskmonitor/server/src/hsdataprovidertask.cpp	Tue Jun 29 10:20:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,40 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-#include "hsdataprovidertask.h"
-#include "tstaskmonitorglobals.h"
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void HsDataProviderTask::ExecuteL(const MHsDataProvider& provider, const RMessage2& msg)
-{
-    switch (msg.Function()) {
-    case GetRunningAppInfo:
-        msg.WriteL(KRequestDataSizeOffset, TPckgBuf<TInt>(provider.Data().Length()));
-        msg.Complete(KErrNone);
-        break;
-    
-    case FlushData:
-        if (provider.Data().Length() > msg.GetDesMaxLengthL(KRequestDataBufferOffset)) {
-            User::Leave(KErrCorrupt);
-        }
-        msg.WriteL(KRequestDataBufferOffset, provider.Data());
-        msg.Complete(KErrNone);
-        break;
-    }
-}
--- a/tstaskmonitor/server/src/hsrunningappserver.cpp	Tue Jun 29 10:20:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,132 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-#include <tswindowgroupsobserver.h>
-#include "tstaskmonitorglobals.h"
-#include "hsrunningappserver.h"
-#include "hsrunningappsession.h"
-#include "tsrunningappstorage.h"
-#include "tsscreenshotprovider.h"
-#include "tsbackstepping.h"
-
-_LIT(KErrObserverExists, "Observer already exists");
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-CRunningAppServer::CRunningAppServer()
-:
-CServer2(EPriorityStandard)
-{
-    // No implementation required
-}
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-CRunningAppServer::~CRunningAppServer()
-{
-    delete mBacksteppingEngine;
-    delete mScreenshotProviderStarter;
-    delete mStorage;
-    delete mMonitor;
-    mObservers.ResetAndDestroy();
-}
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-CRunningAppServer* CRunningAppServer::NewLC()
-{
-    CRunningAppServer* self = new (ELeave) CRunningAppServer();
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    return self;
-}
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CRunningAppServer::ConstructL()
-{
-    StartL(KRunningAppServerName);
-    User::LeaveIfError(mWsSession.Connect());
-    mResources = CTsResourceManager::NewL();
-    mMonitor = CTsWindowGroupsMonitor::NewL(*mResources);
-    mStorage = CRunningAppStorage::NewL(*this, *mResources, *mMonitor);
-    TRAP_IGNORE(mScreenshotProviderStarter = CTsScreenshotProvider::NewL(*mStorage);
-    mBacksteppingEngine = CTsBackstepping::NewL(*mMonitor);)
-}
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-CSession2* CRunningAppServer::NewSessionL(const TVersion &, const RMessage2&) const
-{
-    return CRunningAppSession::NewL(*const_cast<CRunningAppServer *>(this),
-                                    *const_cast<CRunningAppServer *>(this)->mStorage,
-                                    *const_cast<CRunningAppServer *>(this)->mStorage);
-}
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CRunningAppServer::DataChanged()
-{
-    while (0 < mObservers.Count()) {
-        mObservers[0]->DataChanged();
-    }
-}
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CRunningAppServer::PushL(CHsDataObserver* observer)
-{
-    ( 0 <= mObservers.Find(observer)) ?
-    User::Panic(KErrObserverExists, KErrAlreadyExists) :
-    mObservers.AppendL(observer);
-}
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CRunningAppServer::Pop(CHsDataObserver* observer)
-{
-    const TInt offset(mObservers.Find(observer));
-    if(0 <= offset) {
-        mObservers.Remove(offset);
-    }
-}
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CRunningAppServer::Cancel(const RMessage2& reason)
-{
-    for (TInt iter(mObservers.Count() - 1); 0 <= iter; --iter) {
-        mObservers[iter]->Cancel(reason);
-    }
-    reason.Complete(KErrNone);
-}
--- a/tstaskmonitor/server/src/hsrunningappsession.cpp	Tue Jun 29 10:20:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,101 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-#include "hsrunningappsession.h"
-#include "tstaskmonitorglobals.h"
-
-#include "hsdataobservertask.h"
-#include "hsdataprovidertask.h"
-#include "tsdatatask.h"
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-CRunningAppSession::CRunningAppSession(MHsDataObserverStorage& observerStorage,
-                                       const MHsDataProvider& dataProvider,
-                                       MTsDataStorage& dataStorage)
-:
-    mObserverStorage(observerStorage),
-    mDataProvider(dataProvider),
-    mDataStorage(dataStorage)
-{
-    // No implementation required
-}
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-CRunningAppSession::~CRunningAppSession()
-{
-}
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-CRunningAppSession* CRunningAppSession::NewL(MHsDataObserverStorage& observerStorage, 
-                                             const MHsDataProvider& dataProvider,
-                                             MTsDataStorage& dataStorage)
-{
-    CRunningAppSession* self = new (ELeave) CRunningAppSession(observerStorage, 
-                                                               dataProvider,
-                                                               dataStorage);
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    CleanupStack::Pop(self);
-    return self;
-}
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CRunningAppSession::ConstructL()
-{
-}
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CRunningAppSession::ServiceL(const RMessage2& message)
-{
-    switch (message.Function()) {
-    case SubscribeRunningAppChanges:
-        CHsDataObserverTask::ExecuteLD(mObserverStorage, message);
-        break;
-    
-    case CancelSubscribeRunningAppChanges:
-        mObserverStorage.Cancel(message);
-        break;
-    
-    case GetRunningAppInfo:
-    case FlushData:
-        HsDataProviderTask::ExecuteL(mDataProvider, message);
-        break;
-        
-    case RegisterScreenshotMessage:
-    case UnregisterScreenshotMessage:
-    case VisibilityChange:
-        TsDataTask::ExecuteL(mDataStorage, message);
-        break;
-    
-    default:
-        message.Complete(CServer2::EBadMessageNumber);
-    }
-}
--- a/tstaskmonitor/server/src/main.cpp	Tue Jun 29 10:20:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,63 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-#include "hsrunningappserver.h"
-#include <e32base.h>
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-LOCAL_C void StartRunningAppServerL()
-{
-    CActiveScheduler* activeScheduler = new( ELeave ) CActiveScheduler;
-    CleanupStack::PushL( activeScheduler );
-    CActiveScheduler::Install( activeScheduler );
-    CServer2* serverObject = CRunningAppServer::NewLC();
-    RProcess::Rendezvous( KErrNone );
-    CActiveScheduler::Start();
-    CleanupStack::PopAndDestroy( serverObject );
-    CleanupStack::PopAndDestroy( activeScheduler );
-}
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-LOCAL_C TInt StartRunningAppServer()
-{
-    __UHEAP_MARK;
-    TInt errNo(KErrNoMemory);
-    CTrapCleanup* cleanupStack = CTrapCleanup::New();
-    if (cleanupStack) {
-        TRAP(errNo, StartRunningAppServerL());
-        delete cleanupStack;
-    }
-    __UHEAP_MARKEND;
-    if (KErrNone != errNo) {
-        RProcess::Rendezvous(errNo);
-    }
-    return errNo;
-}
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-TInt E32Main()
-{
-    return StartRunningAppServer();
-}
--- a/tstaskmonitor/server/src/tsdatalist.cpp	Tue Jun 29 10:20:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,541 +0,0 @@
-/*
- * Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
- * All rights reserved.
- * This component and the accompanying materials are made available
- * under the terms of "Eclipse Public License v1.0"
- * which accompanies this distribution, and is available
- * at the URL "http://www.eclipse.org/legal/epl-v10.html".
- *
- * Initial Contributors:
- * Nokia Corporation - initial contribution.
- *
- * Contributors:
- *
- * Description:  File containing application list classes
- *
- */
-
-//INCLUDES:
-
-#include "tsdatalist.h"
-#include "tsentrykeygenerator.h"
-#include <mmf/common/mmfcontrollerpluginresolver.h> // for CleanupResetAndDestroyPushL
-#include <apgwgnam.h>
-#include <bitstd.h>
-#include <AknIconUtils.h> // avkon
-#include <apgicnfl.h> // fbsbitmap
-#include <AknIconSrvClient.h> 
-#include <fbs.h>
-#include <apgwgnam.h>
-
-
-// size for the created app icons
-const TInt KAppIconWidth = 128;
-const TInt KAppIconHeight = 128;
-
-//uids to be hidden
-const TUid KHsApplicationUid = { 0x20022F35 };
-
-const TInt KMaxLookupSize(75);
-
-// ================= MEMBER FUNCTIONS =======================
-
-// --------------------------------------------------------------------------
-/**
- * Two-phased constructor.
- */
-CTsDataList* CTsDataList::NewL(MTsResourceManager& resources,
-                                     MTsWindowGroupsMonitor &monitor, 
-                                     MHsDataObserver& observer)
-{
-    CTsDataList* self = new (ELeave) CTsDataList(resources, monitor, observer);
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    CleanupStack::Pop(self);
-    return self;
-}
-
-// --------------------------------------------------------------------------
-/**
- * Constructor.
- */
-CTsDataList::CTsDataList(MTsResourceManager& resources,
-                         MTsWindowGroupsMonitor &monitor, 
-                         MHsDataObserver& observer) 
-:
-    CTsWindowGroupsObserver(monitor),
-    mResources(resources),
-    mObserver(observer)
-{
-}
-
-// --------------------------------------------------------------------------
-/*
- * Destructor
- */
-CTsDataList::~CTsDataList()
-{
-    mData.ResetAndDestroy();
-    mHiddenUids.Close();
-    mAllowedUids.Close();
-    RFbsSession::Disconnect();
-    RAknIconSrvClient::Disconnect();
-}
-
-// --------------------------------------------------------------------------
-/**
- * Performs 2nd phase construction.
- */
-void CTsDataList::ConstructL()
-{
-    BaseConstructL();
-    mHiddenUids.AppendL(KHsApplicationUid);
-    User::LeaveIfError(RFbsSession::Connect());
-    RAknIconSrvClient::Connect();
-}
-
-// --------------------------------------------------------------------------
-/**
- * Returns a reference to the current content.
- * Also performs sanity checks, e.g. associates application icons
- * when no screenshot has been received.
- * @return  ref to content array
- */
-const RTsFswArray& CTsDataList::Data() const
-{
-    return mData;
-}
-
-// --------------------------------------------------------------------------
-/**
- * Interface implementation
- * @see MTsWindowGroupsObserver HandleWindowGroupChanged
- */
-void CTsDataList::HandleWindowGroupChanged(MTsResourceManager &, 
-                                              const TArray<RWsSession::TWindowGroupChainInfo> &wgList)
-{
-    TRAP_IGNORE(RTsFswArray newAppsList;
-                CleanupResetAndDestroyPushL(newAppsList);
-                CollectAppsL(newAppsList, wgList);
-                FitDataToList(newAppsList);
-                CleanupStack::PopAndDestroy(&newAppsList));
-    
-}
-
-// --------------------------------------------------------------------------
-/**
- * Adds running apps to the list.
- * @param   appsList    array to add to
- */
-void CTsDataList::CollectAppsL(RTsFswArray& appsList, 
-                               const TArray<RWsSession::TWindowGroupChainInfo> &wgList)
-{
-    TInt offset(KErrNotFound);
-    for (TInt i = 0; i < wgList.Count(); ++i) {
-        TTsEntryKey key = TsEntryKeyGeneraror::GenerateL(wgList[i].iId, wgList);
-        //skip this entry if it is already on list
-        if (FindEntry(appsList, key) >= 0) {
-            continue;
-        }
-
-        // get window group name
-        CApaWindowGroupName* windowName = CApaWindowGroupName::NewLC(mResources.WsSession(), key.WindowGroupId());
-        TUid appUid = windowName->AppUid();
-        
-        //Check hidden applications
-        if (KErrNotFound != (offset = mHiddenUids.Find(appUid))) {
-            UpdateLookupTableL(mHiddenUids, offset);
-        } else if (KErrNotFound != (offset = mAllowedUids.Find(appUid))) {
-            UpdateLookupTableL(mAllowedUids, offset);
-            AddEntryL(key, appUid, windowName, appsList);
-        } else if(VerifyApplicationL(appUid)) {
-            AddEntryL(key, appUid, windowName, appsList);
-        }
-        CleanupStack::PopAndDestroy(windowName);
-    }
-    CompressLookupTable(mHiddenUids);
-    CompressLookupTable(mAllowedUids);
-}
-
-// --------------------------------------------------------------------------
-/**
- * Called from CollectTasksL for each entry in the task list.
- * @param   key       entry key
- * @param   appUid     application uid
- * @param   wgName     window group name or NULL
- * @param   newList    list to add to
- */
-void CTsDataList::AddEntryL(const TTsEntryKey& key, const TUid& appUid,
-    CApaWindowGroupName* wgName, RTsFswArray& newList)
-{
-    CTsEntry* entry = CTsEntry::NewLC(key, &mObserver);
-
-    // check if present in old list and if yes then take some of the old data
-    TBool found = ConsiderOldDataL(key);
-
-    // if not present previously then find out app name
-    // and check if screenshot is already available
-    if (!found) {
-        entry->SetAppUid(appUid);
-        HBufC* name = FindAppNameLC(wgName, appUid, key.WindowGroupId());
-        if (name) {
-            entry->SetAppNameL(*name);
-        }
-        CleanupStack::PopAndDestroy(name);
-
-        if (wgName) {
-            entry->SetCloseableApp(!wgName->IsSystem());
-        }
-        CFbsBitmap* iconBitmap = NULL;
-        CFbsBitmap* iconMask = NULL;
-        GetAppIconL(appUid, iconBitmap, iconMask);
-        //transfer ownership to entry
-        entry->SetAppIcon(iconBitmap, iconMask);
-    }
-
-    // add to new list, ownership is transferred
-    newList.AppendL(entry);
-    CleanupStack::Pop(entry);
-}
-
-// --------------------------------------------------------------------------
-/**
- * Checks if there is an entry for same app in the content list.
- * If yes then it takes some of the data for the entry that
- * will correspond to the same app in the refreshed content list.
- * @param   key      new key in content list
- * @return  ETrue if app was found
- */
-TBool CTsDataList::ConsiderOldDataL(const TTsEntryKey& key)
-{
-    for (TInt entryIdx = 0, oldCount = mData.Count(); entryIdx < oldCount; ++entryIdx) {
-        if (mData[entryIdx]->Key() == key) {
-            return ETrue;
-        }
-    }
-    return EFalse;
-}
-
-// --------------------------------------------------------------------------
-/**
- * Finds out the application name.
- * @param   windowName window group name or NULL
- * @param   appUId     application uid
- * @param   wgId       window group id
- * @return  application name, ownership transferred to caller
- */
-HBufC* CTsDataList::FindAppNameLC(CApaWindowGroupName* windowName, const TUid& appUid, TInt wgId)
-{
-    //Retrieve the app name
-    TApaAppInfo info;
-    mResources.ApaSession().GetAppInfo(info, appUid);
-    TPtrC caption = info.iShortCaption;
-
-    HBufC* tempName = 0;
-    if (!caption.Length() && windowName) // if not set - use thread name instead
-    {
-        if (windowName->Caption().Length()) {
-            tempName = windowName->Caption().AllocL();
-            //put on cleanupstack after the if
-        }
-        else {
-            TThreadId threadId;
-            TInt err = mResources.WsSession().GetWindowGroupClientThreadId(wgId, threadId);
-            if (err == KErrNone) {
-                RThread thread;
-                CleanupClosePushL(thread);
-                err = thread.Open(threadId);
-                if (err == KErrNone) {
-                    tempName = thread.Name().AllocL(); // codescanner::forgottoputptroncleanupstack
-                    // tempName put on cleanupstack after the if
-                }
-                CleanupStack::PopAndDestroy(&thread);
-            }
-        }
-    }
-    else {
-        tempName = caption.AllocL();
-        //put on cleanupstack after the if
-    }
-    CleanupStack::PushL(tempName);
-    return tempName;
-}
-
-// --------------------------------------------------------------------------
-/**
- * Fit existing class contained data list into give one.
- * Data is being changed with application type consideration that is based 
- * on aConsiderWidgets param. 
- * Function removes or add entries into data depend on given list.
- * @param   listToFit          list with actual data  
- */
-void CTsDataList::FitDataToList(RTsFswArray& listToFit)
-{
-    TBool changed = EFalse;
-    TInt listCount = listToFit.Count();
-    TInt dataCount = mData.Count();
-
-    //remove items that dont't exists in newly collected list      
-    for (TInt i = dataCount - 1; i >= 0; --i) {
-        if (!CheckIfExists(*mData[i], listToFit)) {
-            delete mData[i];
-            mData.Remove(i);
-            changed = ETrue;
-        }
-    }
-    RArray<TTsEntryKey> allKeys;
-
-    //add new item at start
-    for (TInt i = listToFit.Count() - 1; i >= 0; --i) {
-        allKeys.Insert(listToFit[i]->Key(), 0);
-        if (!CheckIfExists(*listToFit[i], mData)) {
-            mData.Insert(listToFit[i], 0);
-            listToFit[i] = 0;
-            changed = ETrue;
-        }
-    }
-    //establish order
-    TBool orderChanged = EstablishOrder(allKeys);
-    if (changed || orderChanged) {
-        mObserver.DataChanged();
-    }
-    allKeys.Close();
-}
-
-// --------------------------------------------------------------------------
-/**
- * Checks if there is an entry for same app in the given list.
- * @param   entry      entry
- * @param   newList    ref to list
- * @return  ETrue if app was found
- */
-
-TBool CTsDataList::CheckIfExists(const CTsEntry& entry, const RTsFswArray& list) const
-{
-    TBool exists(EFalse);
-    TInt pos = FindEntry(list, entry.Key());
-    if (pos >= 0) {
-        exists = ETrue;
-    }
-    return exists;
-}
-
-// --------------------------------------------------------------------------
-/**
- * Retrieves the bitmap/mask for the icon of the given app.
- * @param   appUid application uid
- * @param   bitmapArg bitmap ptr, ownership transferred to caller, or NULL
- * @param   maskArg   mask ptr, ownership transferred to caller, or NULL
- */
-void CTsDataList::GetAppIconL(const TUid& aAppUid, CFbsBitmap*& bitmapArg, CFbsBitmap*& maskArg)
-{
-    bitmapArg = maskArg = NULL;
-
-    TSize size(KAppIconWidth, KAppIconHeight);
-    CApaMaskedBitmap* apaMaskedBitmap = CApaMaskedBitmap::NewLC();
-    TInt err = mResources.ApaSession().GetAppIcon(aAppUid, size, *apaMaskedBitmap);
-    TInt iconsCount(0);
-    if (err == KErrNone) {
-        err = mResources.ApaSession().NumberOfOwnDefinedIcons(aAppUid, iconsCount);
-    }
-
-    if ((err == KErrNone) && (iconsCount > 0)) {
-        bitmapArg = static_cast<CFbsBitmap*> (apaMaskedBitmap);
-        TInt maskHandle = apaMaskedBitmap->Mask()->Handle();
-        maskArg = new (ELeave) CFbsBitmap;
-        maskArg->Duplicate(maskHandle);
-        CleanupStack::Pop(apaMaskedBitmap);
-    }
-    else {
-        CleanupStack::PopAndDestroy(apaMaskedBitmap);
-        HBufC* fileNameFromApparc = NULL;
-        TInt err = mResources.ApaSession().GetAppIcon(aAppUid, fileNameFromApparc);
-        if (err == KErrNone) {
-            CleanupStack::PushL(fileNameFromApparc);
-            CFbsBitmap *bitamp(0);
-            CFbsBitmap *mask(0);
-            TInt bitmapIndex = 0;
-            TInt maskIndex = 1;
-            // it will change bitmap ids if it is mif (checking inside)
-            AknIconUtils::ValidateLogicalAppIconId(*fileNameFromApparc, bitmapIndex, maskIndex);
-            AknIconUtils::CreateIconLC(bitamp, mask, fileNameFromApparc->Des(), bitmapIndex,
-                maskIndex);
-
-            if (AknIconUtils::IsMifFile(*fileNameFromApparc)) {
-                AknIconUtils::DisableCompression(bitamp);
-                AknIconUtils::SetSize(bitamp, TSize(KAppIconWidth, KAppIconHeight),
-                    EAspectRatioPreservedAndUnusedSpaceRemoved);
-                // bitmap and icon, AknsUtils::CreateIconLC doesn't specify the order
-                CleanupStack::Pop(2);
-                bitmapArg = bitamp;
-                maskArg = mask;
-            }
-            else {
-                CleanupStack::PopAndDestroy(2);
-            }
-            CleanupStack::PopAndDestroy(fileNameFromApparc);
-        }
-    }
-}
-
-// --------------------------------------------------------------------------
-/**
- * Checks if given uid is on hidden list
- * @param   aUid uid to be checked
- * @return  ETrue if uid is on hidden list
- */
-TBool CTsDataList::IsHiddenUid(TUid uid)
-{
-    return mHiddenUids.Find(uid) >= 0 ? ETrue : EFalse;
-}
-
-// --------------------------------------------------------------------------
-/**
- * Finds entry in array
- * @param   list list to find
- * @param   key finding key
- * @return   position or KErrNotFound
- */
-TInt CTsDataList::FindEntry(const RTsFswArray& list, const TTsEntryKey& key) const
-{
-    TInt pos(KErrNotFound);
-    for (TInt entryIdx = 0; entryIdx < list.Count(); ++entryIdx) {
-        if (list[entryIdx]->Key() == key) {
-            pos = entryIdx;
-            break;
-        }
-    }
-    return pos;
-}
-// --------------------------------------------------------------------------
-/**
- * Set screenshot 
- */
-void CTsDataList::UpdateL(TInt key, const CFbsBitmap& data, TInt /*param*/, TInt priority)
-{
-    const TInt pos = FindEntry(mData, GenerateKeyL(key));
-    User::LeaveIfError(pos);
-    mData[pos]->SetScreenshotL(data, static_cast<UpdatePriority>(priority));
-}
-
-// --------------------------------------------------------------------------
-/**
- * Change visibility status 
- */
-void CTsDataList::UpdateL(TInt key, const Visibility& data, TInt /*param*/)
-{
-    const TInt pos = FindEntry(mData, GenerateKeyL(key));
-    User::LeaveIfError(pos);
-    data == mData[pos]->GetVisibility() ? User::Leave(KErrInUse) : 
-                                          mData[pos]->SetVisibility(data);
-    mObserver.DataChanged();
-}
-
-// --------------------------------------------------------------------------
-/**
- * Removes screenshot 
- */
-void CTsDataList::RemoveL(TInt key, TInt /*param*/)
-{
-    TInt pos = FindEntry(mData, GenerateKeyL(key));
-    User::LeaveIfError(pos);
-    mData[pos]->RemoveScreenshotL();
-}
-
-// --------------------------------------------------------------------------
-/**
- * Establish entry order accridung to aKeyList, all keys MUST be in iData
- * @param   keyList reference key list
- * @return   ETrue if changes occured
- */
-TBool CTsDataList::EstablishOrder(const RArray<TTsEntryKey>& keyList)
-{
-    TBool changed(EFalse);
-    __ASSERT_ALWAYS(mData.Count() == keyList.Count(), User::Panic(_L("EstablishOrder 1"), KErrBadHandle) );
-    for (TInt i = 0; i < keyList.Count(); i++) {
-        const TTsEntryKey& currentdataKey = mData[i]->Key();
-        const TTsEntryKey& referenceKey = keyList[i];
-        if (!(currentdataKey == referenceKey)) {
-            TInt foundPos = FindEntry(mData, referenceKey);
-            __ASSERT_ALWAYS(foundPos>=0, User::Panic(_L("EstablishOrder 2"), KErrBadHandle) );
-            CTsEntry* entry = mData[foundPos];
-            mData.Remove(foundPos);
-            mData.Insert(entry, i);
-            changed = ETrue;
-        }
-    }
-    return changed;
-}
-
-// --------------------------------------------------------------------------
-/**
- * Gets allowed uids, tries to filter non GUI application 
- */
-TBool CTsDataList::VerifyApplicationL(TUid uid)
-{
-    TBool retVal(EFalse);
-    TApaAppInfo appInfo;
-    TApaAppCapabilityBuf appCap;
-
-    User::LeaveIfError(mResources.ApaSession().GetAllApps(0));
-    // for every application get uid, hidden and missing attribute
-    // and add to aArray.
-    while (KErrNone == mResources.ApaSession().GetNextApp(appInfo)) {
-        User::LeaveIfError(mResources.ApaSession().GetAppCapability(appCap, appInfo.iUid));
-        if(!appCap().iAppIsHidden) {
-            if (uid == appInfo.iUid) {
-                retVal = ETrue;
-                mAllowedUids.InsertL(appInfo.iUid, mAllowedUids.Count());
-            }
-        } else if(KErrNotFound == mHiddenUids.Find(appInfo.iUid)) {
-            mHiddenUids.InsertL(appInfo.iUid, mHiddenUids.Count());
-        }
-    }
-    if (EFalse == retVal && KErrNotFound == mHiddenUids.Find(uid)) {
-        mHiddenUids.InsertL(uid, mHiddenUids.Count());
-    }
-    return retVal;
-}
-
-// --------------------------------------------------------------------------
-/**
- * Function generate task key using window group id
- * @param wgId - window group id of running application
- * @param entry key 
- */
-TTsEntryKey CTsDataList::GenerateKeyL(TInt wgId)
-{
-    RArray<RWsSession::TWindowGroupChainInfo> allWgIds;
-   CleanupClosePushL(allWgIds);
-   User::LeaveIfError(mResources.WsSession().WindowGroupList(0, &allWgIds));
-   const TTsEntryKey key(TsEntryKeyGeneraror::GenerateL(wgId, allWgIds.Array()));
-   CleanupStack::PopAndDestroy(&allWgIds);
-   return key;
-}
-
-// --------------------------------------------------------------------------
-/**
- * Analyse and compress lookup table id needed
- * @param array - lookup table that has to be checked
- * 
- */
-void CTsDataList::CompressLookupTable(RArray<TUid> &array)
-{
-    while(KMaxLookupSize < array.Count()) {
-        array.Remove(0);
-    }
-}
-
-// --------------------------------------------------------------------------
-/**
- * Change priority of an item in the lookup table
- * @param array - look up table
- * @param offset - index of an item in the table
- */
-void CTsDataList::UpdateLookupTableL(RArray<TUid> &array, TInt offset)
-{
-    const TUid uid(array[offset]);
-    array.Remove(offset);
-    array.InsertL(uid, array.Count());
-}
-// end of file
--- a/tstaskmonitor/server/src/tsdatatask.cpp	Tue Jun 29 10:20:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,79 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-#include <fbs.h>
-#include "tsdatatask.h"
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void TsDataTask::ExecuteL(MTsDataStorage& dataStorage, const RMessage2& msg)
-{
-    switch(msg.Function()) {
-    case RegisterScreenshotMessage:
-        TsDataTask::RegisterScreenshotL(dataStorage, msg);
-        break;
-    case UnregisterScreenshotMessage:
-        TsDataTask::UnregisterScreenshotL(dataStorage, msg);
-        break;
-    case VisibilityChange:
-        VisibilityChangeL(dataStorage, msg);
-        break;
-    }
-    
-    msg.Complete(KErrNone);
-}
-
-void TsDataTask::RegisterScreenshotL(MTsDataStorage& dataStorage, 
-                                           const RMessage2& msg)
-{
-    TPckgBuf<TInt> wgId, fbsHdl, param, priority;
-    
-    msg.ReadL(WindowsGroup, wgId);
-    msg.ReadL(ScreenshotHandle, fbsHdl);
-    msg.ReadL(AdditionalParameters, param);
-    msg.Read(Priority, priority);
-    
-    //convert and provide data
-    CFbsBitmap* bitmap = new(ELeave) CFbsBitmap();
-    CleanupStack::PushL(bitmap);
-    User::LeaveIfError(bitmap->Duplicate(fbsHdl()));
-    dataStorage.UpdateL(wgId(), *bitmap, param(), priority());
-    CleanupStack::PopAndDestroy(bitmap);
-}
-    
-void TsDataTask::UnregisterScreenshotL(MTsDataStorage& dataStorage, 
-                                       const RMessage2& msg)
-{
-    TPckgBuf<TInt> wgId, param;
-    
-    msg.ReadL(WindowsGroup, wgId);
-    msg.ReadL(AdditionalParameters, param);
-    
-    dataStorage.RemoveL(wgId(), param());
-}
-
-void TsDataTask::VisibilityChangeL(MTsDataStorage& dataStorage, 
-                                   const RMessage2& msg)
-{
-    TPckgBuf<TInt> wgId, visibility, param;
-    
-    msg.ReadL(0, wgId);
-    msg.ReadL(1, visibility);
-    
-    dataStorage.UpdateL(wgId(), static_cast<Visibility>(visibility()), 0);
-}
--- a/tstaskmonitor/server/src/tsrunningappstorage.cpp	Tue Jun 29 10:20:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,139 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-#include "tsrunningappstorage.h"
-#include "tsdatalist.h"
-#include "tsentry.h"
-#include <s32strm.h>
-#include <s32mem.h>
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-CRunningAppStorage::CRunningAppStorage(MHsDataObserver& observer)
-: mObserver(observer)
-{
-}
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-CRunningAppStorage::~CRunningAppStorage()
-{
-    mData.Close();
-    delete mEngine;
-}
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-CRunningAppStorage* CRunningAppStorage::NewL(MHsDataObserver& observer,
-                                             MTsResourceManager& resources,
-                                             MTsWindowGroupsMonitor &wsMonitor)
-{
-    CRunningAppStorage * self = new (ELeave)CRunningAppStorage(observer);
-    CleanupStack::PushL(self);
-    self->ConstructL(resources, wsMonitor);
-    CleanupStack::Pop(self);
-    return self;
-}
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CRunningAppStorage::ConstructL(MTsResourceManager& resources, 
-                                    MTsWindowGroupsMonitor &wsMonitor)
-{
-    mEngine = CTsDataList::NewL(resources, wsMonitor, *this) ;
-    RArray<RWsSession::TWindowGroupChainInfo> wgList;
-    CleanupClosePushL(wgList);
-    User::LeaveIfError(resources.WsSession().WindowGroupList(&wgList));
-    mEngine->HandleWindowGroupChanged(resources, wgList.Array());
-    CleanupStack::PopAndDestroy(&wgList);
-    DataChangedL();
-}
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-const TDesC8& CRunningAppStorage::Data() const
-{
-    return mData;
-}
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CRunningAppStorage::DataChanged() 
-{
-    TRAPD( err, DataChangedL() );
-    if ( err == KErrNone)
-    {
-        mObserver.DataChanged();
-    }
-}
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CRunningAppStorage::DataChangedL()
-{
-    const TInt KExpandSize = 256; // "Granularity" of dynamic buffer
-    CBufFlat* buf = CBufFlat::NewL(KExpandSize);
-    CleanupStack::PushL(buf);
-    RBufWriteStream stream(*buf); 
-    CleanupClosePushL(stream);
-    CTsEntry::ExternalizeArrayL(stream, mEngine->Data());
-    CleanupStack::PopAndDestroy(&stream);
-    mData.Close();
-    mData.CreateL( buf->Size() );
-    buf->Read(0, mData, buf->Size());
-    CleanupStack::PopAndDestroy(buf);
-}
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CRunningAppStorage::UpdateL(TInt key, const CFbsBitmap& data, TInt param, TInt priority)
-{
-    mEngine->UpdateL(key, data, param, priority);
-    
-}
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CRunningAppStorage::UpdateL(TInt key, const Visibility& data, TInt param)
-{
-    mEngine->UpdateL(key, data, param);
-}
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CRunningAppStorage::RemoveL(TInt key, TInt param)
-{
-    mEngine->RemoveL(key, param);
-}
--- a/tstaskmonitor/server/src/tsscreenshotprovider.cpp	Tue Jun 29 10:20:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,94 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-#include "tsscreenshotprovider.h"
-#include "tstaskmonitorglobals.h"
-#include <s32mem.h>
-
-const TUid KPluginUID = {0x200267AE};
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-CTsScreenshotProvider* CTsScreenshotProvider::NewL(MTsDataStorage& storage)
-{
-    CTsScreenshotProvider *self = new (ELeave)CTsScreenshotProvider(storage);
-    CleanupStack::PushL(self);
-    self->BaseConstructL(KPluginUID, KNullDesC8);
-    CleanupStack::Pop(self);
-    return self;
-}
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-CTsScreenshotProvider::CTsScreenshotProvider(MTsDataStorage& storage)
-:
-mStorage(storage)
-{}
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CTsScreenshotProvider::HandleMessage(const TDesC8& msg)
-{
-    TRAP_IGNORE(HandleMessageL(msg));
-}
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CTsScreenshotProvider::HandleMessageL(const TDesC8& msg)
-{
-    const TInt KMsgSize(5); 
-    TInt parsedMsg[KMsgSize];
-    
-    RDesReadStream msgStream(msg);
-    for (TInt iter(0); iter < KMsgSize; ++iter) {
-        parsedMsg[iter] = msgStream.ReadInt32L();
-    }
-    
-    if (RegisterScreenshotMessage == parsedMsg[0]) {
-        CFbsBitmap *bitmap = new CFbsBitmap;
-        TInt errNo(KErrNoMemory);
-        if (0 != bitmap) {
-            CleanupStack::PushL(bitmap);
-            errNo = bitmap->Duplicate(parsedMsg[ScreenshotHandle + 1]);
-        }
-        const TPckgC<TInt[sizeof(parsedMsg) / sizeof(TInt)]> buf(parsedMsg);//ACK bitmap duplication
-        SendMessage(msg);
-        User::LeaveIfError(errNo);
-        
-        mStorage.UpdateL(parsedMsg[WindowsGroup +1 ], 
-                         *bitmap, 
-                         parsedMsg[AdditionalParameters + 1], 
-                         parsedMsg[Priority + 1]);
-       
-        CleanupStack::PopAndDestroy(bitmap);
-    }
-}
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CTsScreenshotProvider::OnReplace()
-{
-    //no implementation required
-}
--- a/tstaskmonitor/server/tsrc/tsrc.pro	Tue Jun 29 10:20:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,22 +0,0 @@
-#
-# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description: 
-#
-
-TEMPLATE = subdirs
-CONFIG += ordered
-
-SUBDIRS +=  testapp
-SUBDIRS +=  t_tsrunningappstorage
-           
--- a/tstaskmonitor/sis/stubs/createstubs.bat	Tue Jun 29 10:20:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,17 +0,0 @@
-@rem
-@rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-@rem All rights reserved.
-@rem This component and the accompanying materials are made available
-@rem under the terms of "Eclipse Public License v1.0"
-@rem which accompanies this distribution, and is available
-@rem at the URL "http://www.eclipse.org/legal/epl-v10.html".
-@rem
-@rem Initial Contributors:
-@rem Nokia Corporation - initial contribution.
-@rem
-@rem Contributors:
-@rem
-@rem Description: 
-@rem
-
-for %%f in (*.pkg) do makesis -s %%f
--- a/tstaskmonitor/sis/stubs/taskmonitor_stub.pkg	Tue Jun 29 10:20:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,39 +0,0 @@
-;
-; Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-; All rights reserved.
-; This component and the accompanying materials are made available
-; under the terms of "Eclipse Public License v1.0"
-; which accompanies this distribution, and is available
-; at the URL "http://www.eclipse.org/legal/epl-v10.html".
-;
-; Initial Contributors:
-; Nokia Corporation - initial contribution.
-;
-; Contributors:
-;
-; Description: 
-;
-; ------------------------------------------------------------------------------
-; Taskswitcher stub SIS package file.
-; Used to enable Taskswitcher to be updated from ROM with a SIS package.
-; When you add new files into this stub, please remember to update
-; SIS stub with "makesis -s" command.
-; ------------------------------------------------------------------------------
-;
-;Language - standard language definitions
-&EN
-
-; standard SIS file header
-#{"taskmonitor"},(0x200267B0),1,0,0,TYPE=SA
-
-;Localized Vendor Name
-%{"Nokia"}
-
-;Unique Vendor name
-:"Nokia"
-
-"" - "Z:\sys\bin\tstaskmonitorclient.dll"
-"" - "Z:\sys\bin\hsrunningappmonitor.exe"
-"" - "Z:\sys\bin\tsscreenshotplugin.dll"
-"" - "Z:\resource\plugins\tsscreenshotplugin.rsc"
-"" - "Z:\sys\bin\tsbackstepping.dll"
\ No newline at end of file
Binary file tstaskmonitor/sis/stubs/taskmonitor_stub.sis has changed
--- a/tstaskmonitor/sis/taskmonitor.pkg	Tue Jun 29 10:20:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,34 +0,0 @@
-;
-; Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-; All rights reserved.
-; This component and the accompanying materials are made available
-; under the terms of "Eclipse Public License v1.0"
-; which accompanies this distribution, and is available
-; at the URL "http://www.eclipse.org/legal/epl-v10.html".
-;
-; Initial Contributors:
-; Nokia Corporation - initial contribution.
-;
-; Contributors:
-;
-; Description: 
-;
-
-;Language - standard language definitions
-&EN
-
-; standard SIS file header
-#{"taskmonitor"},(0x200267B0),1,0,0,TYPE=SA, RU
-
-;Localized Vendor Name
-%{"Nokia"}
-
-;Unique Vendor name
-:"Nokia"
-
-
-"/epoc32/release/armv5/urel/hsrunningappmonitor.exe" - "!:\sys\bin\hsrunningappmonitor.exe"
-"/epoc32/release/armv5/urel/tstaskmonitorclient.dll"-"!:\sys\bin\tstaskmonitorclient.dll"
-"/epoc32/release/armv5/urel/tsscreenshotplugin.dll"-"!:\sys\bin\tsscreenshotplugin.dll"
-"/epoc32/data/z/resource/plugins/tsscreenshotplugin.rsc"-"!:\resource\plugins\tsscreenshotplugin.rsc"
-"/epoc32/release/armv5/urel/tsbackstepping.dll"-"!:\sys\bin\tsbackstepping.dll"
--- a/tstaskmonitor/tstaskmonitor.pro	Tue Jun 29 10:20:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,30 +0,0 @@
-#
-# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description: 
-#
-
-TEMPLATE = subdirs
-
-CONFIG += ordered
-SUBDIRS += client
-symbian {
-    SUBDIRS += backstepping \
-               server \
-               screenshotplugin
-               
-    BLD_INF_RULES.prj_exports +=    "inc\tstaskmonitorglobals.h"
-    
-}
-
-symbian:include(rom.pri)
\ No newline at end of file
--- a/tstaskmonitor/utils/inc/tsdataobserver.h	Tue Jun 29 10:20:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,42 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-#ifndef DATAOBSERVER_H
-#define DATAOBSERVER_H
-
-#include <e32base.h>
-
-class MHsDataObserver {
-public:
-    virtual void DataChanged() =0;
-};
-
-class CHsDataObserver: public CBase,
-                       public MHsDataObserver
-{
-public:
-    virtual void Cancel(const RMessage2& reason) =0;
-};
-
-class MHsDataObserverStorage
-{
-public:
-    virtual void PushL(CHsDataObserver*) =0;
-    virtual void Pop(CHsDataObserver*) =0;
-    virtual void Cancel(const RMessage2& reason) =0;
-};
-
-#endif //DATAOBSERVER_H
--- a/tstaskmonitor/utils/inc/tsentry.h	Tue Jun 29 10:20:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,126 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Task list entry
- *
-*/
-
-
-#ifndef TSENTRY_H
-#define TSENTRY_H
-
-#include <e32base.h>
-#include <e32cmn.h>
-#include <tsgraphicfilescalinghandler.h>
-
-#include "tsentrykey.h"
-#include "tstaskmonitorglobals.h"
-
-class CTsEntry;
-class RReadStream;
-class RWriteStream;
-class CFbsBitmap;
-class MHsDataObserver;
-
-typedef RPointerArray<CTsEntry> RTsFswArray;
-
-enum TAppType
-{
-    EApp = 0,
-    EWidget,
-    EJava
-};
-
-/**
- * An entry in the task list.
- */
-NONSHARABLE_CLASS( CTsEntry ) : public CBase,
-                                private MImageReadyCallBack
-    {
-public:
-    static CTsEntry* NewL();
-
-    static CTsEntry* NewLC();
-
-    static CTsEntry* NewL(const TTsEntryKey& key, MHsDataObserver* observer =0);
-
-    static CTsEntry* NewLC(const TTsEntryKey& key, MHsDataObserver* observer =0);
-
-    ~CTsEntry();
-
-    TUid AppUid() const;
-
-    TAppType Type() const;
-
-    const TDesC& AppName() const;
-
-    TBool CloseableApp() const;
-
-    Visibility GetVisibility() const;
-    
-    void SetVisibility(Visibility visibility);
-
-    CFbsBitmap* AppIconBitmap() const;
-
-    CFbsBitmap* AppIconMask() const;
-
-    CFbsBitmap* Screenshot() const;
-
-    UpdatePriority Priority() const;
-
-    const TTsEntryKey& Key() const;
-
-    void SetAppUid( const TUid& uid );
-
-    void SetAppNameL( const TDesC& appName );
-
-    void SetCloseableApp( TBool value );
-
-    void SetScreenshotL(const CFbsBitmap& bitmap, UpdatePriority priority);
-
-    void RemoveScreenshotL();
-
-    void SetAppIcon( CFbsBitmap* aBitmap, CFbsBitmap* aMask );
-
-    void ExternalizeL( RWriteStream& aStream ) const;
-
-    void InternalizeL( RReadStream& aStream );
-
-    static void ExternalizeArrayL( RWriteStream& stream,
-        const RTsFswArray& array );
-
-    static void InternalizeArrayL( RReadStream& stream,
-        RTsFswArray& array );
-
-private:
-    CTsEntry();
-
-    CTsEntry(const TTsEntryKey& aKey, MHsDataObserver* observer);
-
-    void ImageReadyCallBack(TInt error, const CFbsBitmap *bitmap );
-
-private:
-    TUid mAppUid;
-    HBufC* mAppName;
-    TBool mCloseableApp;
-    Visibility mVisibility;
-    CFbsBitmap* mAppIconBitmap;
-    CFbsBitmap* mAppIconMask;
-    CFbsBitmap* mScreenshot;
-    TTsEntryKey mKey;
-    UpdatePriority mPriority;
-    MHsDataObserver* mObserver;
-    CTsGraphicFileScalingHandler* mImgTool;
-    };
-
-#endif
--- a/tstaskmonitor/utils/inc/tsentrykey.h	Tue Jun 29 10:20:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,39 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Task list entry
- *
-*/
-
-
-#ifndef TSENTRYKEY_H
-#define TSENTRYKEY_H
-
-#include <e32base.h>
-class RReadStream;
-class RWriteStream;
-
-class TTsEntryKey
-{
-public:
-    TTsEntryKey(TInt parentId =0);
-    TBool operator ==(const TTsEntryKey& key) const;
-    void ExternalizeL(RWriteStream& output) const;
-    void InternalizeL(RReadStream& input);
-    TInt WindowGroupId() const;
-
-private:
-    TInt mParentId;
-};
-
-#endif //TSENTRYKEY_H
--- a/tstaskmonitor/utils/inc/tsentrykeygenerator.h	Tue Jun 29 10:20:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,36 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Task list entry
- *
-*/
-
-
-#ifndef TSENTRYKEYGENERATOR_H
-#define TSENTRYKEYGENERATOR_H
-
-#include <e32base.h>
-#include <e32cmn.h>
-#include <w32std.h>
-
-#include "tsentrykey.h"
-
-
-class TsEntryKeyGeneraror
-{
-public:
-    static TTsEntryKey GenerateL(TInt windowGroupId, 
-                                 const TArray<RWsSession::TWindowGroupChainInfo>& groupChain);
-};
-
-#endif //TSENTRYKEYGENERATOR_H
--- a/tstaskmonitor/utils/inc/tsutils.h	Tue Jun 29 10:20:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,29 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-namespace TaskSwitcher {
-    template <class T>
-    void RPointerArrayCleanupMethod(TAny *aPtr)
-    {
-        static_cast< RPointerArray<T>* >(aPtr)->ResetAndDestroy();
-    }
-
-    template <class T>
-    void CleanupResetAndDestroyPushL(RPointerArray<T> &array) {
-        CleanupStack::PushL(TCleanupItem(&RPointerArrayCleanupMethod<T>, &array));            
-    }
-}
\ No newline at end of file
--- a/tstaskmonitor/utils/src/tsentry.cpp	Tue Jun 29 10:20:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,409 +0,0 @@
-/*
- * Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
- * All rights reserved.
- * This component and the accompanying materials are made available
- * under the terms of "Eclipse Public License v1.0"
- * which accompanies this distribution, and is available
- * at the URL "http://www.eclipse.org/legal/epl-v10.html".
- *
- * Initial Contributors:
- * Nokia Corporation - initial contribution.
- *
- * Contributors:
- *
- * Description:  Task list entry
- *
- */
-
-#define __E32SVR_H__
-#include <s32strm.h>
-#include <fbs.h>
-#include "tsentry.h"
-#include "tsdataobserver.h"
-
-
-// --------------------------------------------------------------------------
-// CTsFswEntry::NewL
-// --------------------------------------------------------------------------
-//
-CTsEntry* CTsEntry::NewL()
-{
-    CTsEntry* self = NewLC();
-    CleanupStack::Pop(self);
-    return self;
-}
-
-// --------------------------------------------------------------------------
-// CTsFswEntry::NewLC
-// --------------------------------------------------------------------------
-//
-CTsEntry* CTsEntry::NewLC()
-{
-    CTsEntry* self = new (ELeave) CTsEntry;
-    CleanupStack::PushL(self);
-    return self;
-}
-
-// --------------------------------------------------------------------------
-// CTsFswEntry::NewL
-// --------------------------------------------------------------------------
-//
-CTsEntry* CTsEntry::NewL(const TTsEntryKey& key, MHsDataObserver *observer)
-{
-    CTsEntry* self = NewLC(key, observer);
-    CleanupStack::Pop(self);
-    return self;
-}
-
-// --------------------------------------------------------------------------
-// CTsFswEntry::NewLC
-// --------------------------------------------------------------------------
-//
-CTsEntry* CTsEntry::NewLC(const TTsEntryKey& key, MHsDataObserver* observer)
-{
-    CTsEntry* self = new (ELeave) CTsEntry(key, observer);
-    CleanupStack::PushL(self);
-    return self;
-}
-
-// --------------------------------------------------------------------------
-// CTsFswEntry::~CTsFswEntry
-// --------------------------------------------------------------------------
-//
-CTsEntry::~CTsEntry()
-{
-    delete mAppName;
-    delete mAppIconBitmap;
-    delete mAppIconMask;
-    delete mScreenshot;
-    delete mImgTool;
-}
-
-// --------------------------------------------------------------------------
-// CTsFswEntry::CTsFswEntry
-// --------------------------------------------------------------------------
-//
-CTsEntry::CTsEntry() :
-    mVisibility(Visible),
-    mPriority(Low)
-{
-    mKey = TTsEntryKey();
-}
-
-// --------------------------------------------------------------------------
-// CTsFswEntry::CTsFswEntry
-// --------------------------------------------------------------------------
-//
-CTsEntry::CTsEntry(const TTsEntryKey& key, MHsDataObserver *observer) 
-:
-    mVisibility(Visible),
-    mKey(key), 
-    mPriority(Low), 
-    mObserver(observer)
-{
-}
-
-// --------------------------------------------------------------------------
-// CTsFswEntry::SetAppUid
-// --------------------------------------------------------------------------
-//
-void CTsEntry::SetAppUid(const TUid& uid)
-{
-    mAppUid = uid;
-}
-
-// --------------------------------------------------------------------------
-// CTsFswEntry::SetAppNameL
-// --------------------------------------------------------------------------
-//
-void CTsEntry::SetAppNameL(const TDesC& appName)
-{
-    delete mAppName;
-    mAppName = 0;
-    mAppName = appName.AllocL();
-}
-
-// --------------------------------------------------------------------------
-// CTsFswEntry::SetSystemApp
-// --------------------------------------------------------------------------
-//
-void CTsEntry::SetCloseableApp(TBool value)
-{
-    mCloseableApp = value;
-}
-
-// --------------------------------------------------------------------------
-// CTsFswEntry::SetAppIconHandles
-// --------------------------------------------------------------------------
-//
-void CTsEntry::SetAppIcon(CFbsBitmap* bitmap, CFbsBitmap* mask)
-{
-    mAppIconBitmap = bitmap;
-    mAppIconMask = mask;
-}
-
-// --------------------------------------------------------------------------
-/**
- * Application uid.
- */
-TUid CTsEntry::AppUid() const
-{
-    return mAppUid;
-}
-
-// --------------------------------------------------------------------------
-/**
- * Application name.
- */
-const TDesC& CTsEntry::AppName() const
-{
-    return mAppName ? *mAppName : KNullDesC();
-}
-
-// --------------------------------------------------------------------------
-/**
- * Retrieve entry visibilit status
- */
-Visibility CTsEntry::GetVisibility() const
-{
-    return mVisibility;
-}
-
-// --------------------------------------------------------------------------
-/**
- * Change entry visibility status
- * @param visibility - new visibility status
- */
-void CTsEntry::SetVisibility(Visibility visibility)
-{
-    mVisibility = visibility;
-}
-
-// --------------------------------------------------------------------------
-/**
- * ETrue if the application is closeable
- */
-TBool CTsEntry::CloseableApp() const
-{
-    return mCloseableApp;
-}
-
-// --------------------------------------------------------------------------
-/**
- * Application icon bitmap
- */
-CFbsBitmap* CTsEntry::AppIconBitmap() const
-{
-    return mAppIconBitmap;
-}
-
-// --------------------------------------------------------------------------
-/**
- * Application icon mask.
- */
-CFbsBitmap* CTsEntry::AppIconMask() const
-{
-    return mAppIconMask;
-}
-
-// --------------------------------------------------------------------------
-/**
- * Entry's key
- */
-const TTsEntryKey& CTsEntry::Key() const
-{
-    return mKey;
-}
-// --------------------------------------------------------------------------
-// CTsFswEntry::ExternalizeL
-// --------------------------------------------------------------------------
-//
-void CTsEntry::ExternalizeL(RWriteStream& stream) const
-{
-    stream.WriteInt32L(mAppUid.iUid);
-    stream << AppName();
-    stream.WriteInt32L(mCloseableApp);
-    if (mAppIconBitmap) {
-        stream.WriteInt32L(mAppIconBitmap->Handle());
-    }
-    else {
-        stream.WriteInt32L(KErrNotFound);
-    }
-
-    if (mAppIconMask) {
-        stream.WriteInt32L(mAppIconMask->Handle());
-    }
-    else {
-        stream.WriteInt32L(KErrNotFound);
-    }
-
-    if (mScreenshot) {
-        stream.WriteInt32L(mScreenshot->Handle());
-    }
-    else {
-        stream.WriteInt32L(KErrNotFound);
-    }
-
-    mKey.ExternalizeL(stream);
-    TInt currentPriority = static_cast<TInt> (mPriority);
-    stream.WriteInt32L(currentPriority);
-}
-
-// --------------------------------------------------------------------------
-// CTsFswEntry::InternalizeL
-// --------------------------------------------------------------------------
-//
-void CTsEntry::InternalizeL(RReadStream& stream)
-{
-    
-    mAppUid = TUid::Uid(stream.ReadInt32L());
-    delete mAppName;
-    mAppName = NULL;
-    mAppName = HBufC::NewL(stream, KMaxTInt);
-    mCloseableApp = stream.ReadInt32L();
-    TInt appIconBitmapHandle = stream.ReadInt32L();
-    TInt appIconMaskHandle = stream.ReadInt32L();
-    TInt screenshotHandle = stream.ReadInt32L();
-    if (appIconBitmapHandle != KErrNotFound) {
-        mAppIconBitmap = new (ELeave) CFbsBitmap;
-        mAppIconBitmap->Duplicate(appIconBitmapHandle);
-    }
-    if (appIconMaskHandle != KErrNotFound) {
-        mAppIconMask = new (ELeave) CFbsBitmap;
-        mAppIconMask->Duplicate(appIconMaskHandle);
-    }
-    if (screenshotHandle != KErrNotFound) {
-        mScreenshot = new (ELeave) CFbsBitmap;
-        mScreenshot->Duplicate(screenshotHandle);
-    }
-    mKey.InternalizeL(stream);
-    TInt currentPriority = stream.ReadInt32L();
-    mPriority = static_cast<UpdatePriority> (currentPriority);
-}
-
-// --------------------------------------------------------------------------
-// CTsFswEntry::ExternalizeArrayL
-// --------------------------------------------------------------------------
-//
-void CTsEntry::ExternalizeArrayL(RWriteStream& stream, const RTsFswArray& array)
-{
-    TInt iter(0);
-    RArray<TInt> visibleItems(array.Count() ? array.Count() : 1);
-    CleanupClosePushL(visibleItems);
-    for (iter = 0; iter < array.Count(); ++iter) {
-        if (Visible == array[iter]->GetVisibility()) {
-            visibleItems.AppendL(iter);
-        }
-    }
-    stream.WriteInt32L(visibleItems.Count());
-    for (iter = 0; iter < visibleItems.Count(); ++iter) {
-        array[visibleItems[iter]]->ExternalizeL(stream);
-    }
-    CleanupStack::PopAndDestroy(&visibleItems);
-}
-
-// --------------------------------------------------------------------------
-// CTsFswEntry::InternalizeArrayL
-// --------------------------------------------------------------------------
-//
-void CTsEntry::InternalizeArrayL(RReadStream& stream, RTsFswArray& array)
-{
-    array.ResetAndDestroy();
-    TInt count = stream.ReadInt32L();
-    for (TInt i = 0; i < count; ++i) {
-        CTsEntry* entry = CTsEntry::NewLC();
-        entry->InternalizeL(stream);
-        array.AppendL(entry);
-        CleanupStack::Pop(entry);
-    }
-}
-
-// --------------------------------------------------------------------------
-/**
- * Application type.
- */
-TAppType CTsEntry::Type() const
-{
-    return EApp;
-}
-
-// --------------------------------------------------------------------------
-// CTsFswEntry::SetScreenshot
-// --------------------------------------------------------------------------
-//
-void CTsEntry::SetScreenshotL(const CFbsBitmap& bitmapArg, UpdatePriority priority)
-{
-    TInt currentPriority = static_cast<TInt> (mPriority);
-    TInt newPriority = static_cast<TInt> (priority);
-    if(newPriority <currentPriority) {
-        User::Leave(KErrAccessDenied);
-    }
-    
-    CFbsBitmap* bitmap = new (ELeave) CFbsBitmap;
-    CleanupStack::PushL(bitmap);
-    User::LeaveIfError(bitmap->Duplicate(bitmapArg.Handle()));
-    CleanupStack::Pop(bitmap);
-
-    mPriority = priority;
-    delete mScreenshot;
-    mScreenshot = bitmap;
-
-    delete mImgTool;
-    mImgTool = 0;
-
-    mImgTool = CTsGraphicFileScalingHandler::NewL(*this, *mScreenshot, TSize(128, 128),
-    CTsGraphicFileScalingHandler::EKeepAspectRatioByExpanding);
-}
-
-// --------------------------------------------------------------------------
-// CTsFswEntry::RemoveScreenshot
-// --------------------------------------------------------------------------
-//
-void CTsEntry::RemoveScreenshotL()
-{
-    if (!mScreenshot) {
-        User::Leave(KErrNotFound);
-    }
-    delete mScreenshot;
-    mScreenshot = NULL;
-    mPriority = Low;
-    if (mObserver) {
-        mObserver->DataChanged();
-    }
-}
-
-// --------------------------------------------------------------------------
-/**
- * Application screenshot.
- */
-CFbsBitmap* CTsEntry::Screenshot() const
-{
-    return mScreenshot;
-}
-
-// --------------------------------------------------------------------------
-/**
- * Priority.
- */
-UpdatePriority CTsEntry::Priority() const
-{
-    return mPriority;
-}
-
-// --------------------------------------------------------------------------
-// CTsFswEntry::Priority
-// --------------------------------------------------------------------------
-//
-void CTsEntry::ImageReadyCallBack(TInt error, const CFbsBitmap *bitmap)
-{
-    if (KErrNone == error && 0 != bitmap) {
-        mScreenshot->Reset();
-        mScreenshot->Duplicate(bitmap->Handle());
-
-        if (mObserver) {
-            mObserver->DataChanged();
-        }
-    }
-}
-
-// end of file
--- a/tstaskmonitor/utils/src/tsentrykey.cpp	Tue Jun 29 10:20:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,65 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Task list entry
- *
-*/
-
-
-#include "tsentrykey.h"
-#include <s32strm.h>
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-TTsEntryKey::TTsEntryKey(TInt parentId)
-:
-    mParentId(parentId)
-{}
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-TBool TTsEntryKey::operator ==(const TTsEntryKey& key) const
-{
-    return (mParentId == key.mParentId);
-}
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void TTsEntryKey::ExternalizeL(RWriteStream& output) const
-{
-    output.WriteInt32L(mParentId);
-}
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void TTsEntryKey::InternalizeL(RReadStream& input)
-{
-    mParentId = input.ReadInt32L();
-}
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-TInt TTsEntryKey::WindowGroupId() const
-{
-    return mParentId;
-}
--- a/tstaskmonitor/utils/src/tsentrykeygenerator.cpp	Tue Jun 29 10:20:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,37 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Task list entry
- *
-*/
-#include "tsentrykeygenerator.h"
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-TTsEntryKey TsEntryKeyGeneraror::GenerateL(TInt windowGroupId, 
-                                           const TArray<RWsSession::TWindowGroupChainInfo>& groupChain) 
-{
-    for (TInt iter(0); iter < groupChain.Count(); ++iter) {
-        if (groupChain[iter].iId == windowGroupId) {
-            return 0 >= groupChain[iter].iParentId ?
-                   TTsEntryKey(windowGroupId) :
-                   TsEntryKeyGeneraror::GenerateL(groupChain[iter].iParentId, groupChain);
-        }
-    }
-    User::Leave(KErrNotFound);
-    // for avoid compile error
-    return TTsEntryKey(); 
-}
-