From: Dongeup Ham Date: Mon, 20 May 2013 10:52:43 +0000 (+0900) Subject: Font impl X-Git-Tag: accepted/tizen/20130924.032527~65 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=35506044915c67085015cf6ce71bb3964cc1c04a;p=platform%2Fframework%2Fnative%2Finstaller.git Font impl Change-Id: I9daa44fab55ebdee76436b451afcb79b78bd6acd Signed-off-by: Dongeup Ham --- diff --git a/inc/InstallerDefs.h b/inc/InstallerDefs.h index 41a9093..e198be3 100755 --- a/inc/InstallerDefs.h +++ b/inc/InstallerDefs.h @@ -23,7 +23,7 @@ #include "InstallerUtil.h" -#define OSP_INSTALLER_VERSION "version=[20130516.1]" +#define OSP_INSTALLER_VERSION "version=[20130520.1]" #define DIR_BIN L"/bin" #define DIR_INFO L"/info" @@ -117,6 +117,8 @@ #define TIZEN_CATEGORY_MENUSCREEN "http://tizen.org/category/menuscreen" #define TIZEN_CATEGORY_ANTIVIRUS "http://tizen.org/category/antivirus" +#define METADATA_FONT L"http://developer.samsung.com/tizen/metadata/font" + #define DIR_APPLICATIONS_TMP "/opt/usr/apps/tmp" #define INSTALLER_RDS_FILE_NAME ".rds_delta" diff --git a/src/XmlHandler/ManifestGenerator.cpp b/src/XmlHandler/ManifestGenerator.cpp index 4ba414a..f9b814a 100755 --- a/src/XmlHandler/ManifestGenerator.cpp +++ b/src/XmlHandler/ManifestGenerator.cpp @@ -720,6 +720,8 @@ ManifestGenerator::WriteApp(int index, AppData* pAppData) WriteAccounts(index); WriteNotifications(index); + WriteFont(index); + return true; } @@ -995,6 +997,48 @@ ManifestGenerator::WriteNotifications(int index) } bool +ManifestGenerator::WriteFont(int index) +{ + AppLog("WriteFont"); + + bool isFontDetected = false; + + IListT* pAppDataList = __pContext->__pAppDataList; + TryReturn(pAppDataList, false, "pAppDataList is null"); + + AppData* pAppData = null; + pAppDataList->GetAt(index, pAppData); + TryReturn(pAppData, false, "pAppData is null"); + + HashMap* pMetadataMap = pAppData->__pMetadataMap; + TryReturn(pMetadataMap, false, "pMetadataMap is null"); + + std::unique_ptr< IMapEnumerator > pEnum(pMetadataMap->GetMapEnumeratorN()); + TryReturn(pEnum, false, "GetMapEnumeratorN() failed. [%s]", GetErrorMessage(GetLastResult())); + + while (pEnum->MoveNext() == E_SUCCESS) + { + String* pKey = static_cast< String* > (pEnum->GetKey()); + TryReturn(pEnum, false, "GetKey() failed. [%s]", GetErrorMessage(GetLastResult())); + + if (pKey->Equals(METADATA_FONT, false) == true) + { + isFontDetected = true; + break; + } + } + + if (isFontDetected == true) + { + __pWriter->StartElement("font"); + __pWriter->WriteAttribute("appid", pAppData->__appId); + __pWriter->EndElement(); // end of "font" + } + + return true; +} + +bool ManifestGenerator::WriteMetadata(HashMap* pMetadataMap) { std::unique_ptr< IMapEnumerator > pEnum(pMetadataMap->GetMapEnumeratorN()); diff --git a/src/XmlHandler/ManifestGenerator.h b/src/XmlHandler/ManifestGenerator.h index 3bac4fd..89c5f9f 100755 --- a/src/XmlHandler/ManifestGenerator.h +++ b/src/XmlHandler/ManifestGenerator.h @@ -61,6 +61,8 @@ private: bool WriteAppControl(int index, bool subMode = false); bool WriteAccounts(int index); bool WriteNotifications(int index); + bool WriteFont(int index); + bool WriteMetadata(Tizen::Base::Collection::HashMap* pMetadataMap); bool WritePrivileges(Tizen::Base::Collection::ArrayList* pPrivilegeList);