# HG changeset patch # User hgs # Date 1284373593 -10800 # Node ID 305818acdca4dc976a695b19c87abff3c65da580 # Parent dbfb5e38438bd271a22268ba858cbec8d9905a51 201036 diff -r dbfb5e38438b -r 305818acdca4 activityfw/activityfw.pro --- a/activityfw/activityfw.pro Wed Aug 18 10:39:24 2010 +0300 +++ b/activityfw/activityfw.pro Mon Sep 13 13:26:33 2010 +0300 @@ -18,8 +18,6 @@ CONFIG += ordered -SUBDIRS += tsutils - symbian:SUBDIRS += storage \ afactivitylauncher \ @@ -28,7 +26,6 @@ tests { SUBDIRS += activityserviceplugin/tsrc \ - tsutils/tsrc \ } symbian:SUBDIRS += activityserviceplugin/symbianinstaller diff -r dbfb5e38438b -r 305818acdca4 activityfw/activityserviceplugin/inc/afmanager.h --- a/activityfw/activityserviceplugin/inc/afmanager.h Wed Aug 18 10:39:24 2010 +0300 +++ b/activityfw/activityserviceplugin/inc/afmanager.h Mon Sep 13 13:26:33 2010 +0300 @@ -35,7 +35,7 @@ ~AfManager(); public slots: - QList activitiesList(); + QList activitiesList(int limit = 0); void launchActivity(const QString &uri); void launchActivity(const QUrl &uri); void launchActivity(int applicationId, const QString &activityId, const QVariantHash& parameters = QVariantHash()); diff -r dbfb5e38438b -r 305818acdca4 activityfw/activityserviceplugin/inc/afstorageproxy.h --- a/activityfw/activityserviceplugin/inc/afstorageproxy.h Wed Aug 18 10:39:24 2010 +0300 +++ b/activityfw/activityserviceplugin/inc/afstorageproxy.h Mon Sep 13 13:26:33 2010 +0300 @@ -33,12 +33,12 @@ virtual ~AfStorageProxy(); public: - bool addActivity(int applicationId, const QString &activityId, const QVariant &activityData, const QVariantHash &metadata, const QPixmap &screenshot); - bool updateActivity(int applicationId, const QString &activityId, const QVariant &activityData, const QVariantHash &metadata, const QPixmap &screenshot); - bool saveActivity(int applicationId, const QString &activityId, const QVariant &activityData, const QVariantHash &metadata, const QPixmap &screenshot); + bool addActivity(int applicationId, const QString &activityId, const QString &customActivityName, const QVariant &activityData, const QVariantHash &metadata, const QPixmap &screenshot); + bool updateActivity(int applicationId, const QString &activityId, const QString &customActivityName, const QVariant &activityData, const QVariantHash &metadata, const QPixmap &screenshot); + bool saveActivity(int applicationId, const QString &activityId, const QString &customActivityName, const QVariant &activityData, const QVariantHash &metadata, const QPixmap &screenshot); bool removeActivity(int applicationId, const QString &activityId); bool removeApplicationActivities(int applicationId); - bool activities(QList &list); + bool activities(QList &list, int limit = 0); bool applicationActivities(QStringList &list, int applicationId); bool activityData(QVariant &data, int applicationId, const QString &activityId); bool activityMetaData(QVariantHash &metadata, int applicationId, const QString &activityId); diff -r dbfb5e38438b -r 305818acdca4 activityfw/activityserviceplugin/s60/inc/afstorageproxy_p.h --- a/activityfw/activityserviceplugin/s60/inc/afstorageproxy_p.h Wed Aug 18 10:39:24 2010 +0300 +++ b/activityfw/activityserviceplugin/s60/inc/afstorageproxy_p.h Mon Sep 13 13:26:33 2010 +0300 @@ -18,11 +18,13 @@ #ifndef AFSTORAGEPROXY_P_H #define AFSTORAGEPROXY_P_H -#include "afasyncrequestobserver.h" +#include #include #include +#include "afasyncrequestobserver.h" + class CAfStorageClient; class CAfEntry; class AfStorageProxy; @@ -34,12 +36,12 @@ ~AfStorageProxyPrivate(); public: - bool addActivity(int applicationId, const QString &activityId, const QVariant &activityData, const QVariantHash &metadata, const QPixmap &screenshot); - bool updateActivity(int applicationId, const QString &activityId, const QVariant &activityData, const QVariantHash &metadata, const QPixmap &screenshot); - bool saveActivity(int applicationId, const QString &activityId, const QVariant &activityData, const QVariantHash &metadata, const QPixmap &screenshot); + bool addActivity(int applicationId, const QString &activityId, const QString &customActivityName, const QVariant &activityData, const QVariantHash &metadata, const QPixmap &screenshot); + bool updateActivity(int applicationId, const QString &activityId, const QString &customActivityName, const QVariant &activityData, const QVariantHash &metadata, const QPixmap &screenshot); + bool saveActivity(int applicationId, const QString &activityId, const QString &customActivityName, const QVariant &activityData, const QVariantHash &metadata, const QPixmap &screenshot); bool removeActivity(int applicationId, const QString &activityId); bool removeApplicationActivities(int applicationId); - bool activities(QList &list); + bool activities(QList &list, int limit = 0); bool applicationActivities(QStringList &list, int applicationId); bool activityData(QVariant &data, int applicationId, const QString &activityId); bool activityMetaData(QVariantHash &metadata, int applicationId, const QString &activityId); @@ -55,13 +57,16 @@ private: CAfEntry *createFilterEntry(int applicationId = 0, const QString &activityId = QString()); - CAfEntry *createSaveEntry(int applicationId, const QString &activityId, const QVariant &activityData, const QVariantHash &metadata); + CAfEntry *createSaveEntry(int applicationId, const QString &activityId, const QString &customActivityName, const QVariant &activityData, const QVariantHash &metadata); CAfEntry *getEntry(int applicationId, const QString &activityId); - QVariantHash extractMetadata(CAfEntry *entry); + QVariantHash extractMetadata(CAfEntry *entry, bool includePublicData); + QString activityDisplayText(CAfEntry *entry); private: CAfStorageClient *mClient; AfStorageProxy *q_ptr; + RApaLsSession mAppArcSession; + }; #endif //AFSTORAGEPROXY_P_H diff -r dbfb5e38438b -r 305818acdca4 activityfw/activityserviceplugin/s60/src/afstorageproxy_p.cpp --- a/activityfw/activityserviceplugin/s60/src/afstorageproxy_p.cpp Wed Aug 18 10:39:24 2010 +0300 +++ b/activityfw/activityserviceplugin/s60/src/afstorageproxy_p.cpp Mon Sep 13 13:26:33 2010 +0300 @@ -33,15 +33,19 @@ AfStorageProxyPrivate::AfStorageProxyPrivate(AfStorageProxy *q) : mClient(0), q_ptr(q) { - QT_TRAP_THROWING(mClient = CAfStorageClient::NewL(*this)); + QT_TRAP_THROWING( + mClient = CAfStorageClient::NewL(*this); + User::LeaveIfError(mAppArcSession.Connect()); + ); } AfStorageProxyPrivate::~AfStorageProxyPrivate() { delete mClient; + mAppArcSession.Close(); } -bool AfStorageProxyPrivate::addActivity(int applicationId, const QString &activityId, const QVariant &activityData, const QVariantHash &metadata, const QPixmap &screenshot) +bool AfStorageProxyPrivate::addActivity(int applicationId, const QString &activityId, const QString &customActivityName, const QVariant &activityData, const QVariantHash &metadata, const QPixmap &screenshot) { int screenshotHandle(-1); CFbsBitmap* bitmap(screenshot.toSymbianCFbsBitmap()); @@ -49,7 +53,7 @@ screenshotHandle = bitmap->Handle(); } - CAfEntry *entry = createSaveEntry(applicationId, activityId, activityData, metadata); + CAfEntry *entry = createSaveEntry(applicationId, activityId, customActivityName, activityData, metadata); int result = mClient->addActivity(*entry, screenshotHandle); delete entry; delete bitmap; @@ -57,7 +61,7 @@ return KErrNone == result; } -bool AfStorageProxyPrivate::updateActivity(int applicationId, const QString &activityId, const QVariant &activityData, const QVariantHash &metadata, const QPixmap &screenshot) +bool AfStorageProxyPrivate::updateActivity(int applicationId, const QString &activityId, const QString &customActivityName, const QVariant &activityData, const QVariantHash &metadata, const QPixmap &screenshot) { int screenshotHandle(-1); CFbsBitmap* bitmap(screenshot.toSymbianCFbsBitmap()); @@ -65,7 +69,7 @@ screenshotHandle = bitmap->Handle(); } - CAfEntry *entry = createSaveEntry(applicationId, activityId, activityData, metadata); + CAfEntry *entry = createSaveEntry(applicationId, activityId, customActivityName, activityData, metadata); int result = mClient->updateActivity(*entry, screenshotHandle); delete entry; delete bitmap; @@ -73,7 +77,7 @@ return KErrNone == result; } -bool AfStorageProxyPrivate::saveActivity(int applicationId, const QString &activityId, const QVariant &activityData, const QVariantHash &metadata, const QPixmap &screenshot) +bool AfStorageProxyPrivate::saveActivity(int applicationId, const QString &activityId, const QString &customActivityName, const QVariant &activityData, const QVariantHash &metadata, const QPixmap &screenshot) { int screenshotHandle(-1); CFbsBitmap* bitmap(screenshot.toSymbianCFbsBitmap()); @@ -81,7 +85,7 @@ screenshotHandle = bitmap->Handle(); } - CAfEntry *entry = createSaveEntry(applicationId, activityId, activityData, metadata); + CAfEntry *entry = createSaveEntry(applicationId, activityId, customActivityName, activityData, metadata); int result = mClient->saveActivity(*entry, screenshotHandle); delete entry; delete bitmap; @@ -105,14 +109,14 @@ return KErrNone == result; } -bool AfStorageProxyPrivate::activities(QList &list) +bool AfStorageProxyPrivate::activities(QList &list, int limit) { RPointerArray results; - int result = mClient->activities(results); + int result = mClient->activities(results, limit); list.clear(); for (int i=0; i < results.Count(); ++i) { - list.append(extractMetadata(results[i])); + list.append(extractMetadata(results[i], false)); } results.ResetAndDestroy(); @@ -156,7 +160,7 @@ CAfEntry *entry = getEntry(applicationId, activityId); if (entry) { - metadata = extractMetadata(entry); + metadata = extractMetadata(entry, true); delete entry; return true; } @@ -225,11 +229,11 @@ CAfEntry *AfStorageProxyPrivate::createFilterEntry(int applicationId, const QString &activityId) { CAfEntry *entry(0); - QT_TRAP_THROWING(entry = CAfEntry::NewL(0, applicationId, TPtrC(static_cast(activityId.utf16())), KNullDesC(), KNullDesC8(), KNullDesC8())); + QT_TRAP_THROWING(entry = CAfEntry::NewL(0, applicationId, TPtrC(static_cast(activityId.utf16())), KNullDesC(), KNullDesC(), KNullDesC8(), KNullDesC8())); return entry; } -CAfEntry *AfStorageProxyPrivate::createSaveEntry(int applicationId, const QString &activityId, const QVariant &activityData, const QVariantHash &metadata) +CAfEntry *AfStorageProxyPrivate::createSaveEntry(int applicationId, const QString &activityId, const QString &customActivityName, const QVariant &activityData, const QVariantHash &metadata) { CAfEntry *entry(0); @@ -254,12 +258,18 @@ HBufC *actBuff = XQConversions::qStringToS60Desc(activityId); CleanupStack::PushL(actBuff); + + HBufC *customNameBuff = XQConversions::qStringToS60Desc(customActivityName); + CleanupStack::PushL(customNameBuff); + entry = CAfEntry::NewL(flags, applicationId, *actBuff, + *customNameBuff, KNullDesC, privateBuff, publicBuff); + CleanupStack::PopAndDestroy(customNameBuff); CleanupStack::PopAndDestroy(actBuff); CleanupStack::PopAndDestroy(&publicBuff); CleanupStack::PopAndDestroy(&privateBuff); @@ -282,15 +292,28 @@ return resultEntry; } -QVariantHash AfStorageProxyPrivate::extractMetadata(CAfEntry *entry) +QVariantHash AfStorageProxyPrivate::extractMetadata(CAfEntry *entry, bool includePublicData) { QVariantHash metadata; - metadata << entry->Data(CAfEntry::Public); + if (includePublicData) { + metadata << entry->Data(CAfEntry::Public); + } metadata.insert(ActivityApplicationKeyword, entry->ApplicationId()); metadata.insert(ActivityActivityKeyword, XQConversions::s60DescToQString(entry->ActivityId())); + metadata.insert(ActivityApplicationName, activityDisplayText(entry)); metadata.insert(ActivityScreenshotKeyword, XQConversions::s60DescToQString(entry->ImageSrc())); metadata.insert(ActivityPersistence, (entry->Flags() & CAfEntry::Persistent) ? true : false); metadata.insert(ActivityVisibility, (entry->Flags() & CAfEntry::Invisible) ? false : true); return metadata; } +QString AfStorageProxyPrivate::activityDisplayText(CAfEntry *entry) +{ + if (entry->CustomActivityName().Compare(KNullDesC()) == 0) { + TApaAppInfo info; + mAppArcSession.GetAppInfo(info, TUid::Uid(entry->ApplicationId())); + return QString::fromUtf16(info.iShortCaption.Ptr(), info.iShortCaption.Length()); + } else { + return XQConversions::s60DescToQString(entry->CustomActivityName()); + } +} diff -r dbfb5e38438b -r 305818acdca4 activityfw/activityserviceplugin/src/afactivitystorage_p.cpp --- a/activityfw/activityserviceplugin/src/afactivitystorage_p.cpp Wed Aug 18 10:39:24 2010 +0300 +++ b/activityfw/activityserviceplugin/src/afactivitystorage_p.cpp Mon Sep 13 13:26:33 2010 +0300 @@ -35,7 +35,7 @@ publicData.insert(ActivityApplicationKeyword, applicationId()); publicData.insert(ActivityActivityKeyword, activityId); - return mConnection->saveActivity(applicationId(), activityId, activityData, publicData, screenshot); + return mConnection->saveActivity(applicationId(), activityId, publicData[ActivityApplicationName].toString(), activityData, publicData, screenshot); } bool AfActivityStoragePrivate::removeActivity(const QString &activityId) diff -r dbfb5e38438b -r 305818acdca4 activityfw/activityserviceplugin/src/afmanager.cpp --- a/activityfw/activityserviceplugin/src/afmanager.cpp Wed Aug 18 10:39:24 2010 +0300 +++ b/activityfw/activityserviceplugin/src/afmanager.cpp Mon Sep 13 13:26:33 2010 +0300 @@ -45,10 +45,10 @@ { } -QList AfManager::activitiesList() +QList AfManager::activitiesList(int limit) { QList results; - mServiceProvider->activities(results); + mServiceProvider->activities(results, limit); return results; } diff -r dbfb5e38438b -r 305818acdca4 activityfw/activityserviceplugin/src/afstorageproxy.cpp --- a/activityfw/activityserviceplugin/src/afstorageproxy.cpp Wed Aug 18 10:39:24 2010 +0300 +++ b/activityfw/activityserviceplugin/src/afstorageproxy.cpp Mon Sep 13 13:26:33 2010 +0300 @@ -27,19 +27,19 @@ delete d_ptr; } -bool AfStorageProxy::addActivity(int applicationId, const QString &activityId, const QVariant &activityData, const QVariantHash &metadata, const QPixmap &screenshot) +bool AfStorageProxy::addActivity(int applicationId, const QString &activityId, const QString &customActivityName, const QVariant &activityData, const QVariantHash &metadata, const QPixmap &screenshot) { - return d_ptr->addActivity(applicationId, activityId, activityData, metadata, screenshot); + return d_ptr->addActivity(applicationId, activityId, customActivityName, activityData, metadata, screenshot); } -bool AfStorageProxy::updateActivity(int applicationId, const QString &activityId, const QVariant &activityData, const QVariantHash &metadata, const QPixmap &screenshot) +bool AfStorageProxy::updateActivity(int applicationId, const QString &activityId, const QString &customActivityName, const QVariant &activityData, const QVariantHash &metadata, const QPixmap &screenshot) { - return d_ptr->updateActivity(applicationId, activityId, activityData, metadata, screenshot); + return d_ptr->updateActivity(applicationId, activityId, customActivityName, activityData, metadata, screenshot); } -bool AfStorageProxy::saveActivity(int applicationId, const QString &activityId, const QVariant &activityData, const QVariantHash &metadata, const QPixmap &screenshot) +bool AfStorageProxy::saveActivity(int applicationId, const QString &activityId, const QString &customActivityName, const QVariant &activityData, const QVariantHash &metadata, const QPixmap &screenshot) { - return d_ptr->saveActivity(applicationId, activityId, activityData, metadata, screenshot); + return d_ptr->saveActivity(applicationId, activityId, customActivityName, activityData, metadata, screenshot); } bool AfStorageProxy::removeActivity(int applicationId, const QString &activityId) @@ -52,9 +52,9 @@ return d_ptr->removeApplicationActivities(applicationId); } -bool AfStorageProxy::activities(QList &list) +bool AfStorageProxy::activities(QList &list, int limit) { - return d_ptr->activities(list); + return d_ptr->activities(list, limit); } bool AfStorageProxy::applicationActivities(QStringList &list, int applicationId) diff -r dbfb5e38438b -r 305818acdca4 activityfw/rom/activitymanager_core.iby --- a/activityfw/rom/activitymanager_core.iby Wed Aug 18 10:39:24 2010 +0300 +++ b/activityfw/rom/activitymanager_core.iby Mon Sep 13 13:26:33 2010 +0300 @@ -23,7 +23,6 @@ file=ABI_DIR\BUILD_DIR\hsactivitydbserver.exe PROGRAMS_DIR\hsactivitydbserver.exe file=ABI_DIR\BUILD_DIR\afstorageclient.dll SHARED_LIB_DIR\afstorageclient.dll -file=ABI_DIR\BUILD_DIR\tsutils.dll SHARED_LIB_DIR\tsutils.dll file=ABI_DIR\BUILD_DIR\afactivitylauncher.dll SHARED_LIB_DIR\afactivitylauncher.dll file=ABI_DIR\BUILD_DIR\hbactivityplugin.dll SHARED_LIB_DIR\hbactivityplugin.dll diff -r dbfb5e38438b -r 305818acdca4 activityfw/sis/activitymanager.pkg --- a/activityfw/sis/activitymanager.pkg Wed Aug 18 10:39:24 2010 +0300 +++ b/activityfw/sis/activitymanager.pkg Mon Sep 13 13:26:33 2010 +0300 @@ -32,7 +32,6 @@ "/epoc32/release/armv5/urel/hsactivitydbserver.exe" - "!:\sys\bin\hsactivitydbserver.exe" "/epoc32/release/armv5/urel/afstorageclient.dll" - "!:\sys\bin\afstorageclient.dll" -"/epoc32/release/armv5/urel/tsutils.dll" - "!:\sys\bin\tsutils.dll" "/epoc32/release/armv5/urel/afactivitylauncher.dll" - "!:\sys\bin\afactivitylauncher.dll" "/epoc32/release/armv5/urel/hbactivityplugin.dll" - "!:\sys\bin\hbactivityplugin.dll" diff -r dbfb5e38438b -r 305818acdca4 activityfw/sis/stubs/activitymanager_stub.pkg --- a/activityfw/sis/stubs/activitymanager_stub.pkg Wed Aug 18 10:39:24 2010 +0300 +++ b/activityfw/sis/stubs/activitymanager_stub.pkg Mon Sep 13 13:26:33 2010 +0300 @@ -38,7 +38,6 @@ "" - "Z:\sys\bin\hsactivitydbserver.exe" "" - "Z:\sys\bin\afstorageclient.dll" -"" - "Z:\sys\bin\tsutils.dll" "" - "Z:\sys\bin\afactivitylauncher.dll" "" - "Z:\sys\bin\hbactivityplugin.dll" diff -r dbfb5e38438b -r 305818acdca4 activityfw/sis/stubs/activitymanager_stub.sis Binary file activityfw/sis/stubs/activitymanager_stub.sis has changed diff -r dbfb5e38438b -r 305818acdca4 activityfw/storage/client/bwins/afstorageclientu.def --- a/activityfw/storage/client/bwins/afstorageclientu.def Wed Aug 18 10:39:24 2010 +0300 +++ b/activityfw/storage/client/bwins/afstorageclientu.def Mon Sep 13 13:26:33 2010 +0300 @@ -12,6 +12,7 @@ ?getThumbnail@CAfStorageClient@@QAEHABVTSize@@ABVTDesC16@@PAX@Z @ 11 NONAME ; int CAfStorageClient::getThumbnail(class TSize const &, class TDesC16 const &, void *) ?removeActivity@CAfStorageClient@@QAEHABVCAfEntry@@@Z @ 12 NONAME ; int CAfStorageClient::removeActivity(class CAfEntry const &) ?removeApplicationActivities@CAfStorageClient@@QAEHABVCAfEntry@@@Z @ 13 NONAME ; int CAfStorageClient::removeApplicationActivities(class CAfEntry const &) - ?activities@CAfStorageClient@@QAEHAAV?$RPointerArray@VCAfEntry@@@@@Z @ 14 NONAME ; int CAfStorageClient::activities(class RPointerArray &) + ?activities@CAfStorageClient@@QAEHAAV?$RPointerArray@VCAfEntry@@@@@Z @ 14 NONAME ABSENT ; int CAfStorageClient::activities(class RPointerArray &) ?activityData@CAfStorageClient@@QAEHAAPAVCAfEntry@@ABV2@@Z @ 15 NONAME ; int CAfStorageClient::activityData(class CAfEntry * &, class CAfEntry const &) + ?activities@CAfStorageClient@@QAEHAAV?$RPointerArray@VCAfEntry@@@@H@Z @ 16 NONAME ; int CAfStorageClient::activities(class RPointerArray &, int) diff -r dbfb5e38438b -r 305818acdca4 activityfw/storage/client/eabi/afstorageclientu.def --- a/activityfw/storage/client/eabi/afstorageclientu.def Wed Aug 18 10:39:24 2010 +0300 +++ b/activityfw/storage/client/eabi/afstorageclientu.def Mon Sep 13 13:26:33 2010 +0300 @@ -1,5 +1,5 @@ EXPORTS - _ZN16CAfStorageClient10activitiesER13RPointerArrayI8CAfEntryE @ 1 NONAME + _ZN16CAfStorageClient10activitiesER13RPointerArrayI8CAfEntryE @ 1 NONAME ABSENT _ZN16CAfStorageClient11addActivityERK8CAfEntryi @ 2 NONAME _ZN16CAfStorageClient12activityDataERP8CAfEntryRKS0_ @ 3 NONAME _ZN16CAfStorageClient12getThumbnailERK5TSizeRK7TDesC16Pv @ 4 NONAME @@ -26,4 +26,5 @@ _ZTV26CAfThumbnailRequestPrivate @ 25 NONAME _ZTV30RAfStorageClientImplementation @ 26 NONAME _ZTV8CAfEntry @ 27 NONAME + _ZN16CAfStorageClient10activitiesER13RPointerArrayI8CAfEntryEi @ 28 NONAME diff -r dbfb5e38438b -r 305818acdca4 activityfw/storage/client/inc/afstorageclient.h --- a/activityfw/storage/client/inc/afstorageclient.h Wed Aug 18 10:39:24 2010 +0300 +++ b/activityfw/storage/client/inc/afstorageclient.h Mon Sep 13 13:26:33 2010 +0300 @@ -40,7 +40,7 @@ IMPORT_C int saveActivity(const CAfEntry &entry, TInt imageHandle); IMPORT_C int removeActivity(const CAfEntry &entry); IMPORT_C int removeApplicationActivities(const CAfEntry &entry); - IMPORT_C int activities(RPointerArray &dst); + IMPORT_C int activities(RPointerArray &dst, TInt limit = 0); IMPORT_C int applicationActivities(RPointerArray &dst, const CAfEntry &entry); IMPORT_C int activityData(CAfEntry *&dst, const CAfEntry &entry); IMPORT_C int waitActivity(); diff -r dbfb5e38438b -r 305818acdca4 activityfw/storage/client/inc/afstorageclient_p.h --- a/activityfw/storage/client/inc/afstorageclient_p.h Wed Aug 18 10:39:24 2010 +0300 +++ b/activityfw/storage/client/inc/afstorageclient_p.h Mon Sep 13 13:26:33 2010 +0300 @@ -41,7 +41,7 @@ int saveActivity(const CAfEntry &entry, TInt imageHandle); int removeActivity(const CAfEntry &templateEntry); int removeApplicationActivities(const CAfEntry &templateEntry); - int activities(RPointerArray &dst); + int activities(RPointerArray &dst, TInt limit = 0); int applicationActivities(RPointerArray &dst, const CAfEntry &entry); int activityData(CAfEntry *&resultEntry, const CAfEntry &templateEntry); int waitActivity(); @@ -51,7 +51,7 @@ private: int execute(int function, const CAfEntry &sourceEntry, TInt imageHandle); - int execute(int function, RPointerArray &resultsList,const CAfEntry &templateEntry); + int execute(int function, RPointerArray &resultsList,const CAfEntry &templateEntry, int limit = 0); private: RAfStorageClientImplementation mImplementation; diff -r dbfb5e38438b -r 305818acdca4 activityfw/storage/client/inc/afstorageclientimp.h --- a/activityfw/storage/client/inc/afstorageclientimp.h Wed Aug 18 10:39:24 2010 +0300 +++ b/activityfw/storage/client/inc/afstorageclientimp.h Mon Sep 13 13:26:33 2010 +0300 @@ -39,7 +39,8 @@ void executeL(int function, RPointerArray &resultsList, - const CAfEntry& templateEntry); + const CAfEntry& templateEntry, + TInt limit); void getThumbnailL(TSize size, const TDesC& source, diff -r dbfb5e38438b -r 305818acdca4 activityfw/storage/client/src/afstorageclient.cpp --- a/activityfw/storage/client/src/afstorageclient.cpp Wed Aug 18 10:39:24 2010 +0300 +++ b/activityfw/storage/client/src/afstorageclient.cpp Mon Sep 13 13:26:33 2010 +0300 @@ -138,9 +138,9 @@ * @param dst - list of results * @return 0 on success, error code otherwise */ -EXPORT_C int CAfStorageClient::activities(RPointerArray &dst) +EXPORT_C int CAfStorageClient::activities(RPointerArray &dst, TInt limit) { - return d_ptr->activities(dst); + return d_ptr->activities(dst, limit); } // ----------------------------------------------------------------------------- diff -r dbfb5e38438b -r 305818acdca4 activityfw/storage/client/src/afstorageclient_p.cpp --- a/activityfw/storage/client/src/afstorageclient_p.cpp Wed Aug 18 10:39:24 2010 +0300 +++ b/activityfw/storage/client/src/afstorageclient_p.cpp Mon Sep 13 13:26:33 2010 +0300 @@ -129,10 +129,10 @@ * Function implementation * @see AfStorageClient::activities(RPointerArray &) */ -int CAfStorageClientPrivate::activities(RPointerArray &results) +int CAfStorageClientPrivate::activities(RPointerArray &results, TInt limit) { CAfEntry *entry = CAfEntry::NewL(); - TInt result = execute(Activities, results, *entry); + TInt result = execute(Activities, results, *entry, limit); delete entry; return result; } @@ -243,8 +243,8 @@ /** * Function execute activity framework functinality and return results */ -int CAfStorageClientPrivate::execute(int function, RPointerArray& resultsList,const CAfEntry& templateEntry) +int CAfStorageClientPrivate::execute(int function, RPointerArray& resultsList,const CAfEntry& templateEntry, int limit) { - TRAPD(errNo, mImplementation.executeL(function, resultsList, templateEntry);) + TRAPD(errNo, mImplementation.executeL(function, resultsList, templateEntry, limit);) return errNo; } diff -r dbfb5e38438b -r 305818acdca4 activityfw/storage/client/src/afstorageclientimp.cpp --- a/activityfw/storage/client/src/afstorageclientimp.cpp Wed Aug 18 10:39:24 2010 +0300 +++ b/activityfw/storage/client/src/afstorageclientimp.cpp Mon Sep 13 13:26:33 2010 +0300 @@ -133,7 +133,7 @@ } // ----------------------------------------------------------------------------- -void RAfStorageClientImplementation::executeL(int function, RPointerArray &resultsList, const CAfEntry& templateEntry) +void RAfStorageClientImplementation::executeL(int function, RPointerArray &resultsList, const CAfEntry& templateEntry, TInt limit) { resultsList.ResetAndDestroy(); RBuf8 buffer; @@ -145,7 +145,7 @@ CleanupStack::PopAndDestroy(&writer); TPckgBuf length(0), taskId(0); User::LeaveIfError(SendReceive(function, - TIpcArgs(&buffer, &length, &taskId))); + TIpcArgs(&buffer, &length, &taskId, limit))); CAfEntry::ReallocL(buffer, length()); User::LeaveIfError(SendReceive(GetData, TIpcArgs(&taskId, &buffer))); resultsList << buffer; diff -r dbfb5e38438b -r 305818acdca4 activityfw/storage/common/inc/afentry.h --- a/activityfw/storage/common/inc/afentry.h Wed Aug 18 10:39:24 2010 +0300 +++ b/activityfw/storage/common/inc/afentry.h Mon Sep 13 13:26:33 2010 +0300 @@ -49,6 +49,7 @@ static CAfEntry* NewL(TInt flags, TInt applicationId, const TDesC &activityId, + const TDesC &customActivityName, const TDesC &imgSrc, const TDesC8 &privateData, const TDesC8 &publicData); @@ -56,6 +57,7 @@ static CAfEntry* NewLC(TInt flags, TInt applicationId, const TDesC &activityId, + const TDesC &customActivityName, const TDesC &imgSrc, const TDesC8 &privateData, const TDesC8 &publicData); @@ -82,6 +84,8 @@ TInt ApplicationId() const; const TDesC& ActivityId() const; + + const TDesC& CustomActivityName() const; const TDesC& ImageSrc() const; @@ -105,6 +109,7 @@ void ConstructL(TInt flags, TInt applicationId, const TDesC &activityId, + const TDesC &customActivityName, const TDesC &imgSrc, const TDesC8 &privateData, const TDesC8 &publicData); @@ -120,6 +125,7 @@ TInt mFlags; TInt mAppId; RBuf mActivityId; + RBuf mCustomActivityName; RBuf mImgSrc; RBuf8 mPrivateData; RBuf8 mPublicData; diff -r dbfb5e38438b -r 305818acdca4 activityfw/storage/common/src/afentry.cpp --- a/activityfw/storage/common/src/afentry.cpp Wed Aug 18 10:39:24 2010 +0300 +++ b/activityfw/storage/common/src/afentry.cpp Mon Sep 13 13:26:33 2010 +0300 @@ -55,6 +55,7 @@ CAfEntry* CAfEntry::NewL(TInt flags, TInt applicationId, const TDesC &activityId, + const TDesC &customActivityName, const TDesC &imgSrc, const TDesC8 &privateData, const TDesC8 &publicData) @@ -62,6 +63,7 @@ CAfEntry* self = CAfEntry::NewLC(flags, applicationId, activityId, + customActivityName, imgSrc, privateData, publicData); @@ -83,6 +85,7 @@ CAfEntry* CAfEntry::NewLC(TInt flags, TInt applicationId, const TDesC &activityId, + const TDesC &customActivityName, const TDesC &imgSrc, const TDesC8 &privateData, const TDesC8 &publicData) @@ -91,6 +94,7 @@ self->ConstructL(flags, applicationId, activityId, + customActivityName, imgSrc, privateData, publicData); @@ -133,6 +137,7 @@ void CAfEntry::ConstructL(TInt flags, TInt applicationId, const TDesC &activityId, + const TDesC &customActivityName, const TDesC &imgSrc, const TDesC8 &privateData, const TDesC8 &publicData) @@ -140,6 +145,7 @@ mFlags = flags; mAppId = applicationId; CopyL(mActivityId, activityId); + CopyL(mCustomActivityName, customActivityName); CopyL(mImgSrc, imgSrc); CopyL(mPrivateData, privateData); CopyL(mPublicData, publicData); @@ -152,6 +158,7 @@ CAfEntry::~CAfEntry() { mActivityId.Close(); + mCustomActivityName.Close(); mPrivateData.Close(); mPublicData.Close(); mImgSrc.Close(); @@ -164,8 +171,9 @@ */ TInt CAfEntry::Size() const { - return (sizeof(TInt) * 3) + //flags + appId + actId size info + return (sizeof(TInt) * 4) + //flags + appId + actId size info + customActivityName size info mActivityId.Size() + //actId content size + mCustomActivityName.Size() + // customActivityName content size DataSize(); //data size } @@ -192,6 +200,7 @@ stream.WriteInt32L(mFlags); stream.WriteInt32L(mAppId); ExternalizeL(stream, mActivityId); + ExternalizeL(stream, mCustomActivityName); ExternalizeDataOnlyL(stream); } @@ -205,6 +214,7 @@ mFlags = stream.ReadInt32L(); mAppId = stream.ReadInt32L(); InternalizeL(mActivityId, stream); + InternalizeL(mCustomActivityName, stream); InternalizeDataOnlyL(stream); } @@ -266,6 +276,16 @@ // ----------------------------------------------------------------------------- /** + * Provide access to activity custom name. + * @return activity custom name + */ +const TDesC& CAfEntry::CustomActivityName() const +{ + return mCustomActivityName; +} + +// ----------------------------------------------------------------------------- +/** * Provide access to activity data. * @param rights - type of requested data * @return activity data diff -r dbfb5e38438b -r 305818acdca4 activityfw/storage/server/group/server.mmp --- a/activityfw/storage/server/group/server.mmp Wed Aug 18 10:39:24 2010 +0300 +++ b/activityfw/storage/server/group/server.mmp Mon Sep 13 13:26:33 2010 +0300 @@ -51,7 +51,7 @@ LIBRARY hash.lib LIBRARY bitmaptransforms.lib LIBRARY imageconversion.lib -LIBRARY tsutils.lib +STATICLIBRARY tsimageutils.lib STATICLIBRARY afstoragecommon.lib CAPABILITY ALL -TCB diff -r dbfb5e38438b -r 305818acdca4 activityfw/storage/server/inc/afqueries.h --- a/activityfw/storage/server/inc/afqueries.h Wed Aug 18 10:39:24 2010 +0300 +++ b/activityfw/storage/server/inc/afqueries.h Mon Sep 13 13:26:33 2010 +0300 @@ -21,7 +21,7 @@ #include _LIT( KSelectRow, "SELECT * FROM Activities WHERE ApplicationId=%S AND ActivityName='%S'"); -_LIT( KSelectRows, "SELECT * FROM Activities"); +_LIT( KSelectRows, "SELECT * FROM Activities ORDER BY Timestamp DESC"); _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"); @@ -29,7 +29,9 @@ _LIT(KApplicationColumnName, "ApplicationId"); _LIT(KActivityColumnName, "ActivityName"); +_LIT(KCustomNameColumnName, "CustomName"); _LIT(KFlagsColumnName, "Flags"); +_LIT(KTimestampColumnName, "Timestamp"); _LIT(KDataColumnName, "Data"); _LIT(KActivityTableName, "Activities"); diff -r dbfb5e38438b -r 305818acdca4 activityfw/storage/server/inc/afstorage.h --- a/activityfw/storage/server/inc/afstorage.h Wed Aug 18 10:39:24 2010 +0300 +++ b/activityfw/storage/server/inc/afstorage.h Mon Sep 13 13:26:33 2010 +0300 @@ -32,94 +32,103 @@ public: ~CAfStorage(); - static CAfStorage* NewL(RFs& session); + static CAfStorage* NewL(RFs& aSession); + + void AddActivityL(CAfEntry &aEntry); - void AddActivityL(CAfEntry &entry); - - void UpdateActivityL(CAfEntry &entry); - - void SaveActivityL(CAfEntry &entry); + void UpdateActivityL(CAfEntry &aEntry); + + void SaveActivityL(CAfEntry &aEntry); - void DeleteActivityL(CAfEntry &entry); + void DeleteActivityL(CAfEntry &aEntry); - void DeleteActivitiesL(CAfEntry &entry); + void DeleteActivitiesL(CAfEntry &aEntry); - void ActivitiesL(RPointerArray &dst); + void AllActivitiesL(RPointerArray &aDst, TInt aLimit); - void ActivitiesL(RPointerArray &dst, TInt appId); + void ActivitiesL(RPointerArray &aDst, TInt aAppId); - void ActivityL(RPointerArray &dst, CAfEntry &src); + void ActivityL(RPointerArray &aDst, CAfEntry &aSrc); RFs& Fs(); - static void ThumbnailPathL(RBuf &dst, - RFs& fileSystem, - TInt uid, - const TDesC &activityName, - TBool persistent); + static void ThumbnailPathL(RBuf &aDst, + RFs& aFileSystem, + TInt aUid, + const TDesC &aActivityName, + TBool aPersistent); - static void StoragePathL(RBuf &dst, - RFs& fileSystem, - TBool persistent); - static void AppStoragePathL(RBuf &dst, - RFs& fileSystem, - TInt uid, - TBool persistent); + static void StoragePathL(RBuf &aDst, + RFs& aFileSystem, + TBool aPersistent); + + static void AppStoragePathL(RBuf &aDst, + RFs& aFileSystem, + TInt aUid, + TBool aPersistent); private: - static HBufC8* Md5HexDigestL(const TDesC8 &string); + static HBufC8* Md5HexDigestL(const TDesC8 &aString); private: - CAfStorage(RFs& session); + CAfStorage(RFs& aSession); void ConstructL(); - void CreateDbL(const TDesC& databaseFile); + void CreateDbL(const TDesC& aDatabaseFile); + + void OpenDbL(const TDesC& aDatabaseFile); - void OpenDbL(const TDesC& databaseFile); + void VerifyDbL(); + + CDbColSet* ExpectedTableLC(); void CreateTableL(); + void VerifyTableL(); + void DeleteNonPersistentActivitiesL(); - void GetActivitiesL(const TDesC& dst); + void GetActivitiesL(const TDesC& aDst); - HBufC* SelectRowLC(TInt appId, const TDesC& actId) const; + HBufC* SelectRowLC(TInt aAppId, const TDesC& aActId) const; - HBufC* SelectRowsLC(TInt appId) const; + HBufC* SelectRowsLC(TInt aAppId) const; - HBufC* DeleteRowLC(TInt appId, const TDesC& actId) const; + HBufC* DeleteRowLC(TInt aAppId, const TDesC& aActId) const; - HBufC* DeleteRowsLC(TInt appId) const; + HBufC* DeleteRowsLC(TInt aAppId) const; - HBufC* BuildQueryLC(const TDesC& format, TInt appId, const TDesC& actId) const; + HBufC* BuildQueryLC(const TDesC& aFormat, TInt aAppId, const TDesC& aActId) const; - void ActivitiesL(RPointerArray& dst, - const TDesC& query, - CAfEntry::AccessRights rights, - TInt limit = 0); + void ActivitiesL(RPointerArray& aDst, + const TDesC& aQuery, + CAfEntry::AccessRights aRights, + TInt aLimit = 0, + TBool deserializeAllData = EFalse); - void ActivitiesL(RPointerArray& dst, - RDbView& query, - CAfEntry::AccessRights rights, - TInt limit = 0); + void ActivitiesL(RPointerArray& aDst, + RDbView& aQuery, + CAfEntry::AccessRights aRights, + TInt aLimit = 0, + TBool deserializeAllData = EFalse); - void GetActivityForUpdateL(RDbView& query, TInt appId, const TDesC& actId); + void GetActivityForUpdateL(RDbView& aQuery, TInt aAppId, const TDesC& aActId); - void ReadDataL(RBuf& dst, RDbRowSet& src, TInt offset) const; + void ReadDataL(RBuf& aDst, RDbRowSet& aSrc, TInt aOffset) const; - void ExternalizeDataL(RDbRowSet &dst,const CAfEntry & src, TInt offset) const; + void ExternalizeDataL(RDbRowSet &aDst,const CAfEntry & aSrc, TInt aOffset) const; - void InternalizeDataL(CAfEntry &dst, RDbRowSet& src, TInt offset) const; + void InternalizeDataL(CAfEntry &aDst, RDbRowSet& aSrc, TInt aOffset) const; public: TBool InterruptCleanup(); void RequestCleanup(); private: - RFs& mFsSession; - RDbStoreDatabase mActDb;/* For database operations */ - CFileStore* mFileStore; /* For creating and opening database files */ - CAfDatabaseCleaner *mDatabaseCleaner; + RFs& iFsSession; + RDbStoreDatabase iActDb;/** For database operations*/ + CFileStore* iFileStore; /** For creating and opening database files */ + CAfDatabaseCleaner *iDatabaseCleaner; }; #endif //AFSTORAGE_H diff -r dbfb5e38438b -r 305818acdca4 activityfw/storage/server/src/afapplicationsstorage.cpp --- a/activityfw/storage/server/src/afapplicationsstorage.cpp Wed Aug 18 10:39:24 2010 +0300 +++ b/activityfw/storage/server/src/afapplicationsstorage.cpp Mon Sep 13 13:26:33 2010 +0300 @@ -53,9 +53,9 @@ static_cast(appId.iUid), KNullDesC, KNullDesC, + KNullDesC, KNullDesC8, KNullDesC8)); mStorage.DeleteActivitiesL(*entry); CleanupStack::PopAndDestroy(entry); } - diff -r dbfb5e38438b -r 305818acdca4 activityfw/storage/server/src/afstorage.cpp --- a/activityfw/storage/server/src/afstorage.cpp Wed Aug 18 10:39:24 2010 +0300 +++ b/activityfw/storage/server/src/afstorage.cpp Mon Sep 13 13:26:33 2010 +0300 @@ -39,21 +39,21 @@ */ CAfStorage::CAfStorage(RFs& session) : -mFsSession(session) -{ +iFsSession(session) + { // No implementation required -} + } // ----------------------------------------------------------------------------- /** * Destructor. */ CAfStorage::~CAfStorage() -{ - delete mDatabaseCleaner; - mActDb.Close(); - delete mFileStore; -} + { + delete iDatabaseCleaner; + iActDb.Close(); + delete iFileStore; + } // ----------------------------------------------------------------------------- /** @@ -61,35 +61,35 @@ * @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 )); + User::LeaveIfError(iFsSession.PrivatePath(path )); path.Append(KDbName); path.Insert(0, KDbDrive); - BaflUtils::EnsurePathExistsL(mFsSession, path); - BaflUtils::FileExists(mFsSession, path) ? OpenDbL(path) : CreateDbL(path); + BaflUtils::EnsurePathExistsL(iFsSession, path); + BaflUtils::FileExists(iFsSession, path) ? OpenDbL(path) : CreateDbL(path); CleanupStack::PopAndDestroy(&path); - - mDatabaseCleaner = new (ELeave) CAfDatabaseCleaner(mActDb); - + + iDatabaseCleaner = new (ELeave) CAfDatabaseCleaner(iActDb); + DeleteNonPersistentActivitiesL(); RequestCleanup(); -} + } // ----------------------------------------------------------------------------- /** @@ -97,16 +97,16 @@ * @param databaseFile - database file path */ void CAfStorage::CreateDbL(const TDesC& databaseFile) -{ - mFileStore = CPermanentFileStore::ReplaceL(mFsSession, + { + iFileStore = CPermanentFileStore::ReplaceL(iFsSession, 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 + iFileStore->SetTypeL(iFileStore->Layout());// Set file store type + TStreamId id = iActDb.CreateL(iFileStore);// Create stream object + iFileStore->SetRootL(id);// Keep database id as root of store + iFileStore->CommitL();// Complete creation by commiting CreateTableL(); -} + } // ----------------------------------------------------------------------------- /** @@ -114,52 +114,121 @@ * @param databaseFile - database file path */ void CAfStorage::OpenDbL(const TDesC& databaseFile) + { + TRAPD( errNo, + iFileStore = CPermanentFileStore::OpenL( iFsSession, + databaseFile, + EFileRead|EFileWrite ); + iFileStore->SetTypeL( iFileStore->Layout() ); /* Set file store type*/ + iActDb.OpenL( iFileStore, iFileStore->Root() ); + VerifyTableL(); ) + if( KErrNone != errNo ) + { + //database is corrupted. recreate + iActDb.Close(); + delete iFileStore; + iFileStore = 0; + CreateDbL( databaseFile ); + } + } + +// ----------------------------------------------------------------------------- +/** + * Verify database structure + */ +void CAfStorage::VerifyDbL() { - mFileStore = CPermanentFileStore::OpenL(mFsSession, - databaseFile, - EFileRead|EFileWrite); - mFileStore->SetTypeL(mFileStore->Layout()); /* Set file store type*/ - mActDb.OpenL(mFileStore,mFileStore->Root()); + TInt errNo(KErrCorrupt); + CDbTableNames* tables = iActDb.TableNamesL(); + CleanupStack::PushL( tables ); + for( TInt iter(0); iter < tables->Count() && KErrNone != errNo; ++iter ) + { + if( 0 == (*tables)[iter].Compare( KActivityTableName() ) ) + { + VerifyTableL(); + errNo = KErrNone; + } + } + CleanupStack::PopAndDestroy( tables ); + User::LeaveIfError( errNo ); } // ----------------------------------------------------------------------------- +CDbColSet* CAfStorage::ExpectedTableLC() + { + 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 ); + + // custom name + actColSet->AddL( TDbCol( KCustomNameColumnName, EDbColText16 ) ); + + TDbCol actFlags( KFlagsColumnName, EDbColInt32 ); + actFlags.iAttributes = TDbCol::ENotNull; + actColSet->AddL(actFlags); + + TDbCol actTimestamp( KTimestampColumnName, EDbColDateTime ); + actTimestamp.iAttributes = TDbCol::ENotNull; + actColSet->AddL(actTimestamp); + + actColSet->AddL( TDbCol( KDataColumnName, EDbColLongBinary ) );// Stream Data + + return actColSet; + } + +// ----------------------------------------------------------------------------- /** * 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); + { + CDbColSet* actColSet(ExpectedTableLC()); + // Create the table + User::LeaveIfError(iActDb.CreateTable(KActivityTableName, + *actColSet)); + CleanupStack::PopAndDestroy(actColSet); + } - 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); -} - +// ----------------------------------------------------------------------------- +/** + * Verify table structure + */ +void CAfStorage::VerifyTableL() + { + CDbColSet *currentTable(iActDb.ColSetL(KActivityTableName)); + CleanupStack::PushL(currentTable); + CDbColSet *expectedTable(ExpectedTableLC()); + for( TInt iter(1); iter <= expectedTable->Count(); ++iter ) + { + const TDbCol& expectedColumn((*expectedTable)[iter]); + const TDbCol* currentColumn(currentTable->Col(expectedColumn.iName)); + if( 0 == currentColumn || + expectedColumn.iAttributes != currentColumn->iAttributes || + expectedColumn.iMaxLength != currentColumn->iMaxLength || + expectedColumn.iType != currentColumn->iType ) + { + User::Leave(KErrCorrupt); + } + } + CleanupStack::PopAndDestroy( expectedTable ); + CleanupStack::PopAndDestroy( currentTable ); + } // ----------------------------------------------------------------------------- /** * Delete non-persistent activities */ void CAfStorage::DeleteNonPersistentActivitiesL() -{ - HBufC *query(BuildQueryLC(KDeleteNonPersistentActivities(), CAfEntry::Persistent, KNullDesC)); - User::LeaveIfError(mActDb.Execute(*query)); + { + HBufC *query(BuildQueryLC(KDeleteNonPersistentActivities(), + CAfEntry::Persistent, + KNullDesC)); + User::LeaveIfError(iActDb.Execute(*query)); RBuf privatePath; CleanupClosePushL(privatePath); privatePath.CreateL(KMaxPathLength); @@ -169,7 +238,7 @@ delete fileMan; CleanupStack::PopAndDestroy(&privatePath); CleanupStack::PopAndDestroy(query); -} + } // ----------------------------------------------------------------------------- /** @@ -182,38 +251,46 @@ * @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) { + if( KErrNone == errNo ) + { User::Leave(KErrAlreadyExists); - } + } CleanupStack::PopAndDestroy(&view); //write table RDbTable table; CleanupClosePushL(table); - User::LeaveIfError(table.Open(mActDb, KActivityTableName, table.EUpdatable)); + User::LeaveIfError(table.Open(iActDb, KActivityTableName, table.EUpdatable)); CDbColSet *row = table.ColSetL(); CleanupStack::PushL(row); - + + TTime time; + time.UniversalTime(); + table.InsertL(); TRAP(errNo, table.SetColL(row->ColNo(KApplicationColumnName), TInt64(entry.ApplicationId())); table.SetColL(row->ColNo(KActivityColumnName), entry.ActivityId()); + table.SetColL(row->ColNo(KCustomNameColumnName), entry.CustomActivityName()); table.SetColL(row->ColNo(KFlagsColumnName), entry.Flags()); - ExternalizeDataL(table, entry, row->ColNo(KDataColumnName)); + table.SetColL(row->ColNo(KTimestampColumnName), time.DateTime()); + ExternalizeDataL(table, entry, row->ColNo(KDataColumnName) ); + table.PutL();) - if (KErrNone != errNo) { + if( KErrNone != errNo ) + { table.Cancel(); User::Leave(errNo); - } + } CleanupStack::PopAndDestroy(row); CleanupStack::PopAndDestroy(&table); -} + } // ----------------------------------------------------------------------------- /** @@ -221,7 +298,9 @@ * @param entry - activity data */ void CAfStorage::UpdateActivityL(CAfEntry& entry) -{ + { + TTime time; + time.UniversalTime(); RDbView view; CleanupClosePushL(view); GetActivityForUpdateL(view, entry.ApplicationId(), entry.ActivityId()); @@ -231,17 +310,20 @@ CleanupStack::PushL(colSet); view.SetColL(colSet->ColNo(KFlagsColumnName), entry.Flags()); + view.SetColL(colSet->ColNo(KTimestampColumnName), time.DateTime()); + view.SetColL(colSet->ColNo(KCustomNameColumnName), entry.CustomActivityName()); ExternalizeDataL(view, entry, colSet->ColNo(KDataColumnName)); view.PutL(); CleanupStack::PopAndDestroy(colSet);) - if (KErrNone != errNo) { + if(KErrNone != errNo) + { view.Cancel(); User::Leave(errNo); - } + } CleanupStack::PopAndDestroy(&view); -} + } // ----------------------------------------------------------------------------- /** @@ -250,13 +332,16 @@ */ void CAfStorage::SaveActivityL(CAfEntry &entry) { + TTime time; + time.UniversalTime(); // @todo check if this can be tidied up //verify if row already exists TInt errNo(KErrNone); RDbView view; CleanupClosePushL(view); TRAP(errNo, GetActivityForUpdateL(view, entry.ApplicationId(), entry.ActivityId())); - if (KErrNone == errNo) { + if( KErrNone == errNo ) + { // update view.UpdateL(); TRAPD(errNo, @@ -264,22 +349,27 @@ CleanupStack::PushL(colSet); view.SetColL(colSet->ColNo(KFlagsColumnName), entry.Flags()); + view.SetColL(colSet->ColNo(KTimestampColumnName), time.DateTime()); + view.SetColL(colSet->ColNo(KCustomNameColumnName), entry.CustomActivityName()); ExternalizeDataL(view, entry, colSet->ColNo(KDataColumnName)); view.PutL(); CleanupStack::PopAndDestroy(colSet);) - if (KErrNone != errNo) { + if (KErrNone != errNo) + { view.Cancel(); User::Leave(errNo); + } } - } else { + else + { // insert //write table RDbTable table; CleanupClosePushL(table); - User::LeaveIfError(table.Open(mActDb, KActivityTableName, table.EUpdatable)); + User::LeaveIfError(table.Open(iActDb, KActivityTableName, table.EUpdatable)); CDbColSet *row = table.ColSetL(); CleanupStack::PushL(row); @@ -287,7 +377,9 @@ TRAP(errNo, table.SetColL(row->ColNo(KApplicationColumnName), TInt64(entry.ApplicationId())); table.SetColL(row->ColNo(KActivityColumnName), entry.ActivityId()); + table.SetColL(row->ColNo(KCustomNameColumnName), entry.CustomActivityName()); table.SetColL(row->ColNo(KFlagsColumnName), entry.Flags()); + table.SetColL(row->ColNo(KTimestampColumnName), time.DateTime()); ExternalizeDataL(table, entry, row->ColNo(KDataColumnName)); table.PutL();) if (KErrNone != errNo) { @@ -297,7 +389,6 @@ CleanupStack::PopAndDestroy(row); CleanupStack::PopAndDestroy(&table); } - CleanupStack::PopAndDestroy(&view); } @@ -308,20 +399,18 @@ * @param actId - activity id */ void CAfStorage::DeleteActivityL(CAfEntry& entry) -{ + { HBufC *query(DeleteRowLC(entry.ApplicationId(), entry.ActivityId())); - User::LeaveIfError(mActDb.Execute(*query)); + User::LeaveIfError(iActDb.Execute(*query)); CleanupStack::PopAndDestroy(query); -} + } // ----------------------------------------------------------------------------- // -// ----------------------------------------------------------------------------- -// void CAfStorage::DeleteActivitiesL(CAfEntry& entry) -{ + { HBufC *query(DeleteRowsLC(entry.ApplicationId())); - User::LeaveIfError(mActDb.Execute(*query)); + User::LeaveIfError(iActDb.Execute(*query)); RBuf privatePath; CleanupClosePushL(privatePath); privatePath.CreateL(KMaxPathLength); @@ -337,16 +426,16 @@ CleanupStack::PopAndDestroy(fileMan); CleanupStack::PopAndDestroy(&privatePath); CleanupStack::PopAndDestroy(query); -} + } // ----------------------------------------------------------------------------- // // ----------------------------------------------------------------------------- // -void CAfStorage::ActivitiesL(RPointerArray& dst) -{ - ActivitiesL(dst, KSelectRows(), CAfEntry::Public); -} +void CAfStorage::AllActivitiesL(RPointerArray& dst, TInt aLimit) + { + ActivitiesL(dst, KSelectRows(), CAfEntry::Public, aLimit); + } // ----------------------------------------------------------------------------- /** @@ -355,11 +444,11 @@ * @param appId - application id */ void CAfStorage::ActivitiesL(RPointerArray& dst,TInt appId) -{ + { HBufC *query(SelectRowsLC(appId)); ActivitiesL(dst, *query, CAfEntry::Private); CleanupStack::PopAndDestroy(query); -} + } // ----------------------------------------------------------------------------- /** @@ -368,14 +457,15 @@ * @param src - condition pattern */ void CAfStorage::ActivityL(RPointerArray &dst, CAfEntry& src) -{ + { HBufC *query = SelectRowLC(src.ApplicationId(), src.ActivityId()); - ActivitiesL(dst, *query, CAfEntry::Private, 1); - if (0 >= dst.Count()) { + ActivitiesL(dst, *query, CAfEntry::Private, 1, ETrue); + if( 0 >= dst.Count() ) + { User::Leave(KErrNotFound); - } + } CleanupStack::PopAndDestroy(query); -} + } // ----------------------------------------------------------------------------- /** @@ -383,9 +473,9 @@ * @return file system session */ RFs& CAfStorage::Fs() -{ - return mFsSession; -} + { + return iFsSession; + } // ----------------------------------------------------------------------------- /** @@ -395,9 +485,9 @@ * @return formated sql query */ HBufC* CAfStorage::SelectRowLC(TInt appId, const TDesC& actId) const -{ + { return BuildQueryLC(KSelectRow(),appId, actId); -} + } // ----------------------------------------------------------------------------- /** @@ -406,9 +496,9 @@ * @return formated sql query */ HBufC* CAfStorage::SelectRowsLC(TInt appId) const -{ + { return BuildQueryLC(KSelectAppRows(), appId, KNullDesC); -} + } // ----------------------------------------------------------------------------- /** @@ -418,9 +508,9 @@ * @return formated sql query */ HBufC* CAfStorage::DeleteRowLC(TInt appId, const TDesC& actId) const -{ + { return BuildQueryLC(KDeleteRow(),appId, actId); -} + } // ----------------------------------------------------------------------------- /** @@ -429,9 +519,9 @@ * @return formated sql query */ HBufC* CAfStorage::DeleteRowsLC(TInt appId) const -{ + { return BuildQueryLC(KDeleteRows(),appId, KNullDesC); -} + } // ----------------------------------------------------------------------------- /** @@ -444,7 +534,7 @@ HBufC* CAfStorage::BuildQueryLC(const TDesC& format, TInt appId, const TDesC& actId) const -{ + { TBuf<16> appName; appName.AppendNum(appId); RBuf actName; @@ -458,7 +548,7 @@ CleanupStack::PopAndDestroy(&actName); CleanupStack::PushL(query); return query; -} + } // ----------------------------------------------------------------------------- /** @@ -466,15 +556,15 @@ * @param dst - destination result buffer * @param query - sql activity query */ -void CAfStorage::ActivitiesL(RPointerArray& dst, const TDesC& query, CAfEntry::AccessRights rights, TInt limit) -{ +void CAfStorage::ActivitiesL(RPointerArray& dst, const TDesC& query, CAfEntry::AccessRights rights, TInt limit, TBool deserializeAllData) + { RDbView view;// Create a view on the database CleanupClosePushL(view); - User::LeaveIfError(view.Prepare(mActDb, TDbQuery(query), view.EReadOnly)); + User::LeaveIfError(view.Prepare(iActDb, TDbQuery(query), view.EReadOnly)); User::LeaveIfError(view.EvaluateAll()); - ActivitiesL(dst, view, rights, limit); + ActivitiesL(dst, view, rights, limit, deserializeAllData); CleanupStack::PopAndDestroy(&view); -} + } // ----------------------------------------------------------------------------- /** @@ -483,48 +573,69 @@ * @param query - view * @param rights - acess rights */ -void CAfStorage::ActivitiesL(RPointerArray& dst, RDbView& src, CAfEntry::AccessRights rights, TInt limit) -{ +void CAfStorage::ActivitiesL(RPointerArray& dst, + RDbView& src, + CAfEntry::AccessRights rights, + TInt limit, + TBool deserializeAllData) + { CDbColSet* row = src.ColSetL(); CleanupStack::PushL(row); const TInt flagsOffset(row->ColNo(KFlagsColumnName)), applicationOffset(row->ColNo(KApplicationColumnName)), activityOffset(row->ColNo(KActivityColumnName)), + customNameOffset(row->ColNo(KCustomNameColumnName)), dataOffset(row->ColNo(KDataColumnName)); RBuf activityName; CleanupClosePushL(activityName); - for (src.FirstL(); src.AtRow(); src.NextL()) { - if(0 < limit && dst.Count() >= limit) { + RBuf customName; + CleanupClosePushL(customName); + + + for (src.FirstL(); src.AtRow(); src.NextL()) + { + if ( 0 < limit && dst.Count() >= limit ) + { break; - } + } src.GetL(); ReadDataL(activityName, src, activityOffset); + ReadDataL(customName, src, customNameOffset); CAfEntry *entry = CAfEntry::NewLC(src.ColInt32(flagsOffset), src.ColInt64(applicationOffset), activityName, + customName, KNullDesC, KNullDesC8, KNullDesC8); - if (CAfEntry::Public == rights && (entry->Flags() & CAfEntry::Invisible)) { + if( CAfEntry::Public == rights && + (entry->Flags() & CAfEntry::Invisible) ) + { CleanupStack::PopAndDestroy(entry); continue; - } + } InternalizeDataL(*entry, src, dataOffset); - if (CAfEntry::Public == rights || 0 >= limit) { + if (!deserializeAllData) { + entry->SetDataL(KNullDesC8(), CAfEntry::Public); entry->SetDataL(KNullDesC8(), CAfEntry::Private); + } else { + if (CAfEntry::Public == rights) { + entry->SetDataL(KNullDesC8(), CAfEntry::Private); + } } + dst.AppendL(entry); CleanupStack::Pop(entry); - } - + } + CleanupStack::PopAndDestroy(&customName); CleanupStack::PopAndDestroy(&activityName); CleanupStack::PopAndDestroy(row); -} + } // ----------------------------------------------------------------------------- /** @@ -534,46 +645,47 @@ * @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)); + User::LeaveIfError(view.Prepare(iActDb, TDbQuery(*query), view.EUpdatable)); CleanupStack::PopAndDestroy(query); User::LeaveIfError(view.EvaluateAll()); - if (!view.FirstL()) { + 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); -} + } // ----------------------------------------------------------------------------- // @@ -582,19 +694,22 @@ void CAfStorage::StoragePathL(RBuf &dst, RFs& fileSystem, TBool persistent) -{ - if (dst.MaxLength() < KMaxPathLength) { + { + if (dst.MaxLength() < KMaxPathLength) + { dst.ReAllocL(KMaxPathLength); - } + } dst.Zero(); User::LeaveIfError(fileSystem.PrivatePath(dst)); - if(persistent) { + if(persistent) + { dst.Append(KPersistent); + } + else + { + dst.Append(KNonPersistent); + } } - else { - dst.Append(KNonPersistent); - } -} // ----------------------------------------------------------------------------- // @@ -604,7 +719,7 @@ RFs& fileSystem, TInt uid, TBool persistent) -{ + { StoragePathL(dst, fileSystem, persistent); //Format activity path @@ -648,7 +763,7 @@ // ----------------------------------------------------------------------------- // HBufC8* CAfStorage::Md5HexDigestL(const TDesC8 &string) -{ + { _LIT8(KMd5HexFormat, "%+02x"); CMD5* md5 = CMD5::NewL(); CleanupStack::PushL(md5); @@ -663,7 +778,7 @@ } CleanupStack::PopAndDestroy(md5); return buf; -} + } // ----------------------------------------------------------------------------- /** @@ -671,20 +786,23 @@ * @return ETrue if the database cleanup was in progress, EFalse otherwise */ TBool CAfStorage::InterruptCleanup() -{ - if (mDatabaseCleaner->IsActive()) { - mDatabaseCleaner->Cancel(); + { + if( iDatabaseCleaner->IsActive() ) + { + iDatabaseCleaner->Cancel(); return ETrue; - } else { + } + else + { return EFalse; + } } -} // ----------------------------------------------------------------------------- /** * Start database cleanup */ void CAfStorage::RequestCleanup() -{ - mDatabaseCleaner->StartCleanup(); -} + { + iDatabaseCleaner->StartCleanup(); + } diff -r dbfb5e38438b -r 305818acdca4 activityfw/storage/server/src/afstorageasynctask.cpp --- a/activityfw/storage/server/src/afstorageasynctask.cpp Wed Aug 18 10:39:24 2010 +0300 +++ b/activityfw/storage/server/src/afstorageasynctask.cpp Mon Sep 13 13:26:33 2010 +0300 @@ -108,7 +108,7 @@ void CAfStorageAsyncTask::AllActivitiesL(CAfStorage& dataStorage, const RMessage2& msg) { - dataStorage.ActivitiesL(mInternalizedData); + dataStorage.AllActivitiesL(mInternalizedData, msg.Int3()); ExternalizeL(); WriteResponseL(msg); } diff -r dbfb5e38438b -r 305818acdca4 activityfw/tsutils/bwins/tsutilsu.def --- a/activityfw/tsutils/bwins/tsutilsu.def Wed Aug 18 10:39:24 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,18 +0,0 @@ -EXPORTS - ?WsSession@CTsResourceManager@@UAEAAVRWsSession@@XZ @ 1 NONAME ; class RWsSession & CTsResourceManager::WsSession(void) - ?ApaSession@CTsResourceManager@@UAEAAVRApaLsSession@@XZ @ 2 NONAME ; class RApaLsSession & CTsResourceManager::ApaSession(void) - ?BaseConstructL@CTsWindowGroupsObserver@@IAEXXZ @ 3 NONAME ; void CTsWindowGroupsObserver::BaseConstructL(void) - ??1CTsWindowGroupsObserver@@UAE@XZ @ 4 NONAME ; CTsWindowGroupsObserver::~CTsWindowGroupsObserver(void) - ??1CTsWindowGroupsMonitor@@UAE@XZ @ 5 NONAME ; CTsWindowGroupsMonitor::~CTsWindowGroupsMonitor(void) - ?NewL@CTsGraphicFileScalingHandler@@SAPAV1@AAVMImageReadyCallBack@@AAVRFs@@ABVTDesC16@@ABVTDesC8@@ABVTSize@@W4TKindOfScaling@1@@Z @ 6 NONAME ; class CTsGraphicFileScalingHandler * CTsGraphicFileScalingHandler::NewL(class MImageReadyCallBack &, class RFs &, class TDesC16 const &, class TDesC8 const &, class TSize const &, enum CTsGraphicFileScalingHandler::TKindOfScaling) - ?SubscribeL@CTsWindowGroupsMonitor@@UAEXAAVMTsWindowGroupsObserver@@@Z @ 7 NONAME ; void CTsWindowGroupsMonitor::SubscribeL(class MTsWindowGroupsObserver &) - ?NewL@CTsWindowGroupsMonitor@@SAPAV1@AAVMTsResourceManager@@@Z @ 8 NONAME ; class CTsWindowGroupsMonitor * CTsWindowGroupsMonitor::NewL(class MTsResourceManager &) - ??1CTsGraphicFileScalingHandler@@UAE@XZ @ 9 NONAME ; CTsGraphicFileScalingHandler::~CTsGraphicFileScalingHandler(void) - ?NewLC@CTsGraphicFileScalingHandler@@SAPAV1@AAVMImageReadyCallBack@@ABVCFbsBitmap@@ABVTSize@@W4TKindOfScaling@1@@Z @ 10 NONAME ; class CTsGraphicFileScalingHandler * CTsGraphicFileScalingHandler::NewLC(class MImageReadyCallBack &, class CFbsBitmap const &, class TSize const &, enum CTsGraphicFileScalingHandler::TKindOfScaling) - ?NewL@CTsGraphicFileScalingHandler@@SAPAV1@AAVMImageReadyCallBack@@ABVCFbsBitmap@@ABVTSize@@W4TKindOfScaling@1@@Z @ 11 NONAME ; class CTsGraphicFileScalingHandler * CTsGraphicFileScalingHandler::NewL(class MImageReadyCallBack &, class CFbsBitmap const &, class TSize const &, enum CTsGraphicFileScalingHandler::TKindOfScaling) - ?NewLC@CTsGraphicFileScalingHandler@@SAPAV1@AAVMImageReadyCallBack@@AAVRFs@@ABVTDesC16@@ABVTDesC8@@ABVTSize@@W4TKindOfScaling@1@@Z @ 12 NONAME ; class CTsGraphicFileScalingHandler * CTsGraphicFileScalingHandler::NewLC(class MImageReadyCallBack &, class RFs &, class TDesC16 const &, class TDesC8 const &, class TSize const &, enum CTsGraphicFileScalingHandler::TKindOfScaling) - ??0CTsWindowGroupsObserver@@IAE@AAVMTsWindowGroupsMonitor@@@Z @ 13 NONAME ; CTsWindowGroupsObserver::CTsWindowGroupsObserver(class MTsWindowGroupsMonitor &) - ?NewL@CTsResourceManager@@SAPAV1@XZ @ 14 NONAME ; class CTsResourceManager * CTsResourceManager::NewL(void) - ?Cancel@CTsWindowGroupsMonitor@@UAEXAAVMTsWindowGroupsObserver@@@Z @ 15 NONAME ; void CTsWindowGroupsMonitor::Cancel(class MTsWindowGroupsObserver &) - ??1CTsResourceManager@@UAE@XZ @ 16 NONAME ; CTsResourceManager::~CTsResourceManager(void) - diff -r dbfb5e38438b -r 305818acdca4 activityfw/tsutils/eabi/tsutilsu.def --- a/activityfw/tsutils/eabi/tsutilsu.def Wed Aug 18 10:39:24 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,38 +0,0 @@ -EXPORTS - _ZN18CTsResourceManager10ApaSessionEv @ 1 NONAME - _ZN18CTsResourceManager4NewLEv @ 2 NONAME - _ZN18CTsResourceManager9WsSessionEv @ 3 NONAME - _ZN18CTsResourceManagerD0Ev @ 4 NONAME - _ZN18CTsResourceManagerD1Ev @ 5 NONAME - _ZN18CTsResourceManagerD2Ev @ 6 NONAME - _ZN22CTsWindowGroupsMonitor10SubscribeLER23MTsWindowGroupsObserver @ 7 NONAME - _ZN22CTsWindowGroupsMonitor4NewLER18MTsResourceManager @ 8 NONAME - _ZN22CTsWindowGroupsMonitor6CancelER23MTsWindowGroupsObserver @ 9 NONAME - _ZN22CTsWindowGroupsMonitorD0Ev @ 10 NONAME - _ZN22CTsWindowGroupsMonitorD1Ev @ 11 NONAME - _ZN22CTsWindowGroupsMonitorD2Ev @ 12 NONAME - _ZN23CTsWindowGroupsObserver14BaseConstructLEv @ 13 NONAME - _ZN23CTsWindowGroupsObserverC2ER22MTsWindowGroupsMonitor @ 14 NONAME - _ZN23CTsWindowGroupsObserverD0Ev @ 15 NONAME - _ZN23CTsWindowGroupsObserverD1Ev @ 16 NONAME - _ZN23CTsWindowGroupsObserverD2Ev @ 17 NONAME - _ZN28CTsGraphicFileScalingHandler4NewLER19MImageReadyCallBackR3RFsRK7TDesC16RK6TDesC8RK5TSizeNS_14TKindOfScalingE @ 18 NONAME - _ZN28CTsGraphicFileScalingHandler4NewLER19MImageReadyCallBackRK10CFbsBitmapRK5TSizeNS_14TKindOfScalingE @ 19 NONAME - _ZN28CTsGraphicFileScalingHandler5NewLCER19MImageReadyCallBackR3RFsRK7TDesC16RK6TDesC8RK5TSizeNS_14TKindOfScalingE @ 20 NONAME - _ZN28CTsGraphicFileScalingHandler5NewLCER19MImageReadyCallBackRK10CFbsBitmapRK5TSizeNS_14TKindOfScalingE @ 21 NONAME - _ZN28CTsGraphicFileScalingHandlerD0Ev @ 22 NONAME - _ZN28CTsGraphicFileScalingHandlerD1Ev @ 23 NONAME - _ZN28CTsGraphicFileScalingHandlerD2Ev @ 24 NONAME - _ZTI18CTsResourceManager @ 25 NONAME - _ZTI22CTsWindowGroupsMonitor @ 26 NONAME - _ZTI23CTsWindowGroupsObserver @ 27 NONAME - _ZTI28CTsGraphicFileScalingHandler @ 28 NONAME - _ZTV18CTsResourceManager @ 29 NONAME - _ZTV22CTsWindowGroupsMonitor @ 30 NONAME - _ZTV23CTsWindowGroupsObserver @ 31 NONAME - _ZTV28CTsGraphicFileScalingHandler @ 32 NONAME - _ZThn28_N22CTsWindowGroupsMonitor10SubscribeLER23MTsWindowGroupsObserver @ 33 NONAME - _ZThn28_N22CTsWindowGroupsMonitor6CancelER23MTsWindowGroupsObserver @ 34 NONAME - _ZThn4_N18CTsResourceManager10ApaSessionEv @ 35 NONAME - _ZThn4_N18CTsResourceManager9WsSessionEv @ 36 NONAME - diff -r dbfb5e38438b -r 305818acdca4 activityfw/tsutils/group/bld.inf --- a/activityfw/tsutils/group/bld.inf Wed Aug 18 10:39:24 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: -* -*/ -PRJ_PLATFORMS -DEFAULT - -PRJ_EXPORTS -../inc/tsresourcemanager.h |../../../inc/tsresourcemanager.h -../inc/tswindowgroupsobserver.h |../../../inc/tswindowgroupsobserver.h -../inc/tsgraphicfilescalinghandler.h |../../../inc/tsgraphicfilescalinghandler.h - -PRJ_MMPFILES -tsutils.mmp diff -r dbfb5e38438b -r 305818acdca4 activityfw/tsutils/group/tsutils.mmp --- a/activityfw/tsutils/group/tsutils.mmp Wed Aug 18 10:39:24 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,44 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ -TARGET tsutils.dll -TARGETTYPE dll -UID 0x1000008d 0x20026782 - -CAPABILITY CAP_GENERAL_DLL - -MW_LAYER_SYSTEMINCLUDE - -USERINCLUDE ../inc - -SOURCEPATH ../src -SOURCE tsgraphicfilescalinghandler.cpp -SOURCE tswindowgroupsmonitor.cpp -SOURCE tswindowgroupsobserver.cpp -SOURCE tsresourcemanager.cpp - -LIBRARY euser.lib -LIBRARY bitmaptransforms.lib -LIBRARY imageconversion.lib -LIBRARY fbscli.lib -LIBRARY efsrv.lib -LIBRARY ws32.lib -LIBRARY apgrfx.lib - - -#ifdef ENABLE_ABIV2_MODE -DEBUGGABLE_UDEBONLY -#endif diff -r dbfb5e38438b -r 305818acdca4 activityfw/tsutils/inc/tsgraphicfilescalinghandler.h --- a/activityfw/tsutils/inc/tsgraphicfilescalinghandler.h Wed Aug 18 10:39:24 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,211 +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 TSGRAPHICFILESCALINGHANDLER_H -#define TSGRAPHICFILESCALINGHANDLER_H - -#ifndef __E32SVR_H__ -#define __E32SVR_H__ -#endif - - -#ifndef SYMBIAN_ENABLE_PUBLIC_PLATFORM_HEADER_SPLIT -#define SYMBIAN_ENABLE_PUBLIC_PLATFORM_HEADER_SPLIT -#endif - -#include - -class CImageDecoder; -class CFbsBitmap; - -/** - * Interface to observer contain - * ImageReadyCallBack function return error code and scaled/resized bitmap. - */ -class MImageReadyCallBack -{ -public: - virtual void ImageReadyCallBack(TInt error, const CFbsBitmap *bitmap) = 0; -}; - -/** - * Class to scaling graphic file/s. - */ -class CTsGraphicFileScalingHandler : public CActive -{ -public: - /** - * Kind of graphic file scaling. - * EIgnoreAspectRatio - the file is scaled to size, aspect ratio isn't preserving. - * EKeepAspectRatio - the file is scaled to a rectangle as large as possible inside size - * preserving the aspect ratio. - * EKeepAspectRatioByExpanding - the file is scaled to a rectangle as small as possible outside size - * preserving the aspect ratio. - */ - enum TKindOfScaling - { - EIgnoreAspectRatio = 0, - EKeepAspectRatio = 1, - EKeepAspectRatioByExpanding = 2, - }; - -private: - /** - * Active object current operation. - */ - enum TCurrentOperation{ - ENone = 0, - EConvertBitmapFromFile = 1, - EScale = 2 - }; - -public: - /** - * Destructor. - */ - IMPORT_C ~CTsGraphicFileScalingHandler(); - - /** - * All constructors initialise active object asynchronous operation - * by calling ConstructL function. - * 1st group - decoding and scaling. - * 2nd group - scaling. - */ - - /** - * 1st group. - * Exported from dll constructors for activation graphic file scaling. - * aNotify - reference to observer implementation. - * aFs - reference to file server session. - * aFileName - path to graphic file. - * aMimeType - mime type of graphic file. - * aNewSize - new size of output graphic file. - * aKindOfScaling - kind of graphic file scaling described above. - */ - IMPORT_C static CTsGraphicFileScalingHandler* NewL(MImageReadyCallBack &aNotify, - RFs &aFs, - const TDesC &aFileName, - const TDesC8& aMimeType, - const TSize &aNewSize, - TKindOfScaling aKindOfScaling = CTsGraphicFileScalingHandler::EIgnoreAspectRatio); - IMPORT_C static CTsGraphicFileScalingHandler* NewLC(MImageReadyCallBack &aNotify, - RFs &aFs, - const TDesC &aFileName, - const TDesC8& aMimeType, - const TSize &aNewSize, - TKindOfScaling aKindOfScaling = CTsGraphicFileScalingHandler::EIgnoreAspectRatio); - - /** - * 2nd group. - * Exported from dll constructors for activation graphic file scaling. - * aNotify - reference to observer implementation. - * aImputFbsBitmap - reference to pattern CFbsBitmap. - * aNewSize - new size of output graphic file. - * aKindOfScaling - kind of graphic file scaling described above. - */ - IMPORT_C static CTsGraphicFileScalingHandler* NewL(MImageReadyCallBack &aNotify, - const CFbsBitmap &aImputFbsBitmap, - const TSize &aNewSize, - TKindOfScaling aKindOfScaling = CTsGraphicFileScalingHandler::EIgnoreAspectRatio); - IMPORT_C static CTsGraphicFileScalingHandler* NewLC(MImageReadyCallBack &aNotify, - const CFbsBitmap &aImputFbsBitmap, - const TSize &aNewSize, - TKindOfScaling aKindOfScaling = CTsGraphicFileScalingHandler::EIgnoreAspectRatio); - -protected: - /** - * Cancels the wait for completion of an outstanding request. - */ - void DoCancel(); - /** - * Handles an active object’s request completion event. - */ - void RunL(); - /** - * Handles a leave occurring in the request completion event handler RunL(). - */ - TInt RunError(TInt); - -private: - /** - * Functions construct active objest instance and made asynchronous operation/s. - * Parameters - the same meaning as in appropriate NewL/NewLC functions. - */ - void ConstructL(RFs &aFs, const TDesC &aFileName, const TDesC8& aMimeType); - void ConstructL(const CFbsBitmap &aImputFbsBitmap); - /** - * Private constructor. - * Parameters - the same meaning as in appropriate NewL/NewLC functions. - */ - CTsGraphicFileScalingHandler(MImageReadyCallBack &aNotify, - const TSize &aNewSize, - TKindOfScaling aKindOfScaling = CTsGraphicFileScalingHandler::EIgnoreAspectRatio); - /** - * Action to made before decoding graphic file operation. - * Parameters - the same meaning as in appropriate NewL/NewLC functions. - */ - void DecodingOperationL(RFs &aFs, const TDesC &aFileName, const TDesC8& aMimeType); - /** - * Action to made before scaling graphic file operation. - */ - void ScalingOperationL(); - /** - * Algorithm to determine output bitmap (returned in ImageReadyCallBack) size - * after scaling operation. - */ - TSize NewSizeToScalingOperation(); - /** - * Fix for TDisplayMode == EColor16MAP not supported by scaling operation! - * ! ! ! ADD OTHER NOT SUPPORTED DISPLAY MODES ! ! ! - */ - void FixForDisplayModeNotSupportedByScalingOperation(); - -private: - /** - * Reference to observer implementation - return error code and output bitmap. - */ - MImageReadyCallBack &mNotify; - /** - * Pointer to decoder used by decoding graphic file algorithm. - */ - CImageDecoder *mImageDecoder; - /** - * Pointer to input bitmap - before decoding/scaling operation/s. - */ - CFbsBitmap *mInputBitmap; - /** - * Pointer to output bitmap - returned in mNotify object. - */ - CFbsBitmap *mOutputBitmap; - /** - * Pointer to CBitmapScaler calss used by scaling graphic file algorithm. - */ - CBitmapScaler *mBitmapScaler; - /** - * New size of output graphic file. - */ - TSize mNewSize; - /** - * Kind of graphic file scaling described above. - */ - TBool mKindOfScaling; - /** - * Active object current operation. - */ - TCurrentOperation mCurrentOperation; -}; - -#endif // TSGRAPHICFILESCALINGHANDLER_H diff -r dbfb5e38438b -r 305818acdca4 activityfw/tsutils/inc/tsresourcemanager.h --- a/activityfw/tsutils/inc/tsresourcemanager.h Wed Aug 18 10:39:24 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 : - * - */ -#ifndef TSRESOURCEMANAGER_H -#define TSRESOURCEMANAGER_H - -#ifndef __E32SVR_H__ -#define __E32SVR_H__ -#endif -#include -#include -#include -#include - -/** - * Interface decalre methods to access initialized OS resources - */ -class MTsResourceManager -{ -public: - /** - * Access to initialized window server session - */ - virtual RWsSession& WsSession() =0; - - /** - * Access to initilaized APA session - */ - virtual RApaLsSession& ApaSession() =0; -}; - -/** - * Resource manager implemetatioin - */ -class CTsResourceManager: public CBase, - public MTsResourceManager -{ -public: - /** - * Two phase constructor - */ - IMPORT_C static CTsResourceManager* NewL(); - - /** - * Destructor - */ - IMPORT_C ~CTsResourceManager(); - - /** - * @see MTsResourceManager::WsSession - */ - IMPORT_C RWsSession& WsSession(); - - /** - * @see MTsResourceManager::ApaSession - */ - IMPORT_C RApaLsSession& ApaSession(); - -private: - /** - * Second phase constructor - */ - void ConstructL(); - -private: - RWsSession mWsSession; - RApaLsSession mApaSeesion; -}; - - - -#endif // TSRESOURCEMANAGER_H diff -r dbfb5e38438b -r 305818acdca4 activityfw/tsutils/inc/tswindowgroupsobserver.h --- a/activityfw/tsutils/inc/tswindowgroupsobserver.h Wed Aug 18 10:39:24 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,173 +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 TSWINDOWGROUPSOBSERVER_H -#define TSWINDOWGROUPSOBSERVER_H - -#include "tsresourcemanager.h" - -/** - * Interface declare mathods to notify about window server events - */ -class MTsWindowGroupsObserver -{ -public: - /** - * Method notidy about window group changes. - * @param rsc - resource manager - * @param wgs - list of window groups associated with running applications - */ - virtual void HandleWindowGroupChanged(MTsResourceManager &rsc, - const TArray & wgs) =0; -}; - -/** - * Interface declare methods to subscribe windo server events - */ -class MTsWindowGroupsMonitor -{ -public: - /** - * Method make subscription for window server events - * @param observer - events observer - */ - virtual void SubscribeL(MTsWindowGroupsObserver & observer) =0; - - /** - * Method cancel subscription for window server events - * @param observer - events observer - */ - virtual void Cancel(MTsWindowGroupsObserver &) =0; -}; - -/** - * Window server observer implementation. Class automaticly subscribe / cancel subscription - * at construction / destruction level. - * - */ -class CTsWindowGroupsObserver: public CBase, - public MTsWindowGroupsObserver -{ -public: - /** - * Destructor - * Function automaticly cancel subscrption to window server events - */ - IMPORT_C ~CTsWindowGroupsObserver(); - -protected: - /** - * First phase constructor - */ - IMPORT_C CTsWindowGroupsObserver(MTsWindowGroupsMonitor &); - - /** - * Second phase constructor. - * Function automaticly subscribe window server events - */ - IMPORT_C void BaseConstructL(); - -private: - MTsWindowGroupsMonitor & mMonitor; -}; - -/** - * Window server monitor implementation. - */ -class CTsWindowGroupsMonitor: public CActive, - public MTsWindowGroupsMonitor - -{ -public: - /** - * Two phase constructor - */ - IMPORT_C static CTsWindowGroupsMonitor* NewL(MTsResourceManager &); - - /** - * Destructor - */ - IMPORT_C ~CTsWindowGroupsMonitor(); - - /** - * @see MTsWindowGroupsMonitor::SubscribeL - */ - IMPORT_C void SubscribeL(MTsWindowGroupsObserver &); - - /** - * @see MTsWindowGroupsMonitor::Cancel - */ - IMPORT_C void Cancel(MTsWindowGroupsObserver &); - -protected: - /** - * @see CActive::RunL - */ - void RunL(); - - /** - * @see CActive::DoCancel - */ - void DoCancel(); - - /** - * @see CActive::RunError - */ - TInt RunError(TInt error); - -private: - /** - * First phase constructor - */ - CTsWindowGroupsMonitor(MTsResourceManager &); - - /** - * Second phase constructor - */ - void ConstructL(); - - /** - * Function subscribe for event to window server and activate object - */ - void Subscribe(); - - /** - * Function provide window server event to observers - */ - void ProvideEventL(); - - /** - * Function provide window server event to observer - */ - void ProvideEventL(TWsEvent, MTsWindowGroupsObserver &); - -private: - /** - * Registry of subscribed observers - */ - RPointerArray mObservers; - - /** - * Resources manager - */ - MTsResourceManager &mResources; - - /** - * Monitor window group - */ - RWindowGroup mWg; -}; -#endif //TSWINDOWGROUPSOBSERVER_H diff -r dbfb5e38438b -r 305818acdca4 activityfw/tsutils/src/tsgraphicfilescalinghandler.cpp --- a/activityfw/tsutils/src/tsgraphicfilescalinghandler.cpp Wed Aug 18 10:39:24 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,285 +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 "tsgraphicfilescalinghandler.h" -#include - -// ----------------------------------------------------------------------------- -// ----------------------------------------------------------------------------- -// -CTsGraphicFileScalingHandler::CTsGraphicFileScalingHandler(MImageReadyCallBack &aNotify, - const TSize &aNewSize, - TKindOfScaling aKindOfScaling - /* = CTsGraphicFileScalingHandler::EIgnoreAspectRatio*/) : - CActive(EPriorityNormal), - mNotify(aNotify), - mNewSize(aNewSize), - mKindOfScaling(aKindOfScaling), - mCurrentOperation(ENone) -{ - CActiveScheduler::Add(this); -} - -// ----------------------------------------------------------------------------- -// ----------------------------------------------------------------------------- -// -EXPORT_C CTsGraphicFileScalingHandler::~CTsGraphicFileScalingHandler() -{ - Cancel(); - delete mInputBitmap; - delete mOutputBitmap; - delete mImageDecoder; - delete mBitmapScaler; -} - -// ----------------------------------------------------------------------------- -// ----------------------------------------------------------------------------- -// -EXPORT_C CTsGraphicFileScalingHandler* CTsGraphicFileScalingHandler::NewL(MImageReadyCallBack &aNotify, - RFs &aFs, - const TDesC &aFileName, - const TDesC8& aMimeType, - const TSize &aNewSize, - TKindOfScaling aKindOfScaling - /* = CTsGraphicFileScalingHandler::EIgnoreAspectRatio*/) -{ - CTsGraphicFileScalingHandler *self = CTsGraphicFileScalingHandler::NewLC(aNotify, - aFs, - aFileName, - aMimeType, - aNewSize, - aKindOfScaling); - CleanupStack::Pop(); - return self; -} - -// ----------------------------------------------------------------------------- -// ----------------------------------------------------------------------------- -// -EXPORT_C CTsGraphicFileScalingHandler* CTsGraphicFileScalingHandler::NewLC(MImageReadyCallBack &aNotify, - RFs &aFs, - const TDesC &aFileName, - const TDesC8& aMimeType, - const TSize &aNewSize, - TKindOfScaling aKindOfScaling - /* = CTsGraphicFileScalingHandler::EIgnoreAspectRatio*/) -{ - CTsGraphicFileScalingHandler *self = new (ELeave) CTsGraphicFileScalingHandler(aNotify, - aNewSize, - aKindOfScaling); - - CleanupStack::PushL(self); - self->ConstructL(aFs, aFileName, aMimeType); - return self; -} - -// ----------------------------------------------------------------------------- -// ----------------------------------------------------------------------------- -// -void CTsGraphicFileScalingHandler::ConstructL(RFs &aFs, const TDesC &aFileName, const TDesC8& aMimeType) -{ - if (aFileName.Length() == 0 - || aFs.IsValidName(aFileName) == EFalse) { - User::Leave(KErrPathNotFound); - } - - if (aMimeType.Length() == 0) { - User::Leave(KErrBadName); - } - - if (0>=mNewSize.iWidth || 0>=mNewSize.iHeight) { - User::Leave(KErrCorrupt); - } - - mInputBitmap = new(ELeave)CFbsBitmap(); - DecodingOperationL(aFs, aFileName, aMimeType); - SetActive(); -} - -// ----------------------------------------------------------------------------- -// ----------------------------------------------------------------------------- -// -EXPORT_C CTsGraphicFileScalingHandler* CTsGraphicFileScalingHandler::NewL(MImageReadyCallBack &aNotify, - const CFbsBitmap &aImputFbsBitmap, - const TSize &aNewSize, - TKindOfScaling aKindOfScaling - /* = CTsGraphicFileScalingHandler::EIgnoreAspectRatio*/) -{ - CTsGraphicFileScalingHandler *self = CTsGraphicFileScalingHandler::NewLC(aNotify, - aImputFbsBitmap, - aNewSize, - aKindOfScaling); - CleanupStack::Pop(); - return self; -} - -// ----------------------------------------------------------------------------- -// ----------------------------------------------------------------------------- -// -EXPORT_C CTsGraphicFileScalingHandler* CTsGraphicFileScalingHandler::NewLC(MImageReadyCallBack &aNotify, - const CFbsBitmap &aImputFbsBitmap, - const TSize &aNewSize, - TKindOfScaling aKindOfScaling - /* = CTsGraphicFileScalingHandler::EIgnoreAspectRatio*/) -{ - CTsGraphicFileScalingHandler *self = new (ELeave) CTsGraphicFileScalingHandler(aNotify, - aNewSize, - aKindOfScaling); - - CleanupStack::PushL(self); - self->ConstructL(aImputFbsBitmap); - return self; -} - -// ----------------------------------------------------------------------------- -// ----------------------------------------------------------------------------- -// -void CTsGraphicFileScalingHandler::ConstructL(const CFbsBitmap &aImputFbsBitmap) -{ - if (0>=mNewSize.iWidth || 0>=mNewSize.iHeight) { - User::Leave(KErrCorrupt); - } - - mInputBitmap = new(ELeave)CFbsBitmap(); - User::LeaveIfError(mInputBitmap->Duplicate(aImputFbsBitmap.Handle())); - - ScalingOperationL(); - SetActive(); -} - -// ----------------------------------------------------------------------------- -// ----------------------------------------------------------------------------- -// -void CTsGraphicFileScalingHandler::DoCancel() -{ - switch (mCurrentOperation) { - case EConvertBitmapFromFile: - mImageDecoder->Cancel(); - break; - case EScale: - mBitmapScaler->Cancel(); - break; - } - mNotify.ImageReadyCallBack(KErrCancel, 0); -} - -// ----------------------------------------------------------------------------- -// ----------------------------------------------------------------------------- -// -void CTsGraphicFileScalingHandler::RunL() -{ - User::LeaveIfError(iStatus.Int()); - - switch (mCurrentOperation) { - case EConvertBitmapFromFile: { - delete mImageDecoder; - mImageDecoder = 0; - - ScalingOperationL(); - SetActive(); - break; - } - case EScale: { - mCurrentOperation = ENone; - - delete mBitmapScaler; - mBitmapScaler = 0; - - delete mInputBitmap; - mInputBitmap = 0; - - if (mKindOfScaling == CTsGraphicFileScalingHandler::EKeepAspectRatioByExpanding) { - User::LeaveIfError(mOutputBitmap->Resize(mNewSize)); - } - - mNotify.ImageReadyCallBack(iStatus.Int(), mOutputBitmap); - break; - } - } -} - -// ----------------------------------------------------------------------------- -// ----------------------------------------------------------------------------- -// -void CTsGraphicFileScalingHandler::DecodingOperationL(RFs &aFs, const TDesC &aFileName, const TDesC8& aMimeType) -{ - // convert *.png to bitmap - mImageDecoder = CImageDecoder::FileNewL(aFs, aFileName, aMimeType); - const TFrameInfo frameInfo(mImageDecoder->FrameInfo(0)); - mInputBitmap->Reset(); - User::LeaveIfError(mInputBitmap->Create(frameInfo.iOverallSizeInPixels, - frameInfo.iFrameDisplayMode)); - - mImageDecoder->Convert(&iStatus, *mInputBitmap, 0); - mCurrentOperation = EConvertBitmapFromFile; -} - -// ----------------------------------------------------------------------------- -// ----------------------------------------------------------------------------- -// -void CTsGraphicFileScalingHandler::ScalingOperationL() -{ - mBitmapScaler = CBitmapScaler::NewL(); - mBitmapScaler->SetQualityAlgorithm(CBitmapScaler::EMaximumQuality); - - FixForDisplayModeNotSupportedByScalingOperation(); - - mOutputBitmap = new (ELeave)CFbsBitmap(); - User::LeaveIfError(mOutputBitmap->Create(NewSizeToScalingOperation(), mInputBitmap->DisplayMode())); - mBitmapScaler->Scale(&iStatus, *mInputBitmap, *mOutputBitmap, EFalse); - mCurrentOperation = EScale; -} - -// ----------------------------------------------------------------------------- -// ----------------------------------------------------------------------------- -// -void CTsGraphicFileScalingHandler::FixForDisplayModeNotSupportedByScalingOperation() -{ - if (EColor16MAP == mInputBitmap->DisplayMode()) { - mInputBitmap->SetDisplayMode(EColor16MA); - } -} - -// ----------------------------------------------------------------------------- -// ----------------------------------------------------------------------------- -// -TSize CTsGraphicFileScalingHandler::NewSizeToScalingOperation() -{ - TSize originalSize = mInputBitmap->SizeInPixels(); - float widthFactor = mNewSize.iWidth / (float)originalSize.iWidth; - float heightFactor = mNewSize.iHeight / (float)originalSize.iHeight; - - TSize retSize(mNewSize); - - if (mKindOfScaling == CTsGraphicFileScalingHandler::EKeepAspectRatio) { - retSize = (widthFactor < heightFactor) ? - TSize(mNewSize.iWidth, widthFactor * originalSize.iHeight) : - TSize(heightFactor * originalSize.iWidth, mNewSize.iHeight); - } else if (mKindOfScaling == CTsGraphicFileScalingHandler::EKeepAspectRatioByExpanding) { - retSize = (widthFactor < heightFactor) ? - TSize(heightFactor * originalSize.iWidth, mNewSize.iHeight) : - TSize(mNewSize.iWidth, widthFactor * originalSize.iHeight); - } - return retSize; -} -// ----------------------------------------------------------------------------- -// ----------------------------------------------------------------------------- -// -TInt CTsGraphicFileScalingHandler::RunError(TInt aError) -{ - mNotify.ImageReadyCallBack(aError, 0); - return KErrNone; -} diff -r dbfb5e38438b -r 305818acdca4 activityfw/tsutils/src/tsresourcemanager.cpp --- a/activityfw/tsutils/src/tsresourcemanager.cpp Wed Aug 18 10:39:24 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,67 +0,0 @@ -/* - * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). - * All rights reserved. - * This component and the accompanying materials are made available - * under the terms of "Eclipse Public License v1.0" - * which accompanies this distribution, and is available - * at the URL "http://www.eclipse.org/legal/epl-v10.html". - * - * Initial Contributors: - * Nokia Corporation - initial contribution. - * - * Contributors: - * - * Description : - * - */ -#include "tswindowgroupsobserver.h" -// ----------------------------------------------------------------------------- -// -// ----------------------------------------------------------------------------- -// -EXPORT_C CTsResourceManager* CTsResourceManager::NewL() -{ - CTsResourceManager* self =new(ELeave) CTsResourceManager(); - CleanupStack::PushL(self); - self->ConstructL(); - CleanupStack::Pop(self); - return self; -} - -// ----------------------------------------------------------------------------- -// -// ----------------------------------------------------------------------------- -// -void CTsResourceManager::ConstructL() -{ - User::LeaveIfError(mWsSession.Connect()); - User::LeaveIfError(mApaSeesion.Connect()); -} - -// ----------------------------------------------------------------------------- -// -// ----------------------------------------------------------------------------- -// -EXPORT_C CTsResourceManager::~CTsResourceManager() -{ - mApaSeesion.Close(); - mWsSession.Close(); -} - -// ----------------------------------------------------------------------------- -// -// ----------------------------------------------------------------------------- -// -EXPORT_C RWsSession& CTsResourceManager::WsSession() -{ - return mWsSession; -} - -// ----------------------------------------------------------------------------- -// -// ----------------------------------------------------------------------------- -// -EXPORT_C RApaLsSession& CTsResourceManager::ApaSession() -{ - return mApaSeesion; -} diff -r dbfb5e38438b -r 305818acdca4 activityfw/tsutils/src/tswindowgroupsmonitor.cpp --- a/activityfw/tsutils/src/tswindowgroupsmonitor.cpp Wed Aug 18 10:39:24 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,176 +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 - -const int KOrdinalPositionNoZOrder(-1); -// ----------------------------------------------------------------------------- -// -// ----------------------------------------------------------------------------- -// -EXPORT_C CTsWindowGroupsMonitor* CTsWindowGroupsMonitor::NewL(MTsResourceManager &resources) -{ - CTsWindowGroupsMonitor* self = new (ELeave) CTsWindowGroupsMonitor(resources); - CleanupStack::PushL(self); - self->ConstructL(); - CleanupStack::Pop(self); - return self; -} - -// ----------------------------------------------------------------------------- -// -// ----------------------------------------------------------------------------- -// -CTsWindowGroupsMonitor::CTsWindowGroupsMonitor(MTsResourceManager &resources) -: - CActive(EPriorityStandard), - mResources(resources) -{ - CActiveScheduler::Add(this); -} - -// ----------------------------------------------------------------------------- -// -// ----------------------------------------------------------------------------- -// -void CTsWindowGroupsMonitor::ConstructL() -{ - - // Initial window group - mWg = RWindowGroup (mResources.WsSession()); - User::LeaveIfError (mWg.Construct ((TUint32)&mWg, EFalse)); - mWg.SetOrdinalPosition (KOrdinalPositionNoZOrder); - mWg.EnableReceiptOfFocus (EFalse); - - // Hide window - CApaWindowGroupName* wn = CApaWindowGroupName::NewLC(mResources.WsSession()); - wn->SetHidden (ETrue); - wn->SetWindowGroupName (mWg); - CleanupStack::PopAndDestroy (wn); - - // Window group change event - User::LeaveIfError (mWg.EnableGroupListChangeEvents()); - Subscribe(); -} - -// ----------------------------------------------------------------------------- -// -// ----------------------------------------------------------------------------- -// -EXPORT_C CTsWindowGroupsMonitor::~CTsWindowGroupsMonitor() -{ - CActive::Cancel(); - mWg.Close(); -} - -// ----------------------------------------------------------------------------- -// -// ----------------------------------------------------------------------------- -// -EXPORT_C void CTsWindowGroupsMonitor::SubscribeL(MTsWindowGroupsObserver &observer) -{ - const TInt offset(mObservers.Find(&observer)); - KErrNotFound == offset ? mObservers.InsertL(&observer, 0) : - User::Leave(KErrAlreadyExists); -} - -// ----------------------------------------------------------------------------- -// -// ----------------------------------------------------------------------------- -// -EXPORT_C void CTsWindowGroupsMonitor::Cancel(MTsWindowGroupsObserver & observer) -{ - const TInt offset(mObservers.Find(&observer)); - if (KErrNotFound != offset) { - mObservers.Remove(offset); - } -} - -// ----------------------------------------------------------------------------- -// -// ----------------------------------------------------------------------------- -// -void CTsWindowGroupsMonitor::RunL() -{ - User::LeaveIfError(iStatus.Int()); - ProvideEventL(); - Subscribe(); -} - -// ----------------------------------------------------------------------------- -// -// ----------------------------------------------------------------------------- -// -void CTsWindowGroupsMonitor::DoCancel() -{ - if (IsActive()) { - mResources.WsSession().EventReadyCancel(); - } -} - -// ----------------------------------------------------------------------------- -// -// ----------------------------------------------------------------------------- -// -TInt CTsWindowGroupsMonitor::RunError(TInt error) -{ - if (!IsActive() && KErrCancel != error) { - Subscribe(); - } - return KErrNone; -} - -// ----------------------------------------------------------------------------- -// -// ----------------------------------------------------------------------------- -// -void CTsWindowGroupsMonitor::Subscribe() -{ - mResources.WsSession().EventReady( &iStatus ); - SetActive(); -} - -// ----------------------------------------------------------------------------- -// -// ----------------------------------------------------------------------------- -// -void CTsWindowGroupsMonitor::ProvideEventL() -{ - TWsEvent wsEvent; - mResources.WsSession().GetEvent(wsEvent); - for (TInt iter(0); iter < mObservers.Count(); ++iter) { - ProvideEventL(wsEvent, *mObservers[iter]); - } -} - -// ----------------------------------------------------------------------------- -// -// ----------------------------------------------------------------------------- -// -void CTsWindowGroupsMonitor::ProvideEventL(TWsEvent event, - MTsWindowGroupsObserver &observer) -{ - RArray wgInfo; - CleanupClosePushL(wgInfo); - switch(event.Type()) { - case EEventWindowGroupListChanged: - User::LeaveIfError(mResources.WsSession().WindowGroupList(0, &wgInfo)); - observer.HandleWindowGroupChanged(mResources, wgInfo.Array()); - break; - } - CleanupStack::PopAndDestroy(&wgInfo); -} diff -r dbfb5e38438b -r 305818acdca4 activityfw/tsutils/src/tswindowgroupsobserver.cpp --- a/activityfw/tsutils/src/tswindowgroupsobserver.cpp Wed Aug 18 10:39:24 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 "tswindowgroupsobserver.h" -// ----------------------------------------------------------------------------- -// -// ----------------------------------------------------------------------------- -// -EXPORT_C CTsWindowGroupsObserver::CTsWindowGroupsObserver(MTsWindowGroupsMonitor & monitor) -: - mMonitor(monitor) -{} - -// ----------------------------------------------------------------------------- -// -// ----------------------------------------------------------------------------- -// -EXPORT_C void CTsWindowGroupsObserver::BaseConstructL() -{ - mMonitor.SubscribeL(*this); -} - -// ----------------------------------------------------------------------------- -// -// ----------------------------------------------------------------------------- -// -EXPORT_C CTsWindowGroupsObserver::~CTsWindowGroupsObserver() -{ - mMonitor.Cancel(*this); -} diff -r dbfb5e38438b -r 305818acdca4 activityfw/tsutils/tsutils.pro --- a/activityfw/tsutils/tsutils.pro Wed Aug 18 10:39:24 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,18 +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\"" diff -r dbfb5e38438b -r 305818acdca4 contentstorage/caclient/bwins/caclientu.def --- a/contentstorage/caclient/bwins/caclientu.def Wed Aug 18 10:39:24 2010 +0300 +++ b/contentstorage/caclient/bwins/caclientu.def Mon Sep 13 13:26:33 2010 +0300 @@ -19,164 +19,164 @@ ?setDescription@CaEntry@@QAEXABVQString@@_N@Z @ 18 NONAME ; void CaEntry::setDescription(class QString const &, bool) ??0CaQuery@@QAE@XZ @ 19 NONAME ; CaQuery::CaQuery(void) ?setIconSize@CaItemModel@@QAEXABVQSizeF@@@Z @ 20 NONAME ; void CaItemModel::setIconSize(class QSizeF const &) - ?flagsOff@CaQuery@@QBE?AV?$QFlags@W4EntryFlag@@@@XZ @ 21 NONAME ; class QFlags CaQuery::flagsOff(void) const - ?skinId@CaIconDescription@@QBE?AVQString@@XZ @ 22 NONAME ; class QString CaIconDescription::skinId(void) const - ?setParentId@CaQuery@@QAEXH@Z @ 23 NONAME ; void CaQuery::setParentId(int) - ?removeEntriesFromGroup@CaService@@QBE_NABVCaEntry@@ABV?$QList@V?$QSharedPointer@VCaEntry@@@@@@@Z @ 24 NONAME ; bool CaService::removeEntriesFromGroup(class CaEntry const &, class QList > const &) const - ?qt_metacall@CaClientNotifierProxy@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 25 NONAME ; int CaClientNotifierProxy::qt_metacall(enum QMetaObject::Call, int, void * *) - ??_ECaItemModel@@UAE@I@Z @ 26 NONAME ; CaItemModel::~CaItemModel(unsigned int) - ?setSecondLineVisibility@CaItemModel@@QAEX_N@Z @ 27 NONAME ; void CaItemModel::setSecondLineVisibility(bool) - ?secondLineVisibility@CaItemModel@@QBE_NXZ @ 28 NONAME ; bool CaItemModel::secondLineVisibility(void) const - ?instance@CaService@@SA?AV?$QSharedPointer@VCaService@@@@XZ @ 29 NONAME ; class QSharedPointer CaService::instance(void) - ??1CaIconDescription@@QAE@XZ @ 30 NONAME ; CaIconDescription::~CaIconDescription(void) - ??_ECaNotifier@@UAE@I@Z @ 31 NONAME ; CaNotifier::~CaNotifier(unsigned int) - ?removeEntriesFromGroup@CaService@@QBE_NHABV?$QList@H@@@Z @ 32 NONAME ; bool CaService::removeEntriesFromGroup(int, class QList const &) const - ?appendEntriesToGroup@CaService@@QBE_NHABV?$QList@H@@@Z @ 33 NONAME ; bool CaService::appendEntriesToGroup(int, class QList const &) const - ?createNotifier@CaService@@QBEPAVCaNotifier@@ABVCaNotifierFilter@@@Z @ 34 NONAME ; class CaNotifier * CaService::createNotifier(class CaNotifierFilter const &) const - ?setSkinId@CaIconDescription@@QAEXABVQString@@@Z @ 35 NONAME ; void CaIconDescription::setSkinId(class QString const &) - ?metaObject@CaClientNotifierProxy@@UBEPBUQMetaObject@@XZ @ 36 NONAME ; struct QMetaObject const * CaClientNotifierProxy::metaObject(void) const - ?m_instance@CaService@@0V?$QWeakPointer@VCaService@@@@A @ 37 NONAME ; class QWeakPointer CaService::m_instance - ?getEntryRole@CaNotifierFilter@@QBE?AV?$QFlags@W4EntryRole@@@@XZ @ 38 NONAME ; class QFlags CaNotifierFilter::getEntryRole(void) const - ?root@CaItemModel@@QBE?AVQModelIndex@@XZ @ 39 NONAME ; class QModelIndex CaItemModel::root(void) const - ?prependEntryToGroup@CaService@@QBE_NABVCaEntry@@0@Z @ 40 NONAME ; bool CaService::prependEntryToGroup(class CaEntry const &, class CaEntry const &) const - ??1CaQuery@@QAE@XZ @ 41 NONAME ; CaQuery::~CaQuery(void) - ?setCount@CaQuery@@QAEXI@Z @ 42 NONAME ; void CaQuery::setCount(unsigned int) - ?id@CaIconDescription@@QBEHXZ @ 43 NONAME ; int CaIconDescription::id(void) const - ?getEntries@CaService@@QBE?AV?$QList@V?$QSharedPointer@VCaEntry@@@@@@ABVCaQuery@@@Z @ 44 NONAME ; class QList > CaService::getEntries(class CaQuery const &) const - ?trUtf8@CaNotifier@@SA?AVQString@@PBD0@Z @ 45 NONAME ; class QString CaNotifier::trUtf8(char const *, char const *) - ??0CaNotifier@@QAE@PAVCaNotifierPrivate@@@Z @ 46 NONAME ; CaNotifier::CaNotifier(class CaNotifierPrivate *) - ?trUtf8@CaNotifier@@SA?AVQString@@PBD0H@Z @ 47 NONAME ; class QString CaNotifier::trUtf8(char const *, char const *, int) - ?getStaticMetaObject@CaItemModel@@SAABUQMetaObject@@XZ @ 48 NONAME ; struct QMetaObject const & CaItemModel::getStaticMetaObject(void) - ?trUtf8@CaItemModel@@SA?AVQString@@PBD0@Z @ 49 NONAME ; class QString CaItemModel::trUtf8(char const *, char const *) - ?newSession@CaClientNotifierProxy@@AAEPAVRCaClientNotifierSession@@AAH@Z @ 50 NONAME ; class RCaClientNotifierSession * CaClientNotifierProxy::newSession(int &) - ?entryChanged@CaNotifier@@IAEXABVCaEntry@@W4ChangeType@@@Z @ 51 NONAME ; void CaNotifier::entryChanged(class CaEntry const &, enum ChangeType) - ?attribute@CaEntry@@QBE?AVQString@@ABV2@@Z @ 52 NONAME ; class QString CaEntry::attribute(class QString const &) const - ?metaObject@CaService@@UBEPBUQMetaObject@@XZ @ 53 NONAME ; struct QMetaObject const * CaService::metaObject(void) const - ?entryChanged@CaNotifier@@IAEXHW4ChangeType@@@Z @ 54 NONAME ; void CaNotifier::entryChanged(int, enum ChangeType) - ?getStaticMetaObject@CaClientNotifierProxy@@SAABUQMetaObject@@XZ @ 55 NONAME ; struct QMetaObject const & CaClientNotifierProxy::getStaticMetaObject(void) - ?registerNotifier@CaClientNotifierProxy@@QAEHPBVCaNotifierFilter@@W4NotifierType@CaNotifierPrivate@@PBVIDataObserver@@@Z @ 56 NONAME ; int CaClientNotifierProxy::registerNotifier(class CaNotifierFilter const *, enum CaNotifierPrivate::NotifierType, class IDataObserver const *) - ??_ECaClientNotifierProxy@@UAE@I@Z @ 57 NONAME ; CaClientNotifierProxy::~CaClientNotifierProxy(unsigned int) - ??0CaNotifierFilter@@QAE@XZ @ 58 NONAME ; CaNotifierFilter::CaNotifierFilter(void) - ?childId@CaQuery@@QBEHXZ @ 59 NONAME ; int CaQuery::childId(void) const - ?removeEntries@CaService@@QBE_NABV?$QList@H@@@Z @ 60 NONAME ; bool CaService::removeEntries(class QList const &) const - ?entryTouched@CaNotifier@@IAEXH@Z @ 61 NONAME ; void CaNotifier::entryTouched(int) - ?customSort@CaService@@QBE_NHAAV?$QList@H@@@Z @ 62 NONAME ; bool CaService::customSort(int, class QList &) const - ?groupContentChanged@CaNotifier@@IAEXH@Z @ 63 NONAME ; void CaNotifier::groupContentChanged(int) - ?tr@CaNotifier@@SA?AVQString@@PBD0@Z @ 64 NONAME ; class QString CaNotifier::tr(char const *, char const *) - ?setChildId@CaQuery@@QAEXH@Z @ 65 NONAME ; void CaQuery::setChildId(int) - ?findSession@CaClientNotifierProxy@@AAEPAVRCaClientNotifierSession@@XZ @ 66 NONAME ; class RCaClientNotifierSession * CaClientNotifierProxy::findSession(void) - ??1CaItemModel@@UAE@XZ @ 67 NONAME ; CaItemModel::~CaItemModel(void) - ?attributes@CaEntry@@QBE?AV?$QMap@VQString@@V1@@@XZ @ 68 NONAME ; class QMap CaEntry::attributes(void) const - ?connectNotify@CaNotifier@@MAEXPBD@Z @ 69 NONAME ; void CaNotifier::connectNotify(char const *) - ?setEntryRole@CaNotifierFilter@@QAEXV?$QFlags@W4EntryRole@@@@@Z @ 70 NONAME ; void CaNotifierFilter::setEntryRole(class QFlags) - ??1CaClientNotifierProxy@@UAE@XZ @ 71 NONAME ; CaClientNotifierProxy::~CaClientNotifierProxy(void) - ?staticMetaObject@CaItemModel@@2UQMetaObject@@B @ 72 NONAME ; struct QMetaObject const CaItemModel::staticMetaObject - ?role@CaEntry@@QBE?AW4EntryRole@@XZ @ 73 NONAME ; enum EntryRole CaEntry::role(void) const - ?qt_metacast@CaNotifier@@UAEPAXPBD@Z @ 74 NONAME ; void * CaNotifier::qt_metacast(char const *) - ?text@CaEntry@@QBE?AVQString@@XZ @ 75 NONAME ; class QString CaEntry::text(void) const - ?tr@CaClientNotifierProxy@@SA?AVQString@@PBD0@Z @ 76 NONAME ; class QString CaClientNotifierProxy::tr(char const *, char const *) - ?getUninstallingEntriesIds@CaItemModel@@QAE?AV?$QList@H@@H@Z @ 77 NONAME ; class QList CaItemModel::getUninstallingEntriesIds(int) - ?columnCount@CaItemModel@@UBEHABVQModelIndex@@@Z @ 78 NONAME ; int CaItemModel::columnCount(class QModelIndex const &) const - ?entryChanged@CaService@@IAEXABVCaEntry@@W4ChangeType@@@Z @ 79 NONAME ; void CaService::entryChanged(class CaEntry const &, enum ChangeType) - ?scrollTo@CaItemModel@@IAEXHW4ScrollHint@QAbstractItemView@@@Z @ 80 NONAME ; void CaItemModel::scrollTo(int, enum QAbstractItemView::ScrollHint) - ??0CaIconDescription@@QAE@XZ @ 81 NONAME ; CaIconDescription::CaIconDescription(void) - ?attribute@CaQuery@@QBE?AVQString@@ABV2@@Z @ 82 NONAME ; class QString CaQuery::attribute(class QString const &) const - ?staticMetaObject@CaClientNotifierProxy@@2UQMetaObject@@B @ 83 NONAME ; struct QMetaObject const CaClientNotifierProxy::staticMetaObject - ??_ECaNotifierFilter@@UAE@I@Z @ 84 NONAME ; CaNotifierFilter::~CaNotifierFilter(unsigned int) - ?trUtf8@CaClientNotifierProxy@@SA?AVQString@@PBD0@Z @ 85 NONAME ; class QString CaClientNotifierProxy::trUtf8(char const *, char const *) - ?getStaticMetaObject@CaService@@SAABUQMetaObject@@XZ @ 86 NONAME ; struct QMetaObject const & CaService::getStaticMetaObject(void) - ?touch@CaService@@QBE_NABVCaEntry@@@Z @ 87 NONAME ; bool CaService::touch(class CaEntry const &) const - ?getEntries@CaService@@QBE?AV?$QList@V?$QSharedPointer@VCaEntry@@@@@@ABV?$QList@H@@@Z @ 88 NONAME ; class QList > CaService::getEntries(class QList const &) const - ??0CaNotifierFilter@@QAE@ABV0@@Z @ 89 NONAME ; CaNotifierFilter::CaNotifierFilter(class CaNotifierFilter const &) - ?getTypeNames@CaNotifierFilter@@QBE?AVQStringList@@XZ @ 90 NONAME ; class QStringList CaNotifierFilter::getTypeNames(void) const - ?entryTouched@CaService@@IAEXH@Z @ 91 NONAME ; void CaService::entryTouched(int) - ?disconnectNotify@CaNotifier@@MAEXPBD@Z @ 92 NONAME ; void CaNotifier::disconnectNotify(char const *) - ?removeEntryFromGroup@CaService@@QBE_NABVCaEntry@@0@Z @ 93 NONAME ; bool CaService::removeEntryFromGroup(class CaEntry const &, class CaEntry const &) const - ?setId@CaIconDescription@@AAEXH@Z @ 94 NONAME ; void CaIconDescription::setId(int) - ?setFilename@CaIconDescription@@QAEXABVQString@@@Z @ 95 NONAME ; void CaIconDescription::setFilename(class QString const &) - ?setEntryTypeName@CaEntry@@QAEXABVQString@@@Z @ 96 NONAME ; void CaEntry::setEntryTypeName(class QString const &) - ??4CaQuery@@QAEAAV0@ABV0@@Z @ 97 NONAME ; class CaQuery & CaQuery::operator=(class CaQuery const &) - ??1CaNotifierFilter@@UAE@XZ @ 98 NONAME ; CaNotifierFilter::~CaNotifierFilter(void) - ?entryTypeName@CaEntry@@QBE?AVQString@@XZ @ 99 NONAME ; class QString CaEntry::entryTypeName(void) const - ?trUtf8@CaService@@SA?AVQString@@PBD0@Z @ 100 NONAME ; class QString CaService::trUtf8(char const *, char const *) - ?groupContentChanged@CaService@@IAEXH@Z @ 101 NONAME ; void CaService::groupContentChanged(int) - ?connectSessions@CaClientNotifierProxy@@QAEXXZ @ 102 NONAME ; void CaClientNotifierProxy::connectSessions(void) - ?insertEntriesIntoGroup@CaService@@QBE_NABVCaEntry@@ABV?$QList@V?$QSharedPointer@VCaEntry@@@@@@H@Z @ 103 NONAME ; bool CaService::insertEntriesIntoGroup(class CaEntry const &, class QList > const &, int) const - ??4CaIconDescription@@QAEAAV0@ABV0@@Z @ 104 NONAME ; class CaIconDescription & CaIconDescription::operator=(class CaIconDescription const &) - ?count@CaQuery@@QBEIXZ @ 105 NONAME ; unsigned int CaQuery::count(void) const - ?appendEntriesToGroup@CaService@@QBE_NABVCaEntry@@ABV?$QList@V?$QSharedPointer@VCaEntry@@@@@@@Z @ 106 NONAME ; bool CaService::appendEntriesToGroup(class CaEntry const &, class QList > const &) const - ?id@CaEntry@@QBEHXZ @ 107 NONAME ; int CaEntry::id(void) const - ?removeEntries@CaService@@QBE_NABV?$QList@V?$QSharedPointer@VCaEntry@@@@@@@Z @ 108 NONAME ; bool CaService::removeEntries(class QList > const &) const - ?updateModel@CaItemModel@@QAEXXZ @ 109 NONAME ; void CaItemModel::updateModel(void) - ?setFlags@CaEntry@@QAEXV?$QFlags@W4EntryFlag@@@@@Z @ 110 NONAME ; void CaEntry::setFlags(class QFlags) - ?insertEntryIntoGroup@CaService@@QBE_NHHH@Z @ 111 NONAME ; bool CaService::insertEntryIntoGroup(int, int, int) const - ?qt_metacast@CaService@@UAEPAXPBD@Z @ 112 NONAME ; void * CaService::qt_metacast(char const *) - ?setFlagsOn@CaItemModel@@QAEXABV?$QFlags@W4EntryFlag@@@@@Z @ 113 NONAME ; void CaItemModel::setFlagsOn(class QFlags const &) - ??0CaQuery@@QAE@ABV0@@Z @ 114 NONAME ; CaQuery::CaQuery(class CaQuery const &) - ?iconDescription@CaEntry@@QBE?AVCaIconDescription@@XZ @ 115 NONAME ; class CaIconDescription CaEntry::iconDescription(void) const - ?trUtf8@CaService@@SA?AVQString@@PBD0H@Z @ 116 NONAME ; class QString CaService::trUtf8(char const *, char const *, int) - ?createEntry@CaService@@QBE?AV?$QSharedPointer@VCaEntry@@@@ABVCaEntry@@@Z @ 117 NONAME ; class QSharedPointer CaService::createEntry(class CaEntry const &) const - ??0CaNotifierFilter@@QAE@ABVCaQuery@@@Z @ 118 NONAME ; CaNotifierFilter::CaNotifierFilter(class CaQuery const &) - ?setEntryTypeNames@CaQuery@@QAEXABVQStringList@@@Z @ 119 NONAME ; void CaQuery::setEntryTypeNames(class QStringList const &) - ?updateProgress@CaItemModel@@QAEXHH@Z @ 120 NONAME ; void CaItemModel::updateProgress(int, int) - ?qt_metacall@CaItemModel@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 121 NONAME ; int CaItemModel::qt_metacall(enum QMetaObject::Call, int, void * *) - ?setText@CaEntry@@QAEXABVQString@@_N@Z @ 122 NONAME ; void CaEntry::setText(class QString const &, bool) - ?removeAttribute@CaQuery@@QAEXABVQString@@@Z @ 123 NONAME ; void CaQuery::removeAttribute(class QString const &) - ?insertEntryIntoGroup@CaService@@QBE_NABVCaEntry@@0H@Z @ 124 NONAME ; bool CaService::insertEntryIntoGroup(class CaEntry const &, class CaEntry const &, int) const - ?setApplicationId@CaIconDescription@@QAEXABVQString@@@Z @ 125 NONAME ; void CaIconDescription::setApplicationId(class QString const &) - ?appendEntryToGroup@CaService@@QBE_NABVCaEntry@@0@Z @ 126 NONAME ; bool CaService::appendEntryToGroup(class CaEntry const &, class CaEntry const &) const - ?executeCommand@CaService@@QBEHHABVQString@@@Z @ 127 NONAME ; int CaService::executeCommand(int, class QString const &) const - ?setAttribute@CaQuery@@QAEXABVQString@@0@Z @ 128 NONAME ; void CaQuery::setAttribute(class QString const &, class QString const &) - ?attributes@CaQuery@@QBE?AV?$QMap@VQString@@V1@@@XZ @ 129 NONAME ; class QMap CaQuery::attributes(void) const - ?updateEntry@CaService@@QBE_NABVCaEntry@@@Z @ 130 NONAME ; bool CaService::updateEntry(class CaEntry const &) const - ?setAttribute@CaEntry@@QAEXABVQString@@0@Z @ 131 NONAME ; void CaEntry::setAttribute(class QString const &, class QString const &) - ?unregisterNotifier@CaClientNotifierProxy@@QAEXABVCaNotifierFilter@@W4NotifierType@CaNotifierPrivate@@@Z @ 132 NONAME ; void CaClientNotifierProxy::unregisterNotifier(class CaNotifierFilter const &, enum CaNotifierPrivate::NotifierType) - ?setParentId@CaItemModel@@QAEXH@Z @ 133 NONAME ; void CaItemModel::setParentId(int) - ?countChange@CaItemModel@@IAEXXZ @ 134 NONAME ; void CaItemModel::countChange(void) - ?metaObject@CaItemModel@@UBEPBUQMetaObject@@XZ @ 135 NONAME ; struct QMetaObject const * CaItemModel::metaObject(void) const - ?makeIcon@CaEntry@@QBE?AVHbIcon@@ABVQSizeF@@@Z @ 136 NONAME ; class HbIcon CaEntry::makeIcon(class QSizeF const &) const - ?tr@CaItemModel@@SA?AVQString@@PBD0H@Z @ 137 NONAME ; class QString CaItemModel::tr(char const *, char const *, int) - ?setFlagsOff@CaQuery@@QAEXABV?$QFlags@W4EntryFlag@@@@@Z @ 138 NONAME ; void CaQuery::setFlagsOff(class QFlags const &) - ?getEntry@CaService@@QBE?AV?$QSharedPointer@VCaEntry@@@@H@Z @ 139 NONAME ; class QSharedPointer CaService::getEntry(int) const - ??0CaEntry@@QAE@ABV0@@Z @ 140 NONAME ; CaEntry::CaEntry(class CaEntry const &) - ?rowCount@CaItemModel@@UBEHABVQModelIndex@@@Z @ 141 NONAME ; int CaItemModel::rowCount(class QModelIndex const &) const - ?clear@CaQuery@@QAEXXZ @ 142 NONAME ; void CaQuery::clear(void) - ?prependEntryToGroup@CaService@@QBE_NHH@Z @ 143 NONAME ; bool CaService::prependEntryToGroup(int, int) const - ?qt_metacast@CaClientNotifierProxy@@UAEPAXPBD@Z @ 144 NONAME ; void * CaClientNotifierProxy::qt_metacast(char const *) - ?getEntryIcon@CaMenuIconUtility@@SA?AVHbIcon@@ABVCaEntry@@ABVQSizeF@@@Z @ 145 NONAME ; class HbIcon CaMenuIconUtility::getEntryIcon(class CaEntry const &, class QSizeF const &) - ?tr@CaService@@SA?AVQString@@PBD0H@Z @ 146 NONAME ; class QString CaService::tr(char const *, char const *, int) - ?entryRoles@CaQuery@@QBE?AV?$QFlags@W4EntryRole@@@@XZ @ 147 NONAME ; class QFlags CaQuery::entryRoles(void) const - ?qt_metacall@CaService@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 148 NONAME ; int CaService::qt_metacall(enum QMetaObject::Call, int, void * *) - ??4CaNotifierFilter@@QAEAAV0@ABV0@@Z @ 149 NONAME ; class CaNotifierFilter & CaNotifierFilter::operator=(class CaNotifierFilter const &) - ??0CaItemModel@@QAE@ABVCaQuery@@PAVQObject@@@Z @ 150 NONAME ; CaItemModel::CaItemModel(class CaQuery const &, class QObject *) - ?setFlagsOff@CaItemModel@@QAEXABV?$QFlags@W4EntryFlag@@@@@Z @ 151 NONAME ; void CaItemModel::setFlagsOff(class QFlags const &) - ?getSort@CaQuery@@QBEXAAW4SortAttribute@@AAW4SortOrder@Qt@@@Z @ 152 NONAME ; void CaQuery::getSort(enum SortAttribute &, enum Qt::SortOrder &) const - ?parentId@CaQuery@@QBEHXZ @ 153 NONAME ; int CaQuery::parentId(void) const - ?setEntryRoles@CaQuery@@QAEXV?$QFlags@W4EntryRole@@@@@Z @ 154 NONAME ; void CaQuery::setEntryRoles(class QFlags) - ??_ECaEntry@@UAE@I@Z @ 155 NONAME ; CaEntry::~CaEntry(unsigned int) - ??0CaService@@AAE@PAVQObject@@@Z @ 156 NONAME ; CaService::CaService(class QObject *) - ??1CaService@@EAE@XZ @ 157 NONAME ; CaService::~CaService(void) - ?flagsOn@CaQuery@@QBE?AV?$QFlags@W4EntryFlag@@@@XZ @ 158 NONAME ; class QFlags CaQuery::flagsOn(void) const - ?description@CaEntry@@QBE?AVQString@@XZ @ 159 NONAME ; class QString CaEntry::description(void) const - ?metaObject@CaNotifier@@UBEPBUQMetaObject@@XZ @ 160 NONAME ; struct QMetaObject const * CaNotifier::metaObject(void) const - ?data@CaItemModel@@UBE?AVQVariant@@ABVQModelIndex@@H@Z @ 161 NONAME ; class QVariant CaItemModel::data(class QModelIndex const &, int) const - ??0CaIconDescription@@QAE@ABV0@@Z @ 162 NONAME ; CaIconDescription::CaIconDescription(class CaIconDescription const &) - ?staticMetaObject@CaService@@2UQMetaObject@@B @ 163 NONAME ; struct QMetaObject const CaService::staticMetaObject - ?removeEntry@CaService@@QBE_NH@Z @ 164 NONAME ; bool CaService::removeEntry(int) const - ?addEntryTypeName@CaQuery@@QAEXABVQString@@@Z @ 165 NONAME ; void CaQuery::addEntryTypeName(class QString const &) - ?isAutoUpdate@CaItemModel@@QBE_NXZ @ 166 NONAME ; bool CaItemModel::isAutoUpdate(void) const - ??1CaEntry@@UAE@XZ @ 167 NONAME ; CaEntry::~CaEntry(void) - ?prependEntriesToGroup@CaService@@QBE_NABVCaEntry@@ABV?$QList@V?$QSharedPointer@VCaEntry@@@@@@@Z @ 168 NONAME ; bool CaService::prependEntriesToGroup(class CaEntry const &, class QList > const &) const - ?qt_metacall@CaNotifier@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 169 NONAME ; int CaNotifier::qt_metacall(enum QMetaObject::Call, int, void * *) - ?setSort@CaItemModel@@QAEXW4SortAttribute@@W4SortOrder@Qt@@@Z @ 170 NONAME ; void CaItemModel::setSort(enum SortAttribute, enum Qt::SortOrder) - ?removeEntry@CaService@@QBE_NABVCaEntry@@@Z @ 171 NONAME ; bool CaService::removeEntry(class CaEntry const &) const - ?setId@CaEntry@@AAEXH@Z @ 172 NONAME ; void CaEntry::setId(int) - ?staticMetaObject@CaNotifier@@2UQMetaObject@@B @ 173 NONAME ; struct QMetaObject const CaNotifier::staticMetaObject - ?applicationId@CaIconDescription@@QBE?AVQString@@XZ @ 174 NONAME ; class QString CaIconDescription::applicationId(void) const - ?getIds@CaNotifierFilter@@QBE?AV?$QList@H@@XZ @ 175 NONAME ; class QList CaNotifierFilter::getIds(void) const - ?setIds@CaNotifierFilter@@QAEXABV?$QList@H@@@Z @ 176 NONAME ; void CaNotifierFilter::setIds(class QList const &) - ??0CaEntry@@QAE@W4EntryRole@@@Z @ 177 NONAME ; CaEntry::CaEntry(enum EntryRole) - ?executeCommand@CaService@@QBEHABVCaEntry@@ABVQString@@@Z @ 178 NONAME ; int CaService::executeCommand(class CaEntry const &, class QString const &) const + ?executeCommand@CaService@@QBEHHABVQString@@PAVQObject@@PBD@Z @ 21 NONAME ; int CaService::executeCommand(int, class QString const &, class QObject *, char const *) const + ?flagsOff@CaQuery@@QBE?AV?$QFlags@W4EntryFlag@@@@XZ @ 22 NONAME ; class QFlags CaQuery::flagsOff(void) const + ?skinId@CaIconDescription@@QBE?AVQString@@XZ @ 23 NONAME ; class QString CaIconDescription::skinId(void) const + ?setParentId@CaQuery@@QAEXH@Z @ 24 NONAME ; void CaQuery::setParentId(int) + ?removeEntriesFromGroup@CaService@@QBE_NABVCaEntry@@ABV?$QList@V?$QSharedPointer@VCaEntry@@@@@@@Z @ 25 NONAME ; bool CaService::removeEntriesFromGroup(class CaEntry const &, class QList > const &) const + ?qt_metacall@CaClientNotifierProxy@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 26 NONAME ; int CaClientNotifierProxy::qt_metacall(enum QMetaObject::Call, int, void * *) + ??_ECaItemModel@@UAE@I@Z @ 27 NONAME ; CaItemModel::~CaItemModel(unsigned int) + ?setSecondLineVisibility@CaItemModel@@QAEX_N@Z @ 28 NONAME ; void CaItemModel::setSecondLineVisibility(bool) + ?secondLineVisibility@CaItemModel@@QBE_NXZ @ 29 NONAME ; bool CaItemModel::secondLineVisibility(void) const + ?instance@CaService@@SA?AV?$QSharedPointer@VCaService@@@@XZ @ 30 NONAME ; class QSharedPointer CaService::instance(void) + ??1CaIconDescription@@QAE@XZ @ 31 NONAME ; CaIconDescription::~CaIconDescription(void) + ??_ECaNotifier@@UAE@I@Z @ 32 NONAME ; CaNotifier::~CaNotifier(unsigned int) + ?removeEntriesFromGroup@CaService@@QBE_NHABV?$QList@H@@@Z @ 33 NONAME ; bool CaService::removeEntriesFromGroup(int, class QList const &) const + ?appendEntriesToGroup@CaService@@QBE_NHABV?$QList@H@@@Z @ 34 NONAME ; bool CaService::appendEntriesToGroup(int, class QList const &) const + ?createNotifier@CaService@@QBEPAVCaNotifier@@ABVCaNotifierFilter@@@Z @ 35 NONAME ; class CaNotifier * CaService::createNotifier(class CaNotifierFilter const &) const + ?setSkinId@CaIconDescription@@QAEXABVQString@@@Z @ 36 NONAME ; void CaIconDescription::setSkinId(class QString const &) + ?metaObject@CaClientNotifierProxy@@UBEPBUQMetaObject@@XZ @ 37 NONAME ; struct QMetaObject const * CaClientNotifierProxy::metaObject(void) const + ?m_instance@CaService@@0V?$QWeakPointer@VCaService@@@@A @ 38 NONAME ; class QWeakPointer CaService::m_instance + ?getEntryRole@CaNotifierFilter@@QBE?AV?$QFlags@W4EntryRole@@@@XZ @ 39 NONAME ; class QFlags CaNotifierFilter::getEntryRole(void) const + ?root@CaItemModel@@QBE?AVQModelIndex@@XZ @ 40 NONAME ; class QModelIndex CaItemModel::root(void) const + ?prependEntryToGroup@CaService@@QBE_NABVCaEntry@@0@Z @ 41 NONAME ; bool CaService::prependEntryToGroup(class CaEntry const &, class CaEntry const &) const + ??1CaQuery@@QAE@XZ @ 42 NONAME ; CaQuery::~CaQuery(void) + ?setCount@CaQuery@@QAEXI@Z @ 43 NONAME ; void CaQuery::setCount(unsigned int) + ?id@CaIconDescription@@QBEHXZ @ 44 NONAME ; int CaIconDescription::id(void) const + ?getEntries@CaService@@QBE?AV?$QList@V?$QSharedPointer@VCaEntry@@@@@@ABVCaQuery@@@Z @ 45 NONAME ; class QList > CaService::getEntries(class CaQuery const &) const + ?trUtf8@CaNotifier@@SA?AVQString@@PBD0@Z @ 46 NONAME ; class QString CaNotifier::trUtf8(char const *, char const *) + ??0CaNotifier@@QAE@PAVCaNotifierPrivate@@@Z @ 47 NONAME ; CaNotifier::CaNotifier(class CaNotifierPrivate *) + ?trUtf8@CaNotifier@@SA?AVQString@@PBD0H@Z @ 48 NONAME ; class QString CaNotifier::trUtf8(char const *, char const *, int) + ?getStaticMetaObject@CaItemModel@@SAABUQMetaObject@@XZ @ 49 NONAME ; struct QMetaObject const & CaItemModel::getStaticMetaObject(void) + ?trUtf8@CaItemModel@@SA?AVQString@@PBD0@Z @ 50 NONAME ; class QString CaItemModel::trUtf8(char const *, char const *) + ?newSession@CaClientNotifierProxy@@AAEPAVRCaClientNotifierSession@@AAH@Z @ 51 NONAME ; class RCaClientNotifierSession * CaClientNotifierProxy::newSession(int &) + ?entryChanged@CaNotifier@@IAEXABVCaEntry@@W4ChangeType@@@Z @ 52 NONAME ; void CaNotifier::entryChanged(class CaEntry const &, enum ChangeType) + ?attribute@CaEntry@@QBE?AVQString@@ABV2@@Z @ 53 NONAME ; class QString CaEntry::attribute(class QString const &) const + ?metaObject@CaService@@UBEPBUQMetaObject@@XZ @ 54 NONAME ; struct QMetaObject const * CaService::metaObject(void) const + ?entryChanged@CaNotifier@@IAEXHW4ChangeType@@@Z @ 55 NONAME ; void CaNotifier::entryChanged(int, enum ChangeType) + ?getStaticMetaObject@CaClientNotifierProxy@@SAABUQMetaObject@@XZ @ 56 NONAME ; struct QMetaObject const & CaClientNotifierProxy::getStaticMetaObject(void) + ?registerNotifier@CaClientNotifierProxy@@QAEHPBVCaNotifierFilter@@W4NotifierType@CaNotifierPrivate@@PBVIDataObserver@@@Z @ 57 NONAME ; int CaClientNotifierProxy::registerNotifier(class CaNotifierFilter const *, enum CaNotifierPrivate::NotifierType, class IDataObserver const *) + ??_ECaClientNotifierProxy@@UAE@I@Z @ 58 NONAME ; CaClientNotifierProxy::~CaClientNotifierProxy(unsigned int) + ??0CaNotifierFilter@@QAE@XZ @ 59 NONAME ; CaNotifierFilter::CaNotifierFilter(void) + ?childId@CaQuery@@QBEHXZ @ 60 NONAME ; int CaQuery::childId(void) const + ?removeEntries@CaService@@QBE_NABV?$QList@H@@@Z @ 61 NONAME ; bool CaService::removeEntries(class QList const &) const + ?entryTouched@CaNotifier@@IAEXH@Z @ 62 NONAME ; void CaNotifier::entryTouched(int) + ?customSort@CaService@@QBE_NHAAV?$QList@H@@@Z @ 63 NONAME ; bool CaService::customSort(int, class QList &) const + ?groupContentChanged@CaNotifier@@IAEXH@Z @ 64 NONAME ; void CaNotifier::groupContentChanged(int) + ?tr@CaNotifier@@SA?AVQString@@PBD0@Z @ 65 NONAME ; class QString CaNotifier::tr(char const *, char const *) + ?setChildId@CaQuery@@QAEXH@Z @ 66 NONAME ; void CaQuery::setChildId(int) + ?findSession@CaClientNotifierProxy@@AAEPAVRCaClientNotifierSession@@XZ @ 67 NONAME ; class RCaClientNotifierSession * CaClientNotifierProxy::findSession(void) + ??1CaItemModel@@UAE@XZ @ 68 NONAME ; CaItemModel::~CaItemModel(void) + ?attributes@CaEntry@@QBE?AV?$QMap@VQString@@V1@@@XZ @ 69 NONAME ; class QMap CaEntry::attributes(void) const + ?connectNotify@CaNotifier@@MAEXPBD@Z @ 70 NONAME ; void CaNotifier::connectNotify(char const *) + ?setEntryRole@CaNotifierFilter@@QAEXV?$QFlags@W4EntryRole@@@@@Z @ 71 NONAME ; void CaNotifierFilter::setEntryRole(class QFlags) + ??1CaClientNotifierProxy@@UAE@XZ @ 72 NONAME ; CaClientNotifierProxy::~CaClientNotifierProxy(void) + ?staticMetaObject@CaItemModel@@2UQMetaObject@@B @ 73 NONAME ; struct QMetaObject const CaItemModel::staticMetaObject + ?role@CaEntry@@QBE?AW4EntryRole@@XZ @ 74 NONAME ; enum EntryRole CaEntry::role(void) const + ?qt_metacast@CaNotifier@@UAEPAXPBD@Z @ 75 NONAME ; void * CaNotifier::qt_metacast(char const *) + ?text@CaEntry@@QBE?AVQString@@XZ @ 76 NONAME ; class QString CaEntry::text(void) const + ?tr@CaClientNotifierProxy@@SA?AVQString@@PBD0@Z @ 77 NONAME ; class QString CaClientNotifierProxy::tr(char const *, char const *) + ?getUninstallingEntriesIds@CaItemModel@@QAE?AV?$QList@H@@H@Z @ 78 NONAME ; class QList CaItemModel::getUninstallingEntriesIds(int) + ?columnCount@CaItemModel@@UBEHABVQModelIndex@@@Z @ 79 NONAME ; int CaItemModel::columnCount(class QModelIndex const &) const + ?entryChanged@CaService@@IAEXABVCaEntry@@W4ChangeType@@@Z @ 80 NONAME ; void CaService::entryChanged(class CaEntry const &, enum ChangeType) + ?scrollTo@CaItemModel@@IAEXHW4ScrollHint@QAbstractItemView@@@Z @ 81 NONAME ; void CaItemModel::scrollTo(int, enum QAbstractItemView::ScrollHint) + ??0CaIconDescription@@QAE@XZ @ 82 NONAME ; CaIconDescription::CaIconDescription(void) + ?attribute@CaQuery@@QBE?AVQString@@ABV2@@Z @ 83 NONAME ; class QString CaQuery::attribute(class QString const &) const + ?staticMetaObject@CaClientNotifierProxy@@2UQMetaObject@@B @ 84 NONAME ; struct QMetaObject const CaClientNotifierProxy::staticMetaObject + ??_ECaNotifierFilter@@UAE@I@Z @ 85 NONAME ; CaNotifierFilter::~CaNotifierFilter(unsigned int) + ?trUtf8@CaClientNotifierProxy@@SA?AVQString@@PBD0@Z @ 86 NONAME ; class QString CaClientNotifierProxy::trUtf8(char const *, char const *) + ?getStaticMetaObject@CaService@@SAABUQMetaObject@@XZ @ 87 NONAME ; struct QMetaObject const & CaService::getStaticMetaObject(void) + ?touch@CaService@@QBE_NABVCaEntry@@@Z @ 88 NONAME ; bool CaService::touch(class CaEntry const &) const + ?getEntries@CaService@@QBE?AV?$QList@V?$QSharedPointer@VCaEntry@@@@@@ABV?$QList@H@@@Z @ 89 NONAME ; class QList > CaService::getEntries(class QList const &) const + ??0CaNotifierFilter@@QAE@ABV0@@Z @ 90 NONAME ; CaNotifierFilter::CaNotifierFilter(class CaNotifierFilter const &) + ?getTypeNames@CaNotifierFilter@@QBE?AVQStringList@@XZ @ 91 NONAME ; class QStringList CaNotifierFilter::getTypeNames(void) const + ?entryTouched@CaService@@IAEXH@Z @ 92 NONAME ; void CaService::entryTouched(int) + ?disconnectNotify@CaNotifier@@MAEXPBD@Z @ 93 NONAME ; void CaNotifier::disconnectNotify(char const *) + ?removeEntryFromGroup@CaService@@QBE_NABVCaEntry@@0@Z @ 94 NONAME ; bool CaService::removeEntryFromGroup(class CaEntry const &, class CaEntry const &) const + ?setId@CaIconDescription@@AAEXH@Z @ 95 NONAME ; void CaIconDescription::setId(int) + ?setFilename@CaIconDescription@@QAEXABVQString@@@Z @ 96 NONAME ; void CaIconDescription::setFilename(class QString const &) + ?setEntryTypeName@CaEntry@@QAEXABVQString@@@Z @ 97 NONAME ; void CaEntry::setEntryTypeName(class QString const &) + ??4CaQuery@@QAEAAV0@ABV0@@Z @ 98 NONAME ; class CaQuery & CaQuery::operator=(class CaQuery const &) + ??1CaNotifierFilter@@UAE@XZ @ 99 NONAME ; CaNotifierFilter::~CaNotifierFilter(void) + ?entryTypeName@CaEntry@@QBE?AVQString@@XZ @ 100 NONAME ; class QString CaEntry::entryTypeName(void) const + ?trUtf8@CaService@@SA?AVQString@@PBD0@Z @ 101 NONAME ; class QString CaService::trUtf8(char const *, char const *) + ?groupContentChanged@CaService@@IAEXH@Z @ 102 NONAME ; void CaService::groupContentChanged(int) + ?connectSessions@CaClientNotifierProxy@@QAEXXZ @ 103 NONAME ; void CaClientNotifierProxy::connectSessions(void) + ?insertEntriesIntoGroup@CaService@@QBE_NABVCaEntry@@ABV?$QList@V?$QSharedPointer@VCaEntry@@@@@@H@Z @ 104 NONAME ; bool CaService::insertEntriesIntoGroup(class CaEntry const &, class QList > const &, int) const + ??4CaIconDescription@@QAEAAV0@ABV0@@Z @ 105 NONAME ; class CaIconDescription & CaIconDescription::operator=(class CaIconDescription const &) + ?count@CaQuery@@QBEIXZ @ 106 NONAME ; unsigned int CaQuery::count(void) const + ?appendEntriesToGroup@CaService@@QBE_NABVCaEntry@@ABV?$QList@V?$QSharedPointer@VCaEntry@@@@@@@Z @ 107 NONAME ; bool CaService::appendEntriesToGroup(class CaEntry const &, class QList > const &) const + ?id@CaEntry@@QBEHXZ @ 108 NONAME ; int CaEntry::id(void) const + ?removeEntries@CaService@@QBE_NABV?$QList@V?$QSharedPointer@VCaEntry@@@@@@@Z @ 109 NONAME ; bool CaService::removeEntries(class QList > const &) const + ?updateModel@CaItemModel@@QAEXXZ @ 110 NONAME ; void CaItemModel::updateModel(void) + ?setFlags@CaEntry@@QAEXV?$QFlags@W4EntryFlag@@@@@Z @ 111 NONAME ; void CaEntry::setFlags(class QFlags) + ?insertEntryIntoGroup@CaService@@QBE_NHHH@Z @ 112 NONAME ; bool CaService::insertEntryIntoGroup(int, int, int) const + ?qt_metacast@CaService@@UAEPAXPBD@Z @ 113 NONAME ; void * CaService::qt_metacast(char const *) + ?executeCommand@CaService@@QBEHABVCaEntry@@ABVQString@@PAVQObject@@PBD@Z @ 114 NONAME ; int CaService::executeCommand(class CaEntry const &, class QString const &, class QObject *, char const *) const + ?setFlagsOn@CaItemModel@@QAEXABV?$QFlags@W4EntryFlag@@@@@Z @ 115 NONAME ; void CaItemModel::setFlagsOn(class QFlags const &) + ??0CaQuery@@QAE@ABV0@@Z @ 116 NONAME ; CaQuery::CaQuery(class CaQuery const &) + ?iconDescription@CaEntry@@QBE?AVCaIconDescription@@XZ @ 117 NONAME ; class CaIconDescription CaEntry::iconDescription(void) const + ?trUtf8@CaService@@SA?AVQString@@PBD0H@Z @ 118 NONAME ; class QString CaService::trUtf8(char const *, char const *, int) + ?createEntry@CaService@@QBE?AV?$QSharedPointer@VCaEntry@@@@ABVCaEntry@@@Z @ 119 NONAME ; class QSharedPointer CaService::createEntry(class CaEntry const &) const + ??0CaNotifierFilter@@QAE@ABVCaQuery@@@Z @ 120 NONAME ; CaNotifierFilter::CaNotifierFilter(class CaQuery const &) + ?setEntryTypeNames@CaQuery@@QAEXABVQStringList@@@Z @ 121 NONAME ; void CaQuery::setEntryTypeNames(class QStringList const &) + ?updateProgress@CaItemModel@@QAEXHH@Z @ 122 NONAME ; void CaItemModel::updateProgress(int, int) + ?qt_metacall@CaItemModel@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 123 NONAME ; int CaItemModel::qt_metacall(enum QMetaObject::Call, int, void * *) + ?setText@CaEntry@@QAEXABVQString@@_N@Z @ 124 NONAME ; void CaEntry::setText(class QString const &, bool) + ?removeAttribute@CaQuery@@QAEXABVQString@@@Z @ 125 NONAME ; void CaQuery::removeAttribute(class QString const &) + ?insertEntryIntoGroup@CaService@@QBE_NABVCaEntry@@0H@Z @ 126 NONAME ; bool CaService::insertEntryIntoGroup(class CaEntry const &, class CaEntry const &, int) const + ?setApplicationId@CaIconDescription@@QAEXABVQString@@@Z @ 127 NONAME ; void CaIconDescription::setApplicationId(class QString const &) + ?appendEntryToGroup@CaService@@QBE_NABVCaEntry@@0@Z @ 128 NONAME ; bool CaService::appendEntryToGroup(class CaEntry const &, class CaEntry const &) const + ?setAttribute@CaQuery@@QAEXABVQString@@0@Z @ 129 NONAME ; void CaQuery::setAttribute(class QString const &, class QString const &) + ?attributes@CaQuery@@QBE?AV?$QMap@VQString@@V1@@@XZ @ 130 NONAME ; class QMap CaQuery::attributes(void) const + ?updateEntry@CaService@@QBE_NABVCaEntry@@@Z @ 131 NONAME ; bool CaService::updateEntry(class CaEntry const &) const + ?setAttribute@CaEntry@@QAEXABVQString@@0@Z @ 132 NONAME ; void CaEntry::setAttribute(class QString const &, class QString const &) + ?unregisterNotifier@CaClientNotifierProxy@@QAEXABVCaNotifierFilter@@W4NotifierType@CaNotifierPrivate@@@Z @ 133 NONAME ; void CaClientNotifierProxy::unregisterNotifier(class CaNotifierFilter const &, enum CaNotifierPrivate::NotifierType) + ?setParentId@CaItemModel@@QAEXH@Z @ 134 NONAME ; void CaItemModel::setParentId(int) + ?countChange@CaItemModel@@IAEXXZ @ 135 NONAME ; void CaItemModel::countChange(void) + ?metaObject@CaItemModel@@UBEPBUQMetaObject@@XZ @ 136 NONAME ; struct QMetaObject const * CaItemModel::metaObject(void) const + ?makeIcon@CaEntry@@QBE?AVHbIcon@@ABVQSizeF@@@Z @ 137 NONAME ; class HbIcon CaEntry::makeIcon(class QSizeF const &) const + ?tr@CaItemModel@@SA?AVQString@@PBD0H@Z @ 138 NONAME ; class QString CaItemModel::tr(char const *, char const *, int) + ?setFlagsOff@CaQuery@@QAEXABV?$QFlags@W4EntryFlag@@@@@Z @ 139 NONAME ; void CaQuery::setFlagsOff(class QFlags const &) + ?getEntry@CaService@@QBE?AV?$QSharedPointer@VCaEntry@@@@H@Z @ 140 NONAME ; class QSharedPointer CaService::getEntry(int) const + ??0CaEntry@@QAE@ABV0@@Z @ 141 NONAME ; CaEntry::CaEntry(class CaEntry const &) + ?rowCount@CaItemModel@@UBEHABVQModelIndex@@@Z @ 142 NONAME ; int CaItemModel::rowCount(class QModelIndex const &) const + ?clear@CaQuery@@QAEXXZ @ 143 NONAME ; void CaQuery::clear(void) + ?prependEntryToGroup@CaService@@QBE_NHH@Z @ 144 NONAME ; bool CaService::prependEntryToGroup(int, int) const + ?qt_metacast@CaClientNotifierProxy@@UAEPAXPBD@Z @ 145 NONAME ; void * CaClientNotifierProxy::qt_metacast(char const *) + ?getEntryIcon@CaMenuIconUtility@@SA?AVHbIcon@@ABVCaEntry@@ABVQSizeF@@@Z @ 146 NONAME ; class HbIcon CaMenuIconUtility::getEntryIcon(class CaEntry const &, class QSizeF const &) + ?tr@CaService@@SA?AVQString@@PBD0H@Z @ 147 NONAME ; class QString CaService::tr(char const *, char const *, int) + ?entryRoles@CaQuery@@QBE?AV?$QFlags@W4EntryRole@@@@XZ @ 148 NONAME ; class QFlags CaQuery::entryRoles(void) const + ?qt_metacall@CaService@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 149 NONAME ; int CaService::qt_metacall(enum QMetaObject::Call, int, void * *) + ??4CaNotifierFilter@@QAEAAV0@ABV0@@Z @ 150 NONAME ; class CaNotifierFilter & CaNotifierFilter::operator=(class CaNotifierFilter const &) + ??0CaItemModel@@QAE@ABVCaQuery@@PAVQObject@@@Z @ 151 NONAME ; CaItemModel::CaItemModel(class CaQuery const &, class QObject *) + ?setFlagsOff@CaItemModel@@QAEXABV?$QFlags@W4EntryFlag@@@@@Z @ 152 NONAME ; void CaItemModel::setFlagsOff(class QFlags const &) + ?getSort@CaQuery@@QBEXAAW4SortAttribute@@AAW4SortOrder@Qt@@@Z @ 153 NONAME ; void CaQuery::getSort(enum SortAttribute &, enum Qt::SortOrder &) const + ?parentId@CaQuery@@QBEHXZ @ 154 NONAME ; int CaQuery::parentId(void) const + ?setEntryRoles@CaQuery@@QAEXV?$QFlags@W4EntryRole@@@@@Z @ 155 NONAME ; void CaQuery::setEntryRoles(class QFlags) + ??_ECaEntry@@UAE@I@Z @ 156 NONAME ; CaEntry::~CaEntry(unsigned int) + ??0CaService@@AAE@PAVQObject@@@Z @ 157 NONAME ; CaService::CaService(class QObject *) + ??1CaService@@EAE@XZ @ 158 NONAME ; CaService::~CaService(void) + ?flagsOn@CaQuery@@QBE?AV?$QFlags@W4EntryFlag@@@@XZ @ 159 NONAME ; class QFlags CaQuery::flagsOn(void) const + ?description@CaEntry@@QBE?AVQString@@XZ @ 160 NONAME ; class QString CaEntry::description(void) const + ?metaObject@CaNotifier@@UBEPBUQMetaObject@@XZ @ 161 NONAME ; struct QMetaObject const * CaNotifier::metaObject(void) const + ?data@CaItemModel@@UBE?AVQVariant@@ABVQModelIndex@@H@Z @ 162 NONAME ; class QVariant CaItemModel::data(class QModelIndex const &, int) const + ??0CaIconDescription@@QAE@ABV0@@Z @ 163 NONAME ; CaIconDescription::CaIconDescription(class CaIconDescription const &) + ?staticMetaObject@CaService@@2UQMetaObject@@B @ 164 NONAME ; struct QMetaObject const CaService::staticMetaObject + ?removeEntry@CaService@@QBE_NH@Z @ 165 NONAME ; bool CaService::removeEntry(int) const + ?addEntryTypeName@CaQuery@@QAEXABVQString@@@Z @ 166 NONAME ; void CaQuery::addEntryTypeName(class QString const &) + ?isAutoUpdate@CaItemModel@@QBE_NXZ @ 167 NONAME ; bool CaItemModel::isAutoUpdate(void) const + ??1CaEntry@@UAE@XZ @ 168 NONAME ; CaEntry::~CaEntry(void) + ?prependEntriesToGroup@CaService@@QBE_NABVCaEntry@@ABV?$QList@V?$QSharedPointer@VCaEntry@@@@@@@Z @ 169 NONAME ; bool CaService::prependEntriesToGroup(class CaEntry const &, class QList > const &) const + ?qt_metacall@CaNotifier@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 170 NONAME ; int CaNotifier::qt_metacall(enum QMetaObject::Call, int, void * *) + ?setSort@CaItemModel@@QAEXW4SortAttribute@@W4SortOrder@Qt@@@Z @ 171 NONAME ; void CaItemModel::setSort(enum SortAttribute, enum Qt::SortOrder) + ?removeEntry@CaService@@QBE_NABVCaEntry@@@Z @ 172 NONAME ; bool CaService::removeEntry(class CaEntry const &) const + ?setId@CaEntry@@AAEXH@Z @ 173 NONAME ; void CaEntry::setId(int) + ?staticMetaObject@CaNotifier@@2UQMetaObject@@B @ 174 NONAME ; struct QMetaObject const CaNotifier::staticMetaObject + ?applicationId@CaIconDescription@@QBE?AVQString@@XZ @ 175 NONAME ; class QString CaIconDescription::applicationId(void) const + ?getIds@CaNotifierFilter@@QBE?AV?$QList@H@@XZ @ 176 NONAME ; class QList CaNotifierFilter::getIds(void) const + ?setIds@CaNotifierFilter@@QAEXABV?$QList@H@@@Z @ 177 NONAME ; void CaNotifierFilter::setIds(class QList const &) + ??0CaEntry@@QAE@W4EntryRole@@@Z @ 178 NONAME ; CaEntry::CaEntry(enum EntryRole) ?qt_metacast@CaItemModel@@UAEPAXPBD@Z @ 179 NONAME ; void * CaItemModel::qt_metacast(char const *) ?trUtf8@CaClientNotifierProxy@@SA?AVQString@@PBD0H@Z @ 180 NONAME ; class QString CaClientNotifierProxy::trUtf8(char const *, char const *, int) ?lastError@CaService@@QBE?AW4ErrorCode@@XZ @ 181 NONAME ; enum ErrorCode CaService::lastError(void) const diff -r dbfb5e38438b -r 305818acdca4 contentstorage/caclient/eabi/caclientu.def --- a/contentstorage/caclient/eabi/caclientu.def Wed Aug 18 10:39:24 2010 +0300 +++ b/contentstorage/caclient/eabi/caclientu.def Mon Sep 13 13:26:33 2010 +0300 @@ -181,8 +181,8 @@ _ZNK9CaService13removeEntriesERK5QListI14QSharedPointerI7CaEntryEE @ 180 NONAME _ZNK9CaService13removeEntriesERK5QListIiE @ 181 NONAME _ZNK9CaService14createNotifierERK16CaNotifierFilter @ 182 NONAME - _ZNK9CaService14executeCommandERK7CaEntryRK7QString @ 183 NONAME - _ZNK9CaService14executeCommandEiRK7QString @ 184 NONAME + _ZNK9CaService14executeCommandERK7CaEntryRK7QStringP7QObjectPKc @ 183 NONAME + _ZNK9CaService14executeCommandEiRK7QStringP7QObjectPKc @ 184 NONAME _ZNK9CaService18appendEntryToGroupERK7CaEntryS2_ @ 185 NONAME _ZNK9CaService18appendEntryToGroupEii @ 186 NONAME _ZNK9CaService19prependEntryToGroupERK7CaEntryS2_ @ 187 NONAME diff -r dbfb5e38438b -r 305818acdca4 contentstorage/caclient/inc/cahandler.h --- a/contentstorage/caclient/inc/cahandler.h Wed Aug 18 10:39:24 2010 +0300 +++ b/contentstorage/caclient/inc/cahandler.h Mon Sep 13 13:26:33 2010 +0300 @@ -29,7 +29,9 @@ public: virtual ~CaHandler() {} virtual int execute(const CaEntry &entry, - const QString &commandName) = 0; + const QString &commandName, + QObject* receiver = NULL, + const char* member = NULL) = 0; }; Q_DECLARE_INTERFACE(CaHandler, "com.nokia.homescreen.ICommandHandler") diff -r dbfb5e38438b -r 305818acdca4 contentstorage/caclient/inc/cahandlerproxy.h --- a/contentstorage/caclient/inc/cahandlerproxy.h Wed Aug 18 10:39:24 2010 +0300 +++ b/contentstorage/caclient/inc/cahandlerproxy.h Mon Sep 13 13:26:33 2010 +0300 @@ -36,7 +36,8 @@ explicit CaHandlerProxy(const QSharedPointer &loader); - int execute(const CaEntry &entry, const QString &commandName); + int execute(const CaEntry &entry, const QString &commandName, + QObject* receiver = NULL, const char* member = NULL); private: CaHandler *getHandler(const CaEntry &entry, diff -r dbfb5e38438b -r 305818acdca4 contentstorage/caclient/inc/caservice_p.h --- a/contentstorage/caclient/inc/caservice_p.h Wed Aug 18 10:39:24 2010 +0300 +++ b/contentstorage/caclient/inc/caservice_p.h Mon Sep 13 13:26:33 2010 +0300 @@ -58,7 +58,8 @@ bool prependEntriesToGroup(int groupId, const QList &entryIdList); - int executeCommand(const CaEntry &entry, const QString &command); + int executeCommand(const CaEntry &entry, const QString &command, + QObject* receiver = NULL, const char* member = NULL); CaNotifier *createNotifier(const CaNotifierFilter &filter); diff -r dbfb5e38438b -r 305818acdca4 contentstorage/caclient/s60/src/camenuiconutility.cpp --- a/contentstorage/caclient/s60/src/camenuiconutility.cpp Wed Aug 18 10:39:24 2010 +0300 +++ b/contentstorage/caclient/s60/src/camenuiconutility.cpp Mon Sep 13 13:26:33 2010 +0300 @@ -167,7 +167,16 @@ icon = HbIcon("qtg_large_application"); } else if (entry.entryTypeName() == XQConversions::s60DescToQString(KCaTypePackage)) { - icon = HbIcon("qtg_large_application"); + QString type = entry.attribute(XQConversions::s60DescToQString(KCaAttrAppType)); + if (type == + XQConversions::s60DescToQString(KCaAttrAppTypeValueJava)) { + icon = HbIcon("qtg_large_java"); + } else if (type == + XQConversions::s60DescToQString(KCaAttrAppTypeValueCWRT)) { + icon = HbIcon("qtg_large_widget"); + } else { + icon = HbIcon("qtg_large_sisx"); + } } return icon; diff -r dbfb5e38438b -r 305818acdca4 contentstorage/caclient/src/cahandlerproxy.cpp --- a/contentstorage/caclient/src/cahandlerproxy.cpp Wed Aug 18 10:39:24 2010 +0300 +++ b/contentstorage/caclient/src/cahandlerproxy.cpp Mon Sep 13 13:26:33 2010 +0300 @@ -52,16 +52,19 @@ Forwards execute request to an appropriate handler if found otherwise ignores the request. \param entry Subject for the requested command. \param commandName Name of the command to be executed. + \param receiver QObject class with slot. + \param member Slot from QObject class. \retval KErrNone on succes, error code otherwise. \sa e32err.h for KErrNone definition. */ -int CaHandlerProxy::execute(const CaEntry &entry, const QString &commandName) +int CaHandlerProxy::execute(const CaEntry &entry, const QString &commandName, + QObject* receiver, const char* member) { CaHandler *const handler = getHandler(entry, commandName); int result = -1; if (handler) { - result = handler->execute(entry, commandName); + result = handler->execute(entry, commandName, receiver, member); } return result; } diff -r dbfb5e38438b -r 305818acdca4 contentstorage/caclient/src/caquery.cpp --- a/contentstorage/caclient/src/caquery.cpp Wed Aug 18 10:39:24 2010 +0300 +++ b/contentstorage/caclient/src/caquery.cpp Mon Sep 13 13:26:33 2010 +0300 @@ -39,7 +39,7 @@ CaQuery query; query.setEntryRoles( ItemEntryRole | GroupEntryRole ); query.setSort( MostUsedSortAttribute, Qt::DescendingOrder ); - query.setFlagsOn( UsedEntryFlag | RemovableEntryFlag | RunningEntryFlag ); + query.setFlagsOn( UsedEntryFlag | RemovableEntryFlag ); query.setFlagsOff( SystemEntryFlag | VisibleEntryFlag ); // using CaQuery to get data from DB QList entries = CaService::instance()->getEntries( query ); diff -r dbfb5e38438b -r 305818acdca4 contentstorage/caclient/src/caservice.cpp --- a/contentstorage/caclient/src/caservice.cpp Wed Aug 18 10:39:24 2010 +0300 +++ b/contentstorage/caclient/src/caservice.cpp Mon Sep 13 13:26:33 2010 +0300 @@ -83,6 +83,10 @@ Proxy to client notifier. */ +namespace Hs { + const char packageTypeName[] = "package"; +} + // Initialization of a static member variable. QWeakPointer CaService::m_instance = QWeakPointer(); /*! @@ -365,7 +369,14 @@ */ bool CaService::touch(const CaEntry &entry) const { - return m_d->touch(entry); + if (entry.flags() & RemovableEntryFlag && + (entry.flags() & UsedEntryFlag) == 0 && + entry.role() == ItemEntryRole && + entry.entryTypeName() != QString(Hs::packageTypeName)) { + return m_d->touch(entry); + } else { + return true; + } } /*! @@ -827,6 +838,8 @@ Execute command. \param entryId id of an entry. \param command command. + \param receiver QObject class with slot. + \param member Slot from QObject class. \retval 0 if operation was successful. \example @@ -843,14 +856,15 @@ result == 0 \endcode */ -int CaService::executeCommand(int entryId, const QString &command) const +int CaService::executeCommand(int entryId, const QString &command, + QObject* receiver, const char* member) const { int result = -19; const QSharedPointer temporaryEntry = getEntry(entryId); if (!temporaryEntry.isNull()) { - result = executeCommand(*temporaryEntry, command); + result = executeCommand(*temporaryEntry, command, receiver, member); } return result; } @@ -859,6 +873,8 @@ Execute command. \param entry entry. \param command command. + \param receiver QObject class with slot. + \param member Slot from QObject class. \retval 0 if operation was successful. \example @@ -875,9 +891,10 @@ result == 0 \endcode */ -int CaService::executeCommand(const CaEntry &entry, const QString &command) const +int CaService::executeCommand(const CaEntry &entry, const QString &command, + QObject* receiver, const char* member) const { - return m_d->executeCommand(entry, command); + return m_d->executeCommand(entry, command, receiver, member); } /*! @@ -1333,10 +1350,14 @@ Executes command on entry (fe. "open", "remove") \param const reference to an entry on which command will be issued \param string containing a command + \param receiver QObject with slot + \param member slot from QObject \retval int which is used as an error code return value, 0 means no errors */ int CaServicePrivate::executeCommand(const CaEntry &entry, - const QString &command) + const QString &command, + QObject* receiver, + const char* member) { qDebug() << "CaServicePrivate::executeCommand" << "entry id:" << entry.id() << "command:" << command; @@ -1351,7 +1372,8 @@ touch(entry); } - int errorCode = mCommandHandler->execute(entry, command); + int errorCode = mCommandHandler->execute(entry, + command, receiver, member); mErrorCode = CaObjectAdapter::convertErrorCode(errorCode); diff -r dbfb5e38438b -r 305818acdca4 contentstorage/caclient/stub/src/caclientproxy.cpp --- a/contentstorage/caclient/stub/src/caclientproxy.cpp Wed Aug 18 10:39:24 2010 +0300 +++ b/contentstorage/caclient/stub/src/caclientproxy.cpp Mon Sep 13 13:26:33 2010 +0300 @@ -241,13 +241,13 @@ qDebug() << query.executedQuery(); } - // Add attribute widget:traslation_file + // Add attribute widget:translation_file if (!translationFileName.isEmpty()) { QString queryAddWidgetTranslationFile = "INSERT INTO CA_ATTRIBUTE " \ "(AT_ENTRY_ID, AT_NAME, AT_VALUE) " \ "VALUES " \ - "(?, 'widget:traslation_file', ?)"; + "(?, 'widget:translation_file', ?)"; query.prepare(queryAddWidgetTranslationFile); query.addBindValue(widgetId); diff -r dbfb5e38438b -r 305818acdca4 contentstorage/cahandler/app/inc/caapphandler.h --- a/contentstorage/cahandler/app/inc/caapphandler.h Wed Aug 18 10:39:24 2010 +0300 +++ b/contentstorage/cahandler/app/inc/caapphandler.h Mon Sep 13 13:26:33 2010 +0300 @@ -21,12 +21,13 @@ #include #include "cahandler.h" +#include "cauninstallerobserver.h" class CEikonEnv; class CCaUsifUninstallOperation; class CaEntry; -class CaAppHandler: public QObject, public CaHandler +class CaAppHandler: public QObject, public CaHandler, public CaUninstallerObserver { Q_OBJECT Q_INTERFACES(CaHandler) @@ -39,7 +40,14 @@ public: - int execute(const CaEntry &entry, const QString &command); + int execute(const CaEntry &entry, const QString &command, + QObject* receiver = NULL, const char* member = NULL); + + void uninstallError(int error); // from CaUninstallerObserver + +signals: + + void uninstallFailed(int errorCode); private: diff -r dbfb5e38438b -r 305818acdca4 contentstorage/cahandler/app/inc/cauninstallerobserver.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/contentstorage/cahandler/app/inc/cauninstallerobserver.h Mon Sep 13 13:26:33 2010 +0300 @@ -0,0 +1,27 @@ +/* + * 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 CAUNINSTALLEROBSERVER_H_ +#define CAUNINSTALLEROBSERVER_H_ + +class CaUninstallerObserver +{ +public: + virtual void uninstallError(int error) = 0; +}; + +#endif /* CAUNINSTALLEROBSERVER_H_ */ diff -r dbfb5e38438b -r 305818acdca4 contentstorage/cahandler/app/inc/causifuninstalloperation.h --- a/contentstorage/cahandler/app/inc/causifuninstalloperation.h Wed Aug 18 10:39:24 2010 +0300 +++ b/contentstorage/cahandler/app/inc/causifuninstalloperation.h Mon Sep 13 13:26:33 2010 +0300 @@ -21,6 +21,8 @@ #include #include +class CaUninstallerObserver; + using namespace Usif; /** @@ -48,6 +50,8 @@ */ static CCaUsifUninstallOperation *NewL(TComponentId, TInt aPriority = CActive::EPriorityStandard); + + void AddObserver(CaUninstallerObserver* aCaUninstallerObserver); private: // construction @@ -81,6 +85,8 @@ COpaqueNamedParams* iResults; RSoftwareInstall iUninstaller; + + CaUninstallerObserver* iCaUninstallerObserver; // not owned }; #endif // C_CAUSIFUNINSTALLOPERATION_H diff -r dbfb5e38438b -r 305818acdca4 contentstorage/cahandler/app/src/caapphandler.cpp --- a/contentstorage/cahandler/app/src/caapphandler.cpp Wed Aug 18 10:39:24 2010 +0300 +++ b/contentstorage/cahandler/app/src/caapphandler.cpp Mon Sep 13 13:26:33 2010 +0300 @@ -28,6 +28,7 @@ #include #include +#include #include #include @@ -78,10 +79,17 @@ * Execute a given command. * \param entry a reference to a CaEntry instance. * \param command a given command. + * \param receiver a QObject class with slot to invoke. + * \param member a slot to invoke. * \retval an error code. */ -int CaAppHandler::execute(const CaEntry &entry, const QString &command) +int CaAppHandler::execute(const CaEntry &entry, const QString &command, + QObject* receiver, const char* member) { + if ( receiver && member ) { + connect( this, SIGNAL(uninstallFailed(int)), receiver, member, Qt::UniqueConnection ); + } + int result(KErrGeneral); if (command == caCmdOpen && entry.entryTypeName() == caTypeApp) { QString viewIdValue = entry.attribute(caAttrView); @@ -179,7 +187,7 @@ int CaAppHandler::closeApplication(const EntryFlags &flags, int windowGroupId) { int result(KErrNone); - if (flags.testFlag(RunningEntryFlag) && windowGroupId > 0) { + if (windowGroupId > 0) { RWsSession wsSession; result = wsSession.Connect(); if (result==KErrNone) { @@ -237,10 +245,29 @@ void CaAppHandler::startUsifUninstallL(TInt componentId) { if (iUsifUninstallOperation && iUsifUninstallOperation->IsActive()) { - User::Leave( KErrInUse ); + uninstallError(Usif::EInstallerBusy); + } else { + delete iUsifUninstallOperation; + iUsifUninstallOperation = NULL; + iUsifUninstallOperation = CCaUsifUninstallOperation::NewL(componentId); + iUsifUninstallOperation->AddObserver(this); } - delete iUsifUninstallOperation; - iUsifUninstallOperation = NULL; - iUsifUninstallOperation = CCaUsifUninstallOperation::NewL(componentId); } +#ifdef COVERAGE_MEASUREMENT +#pragma CTC SKIP +#endif //COVERAGE_MEASUREMENT +/*! + * Show information message about unninstall error. + * \param error uninstall error. + * \retval void. + */ +void CaAppHandler::uninstallError(int error) +{ + emit uninstallFailed(error); +} +#ifdef COVERAGE_MEASUREMENT +#pragma CTC ENDSKIP +#endif //COVERAGE_MEASUREMENT + + diff -r dbfb5e38438b -r 305818acdca4 contentstorage/cahandler/app/src/causifuninstalloperation.cpp --- a/contentstorage/cahandler/app/src/causifuninstalloperation.cpp Wed Aug 18 10:39:24 2010 +0300 +++ b/contentstorage/cahandler/app/src/causifuninstalloperation.cpp Mon Sep 13 13:26:33 2010 +0300 @@ -20,6 +20,7 @@ #include "cadef.h" #include "cainnerentry.h" #include "causifuninstalloperation.h" +#include "cauninstallerobserver.h" // ================= MEMBER FUNCTIONS ======================= @@ -55,7 +56,7 @@ // --------------------------------------------------------------------------- // CCaUsifUninstallOperation::CCaUsifUninstallOperation( TInt aPriority ) : - CActive(aPriority), iUninstaller() + CActive(aPriority), iUninstaller(), iCaUninstallerObserver(NULL) { CActiveScheduler::Add(this); } @@ -81,6 +82,15 @@ // void CCaUsifUninstallOperation::RunL() { + if( iStatus != KErrNone ) + { + int error = iStatus.Int(); + // notify about error + if( iCaUninstallerObserver ) + { + iCaUninstallerObserver->uninstallError( error ); + } + } iUninstaller.Close(); } @@ -108,3 +118,12 @@ #pragma CTC ENDSKIP #endif //COVERAGE_MEASUREMENT +// --------------------------------------------------------------------------- +// CCaUsifUninstallOperation::AddObserver +// --------------------------------------------------------------------------- +// +void CCaUsifUninstallOperation::AddObserver(CaUninstallerObserver* aCaUninstallerObserver) + { + iCaUninstallerObserver = aCaUninstallerObserver; + } + diff -r dbfb5e38438b -r 305818acdca4 contentstorage/cahandler/tapp/inc/catapphandler.h --- a/contentstorage/cahandler/tapp/inc/catapphandler.h Wed Aug 18 10:39:24 2010 +0300 +++ b/contentstorage/cahandler/tapp/inc/catapphandler.h Mon Sep 13 13:26:33 2010 +0300 @@ -35,7 +35,8 @@ ~CaTappHandler(); Q_INVOKABLE - int execute(const CaEntry &entry, const QString &command); + int execute(const CaEntry &entry, const QString &command, + QObject* receiver = NULL, const char* member = NULL); private: XQApplicationManager *mAiwMgr; diff -r dbfb5e38438b -r 305818acdca4 contentstorage/cahandler/tapp/src/catapphandler.cpp --- a/contentstorage/cahandler/tapp/src/catapphandler.cpp Wed Aug 18 10:39:24 2010 +0300 +++ b/contentstorage/cahandler/tapp/src/catapphandler.cpp Mon Sep 13 13:26:33 2010 +0300 @@ -58,10 +58,15 @@ Uses XQApplicationManager \param entry Subject of the \a command. \param command Description of the command. + \param receiver a QObject class with slot to invoke. + \param member a slot to invoke. \retval Error code described in QSERVICEMANAGER.H */ -int CaTappHandler::execute(const CaEntry& entry, const QString& command) +int CaTappHandler::execute(const CaEntry& entry, const QString& command, + QObject* receiver, const char* member) { + Q_UNUSED(receiver); + Q_UNUSED(member); // this returns Error enum from QSERVICEMANAGER.H int error = 0; if (command == caCmdOpen) { diff -r dbfb5e38438b -r 305818acdca4 contentstorage/cahandler/url/inc/caurlhandler.h --- a/contentstorage/cahandler/url/inc/caurlhandler.h Wed Aug 18 10:39:24 2010 +0300 +++ b/contentstorage/cahandler/url/inc/caurlhandler.h Mon Sep 13 13:26:33 2010 +0300 @@ -33,7 +33,8 @@ virtual ~CaUrlHandler(); - int execute(const CaEntry &entry, const QString &command); + int execute(const CaEntry &entry, const QString &command, + QObject* receiver = NULL, const char* member = NULL); }; diff -r dbfb5e38438b -r 305818acdca4 contentstorage/cahandler/url/src/caurlhandler.cpp --- a/contentstorage/cahandler/url/src/caurlhandler.cpp Wed Aug 18 10:39:24 2010 +0300 +++ b/contentstorage/cahandler/url/src/caurlhandler.cpp Mon Sep 13 13:26:33 2010 +0300 @@ -43,10 +43,16 @@ * Execute a given command. * \param entry a reference to CaEntry instance. * \param command a given command. + * \param receiver a QObject class with slot to invoke. + * \param member a slot to invoke. * \retval an error code. */ -int CaUrlHandler::execute(const CaEntry &entry, const QString &command) +int CaUrlHandler::execute(const CaEntry &entry, const QString &command, + QObject* receiver, const char* member) { + Q_UNUSED(receiver); + Q_UNUSED(member); + int err(KErrGeneral); if (command == caCmdOpen) { QString attribute = entry.attribute(caAttrUrl); diff -r dbfb5e38438b -r 305818acdca4 contentstorage/casoftwareregistry/s60/inc/caprogresscanner.h --- a/contentstorage/casoftwareregistry/s60/inc/caprogresscanner.h Wed Aug 18 10:39:24 2010 +0300 +++ b/contentstorage/casoftwareregistry/s60/inc/caprogresscanner.h Mon Sep 13 13:26:33 2010 +0300 @@ -88,9 +88,6 @@ /** * USIF notifier * Own. - * - * Commented out since USIF notifications do not - * work on MCL wk20 */ CSifOperationsNotifier* iNotifier; diff -r dbfb5e38438b -r 305818acdca4 contentstorage/casoftwareregistry/s60/src/caprogresscanner.cpp --- a/contentstorage/casoftwareregistry/s60/src/caprogresscanner.cpp Wed Aug 18 10:39:24 2010 +0300 +++ b/contentstorage/casoftwareregistry/s60/src/caprogresscanner.cpp Mon Sep 13 13:26:33 2010 +0300 @@ -76,7 +76,8 @@ { //TODO: temporary solution. Some error in scr was found if( aStartData.OperationPhase() == EUninstalling - || aStartData.OperationPhase() == EInstalling ) + || aStartData.OperationPhase() == EInstalling + || aStartData.OperationPhase() == 0) { TRAP_IGNORE( iComponentId = iSoftwareRegistry.GetComponentIdL( @@ -135,7 +136,7 @@ { if( aError == KErrNone ) { - iObserver->progressChange( iComponentId, 100 ); + iObserver->progressChange( iComponentId, 101 ); } else { diff -r dbfb5e38438b -r 305818acdca4 contentstorage/casoftwareregistry/s60/src/casoftwareregistry_p.cpp --- a/contentstorage/casoftwareregistry/s60/src/casoftwareregistry_p.cpp Wed Aug 18 10:39:24 2010 +0300 +++ b/contentstorage/casoftwareregistry/s60/src/casoftwareregistry_p.cpp Mon Sep 13 13:26:33 2010 +0300 @@ -34,11 +34,11 @@ #include "caarraycleanup.inl" using namespace Usif; - _LIT(KConfirmMessageKey, "MIDlet-Delete-Confirm"); _LIT(KCaScrPropertyDomainCategory, "Domain-Category"); _LIT(KCaScrPropertyMidletDescryption, "MIDlet-Description"); -const int maxLogsCount = 20; // should be 50 - workaround for +_LIT(KNotNamedMmc, "NO NAME"); +const int maxLogsCount = 20; // should be 50 - workaround for // ou1cimx1#476143 Dialog crash when label contains big amount of lines /*! @@ -56,7 +56,7 @@ */ CaSoftwareRegistryPrivate::~CaSoftwareRegistryPrivate() { - + } /*! @@ -290,19 +290,19 @@ drives = drives.append(","); } drv = QString(QChar('A'+ i)).append(":"); - if(DriveInfo::GetDefaultDrive( + 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( + } 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( + } else if (DriveInfo::GetDefaultDrive( DriveInfo::EDefaultRemovableMassStorage, drive ) == KErrNone && QChar('A'+ i) == QChar(drive)) { RFs fs; @@ -314,7 +314,8 @@ DriveInfo::EDefaultRemovableMassStorage, driveNumber ); User::LeaveIfError(fs.Volume(tv, driveNumber)); - if(tv.iName.Length()) { + if (tv.iName.Length() + && tv.iName.Compare(KNotNamedMmc) != KErrNone) { drives = drives.append(HbParameterLengthLimiter( "txt_applib_dialog_1_2").arg( QString(QChar('A'+ i))).arg( diff -r dbfb5e38438b -r 305818acdca4 contentstorage/casoftwareregistry/stub/src/cauninstallnotifier_p.cpp --- a/contentstorage/casoftwareregistry/stub/src/cauninstallnotifier_p.cpp Wed Aug 18 10:39:24 2010 +0300 +++ b/contentstorage/casoftwareregistry/stub/src/cauninstallnotifier_p.cpp Mon Sep 13 13:26:33 2010 +0300 @@ -42,6 +42,5 @@ void CaUninstallNotifierPrivate::makeConnect() { - connect(mUninstallObserver, SIGNAL(signalprogressChange(int, int)), - m_q, SIGNAL(progressChange(int, int))); + } diff -r dbfb5e38438b -r 305818acdca4 contentstorage/casrv/carunningappmonitor/bwins/carunningappmonitoru.def --- a/contentstorage/casrv/carunningappmonitor/bwins/carunningappmonitoru.def Wed Aug 18 10:39:24 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,3 +0,0 @@ -EXPORTS - ?ImplementationGroupProxy@@YAPBUTImplementationProxy@@AAH@Z @ 1 NONAME ; struct TImplementationProxy const * ImplementationGroupProxy(int &) - diff -r dbfb5e38438b -r 305818acdca4 contentstorage/casrv/carunningappmonitor/data/carunningappmonitor.rss --- a/contentstorage/casrv/carunningappmonitor/data/carunningappmonitor.rss Wed Aug 18 10:39:24 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: carunningappmonitor.rss -* -*/ - -#include -#include "casrvpluginuids.hrh" - -RESOURCE REGISTRY_INFO theInfo - { - // UID for the DLL - dll_uid = 0x200267B5; - // Declare array of interface info - interfaces = - { - INTERFACE_INFO - { - // UID of interface that is implemented - interface_uid = KCaSrvPluginInterfaceUid; - implementations = - { - // Info for Drm Scanner - IMPLEMENTATION_INFO - { - implementation_uid = 0x200267B5; - version_no = 1; - display_name = "Running Application Monitor"; - default_data = ""; - opaque_data = ""; - } - }; - } - }; - } - diff -r dbfb5e38438b -r 305818acdca4 contentstorage/casrv/carunningappmonitor/eabi/carunningappmonitoru.def --- a/contentstorage/casrv/carunningappmonitor/eabi/carunningappmonitoru.def Wed Aug 18 10:39:24 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,3 +0,0 @@ -EXPORTS - _Z24ImplementationGroupProxyRi @ 1 NONAME - diff -r dbfb5e38438b -r 305818acdca4 contentstorage/casrv/carunningappmonitor/group/bld.inf --- a/contentstorage/casrv/carunningappmonitor/group/bld.inf Wed Aug 18 10:39:24 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: 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. -carunningappmonitor.mmp - -PRJ_TESTMMPFILES diff -r dbfb5e38438b -r 305818acdca4 contentstorage/casrv/carunningappmonitor/group/carunningappmonitor.mmp --- a/contentstorage/casrv/carunningappmonitor/group/carunningappmonitor.mmp Wed Aug 18 10:39:24 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: carunningappmonitor.mmp -* -*/ - -// To get the system includes definitions -#include - -TARGET carunningappmonitor.dll -TARGETTYPE PLUGIN - -// ECom Dll recognition UID followed by the unique UID for this dll -UID 0x10009D8D 0x200267B5 -SECUREID 0x200267B5 -CAPABILITY CAP_ECOM_PLUGIN - -DEFFILE carunningappmonitor.def - -SOURCEPATH ../src -SOURCE proxy.cpp -SOURCE castoragetask.cpp -SOURCE carunningapphandler.cpp -SOURCE carunningappmonitor.cpp - -USERINCLUDE ../inc -USERINCLUDE ../../casrvmgr/inc -USERINCLUDE ../../../inc -USERINCLUDE ../../../srvinc -USERINCLUDE ../../../cautils/inc - -MW_LAYER_SYSTEMINCLUDE - -SOURCEPATH ../data -START RESOURCE carunningappmonitor.rss - LANG sc - TARGET carunningappmonitor.rsc -END - -LIBRARY euser.lib -LIBRARY ecom.lib -LIBRARY ws32.lib -LIBRARY apgrfx.lib -LIBRARY cautils.lib -LIBRARY camenu.lib - diff -r dbfb5e38438b -r 305818acdca4 contentstorage/casrv/carunningappmonitor/inc/carunningapphandler.h --- a/contentstorage/casrv/carunningappmonitor/inc/carunningapphandler.h Wed Aug 18 10:39:24 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,72 +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: carunnningapphandler.h -* -*/ - -#ifndef C_CARUNNINGAPPHANDLER_H -#define C_CARUNNINGAPPHANDLER_H - -#include "carunningtaskhandler.h" -#include "casrvplugin.h" -#include - -class CCaStorageProxy; -/** - * Class implement task handler and content storage plugin. - */ -NONSHARABLE_CLASS( CCaRunningAppHandler ): public CCaSrvPlugin, - public MCaRunningTaskHandler - { -public: - /** - * Factory function. Create and initialize handler instance. - */ - static CCaRunningAppHandler* NewL( TPluginParams* aParams ); - - /** - * Destructor - */ - ~CCaRunningAppHandler(); - -private: - /** - * First step construction. - */ - CCaRunningAppHandler(); - - /** - * Second step construction. - */ - void ConstructL( CCaStorageProxy& aStorage ); - -private: //form MCaRunningTaskHandler - /** - * @see MCaRunningTaskHandler - */ - void RegisterTaskL( CBase* aTask ); - - /** - * @see MCaRunningTaskHandler - */ - void UnregisterTask( CBase* aTask ); - -private: - /** - * List of running tasks. - * Own. - */ - RPointerArray iRunningTasks; - }; -#endif //C_CARUNNINGAPPHANDLER_H diff -r dbfb5e38438b -r 305818acdca4 contentstorage/casrv/carunningappmonitor/inc/carunningappmonitor.h --- a/contentstorage/casrv/carunningappmonitor/inc/carunningappmonitor.h Wed Aug 18 10:39:24 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,123 +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: ccarunningappmonitor.h -* -*/ -#ifndef C_CARUNNINGTASKHANDLER_H -#define C_CARUNNINGTASKHANDLER_H - -#include "carunningtaskhandler.h" -#include -#include -#include - -class CApaWindowGroupName; -class CCaStorageProxy; -NONSHARABLE_CLASS( CCaRunningAppMonitor ): public CActive - { -public: - /** - * Function create monitor instance and initialize observation process. - * Monitor instance will be registered on task handler. - * @param aTaskHandler - task handler instance - * @param aStorage - content storage proxy instance - */ - static void ExecuteL( MCaRunningTaskHandler& aTaskHandler, - CCaStorageProxy& aStorage ); - - /** - * Destructor - */ - ~CCaRunningAppMonitor(); - -private: - /** - * First step constructor. - */ - CCaRunningAppMonitor( MCaRunningTaskHandler& aTaskHandler, - CCaStorageProxy& aStorage ); - - /** - * Second step constructor - */ - void ConstructL(); - - /** - * Function update content storage with running applications list - */ - void UpdateRunningAppStorageL(); - - /** - * Function subscribe monitor to window server events - */ - void Subscribe(); - - /** - * Function create window group to observe window server events - */ - void ConstractObserverL(); - - /** - * Function mark all storage entries as "not running" - */ - void ResetStorageL(); - -private: //from CActive - /** - * @see CActive - */ - void RunL(); - - /** - * @see CActive - */ - TInt RunError( TInt aError ); - - /** - * @see CActive - */ - void DoCancel(); - -private: - //members - - /** - * Reference to task handler. - */ - MCaRunningTaskHandler& iTaskHandler; - - /** - * Reference to constent storage proxy - */ - CCaStorageProxy& iStorage; - - /** - * IPC session to window server - */ - RWsSession iSession; - - /** - * Window group. - */ - RWindowGroup iWg; - - /** - * Running apps hash map - * key - application window group id - * value - application uid - */ - RHashMap iRunningTasks; - }; - -#endif //C_CARUNNINGTASKHANDLER_H diff -r dbfb5e38438b -r 305818acdca4 contentstorage/casrv/carunningappmonitor/inc/carunningtaskhandler.h --- a/contentstorage/casrv/carunningappmonitor/inc/carunningtaskhandler.h Wed Aug 18 10:39:24 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,46 +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: carunningtaskhandler.h -* -*/ - -#ifndef M_CARUNNINGTASKHANDLER_H -#define M_CARUNNINGTASKHANDLER_H - -#include - -/** - * Running task handler. - * Interface declaration. - */ -NONSHARABLE_CLASS( MCaRunningTaskHandler ) - { -public: - /** - * Function register running task on handler. - * Ownership is transfered to handler - * @param aTask - running task - */ - virtual void RegisterTaskL( CBase* aTask )=0; - - /** - * Function unregister running task on handler. - * Ownership is transfered to caller. - * @param aTask - running task - */ - virtual void UnregisterTask( CBase* aTask )=0; - }; - -#endif //M_CARUNNINGTASKHANDLER_H - diff -r dbfb5e38438b -r 305818acdca4 contentstorage/casrv/carunningappmonitor/inc/castoragetask.h --- a/contentstorage/casrv/carunningappmonitor/inc/castoragetask.h Wed Aug 18 10:39:24 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,143 +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: castoragetask.h -* -*/ - -#ifndef C_CASTORAGETASK_H -#define C_CASTORAGETASK_H - -//includes -#include - -class CCaStorageProxy; -class CCaInnerEntry; -class MCaRunningTaskHandler; - -/** - * Class update entry with window group id of running process - */ -NONSHARABLE_CLASS( CCaStorageTask): public CActive - { -public: - /** - * Function execute task. Ownership is transfered to task handler. - * Task take ownership over window group name. - * @param aTaskHandler - running tasks storage - * @param aStorage - applications storage - * @param aUid - application UID - * @param aWgId - application window group id - */ - static void ExecuteL( MCaRunningTaskHandler& aTaskHandler, - CCaStorageProxy& aStorage, - TUid aUid, - TInt aWgId ); - - /** - * Destructor - */ - ~CCaStorageTask(); -private: - /** - * First step constructor - * @param aTaskHandler - running tasks storage - * @param aStorage - applications storage - * @param aUid - application UID - * @param aWgId - application window group id - */ - CCaStorageTask( MCaRunningTaskHandler& aTaskHandler, - CCaStorageProxy& aStorage, - TUid aUid, - TInt aWgId ); - - /** - * Second step constructor - */ - void ConstructL(); - - /** - * Function unregister task form task handler and release resources allocated for task - */ - void UnregisterD(); - - /** - * Function retrive all entry for application. - * @param aArray - destination set of application entry - */ - void GetEntriesL( RPointerArray& aArray ); - - /** - * Function find and update application entry with window group id. - */ - TInt UpdateEntryL(); - - /** - * Functioin update application entry with window group id. - * @param aEntry - application entry - */ - TInt UpdateEntryL( CCaInnerEntry& aEntry ); - -private: //from CActive - /** - * @see CActive - */ - void RunL(); - - - /** - * @see CActive - */ - TInt RunError(TInt aError); - - /** - * @see CActive - */ - void DoCancel(); - -private: - //members - - /** - * Reference to task handler instance - */ - MCaRunningTaskHandler& iTaskHandler; - - /** - * Reference to content storage proxy. - */ - CCaStorageProxy& iStorage; - - /** - * Application UID - */ - const TUid iUid; - - /** - * Applicaion window group id - */ - const TInt iWgId; - - /** - * Timer to re-activate task if try fail - */ - RTimer iTimer; - - /** - * Task execution counter - */ - TInt iCount; - }; - -#endif //C_CASTORAGETASK_H - diff -r dbfb5e38438b -r 305818acdca4 contentstorage/casrv/carunningappmonitor/src/carunningapphandler.cpp --- a/contentstorage/casrv/carunningappmonitor/src/carunningapphandler.cpp Wed Aug 18 10:39:24 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,88 +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: carunningapphandler.cpp -* -*/ -#include "carunningapphandler.h" - -#include "cadef.h" -#include "carunningappmonitor.h" - -// ----------------------------------------------------------------------------- -// CCaRunningAppHandler -// ----------------------------------------------------------------------------- -// -CCaRunningAppHandler* CCaRunningAppHandler::NewL( TPluginParams* aParams ) - { - if( aParams == 0 || aParams->storageProxy == 0 ) - { - User::Leave(KErrCorrupt); - } - CCaRunningAppHandler* self = new (ELeave)CCaRunningAppHandler(); - CleanupStack::PushL( self ); - self->ConstructL( *aParams->storageProxy ); - CleanupStack::Pop( self ); - return self; - } - -// ----------------------------------------------------------------------------- -// CCaRunningAppHandler -// ----------------------------------------------------------------------------- -// -CCaRunningAppHandler::~CCaRunningAppHandler() - { - iRunningTasks.ResetAndDestroy(); - } - -// ----------------------------------------------------------------------------- -// CCaRunningAppHandler -// ----------------------------------------------------------------------------- -// -CCaRunningAppHandler::CCaRunningAppHandler() -: -iRunningTasks( KDefaultGranularity ) - { - //no implementation required - } - -// ----------------------------------------------------------------------------- -// ConstructL -// ----------------------------------------------------------------------------- -// -void CCaRunningAppHandler::ConstructL( CCaStorageProxy& aStorage ) - { - CCaRunningAppMonitor::ExecuteL( *this, aStorage ); - } - -// ----------------------------------------------------------------------------- -// RegisterTaskL -// ----------------------------------------------------------------------------- -// -void CCaRunningAppHandler::RegisterTaskL( CBase* aTask ) - { - iRunningTasks.AppendL( aTask ); - } - -// ----------------------------------------------------------------------------- -// UnregisterTask -// ----------------------------------------------------------------------------- -// -void CCaRunningAppHandler::UnregisterTask( CBase* aTask ) - { - const TInt index( iRunningTasks.FindReverse( aTask ) ); - if( index != KErrNotFound ) - { - iRunningTasks.Remove( index ); - } - } diff -r dbfb5e38438b -r 305818acdca4 contentstorage/casrv/carunningappmonitor/src/carunningappmonitor.cpp --- a/contentstorage/casrv/carunningappmonitor/src/carunningappmonitor.cpp Wed Aug 18 10:39:24 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,240 +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: cadrmscanner.mmp -* -*/ - -#include - -#include "carunningappmonitor.h" -#include "cadef.h" -#include "castoragetask.h" -#include "cainnerquery.h" -#include "cainnerentry.h" -#include "caarraycleanup.inl" -#include "castorageproxy.h" - -const TInt KRunningAppGranularity(10); -// ----------------------------------------------------------------------------- -// ExecuteL -// ----------------------------------------------------------------------------- -// -void CCaRunningAppMonitor::ExecuteL( MCaRunningTaskHandler& aTaskHandler, - CCaStorageProxy& aStorage ) - { - CCaRunningAppMonitor* self = - new (ELeave)CCaRunningAppMonitor( aTaskHandler, aStorage ); - CleanupStack::PushL( self ); - self->ConstructL(); - CleanupStack::Pop( self ); - } - -// ----------------------------------------------------------------------------- -// ~CCaRunningAppMonitor -// ----------------------------------------------------------------------------- -// -CCaRunningAppMonitor::~CCaRunningAppMonitor() - { - Cancel(); - iWg.Close(); - iSession.Close(); - iRunningTasks.Close(); - } - -// ----------------------------------------------------------------------------- -// CCaRunningAppMonitor -// ----------------------------------------------------------------------------- -// -CCaRunningAppMonitor::CCaRunningAppMonitor( MCaRunningTaskHandler& aTaskHandler, - CCaStorageProxy& aStorage ) -: -CActive( EPriorityStandard ), -iTaskHandler( aTaskHandler ), -iStorage( aStorage ) - { - CActiveScheduler::Add( this ); - } - -// ----------------------------------------------------------------------------- -// ConstructL -// ----------------------------------------------------------------------------- -// -void CCaRunningAppMonitor::ConstructL() - { - //Create window server observer - ConstractObserverL(); - - //start listen - Subscribe(); - - //At plugin start mark all entry as "not running" - ResetStorageL(); - - iTaskHandler.RegisterTaskL(this);//this operation has to be as a last one - } - -// ----------------------------------------------------------------------------- -// UpdateRunningAppStorageL -// ----------------------------------------------------------------------------- -// -void CCaRunningAppMonitor::UpdateRunningAppStorageL() - { - RArray - windowGroupIds(KRunningAppGranularity, - _FOFF( RWsSession::TWindowGroupChainInfo, iId )); - CleanupClosePushL( windowGroupIds ); - User::LeaveIfError( iSession.WindowGroupList( 0, &windowGroupIds ) ); - TInt itemIndex( KErrNotFound ); - - //Verify what apps has stopped - THashMapIter iterator( iRunningTasks ); - RWsSession::TWindowGroupChainInfo item = { KErrNotFound, KErrNotFound }; - while( 0 != iterator.NextKey() ) - { - item.iId = *iterator.CurrentKey(); - itemIndex = windowGroupIds.Find(item); - if(KErrNotFound == itemIndex) - { - //push new task to register application update in storage - CCaStorageTask::ExecuteL( iTaskHandler, - iStorage, - *iterator.CurrentValue(), - KErrNotFound ); - iterator.RemoveCurrent(); - } - else - { - //application is already registered. - //remove entry to skip its processing - windowGroupIds.Remove( itemIndex ); - } - } - - //Verify what apps has started - const TInt count(windowGroupIds.Count()); - for(TInt iter(0); iter < count; ++iter) - { - if( 0 >= windowGroupIds[iter].iParentId ) - { - //push new task to register application update in storage and - //register it running task list - CApaWindowGroupName* name = - CApaWindowGroupName::NewLC( iSession, windowGroupIds[iter].iId); - if( 0 != name->AppUid().iUid ) - { - CCaStorageTask::ExecuteL( iTaskHandler, - iStorage, - name->AppUid(), - windowGroupIds[iter].iId ); - iRunningTasks.Insert( windowGroupIds[iter].iId, - name->AppUid() ); - } - CleanupStack::PopAndDestroy( name ); - } - } - CleanupStack::PopAndDestroy( &windowGroupIds ); - } - -// ----------------------------------------------------------------------------- -// Subscribe -// ----------------------------------------------------------------------------- -// -void CCaRunningAppMonitor::Subscribe() - { - if( !IsActive() ) - { - iSession.EventReady( &iStatus ); - SetActive(); - } - } - -// ----------------------------------------------------------------------------- -// ConstractObserverL -// ----------------------------------------------------------------------------- -// -void CCaRunningAppMonitor::ConstractObserverL() -{ - User::LeaveIfError( iSession.Connect() ); - iWg = RWindowGroup( iSession ); - User::LeaveIfError( iWg.Construct( - reinterpret_cast( &iWg ) ) ); - iWg.DisableFocusChangeEvents(); - iWg.DisableModifierChangedEvents(); - iWg.DisableOnEvents(); - iWg.DisableScreenChangeEvents(); - - //enable notifications about group lists - User::LeaveIfError( iWg.EnableGroupListChangeEvents() ); -} - -// ----------------------------------------------------------------------------- -// ResetStorageL -// ----------------------------------------------------------------------------- -// -void CCaRunningAppMonitor::ResetStorageL() -{ - CCaInnerQuery* allAppQuery = CCaInnerQuery::NewLC(); - allAppQuery->SetFlagsOn( ERunning ); - RPointerArray entries; - CleanupResetAndDestroyPushL( entries ); - iStorage.GetEntriesL( allAppQuery, entries ); - for( TInt i(0); i < entries.Count(); ++i ) - { - CCaStorageTask::ExecuteL( iTaskHandler, - iStorage, - TUid::Uid(entries[i]->GetUid()), - KErrNotFound ); - } - CleanupStack::PopAndDestroy(&entries); - CleanupStack::PopAndDestroy(allAppQuery); -} - -// ----------------------------------------------------------------------------- -// RunL -// ----------------------------------------------------------------------------- -// -void CCaRunningAppMonitor::RunL() - { - User::LeaveIfError( iStatus.Int() ); - TWsEvent event; - iSession.GetEvent( event ); - Subscribe();//new subscribtion has to be called after picking event - if( EEventWindowGroupListChanged == event.Type() ) - { - UpdateRunningAppStorageL(); - } - } - -// ----------------------------------------------------------------------------- -// RunError -// ----------------------------------------------------------------------------- -// -TInt CCaRunningAppMonitor::RunError( TInt /*aError*/ ) - { - //ignore error - Subscribe(); - return KErrNone; - } - -// ----------------------------------------------------------------------------- -// DoCancel -// ----------------------------------------------------------------------------- -// -void CCaRunningAppMonitor::DoCancel() - { - if( IsActive() ) - { - iSession.EventReadyCancel(); - } - } diff -r dbfb5e38438b -r 305818acdca4 contentstorage/casrv/carunningappmonitor/src/castoragetask.cpp --- a/contentstorage/casrv/carunningappmonitor/src/castoragetask.cpp Wed Aug 18 10:39:24 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,196 +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: castoragetask.cpp -* -*/ -#include -#include - -#include "castoragetask.h" -#include "cadef.h" -#include "cainnerquery.h" -#include "cainnerentry.h" -#include "castorageproxy.h" -#include "carunningtaskhandler.h" -#include "caarraycleanup.inl" -#include "cadef.h" - -const TInt KDelayTaskRetry(10000); -const TInt KMaxTaskRetry(1); - -// ----------------------------------------------------------------------------- -// ExecuteL -// ----------------------------------------------------------------------------- -// -void CCaStorageTask::ExecuteL( MCaRunningTaskHandler& aTaskHandler, - CCaStorageProxy& aStorage, - TUid aUid, - TInt aWgi ) - { - CCaStorageTask* self = - new (ELeave)CCaStorageTask( aTaskHandler, aStorage, aUid, aWgi ); - CleanupStack::PushL( self ); - self->ConstructL(); - //task instance is registered on task handler. shouldn't be deleted here - CleanupStack::Pop( self ); - } - -// ----------------------------------------------------------------------------- -// ~CCaStorageTask -// ----------------------------------------------------------------------------- -// -CCaStorageTask::~CCaStorageTask() - { - Cancel(); - iTimer.Close(); - } - -// ----------------------------------------------------------------------------- -// CCaStorageTask -// ----------------------------------------------------------------------------- -// -CCaStorageTask::CCaStorageTask( MCaRunningTaskHandler& aTaskHandler, - CCaStorageProxy& aStorage, - TUid aUid, - TInt aWgId ) -: -CActive( EPriorityLow ), -iTaskHandler( aTaskHandler ), -iStorage( aStorage ), -iUid( aUid ), -iWgId( aWgId ) - { - CActiveScheduler::Add( this ); - } - -// ----------------------------------------------------------------------------- -// ConstructL -// ----------------------------------------------------------------------------- -// -void CCaStorageTask::ConstructL() - { - User::LeaveIfError( iTimer.CreateLocal() ); - iStatus = KRequestPending; - TRequestStatus* status = &iStatus; - User::RequestComplete( status, KErrNone ); - SetActive(); - iTaskHandler.RegisterTaskL( this ); - } - -// ----------------------------------------------------------------------------- -// UnregisterD -// ----------------------------------------------------------------------------- -// -void CCaStorageTask::UnregisterD() - { - iTaskHandler.UnregisterTask( this ); - delete this; - } - -// ----------------------------------------------------------------------------- -// GetEntriesL -// ----------------------------------------------------------------------------- -// -void CCaStorageTask::GetEntriesL( RPointerArray& aArray ) - { - CCaInnerQuery* allAppQuery = CCaInnerQuery::NewLC(); - allAppQuery->SetUid( static_cast( iUid.iUid ) ); - iStorage.GetEntriesL( allAppQuery, aArray ); - CleanupStack::PopAndDestroy( allAppQuery ); - } - -// ----------------------------------------------------------------------------- -// UpdateEntryL -// ----------------------------------------------------------------------------- -// -TInt CCaStorageTask::UpdateEntryL() - { - TInt retVal( KErrNone ); - RPointerArray entries; - CleanupResetAndDestroyPushL( entries ); - GetEntriesL( entries ); - //update only first found entry. othere are just ignored - retVal = (0 < entries.Count()) ? UpdateEntryL( *entries[0] ) : KErrNotFound; - CleanupStack::PopAndDestroy( &entries ); - return retVal; - } - -// ----------------------------------------------------------------------------- -// UpdateEntryL -// ----------------------------------------------------------------------------- -// -TInt CCaStorageTask::UpdateEntryL( CCaInnerEntry& aEntry ) - { - if(KErrNotFound == iWgId) - { - aEntry.SetFlags( aEntry.GetFlags() & ~ERunning ); - RBuf currValue;//temporary variable required to verify if attr exists - CleanupClosePushL( currValue ); - currValue.CreateL( KCaMaxAttrValueLen ); - if( aEntry.FindAttribute( KCaAttrWindowGroupId, currValue ) ) - { - aEntry.RemoveAttributeL( KCaAttrWindowGroupId ); - } - CleanupStack::PopAndDestroy( &currValue ); - } - else - { - aEntry.SetFlags(aEntry.GetFlags() | ERunning); - RBuf newValue; - CleanupClosePushL(newValue); - newValue.CreateL(KCaMaxAttrValueLen); - newValue.Num(iWgId); - aEntry.AddAttributeL( KCaAttrWindowGroupId, newValue ); - CleanupStack::PopAndDestroy( &newValue ); - } - iStorage.AddL( &aEntry ); - return KErrNone; - } - -// ----------------------------------------------------------------------------- -// RunL -// ----------------------------------------------------------------------------- -// -void CCaStorageTask::RunL() - { - User::LeaveIfError( iStatus.Int() ); - if( KErrNone == UpdateEntryL() || KMaxTaskRetry <= iCount++ ) - { - UnregisterD(); - } - else - { - iTimer.After( iStatus, TTimeIntervalMicroSeconds32( KDelayTaskRetry ) ); - SetActive(); - } - } - -// ----------------------------------------------------------------------------- -// RunError -// ----------------------------------------------------------------------------- -// -TInt CCaStorageTask::RunError( TInt /*aError*/ ) - { - UnregisterD(); - return KErrNone; - } - -// ----------------------------------------------------------------------------- -// DoCancel -// ----------------------------------------------------------------------------- -// -void CCaStorageTask::DoCancel() - { - iTimer.Cancel(); - } diff -r dbfb5e38438b -r 305818acdca4 contentstorage/casrv/carunningappmonitor/src/proxy.cpp --- a/contentstorage/casrv/carunningappmonitor/src/proxy.cpp Wed Aug 18 10:39:24 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: proxy.cpp -* -*/ -#include -#include -#include "carunningapphandler.h" - -// 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( 0x200267B5, CCaRunningAppHandler::NewL ) - }; - -// Function used to return an instance of the proxy table. -EXPORT_C const TImplementationProxy* ImplementationGroupProxy( - TInt& aTableCount ) - { - aTableCount = sizeof( ImplementationTable ) - / sizeof(TImplementationProxy); - return ImplementationTable; - } diff -r dbfb5e38438b -r 305818acdca4 contentstorage/casrv/causifscanner/src/causifscanner.cpp --- a/contentstorage/casrv/causifscanner/src/causifscanner.cpp Wed Aug 18 10:39:24 2010 +0300 +++ b/contentstorage/casrv/causifscanner/src/causifscanner.cpp Mon Sep 13 13:26:33 2010 +0300 @@ -156,6 +156,10 @@ { aCaEntry->AddAttributeL( KCaAttrAppType, KCaAttrAppTypeValueJava ); } + else if( !aEntry->SoftwareType().Compare( KSoftwareTypeWidget ) ) + { + aCaEntry->AddAttributeL( KCaAttrAppType, KCaAttrAppTypeValueCWRT ); + } if( aEntry->Name().Compare( KNullDesC ) ) { aCaEntry->SetTextL( aEntry->Name() ); diff -r dbfb5e38438b -r 305818acdca4 contentstorage/castorage/conf/CI_castoragedb.confml --- a/contentstorage/castorage/conf/CI_castoragedb.confml Wed Aug 18 10:39:24 2010 +0300 +++ b/contentstorage/castorage/conf/CI_castoragedb.confml Mon Sep 13 13:26:33 2010 +0300 @@ -28,18 +28,18 @@ Icon Theme id. - - + + Title of the Operator URL - + Short Title of the Operator URL. Optional. Displayed when shortcut to Url is added to Homescreen - + URL - + Icon for the Operator URL. @@ -58,7 +58,7 @@ Application item for Operator collection. - + - + @@ -94,8 +94,8 @@ Group name. Not localized name. Identify collection where application with predefined group name should be added after installation. - - Lock operator collection and content - user can not delete operator collection, prevent renaming collection and even content. Not possible by user to add new content to defined collection + + Lock collection and content - user cannot delete collection, prevent renaming collection and even content. Not possible by user to add new content to defined collection Icon. @@ -139,7 +139,7 @@ Application item for Operator collection. - +