# HG changeset patch # User hgs # Date 1287387855 -10800 # Node ID 7b66bc3c6dc98d624cdc2166b3ee5d7076a35ebd # Parent efda7c0771b9935d18580b7b4fe491ca43aae63a 201041 diff -r efda7c0771b9 -r 7b66bc3c6dc9 activityfw/storage/server/group/server.mmp --- a/activityfw/storage/server/group/server.mmp Wed Oct 13 12:59:22 2010 +0300 +++ b/activityfw/storage/server/group/server.mmp Mon Oct 18 10:44:15 2010 +0300 @@ -52,7 +52,7 @@ STATICLIBRARY afstoragecommon.lib CAPABILITY ALL -TCB -EPOCHEAPSIZE 0x100000 0x600000 // 1MB - 6MB +EPOCHEAPSIZE 0x5000 0x600000 // 20 KB - 6MB #ifdef ENABLE_ABIV2_MODE DEBUGGABLE_UDEBONLY diff -r efda7c0771b9 -r 7b66bc3c6dc9 activityfw/storage/server/inc/afstoragesynctask.h --- a/activityfw/storage/server/inc/afstoragesynctask.h Wed Oct 13 12:59:22 2010 +0300 +++ b/activityfw/storage/server/inc/afstoragesynctask.h Mon Oct 18 10:44:15 2010 +0300 @@ -50,8 +50,6 @@ static void NotifyChangeL(MAfTaskStorage& observers, const RMessage2& msg); - static void CreateThumbnailL(const TDesC &path, TInt hdl); - static void DeleteActivityScreenshotL(CAfStorage& dataStorage, TInt uid, const TDesC &activityName); diff -r efda7c0771b9 -r 7b66bc3c6dc9 activityfw/storage/server/src/afstoragesynctask.cpp --- a/activityfw/storage/server/src/afstoragesynctask.cpp Wed Oct 13 12:59:22 2010 +0300 +++ b/activityfw/storage/server/src/afstoragesynctask.cpp Mon Oct 18 10:44:15 2010 +0300 @@ -185,19 +185,3 @@ table[iter]->BroadcastReceivedL(msg); } } - -// ----------------------------------------------------------------------------- -// -// ----------------------------------------------------------------------------- -// -void AfStorageSyncTask::CreateThumbnailL(const TDesC &path, TInt hdl) -{ - if (0 >= hdl) { - User::Leave(KErrCorrupt); - } - CFbsBitmap *bitmap = new (ELeave) CFbsBitmap; - CleanupStack::PushL(bitmap); - User::LeaveIfError(bitmap->Duplicate(hdl)); - User::LeaveIfError(bitmap->Save(path)); - CleanupStack::PopAndDestroy(bitmap); -} diff -r efda7c0771b9 -r 7b66bc3c6dc9 common.pri --- a/common.pri Wed Oct 13 12:59:22 2010 +0300 +++ b/common.pri Mon Oct 18 10:44:15 2010 +0300 @@ -103,7 +103,8 @@ qtplugins.path = $$PLUGIN_SUBDIR qtplugins.sources += qmakepluginstubs/$${TARGET}.qtplugin - contains(MOBILITY, serviceframework):BLD_INF_RULES.prj_exports += "resource/$${TARGET}.xml z:$$qtplugins.path/$${TARGET}.xml" + CONFIG += qtservice + QTSERVICE.DESCRIPTOR = ./resource/$${TARGET}.xml for(qtplugin, qtplugins.sources):BLD_INF_RULES.prj_exports += "./$$qtplugin z:$$qtplugins.path/$$basename(qtplugin)" } diff -r efda7c0771b9 -r 7b66bc3c6dc9 contentstorage/bwins/camenuu.def --- a/contentstorage/bwins/camenuu.def Wed Oct 13 12:59:22 2010 +0300 +++ b/contentstorage/bwins/camenuu.def Mon Oct 18 10:44:15 2010 +0300 @@ -24,5 +24,4 @@ ?NewL@CCaSrvMmcHistory@@SAPAV1@XZ @ 23 NONAME ; class CCaSrvMmcHistory * CCaSrvMmcHistory::NewL(void) ?AddLocalizationL@CCaStorageProxy@@QAEXABVCCaLocalizationEntry@@@Z @ 24 NONAME ; void CCaStorageProxy::AddLocalizationL(class CCaLocalizationEntry const &) ?SaveDatabaseL@CCaStorageProxy@@QAEXXZ @ 25 NONAME ; void CCaStorageProxy::SaveDatabaseL(void) - ?RestoreDatabaseL@CCaStorageProxy@@QAEXXZ @ 26 NONAME ; void CCaStorageProxy::RestoreDatabaseL(void) diff -r efda7c0771b9 -r 7b66bc3c6dc9 contentstorage/bwins/cautilsu.def --- a/contentstorage/bwins/cautilsu.def Wed Oct 13 12:59:22 2010 +0300 +++ b/contentstorage/bwins/cautilsu.def Mon Oct 18 10:44:15 2010 +0300 @@ -51,55 +51,57 @@ ?GetIconId@CCaInnerEntry@@QBEHXZ @ 50 NONAME ; int CCaInnerEntry::GetIconId(void) const ?SetIconDataL@CCaInnerEntry@@QAEXABVTDesC16@@00@Z @ 51 NONAME ; void CCaInnerEntry::SetIconDataL(class TDesC16 const &, class TDesC16 const &, class TDesC16 const &) ?GetEntryRole@CCaInnerNotifierFilter@@QBE?AW4TEntryRole@@XZ @ 52 NONAME ; enum TEntryRole CCaInnerNotifierFilter::GetEntryRole(void) const - ?GetId@CCaInnerEntry@@QBEHXZ @ 53 NONAME ; int CCaInnerEntry::GetId(void) const - ?SetDescriptionL@CCaInnerEntry@@QAEXABVTDesC16@@H@Z @ 54 NONAME ; void CCaInnerEntry::SetDescriptionL(class TDesC16 const &, int) - ?SetEntryTypeNames@CCaInnerQuery@@QAEXPAVCDesC16ArrayFlat@@@Z @ 55 NONAME ; void CCaInnerQuery::SetEntryTypeNames(class CDesC16ArrayFlat *) - ?Exist@RCaEntryAttrArray@@QBEHABVTDesC16@@@Z @ 56 NONAME ; int RCaEntryAttrArray::Exist(class TDesC16 const &) const - ?GetNotifierType@CCaInnerNotifierFilter@@QBE?AW4TNotifierType@1@XZ @ 57 NONAME ; enum CCaInnerNotifierFilter::TNotifierType CCaInnerNotifierFilter::GetNotifierType(void) const - ?SetTextL@CCaInnerEntry@@QAEXABVTDesC16@@H@Z @ 58 NONAME ; void CCaInnerEntry::SetTextL(class TDesC16 const &, int) - ?ExternalizeL@CCaInnerEntry@@QBEXAAVRWriteStream@@@Z @ 59 NONAME ; void CCaInnerEntry::ExternalizeL(class RWriteStream &) const - ?SetRole@CCaInnerQuery@@QAEXH@Z @ 60 NONAME ; void CCaInnerQuery::SetRole(int) - ?NewL@CCaLocalizationEntry@@SAPAV1@XZ @ 61 NONAME ; class CCaLocalizationEntry * CCaLocalizationEntry::NewL(void) - ?InternalizeL@CCaInnerNotifierFilter@@QAEXAAVRReadStream@@@Z @ 62 NONAME ; void CCaInnerNotifierFilter::InternalizeL(class RReadStream &) - ?InternalizeL@RCaIdsArray@@QAEXAAVRReadStream@@@Z @ 63 NONAME ; void RCaIdsArray::InternalizeL(class RReadStream &) - ?SetQmFilenameL@CCaLocalizationEntry@@QAEXABVTDesC16@@@Z @ 64 NONAME ; void CCaLocalizationEntry::SetQmFilenameL(class TDesC16 const &) - ?MarshalDataLC@RCaIdsArray@@QBEPAVHBufC8@@XZ @ 65 NONAME ; class HBufC8 * RCaIdsArray::MarshalDataLC(void) const - ?GetEntryTypeNames@CCaInnerQuery@@QBEPBVCDesC16ArrayFlat@@XZ @ 66 NONAME ; class CDesC16ArrayFlat const * CCaInnerQuery::GetEntryTypeNames(void) const - ?SetValueL@CCaEntryAttribute@@QAEXABVTDesC16@@@Z @ 67 NONAME ; void CCaEntryAttribute::SetValueL(class TDesC16 const &) - ?SetSkinIdL@CCaInnerIconDescription@@QAEXABVTDesC16@@@Z @ 68 NONAME ; void CCaInnerIconDescription::SetSkinIdL(class TDesC16 const &) - ?ExternalizeL@CCaInnerQuery@@QBEXAAVRWriteStream@@@Z @ 69 NONAME ; void CCaInnerQuery::ExternalizeL(class RWriteStream &) const - ?GetLocalizedString@CCaLocalizationEntry@@QBEABVRBuf16@@XZ @ 70 NONAME ; class RBuf16 const & CCaLocalizationEntry::GetLocalizedString(void) const - ?InternalizeL@CCaInnerQuery@@QAEXAAVRReadStream@@@Z @ 71 NONAME ; void CCaInnerQuery::InternalizeL(class RReadStream &) - ?NewLC@CCaEntryAttribute@@SAPAV1@ABVTDesC16@@@Z @ 72 NONAME ; class CCaEntryAttribute * CCaEntryAttribute::NewLC(class TDesC16 const &) - ?GetTypeNames@CCaInnerNotifierFilter@@QBEPAVCDesC16ArrayFlat@@XZ @ 73 NONAME ; class CDesC16ArrayFlat * CCaInnerNotifierFilter::GetTypeNames(void) const - ?NewL@CCaInnerEntry@@SAPAV1@XZ @ 74 NONAME ; class CCaInnerEntry * CCaInnerEntry::NewL(void) - ?SetRole@CCaInnerEntry@@QAEXI@Z @ 75 NONAME ; void CCaInnerEntry::SetRole(unsigned int) - ?NewLC@CCaInnerEntry@@SAPAV1@XZ @ 76 NONAME ; class CCaInnerEntry * CCaInnerEntry::NewLC(void) - ?SetTableNameL@CCaLocalizationEntry@@QAEXABVTDesC16@@@Z @ 77 NONAME ; void CCaLocalizationEntry::SetTableNameL(class TDesC16 const &) - ?GetAttributes@CCaInnerEntry@@QBEABVRCaEntryAttrArray@@XZ @ 78 NONAME ; class RCaEntryAttrArray const & CCaInnerEntry::GetAttributes(void) const - ?GetRowId@CCaLocalizationEntry@@QBEHXZ @ 79 NONAME ; int CCaLocalizationEntry::GetRowId(void) const - ?NewLC@CCaInnerIconDescription@@SAPAV1@XZ @ 80 NONAME ; class CCaInnerIconDescription * CCaInnerIconDescription::NewLC(void) - ?SetIdsL@CCaInnerQuery@@QAEXABV?$RArray@H@@@Z @ 81 NONAME ; void CCaInnerQuery::SetIdsL(class RArray const &) - ?SetFlagsOff@CCaInnerQuery@@QAEXI@Z @ 82 NONAME ; void CCaInnerQuery::SetFlagsOff(unsigned int) - ?Icon@CCaInnerEntry@@QBEPBVCCaInnerIconDescription@@XZ @ 83 NONAME ; class CCaInnerIconDescription const * CCaInnerEntry::Icon(void) const - ?SetApplicationIdL@CCaInnerIconDescription@@QAEXABVTDesC16@@@Z @ 84 NONAME ; void CCaInnerIconDescription::SetApplicationIdL(class TDesC16 const &) - ?FindAttribute@CCaInnerEntry@@QAEHABVTDesC16@@AAVTPtrC16@@@Z @ 85 NONAME ; int CCaInnerEntry::FindAttribute(class TDesC16 const &, class TPtrC16 &) - ?RemoveAttributeL@CCaInnerEntry@@QAEXABVTDesC16@@@Z @ 86 NONAME ; void CCaInnerEntry::RemoveAttributeL(class TDesC16 const &) - ?GetRole@CCaInnerEntry@@QBEIXZ @ 87 NONAME ; unsigned int CCaInnerEntry::GetRole(void) const - ?GetIds@CCaInnerQuery@@QBEABV?$RArray@H@@XZ @ 88 NONAME ; class RArray const & CCaInnerQuery::GetIds(void) const - ?ExternalizeL@RCaEntriesArray@@QBEXAAVRWriteStream@@@Z @ 89 NONAME ; void RCaEntriesArray::ExternalizeL(class RWriteStream &) const - ?NewL@CCaInnerQuery@@SAPAV1@XZ @ 90 NONAME ; class CCaInnerQuery * CCaInnerQuery::NewL(void) - ?isLocalized@CCaInnerEntry@@QBEHW4TLocalizedType@1@@Z @ 91 NONAME ; int CCaInnerEntry::isLocalized(enum CCaInnerEntry::TLocalizedType) const - ?SetUid@CCaInnerQuery@@QAEXI@Z @ 92 NONAME ; void CCaInnerQuery::SetUid(unsigned int) - ?GetDescription@CCaInnerEntry@@QBEABVRBuf16@@XZ @ 93 NONAME ; class RBuf16 const & CCaInnerEntry::GetDescription(void) const - ?Find@RCaEntryAttrArray@@QBEHABVTDesC16@@AAVTDes16@@@Z @ 94 NONAME ; int RCaEntryAttrArray::Find(class TDesC16 const &, class TDes16 &) const - ?GetRole@CCaInnerQuery@@QBEHXZ @ 95 NONAME ; int CCaInnerQuery::GetRole(void) const - ?GetEntryTypeName@CCaInnerEntry@@QBEABVRBuf16@@XZ @ 96 NONAME ; class RBuf16 const & CCaInnerEntry::GetEntryTypeName(void) const - ?NewLC@CCaInnerQuery@@SAPAV1@XZ @ 97 NONAME ; class CCaInnerQuery * CCaInnerQuery::NewLC(void) - ?SetParentId@CCaInnerQuery@@QAEXH@Z @ 98 NONAME ; void CCaInnerQuery::SetParentId(int) - ?GetIds@CCaInnerNotifierFilter@@QBE?AV?$RArray@H@@XZ @ 99 NONAME ; class RArray CCaInnerNotifierFilter::GetIds(void) const - ?SetStringIdL@CCaLocalizationEntry@@QAEXABVTDesC16@@@Z @ 100 NONAME ; void CCaLocalizationEntry::SetStringIdL(class TDesC16 const &) - ?InitTextResolverSymbianL@MenuUtils@@SAXABVTDesC16@@@Z @ 101 NONAME ; void MenuUtils::InitTextResolverSymbianL(class TDesC16 const &) - ?SetTextId@CCaLocalizationEntry@@QAEXI@Z @ 102 NONAME ; void CCaLocalizationEntry::SetTextId(unsigned int) - ?RemoveAttribute@RCaEntryAttrArray@@QAEXABVTDesC16@@@Z @ 103 NONAME ; void RCaEntryAttrArray::RemoveAttribute(class TDesC16 const &) + ?SetParentIdsL@CCaInnerEntry@@QAEXABV?$RArray@H@@@Z @ 53 NONAME ; void CCaInnerEntry::SetParentIdsL(class RArray const &) + ?GetId@CCaInnerEntry@@QBEHXZ @ 54 NONAME ; int CCaInnerEntry::GetId(void) const + ?SetDescriptionL@CCaInnerEntry@@QAEXABVTDesC16@@H@Z @ 55 NONAME ; void CCaInnerEntry::SetDescriptionL(class TDesC16 const &, int) + ?SetEntryTypeNames@CCaInnerQuery@@QAEXPAVCDesC16ArrayFlat@@@Z @ 56 NONAME ; void CCaInnerQuery::SetEntryTypeNames(class CDesC16ArrayFlat *) + ?Exist@RCaEntryAttrArray@@QBEHABVTDesC16@@@Z @ 57 NONAME ; int RCaEntryAttrArray::Exist(class TDesC16 const &) const + ?GetNotifierType@CCaInnerNotifierFilter@@QBE?AW4TNotifierType@1@XZ @ 58 NONAME ; enum CCaInnerNotifierFilter::TNotifierType CCaInnerNotifierFilter::GetNotifierType(void) const + ?SetTextL@CCaInnerEntry@@QAEXABVTDesC16@@H@Z @ 59 NONAME ; void CCaInnerEntry::SetTextL(class TDesC16 const &, int) + ?ExternalizeL@CCaInnerEntry@@QBEXAAVRWriteStream@@@Z @ 60 NONAME ; void CCaInnerEntry::ExternalizeL(class RWriteStream &) const + ?GetParentIds@CCaInnerEntry@@QBEABV?$RArray@H@@XZ @ 61 NONAME ; class RArray const & CCaInnerEntry::GetParentIds(void) const + ?SetRole@CCaInnerQuery@@QAEXH@Z @ 62 NONAME ; void CCaInnerQuery::SetRole(int) + ?NewL@CCaLocalizationEntry@@SAPAV1@XZ @ 63 NONAME ; class CCaLocalizationEntry * CCaLocalizationEntry::NewL(void) + ?InternalizeL@CCaInnerNotifierFilter@@QAEXAAVRReadStream@@@Z @ 64 NONAME ; void CCaInnerNotifierFilter::InternalizeL(class RReadStream &) + ?InternalizeL@RCaIdsArray@@QAEXAAVRReadStream@@@Z @ 65 NONAME ; void RCaIdsArray::InternalizeL(class RReadStream &) + ?SetQmFilenameL@CCaLocalizationEntry@@QAEXABVTDesC16@@@Z @ 66 NONAME ; void CCaLocalizationEntry::SetQmFilenameL(class TDesC16 const &) + ?MarshalDataLC@RCaIdsArray@@QBEPAVHBufC8@@XZ @ 67 NONAME ; class HBufC8 * RCaIdsArray::MarshalDataLC(void) const + ?GetEntryTypeNames@CCaInnerQuery@@QBEPBVCDesC16ArrayFlat@@XZ @ 68 NONAME ; class CDesC16ArrayFlat const * CCaInnerQuery::GetEntryTypeNames(void) const + ?SetValueL@CCaEntryAttribute@@QAEXABVTDesC16@@@Z @ 69 NONAME ; void CCaEntryAttribute::SetValueL(class TDesC16 const &) + ?SetSkinIdL@CCaInnerIconDescription@@QAEXABVTDesC16@@@Z @ 70 NONAME ; void CCaInnerIconDescription::SetSkinIdL(class TDesC16 const &) + ?ExternalizeL@CCaInnerQuery@@QBEXAAVRWriteStream@@@Z @ 71 NONAME ; void CCaInnerQuery::ExternalizeL(class RWriteStream &) const + ?GetLocalizedString@CCaLocalizationEntry@@QBEABVRBuf16@@XZ @ 72 NONAME ; class RBuf16 const & CCaLocalizationEntry::GetLocalizedString(void) const + ?InternalizeL@CCaInnerQuery@@QAEXAAVRReadStream@@@Z @ 73 NONAME ; void CCaInnerQuery::InternalizeL(class RReadStream &) + ?NewLC@CCaEntryAttribute@@SAPAV1@ABVTDesC16@@@Z @ 74 NONAME ; class CCaEntryAttribute * CCaEntryAttribute::NewLC(class TDesC16 const &) + ?GetTypeNames@CCaInnerNotifierFilter@@QBEPAVCDesC16ArrayFlat@@XZ @ 75 NONAME ; class CDesC16ArrayFlat * CCaInnerNotifierFilter::GetTypeNames(void) const + ?NewL@CCaInnerEntry@@SAPAV1@XZ @ 76 NONAME ; class CCaInnerEntry * CCaInnerEntry::NewL(void) + ?SetRole@CCaInnerEntry@@QAEXI@Z @ 77 NONAME ; void CCaInnerEntry::SetRole(unsigned int) + ?NewLC@CCaInnerEntry@@SAPAV1@XZ @ 78 NONAME ; class CCaInnerEntry * CCaInnerEntry::NewLC(void) + ?SetTableNameL@CCaLocalizationEntry@@QAEXABVTDesC16@@@Z @ 79 NONAME ; void CCaLocalizationEntry::SetTableNameL(class TDesC16 const &) + ?GetAttributes@CCaInnerEntry@@QBEABVRCaEntryAttrArray@@XZ @ 80 NONAME ; class RCaEntryAttrArray const & CCaInnerEntry::GetAttributes(void) const + ?GetRowId@CCaLocalizationEntry@@QBEHXZ @ 81 NONAME ; int CCaLocalizationEntry::GetRowId(void) const + ?NewLC@CCaInnerIconDescription@@SAPAV1@XZ @ 82 NONAME ; class CCaInnerIconDescription * CCaInnerIconDescription::NewLC(void) + ?SetIdsL@CCaInnerQuery@@QAEXABV?$RArray@H@@@Z @ 83 NONAME ; void CCaInnerQuery::SetIdsL(class RArray const &) + ?SetFlagsOff@CCaInnerQuery@@QAEXI@Z @ 84 NONAME ; void CCaInnerQuery::SetFlagsOff(unsigned int) + ?Icon@CCaInnerEntry@@QBEPBVCCaInnerIconDescription@@XZ @ 85 NONAME ; class CCaInnerIconDescription const * CCaInnerEntry::Icon(void) const + ?SetApplicationIdL@CCaInnerIconDescription@@QAEXABVTDesC16@@@Z @ 86 NONAME ; void CCaInnerIconDescription::SetApplicationIdL(class TDesC16 const &) + ?FindAttribute@CCaInnerEntry@@QAEHABVTDesC16@@AAVTPtrC16@@@Z @ 87 NONAME ; int CCaInnerEntry::FindAttribute(class TDesC16 const &, class TPtrC16 &) + ?RemoveAttributeL@CCaInnerEntry@@QAEXABVTDesC16@@@Z @ 88 NONAME ; void CCaInnerEntry::RemoveAttributeL(class TDesC16 const &) + ?GetRole@CCaInnerEntry@@QBEIXZ @ 89 NONAME ; unsigned int CCaInnerEntry::GetRole(void) const + ?GetIds@CCaInnerQuery@@QBEABV?$RArray@H@@XZ @ 90 NONAME ; class RArray const & CCaInnerQuery::GetIds(void) const + ?ExternalizeL@RCaEntriesArray@@QBEXAAVRWriteStream@@@Z @ 91 NONAME ; void RCaEntriesArray::ExternalizeL(class RWriteStream &) const + ?NewL@CCaInnerQuery@@SAPAV1@XZ @ 92 NONAME ; class CCaInnerQuery * CCaInnerQuery::NewL(void) + ?isLocalized@CCaInnerEntry@@QBEHW4TLocalizedType@1@@Z @ 93 NONAME ; int CCaInnerEntry::isLocalized(enum CCaInnerEntry::TLocalizedType) const + ?SetUid@CCaInnerQuery@@QAEXI@Z @ 94 NONAME ; void CCaInnerQuery::SetUid(unsigned int) + ?GetDescription@CCaInnerEntry@@QBEABVRBuf16@@XZ @ 95 NONAME ; class RBuf16 const & CCaInnerEntry::GetDescription(void) const + ?Find@RCaEntryAttrArray@@QBEHABVTDesC16@@AAVTDes16@@@Z @ 96 NONAME ; int RCaEntryAttrArray::Find(class TDesC16 const &, class TDes16 &) const + ?GetRole@CCaInnerQuery@@QBEHXZ @ 97 NONAME ; int CCaInnerQuery::GetRole(void) const + ?GetEntryTypeName@CCaInnerEntry@@QBEABVRBuf16@@XZ @ 98 NONAME ; class RBuf16 const & CCaInnerEntry::GetEntryTypeName(void) const + ?NewLC@CCaInnerQuery@@SAPAV1@XZ @ 99 NONAME ; class CCaInnerQuery * CCaInnerQuery::NewLC(void) + ?SetParentId@CCaInnerQuery@@QAEXH@Z @ 100 NONAME ; void CCaInnerQuery::SetParentId(int) + ?GetIds@CCaInnerNotifierFilter@@QBE?AV?$RArray@H@@XZ @ 101 NONAME ; class RArray CCaInnerNotifierFilter::GetIds(void) const + ?SetStringIdL@CCaLocalizationEntry@@QAEXABVTDesC16@@@Z @ 102 NONAME ; void CCaLocalizationEntry::SetStringIdL(class TDesC16 const &) + ?InitTextResolverSymbianL@MenuUtils@@SAXABVTDesC16@@@Z @ 103 NONAME ; void MenuUtils::InitTextResolverSymbianL(class TDesC16 const &) + ?SetTextId@CCaLocalizationEntry@@QAEXI@Z @ 104 NONAME ; void CCaLocalizationEntry::SetTextId(unsigned int) + ?RemoveAttribute@RCaEntryAttrArray@@QAEXABVTDesC16@@@Z @ 105 NONAME ; void RCaEntryAttrArray::RemoveAttribute(class TDesC16 const &) diff -r efda7c0771b9 -r 7b66bc3c6dc9 contentstorage/caclient/bwins/caclientu.def --- a/contentstorage/caclient/bwins/caclientu.def Wed Oct 13 12:59:22 2010 +0300 +++ b/contentstorage/caclient/bwins/caclientu.def Mon Oct 18 10:44:15 2010 +0300 @@ -135,67 +135,70 @@ ?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 - ?insertEntriesIntoGroup@CaService@@QBE_NHABV?$QList@H@@H@Z @ 182 NONAME ; bool CaService::insertEntriesIntoGroup(int, class QList const &, int) const - ?getApplicationIcon@CaMenuIconUtility@@SA?AVHbIcon@@HABVQSizeF@@@Z @ 183 NONAME ; class HbIcon CaMenuIconUtility::getApplicationIcon(int, class QSizeF const &) - ?trUtf8@CaItemModel@@SA?AVQString@@PBD0H@Z @ 184 NONAME ; class QString CaItemModel::trUtf8(char const *, char const *, int) - ?setFlagsOn@CaQuery@@QAEXABV?$QFlags@W4EntryFlag@@@@@Z @ 185 NONAME ; void CaQuery::setFlagsOn(class QFlags const &) - ?parent@CaItemModel@@UBE?AVQModelIndex@@ABV2@@Z @ 186 NONAME ; class QModelIndex CaItemModel::parent(class QModelIndex const &) const - ?empty@CaItemModel@@IAEX_N@Z @ 187 NONAME ; void CaItemModel::empty(bool) - ?filename@CaIconDescription@@QBE?AVQString@@XZ @ 188 NONAME ; class QString CaIconDescription::filename(void) const - ?setIconDescription@CaEntry@@QAEXABVCaIconDescription@@@Z @ 189 NONAME ; void CaEntry::setIconDescription(class CaIconDescription const &) - ?appendEntryToGroup@CaService@@QBE_NHH@Z @ 190 NONAME ; bool CaService::appendEntryToGroup(int, int) const - ?setTypeNames@CaNotifierFilter@@QAEXABVQStringList@@@Z @ 191 NONAME ; void CaNotifierFilter::setTypeNames(class QStringList const &) - ?entryTypeNames@CaQuery@@QBE?AVQStringList@@XZ @ 192 NONAME ; class QStringList CaQuery::entryTypeNames(void) const - ?findSession@CaClientNotifierProxy@@ABEHABVCaNotifierFilter@@W4TNotifierType@CCaInnerNotifierFilter@@@Z @ 193 NONAME ; int CaClientNotifierProxy::findSession(class CaNotifierFilter const &, enum CCaInnerNotifierFilter::TNotifierType) const - ?tr@CaClientNotifierProxy@@SA?AVQString@@PBD0H@Z @ 194 NONAME ; class QString CaClientNotifierProxy::tr(char const *, char const *, int) - ?setAutoUpdate@CaItemModel@@QAEX_N@Z @ 195 NONAME ; void CaItemModel::setAutoUpdate(bool) - ??_ECaService@@UAE@I@Z @ 196 NONAME ; CaService::~CaService(unsigned int) - ?removeEntryFromGroup@CaService@@QBE_NHH@Z @ 197 NONAME ; bool CaService::removeEntryFromGroup(int, int) const - ?index@CaItemModel@@UBE?AVQModelIndex@@HHABV2@@Z @ 198 NONAME ; class QModelIndex CaItemModel::index(int, int, class QModelIndex const &) const - ?removeAttribute@CaEntry@@QAEXABVQString@@@Z @ 199 NONAME ; void CaEntry::removeAttribute(class QString const &) + ?parentIds@CaEntry@@QBE?AV?$QList@H@@XZ @ 137 NONAME ; class QList CaEntry::parentIds(void) const + ?makeIcon@CaEntry@@QBE?AVHbIcon@@ABVQSizeF@@@Z @ 138 NONAME ; class HbIcon CaEntry::makeIcon(class QSizeF const &) const + ?tr@CaItemModel@@SA?AVQString@@PBD0H@Z @ 139 NONAME ; class QString CaItemModel::tr(char const *, char const *, int) + ?setFlagsOff@CaQuery@@QAEXABV?$QFlags@W4EntryFlag@@@@@Z @ 140 NONAME ; void CaQuery::setFlagsOff(class QFlags const &) + ?getEntry@CaService@@QBE?AV?$QSharedPointer@VCaEntry@@@@H@Z @ 141 NONAME ; class QSharedPointer CaService::getEntry(int) const + ??0CaEntry@@QAE@ABV0@@Z @ 142 NONAME ; CaEntry::CaEntry(class CaEntry const &) + ?rowCount@CaItemModel@@UBEHABVQModelIndex@@@Z @ 143 NONAME ; int CaItemModel::rowCount(class QModelIndex const &) const + ?clear@CaQuery@@QAEXXZ @ 144 NONAME ; void CaQuery::clear(void) + ?prependEntryToGroup@CaService@@QBE_NHH@Z @ 145 NONAME ; bool CaService::prependEntryToGroup(int, int) const + ?qt_metacast@CaClientNotifierProxy@@UAEPAXPBD@Z @ 146 NONAME ; void * CaClientNotifierProxy::qt_metacast(char const *) + ?getEntryIcon@CaMenuIconUtility@@SA?AVHbIcon@@ABVCaEntry@@ABVQSizeF@@@Z @ 147 NONAME ; class HbIcon CaMenuIconUtility::getEntryIcon(class CaEntry const &, class QSizeF const &) + ?tr@CaService@@SA?AVQString@@PBD0H@Z @ 148 NONAME ; class QString CaService::tr(char const *, char const *, int) + ?setParentIds@CaEntry@@QAEXABV?$QList@H@@@Z @ 149 NONAME ; void CaEntry::setParentIds(class QList const &) + ?entryRoles@CaQuery@@QBE?AV?$QFlags@W4EntryRole@@@@XZ @ 150 NONAME ; class QFlags CaQuery::entryRoles(void) const + ?qt_metacall@CaService@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 151 NONAME ; int CaService::qt_metacall(enum QMetaObject::Call, int, void * *) + ??4CaNotifierFilter@@QAEAAV0@ABV0@@Z @ 152 NONAME ; class CaNotifierFilter & CaNotifierFilter::operator=(class CaNotifierFilter const &) + ??0CaItemModel@@QAE@ABVCaQuery@@PAVQObject@@@Z @ 153 NONAME ; CaItemModel::CaItemModel(class CaQuery const &, class QObject *) + ?setFlagsOff@CaItemModel@@QAEXABV?$QFlags@W4EntryFlag@@@@@Z @ 154 NONAME ; void CaItemModel::setFlagsOff(class QFlags const &) + ?getSort@CaQuery@@QBEXAAW4SortAttribute@@AAW4SortOrder@Qt@@@Z @ 155 NONAME ; void CaQuery::getSort(enum SortAttribute &, enum Qt::SortOrder &) const + ?parentId@CaQuery@@QBEHXZ @ 156 NONAME ; int CaQuery::parentId(void) const + ?setEntryRoles@CaQuery@@QAEXV?$QFlags@W4EntryRole@@@@@Z @ 157 NONAME ; void CaQuery::setEntryRoles(class QFlags) + ??_ECaEntry@@UAE@I@Z @ 158 NONAME ; CaEntry::~CaEntry(unsigned int) + ??0CaService@@AAE@PAVQObject@@@Z @ 159 NONAME ; CaService::CaService(class QObject *) + ??1CaService@@EAE@XZ @ 160 NONAME ; CaService::~CaService(void) + ?flagsOn@CaQuery@@QBE?AV?$QFlags@W4EntryFlag@@@@XZ @ 161 NONAME ; class QFlags CaQuery::flagsOn(void) const + ?description@CaEntry@@QBE?AVQString@@XZ @ 162 NONAME ; class QString CaEntry::description(void) const + ?metaObject@CaNotifier@@UBEPBUQMetaObject@@XZ @ 163 NONAME ; struct QMetaObject const * CaNotifier::metaObject(void) const + ?data@CaItemModel@@UBE?AVQVariant@@ABVQModelIndex@@H@Z @ 164 NONAME ; class QVariant CaItemModel::data(class QModelIndex const &, int) const + ??0CaIconDescription@@QAE@ABV0@@Z @ 165 NONAME ; CaIconDescription::CaIconDescription(class CaIconDescription const &) + ?staticMetaObject@CaService@@2UQMetaObject@@B @ 166 NONAME ; struct QMetaObject const CaService::staticMetaObject + ?removeEntry@CaService@@QBE_NH@Z @ 167 NONAME ; bool CaService::removeEntry(int) const + ?addEntryTypeName@CaQuery@@QAEXABVQString@@@Z @ 168 NONAME ; void CaQuery::addEntryTypeName(class QString const &) + ?isAutoUpdate@CaItemModel@@QBE_NXZ @ 169 NONAME ; bool CaItemModel::isAutoUpdate(void) const + ??1CaEntry@@UAE@XZ @ 170 NONAME ; CaEntry::~CaEntry(void) + ?prependEntriesToGroup@CaService@@QBE_NABVCaEntry@@ABV?$QList@V?$QSharedPointer@VCaEntry@@@@@@@Z @ 171 NONAME ; bool CaService::prependEntriesToGroup(class CaEntry const &, class QList > const &) const + ?qt_metacall@CaNotifier@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 172 NONAME ; int CaNotifier::qt_metacall(enum QMetaObject::Call, int, void * *) + ?setSort@CaItemModel@@QAEXW4SortAttribute@@W4SortOrder@Qt@@@Z @ 173 NONAME ; void CaItemModel::setSort(enum SortAttribute, enum Qt::SortOrder) + ?removeEntry@CaService@@QBE_NABVCaEntry@@@Z @ 174 NONAME ; bool CaService::removeEntry(class CaEntry const &) const + ?setId@CaEntry@@AAEXH@Z @ 175 NONAME ; void CaEntry::setId(int) + ?staticMetaObject@CaNotifier@@2UQMetaObject@@B @ 176 NONAME ; struct QMetaObject const CaNotifier::staticMetaObject + ?applicationId@CaIconDescription@@QBE?AVQString@@XZ @ 177 NONAME ; class QString CaIconDescription::applicationId(void) const + ?getIds@CaNotifierFilter@@QBE?AV?$QList@H@@XZ @ 178 NONAME ; class QList CaNotifierFilter::getIds(void) const + ?setIds@CaNotifierFilter@@QAEXABV?$QList@H@@@Z @ 179 NONAME ; void CaNotifierFilter::setIds(class QList const &) + ??0CaEntry@@QAE@W4EntryRole@@@Z @ 180 NONAME ; CaEntry::CaEntry(enum EntryRole) + ?preloadHandlers@CaService@@QBEXXZ @ 181 NONAME ; void CaService::preloadHandlers(void) const + ?qt_metacast@CaItemModel@@UAEPAXPBD@Z @ 182 NONAME ; void * CaItemModel::qt_metacast(char const *) + ?trUtf8@CaClientNotifierProxy@@SA?AVQString@@PBD0H@Z @ 183 NONAME ; class QString CaClientNotifierProxy::trUtf8(char const *, char const *, int) + ?lastError@CaService@@QBE?AW4ErrorCode@@XZ @ 184 NONAME ; enum ErrorCode CaService::lastError(void) const + ?insertEntriesIntoGroup@CaService@@QBE_NHABV?$QList@H@@H@Z @ 185 NONAME ; bool CaService::insertEntriesIntoGroup(int, class QList const &, int) const + ?getApplicationIcon@CaMenuIconUtility@@SA?AVHbIcon@@HABVQSizeF@@@Z @ 186 NONAME ; class HbIcon CaMenuIconUtility::getApplicationIcon(int, class QSizeF const &) + ?trUtf8@CaItemModel@@SA?AVQString@@PBD0H@Z @ 187 NONAME ; class QString CaItemModel::trUtf8(char const *, char const *, int) + ?setFlagsOn@CaQuery@@QAEXABV?$QFlags@W4EntryFlag@@@@@Z @ 188 NONAME ; void CaQuery::setFlagsOn(class QFlags const &) + ?parent@CaItemModel@@UBE?AVQModelIndex@@ABV2@@Z @ 189 NONAME ; class QModelIndex CaItemModel::parent(class QModelIndex const &) const + ?empty@CaItemModel@@IAEX_N@Z @ 190 NONAME ; void CaItemModel::empty(bool) + ?filename@CaIconDescription@@QBE?AVQString@@XZ @ 191 NONAME ; class QString CaIconDescription::filename(void) const + ?setIconDescription@CaEntry@@QAEXABVCaIconDescription@@@Z @ 192 NONAME ; void CaEntry::setIconDescription(class CaIconDescription const &) + ?appendEntryToGroup@CaService@@QBE_NHH@Z @ 193 NONAME ; bool CaService::appendEntryToGroup(int, int) const + ?setTypeNames@CaNotifierFilter@@QAEXABVQStringList@@@Z @ 194 NONAME ; void CaNotifierFilter::setTypeNames(class QStringList const &) + ?entryTypeNames@CaQuery@@QBE?AVQStringList@@XZ @ 195 NONAME ; class QStringList CaQuery::entryTypeNames(void) const + ?findSession@CaClientNotifierProxy@@ABEHABVCaNotifierFilter@@W4TNotifierType@CCaInnerNotifierFilter@@@Z @ 196 NONAME ; int CaClientNotifierProxy::findSession(class CaNotifierFilter const &, enum CCaInnerNotifierFilter::TNotifierType) const + ?removeAttribute@CaEntry@@QAEXABVQString@@@Z @ 197 NONAME ; void CaEntry::removeAttribute(class QString const &) + ?tr@CaClientNotifierProxy@@SA?AVQString@@PBD0H@Z @ 198 NONAME ; class QString CaClientNotifierProxy::tr(char const *, char const *, int) + ?setAutoUpdate@CaItemModel@@QAEX_N@Z @ 199 NONAME ; void CaItemModel::setAutoUpdate(bool) + ??_ECaService@@UAE@I@Z @ 200 NONAME ; CaService::~CaService(unsigned int) + ?removeEntryFromGroup@CaService@@QBE_NHH@Z @ 201 NONAME ; bool CaService::removeEntryFromGroup(int, int) const + ?index@CaItemModel@@UBE?AVQModelIndex@@HHABV2@@Z @ 202 NONAME ; class QModelIndex CaItemModel::index(int, int, class QModelIndex const &) const diff -r efda7c0771b9 -r 7b66bc3c6dc9 contentstorage/caclient/eabi/caclientu.def --- a/contentstorage/caclient/eabi/caclientu.def Wed Oct 13 12:59:22 2010 +0300 +++ b/contentstorage/caclient/eabi/caclientu.def Mon Oct 18 10:44:15 2010 +0300 @@ -79,140 +79,143 @@ _ZN21CaClientNotifierProxyD2Ev @ 78 NONAME _ZN7CaEntry12setAttributeERK7QStringS2_ @ 79 NONAME _ZN7CaEntry14setDescriptionERK7QStringb @ 80 NONAME - _ZN7CaEntry16setEntryTypeNameERK7QString @ 81 NONAME - _ZN7CaEntry18setIconDescriptionERK17CaIconDescription @ 82 NONAME - _ZN7CaEntry5setIdEi @ 83 NONAME - _ZN7CaEntry7setTextERK7QStringb @ 84 NONAME - _ZN7CaEntry8setFlagsE6QFlagsI9EntryFlagE @ 85 NONAME - _ZN7CaEntryC1E9EntryRole @ 86 NONAME - _ZN7CaEntryC1ERKS_ @ 87 NONAME - _ZN7CaEntryC2E9EntryRole @ 88 NONAME - _ZN7CaEntryC2ERKS_ @ 89 NONAME - _ZN7CaEntryD0Ev @ 90 NONAME - _ZN7CaEntryD1Ev @ 91 NONAME - _ZN7CaEntryD2Ev @ 92 NONAME - _ZN7CaEntryaSERKS_ @ 93 NONAME - _ZN7CaQuery10setChildIdEi @ 94 NONAME - _ZN7CaQuery10setFlagsOnERK6QFlagsI9EntryFlagE @ 95 NONAME - _ZN7CaQuery11setFlagsOffERK6QFlagsI9EntryFlagE @ 96 NONAME - _ZN7CaQuery11setParentIdEi @ 97 NONAME - _ZN7CaQuery12setAttributeERK7QStringS2_ @ 98 NONAME - _ZN7CaQuery13setEntryRolesE6QFlagsI9EntryRoleE @ 99 NONAME - _ZN7CaQuery15removeAttributeERK7QString @ 100 NONAME - _ZN7CaQuery16addEntryTypeNameERK7QString @ 101 NONAME - _ZN7CaQuery17setEntryTypeNamesERK11QStringList @ 102 NONAME - _ZN7CaQuery5clearEv @ 103 NONAME - _ZN7CaQuery7setSortE13SortAttributeN2Qt9SortOrderE @ 104 NONAME - _ZN7CaQuery8setCountEj @ 105 NONAME - _ZN7CaQueryC1ERKS_ @ 106 NONAME - _ZN7CaQueryC1Ev @ 107 NONAME - _ZN7CaQueryC2ERKS_ @ 108 NONAME - _ZN7CaQueryC2Ev @ 109 NONAME - _ZN7CaQueryD1Ev @ 110 NONAME - _ZN7CaQueryD2Ev @ 111 NONAME - _ZN7CaQueryaSERKS_ @ 112 NONAME - _ZN9CaService10m_instanceE @ 113 NONAME DATA 8 - _ZN9CaService11qt_metacallEN11QMetaObject4CallEiPPv @ 114 NONAME - _ZN9CaService11qt_metacastEPKc @ 115 NONAME - _ZN9CaService12entryChangedERK7CaEntry10ChangeType @ 116 NONAME - _ZN9CaService12entryChangedEi10ChangeType @ 117 NONAME - _ZN9CaService12entryTouchedEi @ 118 NONAME - _ZN9CaService16staticMetaObjectE @ 119 NONAME DATA 16 - _ZN9CaService19getStaticMetaObjectEv @ 120 NONAME - _ZN9CaService19groupContentChangedEi @ 121 NONAME - _ZN9CaService8instanceEv @ 122 NONAME - _ZN9CaServiceC1EP7QObject @ 123 NONAME - _ZN9CaServiceC2EP7QObject @ 124 NONAME - _ZN9CaServiceD0Ev @ 125 NONAME - _ZN9CaServiceD1Ev @ 126 NONAME - _ZN9CaServiceD2Ev @ 127 NONAME - _ZNK10CaNotifier10metaObjectEv @ 128 NONAME - _ZNK11CaItemModel10metaObjectEv @ 129 NONAME - _ZNK11CaItemModel11columnCountERK11QModelIndex @ 130 NONAME - _ZNK11CaItemModel11getIconSizeEv @ 131 NONAME - _ZNK11CaItemModel12isAutoUpdateEv @ 132 NONAME - _ZNK11CaItemModel20secondLineVisibilityEv @ 133 NONAME - _ZNK11CaItemModel4dataERK11QModelIndexi @ 134 NONAME - _ZNK11CaItemModel4rootEv @ 135 NONAME - _ZNK11CaItemModel5entryERK11QModelIndex @ 136 NONAME - _ZNK11CaItemModel5indexEiiRK11QModelIndex @ 137 NONAME - _ZNK11CaItemModel6parentERK11QModelIndex @ 138 NONAME - _ZNK11CaItemModel8rowCountERK11QModelIndex @ 139 NONAME - _ZNK16CaNotifierFilter11getParentIdEv @ 140 NONAME - _ZNK16CaNotifierFilter12getEntryRoleEv @ 141 NONAME - _ZNK16CaNotifierFilter12getTypeNamesEv @ 142 NONAME - _ZNK16CaNotifierFilter6getIdsEv @ 143 NONAME - _ZNK17CaIconDescription13applicationIdEv @ 144 NONAME - _ZNK17CaIconDescription2idEv @ 145 NONAME - _ZNK17CaIconDescription6skinIdEv @ 146 NONAME - _ZNK17CaIconDescription8filenameEv @ 147 NONAME - _ZNK21CaClientNotifierProxy10metaObjectEv @ 148 NONAME - _ZNK21CaClientNotifierProxy11findSessionERK16CaNotifierFilterN22CCaInnerNotifierFilter13TNotifierTypeE @ 149 NONAME - _ZNK7CaEntry10attributesEv @ 150 NONAME - _ZNK7CaEntry11descriptionEv @ 151 NONAME - _ZNK7CaEntry11isLocalizedE16LocalizationType @ 152 NONAME - _ZNK7CaEntry13entryTypeNameEv @ 153 NONAME - _ZNK7CaEntry15iconDescriptionEv @ 154 NONAME - _ZNK7CaEntry2idEv @ 155 NONAME - _ZNK7CaEntry4roleEv @ 156 NONAME - _ZNK7CaEntry4textEv @ 157 NONAME - _ZNK7CaEntry5flagsEv @ 158 NONAME - _ZNK7CaEntry8makeIconERK6QSizeF @ 159 NONAME - _ZNK7CaEntry9attributeERK7QString @ 160 NONAME - _ZNK7CaQuery10attributesEv @ 161 NONAME - _ZNK7CaQuery10entryRolesEv @ 162 NONAME - _ZNK7CaQuery14entryTypeNamesEv @ 163 NONAME - _ZNK7CaQuery5countEv @ 164 NONAME - _ZNK7CaQuery7childIdEv @ 165 NONAME - _ZNK7CaQuery7flagsOnEv @ 166 NONAME - _ZNK7CaQuery7getSortER13SortAttributeRN2Qt9SortOrderE @ 167 NONAME - _ZNK7CaQuery8flagsOffEv @ 168 NONAME - _ZNK7CaQuery8parentIdEv @ 169 NONAME - _ZNK7CaQuery9attributeERK7QString @ 170 NONAME - _ZNK9CaService10customSortEiR5QListIiE @ 171 NONAME - _ZNK9CaService10getEntriesERK5QListIiE @ 172 NONAME - _ZNK9CaService10getEntriesERK7CaQuery @ 173 NONAME - _ZNK9CaService10metaObjectEv @ 174 NONAME - _ZNK9CaService11createEntryERK7CaEntry @ 175 NONAME - _ZNK9CaService11getEntryIdsERK7CaQuery @ 176 NONAME - _ZNK9CaService11removeEntryERK7CaEntry @ 177 NONAME - _ZNK9CaService11removeEntryEi @ 178 NONAME - _ZNK9CaService11updateEntryERK7CaEntry @ 179 NONAME - _ZNK9CaService13removeEntriesERK5QListI14QSharedPointerI7CaEntryEE @ 180 NONAME - _ZNK9CaService13removeEntriesERK5QListIiE @ 181 NONAME - _ZNK9CaService14createNotifierERK16CaNotifierFilter @ 182 NONAME - _ZNK9CaService14executeCommandERK7CaEntryRK7QStringP7QObjectPKc @ 183 NONAME - _ZNK9CaService14executeCommandEiRK7QStringP7QObjectPKc @ 184 NONAME - _ZNK9CaService18appendEntryToGroupERK7CaEntryS2_ @ 185 NONAME - _ZNK9CaService18appendEntryToGroupEii @ 186 NONAME - _ZNK9CaService19prependEntryToGroupERK7CaEntryS2_ @ 187 NONAME - _ZNK9CaService19prependEntryToGroupEii @ 188 NONAME - _ZNK9CaService20appendEntriesToGroupERK7CaEntryRK5QListI14QSharedPointerIS0_EE @ 189 NONAME - _ZNK9CaService20appendEntriesToGroupEiRK5QListIiE @ 190 NONAME - _ZNK9CaService20insertEntryIntoGroupERK7CaEntryS2_i @ 191 NONAME - _ZNK9CaService20insertEntryIntoGroupEiii @ 192 NONAME - _ZNK9CaService20removeEntryFromGroupERK7CaEntryS2_ @ 193 NONAME - _ZNK9CaService20removeEntryFromGroupEii @ 194 NONAME - _ZNK9CaService21prependEntriesToGroupERK7CaEntryRK5QListI14QSharedPointerIS0_EE @ 195 NONAME - _ZNK9CaService21prependEntriesToGroupEiRK5QListIiE @ 196 NONAME - _ZNK9CaService22insertEntriesIntoGroupERK7CaEntryRK5QListI14QSharedPointerIS0_EEi @ 197 NONAME - _ZNK9CaService22insertEntriesIntoGroupEiRK5QListIiEi @ 198 NONAME - _ZNK9CaService22removeEntriesFromGroupERK7CaEntryRK5QListI14QSharedPointerIS0_EE @ 199 NONAME - _ZNK9CaService22removeEntriesFromGroupEiRK5QListIiE @ 200 NONAME - _ZNK9CaService5touchERK7CaEntry @ 201 NONAME - _ZNK9CaService8getEntryEi @ 202 NONAME - _ZNK9CaService9lastErrorEv @ 203 NONAME - _ZTI10CaNotifier @ 204 NONAME - _ZTI11CaItemModel @ 205 NONAME - _ZTI16CaNotifierFilter @ 206 NONAME - _ZTI21CaClientNotifierProxy @ 207 NONAME - _ZTI7CaEntry @ 208 NONAME - _ZTI9CaService @ 209 NONAME - _ZTV10CaNotifier @ 210 NONAME - _ZTV11CaItemModel @ 211 NONAME - _ZTV16CaNotifierFilter @ 212 NONAME - _ZTV21CaClientNotifierProxy @ 213 NONAME - _ZTV7CaEntry @ 214 NONAME - _ZTV9CaService @ 215 NONAME - _ZN7CaEntry15removeAttributeERK7QString @ 216 NONAME + _ZN7CaEntry15removeAttributeERK7QString @ 81 NONAME + _ZN7CaEntry16setEntryTypeNameERK7QString @ 82 NONAME + _ZN7CaEntry18setIconDescriptionERK17CaIconDescription @ 83 NONAME + _ZN7CaEntry5setIdEi @ 84 NONAME + _ZN7CaEntry7setTextERK7QStringb @ 85 NONAME + _ZN7CaEntry8setFlagsE6QFlagsI9EntryFlagE @ 86 NONAME + _ZN7CaEntryC1E9EntryRole @ 87 NONAME + _ZN7CaEntryC1ERKS_ @ 88 NONAME + _ZN7CaEntryC2E9EntryRole @ 89 NONAME + _ZN7CaEntryC2ERKS_ @ 90 NONAME + _ZN7CaEntryD0Ev @ 91 NONAME + _ZN7CaEntryD1Ev @ 92 NONAME + _ZN7CaEntryD2Ev @ 93 NONAME + _ZN7CaEntryaSERKS_ @ 94 NONAME + _ZN7CaQuery10setChildIdEi @ 95 NONAME + _ZN7CaQuery10setFlagsOnERK6QFlagsI9EntryFlagE @ 96 NONAME + _ZN7CaQuery11setFlagsOffERK6QFlagsI9EntryFlagE @ 97 NONAME + _ZN7CaQuery11setParentIdEi @ 98 NONAME + _ZN7CaQuery12setAttributeERK7QStringS2_ @ 99 NONAME + _ZN7CaQuery13setEntryRolesE6QFlagsI9EntryRoleE @ 100 NONAME + _ZN7CaQuery15removeAttributeERK7QString @ 101 NONAME + _ZN7CaQuery16addEntryTypeNameERK7QString @ 102 NONAME + _ZN7CaQuery17setEntryTypeNamesERK11QStringList @ 103 NONAME + _ZN7CaQuery5clearEv @ 104 NONAME + _ZN7CaQuery7setSortE13SortAttributeN2Qt9SortOrderE @ 105 NONAME + _ZN7CaQuery8setCountEj @ 106 NONAME + _ZN7CaQueryC1ERKS_ @ 107 NONAME + _ZN7CaQueryC1Ev @ 108 NONAME + _ZN7CaQueryC2ERKS_ @ 109 NONAME + _ZN7CaQueryC2Ev @ 110 NONAME + _ZN7CaQueryD1Ev @ 111 NONAME + _ZN7CaQueryD2Ev @ 112 NONAME + _ZN7CaQueryaSERKS_ @ 113 NONAME + _ZN9CaService10m_instanceE @ 114 NONAME DATA 8 + _ZN9CaService11qt_metacallEN11QMetaObject4CallEiPPv @ 115 NONAME + _ZN9CaService11qt_metacastEPKc @ 116 NONAME + _ZN9CaService12entryChangedERK7CaEntry10ChangeType @ 117 NONAME + _ZN9CaService12entryChangedEi10ChangeType @ 118 NONAME + _ZN9CaService12entryTouchedEi @ 119 NONAME + _ZN9CaService16staticMetaObjectE @ 120 NONAME DATA 16 + _ZN9CaService19getStaticMetaObjectEv @ 121 NONAME + _ZN9CaService19groupContentChangedEi @ 122 NONAME + _ZN9CaService8instanceEv @ 123 NONAME + _ZN9CaServiceC1EP7QObject @ 124 NONAME + _ZN9CaServiceC2EP7QObject @ 125 NONAME + _ZN9CaServiceD0Ev @ 126 NONAME + _ZN9CaServiceD1Ev @ 127 NONAME + _ZN9CaServiceD2Ev @ 128 NONAME + _ZNK10CaNotifier10metaObjectEv @ 129 NONAME + _ZNK11CaItemModel10metaObjectEv @ 130 NONAME + _ZNK11CaItemModel11columnCountERK11QModelIndex @ 131 NONAME + _ZNK11CaItemModel11getIconSizeEv @ 132 NONAME + _ZNK11CaItemModel12isAutoUpdateEv @ 133 NONAME + _ZNK11CaItemModel20secondLineVisibilityEv @ 134 NONAME + _ZNK11CaItemModel4dataERK11QModelIndexi @ 135 NONAME + _ZNK11CaItemModel4rootEv @ 136 NONAME + _ZNK11CaItemModel5entryERK11QModelIndex @ 137 NONAME + _ZNK11CaItemModel5indexEiiRK11QModelIndex @ 138 NONAME + _ZNK11CaItemModel6parentERK11QModelIndex @ 139 NONAME + _ZNK11CaItemModel8rowCountERK11QModelIndex @ 140 NONAME + _ZNK16CaNotifierFilter11getParentIdEv @ 141 NONAME + _ZNK16CaNotifierFilter12getEntryRoleEv @ 142 NONAME + _ZNK16CaNotifierFilter12getTypeNamesEv @ 143 NONAME + _ZNK16CaNotifierFilter6getIdsEv @ 144 NONAME + _ZNK17CaIconDescription13applicationIdEv @ 145 NONAME + _ZNK17CaIconDescription2idEv @ 146 NONAME + _ZNK17CaIconDescription6skinIdEv @ 147 NONAME + _ZNK17CaIconDescription8filenameEv @ 148 NONAME + _ZNK21CaClientNotifierProxy10metaObjectEv @ 149 NONAME + _ZNK21CaClientNotifierProxy11findSessionERK16CaNotifierFilterN22CCaInnerNotifierFilter13TNotifierTypeE @ 150 NONAME + _ZNK7CaEntry10attributesEv @ 151 NONAME + _ZNK7CaEntry11descriptionEv @ 152 NONAME + _ZNK7CaEntry11isLocalizedE16LocalizationType @ 153 NONAME + _ZNK7CaEntry13entryTypeNameEv @ 154 NONAME + _ZNK7CaEntry15iconDescriptionEv @ 155 NONAME + _ZNK7CaEntry2idEv @ 156 NONAME + _ZNK7CaEntry4roleEv @ 157 NONAME + _ZNK7CaEntry4textEv @ 158 NONAME + _ZNK7CaEntry5flagsEv @ 159 NONAME + _ZNK7CaEntry8makeIconERK6QSizeF @ 160 NONAME + _ZNK7CaEntry9attributeERK7QString @ 161 NONAME + _ZNK7CaQuery10attributesEv @ 162 NONAME + _ZNK7CaQuery10entryRolesEv @ 163 NONAME + _ZNK7CaQuery14entryTypeNamesEv @ 164 NONAME + _ZNK7CaQuery5countEv @ 165 NONAME + _ZNK7CaQuery7childIdEv @ 166 NONAME + _ZNK7CaQuery7flagsOnEv @ 167 NONAME + _ZNK7CaQuery7getSortER13SortAttributeRN2Qt9SortOrderE @ 168 NONAME + _ZNK7CaQuery8flagsOffEv @ 169 NONAME + _ZNK7CaQuery8parentIdEv @ 170 NONAME + _ZNK7CaQuery9attributeERK7QString @ 171 NONAME + _ZNK9CaService10customSortEiR5QListIiE @ 172 NONAME + _ZNK9CaService10getEntriesERK5QListIiE @ 173 NONAME + _ZNK9CaService10getEntriesERK7CaQuery @ 174 NONAME + _ZNK9CaService10metaObjectEv @ 175 NONAME + _ZNK9CaService11createEntryERK7CaEntry @ 176 NONAME + _ZNK9CaService11getEntryIdsERK7CaQuery @ 177 NONAME + _ZNK9CaService11removeEntryERK7CaEntry @ 178 NONAME + _ZNK9CaService11removeEntryEi @ 179 NONAME + _ZNK9CaService11updateEntryERK7CaEntry @ 180 NONAME + _ZNK9CaService13removeEntriesERK5QListI14QSharedPointerI7CaEntryEE @ 181 NONAME + _ZNK9CaService13removeEntriesERK5QListIiE @ 182 NONAME + _ZNK9CaService14createNotifierERK16CaNotifierFilter @ 183 NONAME + _ZNK9CaService14executeCommandERK7CaEntryRK7QStringP7QObjectPKc @ 184 NONAME + _ZNK9CaService14executeCommandEiRK7QStringP7QObjectPKc @ 185 NONAME + _ZNK9CaService15preloadHandlersEv @ 186 NONAME + _ZNK9CaService18appendEntryToGroupERK7CaEntryS2_ @ 187 NONAME + _ZNK9CaService18appendEntryToGroupEii @ 188 NONAME + _ZNK9CaService19prependEntryToGroupERK7CaEntryS2_ @ 189 NONAME + _ZNK9CaService19prependEntryToGroupEii @ 190 NONAME + _ZNK9CaService20appendEntriesToGroupERK7CaEntryRK5QListI14QSharedPointerIS0_EE @ 191 NONAME + _ZNK9CaService20appendEntriesToGroupEiRK5QListIiE @ 192 NONAME + _ZNK9CaService20insertEntryIntoGroupERK7CaEntryS2_i @ 193 NONAME + _ZNK9CaService20insertEntryIntoGroupEiii @ 194 NONAME + _ZNK9CaService20removeEntryFromGroupERK7CaEntryS2_ @ 195 NONAME + _ZNK9CaService20removeEntryFromGroupEii @ 196 NONAME + _ZNK9CaService21prependEntriesToGroupERK7CaEntryRK5QListI14QSharedPointerIS0_EE @ 197 NONAME + _ZNK9CaService21prependEntriesToGroupEiRK5QListIiE @ 198 NONAME + _ZNK9CaService22insertEntriesIntoGroupERK7CaEntryRK5QListI14QSharedPointerIS0_EEi @ 199 NONAME + _ZNK9CaService22insertEntriesIntoGroupEiRK5QListIiEi @ 200 NONAME + _ZNK9CaService22removeEntriesFromGroupERK7CaEntryRK5QListI14QSharedPointerIS0_EE @ 201 NONAME + _ZNK9CaService22removeEntriesFromGroupEiRK5QListIiE @ 202 NONAME + _ZNK9CaService5touchERK7CaEntry @ 203 NONAME + _ZNK9CaService8getEntryEi @ 204 NONAME + _ZNK9CaService9lastErrorEv @ 205 NONAME + _ZTI10CaNotifier @ 206 NONAME + _ZTI11CaItemModel @ 207 NONAME + _ZTI16CaNotifierFilter @ 208 NONAME + _ZTI21CaClientNotifierProxy @ 209 NONAME + _ZTI7CaEntry @ 210 NONAME + _ZTI9CaService @ 211 NONAME + _ZTV10CaNotifier @ 212 NONAME + _ZTV11CaItemModel @ 213 NONAME + _ZTV16CaNotifierFilter @ 214 NONAME + _ZTV21CaClientNotifierProxy @ 215 NONAME + _ZTV7CaEntry @ 216 NONAME + _ZTV9CaService @ 217 NONAME + _ZN7CaEntry12setParentIdsERK5QListIiE @ 218 NONAME + _ZNK7CaEntry9parentIdsEv @ 219 NONAME diff -r efda7c0771b9 -r 7b66bc3c6dc9 contentstorage/caclient/inc/caentry_p.h --- a/contentstorage/caclient/inc/caentry_p.h Wed Oct 13 12:59:22 2010 +0300 +++ b/contentstorage/caclient/inc/caentry_p.h Mon Oct 18 10:44:15 2010 +0300 @@ -56,6 +56,9 @@ QString entryTypeName() const; void setEntryTypeName(const QString &entryTypeName); + + QList parentIds() const; + void setParentIds(const QList &parentIds); QMap attributes() const; QString attribute(const QString &name) const; @@ -84,6 +87,8 @@ EntryFlags mFlags; QString mEntryTypeName; + + QList mParentIds; QMap mAttributes; diff -r efda7c0771b9 -r 7b66bc3c6dc9 contentstorage/caclient/inc/cahandlerloader.h --- a/contentstorage/caclient/inc/cahandlerloader.h Wed Oct 13 12:59:22 2010 +0300 +++ b/contentstorage/caclient/inc/cahandlerloader.h Mon Oct 18 10:44:15 2010 +0300 @@ -25,8 +25,7 @@ { public: virtual ~CaHandlerLoader(); - virtual CaHandler *loadHandler(const QString &entryTypeName, - const QString &commandName) = 0; + virtual CaHandler *loadHandler(const QString &entryTypeName) = 0; }; #endif // CAHANDLERLOADER_H diff -r efda7c0771b9 -r 7b66bc3c6dc9 contentstorage/caclient/inc/cahandlerproxy.h --- a/contentstorage/caclient/inc/cahandlerproxy.h Wed Oct 13 12:59:22 2010 +0300 +++ b/contentstorage/caclient/inc/cahandlerproxy.h Mon Oct 18 10:44:15 2010 +0300 @@ -27,6 +27,7 @@ #include "cahandlerloader.h" class CaEntry; +class CaHandlersPreloader; class CaHandlerProxy { @@ -38,16 +39,21 @@ int execute(const CaEntry &entry, const QString &commandName, QObject* receiver = NULL, const char* member = NULL); + + void preloadHandlers(); private: - CaHandler *getHandler(const CaEntry &entry, - const QString &commandName); + CaHandler *getHandler(const QString &entryTypeName); - typedef QMap > ImplementationMap; + typedef QMap< QString, QSharedPointer > ImplementationMap; typedef ImplementationMap::iterator ImplementationMapIterator; QSharedPointer mLoader; ImplementationMap mImplementationMap; + + CaHandlersPreloader *mHandlersPreloader; /// Own; + + friend class CaHandlersPreloader; }; #endif // CAHANDLERPROXY_H diff -r efda7c0771b9 -r 7b66bc3c6dc9 contentstorage/caclient/inc/cahandlerspreloader.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/contentstorage/caclient/inc/cahandlerspreloader.h Mon Oct 18 10:44:15 2010 +0300 @@ -0,0 +1,47 @@ +/* + * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). + * All rights reserved. + * This component and the accompanying materials are made available + * under the terms of "Eclipse Public License v1.0" + * which accompanies this distribution, and is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". + * + * Initial Contributors: + * Nokia Corporation - initial contribution. + * + * Contributors: + * + * Description: cahandlerspreloader.h + * + */ + +#ifndef CAHANDLERSPRELOADER_H +#define CAHANDLERSPRELOADER_H + +#include +#include + +class QTimer; +class CaHandlerProxy; + +class CaHandlersPreloader: public QObject +{ + Q_OBJECT + +public: + + CaHandlersPreloader( + CaHandlerProxy *handlerProxy, + QObject *parent = 0); + ~CaHandlersPreloader(); + +private slots: + void preloadHandlersWhenIdle(); + +private: + QTimer *mTimer; // Own. + CaHandlerProxy *mHandlerProxy; // Not own. + QStringList mHandlersToLoad; +}; + +#endif // CAHANDLERSPRELOADER_H diff -r efda7c0771b9 -r 7b66bc3c6dc9 contentstorage/caclient/inc/caqtsfhandlerloader.h --- a/contentstorage/caclient/inc/caqtsfhandlerloader.h Wed Oct 13 12:59:22 2010 +0300 +++ b/contentstorage/caclient/inc/caqtsfhandlerloader.h Mon Oct 18 10:44:15 2010 +0300 @@ -29,8 +29,7 @@ { public: CaQtSfHandlerLoader(); - CaHandler *loadHandler(const QString &entryTypeName, - const QString &commandName); + CaHandler *loadHandler(const QString &entryTypeName); protected: void registerPlugins() const; }; diff -r efda7c0771b9 -r 7b66bc3c6dc9 contentstorage/caclient/inc/caservice_p.h --- a/contentstorage/caclient/inc/caservice_p.h Wed Oct 13 12:59:22 2010 +0300 +++ b/contentstorage/caclient/inc/caservice_p.h Mon Oct 18 10:44:15 2010 +0300 @@ -64,6 +64,8 @@ CaNotifier *createNotifier(const CaNotifierFilter &filter); bool customSort(int groupId, QList &entryIdList); + + void preloadHandlers() const; ErrorCode lastError() const; diff -r efda7c0771b9 -r 7b66bc3c6dc9 contentstorage/caclient/s60/src/camenuiconutility.cpp --- a/contentstorage/caclient/s60/src/camenuiconutility.cpp Wed Oct 13 12:59:22 2010 +0300 +++ b/contentstorage/caclient/s60/src/camenuiconutility.cpp Mon Oct 18 10:44:15 2010 +0300 @@ -215,22 +215,6 @@ return icon; } -/*! - Get entry by uid. - \param uid application uid. - \retval entry. - */ -LOCAL_C CaEntry getEntryByUid(int uid) -{ - CaEntry entry; - CaQuery query; - query.setAttribute(QString("application:uid"), QString::number(uid)); - QList< QSharedPointer > entries = CaService::instance()->getEntries(query); - if (!entries.isEmpty()) { - entry = *(entries.first()); - } - return entry; -} /*! Get icon when uid is defined. @@ -243,7 +227,8 @@ { HbIcon icon; CaEntry entry; - entry = getEntryByUid(uid); + entry.setEntryTypeName(XQConversions::s60DescToQString(KCaTypeApp)); + entry.setAttribute(QString("application:uid"), QString::number(uid)); icon = getEntryIcon(entry, size); return icon; } diff -r efda7c0771b9 -r 7b66bc3c6dc9 contentstorage/caclient/s60/src/caobjectadapter.cpp --- a/contentstorage/caclient/s60/src/caobjectadapter.cpp Wed Oct 13 12:59:22 2010 +0300 +++ b/contentstorage/caclient/s60/src/caobjectadapter.cpp Mon Oct 18 10:44:15 2010 +0300 @@ -86,6 +86,12 @@ attributesMap.value(key))->Des()); } } + QList parentIds = fromEntry.parentIds(); + RArray s60ParentIds; + for (int i(0); i < parentIds.count(); ++i ) { + s60ParentIds.AppendL(parentIds[i]); + } + toEntry.SetParentIdsL(s60ParentIds); } //---------------------------------------------------------------------------- @@ -191,6 +197,12 @@ XQConversions::s60DescToQString(attribute->Name()), XQConversions::s60DescToQString(attribute->Value())); } + QList parentIds; + RArray s60ParentIds = fromEntry.GetParentIds(); + for (int i(0); i < s60ParentIds.Count(); ++i ) { + parentIds.append((int)s60ParentIds[i]); + } + toEntry.setParentIds(parentIds); } //---------------------------------------------------------------------------- @@ -360,16 +372,6 @@ : CCaInnerQuery::CreatedTimestampDesc; break; } - case MostUsedSortAttribute: { - sortCode = (sortOrder == Qt::AscendingOrder) - ? CCaInnerQuery::MostUsed : CCaInnerQuery::MostUsedDesc; - break; - } - case LastUsedSortAttribute: { - sortCode = (sortOrder == Qt::AscendingOrder) - ? CCaInnerQuery::LastUsed : CCaInnerQuery::LastUsedDesc; - break; - } case DefaultSortAttribute: { sortCode = (sortOrder == Qt::AscendingOrder) ? CCaInnerQuery::Default : CCaInnerQuery::DefaultDesc; diff -r efda7c0771b9 -r 7b66bc3c6dc9 contentstorage/caclient/src/caentry.cpp --- a/contentstorage/caclient/src/caentry.cpp Wed Oct 13 12:59:22 2010 +0300 +++ b/contentstorage/caclient/src/caentry.cpp Mon Oct 18 10:44:15 2010 +0300 @@ -331,6 +331,24 @@ } /*! + Gets parent ids. + \retval parent ids of entry. + */ +QList CaEntry::parentIds() const +{ + return m_d->parentIds(); +} + +/*! + Sets parent ids. + \param parentIds parent ids of entry (const reference) + */ +void CaEntry::setParentIds(const QList &parentIds) +{ + m_d->setParentIds(parentIds); +} + +/*! Returns item attributes. \retval map of attributes indexed by their names. @@ -527,6 +545,7 @@ mEntryRole = entry.mEntryRole; mTextLocalized = entry.mTextLocalized; mDescriptionLocalized = entry.mDescriptionLocalized; + mParentIds = entry.mParentIds; return *this; } @@ -635,6 +654,28 @@ } /*! + Gets parent ids. + \retval parent ids of entry. + */ +QList CaEntryPrivate::parentIds() const +{ + return mParentIds; +} + +/*! + Sets parent ids. + \param parentIds parent ids of entry (const reference). + */ +void CaEntryPrivate::setParentIds(const QList &parentIds) +{ + mParentIds.clear(); + for (int i(0); i < parentIds.count(); ++i) { + mParentIds.append(parentIds[i]); + } + +} + +/*! \retval map of attributes indexed by their names */ QMap CaEntryPrivate::attributes() const diff -r efda7c0771b9 -r 7b66bc3c6dc9 contentstorage/caclient/src/cahandlerproxy.cpp --- a/contentstorage/caclient/src/cahandlerproxy.cpp Wed Oct 13 12:59:22 2010 +0300 +++ b/contentstorage/caclient/src/cahandlerproxy.cpp Mon Oct 18 10:44:15 2010 +0300 @@ -21,6 +21,8 @@ #include "cahandlerproxy.h" #include "cahandlerloader.h" #include "caobjectadapter.h" +#include "cahandlerspreloader.h" +#include "caclient_defines.h" /*! \class CaHandlerProxy @@ -35,6 +37,7 @@ */ CaHandlerProxy::~CaHandlerProxy() { + delete mHandlersPreloader; } @@ -43,7 +46,8 @@ \param loader Provides handler implementations. It has to be pointer to a valid object. */ CaHandlerProxy::CaHandlerProxy(const QSharedPointer &loader): - mLoader(loader) + mLoader(loader), + mHandlersPreloader(NULL) { Q_ASSERT(!mLoader.isNull()); } @@ -58,40 +62,51 @@ \sa e32err.h for KErrNone definition. */ int CaHandlerProxy::execute(const CaEntry &entry, const QString &commandName, - QObject* receiver, const char* member) + QObject* receiver, const char* member) { - CaHandler *const handler = getHandler(entry, commandName); int result = -1; + CaHandler *const handler = getHandler(entry.entryTypeName()); if (handler) { - result = handler->execute(entry, commandName, receiver, member); + result = handler->execute(entry, commandName, receiver, member); } return result; } /*! - Looks for handler implementation in local cache or if not found, request it from - handler loader. + Looks for handler implementation in local cache or if not found, + request it from handler loader. \param entry The entry being a subject for the requested command. \param commandName Name of the command to be executed. \return Pointer to a handler instance if available, NULL otherwise. */ -CaHandler *CaHandlerProxy::getHandler(const CaEntry &entry, - const QString &commandName) +CaHandler *CaHandlerProxy::getHandler(const QString &entryTypeName) { CaHandler *implementation(0); - - const QString entryTypeName(entry.entryTypeName()); + QString typeName(entryTypeName); + if (entryTypeName == WIDGET_ENTRY_TYPE_NAME + || entryTypeName == PACKAGE_ENTRY_TYPE_NAME) { + typeName = QString(APPLICATION_ENTRY_TYPE_NAME); + } const ImplementationMapIterator it( - mImplementationMap.find(entryTypeName)); + mImplementationMap.find(typeName)); if (it != mImplementationMap.end()) { implementation = it->data(); } else { - implementation = mLoader->loadHandler(entryTypeName, commandName); - mImplementationMap[entryTypeName] = QSharedPointer(implementation); + implementation = mLoader->loadHandler(typeName); + mImplementationMap[typeName] = + QSharedPointer(implementation); } return implementation; } + +/*! + Preload handlers during the idle time. + */ +void CaHandlerProxy::preloadHandlers() +{ + mHandlersPreloader = new CaHandlersPreloader(this); +} diff -r efda7c0771b9 -r 7b66bc3c6dc9 contentstorage/caclient/src/cahandlerspreloader.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/contentstorage/caclient/src/cahandlerspreloader.cpp Mon Oct 18 10:44:15 2010 +0300 @@ -0,0 +1,67 @@ +/* + * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). + * All rights reserved. + * This component and the accompanying materials are made available + * under the terms of "Eclipse Public License v1.0" + * which accompanies this distribution, and is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". + * + * Initial Contributors: + * Nokia Corporation - initial contribution. + * + * Contributors: + * + * Description: cahandlerspreloader.cpp + * + */ + +#include + +#include + +#include "caclient_defines.h" +#include "cahandlerproxy.h" +#include "cahandlerspreloader.h" + +/*! + Constructor. + \param pointer to a parent object. + */ +CaHandlersPreloader::CaHandlersPreloader( + CaHandlerProxy *handlerProxy, + QObject *parent): + QObject(parent), + mTimer(NULL), + mHandlerProxy(handlerProxy) +{ + mHandlersToLoad << + URL_ENTRY_TYPE_NAME << + TEMPLATED_APPLICATION_ENTRY_TYPE_NAME << + APPLICATION_ENTRY_TYPE_NAME; + + mTimer = new QTimer(this); + connect(mTimer, SIGNAL(timeout()), this, SLOT(preloadHandlersWhenIdle())); + mTimer->start(0); // NOTE: zero for idle +} + +/*! + Destructor. + */ +CaHandlersPreloader::~CaHandlersPreloader() +{ + mTimer->stop(); + delete mTimer; +} + +/*! + Preload a single handler from a list during the idle time. + */ +void CaHandlersPreloader::preloadHandlersWhenIdle() +{ + if (!mHandlersToLoad.isEmpty()) { + mHandlerProxy->getHandler(mHandlersToLoad.takeLast()); + } else { + mTimer->stop(); + } +} + diff -r efda7c0771b9 -r 7b66bc3c6dc9 contentstorage/caclient/src/caitemmodel.cpp --- a/contentstorage/caclient/src/caitemmodel.cpp Wed Oct 13 12:59:22 2010 +0300 +++ b/contentstorage/caclient/src/caitemmodel.cpp Mon Oct 18 10:44:15 2010 +0300 @@ -774,12 +774,14 @@ } else if (mParentEntry && id == mParentEntry->id()) { updateParentEntry(); m_q->reset(); - } else if (ids.indexOf(id) < 0) { - removeItem(id); - } else if (mEntries.indexOf(id) < 0) { - addItem(id); - } else { - updateModel(); + } else { + QList parentIds = entry.data()->parentIds(); + for (int i(0); i < parentIds.count(); ++i) { + if (mEntries.indexOf(parentIds[i]) >= 0) { + emit m_q->dataChanged( + index(mEntries.indexOf(parentIds[i])), index(mEntries.indexOf(parentIds[i]))); + } + } } CACLIENTTEST_FUNC_EXIT("CaItemModelPrivate::updateItemData"); } diff -r efda7c0771b9 -r 7b66bc3c6dc9 contentstorage/caclient/src/caqtsfhandlerloader.cpp --- a/contentstorage/caclient/src/caqtsfhandlerloader.cpp Wed Oct 13 12:59:22 2010 +0300 +++ b/contentstorage/caclient/src/caqtsfhandlerloader.cpp Mon Oct 18 10:44:15 2010 +0300 @@ -26,7 +26,6 @@ #include "cahandler.h" #include "caqtsfhandlerloader.h" -#include "caclient_defines.h" QTM_USE_NAMESPACE @@ -76,28 +75,21 @@ } /*! - Loads handler implementations appropriate for the requested entry type name and command. + Loads handler implementations appropriate for the requested + entry type name and command. The caller takes ownership of the returned pointer. \param entryTypeName Entry type name. - \param commandName Name of the command to be handled. - \return A pointer to handler serving the entry type and command if found, NULL otherwise. + \param commandName Name of the command to be handled (unused). + \return A pointer to handler serving the entry type and command + if found, NULL otherwise. */ -CaHandler *CaQtSfHandlerLoader::loadHandler(const QString &entryTypeName, - const QString &commandName) +CaHandler *CaQtSfHandlerLoader::loadHandler(const QString &entryTypeName) { - Q_UNUSED(commandName); - - QString typeName(entryTypeName); - if (entryTypeName == WIDGET_ENTRY_TYPE_NAME - || entryTypeName == PACKAGE_ENTRY_TYPE_NAME) { - typeName = QString(APPLICATION_ENTRY_TYPE_NAME); - } - QServiceManager serviceManager; QServiceFilter serviceFilter("com.nokia.homescreen.ICommandHandler"); - serviceFilter.setCustomAttribute("entryTypeName", typeName); + serviceFilter.setCustomAttribute("entryTypeName", entryTypeName); QList serviceInterfaceDescriptorList = serviceManager.findInterfaces(serviceFilter); CaHandler *interfaceHandler = NULL; @@ -110,5 +102,3 @@ } return interfaceHandler; } - - diff -r efda7c0771b9 -r 7b66bc3c6dc9 contentstorage/caclient/src/caservice.cpp --- a/contentstorage/caclient/src/caservice.cpp Wed Oct 13 12:59:22 2010 +0300 +++ b/contentstorage/caclient/src/caservice.cpp Mon Oct 18 10:44:15 2010 +0300 @@ -83,9 +83,7 @@ Proxy to client notifier. */ -namespace Hs { - const char packageTypeName[] = "package"; -} +const char packageTypeName[] = "package"; // Initialization of a static member variable. QWeakPointer CaService::m_instance = QWeakPointer(); @@ -911,11 +909,11 @@ } /*! - Set new order of collection's items set by user. - \groupId Group id. - \param entryIdList consists of new order of items. - \retval true if new order of collection's items is set correctly, - otherwise return false. + Set new order of collection's items set by user. + \groupId Group id. + \param entryIdList consists of new order of items. + \retval true if new order of collection's items is set correctly, + otherwise return false. */ bool CaService::customSort(int groupId, QList &entryIdList) const @@ -924,6 +922,24 @@ } /*! + Initiate preloading of handlers during the idle time + (when there is no events to handle). + The following handlers would be loaded: + CaAppHandler, CaTappHandler, CaUrlHandler. + + \example + \code + ... + CaService::instance()->preloadHandlers(); + ... + \endcode + */ +void CaService::preloadHandlers() const +{ + m_d->preloadHandlers(); +} + +/*! Returns code of an error caused by the last executed operation. \retval code of error, zero means no error. @@ -1130,7 +1146,7 @@ if (entry.flags() & RemovableEntryFlag && (entry.flags() & UsedEntryFlag) == 0 && entry.role() == ItemEntryRole && - entry.entryTypeName() != QString(Hs::packageTypeName)) { + entry.entryTypeName() != QString(packageTypeName)) { mErrorCode = mProxy->touch(entry); if (mErrorCode == ServerTerminated) { @@ -1347,12 +1363,12 @@ } /*! - 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 + Executes command on entry (eg. "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, @@ -1370,18 +1386,19 @@ int errorCode = mCommandHandler->execute(entry, command, receiver, member); - mErrorCode = CaObjectAdapter::convertErrorCode(errorCode); if (command == caCmdOpen) { touch(entry); } + mErrorCode = CaObjectAdapter::convertErrorCode(errorCode); + qDebug() << "CaServicePrivate::executeCommand mErrorCode on return:" << mErrorCode; CACLIENTTEST_FUNC_EXIT("CaServicePrivate::executeCommand"); - return errorCode; + return mErrorCode; } /*! @@ -1423,6 +1440,14 @@ } /*! + Preload handlers during the idle time. + */ +void CaServicePrivate::preloadHandlers() const +{ + mCommandHandler->preloadHandlers(); +} + +/*! Returns code of an error caused by the last executed operation. \retval code of error, zero means no error. */ diff -r efda7c0771b9 -r 7b66bc3c6dc9 contentstorage/caclient/stub/src/caclientproxy.cpp --- a/contentstorage/caclient/stub/src/caclientproxy.cpp Wed Oct 13 12:59:22 2010 +0300 +++ b/contentstorage/caclient/stub/src/caclientproxy.cpp Mon Oct 18 10:44:15 2010 +0300 @@ -853,18 +853,6 @@ } else if (sortAttribute == CreatedTimestampSortAttribute) { queryString.append(oldQueryString).append( " ORDER BY EN_CREATION_TIME "); - } else if (sortAttribute == MostUsedSortAttribute) { - queryString.append("SELECT ENTRY_ID FROM (").append(oldQueryString).append( - " \ - ) LEFT JOIN \ - (SELECT LA_ENTRY_ID, COUNT(*) AS USAGE_DATA FROM CA_LAUNCH GROUP BY LA_ENTRY_ID) \ - ON ENTRY_ID = LA_ENTRY_ID ORDER BY USAGE_DATA "); - } else if (sortAttribute == LastUsedSortAttribute) { - queryString.append("SELECT ENTRY_ID FROM (").append(oldQueryString).append( - " \ - ) LEFT JOIN \ - (SELECT LA_ENTRY_ID, MAX(LA_LAUNCH_TIME) AS USAGE_DATA FROM CA_LAUNCH GROUP BY LA_ENTRY_ID) \ - ON ENTRY_ID = LA_ENTRY_ID ORDER BY USAGE_DATA "); } else if (parent && sortAttribute == DefaultSortAttribute) { queryString.append(oldQueryString).append( " ORDER BY GE_GROUP_ID, GE_POSITION "); @@ -875,9 +863,8 @@ } if (sortAttribute == NameSortAttribute || sortAttribute - == CreatedTimestampSortAttribute || sortAttribute - == MostUsedSortAttribute || sortAttribute == LastUsedSortAttribute - || (sortAttribute == DefaultSortAttribute && parent)) { + == CreatedTimestampSortAttribute || + (sortAttribute == DefaultSortAttribute && parent)) { if (sortOrder == Qt::AscendingOrder) queryString.append(" ASC "); else diff -r efda7c0771b9 -r 7b66bc3c6dc9 contentstorage/cahandler/app/app.pro --- a/contentstorage/cahandler/app/app.pro Wed Oct 13 12:59:22 2010 +0300 +++ b/contentstorage/cahandler/app/app.pro Mon Oct 18 10:44:15 2010 +0300 @@ -11,7 +11,7 @@ TEMPLATE = lib TARGET = caapphandlerplugin -CONFIG += plugin hb mobility +CONFIG += plugin mobility MOBILITY = serviceframework PLUGIN_SUBDIR = /resource/qt/plugins/commandhandler diff -r efda7c0771b9 -r 7b66bc3c6dc9 contentstorage/cahandler/url/url.pro --- a/contentstorage/cahandler/url/url.pro Wed Oct 13 12:59:22 2010 +0300 +++ b/contentstorage/cahandler/url/url.pro Mon Oct 18 10:44:15 2010 +0300 @@ -11,7 +11,7 @@ TEMPLATE = lib TARGET = caurlhandlerplugin -CONFIG += plugin hb mobility +CONFIG += plugin mobility MOBILITY = serviceframework PLUGIN_SUBDIR = /resource/qt/plugins/commandhandler diff -r efda7c0771b9 -r 7b66bc3c6dc9 contentstorage/casoftwareregistry/bwins/casoftwareregistryu.def --- a/contentstorage/casoftwareregistry/bwins/casoftwareregistryu.def Wed Oct 13 12:59:22 2010 +0300 +++ b/contentstorage/casoftwareregistry/bwins/casoftwareregistryu.def Mon Oct 18 10:44:15 2010 +0300 @@ -1,36 +1,52 @@ EXPORTS - ?componentInstallValue@CaSoftwareRegistry@@SA?AVQString@@XZ @ 1 NONAME ; class QString CaSoftwareRegistry::componentInstallValue(void) - ??1CaSoftwareRegistry@@EAE@XZ @ 2 NONAME ; CaSoftwareRegistry::~CaSoftwareRegistry(void) - ?componentTimeKey@CaSoftwareRegistry@@SA?AVQString@@XZ @ 3 NONAME ; class QString CaSoftwareRegistry::componentTimeKey(void) - ?componentHiddenValue@CaSoftwareRegistry@@SA?AVQString@@XZ @ 4 NONAME ; class QString CaSoftwareRegistry::componentHiddenValue(void) - ?m_instance@CaSoftwareRegistry@@0V?$QWeakPointer@VCaSoftwareRegistry@@@@A @ 5 NONAME ; class QWeakPointer CaSoftwareRegistry::m_instance - ?staticMetaObject@CaSoftwareRegistry@@2UQMetaObject@@B @ 6 NONAME ; struct QMetaObject const CaSoftwareRegistry::staticMetaObject - ?componentVendorKey@CaSoftwareRegistry@@SA?AVQString@@XZ @ 7 NONAME ; class QString CaSoftwareRegistry::componentVendorKey(void) - ?NewL@CCaProgresScanner@@SAPAV1@PAVIUninstallObserver@@@Z @ 8 NONAME ; class CCaProgresScanner * CCaProgresScanner::NewL(class IUninstallObserver *) - ?qt_metacall@CaSoftwareRegistry@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 9 NONAME ; int CaSoftwareRegistry::qt_metacall(enum QMetaObject::Call, int, void * *) - ?componentOperationTypeKey@CaSoftwareRegistry@@SA?AVQString@@XZ @ 10 NONAME ; class QString CaSoftwareRegistry::componentOperationTypeKey(void) - ?metaObject@CaSoftwareRegistry@@UBEPBUQMetaObject@@XZ @ 11 NONAME ; struct QMetaObject const * CaSoftwareRegistry::metaObject(void) const - ?tr@CaSoftwareRegistry@@SA?AVQString@@PBD0H@Z @ 12 NONAME ; class QString CaSoftwareRegistry::tr(char const *, char const *, int) - ?tr@CaSoftwareRegistry@@SA?AVQString@@PBD0@Z @ 13 NONAME ; class QString CaSoftwareRegistry::tr(char const *, char const *) - ?componentTypeKey@CaSoftwareRegistry@@SA?AVQString@@XZ @ 14 NONAME ; class QString CaSoftwareRegistry::componentTypeKey(void) - ?getStaticMetaObject@CaSoftwareRegistry@@SAABUQMetaObject@@XZ @ 15 NONAME ; struct QMetaObject const & CaSoftwareRegistry::getStaticMetaObject(void) - ?componentDriveInfoKey@CaSoftwareRegistry@@SA?AVQString@@XZ @ 16 NONAME ; class QString CaSoftwareRegistry::componentDriveInfoKey(void) - ??_ECaSoftwareRegistry@@UAE@I@Z @ 17 NONAME ; CaSoftwareRegistry::~CaSoftwareRegistry(unsigned int) - ?componentUninstallValue@CaSoftwareRegistry@@SA?AVQString@@XZ @ 18 NONAME ; class QString CaSoftwareRegistry::componentUninstallValue(void) - ?createUninstallNotifier@CaSoftwareRegistry@@QBEPAVCaUninstallNotifier@@XZ @ 19 NONAME ; class CaUninstallNotifier * CaSoftwareRegistry::createUninstallNotifier(void) const - ?entryDetails@CaSoftwareRegistry@@QBE?AV?$QHash@VQString@@V1@@@H@Z @ 20 NONAME ; class QHash CaSoftwareRegistry::entryDetails(int) const - ?componentSizeKey@CaSoftwareRegistry@@SA?AVQString@@XZ @ 21 NONAME ; class QString CaSoftwareRegistry::componentSizeKey(void) - ??0CaSoftwareRegistry@@AAE@PAVQObject@@@Z @ 22 NONAME ; CaSoftwareRegistry::CaSoftwareRegistry(class QObject *) - ?getApplicationsUids@CaSoftwareRegistry@@QAE_NHAAVQStringList@@@Z @ 23 NONAME ; bool CaSoftwareRegistry::getApplicationsUids(int, class QStringList &) - ?componentNameKey@CaSoftwareRegistry@@SA?AVQString@@XZ @ 24 NONAME ; class QString CaSoftwareRegistry::componentNameKey(void) - ?trUtf8@CaSoftwareRegistry@@SA?AVQString@@PBD0@Z @ 25 NONAME ; class QString CaSoftwareRegistry::trUtf8(char const *, char const *) - ?componentProtectionDomainKey@CaSoftwareRegistry@@SA?AVQString@@XZ @ 26 NONAME ; class QString CaSoftwareRegistry::componentProtectionDomainKey(void) - ?trUtf8@CaSoftwareRegistry@@SA?AVQString@@PBD0H@Z @ 27 NONAME ; class QString CaSoftwareRegistry::trUtf8(char const *, char const *, int) - ?getUninstallDetails@CaSoftwareRegistry@@QAE_NHAAVQString@@AAVQStringList@@0@Z @ 28 NONAME ; bool CaSoftwareRegistry::getUninstallDetails(int, class QString &, class QStringList &, class QString &) - ?create@CaSoftwareRegistry@@SA?AV?$QSharedPointer@VCaSoftwareRegistry@@@@XZ @ 29 NONAME ; class QSharedPointer CaSoftwareRegistry::create(void) - ?componentUpgradeValue@CaSoftwareRegistry@@SA?AVQString@@XZ @ 30 NONAME ; class QString CaSoftwareRegistry::componentUpgradeValue(void) - ?componentDescriptionKey@CaSoftwareRegistry@@SA?AVQString@@XZ @ 31 NONAME ; class QString CaSoftwareRegistry::componentDescriptionKey(void) - ?componentVersionKey@CaSoftwareRegistry@@SA?AVQString@@XZ @ 32 NONAME ; class QString CaSoftwareRegistry::componentVersionKey(void) - ?retrieveLogEntries@CaSoftwareRegistry@@QBE?AV?$QList@V?$QHash@VQString@@V1@@@@@XZ @ 33 NONAME ; class QList > CaSoftwareRegistry::retrieveLogEntries(void) const - ?qt_metacast@CaSoftwareRegistry@@UAEPAXPBD@Z @ 34 NONAME ; void * CaSoftwareRegistry::qt_metacast(char const *) + ??_ECaUninstallNotifier@@UAE@I@Z @ 1 NONAME ; CaUninstallNotifier::~CaUninstallNotifier(unsigned int) + ?componentInstallValue@CaSoftwareRegistry@@SA?AVQString@@XZ @ 2 NONAME ; class QString CaSoftwareRegistry::componentInstallValue(void) + ?qt_metacall@CaUninstallNotifier@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 3 NONAME ; int CaUninstallNotifier::qt_metacall(enum QMetaObject::Call, int, void * *) + ??1CaSoftwareRegistry@@EAE@XZ @ 4 NONAME ; CaSoftwareRegistry::~CaSoftwareRegistry(void) + ?componentTimeKey@CaSoftwareRegistry@@SA?AVQString@@XZ @ 5 NONAME ; class QString CaSoftwareRegistry::componentTimeKey(void) + ??1CaUninstallNotifier@@EAE@XZ @ 6 NONAME ; CaUninstallNotifier::~CaUninstallNotifier(void) + ?componentHiddenValue@CaSoftwareRegistry@@SA?AVQString@@XZ @ 7 NONAME ; class QString CaSoftwareRegistry::componentHiddenValue(void) + ?progressChange@CaUninstallNotifier@@IAEXHH@Z @ 8 NONAME ; void CaUninstallNotifier::progressChange(int, int) + ?metaObject@CaUninstallNotifier@@UBEPBUQMetaObject@@XZ @ 9 NONAME ; struct QMetaObject const * CaUninstallNotifier::metaObject(void) const + ?m_instance@CaSoftwareRegistry@@0V?$QWeakPointer@VCaSoftwareRegistry@@@@A @ 10 NONAME ; class QWeakPointer CaSoftwareRegistry::m_instance + ?staticMetaObject@CaSoftwareRegistry@@2UQMetaObject@@B @ 11 NONAME ; struct QMetaObject const CaSoftwareRegistry::staticMetaObject + ?qt_metacast@CaUninstallNotifier@@UAEPAXPBD@Z @ 12 NONAME ; void * CaUninstallNotifier::qt_metacast(char const *) + ?componentVendorKey@CaSoftwareRegistry@@SA?AVQString@@XZ @ 13 NONAME ; class QString CaSoftwareRegistry::componentVendorKey(void) + ?NewL@CCaProgresScanner@@SAPAV1@PAVIUninstallObserver@@@Z @ 14 NONAME ; class CCaProgresScanner * CCaProgresScanner::NewL(class IUninstallObserver *) + ?qt_metacall@CaSoftwareRegistry@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 15 NONAME ; int CaSoftwareRegistry::qt_metacall(enum QMetaObject::Call, int, void * *) + ?componentOperationTypeKey@CaSoftwareRegistry@@SA?AVQString@@XZ @ 16 NONAME ; class QString CaSoftwareRegistry::componentOperationTypeKey(void) + ?getLastNotification@CaUninstallNotifier@@QAE?AV?$QMap@VQString@@VQVariant@@@@XZ @ 17 NONAME ; class QMap CaUninstallNotifier::getLastNotification(void) + ?metaObject@CaSoftwareRegistry@@UBEPBUQMetaObject@@XZ @ 18 NONAME ; struct QMetaObject const * CaSoftwareRegistry::metaObject(void) const + ?tr@CaUninstallNotifier@@SA?AVQString@@PBD0H@Z @ 19 NONAME ; class QString CaUninstallNotifier::tr(char const *, char const *, int) + ?tr@CaSoftwareRegistry@@SA?AVQString@@PBD0H@Z @ 20 NONAME ; class QString CaSoftwareRegistry::tr(char const *, char const *, int) + ?tr@CaSoftwareRegistry@@SA?AVQString@@PBD0@Z @ 21 NONAME ; class QString CaSoftwareRegistry::tr(char const *, char const *) + ?componentTypeKey@CaSoftwareRegistry@@SA?AVQString@@XZ @ 22 NONAME ; class QString CaSoftwareRegistry::componentTypeKey(void) + ?trUtf8@CaUninstallNotifier@@SA?AVQString@@PBD0H@Z @ 23 NONAME ; class QString CaUninstallNotifier::trUtf8(char const *, char const *, int) + ?getStaticMetaObject@CaSoftwareRegistry@@SAABUQMetaObject@@XZ @ 24 NONAME ; struct QMetaObject const & CaSoftwareRegistry::getStaticMetaObject(void) + ?componentDriveInfoKey@CaSoftwareRegistry@@SA?AVQString@@XZ @ 25 NONAME ; class QString CaSoftwareRegistry::componentDriveInfoKey(void) + ?trUtf8@CaUninstallNotifier@@SA?AVQString@@PBD0@Z @ 26 NONAME ; class QString CaUninstallNotifier::trUtf8(char const *, char const *) + ??_ECaSoftwareRegistry@@UAE@I@Z @ 27 NONAME ; CaSoftwareRegistry::~CaSoftwareRegistry(unsigned int) + ?componentUninstallValue@CaSoftwareRegistry@@SA?AVQString@@XZ @ 28 NONAME ; class QString CaSoftwareRegistry::componentUninstallValue(void) + ?createUninstallNotifier@CaSoftwareRegistry@@QBEPAVCaUninstallNotifier@@XZ @ 29 NONAME ; class CaUninstallNotifier * CaSoftwareRegistry::createUninstallNotifier(void) const + ?entryDetails@CaSoftwareRegistry@@QBE?AV?$QHash@VQString@@V1@@@H@Z @ 30 NONAME ; class QHash CaSoftwareRegistry::entryDetails(int) const + ?componentSizeKey@CaSoftwareRegistry@@SA?AVQString@@XZ @ 31 NONAME ; class QString CaSoftwareRegistry::componentSizeKey(void) + ??0CaSoftwareRegistry@@AAE@PAVQObject@@@Z @ 32 NONAME ; CaSoftwareRegistry::CaSoftwareRegistry(class QObject *) + ?getStaticMetaObject@CaUninstallNotifier@@SAABUQMetaObject@@XZ @ 33 NONAME ; struct QMetaObject const & CaUninstallNotifier::getStaticMetaObject(void) + ?staticMetaObject@CaUninstallNotifier@@2UQMetaObject@@B @ 34 NONAME ; struct QMetaObject const CaUninstallNotifier::staticMetaObject + ?getApplicationsUids@CaSoftwareRegistry@@QAE_NHAAVQStringList@@@Z @ 35 NONAME ; bool CaSoftwareRegistry::getApplicationsUids(int, class QStringList &) + ?componentNameKey@CaSoftwareRegistry@@SA?AVQString@@XZ @ 36 NONAME ; class QString CaSoftwareRegistry::componentNameKey(void) + ?trUtf8@CaSoftwareRegistry@@SA?AVQString@@PBD0@Z @ 37 NONAME ; class QString CaSoftwareRegistry::trUtf8(char const *, char const *) + ?notifier@CaUninstallNotifier@@SAPAV1@XZ @ 38 NONAME ; class CaUninstallNotifier * CaUninstallNotifier::notifier(void) + ?componentProtectionDomainKey@CaSoftwareRegistry@@SA?AVQString@@XZ @ 39 NONAME ; class QString CaSoftwareRegistry::componentProtectionDomainKey(void) + ??0CaUninstallNotifier@@AAE@PAVCaUninstallNotifierPrivate@@@Z @ 40 NONAME ; CaUninstallNotifier::CaUninstallNotifier(class CaUninstallNotifierPrivate *) + ?trUtf8@CaSoftwareRegistry@@SA?AVQString@@PBD0H@Z @ 41 NONAME ; class QString CaSoftwareRegistry::trUtf8(char const *, char const *, int) + ?getUninstallDetails@CaSoftwareRegistry@@QAE_NHAAVQString@@AAVQStringList@@0@Z @ 42 NONAME ; bool CaSoftwareRegistry::getUninstallDetails(int, class QString &, class QStringList &, class QString &) + ?create@CaSoftwareRegistry@@SA?AV?$QSharedPointer@VCaSoftwareRegistry@@@@XZ @ 43 NONAME ; class QSharedPointer CaSoftwareRegistry::create(void) + ?componentUpgradeValue@CaSoftwareRegistry@@SA?AVQString@@XZ @ 44 NONAME ; class QString CaSoftwareRegistry::componentUpgradeValue(void) + ?mInstance@CaUninstallNotifier@@0V?$QSharedPointer@VCaUninstallNotifier@@@@A @ 45 NONAME ; class QSharedPointer CaUninstallNotifier::mInstance + ?componentDescriptionKey@CaSoftwareRegistry@@SA?AVQString@@XZ @ 46 NONAME ; class QString CaSoftwareRegistry::componentDescriptionKey(void) + ?retrieveLogEntries@CaSoftwareRegistry@@QBE?AV?$QList@V?$QHash@VQString@@V1@@@@@XZ @ 47 NONAME ; class QList > CaSoftwareRegistry::retrieveLogEntries(void) const + ?componentVersionKey@CaSoftwareRegistry@@SA?AVQString@@XZ @ 48 NONAME ; class QString CaSoftwareRegistry::componentVersionKey(void) + ?qt_metacast@CaSoftwareRegistry@@UAEPAXPBD@Z @ 49 NONAME ; void * CaSoftwareRegistry::qt_metacast(char const *) + ?tr@CaUninstallNotifier@@SA?AVQString@@PBD0@Z @ 50 NONAME ; class QString CaUninstallNotifier::tr(char const *, char const *) diff -r efda7c0771b9 -r 7b66bc3c6dc9 contentstorage/casoftwareregistry/eabi/casoftwareregistryu.def --- a/contentstorage/casoftwareregistry/eabi/casoftwareregistryu.def Wed Oct 13 12:59:22 2010 +0300 +++ b/contentstorage/casoftwareregistry/eabi/casoftwareregistryu.def Mon Oct 18 10:44:15 2010 +0300 @@ -27,10 +27,26 @@ _ZN18CaSoftwareRegistryD0Ev @ 26 NONAME _ZN18CaSoftwareRegistryD1Ev @ 27 NONAME _ZN18CaSoftwareRegistryD2Ev @ 28 NONAME - _ZNK18CaSoftwareRegistry10metaObjectEv @ 29 NONAME - _ZNK18CaSoftwareRegistry12entryDetailsEi @ 30 NONAME - _ZNK18CaSoftwareRegistry18retrieveLogEntriesEv @ 31 NONAME - _ZNK18CaSoftwareRegistry23createUninstallNotifierEv @ 32 NONAME - _ZTI18CaSoftwareRegistry @ 33 NONAME - _ZTV18CaSoftwareRegistry @ 34 NONAME + _ZN19CaUninstallNotifier11qt_metacallEN11QMetaObject4CallEiPPv @ 29 NONAME + _ZN19CaUninstallNotifier11qt_metacastEPKc @ 30 NONAME + _ZN19CaUninstallNotifier14progressChangeEii @ 31 NONAME + _ZN19CaUninstallNotifier16staticMetaObjectE @ 32 NONAME DATA 16 + _ZN19CaUninstallNotifier19getLastNotificationEv @ 33 NONAME + _ZN19CaUninstallNotifier19getStaticMetaObjectEv @ 34 NONAME + _ZN19CaUninstallNotifier8notifierEv @ 35 NONAME + _ZN19CaUninstallNotifier9mInstanceE @ 36 NONAME DATA 8 + _ZN19CaUninstallNotifierC1EP26CaUninstallNotifierPrivate @ 37 NONAME + _ZN19CaUninstallNotifierC2EP26CaUninstallNotifierPrivate @ 38 NONAME + _ZN19CaUninstallNotifierD0Ev @ 39 NONAME + _ZN19CaUninstallNotifierD1Ev @ 40 NONAME + _ZN19CaUninstallNotifierD2Ev @ 41 NONAME + _ZNK18CaSoftwareRegistry10metaObjectEv @ 42 NONAME + _ZNK18CaSoftwareRegistry12entryDetailsEi @ 43 NONAME + _ZNK18CaSoftwareRegistry18retrieveLogEntriesEv @ 44 NONAME + _ZNK18CaSoftwareRegistry23createUninstallNotifierEv @ 45 NONAME + _ZNK19CaUninstallNotifier10metaObjectEv @ 46 NONAME + _ZTI18CaSoftwareRegistry @ 47 NONAME + _ZTI19CaUninstallNotifier @ 48 NONAME + _ZTV18CaSoftwareRegistry @ 49 NONAME + _ZTV19CaUninstallNotifier @ 50 NONAME diff -r efda7c0771b9 -r 7b66bc3c6dc9 contentstorage/casoftwareregistry/s60/inc/casoftwareregistry_p.h --- a/contentstorage/casoftwareregistry/s60/inc/casoftwareregistry_p.h Wed Oct 13 12:59:22 2010 +0300 +++ b/contentstorage/casoftwareregistry/s60/inc/casoftwareregistry_p.h Mon Oct 18 10:44:15 2010 +0300 @@ -22,6 +22,7 @@ #include #include +#include class QStringList; class CaSoftwareRegistry; @@ -54,7 +55,7 @@ QList retrieveLogEntries() const; CaUninstallNotifier *createUninstallNotifier() const; - + private: QList retrieveLogEntriesL() const; DetailMap entryDetailsL( @@ -66,12 +67,12 @@ void getApplicationsUidsL(int componentId, QStringList &appUids); DetailMap entryDetailsL(int componentId) const; - //TODO int should be changed to const Usif::TScrComponentOperationType& - //when the problem with usif headers is solved - QString operationTypeL(int operationType) const; + QString operationTypeL( + Usif::TScrComponentOperationType operationType) const; QString operationTime(TTime time) const; private: CaSoftwareRegistry *const m_q; + friend class T_CaSoftwareRegistry; }; diff -r efda7c0771b9 -r 7b66bc3c6dc9 contentstorage/casoftwareregistry/s60/inc/cauninstallnotifier_p.h --- a/contentstorage/casoftwareregistry/s60/inc/cauninstallnotifier_p.h Wed Oct 13 12:59:22 2010 +0300 +++ b/contentstorage/casoftwareregistry/s60/inc/cauninstallnotifier_p.h Mon Oct 18 10:44:15 2010 +0300 @@ -19,6 +19,7 @@ #define CAUNINSTALLNOTIFIER_P_H #include +#include #include class CaUninstallObserver; class CCaProgresScanner; @@ -36,14 +37,24 @@ virtual ~CaUninstallNotifierPrivate(); void makeConnect(); + + QVariantMap getLastNotification(); + +private slots: + + void progressChange(int componentId, int valueOfProgress); private: CaUninstallObserver* mUninstallObserver; CCaProgresScanner* mProgressScanner; QSharedPointer mCaSoftwareRegistry; - const CaUninstallNotifier *m_q; + CaUninstallNotifier *m_q; friend class CaUninstallNotifier; + friend class T_CaSoftwareRegistry; + + int mLastComponentId; + int mLastValueOfProgress; }; diff -r efda7c0771b9 -r 7b66bc3c6dc9 contentstorage/casoftwareregistry/s60/src/casoftwareregistry_p.cpp --- a/contentstorage/casoftwareregistry/s60/src/casoftwareregistry_p.cpp Wed Oct 13 12:59:22 2010 +0300 +++ b/contentstorage/casoftwareregistry/s60/src/casoftwareregistry_p.cpp Mon Oct 18 10:44:15 2010 +0300 @@ -20,8 +20,6 @@ #include #include #include -#undef SYMBIAN_ENABLE_SPLIT_HEADERS //TODO this is work around -#include #include #include #include @@ -35,13 +33,16 @@ #include "caarraycleanup.inl" #include "cautils.h" + using namespace Usif; _LIT(KConfirmMessageKey, "MIDlet-Delete-Confirm"); _LIT(KCaScrPropertyDomainCategory, "Domain-Category"); _LIT(KCaScrPropertyMidletDescryption, "MIDlet-Description"); _LIT(KNotNamedMmc, "NO NAME"); -const int maxLogsCount = 20; // should be 50 - workaround for -// ou1cimx1#476143 Dialog crash when label contains big amount of lines + +const int maxLogsCount = 50; +const TInt64 KLongKilo = 1024; +const TInt64 KLongMega = KLongKilo * KLongKilo; /*! Constructor @@ -58,7 +59,6 @@ */ CaSoftwareRegistryPrivate::~CaSoftwareRegistryPrivate() { - } /*! @@ -73,14 +73,11 @@ */ bool CaSoftwareRegistryPrivate::getUninstallDetails(int componentId, - QString &componentName, - QStringList &applicationsUids, + QString &componentName, QStringList &applicationsUids, QString &confirmationMessage) { - TRAPD(error, getUninstallDetailsL(componentId, - componentName, - applicationsUids, - confirmationMessage) + TRAPD(error, getUninstallDetailsL( + componentId, componentName, applicationsUids, confirmationMessage) ); return error == KErrNone; } @@ -111,15 +108,10 @@ null string means the lack of the message. */ void CaSoftwareRegistryPrivate::getUninstallDetailsL(int componentId, - QString &componentName, - QStringList &appUids, + QString &componentName, QStringList &appUids, QString &confirmationMessage) { - componentName.clear(); - appUids.clear(); - confirmationMessage.clear(); - - if (componentId >= 1) { + if (componentId > 0) { TComponentId componentIdValue(componentId); RArray appUidsArray; CleanupClosePushL(appUidsArray); @@ -148,6 +140,7 @@ confirmationProperty = NULL; } + appUids.clear(); QT_TRYCATCH_LEAVING(componentName = XQConversions::s60DescToQString(entry->Name()); for (TInt i = 0; i= 1) { + if (componentId > 0) { TComponentId componentIdValue(componentId); RArray appUidsArray; CleanupClosePushL(appUidsArray); @@ -186,8 +178,9 @@ softwareComponentRegistry.GetAppUidsForComponentL( componentIdValue, appUidsArray); + appUids.clear(); QT_TRYCATCH_LEAVING( - for (TInt i = 0; iSoftwareType().Compare(KSoftwareTypeJava) == 0) { CPropertyEntry* domainProperty = - scr.GetComponentPropertyL(componentId, - KCaScrPropertyDomainCategory); + scr.GetComponentPropertyL(componentId, + KCaScrPropertyDomainCategory); CleanupStack::PushL(domainProperty); - if (domainProperty && - domainProperty->PropertyType() == - CPropertyEntry::ELocalizedProperty) { + if (domainProperty + && domainProperty->PropertyType() + == CPropertyEntry::ELocalizedProperty) { const TDesC& domainPropertyValue = static_cast( domainProperty)->StrValue(); TInt splitIndex = domainPropertyValue.Locate(','); @@ -296,7 +289,7 @@ TChar drive; const TInt driveListLen(entry.InstalledDrives().Length()); - for (TInt i( 0 ); i < driveListLen; ++i) { + for (TInt i = 0; i < driveListLen; i++) { if (entry.InstalledDrives()[i] != '\0') { if (!drives.isEmpty()) { @@ -347,16 +340,14 @@ } detailMap[CaSoftwareRegistry::componentDriveInfoKey()] = drives; - static const TInt64 KKilo = 1024; - static const TInt64 KMega = KKilo * KKilo; - if(entry.ComponentSize() >= KMega) { + if(entry.ComponentSize() >= KLongMega) { detailMap[CaSoftwareRegistry::componentSizeKey()] = HbParameterLengthLimiter("txt_applib_dialog_l1_mb").arg( - static_cast(entry.ComponentSize() / KMega)); + static_cast(entry.ComponentSize()/KLongMega)); } else { detailMap[CaSoftwareRegistry::componentSizeKey()] = HbParameterLengthLimiter("txt_applib_dialog_l1_kb").arg( - static_cast(entry.ComponentSize() / KKilo)); + static_cast(entry.ComponentSize()/KLongKilo)); } detailMap[CaSoftwareRegistry::componentTypeKey()] = XQConversions::s60DescToQString(entry.SoftwareType()); @@ -430,7 +421,8 @@ \param operation type. \return string representing operation type. */ -QString CaSoftwareRegistryPrivate::operationTypeL(int operationType) const +QString CaSoftwareRegistryPrivate::operationTypeL( + Usif::TScrComponentOperationType operationType) const { QString opType; switch (operationType) { diff -r efda7c0771b9 -r 7b66bc3c6dc9 contentstorage/casoftwareregistry/s60/src/cauninstallnotifier_p.cpp --- a/contentstorage/casoftwareregistry/s60/src/cauninstallnotifier_p.cpp Wed Oct 13 12:59:22 2010 +0300 +++ b/contentstorage/casoftwareregistry/s60/src/cauninstallnotifier_p.cpp Mon Oct 18 10:44:15 2010 +0300 @@ -28,7 +28,9 @@ CaUninstallNotifierPrivate::CaUninstallNotifierPrivate() : mUninstallObserver(NULL), mProgressScanner(NULL), mCaSoftwareRegistry(CaSoftwareRegistry::create()), - m_q(NULL) + m_q(NULL), + mLastComponentId(0), + mLastValueOfProgress(0) { mUninstallObserver = new CaUninstallObserver(); TRAP_IGNORE(mProgressScanner = CCaProgresScanner::NewL(mUninstallObserver)); @@ -43,8 +45,34 @@ delete mUninstallObserver; } +/*! + Makes connections witch uninstall observer. + */ void CaUninstallNotifierPrivate::makeConnect() { connect(mUninstallObserver, SIGNAL(signalprogressChange(int, int)), - m_q, SIGNAL(progressChange(int, int))); + this, SLOT(progressChange(int, int))); +} + +/*! + Slot to cache and forward progress notification. + */ +void CaUninstallNotifierPrivate::progressChange(int componentId,int valueOfProgress){ + mLastComponentId = componentId; + mLastValueOfProgress = valueOfProgress; + emit m_q->progressChange(componentId, valueOfProgress); } + +/*! + Returns last progress notification. + */ +QVariantMap CaUninstallNotifierPrivate::getLastNotification() +{ + QVariantMap lastNote; + if(mLastValueOfProgress < 0){ + mLastComponentId = 0; + } + lastNote.insert(uninstallNotifierComponentIdKey, mLastComponentId); + lastNote.insert(uninstallNotifierValueOfProgressKey, mLastValueOfProgress); + return lastNote; +} diff -r efda7c0771b9 -r 7b66bc3c6dc9 contentstorage/casoftwareregistry/src/cauninstallnotifier.cpp --- a/contentstorage/casoftwareregistry/src/cauninstallnotifier.cpp Wed Oct 13 12:59:22 2010 +0300 +++ b/contentstorage/casoftwareregistry/src/cauninstallnotifier.cpp Mon Oct 18 10:44:15 2010 +0300 @@ -41,6 +41,9 @@ delete m_d; } +/*! + Returns notifier instance. + */ CaUninstallNotifier* CaUninstallNotifier::notifier() { if (!mInstance.data()) { @@ -51,4 +54,10 @@ return mInstance.data(); } - +/*! + Returns last progress notification. + */ +QVariantMap CaUninstallNotifier::getLastNotification(void) +{ + return m_d->getLastNotification(); +} diff -r efda7c0771b9 -r 7b66bc3c6dc9 contentstorage/casoftwareregistry/stub/inc/cauninstallnotifier_p.h --- a/contentstorage/casoftwareregistry/stub/inc/cauninstallnotifier_p.h Wed Oct 13 12:59:22 2010 +0300 +++ b/contentstorage/casoftwareregistry/stub/inc/cauninstallnotifier_p.h Mon Oct 18 10:44:15 2010 +0300 @@ -19,6 +19,7 @@ #define CAUNINSTALLNOTIFIER_P_H #include +#include #include class CaUninstallObserver; class CaUninstallNotifier; @@ -35,6 +36,12 @@ virtual ~CaUninstallNotifierPrivate(); void makeConnect(); + + QVariantMap getLastNotification(); + +private slots: + + void progressChange(int componentId, int valueOfProgress); private: CaUninstallObserver* mUninstallObserver; diff -r efda7c0771b9 -r 7b66bc3c6dc9 contentstorage/casoftwareregistry/stub/src/cauninstallnotifier_p.cpp --- a/contentstorage/casoftwareregistry/stub/src/cauninstallnotifier_p.cpp Wed Oct 13 12:59:22 2010 +0300 +++ b/contentstorage/casoftwareregistry/stub/src/cauninstallnotifier_p.cpp Mon Oct 18 10:44:15 2010 +0300 @@ -40,7 +40,26 @@ delete mUninstallObserver; } +/*! + Makes connections witch uninstall observer. + */ void CaUninstallNotifierPrivate::makeConnect() { +} +/*! + Slot to cache and forward progress notification. + */ +void CaUninstallNotifierPrivate::progressChange(int componentId,int valueOfProgress){ } + +/*! + Returns last progress notification. + */ +QVariantMap CaUninstallNotifierPrivate::getLastNotification() +{ + QVariantMap lastNote; + lastNote.insert(uninstallNotifierComponentIdKey, 0); + lastNote.insert(uninstallNotifierValueOfProgressKey, 0); + return lastNote; +} diff -r efda7c0771b9 -r 7b66bc3c6dc9 contentstorage/casrv/caappscanner/inc/casrvappscanner.h --- a/contentstorage/casrv/caappscanner/inc/casrvappscanner.h Wed Oct 13 12:59:22 2010 +0300 +++ b/contentstorage/casrv/caappscanner/inc/casrvappscanner.h Mon Oct 18 10:44:15 2010 +0300 @@ -137,8 +137,7 @@ * @param aEntry application entry. * @param aUpdate is entry updated by a client. */ - void AddEntryToPredefinedCollectionL( CCaInnerEntry* aEntry, - TBool aUpdate = EFalse ); + void AddEntryToPredefinedCollectionL( CCaInnerEntry* aEntry); /** * Create predefined collection. diff -r efda7c0771b9 -r 7b66bc3c6dc9 contentstorage/casrv/caappscanner/src/casrvappscanner.cpp --- a/contentstorage/casrv/caappscanner/src/casrvappscanner.cpp Wed Oct 13 12:59:22 2010 +0300 +++ b/contentstorage/casrv/caappscanner/src/casrvappscanner.cpp Mon Oct 18 10:44:15 2010 +0300 @@ -262,7 +262,6 @@ TBool missingFlagChanged = HandleMissingFlagsUpdate( aEntry ); TBool visibleFlagChanged = HandleVisibleFlagUpdate( aEntry ); - // To handle case with mmc card. When mmc attritube is updated then // used flag should be change. When aplication is update but // it is not appear then this flag should be change too. @@ -272,7 +271,8 @@ } TBool toUpdate = missingFlagChanged || visibleFlagChanged; toUpdate = SetApaAppInfoL( aEntry ) || toUpdate; - toUpdate = HandleRemovableFlagAndMmcAttrUpdateL( aEntry, aMmcId ) || toUpdate; + toUpdate = HandleRemovableFlagAndMmcAttrUpdateL( + aEntry, aMmcId ) || toUpdate; toUpdate = RemoveUninstallFlagL( aEntry ) || toUpdate; if( toUpdate || aAlwaysUpdate ) @@ -285,8 +285,8 @@ } if( !missingFlagChanged ) { - AddEntryToPredefinedCollectionL( aEntry, ETrue ); - if ( aEntry->GetFlags() & ERemovable ) + AddEntryToPredefinedCollectionL( aEntry ); + if( aEntry->GetFlags() & ERemovable ) { AddEntryToDownloadedCollectionL( aEntry->GetId() ); } @@ -307,12 +307,12 @@ if( aEntry && aEntry->IsRemovable() ) { TChar currentDriveLetter; - if ( aEntry->SoftwareType().Compare(KCaAttrAppTypeValueNative()) != 0 ) + if( aEntry->SoftwareType().Compare( KCaAttrAppTypeValueNative() ) != 0 ) { TDriveList driveList = aEntry->InstalledDrives(); - for ( TInt driveNr=EDriveY; driveNr >= EDriveA; driveNr-- ) + for( TInt driveNr=EDriveY; driveNr >= EDriveA; driveNr-- ) { - if ( driveList[driveNr] ) + if( driveList[driveNr] ) { User::LeaveIfError( iFs.DriveToChar( driveNr, currentDriveLetter ) ); @@ -340,7 +340,8 @@ toChange = AddAttributeL( aItem, KCaAttrMmcId, uidString ); CleanupStack::PopAndDestroy( &uidString ); } - else if ( IsCharInDrive( currentDriveLetter, DriveInfo::EDefaultMassStorage ) ) + else if ( IsCharInDrive( + currentDriveLetter, DriveInfo::EDefaultMassStorage ) ) { //its app installed on mass storage, we need to leave it //in case of connecting usb in mass storage mode @@ -701,7 +702,7 @@ // --------------------------------------------------------- // void CCaSrvAppScanner::AddEntryToPredefinedCollectionL( - CCaInnerEntry* aEntry, TBool aUpdate ) + CCaInnerEntry* aEntry ) { TApaAppCapabilityBuf capability; User::LeaveIfError( iApaLsSession.GetAppCapability( capability, @@ -743,17 +744,9 @@ // add new collection to all collection AddCollectionToAllCollectionL( predefinedCollectionId ); - - if( aUpdate ) - { - iCaStorageProxy.OrganizeL( entryIds, organizeParams ); - } } - if( !aUpdate ) - { - iCaStorageProxy.OrganizeL( entryIds, organizeParams ); - } + iCaStorageProxy.OrganizeL( entryIds, organizeParams ); CleanupStack::PopAndDestroy( &entryIds ); CleanupStack::PopAndDestroy( &resultArrayItems ); @@ -876,26 +869,26 @@ changed = SetCWRTAppL( aEntry ) || changed; } } - + TApaAppCapabilityBuf appCap; TInt screenNumber = 0; - + User::LeaveIfError( iApaLsSession.GetAppCapability ( appCap, info->iUid ) ); User::LeaveIfError( iApaLsSession.GetDefaultScreenNumber ( screenNumber, info->iUid ) ); - + const TBool hidden = appCap().iAppIsHidden || screenNumber != 0; - + const TBool visible = aEntry->GetFlags() & EVisible; - - if ( hidden && visible ) + + if ( hidden && visible ) { changed = ETrue; aEntry->SetFlags(aEntry->GetFlags() & ~EVisible); } } - + CleanupStack::PopAndDestroy( info ); return changed; } diff -r efda7c0771b9 -r 7b66bc3c6dc9 contentstorage/castorage/data/castorage.db Binary file contentstorage/castorage/data/castorage.db has changed diff -r efda7c0771b9 -r 7b66bc3c6dc9 contentstorage/castorage/data/castoragedb_create.sql --- a/contentstorage/castorage/data/castoragedb_create.sql Wed Oct 13 12:59:22 2010 +0300 +++ b/contentstorage/castorage/data/castoragedb_create.sql Mon Oct 18 10:44:15 2010 +0300 @@ -48,14 +48,6 @@ IC_APP_ID TEXT, UNIQUE( IC_FILENAME, IC_SKIN_ID, IC_APP_ID ) ); -SELECT "CREATE TABLE CA_LAUNCH" AS " "; -SELECT "------------------------------------" AS " "; -CREATE TABLE CA_LAUNCH( LAUNCH_ID INTEGER PRIMARY KEY , - LA_ENTRY_ID INTEGER NOT NULL, - LA_LAUNCH_TIME INTEGER NOT NULL, - FOREIGN KEY(LA_ENTRY_ID) REFERENCES CA_ENTRY(ENTRY_ID) ); -CREATE INDEX LaunchLaunchTime_CAIndex ON CA_LAUNCH(LA_LAUNCH_TIME); - SELECT "CREATE TABLE CA_ATTRIBUTE" AS " "; SELECT "------------------------------------" AS " "; CREATE TABLE CA_ATTRIBUTE( ATTRIBUTE_ID INTEGER PRIMARY KEY , diff -r efda7c0771b9 -r 7b66bc3c6dc9 contentstorage/castorage/data/stub/castorage.db Binary file contentstorage/castorage/data/stub/castorage.db has changed diff -r efda7c0771b9 -r 7b66bc3c6dc9 contentstorage/castorage/inc/casqlcommands.h --- a/contentstorage/castorage/inc/casqlcommands.h Wed Oct 13 12:59:22 2010 +0300 +++ b/contentstorage/castorage/inc/casqlcommands.h Mon Oct 18 10:44:15 2010 +0300 @@ -52,10 +52,6 @@ (IC_FILENAME,IC_SKIN_ID,IC_APP_ID) \ VALUES ( :IC_FILENAME, :IC_SKIN_ID, :IC_APP_ID )" ); -_LIT( KSQLInsertToLaunch, "INSERT INTO CA_LAUNCH \ -(LA_ENTRY_ID, LA_LAUNCH_TIME) \ -VALUES ( :LA_ENTRY_ID, :LA_LAUNCH_TIME )" ); - _LIT( KSQLInsertToAttribute, "REPLACE INTO CA_ATTRIBUTE \ (AT_ENTRY_ID, AT_NAME,AT_VALUE) \ VALUES ( :AT_ENTRY_ID, :AT_NAME, :AT_VALUE )" ); @@ -69,15 +65,15 @@ _LIT( KSQLUpdateGroup, "UPDATE CA_GROUP_ENTRY SET " ); _LIT( KSQLUpdateIcon, "UPDATE CA_ICON SET " ); _LIT( KSQLUpdateEntryUsedFlag, "UPDATE CA_ENTRY SET \ -EN_FLAGS = EN_FLAGS | :EN_FLAGS WHERE ENTRY_ID = :LA_ENTRY_ID"); +EN_FLAGS = EN_FLAGS | :EN_FLAGS WHERE ENTRY_ID = :ENTRY_ID"); _LIT( KSQLLocalizeTextEntry, "UPDATE CA_ENTRY SET \ EN_TEXT = :LT_STRING WHERE ENTRY_ID = :LT_ROW_ID"); // WHERE ENTRY_ID must be changed if an attribute _LIT( KSQLLocalizeDescriptionEntry, "UPDATE CA_ENTRY SET \ EN_DESCRIPTION = :LT_STRING WHERE ENTRY_ID = :LT_ROW_ID"); // WHERE ENTRY_ID must be changed if an attribute _LIT( KSQLLocalizeShortNameAttribute, "UPDATE CA_ATTRIBUTE SET \ -AT_VALUE = :LT_STRING WHERE AT_ENTRY_ID = :LT_ROW_ID AND AT_NAME = \"short_name\""); +AT_VALUE = :LT_STRING WHERE AT_ENTRY_ID = :LT_ROW_ID AND AT_NAME = \"short_name\""); _LIT( KSQLLocalizeTitleNameAttribute, "UPDATE CA_ATTRIBUTE SET \ -AT_VALUE = :LT_STRING WHERE AT_ENTRY_ID = :LT_ROW_ID AND AT_NAME = \"title_name\""); +AT_VALUE = :LT_STRING WHERE AT_ENTRY_ID = :LT_ROW_ID AND AT_NAME = \"title_name\""); _LIT( KSQLUpdatePositionInGroup, "UPDATE CA_GROUP_ENTRY SET \ GE_POSITION = :GE_POSITION WHERE \ @@ -100,7 +96,7 @@ _LIT( KSQLUpdateEntryFlags, "EN_FLAGS = :EN_FLAGS " ); _LIT( KSQLUpdateWhere, "WHERE ENTRY_ID = :ENTRY_ID " ); -// Null Icon params +// Null Icon params _LIT( KSQLEmptyIconFileName, "(IC_FILENAME IS NULL OR IC_FILENAME = '')" ); _LIT( KSQLEmptyIconSkinId, "(IC_SKIN_ID IS NULL OR IC_SKIN_ID = '')" ); _LIT( KSQLEmptyIconAppId, "(IC_APP_ID IS NULL OR IC_APP_ID = '')" ); @@ -113,8 +109,8 @@ _LIT( KSQLUpdateIconWhere, "WHERE ICON_ID = :ICON_ID" ); // Update property -_LIT( KSQLUpdateProperty, "UPDATE CA_DB_PROPERTIES \ -SET DB_VALUE = :DB_VALUE WHERE DB_PROPERTY = :DB_PROPERTY "); +_LIT( KSQLUpdateProperty, "REPLACE INTO CA_DB_PROPERTIES \ + ( DB_PROPERTY, DB_VALUE ) VALUES ( :DB_PROPERTY, :DB_VALUE )"); // Update localization table entry @@ -124,10 +120,6 @@ AND LT_ROW_ID = :LT_ROW_ID" ); //Delete Data -_LIT( KSQLDeleteLaunch, "DELETE FROM CA_LAUNCH \ -WHERE LA_ENTRY_ID = :ENTRY_ID" ); -_LIT( KSQLDeleteOldFromLaunch, "DELETE FROM CA_LAUNCH \ -WHERE LA_LAUNCH_TIME < :LA_LAUNCH_TIME" ); _LIT( KSQLDeleteEntryFromGroup, "DELETE FROM CA_GROUP_ENTRY \ WHERE GE_ENTRY_ID = :ENTRY_ID" ); _LIT( KSQLDeleteGroupFromGroup, "DELETE FROM CA_GROUP_ENTRY \ @@ -184,17 +176,6 @@ ATTRIBUTE_ID, AT_ENTRY_ID, AT_NAME, AT_VALUE FROM CA_ATTRIBUTE \ WHERE AT_ENTRY_ID IN ( %S )" ); -//Select most used -// %S - the input table to work on. -_LIT( KSQLGetListByLaunchDataPart1,"SELECT ENTRY_ID, EN_TEXT, \ -EN_DESCRIPTION, EN_ROLE, EN_TYPE_NAME, EN_ICON_ID, EN_CREATION_TIME, \ -EN_UID, EN_FLAGS, IC_FILENAME, IC_SKIN_ID, IC_APP_ID FROM ("); - -// %S - the table to match e.g KSQLGetMostUsed or KSQLGetLastUsed -// The column USAGE_DATA is used to order the items -_LIT( KSQLGetListByLaunchDataPart2,") LEFT JOIN("); -_LIT( KSQLGetListByLaunchDataPart3,") ON ENTRY_ID = LA_ENTRY_ID \ -ORDER BY USAGE_DATA"); _LIT( KSQLGetParentIds,"SELECT DISTINCT GE_GROUP_ID FROM CA_GROUP_ENTRY \ WHERE GE_ENTRY_ID IN ( %S )" ); @@ -218,11 +199,6 @@ CA_ENTRY LEFT JOIN CA_ICON ON EN_ICON_ID = ICON_ID \ WHERE EN_ICON_ID = :EN_ICON_ID"); -_LIT( KSQLGetMostUsed,"SELECT LA_ENTRY_ID, COUNT(*) AS USAGE_DATA FROM \ -CA_LAUNCH GROUP BY LA_ENTRY_ID" ); - -_LIT( KSQLGetLastUsed,"SELECT LA_ENTRY_ID, MAX(LA_LAUNCH_TIME) \ -AS USAGE_DATA FROM CA_LAUNCH GROUP BY LA_ENTRY_ID" ); _LIT( KSQLGetProperty, "SELECT DB_VALUE FROM CA_DB_PROPERTIES WHERE DB_PROPERTY = :DB_PROPERTY "); @@ -242,7 +218,7 @@ _LIT( KSQLOrganizeInsertToGroupPrepend,"INSERT INTO CA_GROUP_ENTRY \ (GE_GROUP_ID,GE_ENTRY_ID,GE_POSITION) \ -VALUES ( :GE_GROUP_ID, :GE_ENTRY_ID, 1 ) "); +VALUES ( :GE_GROUP_ID, :GE_ENTRY_ID, 1 ) "); //Statement to append the entry at end of table _LIT( KSQLOrganizeAppendToGroup,"INSERT INTO CA_GROUP_ENTRY \ @@ -313,10 +289,6 @@ _LIT( KSQLIcSkinId, ":IC_SKIN_ID" ); _LIT( KSQLIcAppId, ":IC_APP_ID" ); -_LIT( KSQLLaunchId, ":LAUNCH_ID" ); -_LIT( KSQLLaLaunchTime, ":LA_LAUNCH_TIME" ); -_LIT( KSQLLaLaunchEntryId, ":LA_ENTRY_ID" ); - _LIT( KSQLAttributeId, ":ATTRIBUTE_ID" ); _LIT( KSQLAttrEntryID, ":AT_ENTRY_ID" ); _LIT( KSQLAttrName, ":AT_NAME" ); @@ -362,9 +334,6 @@ _LIT( KColumnIcSkinId, "IC_SKIN_ID" ); _LIT( KColumnIcAppId, "IC_APP_ID" ); -_LIT( KColumnLaunchId, "LAUNCH_ID" ); -_LIT( KColumnLaLaunchTime, "LA_LAUNCH_TIME" ); - _LIT( KColumnAttributeId, "ATTRIBUTE_ID" ); _LIT( KColumnAttrEntryID, "AT_ENTRY_ID" ); _LIT( KColumnAttrName, "AT_NAME" ); diff -r efda7c0771b9 -r 7b66bc3c6dc9 contentstorage/castorage/inc/casqlitestorage.h --- a/contentstorage/castorage/inc/casqlitestorage.h Wed Oct 13 12:59:22 2010 +0300 +++ b/contentstorage/castorage/inc/casqlitestorage.h Mon Oct 18 10:44:15 2010 +0300 @@ -66,19 +66,13 @@ * Loads data base from rom. */ void LoadDataBaseFromRomL(); - + //from CCpStorage /** * Saves a copy of database to private. */ void SaveDatabaseL(); - //from CCpStorage - /** - * Restores a copy of database from backup to private. - */ - void RestoreDatabaseL(); - /** * Localizes one entry attribute. * @@ -92,7 +86,7 @@ * @param aLocalization localization information about entry. */ void AddLocalizationL( const CCaLocalizationEntry& aLocalization ); - + /** * Checks if entry already exists in localization table * @@ -106,9 +100,9 @@ * @param aLocalization localization information about entry. * @param aStatement SQL statement */ - void ExecuteLocalizationStatementL(const CCaLocalizationEntry& aLocalization, + void ExecuteLocalizationStatementL(const CCaLocalizationEntry& aLocalization, const TDesC& aStatement); - + /** * Fetches data from database. * @@ -141,11 +135,11 @@ * @param aEntryIdArray List of enties ids. * @param aParentIdArray The result list of parents * ids for a specific select. - * @param aCheckParentsParent falg if set to true then - * search also for parent of the parent + * @param aCheckParentsParent falg if set to true then + * search also for parent of the parent */ void GetParentsIdsL( const RArray& aEntryIdArray, - RArray& aParentIdArray, + RArray& aParentIdArray, TBool aCheckParentsParent = ETrue ); /** @@ -171,7 +165,7 @@ TCaOperationParams aParams ); /** - * Add ifno launch to db. + * Change flag used for removable entries * @param aEntryId. * @param aRemovable. */ @@ -222,6 +216,23 @@ */ CCaSqLiteStorage(); + void GetDownloadedApplicationsArrayL( + RArray& aResultArray ); + + void GetDownloadedApplicationsArrayL( + RPointerArray& aResultArray ); + + void SetDownloadedApplicationsArrayL( + RPointerArray& aResultArray ); + + /** + * Restores a copy of database from backup to private. + */ + void RestoreDatabaseL(); + + + TInt GetCollectionDownloadIdL(); + TInt CreatePrivateDirPath( TFileName& aPrivatePath, const TDesC& aDrive, const TDesC& aDbName ); @@ -237,6 +248,9 @@ void ExecuteOrganizeL( const RArray& aEntryIds, TCaOperationParams aParams ); + void ExecuteOrganizeL( const RPointerArray & aResultArray, + TCaOperationParams aParams ); + void ExecuteTouchL( const TInt aEntryId, TBool aRemovable ); void ExecuteDbPropertyL( const TDesC& aProperty, TDes& aPropertyValue ); @@ -248,8 +262,6 @@ const TInt aGroupId, RPointerArray& aSqlQuery ); - void RemoveOldEntriesFromLaunchTableL( TInt aDays ); - void VerifyOrganizeParamsL( const RArray& aEntryIds, TCaOperationParams aParams ); @@ -283,7 +295,7 @@ * Private path on C-drive. */ TFileName iPrivatePathCDrive; - + /** * Private path on C-drive for backup db. */ @@ -294,6 +306,11 @@ */ RFs iRfs; + /** + * Id of downloaded collection. + */ + TInt iCollectionDownloadId; + }; #endif //C_CASTORAGE_ENGINE_H diff -r efda7c0771b9 -r 7b66bc3c6dc9 contentstorage/castorage/inc/casqlquery.h --- a/contentstorage/castorage/inc/casqlquery.h Wed Oct 13 12:59:22 2010 +0300 +++ b/contentstorage/castorage/inc/casqlquery.h Mon Oct 18 10:44:15 2010 +0300 @@ -60,8 +60,7 @@ EAttributeTable, EGroupTable, EGroupTableRemove, - EGroupTableInsert, - ELaunchTable + EGroupTableInsert }; /** @@ -211,13 +210,11 @@ const CCaEntryAttribute* aAttr ); /** - * Binds values for a launch operation. + * Binds values for a touch operation. * * @param aEntryId The entry id to bind. - * @param aLaunchTime the launch time to bind. */ - void BindValuesForLaunchL( const TInt aEntryId, - const TInt64 aLaunchTime ); + void BindValuesForTouchL( const TInt aEntryId ); /** * Binds values for a remove operation. diff -r efda7c0771b9 -r 7b66bc3c6dc9 contentstorage/castorage/inc/casqlquerycreator.h --- a/contentstorage/castorage/inc/casqlquerycreator.h Wed Oct 13 12:59:22 2010 +0300 +++ b/contentstorage/castorage/inc/casqlquerycreator.h Mon Oct 18 10:44:15 2010 +0300 @@ -268,16 +268,7 @@ static void ModifyQueryForSortOrderL( const CCaInnerQuery::TSortAttribute aSortType, RBuf& aQuery, TBool aSortByGroup ); - - /** - * Modifies a given query with sort order last or most used. - * - * @param aSortType The sort order type. - * @param aQuery the query where the sort order will be included. - */ - static void ModifyQueryForSortOrderLastMostUsedL( - const CCaInnerQuery::TSortAttribute aSortType, RBuf& aQuery ); - + /** * Check if icon is set proper in CCaInnerEntry. * diff -r efda7c0771b9 -r 7b66bc3c6dc9 contentstorage/castorage/inc/castorage.h --- a/contentstorage/castorage/inc/castorage.h Wed Oct 13 12:59:22 2010 +0300 +++ b/contentstorage/castorage/inc/castorage.h Mon Oct 18 10:44:15 2010 +0300 @@ -45,7 +45,7 @@ * @param aLocalization localization information about entry. */ virtual void AddLocalizationL( const CCaLocalizationEntry& aLocalization ) = 0; - + /** * Fetches data from database * @@ -79,11 +79,11 @@ * @param aEntryIdArray list of enties ids. * @param aParentIdArray The result list of parents' ids * for a specific select. - * @param aCheckParentsParent flag if set to true then - * search also for parent of the parent + * @param aCheckParentsParent flag if set to true then + * search also for parent of the parent */ virtual void GetParentsIdsL( const RArray& aEntryIdArray, - RArray& aParentIdArray, + RArray& aParentIdArray, TBool aCheckParentsParent = ETrue ) = 0; /** @@ -149,17 +149,11 @@ virtual void CustomSortL( const RArray& aEntryIds, const TInt aGroupId ) = 0; - - /** - * Saves a copy of database to private. - */ - virtual void RestoreDatabaseL() = 0; - /** * Saves a copy of database to private. */ virtual void SaveDatabaseL() = 0; - + /** * Loads data base from rom. */ diff -r efda7c0771b9 -r 7b66bc3c6dc9 contentstorage/castorage/src/casqlitestorage.cpp --- a/contentstorage/castorage/src/casqlitestorage.cpp Wed Oct 13 12:59:22 2010 +0300 +++ b/contentstorage/castorage/src/casqlitestorage.cpp Mon Oct 18 10:44:15 2010 +0300 @@ -44,18 +44,15 @@ { User::LeaveIfError( iRfs.Connect() ); - User::LeaveIfError( CreatePrivateDirPath( iPrivatePathCDriveDb, KCDrive, - KDbName ) ); - - User::LeaveIfError( CreatePrivateDirPath( iPrivatePathZDriveDb, KZDrive, - KDbName ) ); - - User::LeaveIfError( CreatePrivateDirPath( iPrivatePathCDrive, KCDrive, - KNullDesC ) ); - - User::LeaveIfError( CreatePrivateDirPath( iPrivatePathCDriveDbBackup, KCDrive, - KDbNameBackup ) ); - + User::LeaveIfError( + CreatePrivateDirPath( iPrivatePathCDriveDb, KCDrive, KDbName ) ); + User::LeaveIfError( + CreatePrivateDirPath( iPrivatePathZDriveDb, KZDrive, KDbName ) ); + User::LeaveIfError( + CreatePrivateDirPath( iPrivatePathCDrive, KCDrive, KNullDesC ) ); + User::LeaveIfError( + CreatePrivateDirPath( + iPrivatePathCDriveDbBackup, KCDrive, KDbNameBackup ) ); if( iSqlDb.Open( iPrivatePathCDriveDb, &KSqlDbConfig ) ) { @@ -65,8 +62,8 @@ else { TBuf versionValue; - DbPropertyL(KCaDbPropVersion, versionValue); - ASSERT(versionValue.Length()>0); + DbPropertyL( KCaDbPropVersion, versionValue ); + ASSERT( versionValue.Length() > 0 ); if( versionValue.CompareC( KCaDbVersion ) ) { // database loaded from C: is obsolete, load from Z: @@ -74,6 +71,141 @@ LoadDataBaseFromRomL(); } } + TBuf restoreValue; + DbPropertyL( KCaDbPropRestore, restoreValue ); + if( restoreValue.CompareC( KCaDbPropRestoreVal ) == KErrNone ) + { + RestoreDatabaseL(); + } + } + +// --------------------------------------------------------------------------- +// CCASqLiteStorage::GetDownloadedApplicationsArrayL() +// +// --------------------------------------------------------------------------- +// +void CCaSqLiteStorage::GetDownloadedApplicationsArrayL( + RPointerArray& aResultArray ) +{ + iCollectionDownloadId = GetCollectionDownloadIdL(); + CCaInnerQuery* downloadedQuery = CCaInnerQuery::NewLC(); + downloadedQuery->SetParentId( iCollectionDownloadId ); + GetEntriesL( downloadedQuery, aResultArray ); + CleanupStack::PopAndDestroy( downloadedQuery ); +} + +// --------------------------------------------------------------------------- +// CCASqLiteStorage::GetDownloadedApplicationsArrayL() +// +// --------------------------------------------------------------------------- +// +void CCaSqLiteStorage::GetDownloadedApplicationsArrayL( + RArray& aResultArray ) +{ + iCollectionDownloadId = GetCollectionDownloadIdL(); + CCaInnerQuery* downloadedQuery = CCaInnerQuery::NewLC(); + downloadedQuery->SetParentId( iCollectionDownloadId ); + GetEntriesIdsL( downloadedQuery, aResultArray ); + CleanupStack::PopAndDestroy( downloadedQuery ); +} + +// --------------------------------------------------------------------------- +// CCASqLiteStorage::RestoreDownloadedApplications() +// +// --------------------------------------------------------------------------- +// +void CCaSqLiteStorage::SetDownloadedApplicationsArrayL( + RPointerArray& aResultArray ) +{ + //remove all entries from downloaded collection + RArray entryIds; + CleanupClosePushL( entryIds ); + GetDownloadedApplicationsArrayL( entryIds ); + + TCaOperationParams params; + params.iOperationType = TCaOperationParams::ERemove; + params.iGroupId = iCollectionDownloadId; + params.iBeforeEntryId = 0; // Not Used + ExecuteOrganizeL( entryIds, params ); + CleanupStack::PopAndDestroy( &entryIds ); + + //get current downloaded applications list + for( TInt i = aResultArray.Count() - 1; i >= 0; i-- ) + { + CCaInnerQuery* downloadedQuery = CCaInnerQuery::NewLC(); + RArray entryIds; + CleanupClosePushL( entryIds ); + entryIds.AppendL( aResultArray[i]->GetId() ); + downloadedQuery->SetIdsL( entryIds ); + + RArray resultEntryIds; + CleanupClosePushL( resultEntryIds ); + GetEntriesIdsL( downloadedQuery, resultEntryIds ); + if( !resultEntryIds.Count() ) + { + //its in case of application that was installed after backup + aResultArray[i]->SetId(0); + } + //there could be some icon added to db aster backup + //( after update or installation of applicatiotion ) + aResultArray[i]->SetIconId(0); + + CleanupStack::PopAndDestroy( &resultEntryIds ); + CleanupStack::PopAndDestroy( &entryIds ); + CleanupStack::PopAndDestroy( downloadedQuery ); + } + + //add applications to downloaded collection + for( TInt i = 0; i < aResultArray.Count(); i++ ) + { + AddL( aResultArray[i] ); + } + params.iOperationType = TCaOperationParams::EAppend; + ExecuteOrganizeL( aResultArray, params ); +} + +// --------------------------------------------------------- +// +// --------------------------------------------------------- +// +void CCaSqLiteStorage::ExecuteOrganizeL( + const RPointerArray & aResultArray, + TCaOperationParams params) +{ + RArray restoredEntryIds; + CleanupClosePushL(restoredEntryIds); + for( TInt i = 0; i < aResultArray.Count(); i++ ) + { + restoredEntryIds.AppendL( aResultArray[i]->GetId() ); + } + ExecuteOrganizeL( restoredEntryIds, params ); + CleanupStack::PopAndDestroy( &restoredEntryIds ); +} + +// --------------------------------------------------------- +// +// --------------------------------------------------------- +// +TInt CCaSqLiteStorage::GetCollectionDownloadIdL() + { + TInt downloadId( KErrNotFound ); + RPointerArray resultArray; + CleanupResetAndDestroyPushL( resultArray ); + CCaInnerQuery* allAppQuery = CCaInnerQuery::NewLC(); + CDesC16ArrayFlat* appType = + new ( ELeave ) CDesC16ArrayFlat( KGranularityOne ); + CleanupStack::PushL( appType ); + appType->AppendL( KCaTypeCollectionDownload ); + allAppQuery->SetEntryTypeNames( appType ); + CleanupStack::Pop( appType ); + GetEntriesL( allAppQuery, resultArray ); + CleanupStack::PopAndDestroy( allAppQuery ); + if( resultArray.Count() ) + { + downloadId = resultArray[0]->GetId(); + } + CleanupStack::PopAndDestroy( &resultArray ); + return downloadId; } // --------------------------------------------------------------------------- @@ -111,7 +243,7 @@ } // --------------------------------------------------------------------------- -// +// // // --------------------------------------------------------------------------- // @@ -120,28 +252,39 @@ if( ( BaflUtils::FileExists( iRfs, iPrivatePathCDriveDb ) ) ) { iSqlDb.Close(); - User::LeaveIfError( BaflUtils::CopyFile( iRfs, - iPrivatePathCDriveDb, iPrivatePathCDriveDbBackup ) ); - User::LeaveIfError( iSqlDb.Open( iPrivatePathCDriveDb, - &KSqlDbConfig ) ); + User::LeaveIfError( BaflUtils::CopyFile( + iRfs, iPrivatePathCDriveDb, iPrivatePathCDriveDbBackup ) ); + User::LeaveIfError( iSqlDb.Open( + iPrivatePathCDriveDb, &KSqlDbConfig ) ); } } // --------------------------------------------------------------------------- -// +// // // --------------------------------------------------------------------------- // void CCaSqLiteStorage::RestoreDatabaseL() { - if( ( BaflUtils::FileExists( iRfs, iPrivatePathCDriveDbBackup ) ) ) + if( BaflUtils::FileExists( iRfs, iPrivatePathCDriveDbBackup ) ) { + RPointerArray resultArray; + CleanupResetAndDestroyPushL( resultArray ); + //get current downloaded applications list + GetDownloadedApplicationsArrayL( resultArray ); + iSqlDb.Close(); - User::LeaveIfError( BaflUtils::CopyFile( iRfs, - iPrivatePathCDriveDbBackup, iPrivatePathCDriveDb ) ); - User::LeaveIfError( iSqlDb.Open( iPrivatePathCDriveDb, - &KSqlDbConfig ) ); + User::LeaveIfError( BaflUtils::CopyFile( + iRfs, iPrivatePathCDriveDbBackup, iPrivatePathCDriveDb ) ); + User::LeaveIfError( iSqlDb.Open( + iPrivatePathCDriveDb, &KSqlDbConfig ) ); + + //set current downloaded applications list to backuped + //downloaded collection + SetDownloadedApplicationsArrayL( resultArray ); + CleanupStack::PopAndDestroy( &resultArray ); } + SetDBPropertyL( KCaDbPropRestore, KCaDbPropNoRestoreVal ); } // --------------------------------------------------------------------------- @@ -236,7 +379,7 @@ CCaSqlQuery::EAttribute ); CleanupStack::PopAndDestroy( sqlGetAttributesQuery ); } - + // set entries if proper order if they were fetched by ids if( aQuery->GetIds().Count() > 0 ) { @@ -392,7 +535,7 @@ // // --------------------------------------------------------------------------- // -void CCaSqLiteStorage::AddL( CCaInnerEntry* aEntry, TBool aUpdate) +void CCaSqLiteStorage::AddL( CCaInnerEntry* aEntry, TBool aUpdate ) { RPointerArray sqlQueries; CleanupResetAndDestroyPushL( sqlQueries ); @@ -536,14 +679,14 @@ { entryIds.AppendL(aEntryIds[j]); } - + RArray oldIds; CleanupClosePushL( oldIds ); CCaInnerQuery* innerQuery = CCaInnerQuery::NewLC(); innerQuery->SetParentId( aGroupId ); - + GetEntriesIdsL( innerQuery, oldIds ); - + if( oldIds.Count() != entryIds.Count() ) { for( TInt i=0; i constEntryIds( entryIds ); - + RPointerArray sqlQueries; - CleanupResetAndDestroyPushL( sqlQueries ); + CleanupResetAndDestroyPushL( sqlQueries ); CaSqlQueryCreator::CreateCustomSortQueryL( constEntryIds, sqlQueries, iSqlDb ); @@ -695,7 +838,7 @@ aSqlQuery[i]->CloseStatement(); isAttributeDeleted = ETrue; } - else if( aSqlQuery[i]->Type()==CCaSqlQuery::EAttributeTable ) + else if( aSqlQuery[i]->Type() == CCaSqlQuery::EAttributeTable ) { // add new attribute(s) if it's neccesery aSqlQuery[i]->PrepareL(); @@ -834,13 +977,10 @@ CaSqlQueryCreator::CreateTouchQueryL( sqlQuery, iSqlDb, aRemovable ); - TTime time; - time.UniversalTime(); - for( TInt i = 0; i < sqlQuery.Count(); i++ ) { sqlQuery[i]->PrepareL(); - sqlQuery[i]->BindValuesForLaunchL( aEntryId, time.Int64() ); + sqlQuery[i]->BindValuesForTouchL( aEntryId ); sqlQuery[i]->ExecuteL(); sqlQuery[i]->CloseStatement(); } @@ -882,27 +1022,6 @@ CleanupStack::PopAndDestroy( sqlQuery ); } - -// --------------------------------------------------------------------------- -// CCASqLiteStorage::RemoveOldEntriesFromLaunchTableL( TInt aDays ) -// -// --------------------------------------------------------------------------- -// -void CCaSqLiteStorage::RemoveOldEntriesFromLaunchTableL( TInt aDays ) - { - TTime presentTime; - presentTime.UniversalTime(); - TTime borderTime = presentTime - ( TTimeIntervalDays( aDays ) ); - - CCaSqlQuery* sqlQuery = CCaSqlQuery::NewLC( iSqlDb ); - sqlQuery->SetQueryL( KSQLDeleteOldFromLaunch ); - sqlQuery->PrepareL(); - sqlQuery->BindValuesForLaunchL( 0, borderTime.Int64() ); - sqlQuery->ExecuteL(); - - CleanupStack::PopAndDestroy( sqlQuery ); - } - // --------------------------------------------------------------------------- // CCASqLiteStorage::VerifyOrganizeParamsL( const RArray& aEntryIds, // TCaOperationParams aParams); @@ -925,6 +1044,7 @@ TInt dbEntryCount; query->ExecuteL( dbEntryCount ); query->CloseStatement(); + if( dbEntryCount < aEntryIds.Count() ) { User::Leave( KErrArgument ); diff -r efda7c0771b9 -r 7b66bc3c6dc9 contentstorage/castorage/src/casqlquery.cpp --- a/contentstorage/castorage/src/casqlquery.cpp Wed Oct 13 12:59:22 2010 +0300 +++ b/contentstorage/castorage/src/casqlquery.cpp Mon Oct 18 10:44:15 2010 +0300 @@ -250,18 +250,11 @@ // // --------------------------------------------------------------------------- // -void CCaSqlQuery::BindValuesForLaunchL( const TInt aEntryId, - const TInt64 aLaunchTime ) +void CCaSqlQuery::BindValuesForTouchL( const TInt aEntryId ) { - if( iQuery.Find( KSQLLaLaunchEntryId ) != KErrNotFound ) + if( iQuery.Find( KSQLEntryId ) != KErrNotFound ) { - BindIntL( iStatement.ParameterIndex( - KSQLLaLaunchEntryId ), aEntryId ); - } - if( iQuery.Find( KSQLLaLaunchTime ) != KErrNotFound ) - { - BindInt64L( iStatement.ParameterIndex( - KSQLLaLaunchTime ), aLaunchTime ); + BindIntL( iStatement.ParameterIndex( KSQLEntryId ), aEntryId ); } if( iQuery.Find( KSQLEnFlags ) != KErrNotFound ) { diff -r efda7c0771b9 -r 7b66bc3c6dc9 contentstorage/castorage/src/casqlquerycreator.cpp --- a/contentstorage/castorage/src/casqlquerycreator.cpp Wed Oct 13 12:59:22 2010 +0300 +++ b/contentstorage/castorage/src/casqlquerycreator.cpp Mon Oct 18 10:44:15 2010 +0300 @@ -519,11 +519,6 @@ DEBUG(("_CA_:CASqlQueryCreator::CreateRemoveQueryL")); CCaSqlQuery* query = CCaSqlQuery::NewLC( aSqlDb ); - query->SetQueryL( KSQLDeleteLaunch ); - aSqlQuery.Append( query ); - CleanupStack::Pop( query ); - - query = CCaSqlQuery::NewLC( aSqlDb ); query->SetQueryL( KSQLDeleteEntryFromGroup ); aSqlQuery.Append( query ); CleanupStack::Pop( query ); @@ -559,14 +554,10 @@ TBool aRemovable ) { DEBUG(("_CA_:CASqlQueryCreator::CreateTouchQueryL")); - - CCaSqlQuery* query = CCaSqlQuery::NewLC( aSqlDb ); - query->SetQueryL( KSQLInsertToLaunch ); - aSqlQuery.Append( query ); - CleanupStack::Pop( query ); + if( aRemovable ) { - query = CCaSqlQuery::NewLC( aSqlDb ); + CCaSqlQuery* query = CCaSqlQuery::NewLC( aSqlDb ); query->SetQueryL( KSQLUpdateEntryUsedFlag ); aSqlQuery.Append( query ); CleanupStack::Pop( query ); @@ -931,14 +922,6 @@ aQuery.Append( KSQLSortOrderCreatedTimestampDesc ); break; } - case CCaInnerQuery::MostUsed: - case CCaInnerQuery::MostUsedDesc: - case CCaInnerQuery::LastUsed: - case CCaInnerQuery::LastUsedDesc: - { - ModifyQueryForSortOrderLastMostUsedL( aSortType, aQuery ); - break; - } case CCaInnerQuery::DefaultDesc: { if( aSortByGroup ) @@ -979,61 +962,6 @@ // // --------------------------------------------------------------------------- // -void CaSqlQueryCreator::ModifyQueryForSortOrderLastMostUsedL( - const CCaInnerQuery::TSortAttribute aSortType, RBuf& aQuery ) - { - DEBUG(("_CA_:CASqlQueryCreator::ModifyQueryForSortOrderLastMostUsedL")); - - RBuf descPart; - descPart.CleanupClosePushL(); - if( aSortType == CCaInnerQuery::MostUsedDesc || - aSortType == CCaInnerQuery::LastUsedDesc ) - { - descPart.CreateL( KDesc ); - } - else - { - descPart.CreateL( KNullDesC ); - } - - RBuf usageDataQuery; - usageDataQuery.CleanupClosePushL(); - if( aSortType == CCaInnerQuery::MostUsed || - aSortType == CCaInnerQuery::MostUsedDesc ) - { - usageDataQuery.CreateL( KSQLGetMostUsed ); - } - else - { - usageDataQuery.CreateL( KSQLGetLastUsed ); - } - - RBuf newQuery; - newQuery.CleanupClosePushL(); - newQuery.CreateL( KSQLGetListByLaunchDataPart1().Length() + - KSQLGetListByLaunchDataPart1().Length() + - KSQLGetListByLaunchDataPart3().Length() + - usageDataQuery.Length() + - descPart.Length() + - aQuery.Length() ); - newQuery.Append( KSQLGetListByLaunchDataPart1 ); - newQuery.Append( aQuery ); - newQuery.Append( KSQLGetListByLaunchDataPart2 ); - newQuery.Append( usageDataQuery ); - newQuery.Append( KSQLGetListByLaunchDataPart3 ); - newQuery.Append( descPart ); - aQuery.Close(); - aQuery.CreateL( newQuery ); - - CleanupStack::PopAndDestroy( &newQuery ); - CleanupStack::PopAndDestroy( &usageDataQuery ); - CleanupStack::PopAndDestroy( &descPart ); - } - -// --------------------------------------------------------------------------- -// -// --------------------------------------------------------------------------- -// TBool CaSqlQueryCreator::CreateOrganizeQueryL( const RArray& aEntryIds, TCaOperationParams aParams, RSqlDatabase& aSqlDb, RPointerArray& aSqlQueries ) diff -r efda7c0771b9 -r 7b66bc3c6dc9 contentstorage/cautils/inc/cainnerentry.h --- a/contentstorage/cautils/inc/cainnerentry.h Wed Oct 13 12:59:22 2010 +0300 +++ b/contentstorage/cautils/inc/cainnerentry.h Mon Oct 18 10:44:15 2010 +0300 @@ -114,6 +114,12 @@ */ IMPORT_C TInt GetIconId() const; + /** + * Get entry array of parent ids. + * @return Array of parent ids. + */ + IMPORT_C const RArray& GetParentIds() const; + // SETTERS /** * Sets entry id. @@ -201,6 +207,12 @@ * @param aIconId Icon id. */ IMPORT_C void SetIconId( TInt aIconId ); + + /** + * Sets the parent ids to entry. + * @param aArray The array of parent ids. + */ + IMPORT_C void SetParentIdsL( const RArray& aArray ); /** * Externalizes object to the stream @@ -288,7 +300,10 @@ TBool iDescriptionLocalized; - + /* + * Parent ids of entry. Own. + */ + RArray iParentIds; }; #endif // __CAINNERENTRY_H__ diff -r efda7c0771b9 -r 7b66bc3c6dc9 contentstorage/cautils/inc/cainnerquery.h --- a/contentstorage/cautils/inc/cainnerquery.h Wed Oct 13 12:59:22 2010 +0300 +++ b/contentstorage/cautils/inc/cainnerquery.h Mon Oct 18 10:44:15 2010 +0300 @@ -40,10 +40,6 @@ NameDesc, CreatedTimestamp, CreatedTimestampDesc, - MostUsed, - MostUsedDesc, - LastUsed, - LastUsedDesc, Default, // default - return items in custom order DefaultDesc }; diff -r efda7c0771b9 -r 7b66bc3c6dc9 contentstorage/cautils/src/cainnerentry.cpp --- a/contentstorage/cautils/src/cainnerentry.cpp Wed Oct 13 12:59:22 2010 +0300 +++ b/contentstorage/cautils/src/cainnerentry.cpp Mon Oct 18 10:44:15 2010 +0300 @@ -76,6 +76,11 @@ aStream.WriteUint32L( iDescriptionLocalized ); iAttributes.ExternalizeL( aStream ); iIcon->ExternalizeL( aStream ); + aStream.WriteUint32L( iParentIds.Count() ); + for( TInt i = 0; i < iParentIds.Count(); i++ ) + { + aStream.WriteInt32L( iParentIds[i] ); + } aStream.CommitL(); } @@ -105,6 +110,12 @@ iDescriptionLocalized = aStream.ReadUint32L(); iAttributes.InternalizeL( aStream ); iIcon->InternalizeL( aStream ); + iParentIds.Close(); + TInt count = aStream.ReadUint32L(); + for( TInt i = 0; i < count; i++ ) + { + iParentIds.AppendL( aStream.ReadInt32L() ); + } } // --------------------------------------------------------------------------- @@ -215,6 +226,16 @@ { return iIcon->Id(); } + +// --------------------------------------------------------------------------- +// +// --------------------------------------------------------------------------- +// +EXPORT_C const RArray& CCaInnerEntry::GetParentIds() const + { + return iParentIds; + } + // SETTERS // --------------------------------------------------------------------------- @@ -358,6 +379,18 @@ // // --------------------------------------------------------------------------- // +EXPORT_C void CCaInnerEntry::SetParentIdsL( const RArray& aArray ) + { + for( TInt i( 0 ); i < aArray.Count(); ++i ) + { + iParentIds.AppendL( aArray[i] ); + } + } + +// --------------------------------------------------------------------------- +// +// --------------------------------------------------------------------------- +// EXPORT_C TBool CCaInnerEntry::isLocalized(TLocalizedType aLocalized) const { if(aLocalized == EDescriptionLocalized) diff -r efda7c0771b9 -r 7b66bc3c6dc9 contentstorage/eabi/camenuu.def --- a/contentstorage/eabi/camenuu.def Wed Oct 13 12:59:22 2010 +0300 +++ b/contentstorage/eabi/camenuu.def Mon Oct 18 10:44:15 2010 +0300 @@ -26,5 +26,4 @@ _ZN16CCaSrvMmcHistory4NewLEv @ 25 NONAME _ZN15CCaStorageProxy16AddLocalizationLERK20CCaLocalizationEntry @ 26 NONAME _ZN15CCaStorageProxy13SaveDatabaseLEv @ 27 NONAME - _ZN15CCaStorageProxy16RestoreDatabaseLEv @ 28 NONAME diff -r efda7c0771b9 -r 7b66bc3c6dc9 contentstorage/eabi/cautilsu.def --- a/contentstorage/eabi/cautilsu.def Wed Oct 13 12:59:22 2010 +0300 +++ b/contentstorage/eabi/cautilsu.def Mon Oct 18 10:44:15 2010 +0300 @@ -102,4 +102,6 @@ _ZNK22CCaInnerNotifierFilter12GetTypeNamesEv @ 101 NONAME _ZNK22CCaInnerNotifierFilter15GetNotifierTypeEv @ 102 NONAME _ZNK22CCaInnerNotifierFilter6GetIdsEv @ 103 NONAME + _ZN13CCaInnerEntry13SetParentIdsLERK6RArrayIiE @ 104 NONAME + _ZNK13CCaInnerEntry12GetParentIdsEv @ 105 NONAME diff -r efda7c0771b9 -r 7b66bc3c6dc9 contentstorage/inc/cadef.h --- a/contentstorage/inc/cadef.h Wed Oct 13 12:59:22 2010 +0300 +++ b/contentstorage/inc/cadef.h Mon Oct 18 10:44:15 2010 +0300 @@ -12,7 +12,7 @@ * Contributors: * * Description: Definition of different constants - * Version : %version: 10.1.30 % << Don't touch! Updated by Synergy at check-out. + * Version : %version: 10.1.31 % << Don't touch! Updated by Synergy at check-out. * */ @@ -151,7 +151,7 @@ const TUid KCWRTApplicationTypeUid = { - 0x10282821 + 0x10282821 }; const TInt KCenRepBufferSize = 255; @@ -184,7 +184,9 @@ _LIT( KCaDbPropLanguage, "Language" ); // language of ca strings in db _LIT( KCaDbPropQMfile, "QMfile" ); // prefix of qm file used in translation - +_LIT( KCaDbPropRestore, "Restore" ); // restore db property +_LIT( KCaDbPropRestoreVal, "RestoreVal" ); // restore db property val +_LIT( KCaDbPropNoRestoreVal, "NoRestoreVal" ); // no restore db property val _LIT(KComma, ","); // Prefix hex format diff -r efda7c0771b9 -r 7b66bc3c6dc9 contentstorage/srvinc/castorageproxy.h --- a/contentstorage/srvinc/castorageproxy.h Wed Oct 13 12:59:22 2010 +0300 +++ b/contentstorage/srvinc/castorageproxy.h Mon Oct 18 10:44:15 2010 +0300 @@ -69,7 +69,7 @@ * @param aLocalization entry containing localization row to be added */ IMPORT_C void AddLocalizationL(const CCaLocalizationEntry& aLocalization); - + /** * Fetches localization data from database * @@ -154,18 +154,12 @@ IMPORT_C void CustomSortL( const RArray& aEntryIds, const TInt aGroupId ); - + /** * Saves a copy of database to private. */ IMPORT_C void SaveDatabaseL(); - - /** - * Marks db to be restored from backup by next restart - */ - IMPORT_C void RestoreDatabaseL(); - - + /** * Loads data base from rom. */ @@ -196,14 +190,21 @@ * C++ default constructor. */ CCaStorageProxy(); - + CCaLocalizationEntry* LocalizeTextL( CCaInnerEntry* aEntry ); - + CCaLocalizationEntry* LocalizeDescriptionL( CCaInnerEntry* aEntry ); - + void AddTitleNameL( CCaInnerEntry* aEntry ); TBool InitializeTranslatorL( const TDesC& aQmFilename ); + + /** + * Executes touch specific actions on storage. + * Should be called when e.g. entry is clicked. + * @param aEntry entry to be touched + */ + void PrivateTouchL( CCaInnerEntry* aEntry ); private: //Data @@ -224,7 +225,7 @@ RBuf iTitleUserColName; CA_STORAGE_TEST_FRIEND_CLASS( TestCaClient ) - + }; #endif //CASTORAGEPROXY_H diff -r efda7c0771b9 -r 7b66bc3c6dc9 contentstorage/srvsrc/cabackupnotifier.cpp --- a/contentstorage/srvsrc/cabackupnotifier.cpp Wed Oct 13 12:59:22 2010 +0300 +++ b/contentstorage/srvsrc/cabackupnotifier.cpp Mon Oct 18 10:44:15 2010 +0300 @@ -93,13 +93,13 @@ { TInt backupStateValue = 0; iProperty.Get(backupStateValue); - // Resubscribe before dealing with the current notification + // Resubscribe before dealing with the current notification iProperty.Subscribe(iStatus); SetActive(); conn::TBURPartType type = static_cast< conn::TBURPartType > ( backupStateValue & conn::KBURPartTypeMask ); - + if( type == conn::EBURRestoreFull || type == conn::EBURRestorePartial ) { // restore starting @@ -111,11 +111,13 @@ iStorageProxy->SaveDatabaseL(); iLastState = ECaBackup; } - else if( ( type == conn::EBURNormal || type == conn::EBURUnset ) && iLastState == ECaRestore ) + else if( ( type == conn::EBURNormal || type == conn::EBURUnset ) + && iLastState == ECaRestore ) { // restore ends - iStorageProxy->RestoreDatabaseL(); + iStorageProxy->SetDBPropertyL( KCaDbPropRestore, KCaDbPropRestoreVal ); } - else if( ( type == conn::EBURNormal || type == conn::EBURUnset ) && iLastState == ECaBackup ) + else if( ( type == conn::EBURNormal || type == conn::EBURUnset ) + && iLastState == ECaBackup ) { // backup ends // do nothing } diff -r efda7c0771b9 -r 7b66bc3c6dc9 contentstorage/srvsrc/cainstallnotifier.cpp --- a/contentstorage/srvsrc/cainstallnotifier.cpp Wed Oct 13 12:59:22 2010 +0300 +++ b/contentstorage/srvsrc/cainstallnotifier.cpp Mon Oct 18 10:44:15 2010 +0300 @@ -46,7 +46,8 @@ iNotificationType = aNotificationType; } -void CCaInstallNotifier::EndOperationHandler(const CSifOperationEndData& aEndData) +void CCaInstallNotifier::EndOperationHandler( + const CSifOperationEndData& aEndData ) { TRAP_IGNORE ( @@ -59,12 +60,12 @@ } void CCaInstallNotifier::ProgressOperationHandler( - const CSifOperationProgressData& /*aProgressData*/) + const CSifOperationProgressData& /*aProgressData*/ ) { } void CCaInstallNotifier::StartOperationHandler( - TUint aKey, const CSifOperationStartData& aStartData) + TUint aKey, const CSifOperationStartData& aStartData ) { TRAP_IGNORE ( diff -r efda7c0771b9 -r 7b66bc3c6dc9 contentstorage/srvsrc/castorageproxy.cpp --- a/contentstorage/srvsrc/castorageproxy.cpp Wed Oct 13 12:59:22 2010 +0300 +++ b/contentstorage/srvsrc/castorageproxy.cpp Mon Oct 18 10:44:15 2010 +0300 @@ -122,7 +122,7 @@ TChangeType changeType = EAddChangeType; RArray parentArray; CleanupClosePushL( parentArray ); - + if( aEntry->GetId() > 0 ) { changeType = EUpdateChangeType; @@ -131,7 +131,7 @@ id.AppendL( aEntry->GetId() ); if (aItemAppearanceChange == EItemUninstallProgressChanged) { - // no need to search for parent parents for uninstall + // no need to search for parent parents for uninstall // progress change iStorage->GetParentsIdsL( id, parentArray, EFalse ); } @@ -150,14 +150,14 @@ { changeType = EAddChangeType; } - + // do not update entry in db with uninstall progress if (aItemAppearanceChange != EItemUninstallProgressChanged) { RPointerArray localizations; CleanupResetAndDestroyPushL( localizations ); CCaLocalizationEntry* tempLocalization = NULL; - if( aEntry->isLocalized( CCaInnerEntry::ENameLocalized ) ) + if( aEntry->isLocalized( CCaInnerEntry::ENameLocalized ) ) { tempLocalization = LocalizeTextL( aEntry ); if( tempLocalization ) @@ -175,9 +175,9 @@ tempLocalization = NULL; } } - + iStorage->AddL( aEntry, aUpdate ); - + for( TInt j =0; j < localizations.Count(); j++ ) { localizations[j]->SetRowId( aEntry->GetId() ); @@ -189,8 +189,7 @@ } CleanupStack::PopAndDestroy( &localizations ); } - - + aEntry->SetParentIdsL( parentArray ); for( TInt i = 0; i < iHandlerNotifier.Count(); i++ ) { iHandlerNotifier[i]->EntryChanged( aEntry, changeType, parentArray ); @@ -218,6 +217,7 @@ iStorage->RemoveL( aEntryIds ); for( TInt i( 0 ); i < resultContainer.Count(); i++ ) { + resultContainer[i]->SetParentIdsL( parentArray ); for( TInt j( 0 ); j < iHandlerNotifier.Count(); j++ ) { iHandlerNotifier[j]->EntryChanged( resultContainer[i], @@ -254,63 +254,35 @@ // EXPORT_C void CCaStorageProxy::TouchL( CCaInnerEntry* aEntry ) { - CCaInnerQuery* touchQuery = CCaInnerQuery::NewLC(); - - TInt entryId = aEntry->GetId(); - - if ( entryId == 0 && aEntry->GetUid() != 0) + if( aEntry->GetId() == 0 && aEntry->GetUid() != 0 ) { - CCaInnerQuery* idQuery = CCaInnerQuery::NewLC(); - idQuery->SetUid( static_cast( aEntry->GetUid()) ); - - RArray idArray; - CleanupClosePushL( idArray ); - - iStorage->GetEntriesIdsL( idQuery, idArray ); - - if (idArray.Count() == 1 ) - { - entryId = idArray[0]; - aEntry->SetId( entryId ); - } - - CleanupStack::PopAndDestroy( &idArray ); - CleanupStack::PopAndDestroy( idQuery ); - } + CCaInnerQuery* query = CCaInnerQuery::NewLC(); + query->SetUid( static_cast( aEntry->GetUid()) ); + query->SetFlagsOn( ERemovable ); + query->SetFlagsOff( EUsed ); - RArray id; - CleanupClosePushL( id ); - id.AppendL( entryId ); - touchQuery->SetIdsL( id ); - RPointerArray resultArray; - CleanupResetAndDestroyPushL( resultArray ); - iStorage->GetEntriesL( touchQuery, resultArray ); - iStorage->TouchL( entryId, aEntry->GetFlags() & ERemovable ); - for( TInt i = 0; i < iHandlerNotifier.Count(); i++ ) - { - iHandlerNotifier[i]->EntryTouched( entryId ); - } - if( resultArray.Count() > 0 ) - { - if( !( resultArray[0]->GetFlags() & EUsed ) ) + RPointerArray resultArray; + CleanupClosePushL( resultArray ); + iStorage->GetEntriesL( query, resultArray ); + if( resultArray.Count() == 1 ) + { + PrivateTouchL( resultArray[0] ); + } + else { - RArray parentArray; - CleanupClosePushL( parentArray ); - iStorage->GetParentsIdsL( id, parentArray ); - for( TInt i = 0; i < iHandlerNotifier.Count(); i++ ) - { - resultArray[0]->SetFlags( - resultArray[0]->GetFlags() | EUsed ); - iHandlerNotifier[i]->EntryChanged( resultArray[0], - EUpdateChangeType, - parentArray ); - } - CleanupStack::PopAndDestroy( &parentArray ); + User::Leave( KErrNotFound ); } + CleanupStack::PopAndDestroy( &resultArray ); + CleanupStack::PopAndDestroy( query ); } - CleanupStack::PopAndDestroy( &resultArray ); - CleanupStack::PopAndDestroy( &id ); - CleanupStack::PopAndDestroy( touchQuery ); + else if( aEntry->GetId() > 0 ) + { + PrivateTouchL( aEntry ); + } + else + { + User::Leave( KErrArgument ); + } } // --------------------------------------------------------------------------- @@ -408,23 +380,6 @@ #pragma CTC SKIP #endif //COVERAGE_MEASUREMENT (calls another method) -EXPORT_C void CCaStorageProxy::RestoreDatabaseL() - { - iStorage->RestoreDatabaseL(); - } -#ifdef COVERAGE_MEASUREMENT -#pragma CTC ENDSKIP -#endif //COVERAGE_MEASUREMENT - - -// --------------------------------------------------------------------------- -// -// --------------------------------------------------------------------------- -// -#ifdef COVERAGE_MEASUREMENT -#pragma CTC SKIP -#endif //COVERAGE_MEASUREMENT (calls another method) - EXPORT_C void CCaStorageProxy::LoadDataBaseFromRomL() { iStorage->LoadDataBaseFromRomL(); @@ -475,13 +430,13 @@ TInt pos = title.LocateReverse( delimiter ); if ( pos > 0 && pos + 1 < textLength ) // 1 is for delimiters { - TPtrC16 logString = title.Mid( pos + 1 ); + TPtrC16 logString = title.Mid( pos + 1 ); TInt qmFileNameLength = textLength - charsToFilename - 1 - logString.Length(); TPtrC16 qmFile = title.Mid( charsToFilename, qmFileNameLength ); if ( InitializeTranslatorL( qmFile ) ) { - result = CCaLocalizationEntry::NewLC(); + result = CCaLocalizationEntry::NewLC(); HBufC* translatedString = HbTextResolverSymbian::LoadLC( logString ); if ( translatedString->Compare( logString ) ) @@ -498,7 +453,7 @@ result->SetRowId( aEntry->GetId() ? 0 : aEntry->GetId() ); // must be added when present CleanupStack::Pop( result ); } - else + else { CleanupStack::PopAndDestroy(translatedString); CleanupStack::PopAndDestroy(result); @@ -546,18 +501,18 @@ result->SetRowId( aEntry->GetId() ? 0 : aEntry->GetId() ); // must be added when present CleanupStack::Pop( result ); } - else + else { CleanupStack::PopAndDestroy( translatedString ); CleanupStack::PopAndDestroy( result ); result = NULL; } - + } } CleanupStack::PopAndDestroy( &description ); } - + return result; } @@ -595,7 +550,7 @@ TBool result = HbTextResolverSymbian::Init( aQmFilename, KLocalizationFilepathC ); if ( !result ) { - // this should not be called too often + // this should not be called too often TChar currentDriveLetter; TDriveList driveList; RFs fs; @@ -624,7 +579,7 @@ } CleanupStack::PopAndDestroy( &path ); CleanupStack::PopAndDestroy( &fs ); - + if( !result ) { result = HbTextResolverSymbian::Init( aQmFilename, KLocalizationFilepathZ ); @@ -632,3 +587,37 @@ } return result; } + +// --------------------------------------------------------- +// +// --------------------------------------------------------- +// +void CCaStorageProxy::PrivateTouchL( CCaInnerEntry* aEntry ) + { + iStorage->TouchL( aEntry->GetId(), aEntry->GetFlags() & ERemovable ); + for( TInt i = 0; i < iHandlerNotifier.Count(); i++ ) + { + iHandlerNotifier[i]->EntryTouched( aEntry->GetId() ); + } + if( !( aEntry->GetFlags() & EUsed ) && + ( aEntry->GetFlags() & ERemovable ) ) + { + RArray id; + CleanupClosePushL( id ); + id.AppendL( aEntry->GetId() ); + RArray parentArray; + CleanupClosePushL( parentArray ); + iStorage->GetParentsIdsL( id, parentArray ); + aEntry->SetParentIdsL( parentArray ); + for( TInt i = 0; i < iHandlerNotifier.Count(); i++ ) + { + aEntry->SetFlags( + aEntry->GetFlags() | EUsed ); + iHandlerNotifier[i]->EntryChanged( aEntry, + EUpdateChangeType, + parentArray ); + } + CleanupStack::PopAndDestroy( &parentArray ); + CleanupStack::PopAndDestroy( &id ); + } + } diff -r efda7c0771b9 -r 7b66bc3c6dc9 homescreensrv_plat/activity_framework_api/afactivities_global.h --- a/homescreensrv_plat/activity_framework_api/afactivities_global.h Wed Oct 13 12:59:22 2010 +0300 +++ b/homescreensrv_plat/activity_framework_api/afactivities_global.h Mon Oct 18 10:44:15 2010 +0300 @@ -19,7 +19,7 @@ #define AFACTIVITIES_GLOBAL_H #include -#include +#include #ifdef AFACTIVITIES_LIB #define AFACTIVITIES_EXPORT Q_DECL_EXPORT @@ -42,6 +42,9 @@ const char KActivityUriNameKey[] = "activityname"; const char KActivityUriBackgroundKey[] = "activityinbackground"; + + //to ensure activation reason can be used in queued connections + static const int metatypeNumber = qRegisterMetaType("Af::ActivationReason"); } Q_DECLARE_METATYPE( Af::ActivationReason ) diff -r efda7c0771b9 -r 7b66bc3c6dc9 homescreensrv_plat/activity_framework_api/tsrc/t_afactivation/inc/t_afactivation.h --- a/homescreensrv_plat/activity_framework_api/tsrc/t_afactivation/inc/t_afactivation.h Wed Oct 13 12:59:22 2010 +0300 +++ b/homescreensrv_plat/activity_framework_api/tsrc/t_afactivation/inc/t_afactivation.h Mon Oct 18 10:44:15 2010 +0300 @@ -36,8 +36,7 @@ void cleanup(); //test functions - void invokeActivationPublicInterface(); - void invokeActivationPublicInterfaceCorrupt(); + void testFailedActivityRequestSubscription(); void testDefaultValuesAfterCreation(); void testSignalIsEmittedWhenActivityIsRequested(); void testValuesChangeWhenActivityIsRequested(); diff -r efda7c0771b9 -r 7b66bc3c6dc9 homescreensrv_plat/activity_framework_api/tsrc/t_afactivation/src/t_afactivation.cpp --- a/homescreensrv_plat/activity_framework_api/tsrc/t_afactivation/src/t_afactivation.cpp Wed Oct 13 12:59:22 2010 +0300 +++ b/homescreensrv_plat/activity_framework_api/tsrc/t_afactivation/src/t_afactivation.cpp Mon Oct 18 10:44:15 2010 +0300 @@ -24,9 +24,7 @@ TestAfActivation::TestAfActivation() { - mDefaultActivityName = QString("appto://EBADC0DE?%1=TestActivity&TestParam=TestValue").arg( - Af::KActivityUriNameKey); - qRegisterMetaType ("Af::ActivationReason"); + mDefaultActivityName = QString("appto://EBADC0DE?%1=TestActivity&TestParam=TestValue").arg(Af::KActivityUriNameKey); } void TestAfActivation::init() @@ -41,101 +39,87 @@ mActivation = NULL; } -void TestAfActivation::invokeActivationPublicInterface() -{ - // AfActivation is only responsible of correct creation of AfActivationPrivate and - // forwarding requests. Since it's impossible to verify the effects of the member - // calls, just invoke the methods. - AfActivation activation; - - activation.parameters(); - activation.reason(); - activation.name(); -} - -void TestAfActivation::invokeActivationPublicInterfaceCorrupt() +void TestAfActivation::testFailedActivityRequestSubscription() { bool errorReceived = false; //af storage proxy is mocked so I can set static variable making it leave AfStorageProxy::waitFailed = true; - try - { - AfActivation *activation = new AfActivation(); - } - catch(...) - { + try { + AfActivation activation; + } catch (...) { errorReceived = true; } QVERIFY(errorReceived); - } +} - void TestAfActivation::testDefaultValuesAfterCreation() - { - QCOMPARE(mActivation->parameters(), QVariantHash()); - QCOMPARE(mActivation->reason(), Af::ActivationReasonNormal); - QCOMPARE(mActivation->name(), QString()); - } +void TestAfActivation::testDefaultValuesAfterCreation() +{ + QCOMPARE(mActivation->parameters(), QVariantHash()); + QCOMPARE(mActivation->reason(), Af::ActivationReasonNormal); + QCOMPARE(mActivation->name(), QString()); +} - void TestAfActivation::testSignalIsEmittedWhenActivityIsRequested() - { - QSignalSpy activatedSpy(mActivation, - SIGNAL(activated(Af::ActivationReason,QString,QVariantHash))); - QVERIFY(activatedSpy.isValid()); +void TestAfActivation::testSignalIsEmittedWhenActivityIsRequested() +{ + QSignalSpy activatedSpy(mActivation, + SIGNAL(activated(Af::ActivationReason,QString,QVariantHash))); + QVERIFY(activatedSpy.isValid()); - mServiceProvider->emitActivityRequested(mDefaultActivityName); + mServiceProvider->emitActivityRequested(mDefaultActivityName); - QCOMPARE(activatedSpy.count(), 1); - } + QCOMPARE(activatedSpy.count(), 1); +} - void TestAfActivation::testValuesChangeWhenActivityIsRequested() - { - QSignalSpy activatedSpy(mActivation, - SIGNAL(activated(Af::ActivationReason,QString,QVariantHash))); - QVERIFY(activatedSpy.isValid()); +void TestAfActivation::testValuesChangeWhenActivityIsRequested() +{ + QSignalSpy activatedSpy(mActivation, + SIGNAL(activated(Af::ActivationReason,QString,QVariantHash))); + QVERIFY(activatedSpy.isValid()); - mServiceProvider->emitActivityRequested(mDefaultActivityName); + mServiceProvider->emitActivityRequested(mDefaultActivityName); - QCOMPARE(activatedSpy.count(), 1); - QCOMPARE(mActivation->reason(), Af::ActivationReasonActivity); - QCOMPARE(mActivation->name(), QString("TestActivity")); - QVERIFY(mActivation->parameters().contains("TestParam")); - QCOMPARE(mActivation->parameters().value("TestParam").toString(), QString("TestValue")); - } + QCOMPARE(activatedSpy.count(), 1); + QCOMPARE(mActivation->reason(), Af::ActivationReasonActivity); + QCOMPARE(mActivation->name(), QString("TestActivity")); + QVERIFY(mActivation->parameters().contains("TestParam")); + QCOMPARE(mActivation->parameters().value("TestParam").toString(), QString("TestValue")); +} - void TestAfActivation::testValuesChangeWhenActivityIsRequestedNoName() - { - QString activityname("appto://EBADC0DE?TestParam=TestValue"); - QSignalSpy activatedSpy(mActivation, - SIGNAL(activated(Af::ActivationReason,QString,QVariantHash))); - QVERIFY(activatedSpy.isValid()); +void TestAfActivation::testValuesChangeWhenActivityIsRequestedNoName() +{ + QString activityname("appto://EBADC0DE?TestParam=TestValue"); + QSignalSpy activatedSpy(mActivation, + SIGNAL(activated(Af::ActivationReason,QString,QVariantHash))); + QVERIFY(activatedSpy.isValid()); - mServiceProvider->emitActivityRequested(activityname); - QCOMPARE(activatedSpy.count(), 1); + mServiceProvider->emitActivityRequested(activityname); + QCOMPARE(activatedSpy.count(), 1); - QCOMPARE(mActivation->reason(), Af::ActivationReasonActivity); - QCOMPARE(mActivation->name(), QString()); - QVERIFY(mActivation->parameters().contains("TestParam")); - QCOMPARE(mActivation->parameters().value("TestParam").toString(), QString("TestValue")); - } + QCOMPARE(mActivation->reason(), Af::ActivationReasonActivity); + QCOMPARE(mActivation->name(), QString()); + QVERIFY(mActivation->parameters().contains("TestParam")); + QCOMPARE(mActivation->parameters().value("TestParam").toString(), QString("TestValue")); +} - void TestAfActivation::testChangingActivityInBackground() - { - // bring to foreground is called by default - mServiceProvider->emitActivityRequested(mDefaultActivityName); +void TestAfActivation::testChangingActivityInBackground() +{ + // bring to foreground is called by default + mServiceProvider->emitActivityRequested(mDefaultActivityName); - ApplicationLauncherPrivate *launcher = ApplicationLauncherPrivate::instance; - QVERIFY(launcher); - QCOMPARE(launcher->bringToForegroundCalls.count(), 1); - launcher->bringToForegroundCalls.clear(); + ApplicationLauncherPrivate *launcher = ApplicationLauncherPrivate::instance; + QVERIFY(launcher); + QCOMPARE(launcher->bringToForegroundCalls.count(), 1); + launcher->bringToForegroundCalls.clear(); - // bring to foreground is not called if background parameter is present - mServiceProvider->emitActivityRequested( - QString("appto://EBADC0DE?%1=TestActivity&%2=").arg(Af::KActivityUriNameKey).arg( - Af::KActivityUriBackgroundKey)); + // bring to foreground is not called if background parameter is present + mServiceProvider->emitActivityRequested( + QString("appto://EBADC0DE?%1=TestActivity&%2="). + arg(Af::KActivityUriNameKey). + arg(Af::KActivityUriBackgroundKey)); - launcher = ApplicationLauncherPrivate::instance; - QVERIFY(launcher); - QCOMPARE(launcher->bringToForegroundCalls.count(), 0); - } + launcher = ApplicationLauncherPrivate::instance; + QVERIFY(launcher); + QCOMPARE(launcher->bringToForegroundCalls.count(), 0); +} - QTEST_MAIN(TestAfActivation) +QTEST_MAIN(TestAfActivation) diff -r efda7c0771b9 -r 7b66bc3c6dc9 homescreensrv_plat/contentstorage_api/inc/cadefs.h --- a/homescreensrv_plat/contentstorage_api/inc/cadefs.h Wed Oct 13 12:59:22 2010 +0300 +++ b/homescreensrv_plat/contentstorage_api/inc/cadefs.h Mon Oct 18 10:44:15 2010 +0300 @@ -40,8 +40,6 @@ { NameSortAttribute, CreatedTimestampSortAttribute, - MostUsedSortAttribute, - LastUsedSortAttribute, DefaultSortAttribute // default - return items in custom order }; diff -r efda7c0771b9 -r 7b66bc3c6dc9 homescreensrv_plat/contentstorage_api/inc/caentry.h --- a/homescreensrv_plat/contentstorage_api/inc/caentry.h Wed Oct 13 12:59:22 2010 +0300 +++ b/homescreensrv_plat/contentstorage_api/inc/caentry.h Mon Oct 18 10:44:15 2010 +0300 @@ -61,6 +61,9 @@ QString entryTypeName() const; void setEntryTypeName(const QString &entryTypeName); + QList parentIds() const; + void setParentIds(const QList &parentIds); + QMap attributes() const; QString attribute(const QString &name) const; void setAttribute(const QString &name, const QString &value); diff -r efda7c0771b9 -r 7b66bc3c6dc9 homescreensrv_plat/contentstorage_api/inc/caservice.h --- a/homescreensrv_plat/contentstorage_api/inc/caservice.h Wed Oct 13 12:59:22 2010 +0300 +++ b/homescreensrv_plat/contentstorage_api/inc/caservice.h Mon Oct 18 10:44:15 2010 +0300 @@ -100,6 +100,8 @@ CaNotifier * createNotifier(const CaNotifierFilter &filter) const; bool customSort(int groupId, QList &entryIdList) const; + + void preloadHandlers() const; ErrorCode lastError() const; diff -r efda7c0771b9 -r 7b66bc3c6dc9 homescreensrv_plat/contentstorage_api/inc/cauninstallnotifier.h --- a/homescreensrv_plat/contentstorage_api/inc/cauninstallnotifier.h Wed Oct 13 12:59:22 2010 +0300 +++ b/homescreensrv_plat/contentstorage_api/inc/cauninstallnotifier.h Mon Oct 18 10:44:15 2010 +0300 @@ -19,18 +19,25 @@ #define CAUINSTALLNOTIFIER_H #include +#include #include #include "caclient_global.h" + class CaUninstallNotifierPrivate; -class CaUninstallNotifier: public QObject +const char uninstallNotifierComponentIdKey[] = "component_id"; +const char uninstallNotifierValueOfProgressKey[] = "val_of_progress"; + +class CACLIENT_EXPORT CaUninstallNotifier: public QObject { Q_OBJECT public: static CaUninstallNotifier* notifier(); + + QVariantMap getLastNotification(); private: @@ -62,3 +69,4 @@ #endif // CAUINSTALLNOTIFIER_H + diff -r efda7c0771b9 -r 7b66bc3c6dc9 homescreensrv_plat/contentstorage_api/tsrc/t_contentstorage_api/data/castorage.db Binary file homescreensrv_plat/contentstorage_api/tsrc/t_contentstorage_api/data/castorage.db has changed diff -r efda7c0771b9 -r 7b66bc3c6dc9 homescreensrv_plat/taskswitcher_api/taskswitcher_api.pri --- a/homescreensrv_plat/taskswitcher_api/taskswitcher_api.pri Wed Oct 13 12:59:22 2010 +0300 +++ b/homescreensrv_plat/taskswitcher_api/taskswitcher_api.pri Mon Oct 18 10:44:15 2010 +0300 @@ -19,7 +19,7 @@ taskswitcher_api/tspropertydefs.h \ symbian { - crml.sources = tsdevicedialog.qcrml + crml.sources = $$PWD/tsdevicedialog.qcrml crml.path = /resource/qt/crml DEPLOYMENT += crml } diff -r efda7c0771b9 -r 7b66bc3c6dc9 homescreensrv_plat/taskswitcher_api/tsrc/t_tstasksettings/src/t_tstasksettings.cpp --- a/homescreensrv_plat/taskswitcher_api/tsrc/t_tstasksettings/src/t_tstasksettings.cpp Wed Oct 13 12:59:22 2010 +0300 +++ b/homescreensrv_plat/taskswitcher_api/tsrc/t_tstasksettings/src/t_tstasksettings.cpp Mon Oct 18 10:44:15 2010 +0300 @@ -151,7 +151,7 @@ } // hide unit test task - mTaskSettings.setVisibility(false); + QVERIFY(mTaskSettings.setVisibility(false)); QVERIFY(TsTestUtils::waitForSignal(&mTaskMonitor, SIGNAL(taskListChanged()))); { QSharedPointer myTask = unitTestTask(); diff -r efda7c0771b9 -r 7b66bc3c6dc9 hsappkeyhandler/src/hsappkeyplugin.cpp --- a/hsappkeyhandler/src/hsappkeyplugin.cpp Wed Oct 13 12:59:22 2010 +0300 +++ b/hsappkeyhandler/src/hsappkeyplugin.cpp Mon Oct 18 10:44:15 2010 +0300 @@ -29,6 +29,7 @@ _LIT( KHsActivactionUri, "appto://20022F35?activityname=HsIdleView" ); _LIT( KAppLibActivactionUri, "appto://20022F35?activityname=AppLibMainView" ); +_LIT( KHsHomeKeyPressedOnBackground, "appto://20022F35?activityname=HsHomeKeyPressedOnBackground" ); _LIT( KTsPluginName, "com.nokia.taskswitcher.tsdevicedialogplugin/1.0" ); @@ -157,10 +158,14 @@ { activityEnabler->launchActivityL( KAppLibActivactionUri ); } - else + else if ( (state & EHomeScreenApplicationBackground) == EHomeScreenApplicationBackground) + { + activityEnabler->launchActivityL( KHsHomeKeyPressedOnBackground ); + } + else { activityEnabler->launchActivityL( KHsActivactionUri ); - } + } CleanupStack::PopAndDestroy( activityEnabler ); CleanupStack::PopAndDestroy( &apaLsSession ); } diff -r efda7c0771b9 -r 7b66bc3c6dc9 rom/homescreensrv_core.iby --- a/rom/homescreensrv_core.iby Wed Oct 13 12:59:22 2010 +0300 +++ b/rom/homescreensrv_core.iby Mon Oct 18 10:44:15 2010 +0300 @@ -24,15 +24,12 @@ // ---- contentstorage -------------------------------------------- file=ABI_DIR\BUILD_DIR\caapphandlerplugin.dll SHARED_LIB_DIR\caapphandlerplugin.dll data=\epoc32\data\z\resource\qt\plugins\commandhandler\caapphandlerplugin.qtplugin resource\qt\plugins\commandhandler\caapphandlerplugin.qtplugin -data=\epoc32\data\z\resource\qt\plugins\commandhandler\caapphandlerplugin.xml resource\qt\plugins\commandhandler\caapphandlerplugin.xml file=ABI_DIR\BUILD_DIR\catapphandlerplugin.dll SHARED_LIB_DIR\catapphandlerplugin.dll data=\epoc32\data\z\resource\qt\plugins\commandhandler\catapphandlerplugin.qtplugin resource\qt\plugins\commandhandler\catapphandlerplugin.qtplugin -data=\epoc32\data\z\resource\qt\plugins\commandhandler\catapphandlerplugin.xml resource\qt\plugins\commandhandler\catapphandlerplugin.xml file=ABI_DIR\BUILD_DIR\caurlhandlerplugin.dll SHARED_LIB_DIR\caurlhandlerplugin.dll data=\epoc32\data\z\resource\qt\plugins\commandhandler\caurlhandlerplugin.qtplugin resource\qt\plugins\commandhandler\caurlhandlerplugin.qtplugin -data=\epoc32\data\z\resource\qt\plugins\commandhandler\caurlhandlerplugin.xml resource\qt\plugins\commandhandler\caurlhandlerplugin.xml file=ABI_DIR\BUILD_DIR\camificon.dll SHARED_LIB_DIR\camificon.dll data=\epoc32\data\z\resource\qt\plugins\iconengines\camificon.qtplugin resource\qt\plugins\iconengines\camificon.qtplugin diff -r efda7c0771b9 -r 7b66bc3c6dc9 taskswitcher/activitytsplugin/src/activitytsmodel.cpp --- a/taskswitcher/activitytsplugin/src/activitytsmodel.cpp Wed Oct 13 12:59:22 2010 +0300 +++ b/taskswitcher/activitytsplugin/src/activitytsmodel.cpp Mon Oct 18 10:44:15 2010 +0300 @@ -88,7 +88,9 @@ Q_UNUSED(resources); mRunningAppsUid.clear(); for (int i(0); i < storage.Count(); ++i) { - mRunningAppsUid.append(storage[i].UidL().iUid); + if(MTsRunningApplication::None == storage[i].HideMode()) { + mRunningAppsUid.append(storage[i].Uid().iUid); + } } if(filterActivity()) { emit dataChanged(); diff -r efda7c0771b9 -r 7b66bc3c6dc9 taskswitcher/client/client.pri --- a/taskswitcher/client/client.pri Wed Oct 13 12:59:22 2010 +0300 +++ b/taskswitcher/client/client.pri Mon Oct 18 10:44:15 2010 +0300 @@ -19,7 +19,6 @@ HEADERS += $$PWD/inc/tstaskmonitor.h \ $$PWD/inc/tstask.h \ $$PWD/inc/tstasklauncher.h \ - $$PWD/inc/tstaskcontent.h \ $$PWD/inc/tstaskchangeinfo.h SOURCES += $$PWD/src/tstaskmonitor.cpp \ @@ -37,11 +36,13 @@ $$PWD/s60/inc/tstaskmonitorclientimpl.h \ $$PWD/s60/inc/tssession.h \ $$PWD/../utils/inc/tsentrykey.h \ + $$PWD/../utils/inc/tsentryimp.h \ $$PWD/../utils/inc/tsutils.h \ $$PWD/../utils/inc/tsscreenshotmsg.h \ $$PWD/../utils/inc/tsunregscreenshotmsg.h \ $$PWD/../utils/inc/tsvisibilitymsg.h \ $$PWD/s60/inc/tstaskmonitor_p.h \ + $$PWD/s60/inc/tscliententry.h \ $$PWD/s60/inc/tstaskmonitorhistory.h \ $$PWD/s60/inc/tsscreenshotclient.h \ $$PWD/s60/inc/tsscreenshotclientimpl.h \ @@ -52,10 +53,12 @@ $$PWD/s60/src/tstaskmonitorclientimpl.cpp \ $$PWD/s60/src/tssession.cpp \ $$PWD/../utils/src/tsentrykey.cpp \ + $$PWD/../utils/src/tsentryimp.cpp \ $$PWD/../utils/src/tsscreenshotmsg.cpp \ $$PWD/../utils/src/tsunregscreenshotmsg.cpp \ $$PWD/../utils/src/tsvisibilitymsg.cpp \ $$PWD/s60/src/tstaskmonitor_p.cpp \ + $$PWD/s60/src/tscliententry.cpp \ $$PWD/s60/src/tstaskmonitorhistory.cpp \ $$PWD/s60/src/tsscreenshotclient.cpp \ $$PWD/s60/src/tsscreenshotclientimpl.cpp \ diff -r efda7c0771b9 -r 7b66bc3c6dc9 taskswitcher/client/inc/tstask.h --- a/taskswitcher/client/inc/tstask.h Wed Oct 13 12:59:22 2010 +0300 +++ b/taskswitcher/client/inc/tstask.h Mon Oct 18 10:44:15 2010 +0300 @@ -23,14 +23,14 @@ #include "tstaskmonitor_global.h" -class TsTaskContent; +class CTsClientEntry; class TsTaskLauncher; class TsTask { public: - TsTask(const QSharedPointer &content, TsTaskLauncher &launcher); + TsTask(const QSharedPointer &content, TsTaskLauncher &launcher); TSTASKMONITOR_EXPORT ~TsTask(); TSTASKMONITOR_EXPORT void open(); @@ -44,7 +44,7 @@ private: Q_DISABLE_COPY(TsTask) - QSharedPointer mContent; + QSharedPointer mContent; TsTaskLauncher &mLauncher; }; diff -r efda7c0771b9 -r 7b66bc3c6dc9 taskswitcher/client/inc/tstaskcontent.h --- a/taskswitcher/client/inc/tstaskcontent.h Wed Oct 13 12:59:22 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,32 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ -#ifndef TSTASKCONTENT_H -#define TSTASKCONTENT_H - -class TsTaskContent -{ - -public: - bool mClosable; - bool mActive; - QPixmap mScreenshot; - QString mName; - QByteArray mKey; - -}; - -#endif //TSTASKCONTENT_H diff -r efda7c0771b9 -r 7b66bc3c6dc9 taskswitcher/client/inc/tstasklauncher.h --- a/taskswitcher/client/inc/tstasklauncher.h Wed Oct 13 12:59:22 2010 +0300 +++ b/taskswitcher/client/inc/tstasklauncher.h Mon Oct 18 10:44:15 2010 +0300 @@ -17,13 +17,13 @@ #ifndef TSTASKLAUNCHER_H #define TSTASKLAUNCHER_H -class QByteArray; +class MTsEntry; class TsTaskLauncher { public: - virtual void openTask(const QByteArray &key) = 0; - virtual void closeTask(const QByteArray &key) = 0; + virtual void openTask(const MTsEntry &entry) = 0; + virtual void closeTask(const MTsEntry &key) = 0; }; #endif //TSTASKLAUNCHER_H diff -r efda7c0771b9 -r 7b66bc3c6dc9 taskswitcher/client/s60/inc/tscliententry.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/taskswitcher/client/s60/inc/tscliententry.h Mon Oct 18 10:44:15 2010 +0300 @@ -0,0 +1,36 @@ +/* +* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Task list entry +* +*/ + +#ifndef TSCLIENTENTRY_H +#define TSCLIENTENTRY_H + +#include "tsentryimp.h" + +/** + * An entry in the task list. + */ +class CTsClientEntry: public CTsEntryImp + { +public: + static CTsClientEntry* NewLC(RReadStream &stream); + ~CTsClientEntry(); + CFbsBitmap* Icon() const; + TBool Close() const; + TBool Launch() const; + }; + +#endif //TSCLIENTENTRY_H diff -r efda7c0771b9 -r 7b66bc3c6dc9 taskswitcher/client/s60/inc/tstaskmonitor_p.h --- a/taskswitcher/client/s60/inc/tstaskmonitor_p.h Wed Oct 13 12:59:22 2010 +0300 +++ b/taskswitcher/client/s60/inc/tstaskmonitor_p.h Mon Oct 18 10:44:15 2010 +0300 @@ -31,11 +31,12 @@ class RDesReadStream; class TsTask; -class TsTaskContent; class CTsTaskMonitorClient; class TsTaskMonitorHistory; +class CTsClientEntry; -class TsTaskMonitorPrivate : public MTsTaskMonitorObserver, public TsTaskLauncher +class TsTaskMonitorPrivate : public MTsTaskMonitorObserver, + public TsTaskLauncher { public: TsTaskMonitorPrivate(TsTaskMonitor *q); @@ -48,12 +49,10 @@ virtual void HandleRunningAppChange(); public: // from TsTaskLauncher - virtual void openTask(const QByteArray &key); - virtual void closeTask(const QByteArray &key); + virtual void openTask(const MTsEntry &entry); + virtual void closeTask(const MTsEntry &entry); private: // helper methods - TsTaskMonitorHistory internalizeContentL(RDesReadStream &dataStream, - QSharedPointer &content ); QDateTime dateTimeFromS60(const TTime &s60Time); //for comparing algorithm @@ -63,7 +62,7 @@ QList findDeletes(const QList &newHistory); QList getDeletesChangeset(const QList &deleteList); QList getInsertsChangeset(const QList &insertList, - const QList< QSharedPointer > &taskList); + const QList< QSharedPointer > &taskList); QList substractInsertsFromNew( const QList &insertList, const QList &newHistory ); @@ -71,14 +70,18 @@ const QList &deleteList); QList findMovesAndUpdates( const QList &newMinusInserts, - const QList< QSharedPointer > &taskList, + const QList< QSharedPointer > &taskList, QList &workingList); + HBufC8* keyLC(const MTsEntry &entry); +private: + void changeListL(); -private: +private: TsTaskMonitor *q_ptr; CTsTaskMonitorClient *mClient; RWsSession &mWsSession; QList mTaskHistory; + RPointerArray mUpdateSet; }; #endif //TSTASKMONITOR_P_H diff -r efda7c0771b9 -r 7b66bc3c6dc9 taskswitcher/client/s60/inc/tstaskmonitorhistory.h --- a/taskswitcher/client/s60/inc/tstaskmonitorhistory.h Wed Oct 13 12:59:22 2010 +0300 +++ b/taskswitcher/client/s60/inc/tstaskmonitorhistory.h Mon Oct 18 10:44:15 2010 +0300 @@ -16,22 +16,20 @@ */ #ifndef TSTASKMONITORHISTORY_H_ #define TSTASKMONITORHISTORY_H_ - -#include -#include +#include +#include "tscliententry.h" class TsTaskMonitorHistory { public: - TsTaskMonitorHistory(const QByteArray &key, const QDateTime &updateTime); - bool isEqual(const TsTaskMonitorHistory &item) const; - bool isUpdated(const TsTaskMonitorHistory &item) const; + TsTaskMonitorHistory(const QSharedPointer< CTsClientEntry > item, int offset); + bool operator == (const TsTaskMonitorHistory &item) const; + bool isUpdated (const TsTaskMonitorHistory &item) const; int offset() const; - void setOffset(int offset); + private: - QByteArray mKey; - QDateTime mUpdateTime; - int mOffset; + QSharedPointer mEntry; + const int mOffset; }; #endif /* TSTASKMONITORHISTORY_H_ */ diff -r efda7c0771b9 -r 7b66bc3c6dc9 taskswitcher/client/s60/src/tscliententry.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/taskswitcher/client/s60/src/tscliententry.cpp Mon Oct 18 10:44:15 2010 +0300 @@ -0,0 +1,47 @@ +/* +* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Task list entry +* +*/ +#include "tscliententry.h" +//------------------------------------------------------------------------------ +CTsClientEntry* CTsClientEntry::NewLC(RReadStream &stream) +{ + CTsClientEntry* self = new (ELeave)CTsClientEntry(); + CleanupStack::PushL(self); + self->BaseConstructL(stream); + return self; +} + +//------------------------------------------------------------------------------ +CTsClientEntry::~CTsClientEntry() +{} + +//------------------------------------------------------------------------------ +CFbsBitmap* CTsClientEntry::Icon() const +{ + return iThumbail; +} + +//------------------------------------------------------------------------------ +TBool CTsClientEntry::Close() const +{ + return EFalse; +} + +//------------------------------------------------------------------------------ +TBool CTsClientEntry::Launch() const + { + return EFalse; + } diff -r efda7c0771b9 -r 7b66bc3c6dc9 taskswitcher/client/s60/src/tstaskmonitor_p.cpp --- a/taskswitcher/client/s60/src/tstaskmonitor_p.cpp Wed Oct 13 12:59:22 2010 +0300 +++ b/taskswitcher/client/s60/src/tstaskmonitor_p.cpp Mon Oct 18 10:44:15 2010 +0300 @@ -25,7 +25,8 @@ #include "tstaskmonitorclient.h" #include "tstask.h" -#include "tstaskcontent.h" +#include "tsentrykey.h" +#include "tscliententry.h" #include "tstaskchangeinfo.h" #include "tsutils.h" #include "tstaskmonitorhistory.h" @@ -39,6 +40,7 @@ TsTaskMonitorPrivate::~TsTaskMonitorPrivate() { + mUpdateSet.ResetAndDestroy(); mClient->CancelSubscribe(); delete mClient; } @@ -47,97 +49,61 @@ QList TsTaskMonitorPrivate::changeList(bool fullList) { QList retVal; - - QT_TRAP_THROWING ( - - HBufC8 *data = mClient->TasksContentLC(); - if (data->Size() == 0) { - CleanupStack::PopAndDestroy(data); - return retVal; - } - TPtr8 dataPointer(data->Des()); - RDesReadStream dataStream(dataPointer); - CleanupClosePushL(dataStream); - - int count = dataStream.ReadInt32L(); - - QT_TRYCATCH_LEAVING( - QList< QSharedPointer > taskList; - QList newTaskHistory; - for (int iter(0); iter < count; iter++) { - QSharedPointer content(new TsTaskContent); - TsTaskMonitorHistory newHistoryItem = internalizeContentL(dataStream, content); - newHistoryItem.setOffset(iter); - newTaskHistory.append(newHistoryItem); - taskList.append(content); - } - if (fullList) { - mTaskHistory.clear(); - } - QList insertsList = findInserts(newTaskHistory); - QList deletesList = findDeletes(newTaskHistory); - QList newMinusInserts; - if (insertsList.count() > 0 ) { - newMinusInserts = substractInsertsFromNew(insertsList, newTaskHistory); - } else { - newMinusInserts = newTaskHistory; - } - QList interimList; - if (deletesList.count() > 0 ) { - retVal.append(getDeletesChangeset(deletesList)); - interimList = substractDeletesFromOld(deletesList); - } else { - interimList = mTaskHistory; - } - retVal.append(findMovesAndUpdates(newMinusInserts, taskList, interimList)); - if (mTaskHistory.isEmpty()) { - retVal.append(TsTaskChange(TsTaskChangeInfo(), QSharedPointer())); - } - retVal.append(getInsertsChangeset(insertsList, taskList)); - mTaskHistory = newTaskHistory; - )//QT_TRYCATCH_LEAVING - CleanupStack::PopAndDestroy(&dataStream); - CleanupStack::PopAndDestroy(data); - );//QT_TRAP_THROWING - + QT_TRAP_THROWING(changeListL()); + + QList< QSharedPointer > taskList; + QList newTaskHistory; + for (int offset(0); 0 < mUpdateSet.Count(); ++offset) { + QSharedPointer content(mUpdateSet[0]); + taskList.append(content); + newTaskHistory.append(TsTaskMonitorHistory(content, offset)); + mUpdateSet.Remove(0); + } + if (fullList) { + mTaskHistory.clear(); + } + QList insertsList = findInserts(newTaskHistory); + QList deletesList = findDeletes(newTaskHistory); + QList newMinusInserts; + if (insertsList.count() > 0 ) { + newMinusInserts = substractInsertsFromNew(insertsList, newTaskHistory); + } else { + newMinusInserts = newTaskHistory; + } + QList interimList; + if (deletesList.count() > 0 ) { + retVal.append(getDeletesChangeset(deletesList)); + interimList = substractDeletesFromOld(deletesList); + } else { + interimList = mTaskHistory; + } + retVal.append(findMovesAndUpdates(newMinusInserts, taskList, interimList)); + if (mTaskHistory.isEmpty()) { + retVal.append(TsTaskChange(TsTaskChangeInfo(), QSharedPointer())); + } + retVal.append(getInsertsChangeset(insertsList, taskList)); + mTaskHistory = newTaskHistory; return retVal; } -TsTaskMonitorHistory TsTaskMonitorPrivate::internalizeContentL(RDesReadStream & dataStream, - QSharedPointer &content) +void TsTaskMonitorPrivate::changeListL() { - // get name - TInt nameLength(dataStream.ReadInt32L()); - if (0 < nameLength) { - HBufC* name = HBufC::NewLC(dataStream, nameLength); - content->mName = XQConversions::s60DescToQString(*name); - CleanupStack::PopAndDestroy(name); + mUpdateSet.ResetAndDestroy(); + HBufC8 *data = mClient->TasksContentLC(); + if (data->Size() == 0) { + User::Leave(KErrCorrupt); } - TPckgBuf updateTime; - dataStream.ReadL(updateTime); - QDateTime historyTime = dateTimeFromS60(updateTime()); - - // get screenshot - TInt screenshotHandle = dataStream.ReadInt32L(); - CFbsBitmap *screenshot = new (ELeave) CFbsBitmap; - CleanupStack::PushL(screenshot); - if (KErrNone == screenshot->Duplicate(screenshotHandle)) { - content->mScreenshot = QPixmap::fromSymbianCFbsBitmap(screenshot); + RDesReadStream dataStream; + CleanupClosePushL(dataStream); + dataStream.Open(*data); + const int count(dataStream.ReadInt32L()); + for (int offset(0); offset < count; ++offset) { + CTsClientEntry* entry = CTsClientEntry::NewLC(dataStream); + mUpdateSet.AppendL(entry); + CleanupStack::Pop(entry); } - CleanupStack::PopAndDestroy(screenshot); - // get key - TInt keyLength(dataStream.ReadInt32L()); - if (0 < keyLength) { - HBufC8* key = HBufC8::NewLC(keyLength); - TPtr8 des(key->Des()); - dataStream.ReadL(des, keyLength); - content->mKey = XQConversions::s60Desc8ToQByteArray(*key); - CleanupStack::PopAndDestroy(key); - } - // get other values - content->mActive = dataStream.ReadInt32L(); - content->mClosable = dataStream.ReadInt32L(); - return TsTaskMonitorHistory(content->mKey, historyTime); + CleanupStack::PopAndDestroy(&dataStream); + CleanupStack::PopAndDestroy(data); } QDateTime TsTaskMonitorPrivate::dateTimeFromS60(const TTime &s60Time) @@ -157,7 +123,7 @@ const TsTaskMonitorHistory &item ) { for (int iter(0); iter < historyList.count(); iter++) { - if(historyList[iter].isEqual(item)) { + if(historyList[iter] == item) { return iter; } } @@ -202,7 +168,7 @@ } QList TsTaskMonitorPrivate::getInsertsChangeset(const QList &insertList, - const QList< QSharedPointer > &taskList) + const QList< QSharedPointer > &taskList) { QList retVal; foreach (int index, insertList) { @@ -238,7 +204,7 @@ QList TsTaskMonitorPrivate::findMovesAndUpdates( const QList &newMinusInserts, - const QList< QSharedPointer > &taskList, + const QList< QSharedPointer > &taskList, QList &workingList) { QList retVal; @@ -254,10 +220,9 @@ // case 2 item has changed if (newMinusInserts[newPos].isUpdated(workingList[newPos])) { TsTaskChangeInfo updateChange(newPos, newPos); - int taskListOffset = newMinusInserts[newPos].offset(); retVal.append( TsTaskChange( updateChange, - QSharedPointer(new TsTask(taskList[taskListOffset], *this)))); + QSharedPointer(new TsTask(taskList[newMinusInserts[newPos].offset()], *this)))); } } return retVal; @@ -268,15 +233,36 @@ emit q_ptr->taskListChanged(); } -void TsTaskMonitorPrivate::openTask(const QByteArray &key) +void TsTaskMonitorPrivate::openTask(const MTsEntry &entry) { - TPtrC8 desC(reinterpret_cast(key.constData()), key.length()); - mClient->OpenTask(desC); - + QT_TRAP_THROWING( + HBufC8 *dataPtr = keyLC(entry); + TPtr8 dataBuf(dataPtr->Des()); + mClient->OpenTask(dataBuf); + CleanupStack::PopAndDestroy(dataPtr); + ) } -void TsTaskMonitorPrivate::closeTask(const QByteArray &key) +void TsTaskMonitorPrivate::closeTask(const MTsEntry &entry) +{ + QT_TRAP_THROWING( + HBufC8 *dataPtr = keyLC(entry); + TPtr8 dataBuf(dataPtr->Des()); + mClient->CloseTask(dataBuf); + CleanupStack::PopAndDestroy(dataPtr); + ) +} + +HBufC8* TsTaskMonitorPrivate::keyLC(const MTsEntry &entry) { - TPtrC8 desC(reinterpret_cast(key.constData()), key.length()); - mClient->CloseTask(desC); + HBufC8 *dataPtr = HBufC8::NewLC(TTsEntryKey::Size()); + TPtr8 dataBuf(dataPtr->Des()); + + RDesWriteStream dataStream; + CleanupClosePushL(dataStream); + dataStream.Open(dataBuf); + dataStream << entry.Key(); + CleanupStack::PopAndDestroy(&dataStream); + + return dataPtr; } diff -r efda7c0771b9 -r 7b66bc3c6dc9 taskswitcher/client/s60/src/tstaskmonitorhistory.cpp --- a/taskswitcher/client/s60/src/tstaskmonitorhistory.cpp Wed Oct 13 12:59:22 2010 +0300 +++ b/taskswitcher/client/s60/src/tstaskmonitorhistory.cpp Mon Oct 18 10:44:15 2010 +0300 @@ -16,16 +16,10 @@ */ #include "tstaskmonitorhistory.h" -TsTaskMonitorHistory::TsTaskMonitorHistory(const QByteArray &key, - const QDateTime &updateTime) : -mKey(key), mUpdateTime(updateTime) +TsTaskMonitorHistory::TsTaskMonitorHistory(const QSharedPointer< CTsClientEntry > item, int offset) : +mEntry(item), +mOffset(offset) { - -} - -void TsTaskMonitorHistory::setOffset(int offset) -{ - mOffset = offset; } int TsTaskMonitorHistory::offset() const @@ -33,19 +27,12 @@ return mOffset; } -bool TsTaskMonitorHistory::isEqual(const TsTaskMonitorHistory &item) const +bool TsTaskMonitorHistory::operator == (const TsTaskMonitorHistory &item) const { - if (mKey == item.mKey) { - return true; - } - return false; + return mEntry->Key() == item.mEntry->Key(); } bool TsTaskMonitorHistory::isUpdated(const TsTaskMonitorHistory &item) const { - Q_ASSERT(mKey == item.mKey); - if (mUpdateTime != item.mUpdateTime) { - return true; - } - return false; + return mEntry->TimestampUpdate() != item.mEntry->TimestampUpdate(); } diff -r efda7c0771b9 -r 7b66bc3c6dc9 taskswitcher/client/src/tstask.cpp --- a/taskswitcher/client/src/tstask.cpp Wed Oct 13 12:59:22 2010 +0300 +++ b/taskswitcher/client/src/tstask.cpp Mon Oct 18 10:44:15 2010 +0300 @@ -14,9 +14,9 @@ * Description: * */ +#include #include "tstask.h" - -#include "tstaskcontent.h" +#include "tscliententry.h" #include "tstasklauncher.h" /*! @@ -32,7 +32,7 @@ @internal Constructor. */ -TsTask::TsTask(const QSharedPointer &content, TsTaskLauncher &launcher) : mContent(content), mLauncher(launcher) +TsTask::TsTask(const QSharedPointer &content, TsTaskLauncher &launcher) : mContent(content), mLauncher(launcher) { } @@ -48,7 +48,7 @@ */ bool TsTask::isClosable() const { - return mContent->mClosable; + return EFalse != mContent->IsClosable(); } /*! @@ -56,7 +56,7 @@ */ bool TsTask::isActive() const { - return mContent->mActive; + return EFalse != mContent->IsActive(); } /*! @@ -64,7 +64,9 @@ */ QPixmap TsTask::screenshot() const { - return mContent->mScreenshot; + + return mContent->Icon() ? QPixmap::fromSymbianCFbsBitmap(mContent->Icon()) : + QPixmap(); } /*! @@ -72,7 +74,7 @@ */ QString TsTask::name() const { - return mContent->mName; + return XQConversions::s60DescToQString(mContent->DisplayName()); } /*! @@ -80,7 +82,8 @@ */ void TsTask::open() { - mLauncher.openTask(mContent->mKey); + + mLauncher.openTask(*mContent); } /*! @@ -88,5 +91,5 @@ */ void TsTask::close() { - mLauncher.closeTask(mContent->mKey); + mLauncher.closeTask(*mContent); } diff -r efda7c0771b9 -r 7b66bc3c6dc9 taskswitcher/screenshotplugin/src/tsscreenshotplugin.cpp --- a/taskswitcher/screenshotplugin/src/tsscreenshotplugin.cpp Wed Oct 13 12:59:22 2010 +0300 +++ b/taskswitcher/screenshotplugin/src/tsscreenshotplugin.cpp Mon Oct 18 10:44:15 2010 +0300 @@ -139,11 +139,15 @@ case TWservCrEvent::EWindowGroupChanged: if( KInvalidGroupId != iWindowGroupId ) { - NotifyWindowGroupToBackground( iWindowGroupId ); + if(iAllowedList->IsPresent(iWindowGroupId)) { TakeScreenshot( iWindowGroupId ); } + else + { + NotifyWindowGroupToBackground( iWindowGroupId ); + } } iWindowGroupId = aEvent.WindowGroupIdentifier(); break; diff -r efda7c0771b9 -r 7b66bc3c6dc9 taskswitcher/server/inc/tsdatalist.h --- a/taskswitcher/server/inc/tsdatalist.h Wed Oct 13 12:59:22 2010 +0300 +++ b/taskswitcher/server/inc/tsdatalist.h Mon Oct 18 10:44:15 2010 +0300 @@ -21,10 +21,8 @@ #include -#include - #include "tswindowgroupsobserverbase.h" -#include "tsentry.h" +#include "tsrunningappentry.h" #include "tsdatastorage.h" #include "tsdataobserver.h" #include "tsenv.h" @@ -54,41 +52,35 @@ const RTsFswArray& Data() const; void HandleWindowGroupChanged( MTsResourceManager &aResources, const MTsRunningApplicationStorage& aStorage ); - TBool IsHiddenUid( TUid aUid ); TBool IsSupported(TInt aFunction) const; void HandleDataL(TInt aFunction,RReadStream& aDataStream); + MTsEntry& FindL(TTsEntryKey& aKey); private: void CollectAppsL( RTsFswArray& aAppsList, const MTsRunningApplicationStorage& aStorage ); - void AddEntryL( const TTsEntryKey& aKey, + void AddEntryL( const TTsEntryKey aKey, const MTsRunningApplication& aRunningApp, RTsFswArray& aNewList ); - HBufC* FindAppNameLC( const MTsRunningApplication& aRunningApp ); - TBool CheckIfExists( const CTsEntry& aEntry, + TBool CheckIfExistsL( const MTsEntry& aEntry, const RTsFswArray& aNewList ) const; void RegisterScreenshotL( RReadStream& aDataStream ); void UnregisterScreenshotL( RReadStream& aDataStream ); - void ChangeVisibilityL( RReadStream& aDataStream ); void UpdateTaskTimestampL( RReadStream& aDataStream ); void FitDataToListL( RTsFswArray& aListToFit ); - TBool ConsiderOldDataL( const TTsEntryKey& aKey ); - CFbsBitmap* GetAppIconL( const TUid& aAppUid ); + TBool ConsiderOldData( const TTsEntryKey& aKey ); TInt FindEntry( const RTsFswArray& aList, const TTsEntryKey& aKey ) const; - TBool EstablishOrder( const RArray& aKeyList ); + TBool EstablishOrderL( const RArray& aKeyList ); TTsEntryKey GenerateKeyL( TInt ); - void HideEntryIfNotAllowed( CTsEntry* aEntry ); + void HideEntryIfNotAllowed( CTsRunningAppEntry* aEntry ); TBool UpdateEntryData(const RTsFswArray& aList); void RebuildVisibleDataListL(); - CFbsBitmap* HbIcon2CFbsBitmap( const HbIcon& aIcon ); private: MTsResourceManager& iResources; MTsDataObserver &iObserver; RTsFswArray iData; // current fsw content, i.e. the task list RTsFswArray iVisibleData; - RArray iHiddenUids/** list of hidden uids */; - CFbsBitmap* iDefaultIcon /** default icon*/; TsEnv& iEnv; }; diff -r efda7c0771b9 -r 7b66bc3c6dc9 taskswitcher/server/inc/tsdatastorage.h --- a/taskswitcher/server/inc/tsdatastorage.h Wed Oct 13 12:59:22 2010 +0300 +++ b/taskswitcher/server/inc/tsdatastorage.h Mon Oct 18 10:44:15 2010 +0300 @@ -18,7 +18,6 @@ #define DATASTORAGE_H #include -#include "tstaskmonitorglobals.h" class MTsDataStorage { public: diff -r efda7c0771b9 -r 7b66bc3c6dc9 taskswitcher/server/inc/tsiconproviderimp.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/taskswitcher/server/inc/tsiconproviderimp.h Mon Oct 18 10:44:15 2010 +0300 @@ -0,0 +1,61 @@ +/* +* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Task list entry +* +*/ + +#ifndef TSICONPROVIDERIMP_H +#define TSICONPROVIDERIMP_H + +#include + +#include "tsiconprovider.h" +#include "tsresourcemanager.h" + +class QIcon; + +class CTsIconProvider: public CBase, + public MTsIconProvider + { +public: + static CTsIconProvider* NewL(MTsResourceManager& aResources); + ~CTsIconProvider(); + void LoadIconL(CFbsBitmap& aDst, TUid aUid); + +private: + enum TIconSource + { + ESkin, + EApparc, + EFile, + EDefault + }; + CTsIconProvider(MTsResourceManager& aResources); + void ConstructL(); + CFbsBitmap* Bitmap( const QIcon& aIcon ); + CFbsBitmap* Bitmap( CFbsBitmap& aBitmap, CFbsBitmap& aMask ); + + void LoadL(TIconSource aSrc, CFbsBitmap& aDst, TUid aUid); + void LoadIconFromSkinL(CFbsBitmap& aDst, TUid aUid); + void LoadIconFromApparcL(CFbsBitmap& aDst, TUid aUid); + void LoadIconFromFileL(CFbsBitmap& aDst, TUid aUid); + void LoadIconDefaultL(CFbsBitmap& aDst); + void CopyAndDestroyL(CFbsBitmap& aDst, CFbsBitmap* aSrc); + +private: + MTsResourceManager& iResources; + CFbsBitmap* iDefaultIcon; + }; + +#endif //TSICONPROVIDER_H diff -r efda7c0771b9 -r 7b66bc3c6dc9 taskswitcher/server/inc/tsmodel.h --- a/taskswitcher/server/inc/tsmodel.h Wed Oct 13 12:59:22 2010 +0300 +++ b/taskswitcher/server/inc/tsmodel.h Mon Oct 18 10:44:15 2010 +0300 @@ -29,18 +29,18 @@ virtual void SetObserver( MTsModelObserver *observer ) = 0; protected: //data access. should be used by TModelItem - virtual const TDesC& DisplayNameL( TInt aOffset ) const = 0; - virtual TInt IconHandleL( TInt aOffset ) const = 0; - virtual TTime TimestampL( TInt aOffset ) const = 0; - virtual TTime TimestampUpdateL(TInt offset) const = 0; - virtual TTsModelItemKey KeyL( TInt aOffset ) const = 0; - virtual TBool IsActiveL( TInt aOffset ) const = 0; - virtual TBool IsClosableL( TInt aOffset ) const = 0; - virtual TBool IsMandatoryL( TInt aOffset ) const = 0; + virtual const TDesC& DisplayName( TInt aOffset ) const = 0; + virtual TInt IconHandle( TInt aOffset ) const = 0; + virtual TTime Timestamp( TInt aOffset ) const = 0; + virtual TTime TimestampUpdate(TInt offset) const = 0; + virtual TTsEntryKey Key( TInt aOffset ) const = 0; + virtual TBool IsActive( TInt aOffset ) const = 0; + virtual TBool IsClosable( TInt aOffset ) const = 0; + virtual TBool IsMandatory( TInt aOffset ) const = 0; protected: //operations execution - virtual TBool CloseL( TTsModelItemKey aKey ) const = 0; - virtual TBool LaunchL( TTsModelItemKey aKey ) const = 0; + virtual TBool Close( TTsEntryKey aKey ) const = 0; + virtual TBool Launch( TTsEntryKey aKey ) const = 0; friend class TTsModelItem; }; diff -r efda7c0771b9 -r 7b66bc3c6dc9 taskswitcher/server/inc/tsmodelitem.h --- a/taskswitcher/server/inc/tsmodelitem.h Wed Oct 13 12:59:22 2010 +0300 +++ b/taskswitcher/server/inc/tsmodelitem.h Mon Oct 18 10:44:15 2010 +0300 @@ -18,34 +18,34 @@ #define TSMODELITEM_H #include -#include "tsmodelitemkey.h" +#include "tsentry.h" +#include "tsentrykey.h" class MTsModel; -class TTsModelItem { +class TTsModelItem : public MTsEntry + { public: TTsModelItem( const MTsModel& aModel, TInt aOffset ); TTsModelItem( const TTsModelItem& aItem ); - const TDesC& DisplayNameL() const; - TInt IconHandleL() const; - TTime TimestampL() const; - TTime TimestampUpdateL() const; - TTsModelItemKey KeyL() const; - TBool IsActiveL() const; - TBool IsClosableL() const; - TBool CloseL() const; - TBool LaunchL() const; - TBool IsMandatoryL() const; - + TBool IsValid() const; + const TDesC& DisplayName() const; + TInt IconHandle() const; + TTime Timestamp() const; + TTime TimestampUpdate() const; + TTsEntryKey Key() const; + TBool IsActive() const; + TBool IsClosable() const; + TBool Close() const; + TBool Launch() const; + TBool IsMandatory() const; + public: void ExternalizeL( RWriteStream& aStream ) const; - -private: - void ValidateL() const; private: const MTsModel& iModel; const TInt iIndex; -}; + }; #endif //TSMODELITEM_H diff -r efda7c0771b9 -r 7b66bc3c6dc9 taskswitcher/server/inc/tsmodelitemkey.h --- a/taskswitcher/server/inc/tsmodelitemkey.h Wed Oct 13 12:59:22 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,43 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ -#ifndef TSMODELITEMKEY_H -#define TSMODELITEMKEY_H - -#include -#include - -typedef TInt TTsKey; - -class TTsModelItemKey -{ -public: - static TInt Size(); - TTsModelItemKey(); - TTsModelItemKey( TTsKey aKey, TInt aRoot ); - TTsModelItemKey( const TTsModelItemKey &aKey ); - TTsModelItemKey& operator =( const TTsModelItemKey& aKey ); - TBool operator == ( const TTsModelItemKey aKey ) const; - TInt Key() const; - void ExternalizeL( RWriteStream& aStream ) const; - void InternalizeL( RReadStream& aStream ); - -private: - TTsKey iKey; - TInt iRoot; -}; - -#endif //TSMODELITEMKEY_H diff -r efda7c0771b9 -r 7b66bc3c6dc9 taskswitcher/server/inc/tsmodelitemkeymsg.h --- a/taskswitcher/server/inc/tsmodelitemkeymsg.h Wed Oct 13 12:59:22 2010 +0300 +++ b/taskswitcher/server/inc/tsmodelitemkeymsg.h Mon Oct 18 10:44:15 2010 +0300 @@ -19,7 +19,7 @@ #define TSMODELITEMKEYMSG_H #include #include -#include "tsmodelitemkey.h" +#include "tsentrykey.h" class CTsModelItemKeyMsg: public CBase { @@ -27,7 +27,7 @@ static CTsModelItemKeyMsg* NewLC( RReadStream& aStream ); static TInt Size(); ~CTsModelItemKeyMsg(); - TTsModelItemKey Key() const; + TTsEntryKey Key() const; void InternalizeL( RReadStream &aStream ); private: @@ -35,7 +35,7 @@ void ConstructL( RReadStream &aStream ); private: - TTsModelItemKey iKey; + TTsEntryKey iKey; }; #endif diff -r efda7c0771b9 -r 7b66bc3c6dc9 taskswitcher/server/inc/tsresourcemanagerimp.h --- a/taskswitcher/server/inc/tsresourcemanagerimp.h Wed Oct 13 12:59:22 2010 +0300 +++ b/taskswitcher/server/inc/tsresourcemanagerimp.h Mon Oct 18 10:44:15 2010 +0300 @@ -22,15 +22,18 @@ #include #include "tsresourcemanager.h" +#include "tsdatastorage.h" class CTsWindowGroupsMonitor; - +class CTsIconProvider; +class CTsIdList; /** * Resource manager implemetatioin */ class CTsResourceManager: public CBase, - public MTsResourceManager - { + public MTsResourceManager, + public MTsDataStorage + { public: /** * Two phase constructor @@ -47,12 +50,17 @@ */ RWsSession& WsSession(); - /** - * @see MTsResourceManager::ApaSession - */ + RApaLsSession& ApaSession(); MTsWindowGroupsMonitor& WsMonitor(); + + MTsIconProvider& IconProvider(); + + const CTsIdList& ApplicationsBlackList() const; + + TBool IsSupported(TInt aFunction) const; + void HandleDataL(TInt aFunction, RReadStream& aDataStream); private: /** @@ -61,10 +69,11 @@ void ConstructL(); private: - RWsSession mWsSession; - RApaLsSession mApaSeesion; - CTsWindowGroupsMonitor* iMonitor; - + RWsSession mWsSession; + RApaLsSession mApaSeesion; + CTsWindowGroupsMonitor* iMonitor; + CTsIconProvider* iIconProvider; + CTsIdList* iBlackList; }; #endif // TSRESOURCEMANAGER_H diff -r efda7c0771b9 -r 7b66bc3c6dc9 taskswitcher/server/inc/tsrunningappentry.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/taskswitcher/server/inc/tsrunningappentry.h Mon Oct 18 10:44:15 2010 +0300 @@ -0,0 +1,115 @@ +/* +* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Task list entry +* +*/ + +#ifndef TSRUNNINGAPPENTRY_H +#define TSRUNNINGAPPENTRY_H + +#include +#include + +#include "tsrunningapp.h" +#include "tsentrykey.h" +#include "tstaskmonitorglobals.h" +#include "tsthumbnailobserver.h" + + +class CTsRunningAppEntry; +class CFbsBitmap; +class QObject; +class MTsResourceManager; +class MTsDataObserver; +class TsThumbnailProvider; + +typedef RPointerArray RTsFswArray; + +/** + * An entry in the task list. + */ +NONSHARABLE_CLASS( CTsRunningAppEntry ) : public CBase, + public MTsRunningApplication, + private MTsThumbnailObserver +{ +public: + static CTsRunningAppEntry *NewL(const TTsEntryKey aKey, + const MTsRunningApplication& aCacheEntry, + MTsResourceManager& aResources, + MTsDataObserver &observer, + QObject* obj); + static CTsRunningAppEntry *NewLC(const TTsEntryKey aKey, + const MTsRunningApplication& aCacheEntry, + MTsResourceManager& aResources, + MTsDataObserver &observer, + QObject* obj); + ~CTsRunningAppEntry(); + +public://from MTsRunningApplication + TUid Uid()const; + ApplicationHideMode HideMode() const; + void SetHidden( TBool aHidden ); + TBool IsSystem() const; + TInt WindowGroupId() const; + TInt ParentWindowGroupId() const; + TBool IsEmbeded() const; + + const TDesC& DisplayName() const; + TInt IconHandle() const; + TTime Timestamp() const; + TTime TimestampUpdate() const; + TTsEntryKey Key() const; + TBool IsActive() const; + TBool IsClosable() const; + TBool Close() const; + TBool Launch() const; + TBool IsMandatory() const; + +public: + void SetScreenshotL(const CFbsBitmap &bitmap, UpdatePriority priority, TInt angle); + void RemoveScreenshotL(); + void RefreshTimestamp(); + void RefreshUpdateTimestamp(); + void SetCloseableApp(TBool aClosable); + +private: + CTsRunningAppEntry(const TTsEntryKey aKey, + MTsResourceManager& aResources, + MTsDataObserver &aObserver); + void ConstructL(const MTsRunningApplication& aCacheEntry, QObject* aObject); + void CreateDisplayNameL(const MTsRunningApplication& aCacheEntry); + +public://from MTsThumbnailObserver + void ThumbnailCreated(const CFbsBitmap& aThumbnail); + +private: + MTsResourceManager& iResources; + MTsDataObserver& iObserver; + + const TTsEntryKey iKey; + UpdatePriority iPriority; + TUid iUid; + TBool iIsSystem; + ApplicationHideMode iHideMode; + TInt iWindowGroupId; + TInt iParentWindowGroupId; + TTime iTimestamp; + TTime iUpdateTimestamp; + HBufC *iCaption; + mutable CFbsBitmap* iThumbnail; + TsThumbnailProvider* iThumbnailProvider; + +}; + +#endif //TSRUNNINGAPPENTRY_H diff -r efda7c0771b9 -r 7b66bc3c6dc9 taskswitcher/server/inc/tsrunningappimp.h --- a/taskswitcher/server/inc/tsrunningappimp.h Wed Oct 13 12:59:22 2010 +0300 +++ b/taskswitcher/server/inc/tsrunningappimp.h Mon Oct 18 10:44:15 2010 +0300 @@ -32,27 +32,43 @@ static CTsRunningApp* NewLC( MTsResourceManager& aResources, const RWsSession::TWindowGroupChainInfo& aInfo ); ~CTsRunningApp(); + + void RefreshDataL(); -private: +protected: CTsRunningApp( MTsResourceManager& aResources, const RWsSession::TWindowGroupChainInfo& aInfo ); - const CApaWindowGroupName& WindowGroupNameL() const; + void ConstructL(); public://from MTsRunningApplication - TUid UidL()const; - const TDesC& CaptionL() const; - TBool IsHiddenL() const; - TBool IsSystemL() const; + TUid Uid()const; + MTsRunningApplication::ApplicationHideMode HideMode() const; + void SetHidden( TBool aHidden ); + TBool IsSystem() const; TInt WindowGroupId() const; TInt ParentWindowGroupId() const; TBool IsEmbeded() const; + const TDesC& DisplayName() const; + TInt IconHandle() const; + TTime Timestamp() const; + TTime TimestampUpdate() const; + TTsEntryKey Key() const; + TBool IsActive() const; + TBool IsClosable() const; + TBool Close() const; + TBool Launch() const; + TBool IsMandatory() const; -private: +protected: MTsResourceManager& iResources; const RWsSession::TWindowGroupChainInfo iWindowGroupInfo; + MTsRunningApplication::ApplicationHideMode iHideMode; mutable CApaWindowGroupName* iWindowGroupName; mutable TPtrC iCaption; + TTime iTimestap; + TTime iUpdateTimestap; + }; #endif//TSRUNNINGAPP_H diff -r efda7c0771b9 -r 7b66bc3c6dc9 taskswitcher/server/inc/tsrunningappmodel.h --- a/taskswitcher/server/inc/tsrunningappmodel.h Wed Oct 13 12:59:22 2010 +0300 +++ b/taskswitcher/server/inc/tsrunningappmodel.h Mon Oct 18 10:44:15 2010 +0300 @@ -56,19 +56,19 @@ virtual void SetObserver( MTsModelObserver *aObserver ); public: - virtual const TDesC& DisplayNameL( TInt aOffset ) const; - virtual TInt IconHandleL( TInt aOffset ) const; - virtual TTime TimestampL( TInt aOffset ) const; - virtual TTime TimestampUpdateL(TInt offset) const; - virtual TTsModelItemKey KeyL( TInt aOffset ) const; - virtual TBool IsActiveL( TInt aOffset ) const; - virtual TBool IsClosableL( TInt aOffset ) const; - virtual TBool IsMandatoryL( TInt aOffset ) const; + virtual const TDesC& DisplayName( TInt aOffset ) const; + virtual TInt IconHandle( TInt aOffset ) const; + virtual TTime Timestamp( TInt aOffset ) const; + virtual TTime TimestampUpdate(TInt offset) const; + virtual TTsEntryKey Key( TInt aOffset ) const; + virtual TBool IsActive( TInt aOffset ) const; + virtual TBool IsClosable( TInt aOffset ) const; + virtual TBool IsMandatory( TInt aOffset ) const; public: - virtual TBool CloseL( TTsModelItemKey aKey ) const; - virtual TBool LaunchL( TTsModelItemKey aKey ) const; - + virtual TBool Close( TTsEntryKey aKey ) const; + virtual TBool Launch( TTsEntryKey aKey ) const; + private: // owned CTsDataList *iDataList; diff -r efda7c0771b9 -r 7b66bc3c6dc9 taskswitcher/server/inc/tsrunningappstorageimp.h --- a/taskswitcher/server/inc/tsrunningappstorageimp.h Wed Oct 13 12:59:22 2010 +0300 +++ b/taskswitcher/server/inc/tsrunningappstorageimp.h Mon Oct 18 10:44:15 2010 +0300 @@ -25,6 +25,7 @@ { public: static CTsRunningAppStorage* NewLC(); + static CTsRunningAppStorage* NewL(); ~CTsRunningAppStorage(); void HandleWindowGroupChanged( MTsResourceManager &aResources, @@ -34,20 +35,24 @@ const TArray& aWindowGroups, const TArray& aFilteredWindowGroups); public: - const MTsRunningApplication& operator[] (TInt aOffset) const; + MTsRunningApplication& operator[] (TInt aOffset) const; TInt Count() const; TInt ParentIndex( const MTsRunningApplication& aRunningApp ) const; TArray BlockedWindowGroups() const; + TInt GenerateKey( TTsEntryKey& aReturnKey, TInt aWindowGroupId) const; private: TInt ParentIndex( TInt aOffset ) const; TInt Find(TInt aWindowGroupId, TInt aOffset =0) const; + TInt GenerateKey( TTsEntryKey& aReturnKey, + TInt aWindowGroupId, + TInt aOffset) const; private: CTsRunningAppStorage(); private: - RPointerArray iRunningApps; + CArrayPtr *iRunningApps; RArray iBlockedWindowGroups; }; diff -r efda7c0771b9 -r 7b66bc3c6dc9 taskswitcher/server/inc/tsscreenshotprovider.h --- a/taskswitcher/server/inc/tsscreenshotprovider.h Wed Oct 13 12:59:22 2010 +0300 +++ b/taskswitcher/server/inc/tsscreenshotprovider.h Mon Oct 18 10:44:15 2010 +0300 @@ -45,6 +45,9 @@ void HandleMessageL(const TDesC8&); void HandleWindowGroupChangedL( MTsResourceManager &aResources, const MTsRunningApplicationStorage& aStorage ); + TBool IsBlocked(const MTsResourceManager& aResources, + const MTsRunningApplication& aApp) const; + void SendWhiteListL(const CTsIdList& aList); void OnReplace(); private: diff -r efda7c0771b9 -r 7b66bc3c6dc9 taskswitcher/server/inc/tsservice.h --- a/taskswitcher/server/inc/tsservice.h Wed Oct 13 12:59:22 2010 +0300 +++ b/taskswitcher/server/inc/tsservice.h Mon Oct 18 10:44:15 2010 +0300 @@ -42,27 +42,27 @@ void SetObserver( MTsModelObserver *aObserver ); protected: //from MTsModel - const TDesC& DisplayNameL( TInt aOffset ) const; - TInt IconHandleL( TInt aOffset ) const; - TTime TimestampL( TInt aOffset ) const; - TTime TimestampUpdateL(TInt offset) const; - TTsModelItemKey KeyL( TInt aOffset ) const; - TBool IsActiveL( TInt aOffset ) const; - TBool IsClosableL( TInt aOffset ) const; - TBool IsMandatoryL( TInt aOffset ) const; - TBool CloseL( TTsModelItemKey aKey ) const; - TBool LaunchL( TTsModelItemKey aKey ) const; + const TDesC& DisplayName( TInt aOffset ) const; + TInt IconHandle( TInt aOffset ) const; + TTime Timestamp( TInt aOffset ) const; + TTime TimestampUpdate(TInt offset) const; + TTsEntryKey Key( TInt aOffset ) const; + TBool IsActive( TInt aOffset ) const; + TBool IsClosable( TInt aOffset ) const; + TBool IsMandatory( TInt aOffset ) const; + TBool Close( TTsEntryKey aKey ) const; + TBool Launch( TTsEntryKey aKey ) const; private: CTsService(); void ConstructL( MTsResourceManager& aResources, QObject* aModel ); - TInt IntValueL( TInt aOffset, const char* aKey ) const; - TTime TimeValueL( TInt aOffset, const char* aKey ) const; - const TDesC& StringValueL( TInt aOffset, const char* aKey ) const; + TInt IntValue( TInt aOffset, const char* aKey ) const; + TTime TimeValue( TInt aOffset, const char* aKey ) const; + const TDesC& StringValue( TInt aOffset, const char* aKey ) const; private: QObject *iModel; QObject *iServiceObserver; MTsModelObserver *iModelObserver; - HBufC *iBuffer; + mutable HBufC *iBuffer; }; #endif //TSSERVICE_H diff -r efda7c0771b9 -r 7b66bc3c6dc9 taskswitcher/server/inc/tsstorage.h --- a/taskswitcher/server/inc/tsstorage.h Wed Oct 13 12:59:22 2010 +0300 +++ b/taskswitcher/server/inc/tsstorage.h Mon Oct 18 10:44:15 2010 +0300 @@ -50,17 +50,17 @@ void SetObserver(MTsModelObserver* aObserver); private://from MTsModel - const TDesC& DisplayNameL( TInt aOffset ) const; - TInt IconHandleL( TInt aOffset ) const; - TTime TimestampL( TInt aOffset ) const; - TTime TimestampUpdateL(TInt offset) const; - TTsModelItemKey KeyL( TInt aOffset ) const; - TBool IsActiveL( TInt aOffset ) const; - TBool IsClosableL( TInt aOffset ) const; - TBool IsMandatoryL( TInt aOffset ) const; - TBool CloseL( TTsModelItemKey aKey ) const; - TBool LaunchL( TTsModelItemKey aKey ) const; - TTsModelItem FindL( TTsModelItemKey aKey ) const; + const TDesC& DisplayName( TInt aOffset ) const; + TInt IconHandle( TInt aOffset ) const; + TTime Timestamp( TInt aOffset ) const; + TTime TimestampUpdate(TInt offset) const; + TTsEntryKey Key( TInt aOffset ) const; + TBool IsActive( TInt aOffset ) const; + TBool IsClosable( TInt aOffset ) const; + TBool IsMandatory( TInt aOffset ) const; + TBool Close( TTsEntryKey aKey ) const; + TBool Launch( TTsEntryKey aKey ) const; + TTsModelItem FindL( TTsEntryKey aKey ) const; public://from MTsDataObserver void DataChanged(); diff -r efda7c0771b9 -r 7b66bc3c6dc9 taskswitcher/server/inc/tswindowgroupsmonitorimp.h --- a/taskswitcher/server/inc/tswindowgroupsmonitorimp.h Wed Oct 13 12:59:22 2010 +0300 +++ b/taskswitcher/server/inc/tswindowgroupsmonitorimp.h Mon Oct 18 10:44:15 2010 +0300 @@ -18,13 +18,16 @@ #define TSWINDOWGROUPMONITORIMP_H #include "tswindowgroupsmonitor.h" +#include "tsdatastorage.h" + +class CTsRunningAppStorage; /** * Window server monitor implementation. */ class CTsWindowGroupsMonitor: public CActive, - public MTsWindowGroupsMonitor - + public MTsWindowGroupsMonitor, + public MTsDataStorage { public: /** @@ -46,6 +49,11 @@ * @see MTsWindowGroupsMonitor::Cancel */ void Cancel(MTsWindowGroupsObserver &); + const MTsRunningApplicationStorage& Storage() const; + +public://from MTsDataStorage + TBool IsSupported(TInt aFunction) const; + void HandleDataL(TInt aFunction, RReadStream& aDataStream); protected: /** @@ -84,6 +92,8 @@ */ void ProvideEventL(); + void RefreshCacheL(); + private: /** * Registry of subscribed observers @@ -99,5 +109,10 @@ * Monitor window group */ RWindowGroup iWg; + + /** + * + */ + CTsRunningAppStorage* iCache; }; #endif//TSWINDOWGROUPMONITORIMP_H diff -r efda7c0771b9 -r 7b66bc3c6dc9 taskswitcher/server/server.pro --- a/taskswitcher/server/server.pro Wed Oct 13 12:59:22 2010 +0300 +++ b/taskswitcher/server/server.pro Mon Oct 18 10:44:15 2010 +0300 @@ -37,7 +37,6 @@ src/tsdatalist.cpp \ src/tsdatatask.cpp \ src/tsscreenshotprovider.cpp \ - src/tsmodelitemkey.cpp \ src/tsmodelitem.cpp \ src/tsmodel.cpp \ src/tsrunningappmodel.cpp \ @@ -52,9 +51,10 @@ src/tsrunningappimp.cpp \ src/tsrunningappstorageimp.cpp \ src/tsresourcemanagerimp.cpp \ + src/tsiconproviderimp.cpp \ + src/tsrunningappentry.cpp \ ../utils/src/tsentrykey.cpp \ - ../utils/src/tsentrykeygenerator.cpp \ - ../utils/src/tsentry.cpp \ + ../utils/src/tsentryimp.cpp \ ../utils/src/tsscreenshotmsg.cpp \ ../utils/src/tsunregscreenshotmsg.cpp \ ../utils/src/tsvisibilitymsg.cpp \ @@ -73,7 +73,6 @@ inc/tsdatatask.h \ inc/tsscreenshotprovider.h \ inc/tsmodelobserver.h \ - inc/tsmodelitemkey.h \ inc/tsmodelitem.h \ inc/tsmodel.h \ inc/tsrunningappmodel.h \ @@ -88,10 +87,12 @@ inc/tsrunningappimp.h \ inc/tsrunningappstorageimp.h \ inc/tsresourcemanagerimp.h \ + inc/tsiconproviderimp.h \ + inc/tsrunningappentry.h \ ../utils/inc/tsdataobserver.h \ ../utils/inc/tsentry.h \ + ../utils/inc/tsentryimp.h \ ../utils/inc/tsentrykey.h \ - ../utils/inc/tsentrykeygenerator.h \ ../utils/inc/tsutils.h \ ../utils/inc/tsscreenshotmsg.h \ ../utils/inc/tsunregscreenshotmsg.h \ @@ -102,14 +103,12 @@ ../utils/inc/tsidlist.h \ LIBS += -lxqutils \ - -laknicon \ -lfbscli \ #for CFbsBitmap -lestor \ #for RDesReadStream -lxqutils \ -lapgrfx \ #for CApaWindowGroupName -lws32 \ #for CWsGraphic -lapparc \ #for TApaAppInfo - -lcaclient \ #for getApplicationIcon -lcone symbian { diff -r efda7c0771b9 -r 7b66bc3c6dc9 taskswitcher/server/src/main.cpp --- a/taskswitcher/server/src/main.cpp Wed Oct 13 12:59:22 2010 +0300 +++ b/taskswitcher/server/src/main.cpp Mon Oct 18 10:44:15 2010 +0300 @@ -22,16 +22,12 @@ #include #include -#include - int main(int argc, char *argv[]) { RSemaphore semaphore; int errNo( semaphore.CreateGlobal(KTsServerReadySemaphore, 0) ); if (KErrNone == errNo) { QApplication app(argc, argv); - // maintain instance of caservice (needed for getting application icons) - QSharedPointer service = CaService::instance(); TRAP(errNo, // hide server from TaskSwitcher CEikonEnv * env = CEikonEnv::Static(); diff -r efda7c0771b9 -r 7b66bc3c6dc9 taskswitcher/server/src/tsdatalist.cpp --- a/taskswitcher/server/src/tsdatalist.cpp Wed Oct 13 12:59:22 2010 +0300 +++ b/taskswitcher/server/src/tsdatalist.cpp Mon Oct 18 10:44:15 2010 +0300 @@ -16,34 +16,18 @@ */ //INCLUDES: -#include // for CleanupResetAndDestroyPushL -#include -#include -#include -#include // avkon -#include // fbsbitmap -#include #include -#include -#include -#include #include +#include "tsutils.h" #include "tsdatalist.h" -#include "tsentrykeygenerator.h" #include "tsscreenshotmsg.h" #include "tsunregscreenshotmsg.h" -#include "tsvisibilitymsg.h" #include "tsresourcemanager.h" #include "tsrunningapp.h" #include "tsrunningappstorage.h" - -// size for the created app icons -const TInt KAppIconWidth = 128; -const TInt KAppIconHeight = 128; - -//uids to be hidden -const TUid KHsApplicationUid = { 0x20022F35 }; +#include "tsiconprovider.h" +#include "tsidlist.h" // ================= MEMBER FUNCTIONS ======================= @@ -87,10 +71,6 @@ { iData.ResetAndDestroy(); iVisibleData.Close(); - iHiddenUids.Close(); - RFbsSession::Disconnect(); - RAknIconSrvClient::Disconnect(); - delete iDefaultIcon; } // -------------------------------------------------------------------------- @@ -100,11 +80,6 @@ void CTsDataList::ConstructL() { BaseConstructL(); - iHiddenUids.AppendL( KHsApplicationUid ); - User::LeaveIfError(RFbsSession::Connect()); - RAknIconSrvClient::Connect(); - QT_TRYCATCH_LEAVING( - iDefaultIcon = HbIcon2CFbsBitmap( HbIcon("qtg_large_application") );) } // -------------------------------------------------------------------------- @@ -130,7 +105,7 @@ { TRAP_IGNORE(RDebug::Print(_L("[TaskSwitcher] processing started")); RTsFswArray newAppsList; - CleanupResetAndDestroyPushL(newAppsList); + TaskSwitcher::CleanupResetAndDestroyPushL(newAppsList); CollectAppsL(newAppsList, aStorage); RDebug::Print(_L("[TaskSwitcher] gathered app info")); FitDataToListL(newAppsList); @@ -150,9 +125,7 @@ for( TInt i(0); i < aStorage.Count(); ++i ) { TTsEntryKey key; - TInt err = TsEntryKeyGeneraror::Generate( key, - aStorage[i].WindowGroupId(), - aStorage ); + TInt err = aStorage.GenerateKey(key, aStorage[i].WindowGroupId()); //skip this entry if it is already on list or generate key failed if( err!=KErrNone || FindEntry( aAppsList, key ) >= 0 ) { @@ -163,14 +136,14 @@ TInt appScreen = 0; TInt scrNumErr = iResources.ApaSession().GetDefaultScreenNumber( appScreen, - aStorage[i].UidL() ); + aStorage[i].Uid() ); - if( aStorage[i].UidL().iUid && - !aStorage[i].IsHiddenL() && + if( aStorage[i].Uid().iUid && + MTsRunningApplication::None == aStorage[i].HideMode()&& (appScreen == 0 || appScreen == -1) && scrNumErr == KErrNone ) { - AddEntryL( key, aStorage[i], aAppsList ); + AddEntryL(key, aStorage[i], aAppsList ); } } } @@ -178,29 +151,18 @@ // -------------------------------------------------------------------------- /** * Called from CollectTasksL for each entry in the task list. - * @param aKey entry key * @param aRunningApp running application entry * @param aNewList list to add to */ -void CTsDataList::AddEntryL( const TTsEntryKey& aKey, +void CTsDataList::AddEntryL( const TTsEntryKey aKey, const MTsRunningApplication& aRunningApp, RTsFswArray& aNewList ) { - CTsEntry* entry = CTsEntry::NewLC( aKey, iObserver, &iEnv ); - // check if present in old list and if yes then take some of the old data - TBool found = ConsiderOldDataL( aKey ); - // if not present previously then find out app name - // and check if screenshot is already available - if( !found ) - { - entry->SetAppUid(aRunningApp.UidL()); - HBufC* name = FindAppNameLC( aRunningApp ); - entry->SetAppNameL(*name); - CleanupStack::PopAndDestroy( name ); - //transfer ownership to entry - entry->SetAppIcon( GetAppIconL( aRunningApp.UidL() ) ); - } - entry->SetCloseableApp( !aRunningApp.IsSystemL()); + CTsRunningAppEntry* entry = CTsRunningAppEntry::NewLC(aKey, + aRunningApp, + iResources, + iObserver, + &iEnv ); // add to new list, ownership is transferred aNewList.AppendL( entry ); CleanupStack::Pop( entry ); @@ -214,11 +176,11 @@ * @param aKey new key in content list * @return ETrue if app was found */ -TBool CTsDataList::ConsiderOldDataL( const TTsEntryKey& aKey ) +TBool CTsDataList::ConsiderOldData( const TTsEntryKey& aKey ) { for(TInt entryIdx = 0, oldCount = iData.Count(); entryIdx < oldCount; ++entryIdx) { - if (iData[entryIdx]->Key() == aKey) + if (iData[entryIdx]->Key().Key() == aKey.Key()) { return ETrue; } @@ -228,59 +190,6 @@ // -------------------------------------------------------------------------- /** - * Finds out the application name. - * @param aWindowName window group name or NULL - * @param aAppUId application uid - * @param aWgId window group id - * @return application name, ownership transferred to caller - */ -HBufC* CTsDataList::FindAppNameLC( const MTsRunningApplication& aRunningApp ) - { - //Retrieve the app name - TApaAppInfo info; - iResources.ApaSession().GetAppInfo( info, aRunningApp.UidL() ); - TPtrC caption = info.iShortCaption; - - HBufC* tempName( 0 ); - if (!caption.Length() ) // if not set - use thread name instead - { - if( aRunningApp.CaptionL().Length() ) - { - tempName = aRunningApp.CaptionL().AllocLC(); - } - else - { - TThreadId threadId; - if(KErrNone == iResources.WsSession().GetWindowGroupClientThreadId( aRunningApp.WindowGroupId(), threadId ) ) - { - RThread thread; - CleanupClosePushL( thread ); - if( KErrNone == thread.Open( threadId ) ) - { - tempName = thread.Name().AllocL(); // codescanner::forgottoputptroncleanupstack - } - // tempName put on cleanupstack after the if - CleanupStack::PopAndDestroy( &thread ); - if(tempName) - { - CleanupStack::PushL(tempName); - } - } - } - } - else - { - tempName = caption.AllocLC(); - } - if( 0 == tempName ) - { - tempName = KNullDesC16().AllocLC(); - } - return tempName; - } - -// -------------------------------------------------------------------------- -/** * Fit existing class contained data list into give one. * Data is being changed with application type consideration that is based * on aConsiderWidgets param. @@ -295,7 +204,7 @@ //remove items that dont't exists in newly collected list for (TInt i = dataCount - 1; i >= 0; --i) { - if( !CheckIfExists( *iData[i], aListToFit ) ) + if( !CheckIfExistsL( *iData[i], aListToFit ) ) { delete iData[i]; iData.Remove( i ); @@ -308,19 +217,17 @@ for(TInt i = aListToFit.Count() - 1; i >= 0; --i) { User::LeaveIfError( allKeys.Insert(aListToFit[i]->Key(), 0) ); - if( !CheckIfExists( *aListToFit[i], iData ) ) + if( !CheckIfExistsL( *aListToFit[i], iData ) ) { HideEntryIfNotAllowed( aListToFit[i] ); User::LeaveIfError( iData.Insert( aListToFit[i], 0 ) ); - TTime currentTimestamp; - currentTimestamp.UniversalTime(); - iData[0]->SetTimestamp( currentTimestamp ); + iData[0]->RefreshTimestamp(); aListToFit[i] = 0; changed = ETrue; } } //establish order - TBool orderChanged = EstablishOrder( allKeys ); + TBool orderChanged = EstablishOrderL( allKeys ); //update entries data TBool dataChanged = UpdateEntryData( aListToFit ); RebuildVisibleDataListL(); @@ -339,61 +246,17 @@ * @return ETrue if app was found */ -TBool CTsDataList::CheckIfExists( const CTsEntry& aEntry, +TBool CTsDataList::CheckIfExistsL( const MTsEntry& aEntry, const RTsFswArray& aList ) const { return 0 <= FindEntry( aList, aEntry.Key() ); } // -------------------------------------------------------------------------- -/** - * Retrieves the bitmap for the icon of the given app. - * @param aAppUid application uid - * @return app CFbsBitmap - */ -CFbsBitmap* CTsDataList::GetAppIconL( const TUid& aAppUid ) - { - - CFbsBitmap* iconBitmap(0); - TRAPD(errNo, - QT_TRYCATCH_LEAVING( - const QSize size(KAppIconWidth, KAppIconHeight); - HbIcon icon = CaMenuIconUtility::getApplicationIcon( aAppUid.iUid, size); - iconBitmap = HbIcon2CFbsBitmap( icon );) - User::LeaveIfNull(iconBitmap); ) - if( KErrNone != errNo ) - { - iconBitmap = new(ELeave) CFbsBitmap; - CleanupStack::PushL(iconBitmap); - User::LeaveIfError( iconBitmap->Duplicate( iDefaultIcon->Handle() ) ); - CleanupStack::Pop(iconBitmap); - } - return iconBitmap; - } - -// -------------------------------------------------------------------------- -/** - * Converts HbIcon to CFbsBitmap - * @param aIcon icon to be coverted - * @return CFbsBitmap - */ -CFbsBitmap* CTsDataList::HbIcon2CFbsBitmap( const HbIcon& aIcon ) - { - CFbsBitmap* retValue(0); - QIcon qicon = aIcon.qicon(); - QPixmap pixmap = qicon.pixmap(QSize(KAppIconWidth, KAppIconHeight)); - if( !pixmap.isNull() ) - { - retValue = pixmap.toSymbianCFbsBitmap(); - } - return retValue; - } -// -------------------------------------------------------------------------- TBool CTsDataList::IsSupported( TInt aFunction ) const { return ( RegisterScreenshotMessage == aFunction || UnregisterScreenshotMessage == aFunction || - VisibilityChange == aFunction || WindowGroupToBackgroundMessage == aFunction ); } @@ -408,9 +271,6 @@ case UnregisterScreenshotMessage: UnregisterScreenshotL( aDataStream ); break; - case VisibilityChange: - ChangeVisibilityL( aDataStream ); - break; case WindowGroupToBackgroundMessage: UpdateTaskTimestampL( aDataStream ); break; @@ -418,10 +278,25 @@ } // -------------------------------------------------------------------------- +MTsEntry& CTsDataList::FindL(TTsEntryKey& aKey) + { + MTsEntry* entry(0); + for(TInt offset(0); 0 == entry && offset < iData.Count(); ++offset) + { + if(iData[offset]->Key().Key() == aKey.Key()) + { + entry = iData[offset]; + } + } + User::LeaveIfNull(entry); + return *entry; + } + +// -------------------------------------------------------------------------- void CTsDataList::RegisterScreenshotL( RReadStream& aDataStream ) { CTsScreenshotMsg* msg = CTsScreenshotMsg::NewLC( aDataStream ); - const TInt pos = FindEntry( iData, GenerateKeyL(msg->WindowGroupId() ) ); + const TInt pos = FindEntry(iData, GenerateKeyL(msg->WindowGroupId() ) ); User::LeaveIfError(pos); iData[pos]->SetScreenshotL( msg->Screenshot(), msg->Priority(), msg->Rotation() ); CleanupStack::PopAndDestroy(msg); @@ -436,21 +311,7 @@ iData[pos]->RemoveScreenshotL(); CleanupStack::PopAndDestroy(msg); } -// -------------------------------------------------------------------------- -void CTsDataList::ChangeVisibilityL( RReadStream& aDataStream ) - { - CTsVisibilitMsg* msg = CTsVisibilitMsg::NewLC(aDataStream); - const TInt pos = FindEntry( iData, GenerateKeyL( msg->windowGroupId() ) ); - User::LeaveIfError(pos); - - msg->visibility() == iData[pos]->GetVisibility() ? - User::Leave( KErrInUse ) : - iData[pos]->SetVisibility( msg->visibility() ); - - CleanupStack::PopAndDestroy(msg); - RebuildVisibleDataListL(); - iObserver.DataChanged(); - } + // -------------------------------------------------------------------------- void CTsDataList::UpdateTaskTimestampL( RReadStream& aDataStream ) { @@ -458,26 +319,13 @@ const TInt pos = FindEntry( iData, GenerateKeyL( wgId ) ); User::LeaveIfError( pos ); - TTime currentTimestamp; - currentTimestamp.UniversalTime(); - iData[pos]->SetTimestamp( currentTimestamp ); + iData[pos]->RefreshTimestamp(); iObserver.DataChanged(); } // -------------------------------------------------------------------------- /** - * Checks if given uid is on hidden list - * @param aUid uid to be checked - * @return ETrue if uid is on hidden list - */ -TBool CTsDataList::IsHiddenUid( TUid aUid ) - { - return 0 < iHiddenUids.Find( aUid ); - } - -// -------------------------------------------------------------------------- -/** * Finds entry in array * @param aList list to find * @param aKey finding key @@ -491,7 +339,7 @@ entryIdx < aList.Count() && KErrNotFound == pos; ++entryIdx) { - if (aList[entryIdx]->Key() == aKey) + if (aList[entryIdx]->Key().Key() == aKey.Key()) { pos = entryIdx; } @@ -505,7 +353,7 @@ * @param aKeyList reference key list * @return ETrue if changes occured */ -TBool CTsDataList::EstablishOrder( const RArray& aKeyList ) +TBool CTsDataList::EstablishOrderL( const RArray& aKeyList ) { TBool changed( EFalse ); TInt lastChangedItem( KErrNotFound ); @@ -518,18 +366,16 @@ { TInt foundPos = FindEntry( iData, referenceKey ); __ASSERT_ALWAYS(foundPos>=0, User::Panic(_L("EstablishOrder 2"), KErrBadHandle)); - CTsEntry* entry = iData[foundPos]; + CTsRunningAppEntry* entry = iData[foundPos]; iData.Remove( foundPos ); iData.Insert( entry, i ); changed = ETrue; lastChangedItem = i; } } - TTime currentTimestamp; - currentTimestamp.UniversalTime(); for (TInt i = lastChangedItem; i >= 0; --i) { - iData[i]->SetTimestamp(currentTimestamp); + iData[i]->RefreshTimestamp(); } return changed; } @@ -551,9 +397,9 @@ { __ASSERT_ALWAYS(iData[i]->Key() == aList[i]->Key(), User::Panic(_L("UpdateEntryData 2"), KErrBadHandle)); - if( iData[i]->CloseableApp() != aList[i]->CloseableApp() ) + if( iData[i]->IsClosable() != aList[i]->IsClosable() ) { - iData[i]->SetCloseableApp(aList[i]->CloseableApp()); + iData[i]->SetCloseableApp(aList[i]->IsClosable()); changed = ETrue; } } @@ -569,13 +415,16 @@ */ TTsEntryKey CTsDataList::GenerateKeyL( TInt aWgId ) { - RArray allWgIds; + TTsEntryKey retVal; + iResources.WsMonitor().Storage().GenerateKey(retVal, aWgId); + return retVal; + /*RArray allWgIds; CleanupClosePushL( allWgIds ); User::LeaveIfError( iResources.WsSession().WindowGroupList( 0, &allWgIds ) ); TTsEntryKey key; User::LeaveIfError(TsEntryKeyGeneraror::Generate(key, aWgId, allWgIds.Array())); CleanupStack::PopAndDestroy( &allWgIds ); - return key; + return key;*/ } // -------------------------------------------------------------------------- @@ -583,14 +432,15 @@ * Hides entrie if exist on mHiddenUids * @param entry */ -void CTsDataList::HideEntryIfNotAllowed( CTsEntry* aEntry ) +void CTsDataList::HideEntryIfNotAllowed( CTsRunningAppEntry* aEntry ) { - if( iHiddenUids.Find( aEntry->AppUid() ) >= 0 ) + if( iResources.ApplicationsBlackList().IsPresent(aEntry->Uid().iUid) ) { - aEntry->SetVisibility(Invisible); + aEntry->SetHidden(ETrue); } } +// -------------------------------------------------------------------------- void CTsDataList::RebuildVisibleDataListL() { iVisibleData.Reset(); @@ -598,7 +448,7 @@ CleanupClosePushL(visibleItems); for( TInt iter = 0; iter < iData.Count(); ++iter ) { - if( Visible == iData[iter]->GetVisibility() ) + if( MTsRunningApplication::None == iData[iter]->HideMode() ) { visibleItems.AppendL(iter); } diff -r efda7c0771b9 -r 7b66bc3c6dc9 taskswitcher/server/src/tsiconproviderimp.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/taskswitcher/server/src/tsiconproviderimp.cpp Mon Oct 18 10:44:15 2010 +0300 @@ -0,0 +1,201 @@ +/* +* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Task list entry +* +*/ +#include +#include +#include +#ifdef SYMBIAN_ENABLE_SPLIT_HEADERS +#include +#else +#include +#endif + +#include +#include +#include + + +#include "tsiconproviderimp.h" + +// size for the created app icons +const TInt KAppIconWidth(128); +const TInt KAppIconHeight(128); +const TInt KImgExtLenght(3); +_LIT(KMbmExt, "mbm"); + +//------------------------------------------------------------------------------ +CTsIconProvider* CTsIconProvider::NewL(MTsResourceManager& aResources) + { + CTsIconProvider* self = new(ELeave)CTsIconProvider(aResources); + CleanupStack::PushL( self ); + self->ConstructL(); + CleanupStack::Pop( self ); + return self; + } + +//------------------------------------------------------------------------------ +CTsIconProvider::CTsIconProvider(MTsResourceManager& aResources) +: + iResources(aResources) + { + //No implementation required + } + +//------------------------------------------------------------------------------ +void CTsIconProvider::ConstructL() + { + QT_TRYCATCH_LEAVING( + iDefaultIcon = Bitmap( HbIcon("qtg_large_application").qicon() );) + User::LeaveIfNull(iDefaultIcon); + } + +//------------------------------------------------------------------------------ +CTsIconProvider::~CTsIconProvider() + { + delete iDefaultIcon; + } + +//------------------------------------------------------------------------------ +void CTsIconProvider::LoadIconL(CFbsBitmap& aDst, TUid aUid) + { + const TIconSource sources [] = {ESkin, EApparc, EFile, EDefault}; + const TInt count ( sizeof(sources) / sizeof(TIconSource) ); + if(0 == count) + { + User::Leave(KErrCorrupt); + } + TInt errNo(KErrNotFound); + for(TInt offset(0); KErrNone != errNo && offset < count; ++offset) + { + TRAP( errNo, LoadL( sources[offset], aDst, aUid ) ); + } + User::LeaveIfError(errNo); + } + +//------------------------------------------------------------------------------ +CFbsBitmap* CTsIconProvider::Bitmap( const QIcon& aIcon ) + { + CFbsBitmap* retValue(0); + QPixmap pixmap = aIcon.pixmap( QSize(KAppIconWidth, KAppIconHeight) ); + if( !pixmap.isNull() ) + { + retValue = pixmap.toSymbianCFbsBitmap(); + } + return retValue; + } +//------------------------------------------------------------------------------ +CFbsBitmap* CTsIconProvider::Bitmap( CFbsBitmap& aBitmap, + CFbsBitmap& aMask ) + { + QPixmap ico(QPixmap::fromSymbianCFbsBitmap(&aBitmap)); + ico.setAlphaChannel(QPixmap::fromSymbianCFbsBitmap(&aMask)); + return ico.scaled(QSize(KAppIconWidth, KAppIconHeight), + Qt::KeepAspectRatioByExpanding, + Qt::SmoothTransformation).toSymbianCFbsBitmap(); + + } + +//------------------------------------------------------------------------------ +void CTsIconProvider::LoadL(TIconSource aSrc, CFbsBitmap& aDst, TUid aUid) + { + switch(aSrc) + { + case ESkin:LoadIconFromSkinL(aDst, aUid); break; + case EApparc:LoadIconFromApparcL(aDst, aUid); break; + case EFile: LoadIconFromFileL(aDst, aUid); break; + case EDefault: LoadIconDefaultL(aDst); break; + } + } + +//------------------------------------------------------------------------------ +void CTsIconProvider::LoadIconFromSkinL(CFbsBitmap& aDst, TUid aUid) + { + CApaAppServiceInfoArray* skin = + iResources.ApaSession().GetAppServiceOpaqueDataLC(aUid, TUid::Uid(0x2002DCF3)); + TArray info( skin->Array() ); + if( 0 >= info.Count() ) + { + User::Leave(KErrNotFound); + } + TPtrC8 opaque(info[0].OpaqueData()); + const TPtrC16 iconName((TText16*) opaque.Ptr(),(opaque.Length()+1)>>1); + + CFbsBitmap* ico(0); + QT_TRYCATCH_LEAVING( + ico = Bitmap(HbIcon(XQConversions:: s60DescToQString(iconName)).qicon());) + CopyAndDestroyL(aDst, ico); + + CleanupStack::PopAndDestroy(skin); + } + +//------------------------------------------------------------------------------ +void CTsIconProvider::LoadIconFromApparcL(CFbsBitmap& aDst, TUid aUid) + { + const TSize size(KAppIconWidth, KAppIconHeight); + CApaMaskedBitmap* bitmap = CApaMaskedBitmap::NewLC(); + User::LeaveIfError( iResources.ApaSession().GetAppIcon(aUid,size,*bitmap) ); + User::LeaveIfNull(bitmap->Mask()); + TInt iconsCount(0); + iResources.ApaSession().NumberOfOwnDefinedIcons( aUid, iconsCount); + if(0 >= iconsCount) + { + User::Leave(KErrNotFound); + } + + CFbsBitmap *ico(0); + QT_TRYCATCH_LEAVING( + ico = Bitmap(*bitmap, *bitmap->Mask());) + CopyAndDestroyL(aDst, ico); + + CleanupStack::PopAndDestroy(bitmap); + } + +//------------------------------------------------------------------------------ +void CTsIconProvider::LoadIconFromFileL(CFbsBitmap& aDst, TUid aUid) + { + HBufC* fileName( 0 ); + User::LeaveIfError(iResources.ApaSession().GetAppIcon(aUid,fileName)); + CleanupStack::PushL(fileName); + fileName->Des().LowerCase(); + if(0 == fileName->Right(KImgExtLenght).Compare(KMbmExt)) + { + User::LeaveIfError( aDst.Load(*fileName) ); + } + else + { + CFbsBitmap* ico(0); + QT_TRYCATCH_LEAVING( + ico = Bitmap(QIcon(XQConversions::s60DescToQString(*fileName)));) + CopyAndDestroyL(aDst, ico); + } + + CleanupStack::PopAndDestroy(fileName); + } + +//------------------------------------------------------------------------------ +void CTsIconProvider::LoadIconDefaultL(CFbsBitmap& aDst) + { + User::LeaveIfError( aDst.Duplicate( iDefaultIcon->Handle() ) ); + } + +//------------------------------------------------------------------------------ +void CTsIconProvider::CopyAndDestroyL(CFbsBitmap& aDst, CFbsBitmap* aSrc) + { + User::LeaveIfNull(aSrc); + CleanupStack::PushL(aSrc); + User::LeaveIfError(aDst.Duplicate(aSrc->Handle())); + CleanupStack::PopAndDestroy(aSrc); + } diff -r efda7c0771b9 -r 7b66bc3c6dc9 taskswitcher/server/src/tsmodelitem.cpp --- a/taskswitcher/server/src/tsmodelitem.cpp Wed Oct 13 12:59:22 2010 +0300 +++ b/taskswitcher/server/src/tsmodelitem.cpp Mon Oct 18 10:44:15 2010 +0300 @@ -15,6 +15,7 @@ * */ #include "tsmodel.h" +#include "tsentryimp.h" // ----------------------------------------------------------------------------- /** * Constructor @@ -48,10 +49,9 @@ * Validate item instance and retrieve display name data * @return item display name */ -const TDesC& TTsModelItem::DisplayNameL() const +const TDesC& TTsModelItem::DisplayName() const { - ValidateL(); - return iModel.DisplayNameL( iIndex ); + return iModel.DisplayName( iIndex ); } // ----------------------------------------------------------------------------- @@ -59,10 +59,9 @@ * Validate item instance and retrieve icon handle ( CFbsBitmap handle ) * @return item icon handle */ -TInt TTsModelItem::IconHandleL() const +TInt TTsModelItem::IconHandle() const { - ValidateL(); - return iModel.IconHandleL( iIndex ); + return iModel.IconHandle( iIndex ); } // ----------------------------------------------------------------------------- @@ -70,10 +69,9 @@ * Validate item instance and retrieve entry key * @return item key */ -TTsModelItemKey TTsModelItem::KeyL() const +TTsEntryKey TTsModelItem::Key() const { - ValidateL(); - return iModel.KeyL( iIndex ); + return iModel.Key( iIndex ); } // ----------------------------------------------------------------------------- @@ -81,10 +79,9 @@ * Validate item instance and retrieve entry timestamp * @return item timestamp */ -TTime TTsModelItem::TimestampL() const +TTime TTsModelItem::Timestamp() const { - ValidateL(); - return iModel.TimestampL( iIndex ); + return iModel.Timestamp( iIndex ); } // ----------------------------------------------------------------------------- @@ -93,21 +90,19 @@ * with latest update time * @return item timestamp */ -TTime TTsModelItem::TimestampUpdateL() const -{ - ValidateL(); - return iModel.TimestampUpdateL(iIndex); -} +TTime TTsModelItem::TimestampUpdate() const + { + return iModel.TimestampUpdate(iIndex); + } // ----------------------------------------------------------------------------- /** * Validate item instance and retrieve activity status * @return activity status */ -TBool TTsModelItem::IsActiveL() const +TBool TTsModelItem::IsActive() const { - ValidateL(); - return iModel.IsActiveL( iIndex ); + return iModel.IsActive( iIndex ); } // ----------------------------------------------------------------------------- @@ -115,10 +110,9 @@ * Validate item instance and retrieve closable status * @return closable status */ -TBool TTsModelItem::IsClosableL() const +TBool TTsModelItem::IsClosable() const { - ValidateL(); - return iModel.IsClosableL( iIndex ); + return iModel.IsClosable( iIndex ); } // ----------------------------------------------------------------------------- @@ -126,10 +120,9 @@ * Validate item instance and forward close request to its owner * @return EFalse on failure */ -TBool TTsModelItem::CloseL() const +TBool TTsModelItem::Close() const { - ValidateL(); - return iModel.CloseL( KeyL() ); + return iModel.Close( Key() ); } // ----------------------------------------------------------------------------- @@ -137,32 +130,27 @@ * Validate item instance and forward launch request to its owner * @return EFalse on failure */ -TBool TTsModelItem::LaunchL() const +TBool TTsModelItem::Launch() const { - ValidateL(); - return iModel.LaunchL( KeyL() ); + return iModel.Launch( Key() ); } // ----------------------------------------------------------------------------- /** * @return EFalse if entry is not mandatory, other value in other cases */ -TBool TTsModelItem::IsMandatoryL() const +TBool TTsModelItem::IsMandatory() const { - ValidateL(); - return iModel.IsMandatoryL( iIndex ); + return iModel.IsMandatory( iIndex ); } // ----------------------------------------------------------------------------- /** * Validate item instance */ -void TTsModelItem::ValidateL() const +TBool TTsModelItem::IsValid() const { - if(iModel.Count() <= iIndex ) - { - User::Leave( KErrOverflow ); - } + return iModel.Count() > iIndex; } // ----------------------------------------------------------------------------- @@ -173,17 +161,6 @@ void TTsModelItem::ExternalizeL( RWriteStream& aStream ) const { - aStream.WriteInt32L( DisplayNameL().Length() ); - if( 0 < DisplayNameL().Length() ) - { - aStream << DisplayNameL(); - } - TPckgBuf timestamp(TimestampUpdateL()); - aStream.WriteL(timestamp); - aStream.WriteInt32L( IconHandleL() ); - aStream.WriteInt32L( TTsModelItemKey::Size() ); - aStream << KeyL(); - aStream.WriteInt32L( IsActiveL() ); - aStream.WriteInt32L( IsClosableL() ); + CTsEntryImp::ExternalizeL(aStream, *this); } diff -r efda7c0771b9 -r 7b66bc3c6dc9 taskswitcher/server/src/tsmodelitemkey.cpp --- a/taskswitcher/server/src/tsmodelitemkey.cpp Wed Oct 13 12:59:22 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,119 +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 "tsmodelitemkey.h" -// ----------------------------------------------------------------------------- -/** - * @return amount of memory ( number of bytes ) required to store key. - */ -TInt TTsModelItemKey::Size() - { - return sizeof( TInt ) * 2; - } -// ----------------------------------------------------------------------------- -/** - * Default constructor. Key members are initialized with 0 - */ -TTsModelItemKey::TTsModelItemKey() -: - iKey( 0 ), - iRoot( 0 ) - { - //No implementation required - } - -// ----------------------------------------------------------------------------- -/** - * Constructor. Initialize members with provided values. - * @param aKey - key value - * @param aRoot - root value - */ -TTsModelItemKey::TTsModelItemKey( TTsKey aKey, TInt aRoot ) -: - iKey( aKey ), - iRoot( aRoot ) - { - //No implementation required - } - -// ----------------------------------------------------------------------------- -/** - * Copy constructor - * @param aKey - key value that need to be duplicated - */ -TTsModelItemKey::TTsModelItemKey( const TTsModelItemKey& aKey ) -: - iKey( aKey.iKey ), - iRoot( aKey.iRoot ) - { - //No implementation required - } - -// ----------------------------------------------------------------------------- -/** - * Assignment operator. Initialize members with new values - * @param aKey - key value that need to be duplicated - * @return reference to key instance - */ -TTsModelItemKey& TTsModelItemKey::operator =( const TTsModelItemKey& aKey ) - { - iKey = aKey.iKey; - iRoot = aKey.iRoot; - return (*this); - } - -// ----------------------------------------------------------------------------- -/** - * Comparison operator - * @param aKey - compared value - * @return EFalse if values are not equal, other value if they match - */ -TBool TTsModelItemKey::operator == ( const TTsModelItemKey aKey ) const - { - return ( iKey == aKey.iKey && iRoot == aKey.iRoot ); - } - -// ----------------------------------------------------------------------------- -/** - * Enable access to key value - * @return key value - */ -TInt TTsModelItemKey::Key() const - { - return iKey; - } - -// ----------------------------------------------------------------------------- -/** - * Serialize key into data stream - * @param aStream - destination binary stream - */ -void TTsModelItemKey::ExternalizeL( RWriteStream& aStream ) const - { - aStream.WriteInt32L( iKey ); - aStream.WriteInt32L( iRoot ); - } - -// ----------------------------------------------------------------------------- -/** - * Deserialize key from data stream - * @param aStream - source binary stream - */ -void TTsModelItemKey::InternalizeL( RReadStream& aStream ) - { - iKey = aStream.ReadInt32L(); - iRoot = aStream.ReadInt32L(); - } diff -r efda7c0771b9 -r 7b66bc3c6dc9 taskswitcher/server/src/tsmodelitemkeymsg.cpp --- a/taskswitcher/server/src/tsmodelitemkeymsg.cpp Wed Oct 13 12:59:22 2010 +0300 +++ b/taskswitcher/server/src/tsmodelitemkeymsg.cpp Mon Oct 18 10:44:15 2010 +0300 @@ -33,7 +33,7 @@ } // ----------------------------------------------------------------------------- -TTsModelItemKey CTsModelItemKeyMsg::Key() const +TTsEntryKey CTsModelItemKeyMsg::Key() const { return iKey; } diff -r efda7c0771b9 -r 7b66bc3c6dc9 taskswitcher/server/src/tsresourcemanagerimp.cpp --- a/taskswitcher/server/src/tsresourcemanagerimp.cpp Wed Oct 13 12:59:22 2010 +0300 +++ b/taskswitcher/server/src/tsresourcemanagerimp.cpp Mon Oct 18 10:44:15 2010 +0300 @@ -16,6 +16,12 @@ */ #include "tsresourcemanagerimp.h" #include "tswindowgroupsmonitorimp.h" +#include "tsiconproviderimp.h" +#include "tsidlist.h" + +const TInt KSkippedApp [] = {0x00000000 /* <-- null/splashscreen*/, + 0x20022F35 /* <-- hsapplication */, + 0x100058F3 /* <-- sysapp*/}; // ----------------------------------------------------------------------------- // @@ -39,6 +45,11 @@ User::LeaveIfError(mWsSession.Connect()); User::LeaveIfError(mApaSeesion.Connect()); iMonitor = CTsWindowGroupsMonitor::NewL(*this); + iIconProvider = CTsIconProvider::NewL(*this); + + const TInt count(sizeof( KSkippedApp ) / sizeof(TInt)); + iBlackList = CTsIdList::NewL(); + iBlackList->AppendL(KSkippedApp, count); } // ----------------------------------------------------------------------------- @@ -47,6 +58,8 @@ // CTsResourceManager::~CTsResourceManager() { + delete iBlackList; + delete iIconProvider; delete iMonitor; mApaSeesion.Close(); mWsSession.Close(); @@ -57,21 +70,51 @@ // ----------------------------------------------------------------------------- // RWsSession& CTsResourceManager::WsSession() -{ + { return mWsSession; -} + } // ----------------------------------------------------------------------------- // // ----------------------------------------------------------------------------- // RApaLsSession& CTsResourceManager::ApaSession() -{ + { return mApaSeesion; -} + } // ----------------------------------------------------------------------------- MTsWindowGroupsMonitor& CTsResourceManager::WsMonitor() { return *iMonitor; } + +// ----------------------------------------------------------------------------- +/** + * @see MTsResourceManager::IconProvider + */ +MTsIconProvider& CTsResourceManager::IconProvider() + { + return *iIconProvider; + } + +// ----------------------------------------------------------------------------- +/** + * @see MTsResourceManager::ApplicationsBlackList + */ +const CTsIdList& CTsResourceManager::ApplicationsBlackList() const + { + return *iBlackList; + } + +// ----------------------------------------------------------------------------- +TBool CTsResourceManager::IsSupported(TInt aFunction) const + { + return iMonitor->IsSupported(aFunction); + } + +// ----------------------------------------------------------------------------- +void CTsResourceManager::HandleDataL(TInt aFunction, RReadStream& aDataStream) + { + iMonitor->HandleDataL(aFunction, aDataStream); + } diff -r efda7c0771b9 -r 7b66bc3c6dc9 taskswitcher/server/src/tsrunningappentry.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/taskswitcher/server/src/tsrunningappentry.cpp Mon Oct 18 10:44:15 2010 +0300 @@ -0,0 +1,326 @@ +/* + * Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). + * All rights reserved. + * This component and the accompanying materials are made available + * under the terms of "Eclipse Public License v1.0" + * which accompanies this distribution, and is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". + * + * Initial Contributors: + * Nokia Corporation - initial contribution. + * + * Contributors: + * + * Description: Task list entry + * + */ + +#include +#include +#include +#include +#include +#include + +#include "tsrunningappentry.h" +#include "tsiconprovider.h" +#include "tsdataobserver.h" +#include "tsthumbnailprovider.h" +#include "tsresourcemanager.h" + +// -------------------------------------------------------------------------- +CTsRunningAppEntry* CTsRunningAppEntry::NewL(const TTsEntryKey aKey, + const MTsRunningApplication& aCacheEntry, + MTsResourceManager& aResources, + MTsDataObserver &aObserver, + QObject* aObj) +{ + CTsRunningAppEntry* self = NewLC(aKey, + aCacheEntry , + aResources, + aObserver, + aObj); + CleanupStack::Pop(self); + return self; +} + +// -------------------------------------------------------------------------- +CTsRunningAppEntry* CTsRunningAppEntry::NewLC(const TTsEntryKey aKey, + const MTsRunningApplication& aCacheEntry, + MTsResourceManager& aResources, + MTsDataObserver &aObserver, + QObject* aObj) +{ + CTsRunningAppEntry* self = new (ELeave) CTsRunningAppEntry(aKey, + aResources, + aObserver); + CleanupStack::PushL(self); + self->ConstructL(aCacheEntry, aObj); + return self; +} + +// -------------------------------------------------------------------------- +CTsRunningAppEntry::~CTsRunningAppEntry() +{ + delete iCaption; + delete iThumbnail; + delete iThumbnailProvider; +} + +// -------------------------------------------------------------------------- +CTsRunningAppEntry::CTsRunningAppEntry(const TTsEntryKey aKey, + MTsResourceManager& aResources, + MTsDataObserver &aObserver) +: + iResources(aResources), + iObserver(aObserver), + iKey(aKey) +{ +} + +// -------------------------------------------------------------------------- +void CTsRunningAppEntry::ConstructL(const MTsRunningApplication& aCacheEntry, + QObject* aObject ) + { + iUid = aCacheEntry.Uid(); + iIsSystem = aCacheEntry.IsSystem(); + iHideMode = aCacheEntry.HideMode(); + iWindowGroupId = aCacheEntry.WindowGroupId(); + iParentWindowGroupId = aCacheEntry.ParentWindowGroupId(); + iTimestamp.UniversalTime(); + iUpdateTimestamp.UniversalTime(); + CreateDisplayNameL(aCacheEntry); + QT_TRYCATCH_LEAVING( + iThumbnailProvider = new TsThumbnailProvider(*this, aObject); + ) + } + +// -------------------------------------------------------------------------- +void CTsRunningAppEntry::CreateDisplayNameL(const MTsRunningApplication& aCacheEntry) + { + TApaAppInfo info; + iResources.ApaSession().GetAppInfo( info, aCacheEntry.Uid() ); + TPtrC caption = info.iShortCaption; + + if (!caption.Length() ) // if not set - use thread name instead + { + if( aCacheEntry.DisplayName().Length() ) + { + iCaption = aCacheEntry.DisplayName().AllocL(); + } + else + { + TThreadId threadId; + if(KErrNone == iResources.WsSession().GetWindowGroupClientThreadId( aCacheEntry.WindowGroupId(), threadId ) ) + { + RThread thread; + CleanupClosePushL( thread ); + if( KErrNone == thread.Open( threadId ) ) + { + iCaption = thread.Name().AllocL(); + } + CleanupStack::PopAndDestroy( &thread ); + } + } + } + else + { + iCaption = caption.AllocL(); + } + } + +// -------------------------------------------------------------------------- +TUid CTsRunningAppEntry::Uid()const + { + return iUid; + } +// -------------------------------------------------------------------------- +MTsRunningApplication::ApplicationHideMode CTsRunningAppEntry::HideMode() const + { + return iHideMode; + } + +// -------------------------------------------------------------------------- +void CTsRunningAppEntry::SetHidden( TBool aHidden ) + { + iHideMode = aHidden ? MTsRunningApplication::Software : + MTsRunningApplication::None; + } + +// -------------------------------------------------------------------------- +TBool CTsRunningAppEntry::IsSystem() const + { + return iIsSystem; + } + +// -------------------------------------------------------------------------- +TInt CTsRunningAppEntry::WindowGroupId() const + { + return iWindowGroupId; + } + +// -------------------------------------------------------------------------- +TInt CTsRunningAppEntry::ParentWindowGroupId() const + { + return iParentWindowGroupId; + } + +// -------------------------------------------------------------------------- +TBool CTsRunningAppEntry::IsEmbeded() const + { + return (0 >= iParentWindowGroupId); + } + +// -------------------------------------------------------------------------- +const TDesC& CTsRunningAppEntry::DisplayName() const + { + return iCaption ? *iCaption : KNullDesC(); + } + +// -------------------------------------------------------------------------- +TInt CTsRunningAppEntry::IconHandle() const + { + if( 0 == iThumbnail ) + { + TRAP_IGNORE( CFbsBitmap *icon(new(ELeave) CFbsBitmap()); + CleanupStack::PushL(icon); + iResources.IconProvider().LoadIconL(*icon, Uid()); + CleanupStack::Pop(icon); + iThumbnail = icon;) + } + return iThumbnail ? iThumbnail->Handle() : KErrNotFound; + } +// -------------------------------------------------------------------------- +TTime CTsRunningAppEntry::Timestamp() const + { + return iTimestamp; + } + +// -------------------------------------------------------------------------- +TTime CTsRunningAppEntry::TimestampUpdate() const + { + return iUpdateTimestamp; + } + +// -------------------------------------------------------------------------- +TTsEntryKey CTsRunningAppEntry::Key() const + { + return iKey; + } + +// -------------------------------------------------------------------------- +TBool CTsRunningAppEntry::IsActive() const + { + return true; + } + +// -------------------------------------------------------------------------- +TBool CTsRunningAppEntry::IsClosable() const + { + return !iIsSystem; + } + +// -------------------------------------------------------------------------- +TBool CTsRunningAppEntry::Close() const + { + TApaTask task( iResources.WsSession() ); + task.SetWgId( WindowGroupId() ); + task.EndTask(); + return ETrue; + } + +// -------------------------------------------------------------------------- +TBool CTsRunningAppEntry::Launch() const + { + TApaTask task = TApaTaskList( iResources.WsSession() ).FindApp( iUid ); + task.BringToForeground(); + return task.Exists(); + } + +// -------------------------------------------------------------------------- +TBool CTsRunningAppEntry::IsMandatory() const + { + return ETrue; + } + +// -------------------------------------------------------------------------- +void CTsRunningAppEntry::RefreshTimestamp() + { + iTimestamp.UniversalTime(); + RefreshUpdateTimestamp(); + } + +// -------------------------------------------------------------------------- +/** + * Set new value of updates timestamp + */ +void CTsRunningAppEntry::RefreshUpdateTimestamp() + { + iUpdateTimestamp.UniversalTime(); + } + +// -------------------------------------------------------------------------- +void CTsRunningAppEntry::SetCloseableApp(TBool aClosable) + { + iIsSystem = !aClosable; + } + +// -------------------------------------------------------------------------- +// CTsFswEntry::SetScreenshot +// -------------------------------------------------------------------------- +// +void CTsRunningAppEntry::SetScreenshotL(const CFbsBitmap &bitmapArg, UpdatePriority priority, TInt angle) + { + if(Low == priority ) + { + RefreshTimestamp(); + } + if( priority < iPriority ) + { + User::Leave(KErrAccessDenied); + } + + CFbsBitmap* bitmap = new (ELeave) CFbsBitmap; + CleanupStack::PushL(bitmap); + User::LeaveIfError(bitmap->Duplicate(bitmapArg.Handle())); + CleanupStack::Pop(bitmap); + + iPriority = priority; + delete iThumbnail; + iThumbnail = bitmap; + RefreshUpdateTimestamp(); + + iThumbnailProvider->createThumbnail( *iThumbnail, angle); + } + +// -------------------------------------------------------------------------- +// CTsFswEntry::RemoveScreenshot +// -------------------------------------------------------------------------- +// +void CTsRunningAppEntry::RemoveScreenshotL() + { + if (!iThumbnail) { + User::Leave(KErrNotFound); + } + delete iThumbnail; + iThumbnail = NULL; + iPriority = Low; + + iObserver.DataChanged(); + RefreshUpdateTimestamp(); + } + +// -------------------------------------------------------------------------- +/** + * Interface implementation + * @see MTsThumbnailObserver::ThumbnailCreated( const CFbsBitmap& ) + */ +void CTsRunningAppEntry::ThumbnailCreated(const CFbsBitmap& aThumbnail) + { + iThumbnail->Reset(); + iThumbnail->Duplicate(aThumbnail.Handle()); + RefreshUpdateTimestamp(); + iObserver.DataChanged(); + } + +// end of file diff -r efda7c0771b9 -r 7b66bc3c6dc9 taskswitcher/server/src/tsrunningappimp.cpp --- a/taskswitcher/server/src/tsrunningappimp.cpp Wed Oct 13 12:59:22 2010 +0300 +++ b/taskswitcher/server/src/tsrunningappimp.cpp Mon Oct 18 10:44:15 2010 +0300 @@ -16,7 +16,7 @@ */ #include - +#include "tsentrykey.h" #include "tsrunningappimp.h" #include "tsresourcemanager.h" @@ -27,6 +27,7 @@ { CTsRunningApp* self = new(ELeave) CTsRunningApp(aResources, aInfo); CleanupStack::PushL( self ); + self->ConstructL(); return self; } @@ -46,27 +47,31 @@ //No implementation required } -//------------------------------------------------------------------------------ -const CApaWindowGroupName& CTsRunningApp::WindowGroupNameL() const +void CTsRunningApp::ConstructL() { - if( 0 == iWindowGroupName ) - { - iWindowGroupName = CApaWindowGroupName::NewL( iResources.WsSession(), - WindowGroupId() ); - } - return *iWindowGroupName; + iWindowGroupName = CApaWindowGroupName::NewL( iResources.WsSession(), + WindowGroupId() ); + iCaption.Set(iWindowGroupName->Caption()); + } //------------------------------------------------------------------------------ -TUid CTsRunningApp::UidL()const +void CTsRunningApp::RefreshDataL() { - return WindowGroupNameL().AppUid(); + delete iWindowGroupName; + iWindowGroupName =0; + ConstructL(); } //------------------------------------------------------------------------------ -const TDesC& CTsRunningApp::CaptionL() const +TUid CTsRunningApp::Uid()const { - iCaption.Set(WindowGroupNameL().Caption()); + return iWindowGroupName->AppUid(); + } + +//------------------------------------------------------------------------------ +const TDesC& CTsRunningApp::DisplayName() const + { return iCaption; } @@ -90,13 +95,76 @@ } //------------------------------------------------------------------------------ -TBool CTsRunningApp::IsHiddenL() const +MTsRunningApplication::ApplicationHideMode CTsRunningApp::HideMode() const + { + return iWindowGroupName->Hidden() ? + MTsRunningApplication::System : + iHideMode; + } + +//------------------------------------------------------------------------------ +TBool CTsRunningApp::IsSystem() const { - return WindowGroupNameL().Hidden(); + return iWindowGroupName->IsSystem(); + } + +//------------------------------------------------------------------------------ +void CTsRunningApp::SetHidden( TBool aHidden ) + { + iHideMode = aHidden ? MTsRunningApplication::Software : + MTsRunningApplication::None; + } + +//------------------------------------------------------------------------------ +TInt CTsRunningApp::IconHandle() const + { + return KErrNotFound; + } + +//------------------------------------------------------------------------------ +TTime CTsRunningApp::Timestamp() const + { + return iTimestap; } //------------------------------------------------------------------------------ -TBool CTsRunningApp::IsSystemL() const +TTime CTsRunningApp::TimestampUpdate() const + { + return iUpdateTimestap; + } + +//------------------------------------------------------------------------------ +TTsEntryKey CTsRunningApp::Key() const + { + return TTsEntryKey(WindowGroupId(), ParentWindowGroupId()); + } + +//------------------------------------------------------------------------------ +TBool CTsRunningApp::IsActive() const + { + return ETrue; + } + +//------------------------------------------------------------------------------ +TBool CTsRunningApp::IsClosable() const { - return WindowGroupNameL().IsSystem(); + return !iWindowGroupName->IsSystem(); + } + +//------------------------------------------------------------------------------ +TBool CTsRunningApp::Close() const + { + return EFalse; } + +//------------------------------------------------------------------------------ +TBool CTsRunningApp::Launch() const + { + return EFalse; + } + +//------------------------------------------------------------------------------ +TBool CTsRunningApp::IsMandatory() const + { + return ETrue; + } diff -r efda7c0771b9 -r 7b66bc3c6dc9 taskswitcher/server/src/tsrunningappmodel.cpp --- a/taskswitcher/server/src/tsrunningappmodel.cpp Wed Oct 13 12:59:22 2010 +0300 +++ b/taskswitcher/server/src/tsrunningappmodel.cpp Mon Oct 18 10:44:15 2010 +0300 @@ -112,69 +112,58 @@ iObserver = aObserver; } -const TDesC& CTsRunningAppModel::DisplayNameL( TInt aOffset ) const +const TDesC& CTsRunningAppModel::DisplayName( TInt aOffset ) const { - return iDataList->Data()[aOffset]->AppName(); + return iDataList->Data()[aOffset]->DisplayName(); } -TInt CTsRunningAppModel::IconHandleL( TInt aOffset ) const +TInt CTsRunningAppModel::IconHandle( TInt aOffset ) const { - CFbsBitmap *bitmap = iDataList->Data()[aOffset]->Screenshot(); - if( !bitmap ) - { - bitmap = iDataList->Data()[aOffset]->AppIconBitmap(); - } - return bitmap ? bitmap->Handle() : KErrNotFound; + return iDataList->Data()[aOffset]->IconHandle(); + } -TTime CTsRunningAppModel::TimestampL( TInt aOffset ) const +TTime CTsRunningAppModel::Timestamp( TInt aOffset ) const { return iDataList->Data()[aOffset]->Timestamp(); } -TTime CTsRunningAppModel::TimestampUpdateL(TInt offset) const +TTime CTsRunningAppModel::TimestampUpdate(TInt offset) const { - return iDataList->Data()[offset]->LastUpdateTimestamp(); + return iDataList->Data()[offset]->TimestampUpdate(); } -TTsModelItemKey CTsRunningAppModel::KeyL( TInt aOffset ) const +TTsEntryKey CTsRunningAppModel::Key( TInt aOffset ) const { - return TTsModelItemKey(iDataList->Data()[aOffset]->Key().WindowGroupId(), - reinterpret_cast(this)); + return TTsEntryKey(iDataList->Data()[aOffset]->Key().Key(), + reinterpret_cast(this)); } -TBool CTsRunningAppModel::IsActiveL( TInt /*aOffset*/ ) const +TBool CTsRunningAppModel::IsActive( TInt /*aOffset*/ ) const { return ETrue; } -TBool CTsRunningAppModel::IsClosableL( TInt aOffset ) const +TBool CTsRunningAppModel::IsClosable( TInt aOffset ) const { - return iDataList->Data()[aOffset]->CloseableApp(); + return iDataList->Data()[aOffset]->IsClosable(); } -TBool CTsRunningAppModel::IsMandatoryL( TInt /*aOffset*/ ) const +TBool CTsRunningAppModel::IsMandatory( TInt /*aOffset*/ ) const { return ETrue; } -TBool CTsRunningAppModel::CloseL( TTsModelItemKey aKey ) const +TBool CTsRunningAppModel::Close( TTsEntryKey aKey ) const { - TApaTask task( iResources.WsSession() ); - task.SetWgId( aKey.Key() ); - task.EndTask(); - return ETrue; + TBool retVal(EFalse); + TRAP_IGNORE(retVal = iDataList->FindL(aKey).Close()); + return retVal; } -TBool CTsRunningAppModel::LaunchL( TTsModelItemKey aKey ) const +TBool CTsRunningAppModel::Launch( TTsEntryKey aKey ) const { - // find uid by wgid from key - CApaWindowGroupName *windowGroupName = - CApaWindowGroupName::NewLC( iResources.WsSession(), aKey.Key() ); - TUid uid = windowGroupName->AppUid(); - CleanupStack::PopAndDestroy( windowGroupName ); - - TApaTask task = TApaTaskList( iResources.WsSession() ).FindApp( uid ); - task.BringToForeground(); - return task.Exists(); + TBool retVal(EFalse); + TRAP_IGNORE(retVal = iDataList->FindL(aKey).Launch()); + return retVal; } diff -r efda7c0771b9 -r 7b66bc3c6dc9 taskswitcher/server/src/tsrunningappserver.cpp --- a/taskswitcher/server/src/tsrunningappserver.cpp Wed Oct 13 12:59:22 2010 +0300 +++ b/taskswitcher/server/src/tsrunningappserver.cpp Mon Oct 18 10:44:15 2010 +0300 @@ -86,7 +86,7 @@ iStorage = CTsStorage::NewL(providers.Array()); iStorage->SetObserver(iSerializer); CleanupStack::PopAndDestroy(&providers); - + // load initial data iStorage->DataChanged(); } @@ -103,6 +103,7 @@ CleanupClosePushL(dataStorages); dataStorages.AppendL(const_cast(this)->iAppsModel); dataStorages.AppendL(const_cast(this)->iStorage); + dataStorages.AppendL(const_cast(this)->iResources); CSession2* retVal = CTsRunningAppSession::NewL( *const_cast(this)->iSerializer, dataStorages.Array()); diff -r efda7c0771b9 -r 7b66bc3c6dc9 taskswitcher/server/src/tsrunningappstorageimp.cpp --- a/taskswitcher/server/src/tsrunningappstorageimp.cpp Wed Oct 13 12:59:22 2010 +0300 +++ b/taskswitcher/server/src/tsrunningappstorageimp.cpp Mon Oct 18 10:44:15 2010 +0300 @@ -14,16 +14,27 @@ * Description : * */ +#include "tsutils.h" +#include "tsentrykey.h" #include "tsrunningappstorageimp.h" + //------------------------------------------------------------------------------ CTsRunningAppStorage* CTsRunningAppStorage::NewLC() { CTsRunningAppStorage* self = new(ELeave) CTsRunningAppStorage(); CleanupStack::PushL( self ); + self->iRunningApps = new (ELeave)CArrayPtrFlat(1); return self; } //------------------------------------------------------------------------------ +CTsRunningAppStorage* CTsRunningAppStorage::NewL() + { + CTsRunningAppStorage* self( CTsRunningAppStorage::NewLC() ); + CleanupStack::Pop( self ); + return self; + } +//------------------------------------------------------------------------------ CTsRunningAppStorage::CTsRunningAppStorage() { //No implementation required @@ -31,9 +42,14 @@ //------------------------------------------------------------------------------ CTsRunningAppStorage::~CTsRunningAppStorage() -{ - iRunningApps.ResetAndDestroy(); -} + { + if( 0 != iRunningApps ) + { + iRunningApps->ResetAndDestroy(); + } + delete iRunningApps; + iBlockedWindowGroups.Close(); + } //------------------------------------------------------------------------------ void CTsRunningAppStorage::HandleWindowGroupChanged( @@ -41,15 +57,34 @@ const TArray & aWindowGroups ) { CTsRunningApp* app(0); - iRunningApps.ResetAndDestroy(); iBlockedWindowGroups.Reset(); TRAP_IGNORE( - for( TInt iter(0); iter < aWindowGroups.Count(); ++iter ) + CArrayPtr *runningApps(new (ELeave)CArrayPtrFlat(aWindowGroups.Count())); + TaskSwitcher::CleanupResetAndDestroyPushL(runningApps); + for(TInt current(0); current < aWindowGroups.Count(); ++current) { - app = CTsRunningApp::NewLC(aResources, aWindowGroups[iter]); - iRunningApps.AppendL(app); + app = 0; + for(TInt old(0); 0 == app && old < iRunningApps->Count(); ++old) + { + if(iRunningApps->At(old)->WindowGroupId() == aWindowGroups[current].iId) + { + app = iRunningApps->At(old); + iRunningApps->Delete(old); + CleanupStack::PushL(app); + app->RefreshDataL(); + } + } + if(0 == app) + { + app = CTsRunningApp::NewLC(aResources, aWindowGroups[current]); + } + runningApps->InsertL(current, app); CleanupStack::Pop(app); } + iRunningApps->ResetAndDestroy(); + delete iRunningApps; + iRunningApps = runningApps; + CleanupStack::Pop(runningApps); )//TRAP_IGNORE } @@ -65,7 +100,7 @@ { for(filtered = 0; filtered < aFiltered.Count(); ++filtered) { - if(aFull[full].iId == aFiltered[ filtered].iId) + if(aFull[full].iId == aFiltered[filtered].iId) { break; } @@ -77,15 +112,15 @@ } } //------------------------------------------------------------------------------ -const MTsRunningApplication& CTsRunningAppStorage::operator[] (TInt aOffset) const +MTsRunningApplication& CTsRunningAppStorage::operator[] (TInt aOffset) const { - return *iRunningApps[aOffset]; + return *(*iRunningApps)[aOffset]; } //------------------------------------------------------------------------------ TInt CTsRunningAppStorage::Count() const { - return iRunningApps.Count(); + return iRunningApps->Count(); } //------------------------------------------------------------------------------ @@ -103,12 +138,46 @@ } //------------------------------------------------------------------------------ +TInt CTsRunningAppStorage::GenerateKey( TTsEntryKey& aReturnKey, + TInt aWindowGroupId) const + { + return GenerateKey(aReturnKey, aWindowGroupId, 0); + } + +//------------------------------------------------------------------------------ +TInt CTsRunningAppStorage::GenerateKey( TTsEntryKey& aReturnKey, + TInt aWindowGroupId, + TInt aOffset) const + { + TInt retVal(Find(aWindowGroupId, aOffset)); + if( KErrNotFound != retVal ) + { + CTsRunningApp &app(*iRunningApps->At(retVal)); + if(app.WindowGroupId() == app.ParentWindowGroupId()) + { + retVal = KErrBadHandle; + } + else if( app.IsEmbeded() ) + { + retVal = GenerateKey(aReturnKey, app.ParentWindowGroupId(), retVal); + } + else + { + aReturnKey = app.Key(); + retVal = KErrNone; + } + } + return retVal; + } + +//------------------------------------------------------------------------------ TInt CTsRunningAppStorage::ParentIndex( TInt aOffset ) const { TInt retval(aOffset); - if(iRunningApps[aOffset]->IsEmbeded()) + + if((*iRunningApps)[aOffset]->IsEmbeded()) { - const TInt parentIndex( Find(iRunningApps[aOffset]->ParentWindowGroupId(), + const TInt parentIndex( Find((*iRunningApps)[aOffset]->ParentWindowGroupId(), aOffset + 1) ); if( KErrNotFound != parentIndex ) { @@ -123,10 +192,10 @@ { TInt retVal(KErrNotFound); for( TInt iter(aOffset); - KErrNotFound == retVal && iter < iRunningApps.Count(); + KErrNotFound == retVal && iter < iRunningApps->Count(); ++iter ) { - if( iRunningApps[iter]->WindowGroupId() == aWindowGroupId ) + if( (*iRunningApps)[iter]->WindowGroupId() == aWindowGroupId ) { retVal = iter; } diff -r efda7c0771b9 -r 7b66bc3c6dc9 taskswitcher/server/src/tsscreenshotprovider.cpp --- a/taskswitcher/server/src/tsscreenshotprovider.cpp Wed Oct 13 12:59:22 2010 +0300 +++ b/taskswitcher/server/src/tsscreenshotprovider.cpp Mon Oct 18 10:44:15 2010 +0300 @@ -16,6 +16,7 @@ */ #include +#include "tsresourcemanager.h" #include "tswindowgroupsmonitor.h" #include "tsrunningapp.h" #include "tsrunningappstorage.h" @@ -26,12 +27,7 @@ const TUid KPluginUID = {0x200267AE}; -const TInt KSkippedApp [] = {0x20022F35 /* <-- hsapplication */, - 0x100058F3 /* <-- sysapp*/}; // ----------------------------------------------------------------------------- -// -// ----------------------------------------------------------------------------- -// CTsScreenshotProvider* CTsScreenshotProvider::NewL( MTsDataStorage& aStorage, MTsWindowGroupsMonitor& aMonitor) { @@ -83,41 +79,21 @@ * @see MTsWindowGroupsObserver::HandleWindowGroupChangedL */ void CTsScreenshotProvider::HandleWindowGroupChangedL( - MTsResourceManager& /*aResources*/, + MTsResourceManager& aResources, const MTsRunningApplicationStorage& aStorage) { - const TInt count(sizeof( KSkippedApp ) / sizeof(TInt)); + CTsIdList* list = CTsIdList::NewLC(); for( TInt allowed(0); allowed < aStorage.Count(); ++allowed ) { - if(!aStorage[allowed].IsHiddenL()) + if(!IsBlocked(aResources, aStorage[allowed])) { - TBool isBlocked(EFalse); - for( TInt blocked(0); !isBlocked && blocked < count; ++blocked ) - { - isBlocked = (KSkippedApp[blocked] == aStorage[allowed].UidL().iUid); - } - if(!isBlocked) - { - list->AppendL(aStorage[allowed].WindowGroupId()); - } + list->AppendL(aStorage[allowed].WindowGroupId()); } } if( *iCache != *list ) { - RBuf8 message; - CleanupClosePushL(message); - message.CreateL(list->Size() + sizeof(TInt)); - - RDesWriteStream stream; - CleanupClosePushL(stream); - stream.Open(message); - stream.WriteInt32L(AllowedWindowGroups); - stream << (*list); - CleanupStack::PopAndDestroy(&stream); - - SendMessage(message); - CleanupStack::PopAndDestroy(&message); + SendWhiteListL(*list); } delete iCache; iCache = list; @@ -125,6 +101,32 @@ } // ----------------------------------------------------------------------------- +TBool CTsScreenshotProvider::IsBlocked(const MTsResourceManager& aResources, + const MTsRunningApplication& aApp) const + { + return MTsRunningApplication::System == aApp.HideMode() || + aResources.ApplicationsBlackList().IsPresent(aApp.Uid().iUid); + } + +// ----------------------------------------------------------------------------- +void CTsScreenshotProvider::SendWhiteListL(const CTsIdList& aList) + { + RBuf8 message; + CleanupClosePushL(message); + message.CreateL(aList.Size() + sizeof(TInt)); + + RDesWriteStream stream; + CleanupClosePushL(stream); + stream.Open(message); + stream.WriteInt32L(AllowedWindowGroups); + stream << aList; + CleanupStack::PopAndDestroy(&stream); + + SendMessage(message); + CleanupStack::PopAndDestroy(&message); + } + +// ----------------------------------------------------------------------------- void CTsScreenshotProvider::HandleMessage( const TDesC8& aMsg ) { TRAP_IGNORE( HandleMessageL( aMsg ) ); diff -r efda7c0771b9 -r 7b66bc3c6dc9 taskswitcher/server/src/tsservice.cpp --- a/taskswitcher/server/src/tsservice.cpp Wed Oct 13 12:59:22 2010 +0300 +++ b/taskswitcher/server/src/tsservice.cpp Mon Oct 18 10:44:15 2010 +0300 @@ -27,18 +27,14 @@ // ----------------------------------------------------------------------------- -LOCAL_C QVariantHash valueL( QObject *aModel, TInt aOffset ) +LOCAL_C QVariantHash value( QObject *aModel, TInt aOffset ) { QList items; QMetaObject::invokeMethod( aModel, "taskList", Q_RETURN_ARG(QList, items ) ); - if( aOffset >= items.count() ) - { - User::Leave(KErrCorrupt); - } - return items.at(aOffset); + return (items.count() > aOffset) ? items.at(aOffset) : QVariantHash(); } // ----------------------------------------------------------------------------- @@ -107,57 +103,57 @@ } // ----------------------------------------------------------------------------- -const TDesC& CTsService::DisplayNameL( TInt aOffset ) const +const TDesC& CTsService::DisplayName( TInt aOffset ) const { - return StringValueL( aOffset, "TaskName" ); + return StringValue( aOffset, "TaskName" ); } // ----------------------------------------------------------------------------- -TInt CTsService::IconHandleL( TInt aOffset ) const +TInt CTsService::IconHandle( TInt aOffset ) const { - return IntValueL( aOffset, "TaskScreenshot" ); + return IntValue( aOffset, "TaskScreenshot" ); } // ----------------------------------------------------------------------------- -TTime CTsService::TimestampL( TInt aOffset ) const +TTime CTsService::Timestamp( TInt aOffset ) const { - return TimeValueL( aOffset, "TaskTimestamp" ); + return TimeValue( aOffset, "TaskTimestamp" ); } // ----------------------------------------------------------------------------- -TTime CTsService::TimestampUpdateL(TInt offset) const +TTime CTsService::TimestampUpdate(TInt offset) const { - return TimeValueL(offset, "TaskUpdateTimestamp"); + return TimeValue(offset, "TaskUpdateTimestamp"); } -TTsModelItemKey CTsService::KeyL( TInt aOffset ) const +TTsEntryKey CTsService::Key( TInt aOffset ) const { - return TTsModelItemKey( IntValueL( aOffset, "TaskId" ), - reinterpret_cast( this ) ); + return TTsEntryKey( IntValue( aOffset, "TaskId" ), + reinterpret_cast( this ) ); } // ----------------------------------------------------------------------------- -TBool CTsService::IsActiveL( TInt aOffset ) const +TBool CTsService::IsActive( TInt aOffset ) const { - return IntValueL( aOffset, "TaskIsRunning" ); + return IntValue( aOffset, "TaskIsRunning" ); } // ----------------------------------------------------------------------------- -TBool CTsService::IsClosableL( TInt aOffset ) const +TBool CTsService::IsClosable( TInt aOffset ) const { - return IntValueL( aOffset, "TaskCanBeClosed" ); + return IntValue( aOffset, "TaskCanBeClosed" ); } // ----------------------------------------------------------------------------- -TBool CTsService::IsMandatoryL( TInt aOffset ) const +TBool CTsService::IsMandatory( TInt aOffset ) const { - const QVariantHash values(valueL(iModel, aOffset)); + const QVariantHash values(value(iModel, aOffset)); const QString key("TaskIsMandatory"); return values.contains(key) ? values.value(key).toInt() : ETrue; } // ----------------------------------------------------------------------------- -TBool CTsService::CloseL( TTsModelItemKey aKey ) const +TBool CTsService::Close( TTsEntryKey aKey ) const { bool result(false); QMetaObject::invokeMethod( iModel, @@ -168,7 +164,7 @@ } // ----------------------------------------------------------------------------- -TBool CTsService::LaunchL( TTsModelItemKey aKey ) const +TBool CTsService::Launch( TTsEntryKey aKey ) const { bool result(false); QMetaObject::invokeMethod( iModel, @@ -179,30 +175,31 @@ } // ----------------------------------------------------------------------------- -TInt CTsService::IntValueL( TInt aOffset, const char* aKey) const +TInt CTsService::IntValue( TInt aOffset, const char* aKey) const { - return valueL(iModel, aOffset).value( aKey ).toInt(); + return value(iModel, aOffset).value( aKey ).toInt(); } // ----------------------------------------------------------------------------- -TTime CTsService::TimeValueL(TInt aOffset, const char* aKey) const +TTime CTsService::TimeValue(TInt aOffset, const char* aKey) const { // Conversion between TTime which counts from year 0, and QDateTime which uses unix epoch (1st Jan 1970) - QDateTime timestamp = valueL( iModel, aOffset ).value( aKey ).toDateTime(); + QDateTime timestamp = value( iModel, aOffset ).value( aKey ).toDateTime(); return TTime( _L( "19700000:" ) ) + TTimeIntervalSeconds( timestamp.toTime_t() ) + TTimeIntervalMicroSeconds( timestamp.time().msec() * 1000 ); } // ----------------------------------------------------------------------------- -const TDesC& CTsService::StringValueL( TInt aOffset, const char* aKey ) const +const TDesC& CTsService::StringValue( TInt aOffset, const char* aKey ) const { delete iBuffer; - const_cast(this)->iBuffer = 0; + iBuffer = 0; - const QVariantHash item(valueL(iModel, aOffset)); - QT_TRYCATCH_LEAVING( - const_cast(this)->iBuffer = - XQConversions::qStringToS60Desc(item.value(aKey).toString())); - return *iBuffer; + const QVariantHash item(value(iModel, aOffset)); + try { + iBuffer = XQConversions::qStringToS60Desc(item.value(aKey).toString()); + } catch(...) { } + return iBuffer ? *iBuffer : KNullDesC(); + } diff -r efda7c0771b9 -r 7b66bc3c6dc9 taskswitcher/server/src/tsstorage.cpp --- a/taskswitcher/server/src/tsstorage.cpp Wed Oct 13 12:59:22 2010 +0300 +++ b/taskswitcher/server/src/tsstorage.cpp Mon Oct 18 10:44:15 2010 +0300 @@ -94,7 +94,7 @@ User::Leave( KErrCorrupt ); } CTsModelItemKeyMsg* msg = CTsModelItemKeyMsg::NewLC( aDataStream ); - OpenTaskMessage == aFunction ? LaunchL( msg->Key() ) : CloseL( msg->Key() ); + OpenTaskMessage == aFunction ? Launch( msg->Key() ) : Close( msg->Key() ); CleanupStack::PopAndDestroy( msg ); } @@ -133,9 +133,9 @@ * Interface implementation * @see MTsModel::DisplayNameL(TInt) */ -const TDesC& CTsStorage::DisplayNameL( TInt aOffset ) const +const TDesC& CTsStorage::DisplayName( TInt aOffset ) const { - return iData[aOffset].DisplayNameL(); + return iData[aOffset].DisplayName(); } // ----------------------------------------------------------------------------- @@ -143,9 +143,9 @@ * Interface implementation * @see MTsModel::IconHandleL(TInt) */ -TInt CTsStorage::IconHandleL( TInt aOffset ) const +TInt CTsStorage::IconHandle( TInt aOffset ) const { - return iData[aOffset].IconHandleL(); + return iData[aOffset].IconHandle(); } // ----------------------------------------------------------------------------- @@ -153,9 +153,9 @@ * Interface implementation * @see MTsModel::TimestampL(TInt) */ -TTime CTsStorage::TimestampL( TInt aOffset ) const +TTime CTsStorage::Timestamp( TInt aOffset ) const { - return iData[aOffset].TimestampL(); + return iData[aOffset].Timestamp(); } // ----------------------------------------------------------------------------- @@ -163,29 +163,29 @@ * Interface implementation * @see MTsModel::TimestampUpdateL(TInt) */ -TTime CTsStorage::TimestampUpdateL( TInt offset ) const +TTime CTsStorage::TimestampUpdate( TInt offset ) const { - return iData[offset].TimestampUpdateL(); + return iData[offset].TimestampUpdate(); } // ----------------------------------------------------------------------------- /** * Interface implementation - * @see MTsModel::KeyL(TInt) + * @see MTsModel::Key(TInt) */ -TTsModelItemKey CTsStorage::KeyL( TInt aoffset ) const +TTsEntryKey CTsStorage::Key( TInt aoffset ) const { - return iData[aoffset].KeyL(); + return iData[aoffset].Key(); } // ----------------------------------------------------------------------------- /** * Interface implementation - * @see MTsModel::IsActiveL(TInt) + * @see MTsModel::IsActive(TInt) */ -TBool CTsStorage::IsActiveL( TInt aOffset ) const +TBool CTsStorage::IsActive( TInt aOffset ) const { - return iData[aOffset].IsActiveL(); + return iData[aOffset].IsActive(); } // ----------------------------------------------------------------------------- @@ -193,9 +193,9 @@ * Interface implementation * @see MTsModel::IsClosableL(TInt) */ -TBool CTsStorage::IsClosableL( TInt aOffset ) const +TBool CTsStorage::IsClosable( TInt aOffset ) const { - return iData[aOffset].IsClosableL(); + return iData[aOffset].IsClosable(); } // ----------------------------------------------------------------------------- @@ -203,37 +203,41 @@ * Interface implementation * @see MTsModel::IsMandatoryL(TInt) const */ -TBool CTsStorage::IsMandatoryL( TInt aOffset ) const +TBool CTsStorage::IsMandatory( TInt aOffset ) const { - return iData[aOffset].IsMandatoryL(); + return iData[aOffset].IsMandatory(); } // ----------------------------------------------------------------------------- /** * Interface implementation - * @see MTsModel::CloseL(TTsModelItemKey) + * @see MTsModel::Close(TTsModelItemKey) */ -TBool CTsStorage::CloseL( TTsModelItemKey aKey ) const +TBool CTsStorage::Close( TTsEntryKey aKey ) const { - return FindL(aKey).CloseL(); + TBool retVal(EFalse); + TRAP_IGNORE(retVal = FindL(aKey).Close()) + return retVal; } // ----------------------------------------------------------------------------- /** * Interface implementation - * @see MTsModel::launchL(TTsModelItemKey) + * @see MTsModel::Launch(TTsModelItemKey) */ -TBool CTsStorage::LaunchL(TTsModelItemKey aKey) const +TBool CTsStorage::Launch(TTsEntryKey aKey) const { - return FindL(aKey).LaunchL(); + TBool retVal(EFalse); + TRAP_IGNORE(retVal = FindL(aKey).Launch()) + return retVal; } // ----------------------------------------------------------------------------- -TTsModelItem CTsStorage::FindL( TTsModelItemKey aKey ) const +TTsModelItem CTsStorage::FindL( TTsEntryKey aKey ) const { for( TInt offset(0); offset < iData.Count(); ++offset ) { - if( iData[offset].KeyL() == aKey ) + if( iData[offset].Key() == aKey ) { return iData[offset]; } @@ -294,8 +298,8 @@ for( TInt next(prev + 1); next < iData.Count(); ++next ) { const TTsModelItem prevItem(iData[prev]), nextItem(iData[next]); - if( ( !prevItem.IsMandatoryL() && nextItem.IsMandatoryL() ) || - ( prevItem.TimestampL() < nextItem.TimestampL() && prevItem.IsMandatoryL() == nextItem.IsMandatoryL() ) ) + if( ( !prevItem.IsMandatory() && nextItem.IsMandatory() ) || + ( prevItem.Timestamp() < nextItem.Timestamp() && prevItem.IsMandatory() == nextItem.IsMandatory() ) ) { iData.Remove(prev); iData.InsertL(nextItem, prev); @@ -312,7 +316,7 @@ void CTsStorage::TrimDataL() { const TInt lastItemOffset(iData.Count() -1); - if(KTsDataLimit <= lastItemOffset && !iData[lastItemOffset].IsMandatoryL()) + if(KTsDataLimit <= lastItemOffset && !iData[lastItemOffset].IsMandatory()) { iData.Remove(lastItemOffset); TrimDataL(); diff -r efda7c0771b9 -r 7b66bc3c6dc9 taskswitcher/server/src/tswindowgroupsmonitorimp.cpp --- a/taskswitcher/server/src/tswindowgroupsmonitorimp.cpp Wed Oct 13 12:59:22 2010 +0300 +++ b/taskswitcher/server/src/tswindowgroupsmonitorimp.cpp Mon Oct 18 10:44:15 2010 +0300 @@ -19,7 +19,7 @@ #include "tswindowgroupsmonitorimp.h" #include "tsrunningappstorageimp.h" #include "tsresourcemanager.h" - +#include "tsvisibilitymsg.h" const int KOrdinalPositionNoZOrder(-1); // ----------------------------------------------------------------------------- @@ -68,6 +68,9 @@ // Window group change event User::LeaveIfError (iWg.EnableGroupListChangeEvents()); + + iCache = CTsRunningAppStorage::NewL(); + RefreshCacheL(); Subscribe(); } @@ -76,32 +79,78 @@ // ----------------------------------------------------------------------------- // CTsWindowGroupsMonitor::~CTsWindowGroupsMonitor() -{ + { CActive::Cancel(); iWg.Close(); -} + } // ----------------------------------------------------------------------------- // // ----------------------------------------------------------------------------- // void CTsWindowGroupsMonitor::SubscribeL(MTsWindowGroupsObserver &observer) -{ - const TInt offset(iObservers.Find(&observer)); - KErrNotFound == offset ? iObservers.InsertL(&observer, 0) : - User::Leave(KErrAlreadyExists); -} + { + if(KErrNotFound != iObservers.Find(&observer)) + { + User::Leave(KErrAlreadyExists); + } + iObservers.InsertL(&observer, 0); + observer.HandleWindowGroupChanged(iResources, *iCache); + } // ----------------------------------------------------------------------------- // // ----------------------------------------------------------------------------- // void CTsWindowGroupsMonitor::Cancel(MTsWindowGroupsObserver & observer) -{ + { const TInt offset(iObservers.Find(&observer)); - if (KErrNotFound != offset) { + if(KErrNotFound != offset) + { iObservers.Remove(offset); + } } + +// ----------------------------------------------------------------------------- +/** + * @see MTsWindowGroupsMonitor::Storage + */ +const MTsRunningApplicationStorage& CTsWindowGroupsMonitor::Storage() const + { + return *iCache; + } +// ----------------------------------------------------------------------------- +TBool CTsWindowGroupsMonitor::IsSupported(TInt aFunction) const + { + return ( VisibilityChange == aFunction ); + } + +// ----------------------------------------------------------------------------- +void CTsWindowGroupsMonitor::HandleDataL(TInt aFunction, RReadStream& aDataStream) +{ + if(VisibilityChange == aFunction) + { + CTsVisibilitMsg* msg = CTsVisibilitMsg::NewLC(aDataStream); + const TBool hide (Invisible == msg->visibility()); + bool changed = false; + for(TInt offset(0); offset < iCache->Count(); ++offset) + { + if( msg->windowGroupId() == (*iCache)[offset].WindowGroupId() ) + { + (*iCache)[offset].SetHidden(hide); + offset = iCache->Count(); + changed = true; + } + } + if(changed) + { + for( TInt iter(0); iter < iObservers.Count(); ++iter ) + { + iObservers[iter]->HandleWindowGroupChanged( iResources, *iCache ); + } + } + CleanupStack::PopAndDestroy(msg); + } } // ----------------------------------------------------------------------------- @@ -149,34 +198,32 @@ } // ----------------------------------------------------------------------------- -// -// ----------------------------------------------------------------------------- -// void CTsWindowGroupsMonitor::ProvideEventL() -{ + { TWsEvent wsEvent; iResources.WsSession().GetEvent(wsEvent); if( EEventWindowGroupListChanged == wsEvent.Type() ) { - - CTsRunningAppStorage *storage = CTsRunningAppStorage::NewLC(); - - RArray filteredWgInfo, fullWgInfo; - CleanupClosePushL(filteredWgInfo); - CleanupClosePushL(fullWgInfo); - User::LeaveIfError(iResources.WsSession().WindowGroupList(0, &filteredWgInfo)); - User::LeaveIfError(iResources.WsSession().WindowGroupList(&fullWgInfo)); - storage->HandleWindowGroupChanged(iResources, - fullWgInfo.Array(), - filteredWgInfo.Array()); - CleanupStack::PopAndDestroy( &fullWgInfo ); - CleanupStack::PopAndDestroy( &filteredWgInfo ); - - for( TInt iter(0); iter < iObservers.Count(); ++iter ) - { - iObservers[iter]->HandleWindowGroupChanged( iResources, *storage ); - } - CleanupStack::PopAndDestroy( storage ); - + RefreshCacheL(); } -} + } + +// ----------------------------------------------------------------------------- +void CTsWindowGroupsMonitor::RefreshCacheL() + { + RArray filteredWgInfo, fullWgInfo; + CleanupClosePushL(filteredWgInfo); + CleanupClosePushL(fullWgInfo); + User::LeaveIfError(iResources.WsSession().WindowGroupList(0, &filteredWgInfo)); + User::LeaveIfError(iResources.WsSession().WindowGroupList(&fullWgInfo)); + iCache->HandleWindowGroupChanged(iResources, + fullWgInfo.Array(), + filteredWgInfo.Array()); + CleanupStack::PopAndDestroy( &fullWgInfo ); + CleanupStack::PopAndDestroy( &filteredWgInfo ); + + for( TInt iter(0); iter < iObservers.Count(); ++iter ) + { + iObservers[iter]->HandleWindowGroupChanged( iResources, *iCache ); + } + } diff -r efda7c0771b9 -r 7b66bc3c6dc9 taskswitcher/tsdevicedialogplugin/inc/tsmodel.h --- a/taskswitcher/tsdevicedialogplugin/inc/tsmodel.h Wed Oct 13 12:59:22 2010 +0300 +++ b/taskswitcher/tsdevicedialogplugin/inc/tsmodel.h Mon Oct 18 10:44:15 2010 +0300 @@ -41,7 +41,8 @@ QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const; // from QAbstractModel - virtual bool insertRows(int row, int count, TsModelItem *item, + virtual bool insertRows(int row, int count, + QScopedPointer &item, const QModelIndex &parent = QModelIndex()); virtual bool removeRows(int row, int count, const QModelIndex &parent = QModelIndex()); @@ -49,7 +50,7 @@ bool moveRows(int oldPosition, int newPosition, const QModelIndex &parent = QModelIndex()); - bool updateRows(int row, TsModelItem *item); + bool updateRows(int row, QScopedPointer &item); void fullUpdate(); public slots: diff -r efda7c0771b9 -r 7b66bc3c6dc9 taskswitcher/tsdevicedialogplugin/inc/tsmodelitem.h --- a/taskswitcher/tsdevicedialogplugin/inc/tsmodelitem.h Wed Oct 13 12:59:22 2010 +0300 +++ b/taskswitcher/tsdevicedialogplugin/inc/tsmodelitem.h Mon Oct 18 10:44:15 2010 +0300 @@ -20,8 +20,6 @@ #include #include -#include "tsmodelitem.h" - class TsTask; /*! diff -r efda7c0771b9 -r 7b66bc3c6dc9 taskswitcher/tsdevicedialogplugin/src/tsmodel.cpp --- a/taskswitcher/tsdevicedialogplugin/src/tsmodel.cpp Wed Oct 13 12:59:22 2010 +0300 +++ b/taskswitcher/tsdevicedialogplugin/src/tsmodel.cpp Mon Oct 18 10:44:15 2010 +0300 @@ -69,10 +69,11 @@ return mEntries.count(); } -bool TsModel::insertRows(int row, int count, TsModelItem *item, const QModelIndex &parent) +bool TsModel::insertRows(int row, int count, QScopedPointer &item, const QModelIndex &parent) { beginInsertRows(parent, row, row+count-1); - mEntries.insert(row, item); + mEntries.insert(row, item.data()); + item.take(); endInsertRows(); return true; } @@ -97,10 +98,11 @@ } -bool TsModel::updateRows(int row, TsModelItem *item) +bool TsModel::updateRows(int row, QScopedPointer &item) { TsModelItem *oldItem = mEntries.at(row); - mEntries[row] = item; + mEntries[row] = item.data(); + item.take(); delete oldItem; emit dataChanged(index(row),index(row)); @@ -162,16 +164,20 @@ removeRows(changes[iter].first.oldOffset(), 1); break; case TsTaskChangeInfo::EChangeInsert : - insertRows(changes[iter].first.newOffset(), 1, - new TsModelItem(changes[iter].second)); + { + QScopedPointer item(new TsModelItem(changes[iter].second)); + insertRows(changes[iter].first.newOffset(), 1, item); break; + } case TsTaskChangeInfo::EChangeMove : moveRows(changes[iter].first.oldOffset(), changes[iter].first.newOffset()); break; case TsTaskChangeInfo::EChangeUpdate : - updateRows(changes[iter].first.oldOffset(), - new TsModelItem(changes[iter].second)); + { + QScopedPointer item(new TsModelItem(changes[iter].second)); + updateRows(changes[iter].first.oldOffset(), item); break; + } default: break; } diff -r efda7c0771b9 -r 7b66bc3c6dc9 taskswitcher/utils/inc/tsentry.h --- a/taskswitcher/utils/inc/tsentry.h Wed Oct 13 12:59:22 2010 +0300 +++ b/taskswitcher/utils/inc/tsentry.h Mon Oct 18 10:44:15 2010 +0300 @@ -19,76 +19,23 @@ #define TSENTRY_H #include -#include -#include "tsentrykey.h" -#include "tstaskmonitorglobals.h" -#include "tsthumbnailobserver.h" - -class CTsEntry; -class CFbsBitmap; -class QObject; -class MTsDataObserver; -class TsThumbnailProvider; - - +class TTsEntryKey; -typedef RPointerArray RTsFswArray; - -/** - * An entry in the task list. - */ -NONSHARABLE_CLASS( CTsEntry ) : public CBase, - private MTsThumbnailObserver -{ -public: - static CTsEntry *NewL(const TTsEntryKey &key, MTsDataObserver &observer, QObject* obj); - static CTsEntry *NewLC(const TTsEntryKey &key, MTsDataObserver &observer, QObject* obj); - ~CTsEntry(); - +NONSHARABLE_CLASS( MTsEntry ) + { public: - TUid AppUid() const; - const TDesC &AppName() const; - TBool CloseableApp() const; - Visibility GetVisibility() const; - CFbsBitmap *AppIconBitmap() const; - CFbsBitmap *Screenshot() const; - const TTsEntryKey &Key() const; - TTime Timestamp() const; - TTime LastUpdateTimestamp() const; - - void SetAppUid(const TUid &uid); - void SetAppNameL(const TDesC &appName); - void SetCloseableApp(TBool value); - void SetVisibility(Visibility visibility); - void SetAppIcon(CFbsBitmap *aBitmap); - void SetScreenshotL(const CFbsBitmap &bitmap, UpdatePriority priority, TInt angle); - void RemoveScreenshotL(); - void SetTimestamp(const TTime ×tamp); - void RefreshUpdateTimestamp(); + virtual const TDesC& DisplayName() const =0; + virtual TInt IconHandle() const =0; + virtual TTime Timestamp() const =0; + virtual TTime TimestampUpdate() const =0; + virtual TTsEntryKey Key() const =0; + virtual TBool IsActive() const =0; + virtual TBool IsClosable() const =0; + virtual TBool Close() const =0; + virtual TBool Launch() const =0; + virtual TBool IsMandatory() const =0; -private: - CTsEntry(const TTsEntryKey &aKey, MTsDataObserver &observer); - void ConstructL(QObject* object); - -public://from MTsThumbnailObserver - void ThumbnailCreated(const CFbsBitmap& aThumbnail); + }; -private: - TUid mAppUid; - HBufC* mAppName; - TBool mCloseableApp; - Visibility mVisibility; - CFbsBitmap* mAppIconBitmap; - CFbsBitmap* mScreenshot; - TTsEntryKey mKey; - UpdatePriority mPriority; - TTime mTimestamp; - TTime mUpdateTimestamp; - TsThumbnailProvider* iProvider; -private: - MTsDataObserver &mObserver; - -}; - -#endif +#endif //TSENTRY_H diff -r efda7c0771b9 -r 7b66bc3c6dc9 taskswitcher/utils/inc/tsentryimp.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/taskswitcher/utils/inc/tsentryimp.h Mon Oct 18 10:44:15 2010 +0300 @@ -0,0 +1,68 @@ +/* +* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Task list entry +* +*/ + +#ifndef TSENTRYIMP_H +#define TSENTRYIMP_H + +#include +#include + +#include "tsentrykey.h" +#include "tsentry.h" +//#include "tstaskmonitorglobals.h" + +class CFbsBitmap; +class RReadStream; + +/** + * An entry in the task list. + */ +NONSHARABLE_CLASS( CTsEntryImp ) : public CBase, + public MTsEntry + { +public: + virtual ~CTsEntryImp(); + static void ExternalizeL( RWriteStream& aDst, const MTsEntry& aSrc ); + void InternalizeL( RReadStream& aSrc ); + +public: + const TDesC& DisplayName() const; + TInt IconHandle() const; + TTime Timestamp() const; + TTime TimestampUpdate() const; + TTsEntryKey Key() const; + TBool IsActive() const; + TBool IsClosable() const; + TBool IsMandatory() const; + +protected: + void BaseConstructL(RReadStream& aStream); + +protected: + HBufC* iName; + TBool iCloseableApp; + TBool iIsActive; + TBool iVisibility; + CFbsBitmap* iThumbail; + TTsEntryKey iKey; + TInt iPriority; + TTime iTimestamp; + TTime iUpdateTimestamp; + + }; + +#endif //TSENTRYIMP_H diff -r efda7c0771b9 -r 7b66bc3c6dc9 taskswitcher/utils/inc/tsentrykey.h --- a/taskswitcher/utils/inc/tsentrykey.h Wed Oct 13 12:59:22 2010 +0300 +++ b/taskswitcher/utils/inc/tsentrykey.h Mon Oct 18 10:44:15 2010 +0300 @@ -20,16 +20,26 @@ #define TSENTRYKEY_H #include +#include + +typedef TInt TTsKey; class TTsEntryKey { public: - TTsEntryKey(TInt parentId =0); - TBool operator ==(const TTsEntryKey& key) const; - TInt WindowGroupId() const; + static TInt Size(); + TTsEntryKey(); + TTsEntryKey( TTsKey aKey, TInt aRoot ); + TTsEntryKey( const TTsEntryKey &aKey ); + TTsEntryKey& operator =( const TTsEntryKey& aKey ); + TBool operator == ( const TTsEntryKey aKey ) const; + TInt Key() const; + void ExternalizeL( RWriteStream& aStream ) const; + void InternalizeL( RReadStream& aStream ); private: - TInt mParentId; + TTsKey iKey; + TInt iRoot; }; #endif //TSENTRYKEY_H diff -r efda7c0771b9 -r 7b66bc3c6dc9 taskswitcher/utils/inc/tsentrykeygenerator.h --- a/taskswitcher/utils/inc/tsentrykeygenerator.h Wed Oct 13 12:59:22 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,41 +0,0 @@ -/* -* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Task list entry - * -*/ - - -#ifndef TSENTRYKEYGENERATOR_H -#define TSENTRYKEYGENERATOR_H - -#include -#include -#include - -#include "tsentrykey.h" -#include "tswindowgroupsobserver.h" - - -class TsEntryKeyGeneraror -{ -public: - static TInt Generate( TTsEntryKey& aReturnKey, - TInt aWindowGroupId, - const MTsRunningApplicationStorage& aStorage ); - static TInt Generate(TTsEntryKey& returnKey, - TInt windowGroupId, - const TArray& groupChain); -}; - -#endif //TSENTRYKEYGENERATOR_H diff -r efda7c0771b9 -r 7b66bc3c6dc9 taskswitcher/utils/inc/tsiconprovider.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/taskswitcher/utils/inc/tsiconprovider.h Mon Oct 18 10:44:15 2010 +0300 @@ -0,0 +1,29 @@ +/* +* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Task list entry +* +*/ + +#ifndef TSICONPROVIDER_H +#define TSICONPROVIDER_H + +class CFbsBitmap; +class MTsIconProvider + { +public: + virtual void LoadIconL(CFbsBitmap& aDst, TUid aUid) =0; + + }; + +#endif //TSICONPROVIDER_H diff -r efda7c0771b9 -r 7b66bc3c6dc9 taskswitcher/utils/inc/tsidlist.h --- a/taskswitcher/utils/inc/tsidlist.h Wed Oct 13 12:59:22 2010 +0300 +++ b/taskswitcher/utils/inc/tsidlist.h Mon Oct 18 10:44:15 2010 +0300 @@ -28,7 +28,6 @@ ~CTsIdList(); TBool IsPresent( TInt aId ) const; void AppendL(const TInt aArray[], TInt aSize ); - void AppendL(const TArray& aArray); void AppendL(TInt aId); void Reset(); TInt Size() const; diff -r efda7c0771b9 -r 7b66bc3c6dc9 taskswitcher/utils/inc/tsresourcemanager.h --- a/taskswitcher/utils/inc/tsresourcemanager.h Wed Oct 13 12:59:22 2010 +0300 +++ b/taskswitcher/utils/inc/tsresourcemanager.h Mon Oct 18 10:44:15 2010 +0300 @@ -20,6 +20,8 @@ class RApaLsSession; class RWsSession; class MTsWindowGroupsMonitor; +class MTsIconProvider; +class CTsIdList; /** * Interface declare methods to access initialized OS resources @@ -41,5 +43,12 @@ * Access to window groups monitor */ virtual MTsWindowGroupsMonitor& WsMonitor() =0; + + /** + * Access to icon provider + */ + virtual MTsIconProvider& IconProvider() =0; + + virtual const CTsIdList& ApplicationsBlackList() const =0; }; #endif // TSRESOURCEMANAGER_H diff -r efda7c0771b9 -r 7b66bc3c6dc9 taskswitcher/utils/inc/tsrunningapp.h --- a/taskswitcher/utils/inc/tsrunningapp.h Wed Oct 13 12:59:22 2010 +0300 +++ b/taskswitcher/utils/inc/tsrunningapp.h Mon Oct 18 10:44:15 2010 +0300 @@ -18,37 +18,36 @@ #define TSRUNNINGAPPLICATION_H #include +#include "tsentry.h" /** * Abstract interface of container with data to describe running application */ -class MTsRunningApplication +class MTsRunningApplication: public MTsEntry { public: + enum ApplicationHideMode + { + None = 0x0, + Software = 0x1, + System =0x2 + }; + /** * Provide access to application unique identifier * @return running application identyfier */ - virtual TUid UidL()const =0; - - /** - * Provide access to application caption - * @return running application caption - */ - virtual const TDesC& CaptionL() const =0; + virtual TUid Uid()const =0; /** * Provide information if application is hidden from application library * @return EFalse if it's not hidden, other values it is. */ - virtual TBool IsHiddenL() const =0; + virtual ApplicationHideMode HideMode() const =0; - /** - * Provide information if application is required by the system and should be closed - * @return EFalse if it's not system, other values it is. - */ - virtual TBool IsSystemL() const =0; + virtual void SetHidden( TBool aHidden ) =0; + virtual TBool IsSystem() const =0; /** * Provide access to process window group identifier * @return process window group identyfier diff -r efda7c0771b9 -r 7b66bc3c6dc9 taskswitcher/utils/inc/tsrunningappstorage.h --- a/taskswitcher/utils/inc/tsrunningappstorage.h Wed Oct 13 12:59:22 2010 +0300 +++ b/taskswitcher/utils/inc/tsrunningappstorage.h Mon Oct 18 10:44:15 2010 +0300 @@ -19,6 +19,7 @@ #include class MTsRunningApplication; +class TTsEntryKey; /** * Abstract interface of container with running applications desctiptors @@ -31,7 +32,7 @@ * @param aOffset - index of running application * @return running application entry */ - virtual const MTsRunningApplication& operator[] ( TInt aOffset ) const=0; + virtual MTsRunningApplication& operator[] ( TInt aOffset ) const=0; /** * Provide information about number of running applications @@ -50,6 +51,9 @@ * @return list of blocked window groups */ virtual TArray BlockedWindowGroups() const =0; + + virtual TInt GenerateKey( TTsEntryKey& aReturnKey, + TInt aWindowGroupId) const =0; }; diff -r efda7c0771b9 -r 7b66bc3c6dc9 taskswitcher/utils/inc/tsutils.h --- a/taskswitcher/utils/inc/tsutils.h Wed Oct 13 12:59:22 2010 +0300 +++ b/taskswitcher/utils/inc/tsutils.h Mon Oct 18 10:44:15 2010 +0300 @@ -14,8 +14,23 @@ * Description: * */ +#ifndef TSUTILS_H +#define TSUTILS_H +#include +namespace TaskSwitcher { + template + void CArrayPtrCleanupMethod(TAny *aPtr) + { + CArrayPtr *ptr(static_cast< CArrayPtr* >(aPtr)); + ptr->ResetAndDestroy(); + delete ptr; + } + + template + void CleanupResetAndDestroyPushL(CArrayPtr *array) { + CleanupStack::PushL(TCleanupItem(&CArrayPtrCleanupMethod, array)); + } -namespace TaskSwitcher { template void RPointerArrayCleanupMethod(TAny *aPtr) { @@ -26,4 +41,5 @@ void CleanupResetAndDestroyPushL(RPointerArray &array) { CleanupStack::PushL(TCleanupItem(&RPointerArrayCleanupMethod, &array)); } -} \ No newline at end of file +} +#endif//TSUTILS_H diff -r efda7c0771b9 -r 7b66bc3c6dc9 taskswitcher/utils/inc/tswindowgroupsmonitor.h --- a/taskswitcher/utils/inc/tswindowgroupsmonitor.h Wed Oct 13 12:59:22 2010 +0300 +++ b/taskswitcher/utils/inc/tswindowgroupsmonitor.h Mon Oct 18 10:44:15 2010 +0300 @@ -36,6 +36,8 @@ * @param aObserver - events observer */ virtual void Cancel(MTsWindowGroupsObserver & aObserver) =0; + + virtual const MTsRunningApplicationStorage& Storage() const =0; }; #endif //TSWINDOWGROUPSMONITOR_H diff -r efda7c0771b9 -r 7b66bc3c6dc9 taskswitcher/utils/src/tsentry.cpp --- a/taskswitcher/utils/src/tsentry.cpp Wed Oct 13 12:59:22 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,280 +0,0 @@ -/* - * Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). - * All rights reserved. - * This component and the accompanying materials are made available - * under the terms of "Eclipse Public License v1.0" - * which accompanies this distribution, and is available - * at the URL "http://www.eclipse.org/legal/epl-v10.html". - * - * Initial Contributors: - * Nokia Corporation - initial contribution. - * - * Contributors: - * - * Description: Task list entry - * - */ - -#define __E32SVR_H__ - -#include -#include - -#include "tsentry.h" -#include "tsdataobserver.h" -#include "tsthumbnailprovider.h" - -// -------------------------------------------------------------------------- -// CTsFswEntry::NewL -// -------------------------------------------------------------------------- -// -CTsEntry* CTsEntry::NewL(const TTsEntryKey &key, MTsDataObserver &observer, QObject* obj) -{ - CTsEntry* self = NewLC(key, observer, obj); - CleanupStack::Pop(self); - return self; -} - -// -------------------------------------------------------------------------- -// CTsFswEntry::NewLC -// -------------------------------------------------------------------------- -// -CTsEntry* CTsEntry::NewLC(const TTsEntryKey &key, MTsDataObserver &observer, QObject* obj) -{ - CTsEntry* self = new (ELeave) CTsEntry(key, observer); - CleanupStack::PushL(self); - self->ConstructL(obj); - return self; -} - -// -------------------------------------------------------------------------- -// CTsFswEntry::~CTsFswEntry -// -------------------------------------------------------------------------- -// -CTsEntry::~CTsEntry() -{ - delete mAppName; - delete mAppIconBitmap; - delete mScreenshot; - delete iProvider; -} - -// -------------------------------------------------------------------------- -// CTsFswEntry::CTsFswEntry -// -------------------------------------------------------------------------- -// -CTsEntry::CTsEntry(const TTsEntryKey &key, MTsDataObserver &observer) -: - mVisibility(Visible), - mKey(key), - mPriority(Low), - mObserver(observer) -{ - RefreshUpdateTimestamp(); -} - -// -------------------------------------------------------------------------- -void CTsEntry::ConstructL(QObject* object) -{ - QT_TRYCATCH_LEAVING( - iProvider = new TsThumbnailProvider(*this, object); - ) - -} - -// -------------------------------------------------------------------------- -// CTsFswEntry::SetAppUid -// -------------------------------------------------------------------------- -// -void CTsEntry::SetAppUid(const TUid &uid) -{ - mAppUid = uid; -} - -// -------------------------------------------------------------------------- -// CTsFswEntry::SetAppNameL -// -------------------------------------------------------------------------- -// -void CTsEntry::SetAppNameL(const TDesC &appName) -{ - delete mAppName; - mAppName = 0; - mAppName = appName.AllocL(); -} - -// -------------------------------------------------------------------------- -// CTsFswEntry::SetSystemApp -// -------------------------------------------------------------------------- -// -void CTsEntry::SetCloseableApp(TBool value) -{ - mCloseableApp = value; -} - -// -------------------------------------------------------------------------- -// CTsFswEntry::SetAppIconHandles -// -------------------------------------------------------------------------- -// -void CTsEntry::SetAppIcon(CFbsBitmap * bitmap) -{ - mAppIconBitmap = bitmap; -} - -// -------------------------------------------------------------------------- -/** - * Application uid. - */ -TUid CTsEntry::AppUid() const -{ - return mAppUid; -} - -// -------------------------------------------------------------------------- -/** - * Application name. - */ -const TDesC& CTsEntry::AppName() const -{ - return mAppName ? *mAppName : KNullDesC(); -} - -// -------------------------------------------------------------------------- -/** - * Retrieve entry visibilit status - */ -Visibility CTsEntry::GetVisibility() const -{ - return mVisibility; -} - -// -------------------------------------------------------------------------- -/** - * Change entry visibility status - * @param visibility - new visibility status - */ -void CTsEntry::SetVisibility(Visibility visibility) -{ - mVisibility = visibility; -} - -// -------------------------------------------------------------------------- -/** - * ETrue if the application is closeable - */ -TBool CTsEntry::CloseableApp() const -{ - return mCloseableApp; -} - -// -------------------------------------------------------------------------- -/** - * Application icon bitmap - */ -CFbsBitmap *CTsEntry::AppIconBitmap() const -{ - return mAppIconBitmap; -} - -// -------------------------------------------------------------------------- -/** - * Entry's key - */ -const TTsEntryKey &CTsEntry::Key() const -{ - return mKey; -} - -TTime CTsEntry::Timestamp() const -{ - return mTimestamp; -} - -// -------------------------------------------------------------------------- -/** - * Timestamp of last entry change - */ -TTime CTsEntry::LastUpdateTimestamp() const -{ - return mUpdateTimestamp; -} - -void CTsEntry::SetTimestamp(const TTime ×tamp) -{ - mTimestamp = timestamp; - RefreshUpdateTimestamp(); -} - -// -------------------------------------------------------------------------- -/** - * Set new value of updates timestamp - */ -void CTsEntry::RefreshUpdateTimestamp() -{ - mUpdateTimestamp.UniversalTime(); -} - -// -------------------------------------------------------------------------- -// CTsFswEntry::SetScreenshot -// -------------------------------------------------------------------------- -// -void CTsEntry::SetScreenshotL(const CFbsBitmap &bitmapArg, UpdatePriority priority, TInt angle) -{ - TInt currentPriority = static_cast (mPriority); - TInt newPriority = static_cast (priority); - if(newPriority Duplicate(bitmapArg.Handle())); - CleanupStack::Pop(bitmap); - - mPriority = priority; - delete mScreenshot; - mScreenshot = bitmap; - RefreshUpdateTimestamp(); - - iProvider->createThumbnail( *mScreenshot, angle); -} - -// -------------------------------------------------------------------------- -// CTsFswEntry::RemoveScreenshot -// -------------------------------------------------------------------------- -// -void CTsEntry::RemoveScreenshotL() -{ - if (!mScreenshot) { - User::Leave(KErrNotFound); - } - delete mScreenshot; - mScreenshot = NULL; - mPriority = Low; - - mObserver.DataChanged(); - RefreshUpdateTimestamp(); -} - -// -------------------------------------------------------------------------- -/** - * Application screenshot. - */ -CFbsBitmap* CTsEntry::Screenshot() const -{ - return mScreenshot; -} - -// -------------------------------------------------------------------------- -/** - * Interface implementation - * @see MTsThumbnailObserver::ThumbnailCreated( const CFbsBitmap& ) - */ -void CTsEntry::ThumbnailCreated(const CFbsBitmap& aThumbnail) - { - mScreenshot->Reset(); - mScreenshot->Duplicate(aThumbnail.Handle()); - RefreshUpdateTimestamp(); - mObserver.DataChanged(); - } - -// end of file diff -r efda7c0771b9 -r 7b66bc3c6dc9 taskswitcher/utils/src/tsentryimp.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/taskswitcher/utils/src/tsentryimp.cpp Mon Oct 18 10:44:15 2010 +0300 @@ -0,0 +1,145 @@ +/* + * Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). + * All rights reserved. + * This component and the accompanying materials are made available + * under the terms of "Eclipse Public License v1.0" + * which accompanies this distribution, and is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". + * + * Initial Contributors: + * Nokia Corporation - initial contribution. + * + * Contributors: + * + * Description: Task list entry + * + */ + +#include +#include + +#include "tsentryimp.h" + +// -------------------------------------------------------------------------- +CTsEntryImp::~CTsEntryImp() + { + delete iName; + delete iThumbail; + } + +// -------------------------------------------------------------------------- +void CTsEntryImp::BaseConstructL(RReadStream& aStream) + { + aStream >> ( *this ); + } + +// -------------------------------------------------------------------------- +TBool CTsEntryImp::IsActive() const + { + return iIsActive; + } + +// -------------------------------------------------------------------------- +/** + * Application name. + */ +const TDesC& CTsEntryImp::DisplayName() const + { + return iName ? *iName : KNullDesC(); + } + +// -------------------------------------------------------------------------- +/** + * ETrue if the application is closeable + */ +TBool CTsEntryImp::IsClosable() const + { + return iCloseableApp; + } + +// -------------------------------------------------------------------------- +/** + * Application icon bitmap + */ +TInt CTsEntryImp::IconHandle() const + { + return iThumbail ? iThumbail->Handle() : KErrNotFound; + } + +// -------------------------------------------------------------------------- +/** + * Entry's key + */ +TTsEntryKey CTsEntryImp::Key() const + { + return iKey; + } + +// -------------------------------------------------------------------------- +TTime CTsEntryImp::Timestamp() const + { + return iTimestamp; + } + +// -------------------------------------------------------------------------- +/** + * Timestamp of last entry change + */ +TTime CTsEntryImp::TimestampUpdate() const + { + return iUpdateTimestamp; + } + +// -------------------------------------------------------------------------- +TBool CTsEntryImp::IsMandatory() const + { + return ETrue; + } + +// -------------------------------------------------------------------------- +void CTsEntryImp::ExternalizeL( RWriteStream& aDst, const MTsEntry& aSrc ) + { + aDst.WriteInt32L( aSrc.DisplayName().Length() ); + if( 0 < aSrc.DisplayName().Length() ) + { + aDst << aSrc.DisplayName(); + } + TPckgBuf timestamp(aSrc.TimestampUpdate()); + aDst.WriteL(timestamp); + aDst.WriteInt32L( aSrc.IconHandle() ); + aDst.WriteInt32L( TTsEntryKey::Size() ); + aDst << aSrc.Key(); + aDst.WriteInt32L( aSrc.IsActive() ); + aDst.WriteInt32L( aSrc.IsClosable() ); + } + +// -------------------------------------------------------------------------- +void CTsEntryImp::InternalizeL( RReadStream& aSrc ) + { + TInt lenght = aSrc.ReadInt32L(); + delete iName; + iName = 0; + if(0 < lenght) + { + iName = HBufC::NewL(aSrc, lenght); + } + + TPckgBuf timestamp; + aSrc.ReadL(timestamp); + iUpdateTimestamp = timestamp(); + + delete iThumbail; + iThumbail = 0; + TInt handle = aSrc.ReadInt32L(); + if(KErrNotFound != handle) + { + iThumbail = new(ELeave)CFbsBitmap(); + User::LeaveIfError(iThumbail->Duplicate(handle)); + } + aSrc.ReadInt32L(); + aSrc >> iKey; + + iIsActive = aSrc.ReadInt32L(); + iCloseableApp = aSrc.ReadInt32L(); + } +// end of file diff -r efda7c0771b9 -r 7b66bc3c6dc9 taskswitcher/utils/src/tsentrykey.cpp --- a/taskswitcher/utils/src/tsentrykey.cpp Wed Oct 13 12:59:22 2010 +0300 +++ b/taskswitcher/utils/src/tsentrykey.cpp Mon Oct 18 10:44:15 2010 +0300 @@ -19,28 +19,104 @@ #include "tsentrykey.h" // ----------------------------------------------------------------------------- -// +/** + * @return amount of memory ( number of bytes ) required to store key. + */ +TInt TTsEntryKey::Size() + { + return sizeof( TInt ) * 2; + } +// ----------------------------------------------------------------------------- +/** + * Default constructor. Key members are initialized with 0 + */ +TTsEntryKey::TTsEntryKey() +: + iKey( 0 ), + iRoot( 0 ) + { + //No implementation required + } + // ----------------------------------------------------------------------------- -// -TTsEntryKey::TTsEntryKey(TInt parentId) +/** + * Constructor. Initialize members with provided values. + * @param aKey - key value + * @param aRoot - root value + */ +TTsEntryKey::TTsEntryKey( TTsKey aKey, TInt aRoot ) : - mParentId(parentId) -{} + iKey( aKey ), + iRoot( aRoot ) + { + //No implementation required + } + +// ----------------------------------------------------------------------------- +/** + * Copy constructor + * @param aKey - key value that need to be duplicated + */ +TTsEntryKey::TTsEntryKey( const TTsEntryKey& aKey ) +: + iKey( aKey.iKey ), + iRoot( aKey.iRoot ) + { + //No implementation required + } // ----------------------------------------------------------------------------- -// +/** + * Assignment operator. Initialize members with new values + * @param aKey - key value that need to be duplicated + * @return reference to key instance + */ +TTsEntryKey& TTsEntryKey::operator =( const TTsEntryKey& aKey ) + { + iKey = aKey.iKey; + iRoot = aKey.iRoot; + return (*this); + } + // ----------------------------------------------------------------------------- -// -TBool TTsEntryKey::operator ==(const TTsEntryKey& key) const -{ - return (mParentId == key.mParentId); -} +/** + * Comparison operator + * @param aKey - compared value + * @return EFalse if values are not equal, other value if they match + */ +TBool TTsEntryKey::operator == ( const TTsEntryKey aKey ) const + { + return ( iKey == aKey.iKey && iRoot == aKey.iRoot ); + } // ----------------------------------------------------------------------------- -// +/** + * Enable access to key value + * @return key value + */ +TInt TTsEntryKey::Key() const + { + return iKey; + } + // ----------------------------------------------------------------------------- -// -TInt TTsEntryKey::WindowGroupId() const -{ - return mParentId; -} +/** + * Serialize key into data stream + * @param aStream - destination binary stream + */ +void TTsEntryKey::ExternalizeL( RWriteStream& aStream ) const + { + aStream.WriteInt32L( iKey ); + aStream.WriteInt32L( iRoot ); + } + +// ----------------------------------------------------------------------------- +/** + * Deserialize key from data stream + * @param aStream - source binary stream + */ +void TTsEntryKey::InternalizeL( RReadStream& aStream ) + { + iKey = aStream.ReadInt32L(); + iRoot = aStream.ReadInt32L(); + } diff -r efda7c0771b9 -r 7b66bc3c6dc9 taskswitcher/utils/src/tsentrykeygenerator.cpp --- a/taskswitcher/utils/src/tsentrykeygenerator.cpp Wed Oct 13 12:59:22 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,69 +0,0 @@ -/* -* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Task list entry - * -*/ -#include "tsentrykeygenerator.h" -#include "tsrunningapp.h" -#include "tsrunningappstorage.h" - -// ----------------------------------------------------------------------------- -// -// ----------------------------------------------------------------------------- -// -TInt TsEntryKeyGeneraror::Generate( TTsEntryKey& aReturnKey, - TInt aWindowGroupId, - const MTsRunningApplicationStorage& aStorage) -{ - for (TInt iter(0); iter < aStorage.Count(); ++iter) { - if (aStorage[iter].WindowGroupId() == aWindowGroupId) { - aReturnKey = TTsEntryKey( aWindowGroupId ); - if (aStorage[iter].WindowGroupId() == aStorage[iter].ParentWindowGroupId()) - { - return KErrBadHandle; - } - else if ( aStorage[iter].IsEmbeded() ) - { - return TsEntryKeyGeneraror::Generate(aReturnKey, aStorage[iter].ParentWindowGroupId(), aStorage); - - } - else - { - return KErrNone; - } - } - } - return KErrNotFound; -} - -// ----------------------------------------------------------------------------- -TInt TsEntryKeyGeneraror::Generate(TTsEntryKey& returnKey, TInt windowGroupId, - const TArray& groupChain) -{ - for (TInt iter(0); iter < groupChain.Count(); ++iter) { - if (groupChain[iter].iId == windowGroupId) { - returnKey = TTsEntryKey(windowGroupId); - if (groupChain[iter].iId == groupChain[iter].iParentId) { - return KErrBadHandle; - } - else if (0 >= groupChain[iter].iParentId) { - return KErrNone; - } - else { - return TsEntryKeyGeneraror::Generate(returnKey, groupChain[iter].iParentId, groupChain); - } - } - } - return KErrNotFound; -} diff -r efda7c0771b9 -r 7b66bc3c6dc9 taskswitcher/utils/src/tsidlist.cpp --- a/taskswitcher/utils/src/tsidlist.cpp Wed Oct 13 12:59:22 2010 +0300 +++ b/taskswitcher/utils/src/tsidlist.cpp Mon Oct 18 10:44:15 2010 +0300 @@ -68,15 +68,6 @@ } //------------------------------------------------------------------------------ -void CTsIdList::AppendL(const TArray& aArray) - { - for( TInt iter(0); iter < aArray.Count(); ++iter ) - { - AppendL( aArray[iter] ); - } - } - -//------------------------------------------------------------------------------ void CTsIdList::AppendL(TInt aId) { if( !IsPresent( aId ) ) @@ -124,7 +115,7 @@ TBool retVal(aList.iIds.Count() == iIds.Count()); for( TInt offset(0); retVal && offset < iIds.Count(); ++offset ) { - retVal = (KErrNotFound != aList.iIds.Find(iIds[offset])); + retVal = aList.IsPresent(iIds[offset]); } return retVal; }