#ifndef _INSTALLER_DEFS_H_
#define _INSTALLER_DEFS_H_
-#define OSP_INSTALLER_VERSION "osp-installer version = [2012/12/27]_RC[2]"
+#define OSP_INSTALLER_VERSION "osp-installer version = [2012/12/28]_RC[1]"
#define DIR_BIN L"/bin"
#define DIR_INFO L"/info"
#define PERM_EXECUTE (S_IXUSR | S_IXGRP | S_IXOTH)
#define PERM_WRITE (S_IWUSR | S_IWGRP | S_IWOTH)
+#define TIZEN_PRIVILEGE_WEB_SERVICE "http://tizen.org/privilege/web.service"
+#define TIZEN_CATEGORY_IME "http://tizen.org/category/ime"
+#define TIZEN_CATEGORY_HOMESCREEN "http://tizen.org/category/homescreen"
+#define TIZEN_CATEGORY_LOCKSCREEN "http://tizen.org/category/lockscreen"
+#define TIZEN_CATEGORY_MENUSCREEN "http://tizen.org/category/menuscreen"
+
static const int BLOCK_SIZE = 4096;
#define OSP_INSTALLER "osp-installer"
result AddSize(const Tizen::Base::String& size);
Tizen::Base::Collection::ArrayList* GetSizeList(void) const;
+ Tizen::Base::String __main;
+ Tizen::Base::String __configurationAppControlAppId;
+
private:
LiveboxInfo(const LiveboxInfo& value);
LiveboxInfo& operator =(const LiveboxInfo& source);
versionInfoFile.Format(1024, L"%ls%ls", rootPath.GetPointer(), VERSION_INFO_FILE);
CreateInfoFile(versionInfoFile, &apiVersion);
- String webServicePrivilege("http://tizen.org/privilege/web.service");
+ String webServicePrivilege(TIZEN_PRIVILEGE_WEB_SERVICE);
if (FindPrivilege(pContext, webServicePrivilege) == true)
{
AppLogTag(OSP_INSTALLER, "WEB_SERVICE privilege is detected. rootPath=[%ls]", rootPath.GetPointer());
IMap* pLiveboxNameList = pLiveboxInfo->GetNameList();
ArrayList* pSizeList = pLiveboxInfo->GetSizeList();
String popupEnabled = pLiveboxInfo->GetPopupEnabled();
+ String primary = pLiveboxInfo->__main;
__pWriter->StartElement("livebox");
__pWriter->WriteAttribute("appid", pAppInfoImpl->GetPackageName() + "." + pLiveboxInfo->GetName() );
__pWriter->WriteAttribute("period", period);
__pWriter->WriteAttribute("pinup", "false");
- __pWriter->WriteAttribute("primary", "true");
+
+ if (primary.IsEmpty() == false)
+ {
+ primary.ToLowerCase();
+ __pWriter->WriteAttribute("primary", primary);
+ }
+
__pWriter->WriteAttribute("auto_launch", "false");
__pWriter->WriteAttribute("abi", "osp");
WriteLanguageValue(pLiveboxNameList, label);
- if (pLiveboxInfo->GetIcon().IsEmpty() == false)
+// if (pLiveboxInfo->GetIcon().IsEmpty() == false)
+// {
+// String liveboxIcon;
+// liveboxIcon.Format(1024, L"%ls%ls/%ls", pPackageInfoImpl->GetAppRootPath().GetPointer(), DIR_SHARED_RES, pLiveboxInfo->GetIcon().GetPointer());
+//
+// __pWriter->StartElement("icon");
+// __pWriter->WriteString(liveboxIcon);
+// __pWriter->EndElement();
+// }
+
+ String menuIcon = pAppInfoImpl->GetMainmenuIcon();
+ if (menuIcon.IsEmpty() == false)
{
- String liveboxIcon;
- liveboxIcon.Format(1024, L"%ls%ls/%ls", pPackageInfoImpl->GetAppRootPath().GetPointer(), DIR_SHARED_RES, pLiveboxInfo->GetIcon().GetPointer());
+ String menuIconPath;
+ menuIconPath.Format(1024, L"%ls%ls/%ls", pPackageInfoImpl->GetAppRootPath().GetPointer(), DIR_SHARED_RES, menuIcon.GetPointer());
__pWriter->StartElement("icon");
- __pWriter->WriteString(liveboxIcon);
+ __pWriter->WriteString(menuIconPath);
__pWriter->EndElement();
}
__pWriter->EndElement();
}
+ if (pLiveboxInfo->__configurationAppControlAppId.IsEmpty() == false)
+ {
+ __pWriter->StartElement("setup");
+ __pWriter->WriteString(pLiveboxInfo->__configurationAppControlAppId);
+ __pWriter->EndElement();
+ }
+
popupEnabled.ToLowerCase();
if (popupEnabled == L"true")
{
nodisplay = L"true";
}
- if (FindCategory(index, "http://tizen.org/category/ime") == true)
+ const char* pCategory = null;
+ pCategory = TIZEN_CATEGORY_IME;
+ if (FindCategory(index, pCategory) == true)
{
- AppLogTag(OSP_INSTALLER, "Write(): [http://tizen.org/category/ime] is detected. taskmanage=false, nodisplay=true");
+ AppLogTag(OSP_INSTALLER, "Write(): [%s] is detected. taskmanage=false, nodisplay=true", pCategory);
taskmanage = L"false";
nodisplay = L"true";
}
- if (FindCategory(index, "http://tizen.org/category/homescreen") == true)
+ pCategory = TIZEN_CATEGORY_HOMESCREEN;
+ if (FindCategory(index, pCategory) == true)
+ {
+ AppLogTag(OSP_INSTALLER, "Write(): [%s] is detected. taskmanage=false", pCategory);
+ taskmanage = L"false";
+ }
+
+ pCategory = TIZEN_CATEGORY_LOCKSCREEN;
+ if (FindCategory(index, pCategory) == true)
{
- AppLogTag(OSP_INSTALLER, "Write(): [http://tizen.org/category/homescreen] is detected. taskmanage=false");
+ AppLogTag(OSP_INSTALLER, "Write(): [%s] is detected. taskmanage=false", pCategory);
taskmanage = L"false";
}
- if (FindCategory(index, "http://tizen.org/category/lockscreen") == true)
+ pCategory = TIZEN_CATEGORY_MENUSCREEN;
+ if (FindCategory(index, pCategory) == true)
{
- AppLogTag(OSP_INSTALLER, "Write(): [http://tizen.org/category/lockscreen] is detected. taskmanage=false");
+ AppLogTag(OSP_INSTALLER, "Write(): [%s] is detected. taskmanage=false", pCategory);
taskmanage = L"false";
}
}
{
status = OnUriValue(pCharacters);
}
+ else if (strcasecmp(pName, "ConfigurationAppControlAppId") == 0)
+ {
+ status = OnConfigurationAppControlAppIdValue(pCharacters);
+ }
if (!status)
{
TryReturn(__pLiveboxInfo == null, false, "[osp-installer] __pLiveboxInfo is not null");
XmlAttribute *pAttr = null;
- char *pUpdatePeriod = null;
- char *pPopupEnabled = null;
- char *pName = null;
__pLiveboxInfo = new (std::nothrow) LiveboxInfo;
TryReturn(__pLiveboxInfo, false, "[osp-installer] __pLiveboxInfo is null");
pAttr = GetAttribute();
TryReturn(pAttr, true, "[osp-installer] pAttr is null");
- pUpdatePeriod = pAttr->Find("UpdatePeriod");
- TryReturn(pUpdatePeriod, false, "[osp-installer] pUpdatePeriod is null");
-
- long long updatePeriod = atoll(pUpdatePeriod);
- __pLiveboxInfo->SetUpdatePeriod(updatePeriod);
+ AppLogTag(OSP_INSTALLER, "<Livebox>");
- pPopupEnabled = pAttr->Find("LiveBoxPopupEnabled");
- TryReturn(pPopupEnabled, false, "[osp-installer] pPopupEnabled is null");
-
- __pLiveboxInfo->SetPopupEnabled(pPopupEnabled);
+ char *pProviderName = pAttr->Find("ProviderName");
+ if (pProviderName)
+ {
+ __pLiveboxInfo->SetName(pProviderName);
+ AppLogTag(OSP_INSTALLER, " - ProviderName=%s", pProviderName);
+ }
- pName = pAttr->Find("Name");
- TryReturn(pName, false, "[osp-installer] pName is null");
+ char *pUpdatePeriod = pAttr->Find("UpdatePeriod");
+ if (pUpdatePeriod)
+ {
+ long long updatePeriod = atoll(pUpdatePeriod);
+ __pLiveboxInfo->SetUpdatePeriod(updatePeriod);
+ AppLogTag(OSP_INSTALLER, " - UpdatePeriod=%lld", updatePeriod);
+ }
- __pLiveboxInfo->SetName(pName);
+ char *pLiveboxPopupEnabled = pAttr->Find("LiveBoxPopupEnabled");
+ if (pLiveboxPopupEnabled)
+ {
+ __pLiveboxInfo->SetPopupEnabled(pLiveboxPopupEnabled);
+ AppLogTag(OSP_INSTALLER, " - LiveBoxPopupEnabled=%s", pLiveboxPopupEnabled);
+ }
- AppLogTag(OSP_INSTALLER, "<Livebox UpdatePeriod=\"%lld\" pPopupEnabled=\"%s\">", updatePeriod, pPopupEnabled);
+ char *pMain = pAttr->Find("Main");
+ if (pMain)
+ {
+ __pLiveboxInfo->__main = pMain;
+ AppLogTag(OSP_INSTALLER, " - Main=%s", pMain);
+ }
return true;
}
}
bool
+ManifestHandler::OnConfigurationAppControlAppIdValue(const char* pCharacters)
+{
+ TryReturn(__pLiveboxInfo, true, "[osp-installer] __pLiveboxInfo is null");
+
+ __pLiveboxInfo->__configurationAppControlAppId = pCharacters;
+ AppLogTag(OSP_INSTALLER, "<ConfigurationAppControlAppId>%s</ConfigurationAppControlAppId>", pCharacters);
+
+ return true;
+}
+
+bool
ManifestHandler::FindElement(const char *pName)
{
bool res = false;
if (strcasecmp(pCategory, "home-screen") == 0)
{
- __pAppData->__pCategoryList->Add(new (std::nothrow) String("http://tizen.org/category/homescreen"));
+ __pAppData->__pCategoryList->Add(new (std::nothrow) String(TIZEN_CATEGORY_HOMESCREEN));
}
else if (strcasecmp(pCategory, "lock-screen") == 0)
{
- __pAppData->__pCategoryList->Add(new (std::nothrow) String("http://tizen.org/category/lockscreen"));
+ __pAppData->__pCategoryList->Add(new (std::nothrow) String(TIZEN_CATEGORY_LOCKSCREEN));
}
else if (strcasecmp(pCategory, "Ime") == 0)
{
- __pAppData->__pCategoryList->Add(new (std::nothrow) String("http://tizen.org/category/ime"));
+ __pAppData->__pCategoryList->Add(new (std::nothrow) String(TIZEN_CATEGORY_IME));
}
CategoryType categoryType = InstallerUtil::GetCategoryType(pCategory);
AppLogTag(OSP_INSTALLER, " - UseUi=%s", pUseUi);
}
+ char *pLifeDuration = pAttr->Find("LifeDuration");
+ if (pLifeDuration)
+ {
+ AddAppFeature("LifeDuration", pLifeDuration);
+ AppLogTag(OSP_INSTALLER, " - LifeDuration=%s", pLifeDuration);
+ }
+
char *pLaunchOnBoot = pAttr->Find("LaunchOnBoot");
if (pLaunchOnBoot)
{
bool OnMimeTypeValue(const char* pCharacters);
bool OnUriValue(const char* pCharacters);
+ bool OnConfigurationAppControlAppIdValue(const char* pCharacters);
+
// help functions
bool FindElement(const char *pName);
bool AddAppFeature(const Tizen::Base::String& name, const Tizen::Base::String& value);