# HG changeset patch # User hgs # Date 1279882980 -10800 # Node ID e78d6e055a5b4608c04bedfe1e36bc61d71e6703 # Parent 8b8b34fa975114fda9e21af0410ffa5eef956a57 201029 diff -r 8b8b34fa9751 -r e78d6e055a5b activityfw/storage/client/s60/src/afthumbnailrequest_p.cpp --- a/activityfw/storage/client/s60/src/afthumbnailrequest_p.cpp Fri Jul 09 14:19:08 2010 +0300 +++ b/activityfw/storage/client/s60/src/afthumbnailrequest_p.cpp Fri Jul 23 14:03:00 2010 +0300 @@ -22,6 +22,7 @@ #include "afstorageclient_p.h" #include "afstorageclient.h" #include "afentry.h" +#include "afcmd.h" // ----------------------------------------------------------------------------- /** diff -r 8b8b34fa9751 -r e78d6e055a5b activityfw/storage/client/src/afstorageclient.cpp --- a/activityfw/storage/client/src/afstorageclient.cpp Fri Jul 09 14:19:08 2010 +0300 +++ b/activityfw/storage/client/src/afstorageclient.cpp Fri Jul 23 14:03:00 2010 +0300 @@ -17,6 +17,8 @@ #include "afstorageclient.h" #include "afstorageclient_p.h" +#include "afcmd.h" + // ----------------------------------------------------------------------------- /** * Constructor diff -r 8b8b34fa9751 -r e78d6e055a5b common.pri --- a/common.pri Fri Jul 09 14:19:08 2010 +0300 +++ b/common.pri Fri Jul 23 14:03:00 2010 +0300 @@ -38,7 +38,7 @@ SUBDIRPART = release } -win32: OUTPUT_DIR = $$PWD/../bin/$$SUBDIRPART +!symbian: OUTPUT_DIR = $$PWD/../bin/$$SUBDIRPART symbian: OUTPUT_DIR = $$PWD/bin SOURCE_DIR = $$PWD/inc @@ -73,9 +73,7 @@ INCLUDEPATH += $$MOC_DIR TARGET.CAPABILITY = ALL -TCB TARGET.EPOCALLOWDLLDATA=1 -} - -win32 { +} else { # add platfrom API for windows INCLUDEPATH += \ $$PWD/homescreensrv_plat/contentstorage_api \ @@ -85,7 +83,7 @@ plugin: !isEmpty(PLUGIN_SUBDIR): DESTDIR = $$OUTPUT_DIR/$$PLUGIN_SUBDIR -win32: plugin { # copy manifiers +!symbian: plugin { # copy manifiers manifest.path = $$DESTDIR manifest.files = ./resource/*.manifest ./resource/*.xml manifest.CONFIG += no_build @@ -120,8 +118,7 @@ for(entry, entries) : BLD_INF_RULES.prj_exports += "./$$entry z:/$$replace(2, ^/,)/$$basename(entry)" } export ( BLD_INF_RULES.prj_exports) -} -win32 { +} else { name = $$replace(1, [/\\\\\.\*], _) eval ($${name}.path = $${OUTPUT_DIR}/$${2}) eval ($${name}.files = $$1) diff -r 8b8b34fa9751 -r e78d6e055a5b contentstorage/caclient/caclient.pro --- a/contentstorage/caclient/caclient.pro Fri Jul 09 14:19:08 2010 +0300 +++ b/contentstorage/caclient/caclient.pro Fri Jul 23 14:03:00 2010 +0300 @@ -60,7 +60,7 @@ include(caclient_s60.pri) } -win32: { +!symbian: { DEPENDPATH += ./stub/inc \ ./stub/src INCLUDEPATH += ./stub/inc diff -r 8b8b34fa9751 -r e78d6e055a5b contentstorage/caclient/inc/caclient_defines.h --- a/contentstorage/caclient/inc/caclient_defines.h Fri Jul 09 14:19:08 2010 +0300 +++ b/contentstorage/caclient/inc/caclient_defines.h Fri Jul 23 14:03:00 2010 +0300 @@ -25,5 +25,6 @@ const char URL_ENTRY_TYPE_NAME[] = "url"; const char PACKAGE_ENTRY_TYPE_NAME[] = "package"; const char TEMPLATED_APPLICATION_ENTRY_TYPE_NAME[] = "templatedApplication"; +const char COLLECTION_TITLE_NAME[] = "title_name"; #endif //CACLIENT_DEFINES_H diff -r 8b8b34fa9751 -r e78d6e055a5b contentstorage/caclient/inc/caitemmodel_p.h --- a/contentstorage/caclient/inc/caitemmodel_p.h Fri Jul 09 14:19:08 2010 +0300 +++ b/contentstorage/caclient/inc/caitemmodel_p.h Fri Jul 23 14:03:00 2010 +0300 @@ -58,7 +58,7 @@ QSharedPointer entry(const QModelIndex &modelIndex) const; void setSecondLineVisibility(bool secondLineVisibility); bool secondLineVisibility() const; - QVariant displayRole(const QModelIndex &modelIndex) const; + QVariant displayRole(const CaEntry* entry) const; void setParentId(int parentId); void setFlagsOn(const EntryFlags &onFlags); void setFlagsOff(const EntryFlags &offFlags); @@ -85,6 +85,7 @@ void disconnectSlots(); void reconnectSlots(); void emitEmpty(int previousCount); + void emitCountChange(int previousCount); private slots: diff -r 8b8b34fa9751 -r e78d6e055a5b contentstorage/caclient/s60/src/camenuiconutility.cpp --- a/contentstorage/caclient/s60/src/camenuiconutility.cpp Fri Jul 09 14:19:08 2010 +0300 +++ b/contentstorage/caclient/s60/src/camenuiconutility.cpp Fri Jul 23 14:03:00 2010 +0300 @@ -67,7 +67,7 @@ \param sie const reference to icon size. \retval icon. */ -LOCAL_C HbIcon getIconFromApparcL(const CaEntry& entry, const QSize &size) +LOCAL_C HbIcon getIconFromApparcL(int uidValue, const QSize &size) { HbIcon icon; @@ -75,22 +75,20 @@ CleanupClosePushL(apaLsSession); User::LeaveIfError(apaLsSession.Connect()); - QString uidString(entry.attribute(appUidAttributeName)); - TUid uid; - uid = uid.Uid(uidString.toInt()); - + TUid uid = uid.Uid(uidValue); CApaAppServiceInfoArray* skinArray(NULL); - TRAPD( err, skinArray = apaLsSession.GetAppServiceOpaqueDataLC(uid, TUid::Uid(0x2002DCF3)); - if (err == KErrNone && skinArray ) { - TArray tmpArray( skinArray->Array() ); - if ( tmpArray.Count() ) { - TPtrC8 opaque(tmpArray[0].OpaqueData()); - const TPtrC16 iconName((TText16*) opaque.Ptr(),(opaque.Length()+1)>>1); - icon = HbIcon( XQConversions:: s60DescToQString( iconName ) ); - } - } - CleanupStack::PopAndDestroy(skinArray); - ); + TRAPD( err, skinArray = + apaLsSession.GetAppServiceOpaqueDataLC(uid, TUid::Uid(0x2002DCF3)); + if (err == KErrNone && skinArray ) { + TArray tmpArray( skinArray->Array() ); + if ( tmpArray.Count() ) { + TPtrC8 opaque(tmpArray[0].OpaqueData()); + const TPtrC16 iconName((TText16*) opaque.Ptr(),(opaque.Length()+1)>>1); + icon = HbIcon( XQConversions:: s60DescToQString( iconName ) ); + } + } + CleanupStack::PopAndDestroy(skinArray); + ); if (icon.isNull() || !(icon.size().isValid())) { TSize iconSize(size.width(), size.height()); @@ -130,7 +128,6 @@ CleanupStack::PopAndDestroy(apaMaskedBitmap); } CleanupStack::PopAndDestroy(&apaLsSession); - return icon; } @@ -216,7 +213,16 @@ icon = getIconFromEntry(entry); if (icon.isNull() || !(icon.size().isValid())) { - TRAP_IGNORE(icon = getIconFromApparcL(entry, size)); + QString uidString(entry.attribute(appUidAttributeName)); + bool uidOk(false); + int uidValue = uidString.toInt(&uidOk); + if (!uidOk) { + uidString = entry.iconDescription().applicationId(); + uidValue = uidString.toInt(&uidOk); + } + if (uidOk) { + TRAP_IGNORE(icon = getIconFromApparcL(uidValue, size)); + } } if (icon.isNull() || !(icon.size().isValid())) { @@ -225,8 +231,8 @@ if (entry.entryTypeName() == XQConversions::s60DescToQString( KCaTypeWidget)) { - icon.addBadge(Qt::AlignBottom | Qt::AlignRight, - HbIcon("qtg_small_homescreen")); + icon.addProportionalBadge(Qt::AlignBottom | Qt::AlignRight, + HbIcon("qtg_small_homescreen"), QSizeF(0.5, 0.5)); } return icon; } diff -r 8b8b34fa9751 -r e78d6e055a5b contentstorage/caclient/src/caitemmodel.cpp --- a/contentstorage/caclient/src/caitemmodel.cpp Fri Jul 09 14:19:08 2010 +0300 +++ b/contentstorage/caclient/src/caitemmodel.cpp Fri Jul 23 14:03:00 2010 +0300 @@ -446,33 +446,44 @@ { CACLIENTTEST_FUNC_ENTRY("CaItemModelPrivate::data"); QVariant variant; - if (modelIndex.isValid()) { + QSharedPointer pEntry = entry(modelIndex); + if (!pEntry.isNull()) { switch (role) { case Qt::DisplayRole: - variant = displayRole(modelIndex); + variant = displayRole(pEntry.data()); break; case Qt::DecorationRole: - variant = QVariant(HbIcon(entry(modelIndex)->makeIcon(mSize))); + variant = QVariant(HbIcon(pEntry->makeIcon(mSize))); break; case CaItemModel::IdRole: - variant = QVariant(entry(modelIndex)->id()); + variant = QVariant(pEntry->id()); break; case CaItemModel::TypeRole: - variant = QVariant(entry(modelIndex)->entryTypeName()); + variant = QVariant(pEntry->entryTypeName()); break; case CaItemModel::FlagsRole: - variant = qVariantFromValue(entry(modelIndex)->flags()); + variant = qVariantFromValue(pEntry->flags()); break; case CaItemModel::TextRole: - variant = QVariant(entry(modelIndex)->text()); + variant = QVariant(pEntry->text()); break; case CaItemModel::FullTextRole: - variant = QVariant(entry(modelIndex)->text() + QString(" ") - + entry(modelIndex)->description()); + variant = QVariant(pEntry->text() + QString(" ") + pEntry->description()); break; case CaItemModel::UninstalRole: - variant = QVariant(entry(modelIndex)->attribute(UNINSTALL_PROGRESS_APPLICATION_ATTRIBUTE_NAME).toInt()); + variant = QVariant( + pEntry->attribute(UNINSTALL_PROGRESS_APPLICATION_ATTRIBUTE_NAME).toInt()); break; + case CaItemModel::CollectionTitleRole: + if (!pEntry->attribute(COLLECTION_TITLE_NAME).isNull()) { + variant = QVariant(hbTrId(pEntry-> + attribute(COLLECTION_TITLE_NAME).toUtf8())); + } + else { + variant = QVariant(pEntry->text()); + } + break; + default: variant = QVariant(QVariant::Invalid); } @@ -559,11 +570,21 @@ */ QSharedPointer CaItemModelPrivate::entry(const QModelIndex &modelIndex) const { - if (modelIndex.column() == 1) { - return mParentEntry; - } else { - return mEntries.at(modelIndex.row()); + if (modelIndex.isValid()) { + if (modelIndex.column() == 1) { + return mParentEntry; + } + else { + int row = modelIndex.row(); + if (row >= mEntries.count()) { + return QSharedPointer (); + } + else { + return mEntries.at(row); + } + } } + return QSharedPointer (); } /*! @@ -593,22 +614,22 @@ \param modelIndex item index \retval QVariant containing display role */ -QVariant CaItemModelPrivate::displayRole(const QModelIndex &modelIndex) const +QVariant CaItemModelPrivate::displayRole(const CaEntry* entry) const { CACLIENTTEST_FUNC_ENTRY("CaItemModelPrivate::displayRole") QVariant result; if (mSecondLineVisibility) { - if (entry(modelIndex)->description().isEmpty()) { - result = entry(modelIndex)->text(); + if (entry->description().isEmpty()) { + result = entry->text(); } else { QList text; - text << entry(modelIndex)->text(); - text << entry(modelIndex)->description(); + text << entry->text(); + text << entry->description(); result = QVariant(text); } } else { - result = entry(modelIndex)->text(); + result = entry->text(); } CACLIENTTEST_FUNC_EXIT("CaItemModelPrivate::displayRole") return result; @@ -788,9 +809,19 @@ const int oldItemCount(mEntries.count()); if (oldItemCount) { const int newItemCount(itemsList.count()); + int i = 0; + QList oldList = mEntries.orderedIdList(); + //we loop through items to find first added + while (i < oldList.count()) { + if (oldList[i] != itemsList[i]) { + oldList.takeAt(i); + } else { + ++i; + } + } if (newItemCount == oldItemCount) { // count is the same - check if item order changed - if (itemsList == mEntries.orderedIdList()) { + if (itemsList == oldList) { // assume that if the order has not changed // it had to be the secondary lines updateModel(); @@ -798,20 +829,10 @@ updateLayout(); } } else { - int i = 0; - QList oldList = mEntries.orderedIdList(); - //we loop through items to find first added - while (i < oldList.count()) { - if (oldList[i] != itemsList[i]) { - oldList.takeAt(i); - } else { - ++i; - } - } updateModel(); //i is the index of first added item - emit m_q->scrollTo(i, QAbstractItemView::PositionAtTop); } + emit m_q->scrollTo(i, QAbstractItemView::PositionAtTop); } else { // items added to an empty list - add all as a single block addItemBlock(itemsList); @@ -1000,6 +1021,7 @@ removeItems(ids); } emitEmpty(previousCount); + emitCountChange(previousCount); CACLIENTTEST_FUNC_EXIT("CaItemModelPrivate::updateModelContent"); } @@ -1016,3 +1038,14 @@ emit m_q->empty(false); } } + +/*! + Emits empty signal if count of item in model was change + \param previousCount + */ +void CaItemModelPrivate::emitCountChange(int previousCount) +{ + if (previousCount != rowCount()) { + emit m_q->countChange(); + } +} diff -r 8b8b34fa9751 -r e78d6e055a5b contentstorage/caclient/stub/inc/hswidgetcomponentdescriptor.h --- a/contentstorage/caclient/stub/inc/hswidgetcomponentdescriptor.h Fri Jul 09 14:19:08 2010 +0300 +++ b/contentstorage/caclient/stub/inc/hswidgetcomponentdescriptor.h Fri Jul 23 14:03:00 2010 +0300 @@ -25,6 +25,8 @@ class HsWidgetComponentDescriptor { public: + HsWidgetComponentDescriptor(); + HsWidgetComponentDescriptor(const HsWidgetComponentDescriptor& copyFrom); QString installationPath; QString uri; QString title; diff -r 8b8b34fa9751 -r e78d6e055a5b contentstorage/caclient/stub/src/hswidgetcomponentdescriptor.cpp --- a/contentstorage/caclient/stub/src/hswidgetcomponentdescriptor.cpp Fri Jul 09 14:19:08 2010 +0300 +++ b/contentstorage/caclient/stub/src/hswidgetcomponentdescriptor.cpp Fri Jul 23 14:03:00 2010 +0300 @@ -18,6 +18,28 @@ #include "hswidgetcomponentdescriptor.h" + +HsWidgetComponentDescriptor::HsWidgetComponentDescriptor():installationPath(),uri(),title(), + description(),iconUri(),hidden(),serviceXml(),version(),library(),translationFilename(),uid(0),previewImage() +{} + +HsWidgetComponentDescriptor::HsWidgetComponentDescriptor(const HsWidgetComponentDescriptor& copyFrom) { + this->installationPath = copyFrom.installationPath; + this->uri = copyFrom.uri; + this->title = copyFrom.title; + this->description = copyFrom.description; + this->iconUri = copyFrom.iconUri; + this->hidden = copyFrom.hidden; + this->serviceXml = copyFrom.serviceXml; + this->version = copyFrom.version; + this->library = copyFrom.library; + this->translationFilename = copyFrom.translationFilename; + this->uid = copyFrom.uid; + this->previewImage = copyFrom.previewImage; + +} + + bool HsWidgetComponentDescriptor::isValid() { bool ret(false); diff -r 8b8b34fa9751 -r e78d6e055a5b contentstorage/casoftwareregistry/casoftwareregistry.pro --- a/contentstorage/casoftwareregistry/casoftwareregistry.pro Fri Jul 09 14:19:08 2010 +0300 +++ b/contentstorage/casoftwareregistry/casoftwareregistry.pro Fri Jul 23 14:03:00 2010 +0300 @@ -48,7 +48,7 @@ include(casoftwareregistry_s60.pri) } -win32: { +!symbian: { DEPENDPATH += ./stub/inc \ ./stub/src INCLUDEPATH += ./stub/inc diff -r 8b8b34fa9751 -r e78d6e055a5b contentstorage/casoftwareregistry/s60/src/casoftwareregistry_p.cpp --- a/contentstorage/casoftwareregistry/s60/src/casoftwareregistry_p.cpp Fri Jul 09 14:19:08 2010 +0300 +++ b/contentstorage/casoftwareregistry/s60/src/casoftwareregistry_p.cpp Fri Jul 23 14:03:00 2010 +0300 @@ -36,7 +36,8 @@ _LIT(KConfirmMessageKey, "MIDlet-Delete-Confirm"); _LIT(KCaScrPropertyDomainCategory, "Domain-Category"); _LIT(KCaScrPropertyMidletDescryption, "MIDlet-Description"); -const int maxLogsCount = 20; +const int maxLogsCount = 20; // should be 50 - workaround for +// ou1cimx1#476143 Dialog crash when label contains big amount of lines /*! Constructor @@ -217,41 +218,37 @@ CleanupClosePushL(scr); if (scr.Connect() == KErrNone) { CComponentEntry* entry = CComponentEntry::NewLC(); - - TBool resultCode = EFalse; - resultCode = scr.GetComponentL(componentId, *entry); - if ( resultCode) { + if (scr.GetComponentL(componentId, *entry)) { result = entryDetailsL(*entry); - } + if (entry->SoftwareType().Compare(KSoftwareTypeJava) == 0) { + CPropertyEntry* domainProperty = + scr.GetComponentPropertyL(componentId, + KCaScrPropertyDomainCategory); + CleanupStack::PushL(domainProperty); + if (domainProperty && + domainProperty->PropertyType() == + CPropertyEntry::ELocalizedProperty) { + result[CaSoftwareRegistry::componentProtectionDomainKey()] = + XQConversions::s60DescToQString( + static_cast( + domainProperty)->StrValue()); + } - if (entry->SoftwareType().Compare(KSoftwareTypeJava) == 0) { - CPropertyEntry* domainProperty = - scr.GetComponentPropertyL(componentId, - KCaScrPropertyDomainCategory); - CleanupStack::PushL(domainProperty); - if (domainProperty && - domainProperty->PropertyType() == - CPropertyEntry::ELocalizedProperty) { - result[CaSoftwareRegistry::componentProtectionDomainKey()] = - XQConversions::s60DescToQString( - static_cast( - domainProperty)->StrValue()); + CPropertyEntry *midletDescryption = + scr.GetComponentPropertyL(componentId, + KCaScrPropertyMidletDescryption); + CleanupStack::PushL(midletDescryption); + if (midletDescryption && + midletDescryption->PropertyType() == + CPropertyEntry::ELocalizedProperty) { + result[CaSoftwareRegistry::componentDescriptionKey()] = + XQConversions::s60DescToQString( + static_cast( + midletDescryption)->StrValue()); + } + CleanupStack::PopAndDestroy(midletDescryption); + CleanupStack::PopAndDestroy(domainProperty); } - - CPropertyEntry *midletDescryption = - scr.GetComponentPropertyL(componentId, - KCaScrPropertyMidletDescryption); - CleanupStack::PushL(midletDescryption); - if (midletDescryption && - midletDescryption->PropertyType() == - CPropertyEntry::ELocalizedProperty) { - result[CaSoftwareRegistry::componentDescriptionKey()] = - XQConversions::s60DescToQString( - static_cast( - midletDescryption)->StrValue()); - } - CleanupStack::PopAndDestroy(midletDescryption); - CleanupStack::PopAndDestroy(domainProperty); } CleanupStack::PopAndDestroy(entry); } @@ -439,7 +436,7 @@ QString CaSoftwareRegistryPrivate::operationTime(TTime time) const { TDateTime dt = time.DateTime(); - QDate date(dt.Year(), dt.Month()+1, dt.Day()); + QDate date(dt.Year(), dt.Month() + 1, dt.Day() + 1); HbExtendedLocale hbLoc; return hbLoc.format(date, r_qtn_date_usual_with_zero); } diff -r 8b8b34fa9751 -r e78d6e055a5b contentstorage/casrv/cawidgetscanner/inc/cawidgetstoragehandler.h --- a/contentstorage/casrv/cawidgetscanner/inc/cawidgetstoragehandler.h Fri Jul 09 14:19:08 2010 +0300 +++ b/contentstorage/casrv/cawidgetscanner/inc/cawidgetstoragehandler.h Fri Jul 23 14:03:00 2010 +0300 @@ -142,11 +142,12 @@ /** * Adds or updates component id attribute in entry based on SCR provided data + * and removable flag - get info from src. * @param aPackageUid uid of the package which the widget represented by aEntry - * is delivered with + * is delivered with. * @param aEntry widget entry being updated with component id attribute. */ - void UpdateComponentIdL( const TDesC& aManifestFilePathName, + void UpdateCompIdAndRemovableFlagL( const TDesC& aManifestFilePathName, CCaInnerEntry& aEntry ) const; private: diff -r 8b8b34fa9751 -r e78d6e055a5b contentstorage/casrv/cawidgetscanner/inc/widgetscannerutils.h --- a/contentstorage/casrv/cawidgetscanner/inc/widgetscannerutils.h Fri Jul 09 14:19:08 2010 +0300 +++ b/contentstorage/casrv/cawidgetscanner/inc/widgetscannerutils.h Fri Jul 23 14:03:00 2010 +0300 @@ -35,15 +35,6 @@ public: /** - * Checks if file is present on a drive - * @param aFileName file name - * @param aDriveLetter drive letter - * @return ETrue if file is present, EFalse if not - */ - static TBool IsFileOnDrive( const TDesC& aFileName, - const DriveInfo::TDefaultDrives& aDefaultDrive ); - - /** * Returns current MMC id. * @param aFs file server session reference. * @param aMmcId mmc id reference. diff -r 8b8b34fa9751 -r e78d6e055a5b contentstorage/casrv/cawidgetscanner/src/cawidgetdescription.cpp --- a/contentstorage/casrv/cawidgetscanner/src/cawidgetdescription.cpp Fri Jul 09 14:19:08 2010 +0300 +++ b/contentstorage/casrv/cawidgetscanner/src/cawidgetdescription.cpp Fri Jul 23 14:03:00 2010 +0300 @@ -541,12 +541,6 @@ if ( iLibrary != KNullDesC ) { entry->AddAttributeL(KAttrWidgetLibrary, iLibrary); - entry->SetFlags(entry->GetFlags() | ERemovable); - if (WidgetScannerUtils::IsFileOnDrive( iLibrary, - DriveInfo::EDefaultRom ) ) - { - entry->SetFlags( entry->GetFlags() & ~ERemovable ); - } } if ( iPath != KNullDesC ) { diff -r 8b8b34fa9751 -r e78d6e055a5b contentstorage/casrv/cawidgetscanner/src/cawidgetstoragehandler.cpp --- a/contentstorage/casrv/cawidgetscanner/src/cawidgetstoragehandler.cpp Fri Jul 09 14:19:08 2010 +0300 +++ b/contentstorage/casrv/cawidgetscanner/src/cawidgetstoragehandler.cpp Fri Jul 23 14:03:00 2010 +0300 @@ -112,7 +112,7 @@ void CCaWidgetStorageHandler::AddL( const CCaWidgetDescription* aWidget ) { CCaInnerEntry* entry = aWidget->GetEntryLC(); - UpdateComponentIdL( aWidget->GetManifestFilePathName(), *entry ); + UpdateCompIdAndRemovableFlagL( aWidget->GetManifestFilePathName(), *entry ); iStorage->AddL( entry ); SetLocalizationsL( aWidget, entry->GetId() ); @@ -132,7 +132,7 @@ TUint aEntryId ) { CCaInnerEntry* entry = aWidget->GetEntryLC(); - UpdateComponentIdL( aWidget->GetManifestFilePathName(), *entry ); + UpdateCompIdAndRemovableFlagL( aWidget->GetManifestFilePathName(), *entry ); entry->SetId( aEntryId ); if ( !aWidget->IsMissing() && aWidget->IsUsed() ) { @@ -148,7 +148,7 @@ SetLocalizationsL( aWidget, entry->GetId() ); - if ( !aWidget->IsMissing() ) + if ( !aWidget->IsMissing() && ( entry->GetFlags() & ERemovable ) ) { AddWidgetToDownloadCollectionL( entry ); } @@ -400,7 +400,7 @@ // ---------------------------------------------------------------------------- // -void CCaWidgetStorageHandler::UpdateComponentIdL( +void CCaWidgetStorageHandler::UpdateCompIdAndRemovableFlagL( const TDesC& aManifestFilePathName, CCaInnerEntry& aEntry ) const { RArray componentIds; @@ -412,7 +412,7 @@ CleanupStack::PopAndDestroy( fileNameFilter ); - if ( componentIds.Count() == 1 ) + if( componentIds.Count() == 1 ) { RBuf newComponentId; newComponentId.CleanupClosePushL(); @@ -426,13 +426,19 @@ const TBool componentIdAttributeFound = aEntry.FindAttribute( KCaComponentId, oldComponentId ); - if ( !componentIdAttributeFound || oldComponentId.Compare( + if( !componentIdAttributeFound || oldComponentId.Compare( newComponentId ) != 0 ) { // 'add' or 'update' the component id attribute value aEntry.AddAttributeL( KCaComponentId, newComponentId ); } - + CComponentEntry* entry = CComponentEntry::NewLC(); + iSoftwareRegistry.GetComponentL( componentIds[0] , *entry ); + if( entry->IsRemovable() ) + { + aEntry.SetFlags( aEntry.GetFlags() | ERemovable ); + } + CleanupStack::PopAndDestroy( entry ); CleanupStack::PopAndDestroy( &oldComponentId ); CleanupStack::PopAndDestroy( &newComponentId ); } diff -r 8b8b34fa9751 -r e78d6e055a5b contentstorage/casrv/cawidgetscanner/src/widgetscannerutils.cpp --- a/contentstorage/casrv/cawidgetscanner/src/widgetscannerutils.cpp Fri Jul 09 14:19:08 2010 +0300 +++ b/contentstorage/casrv/cawidgetscanner/src/widgetscannerutils.cpp Fri Jul 23 14:03:00 2010 +0300 @@ -24,31 +24,6 @@ // // ----------------------------------------------------------------------------- // -TBool WidgetScannerUtils::IsFileOnDrive( const TDesC& aFileName, - const DriveInfo::TDefaultDrives& aDefaultDrive ) - { - TBool result = EFalse; - if ( aFileName.Length() ) - { - TInt drive; - TInt err = DriveInfo::GetDefaultDrive( aDefaultDrive, drive ); - if ( !err ) - { - TInt fileDrive; - err = RFs::CharToDrive( aFileName[0], fileDrive ); - if ( !err && fileDrive == drive ) - { - result = ETrue; - } - } - } - return result; - } - -// ----------------------------------------------------------------------------- -// -// ----------------------------------------------------------------------------- -// void WidgetScannerUtils::CurrentMmcId( const RFs& aFs, TDes& aMmcId ) { TInt mmcDrive; diff -r 8b8b34fa9751 -r e78d6e055a5b contentstorage/castorage/conf/castoragedb.confml --- a/contentstorage/castorage/conf/castoragedb.confml Fri Jul 09 14:19:08 2010 +0300 +++ b/contentstorage/castorage/conf/castoragedb.confml Fri Jul 23 14:03:00 2010 +0300 @@ -5,6 +5,12 @@ Collection name. It is only identifier. Localized name should be used too. + + Collection short name. Optional. + + + Collection title name. Optional. + Group name. Identify collection where application with predefined group name should be added after installation. Should be the same as not localized name. @@ -33,6 +39,9 @@ Name. In case of applications and homescreen widgets this is only information field( Names are taken from system ). + + Item short name. Available for URL. Optional. + Application uid. Uid of application in decimal format. Must for application type. @@ -58,19 +67,19 @@ - FavoritesFavorites4qtg_large_applications_user + FavoritesFavoritesFavoritesT4qtg_large_applications_user applicationcalendar268458241 applicationCamera270501242 applicationContacts537014009 applicationEmail537023930 applicationFM Radio270530934 - applicationInternet222222222 - applicationMaps222222222 + applicationInternet222242222 + applicationMaps222332222 applicationMessaging537001593 applicationMusic270564450 applicationPhotos (camera)536913858 applicationSettings268458220 - applicationVideos (video camera)222222222 + applicationVideos (video camera)222111222 diff -r 8b8b34fa9751 -r e78d6e055a5b contentstorage/castorage/conf/castoragedb_templates/castoragedb_variant.sql --- a/contentstorage/castorage/conf/castoragedb_templates/castoragedb_variant.sql Fri Jul 09 14:19:08 2010 +0300 +++ b/contentstorage/castorage/conf/castoragedb_templates/castoragedb_variant.sql Fri Jul 23 14:03:00 2010 +0300 @@ -3,13 +3,15 @@ {% for col in range(feat_tree.CaStorageDbSetting.Collections._value|length) -%} {%- set Name = feat_tree.CaStorageDbSetting.Collections.Name._value[col] or '' -%} + {%- set ColShortName = feat_tree.CaStorageDbSetting.Collections.ColShortName._value[col] or '' -%} + {%- set ColTitleName = feat_tree.CaStorageDbSetting.Collections.ColTitleName._value[col] or '' -%} {%- set GroupName = feat_tree.CaStorageDbSetting.Collections.GroupName._value[col] or '' -%} {%- set Flags = feat_tree.CaStorageDbSetting.Collections.Flags._value[col] or '' -%} {%- set LocName = feat_tree.CaStorageDbSetting.Collections.LocName._value[col] or ''-%} {%- set IconFileName = feat_tree.CaStorageDbSetting.Collections.IconFileName._value[col] or '' -%} {%- set IconSkinId = feat_tree.CaStorageDbSetting.Collections.IconSkinId._value[col] or '' -%} -INSERT INTO COLLECTION (COLLECTION_NAME, COL_APP_GROUP_NAME, FLAGS {% if LocName -%}, COL_LOCNAME{%- endif %}{% if IconFileName -%}, ICON_FILENAME{%- endif %}{% if IconSkinId -%}, ICON_SKIN_ID{%- endif %}) -VALUES ( '{{Name}}', '{{GroupName}}', {{Flags}} {% if LocName -%}, "{{LocName}}"{%- endif %}{% if IconFileName -%}, "{{IconFileName}}"{%- endif %}{% if IconSkinId -%}, "{{IconSkinId}}"{%- endif %}); +INSERT INTO COLLECTION (COLLECTION_NAME, COL_APP_GROUP_NAME, FLAGS {% if ColTitleName -%}, COL_TITLE_NAME{%- endif %}{% if LocName -%}, COL_LOCNAME{%- endif %}{% if ColShortName -%}, COL_SHORT_NAME{%- endif %}{% if IconFileName -%}, ICON_FILENAME{%- endif %}{% if IconSkinId -%}, ICON_SKIN_ID{%- endif %}) +VALUES ( '{{Name}}', '{{GroupName}}', {{Flags}} {% if ColTitleName -%}, "{{ColTitleName}}"{%- endif %}{% if LocName -%}, "{{LocName}}"{%- endif %}{% if ColShortName -%}, "{{ColShortName}}"{%- endif %}{% if IconFileName -%}, "{{IconFileName}}"{%- endif %}{% if IconSkinId -%}, "{{IconSkinId}}"{%- endif %}); {% endfor %} @@ -18,14 +20,15 @@ {%- set Name = feat_tree.CaStorageDbSetting.Items.Name._value[index] or '' -%} {%- set IconFileName = feat_tree.CaStorageDbSetting.Items.IconFileName._value[index] or '' -%} {%- set IconSkinId = feat_tree.CaStorageDbSetting.Items.IconSkinId._value[index] or '' -%} + {%- set ShortName = feat_tree.CaStorageDbSetting.Items.ShortName._value[index] or '' -%} {%- set DestinationUid = feat_tree.CaStorageDbSetting.Items.DestinationUid._value[index] or '' -%} {%- set DestinationUrl = feat_tree.CaStorageDbSetting.Items.DestinationUrl._value[index] or '' -%} {%- set DestinationWidgetUri = feat_tree.CaStorageDbSetting.Items.DestinationWidgetUri._value[index] or '' -%} {%- set Collection = feat_tree.CaStorageDbSetting.Items.Col_Name._value[index] or '' -%} {% if Type == "application" -%} INSERT INTO ITEM_TO_COLLECTION (ITEM_TYPE, ITEM_NAME, ITEM_DEST, COLLECTION_NAME) VALUES ("{{Type}}", '{{Name}}', {{DestinationUid}}, '{{Collection}}' );{%- endif %} -{% if Type == "url" -%} INSERT INTO ITEM_TO_COLLECTION (ITEM_TYPE, ITEM_NAME, ITEM_DEST, ICON_FILENAME, ICON_SKIN_ID, COLLECTION_NAME) - VALUES ("{{Type}}", '{{Name}}', "{{DestinationUrl}}", "{{IconFileName}}", "{{IconSkinId}}", '{{Collection}}' ); {%- endif %} +{% if Type == "url" -%} INSERT INTO ITEM_TO_COLLECTION (ITEM_TYPE, ITEM_NAME {% if ShortName -%}, ITEM_SHORTNAME{%- endif %}, ITEM_DEST, ICON_FILENAME, ICON_SKIN_ID, COLLECTION_NAME) + VALUES ("{{Type}}", '{{Name}}' {% if ShortName -%}, "{{ShortName}}"{%- endif %}, "{{DestinationUrl}}", "{{IconFileName}}", "{{IconSkinId}}", '{{Collection}}' ); {%- endif %} {% if Type == "widget" -%} INSERT INTO WIDGET_TO_COLLECTION (ITEM_TYPE, ITEM_NAME, ICON_FILENAME, ICON_SKIN_ID, URI, COLLECTION_NAME ) VALUES ("{{Type}}", '{{Name}}', "{{IconFileName}}", "{{IconSkinId}}", "{{DestinationWidgetUri}}", '{{Collection}}' ); {%- endif %} {% endfor %} diff -r 8b8b34fa9751 -r e78d6e055a5b contentstorage/castorage/data/castorage.db Binary file contentstorage/castorage/data/castorage.db has changed diff -r 8b8b34fa9751 -r e78d6e055a5b contentstorage/castorage/data/castoragedb_create.sql --- a/contentstorage/castorage/data/castoragedb_create.sql Fri Jul 09 14:19:08 2010 +0300 +++ b/contentstorage/castorage/data/castoragedb_create.sql Fri Jul 23 14:03:00 2010 +0300 @@ -99,6 +99,8 @@ AS SELECT "" AS "COLLECTION_NAME", "" AS "COL_LOCNAME", + "" AS "COL_SHORT_NAME", + "" AS "COL_TITLE_NAME", "" AS "COL_APP_GROUP_NAME", "" AS "ICON_FILENAME", "" AS "ICON_SKIN_ID", @@ -127,9 +129,13 @@ VALUES ( (SELECT ENTRY_ID FROM CA_ENTRY WHERE EN_TYPE_NAME = "menucollections") , (SELECT ENTRY_ID FROM CA_ENTRY WHERE EN_TEXT = new.COLLECTION_NAME), (SELECT IFNULL(MAX(GE_POSITION)+1, 1) FROM CA_GROUP_ENTRY WHERE GE_GROUP_ID = (SELECT ENTRY_ID FROM CA_ENTRY WHERE EN_TYPE_NAME = "menucollections")) ); - -- ADD ATTRIBUTE + -- ADD ATTRIBUTES INSERT OR IGNORE INTO CA_ATTRIBUTE (AT_ENTRY_ID, AT_NAME, AT_VALUE ) VALUES ( (SELECT ENTRY_ID FROM CA_ENTRY WHERE EN_TEXT = new.COLLECTION_NAME AND (EN_TYPE_NAME = "collection::downloaded" OR EN_TYPE_NAME = "collection") ), "appgroup_name", new.COL_APP_GROUP_NAME ); + INSERT OR IGNORE INTO CA_ATTRIBUTE (AT_ENTRY_ID, AT_NAME, AT_VALUE ) + VALUES ( (SELECT ENTRY_ID FROM CA_ENTRY WHERE EN_TEXT = new.COLLECTION_NAME AND (EN_TYPE_NAME = "collection::downloaded" OR EN_TYPE_NAME = "collection") ), "short_name", new.COL_SHORT_NAME ); + INSERT OR IGNORE INTO CA_ATTRIBUTE (AT_ENTRY_ID, AT_NAME, AT_VALUE ) + VALUES ( (SELECT ENTRY_ID FROM CA_ENTRY WHERE EN_TEXT = new.COLLECTION_NAME AND (EN_TYPE_NAME = "collection::downloaded" OR EN_TYPE_NAME = "collection") ), "title_name", new.COL_TITLE_NAME ); END; -- CREATE VIEW ITEM_TO_COLLECTION @@ -140,6 +146,7 @@ AS SELECT "" AS "ITEM_TYPE", "" AS "ITEM_NAME", + "" AS "ITEM_SHORTNAME", "" AS "ICON_FILENAME", "" AS "ICON_SKIN_ID", "" AS "ITEM_DEST", @@ -171,8 +178,11 @@ -- INSERT ENTRY INSERT OR IGNORE INTO CA_ENTRY (EN_TEXT, EN_ROLE, EN_TYPE_NAME, EN_ICON_ID ) VALUES ( new.ITEM_NAME, 1, "url", (SELECT ICON_ID FROM CA_ICON WHERE IC_FILENAME = new.ICON_FILENAME OR IC_SKIN_ID = new.ICON_SKIN_ID )); + -- ADD ATTRIBUTES INSERT OR IGNORE INTO CA_ATTRIBUTE (AT_ENTRY_ID, AT_NAME, AT_VALUE ) - VALUES ( ( SELECT last_insert_rowid() ) ,"url",new.ITEM_DEST); + VALUES ( ( SELECT ENTRY_ID FROM CA_ENTRY WHERE EN_TEXT = new.ITEM_NAME ) ,"url",new.ITEM_DEST ); + INSERT OR IGNORE INTO CA_ATTRIBUTE (AT_ENTRY_ID, AT_NAME, AT_VALUE ) + VALUES ( ( SELECT ENTRY_ID FROM CA_ENTRY WHERE EN_TEXT = new.ITEM_NAME ) ,"short_name", new.ITEM_SHORTNAME ); -- RELATION TO MAIN COLLECTION (ADD TO GROUP: ) INSERT INTO CA_GROUP_ENTRY (GE_GROUP_ID, GE_ENTRY_ID, GE_POSITION) VALUES ( (SELECT ENTRY_ID FROM CA_ENTRY WHERE EN_TEXT = new.COLLECTION_NAME) , diff -r 8b8b34fa9751 -r e78d6e055a5b contentstorage/castorage/data/castoragedb_variant.sql --- a/contentstorage/castorage/data/castoragedb_variant.sql Fri Jul 09 14:19:08 2010 +0300 +++ b/contentstorage/castorage/data/castoragedb_variant.sql Fri Jul 23 14:03:00 2010 +0300 @@ -18,7 +18,7 @@ INSERT INTO ITEM_TO_COLLECTION (ITEM_TYPE, ITEM_NAME, ITEM_DEST, COLLECTION_NAME) VALUES ("application", 'Internet', 222222222, 'Favorites' ); INSERT INTO ITEM_TO_COLLECTION (ITEM_TYPE, ITEM_NAME, ITEM_DEST, COLLECTION_NAME) - VALUES ("application", 'Maps', 222222222, 'Favorites' ); + VALUES ("application", 'Maps', 222222223, 'Favorites' ); INSERT INTO ITEM_TO_COLLECTION (ITEM_TYPE, ITEM_NAME, ITEM_DEST, COLLECTION_NAME) VALUES ("application", 'Messaging', 537001593, 'Favorites' ); INSERT INTO ITEM_TO_COLLECTION (ITEM_TYPE, ITEM_NAME, ITEM_DEST, COLLECTION_NAME) @@ -28,7 +28,7 @@ INSERT INTO ITEM_TO_COLLECTION (ITEM_TYPE, ITEM_NAME, ITEM_DEST, COLLECTION_NAME) VALUES ("application", 'Settings', 268458220, 'Favorites' ); INSERT INTO ITEM_TO_COLLECTION (ITEM_TYPE, ITEM_NAME, ITEM_DEST, COLLECTION_NAME) - VALUES ("application", 'Videos (video camera)', 222222222, 'Favorites' ); + VALUES ("application", 'Videos (video camera)', 222222224, 'Favorites' ); SELECT "castoragedb_variant - END" AS " "; diff -r 8b8b34fa9751 -r e78d6e055a5b contentstorage/group/group.pro --- a/contentstorage/group/group.pro Fri Jul 09 14:19:08 2010 +0300 +++ b/contentstorage/group/group.pro Fri Jul 23 14:03:00 2010 +0300 @@ -19,9 +19,9 @@ #Exporting ibys BLD_INF_RULES.prj_exports += \ "../castorage/conf/castoragedb.confml APP_LAYER_CONFML(castoragedb.confml)" \ - "../castorage/conf/castoragedb.implml APP_LAYER_CONFML(castoragedb.implml)" \ - "../castorage/data/castoragedb_create.sql APP_LAYER_CONFML(../implml/castoragedb_templates/castoragedb_create.sql)" \ - "../castorage/conf/castoragedb_templates/castoragedb_variant.sql APP_LAYER_CONFML(../implml/castoragedb_templates/castoragedb_variant.sql)" \ + "../castorage/conf/castoragedb.implml APP_LAYER_CRML(castoragedb.implml)" \ + "../castorage/data/castoragedb_create.sql APP_LAYER_CRML(castoragedb_templates/castoragedb_create.sql)" \ + "../castorage/conf/castoragedb_templates/castoragedb_variant.sql APP_LAYER_CRML(castoragedb_templates/castoragedb_variant.sql)" \ "$${LITERAL_HASH}ifndef CONTENT_ARSENAL_STORAGE_UT" \ "../castorage/data/castorage.db z:/private/20022F90/castorage.db" \ "$${LITERAL_HASH}else " \ diff -r 8b8b34fa9751 -r e78d6e055a5b homescreensrv.pro --- a/homescreensrv.pro Fri Jul 09 14:19:08 2010 +0300 +++ b/homescreensrv.pro Fri Jul 23 14:03:00 2010 +0300 @@ -18,8 +18,10 @@ SUBDIRS += hswidgetmodel \ contentstorage \ - homescreensrv_plat \ - tsrc + homescreensrv_plat + +exists(tsrc/tsrc.pro): SUBDIRS += tsrc + symbian:SUBDIRS += activityfw symbian:SUBDIRS += taskswitcher symbian:SUBDIRS += hsappkeyhandler diff -r 8b8b34fa9751 -r e78d6e055a5b homescreensrv_plat/contentstorage_api/caitemmodel.h --- a/homescreensrv_plat/contentstorage_api/caitemmodel.h Fri Jul 09 14:19:08 2010 +0300 +++ b/homescreensrv_plat/contentstorage_api/caitemmodel.h Fri Jul 23 14:03:00 2010 +0300 @@ -49,7 +49,9 @@ FlagsRole, TextRole,//contains title represented as QString, FullTextRole, //'title description' convinient for operations such as search - UninstalRole //contains progress status as decimal number in QString + UninstalRole, //contains progress status as decimal number in QString + CollectionTitleRole //contains title represented as QString, + }; // Function declarations @@ -83,6 +85,7 @@ void scrollTo(int row, QAbstractItemView::ScrollHint hint = QAbstractItemView::EnsureVisible); void empty(bool value); + void countChange(); protected: // data diff -r 8b8b34fa9751 -r e78d6e055a5b homescreensrv_plat/homescreen_information_api/homescreen_information_api.metaxml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/homescreensrv_plat/homescreen_information_api/homescreen_information_api.metaxml Fri Jul 23 14:03:00 2010 +0300 @@ -0,0 +1,13 @@ + + + homescreen_information_api + Home screen information api to listen home screen state + c++ + + + + + no + no + + diff -r 8b8b34fa9751 -r e78d6e055a5b homescreensrv_plat/hswidgetmodel_api/hswidgetmodel_api.metaxml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/homescreensrv_plat/hswidgetmodel_api/hswidgetmodel_api.metaxml Fri Jul 23 14:03:00 2010 +0300 @@ -0,0 +1,12 @@ + + + hswidgetmodel_api + Home screen widget model api + c++ + + + + no + no + + diff -r 8b8b34fa9751 -r e78d6e055a5b homescreensrv_plat/hswidgetmodel_api/hswidgetmodel_global.h --- a/homescreensrv_plat/hswidgetmodel_api/hswidgetmodel_global.h Fri Jul 09 14:19:08 2010 +0300 +++ b/homescreensrv_plat/hswidgetmodel_api/hswidgetmodel_global.h Fri Jul 23 14:03:00 2010 +0300 @@ -19,7 +19,7 @@ #ifndef HSWIDGETMODEL_GLOBAL_H #define HSWIDGETMODEL_GLOBAL_H -#include +#include #ifdef HSWIDGETMODEL_LIB diff -r 8b8b34fa9751 -r e78d6e055a5b rom/homescreensrv_core.iby --- a/rom/homescreensrv_core.iby Fri Jul 09 14:19:08 2010 +0300 +++ b/rom/homescreensrv_core.iby Fri Jul 23 14:03:00 2010 +0300 @@ -49,6 +49,7 @@ ECOM_PLUGIN( calocalizerscanner.dll, calocalizerscanner.rsc ) ECOM_PLUGIN( carunningappmonitor.dll, carunningappmonitor.rsc ) ECOM_PLUGIN( causifscanner.dll, causifscanner.rsc ) +ECOM_PLUGIN( caprogresscanner.dll, caprogresscanner.rsc ) data=ZPRIVATE\20022F90\castorage.db private\20022F90\castorage.db diff -r 8b8b34fa9751 -r e78d6e055a5b taskswitcher/testapplications/tstestpluginmanager/tspluginmanager/resource/tspluginmanager.qcrml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/taskswitcher/testapplications/tstestpluginmanager/tspluginmanager/resource/tspluginmanager.qcrml Fri Jul 23 14:03:00 2010 +0300 @@ -0,0 +1,4 @@ + + + + diff -r 8b8b34fa9751 -r e78d6e055a5b tsdevicedialog/tsdevicedialogplugin/inc/tsmodel.h --- a/tsdevicedialog/tsdevicedialogplugin/inc/tsmodel.h Fri Jul 09 14:19:08 2010 +0300 +++ b/tsdevicedialog/tsdevicedialogplugin/inc/tsmodel.h Fri Jul 23 14:03:00 2010 +0300 @@ -28,7 +28,6 @@ #endif class TsTaskMonitor; -class ActivityManager; class CaNotifier; class TsModelItem;