#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"
#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"
WriteAccounts(index);
WriteNotifications(index);
+ WriteFont(index);
+
return true;
}
}
bool
+ManifestGenerator::WriteFont(int index)
+{
+ AppLog("WriteFont");
+
+ bool isFontDetected = false;
+
+ IListT<AppData*>* 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());
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);