Manifest Handler Implementation is updated.
authorDongeup Ham <dongeup.ham@samsung.com>
Mon, 17 Dec 2012 04:19:30 +0000 (13:19 +0900)
committerDongeup Ham <dongeup.ham@samsung.com>
Mon, 17 Dec 2012 04:19:30 +0000 (13:19 +0900)
Change-Id: I920fcf0163469e55f27c5fcfa0061c244e2ebc32

inc/InstallerDefs.h
src/XmlHandler/ManifestHandler.cpp
src/XmlHandler/ManifestHandler.h

index e01e45d..9909b1d 100755 (executable)
@@ -21,7 +21,7 @@
 #ifndef _INSTALLER_DEFS_H_
 #define _INSTALLER_DEFS_H_
 
-#define OSP_INSTALLER_VERSION "osp-installer version = [2012/12/17]_RC[1]"
+#define OSP_INSTALLER_VERSION "osp-installer version = [2012/12/17]_RC[2]"
 
 #define DIR_BIN                                L"/bin"
 #define DIR_INFO                       L"/info"
index 3cf56e8..e745dee 100755 (executable)
@@ -108,59 +108,59 @@ ManifestHandler::OnStartElement(const char *pName)
        }
        else if (strcasecmp(pName, "UiApp") == 0)
        {
-               status = OnUiAppElement();
+               status = OnUiAppStartElement();
        }
        else if (strcasecmp(pName, "ServiceApp") == 0)
        {
-               status = OnServiceAppElement();
+               status = OnServiceAppStartElement();
        }
        else if (strcasecmp(pName, "DataControl") == 0)
        {
-               status = OnDataControlElement();
+               status = OnDataControlStartElement();
        }
        else if (strcasecmp(pName, "AppControl") == 0)
        {
-               status = OnAppControlElement();
+               status = OnAppControlStartElement();
        }
        else if (strcasecmp(pName, "Capability") == 0)
        {
-               status = OnCapabilityElement();
+               status = OnCapabilityStartElement();
        }
        else if (strcasecmp(pName, "Resolution") == 0)
        {
-               status = OnResolutionElement();
+               status = OnResolutionStartElement();
        }
        else if (strcasecmp(pName, "Privileges") == 0)
        {
-               status = OnPrivilegesElement();
+               status = OnPrivilegesStartElement();
        }
        else if (strcasecmp(pName, "UiScalability") == 0)
        {
-               status = OnUiScalabilityElement();
+               status = OnUiScalabilityStartElement();
        }
        else if (strcasecmp(pName, "UiTheme") == 0)
        {
-               status = OnUiThemeElement();
+               status = OnUiThemeStartElement();
        }
        else if (strcasecmp(pName, "Icons") == 0)
        {
-               status = OnIconsElement();
+               status = OnIconsStartElement();
        }
        else if (strcasecmp(pName, "LiveBoxes") == 0)
        {
-               status = OnLiveBoxesElement();
+               status = OnLiveBoxesStartElement();
        }
        else if (strcasecmp(pName, "LiveBox") == 0)
        {
-               status = OnLiveBoxElement();
+               status = OnLiveBoxStartElement();
        }
        else if (strcasecmp(pName, "Contents") == 0)
        {
-               status = OnContentsElement();
+               status = OnContentsStartElement();
        }
        else if (strcasecmp(pName, "Content") == 0)
        {
-               status = OnContentElement();
+               status = OnContentStartElement();
        }
 
        if (!status)
@@ -184,72 +184,39 @@ ManifestHandler::OnEndElement(const char *pName)
        }
        else if (strcasecmp(pName, "UiApp") == 0)
        {
-               __pPackageInfoImpl->AddAppInfo(*__pPackageAppInfoImpl);
-               __pPackageAppInfoImpl = null;
-
-               __isDefaultName = false;
-
-               __pContext->__pAppDataList->Add(__pAppData);
-               __pAppData = null;
-
-               AppLogTag(OSP_INSTALLER, "</%s>", pName);
+               status = OnUiAppEndElement();
        }
        else if (strcasecmp(pName, "ServiceApp") == 0)
        {
-               __pPackageInfoImpl->AddAppInfo(*__pPackageAppInfoImpl);
-               __pPackageAppInfoImpl = null;
-
-               __isDefaultName = false;
-
-               __pContext->__pAppDataList->Add(__pAppData);
-               __pAppData = null;
-
-               AppLogTag(OSP_INSTALLER, "</%s>", pName);
+               status = OnServiceAppEndElement();
        }
        else if (strcasecmp(pName, "AppControl") == 0)
        {
-               __pPackageAppInfoImpl->AddAppControl(__pAppControlInfoImpl);
-               __pAppControlInfoImpl = null;
-               AppLogTag(OSP_INSTALLER, "</%s>", pName);
+               status = OnAppControlEndElement();
        }
        else if (strcasecmp(pName, "DataControl") == 0)
        {
-               __pPackageAppInfoImpl->AddDataControl(__pDataControlInfoImpl);
-               __pDataControlInfoImpl = null;
-               AppLogTag(OSP_INSTALLER, "</%s>", pName);
+               status = OnDataControlEndElement();
        }
        else if (strcasecmp(pName, "DataControlType") == 0)
        {
-               __pDataControlInfoImpl->AddControlType(__pDataControlTypeImpl);
-               __pDataControlTypeImpl = null;
-               AppLogTag(OSP_INSTALLER, "</%s>", pName);
+               status = OnDataControlTypeEndElement();
        }
        else if (strcasecmp(pName, "Condition") == 0)
        {
-               __pPackageAppInfoImpl->AddLaunchCondition(*__pLaunchConditionImpl);
-               __pLaunchConditionImpl = null;
-               AppLogTag(OSP_INSTALLER, "</%s>", pName);
+               status = OnConditionEndElement();
        }
        else if (strcasecmp(pName, "Notification") == 0)
        {
-               __pPackageAppInfoImpl->AddNotification(*__pNotificationImpl);
-               __pNotificationImpl = null;
-               AppLogTag(OSP_INSTALLER, "</%s>", pName);
+               status = OnNotificationEndElement();
        }
        else if (strcasecmp(pName, "Capability") == 0)
        {
-               if (__pAppControlInfoImpl)
-               {
-                       __pAppControlInfoImpl->AddCapability(__pAppControlCapabilityInfoImpl);
-                       __pAppControlCapabilityInfoImpl = null;
-               }
-               AppLogTag(OSP_INSTALLER, "</%s>", pName);
+               status = OnCapabilityEndElement();
        }
        else if (strcasecmp(pName, "Resolution") == 0)
        {
-               __pAppControlCapabilityInfoImpl->AddResolution(__pAppControlResolutionInfoImpl);
-               __pAppControlResolutionInfoImpl = null;
-               AppLogTag(OSP_INSTALLER, "</%s>", pName);
+               status = OnResolutionEndElement();
        }
        else if (strcasecmp(pName, "Apps") == 0)
        {
@@ -261,42 +228,27 @@ ManifestHandler::OnEndElement(const char *pName)
        }
        else if (strcasecmp(pName, "Icons") == 0)
        {
-               delete[] __pDefaultIconType;
-               __pDefaultIconType = null;
-               AppLogTag(OSP_INSTALLER, "</%s>", pName);
+               status = OnIconsEndElement();
        }
        else if (strcasecmp(pName, "LiveBoxes") == 0)
        {
-               __pContext->SetLiveBoxList(__pLiveBoxList);
-               __pLiveBoxList = null;
-               AppLogTag(OSP_INSTALLER, "</%s>", pName);
+               status = OnLiveBoxesEndElement();
        }
        else if (strcasecmp(pName, "Contents") == 0)
        {
-               __pContext->SetContentInfoList(__pContentInfoList);
-               __pContentInfoList = null;
-               AppLogTag(OSP_INSTALLER, "</%s>", pName);
+               status = OnContentsEndElement();
        }
        else if (strcasecmp(pName, "LiveBox") == 0)
        {
-               __pLiveBoxList->Add(*__pLiveboxInfo);
-               __pLiveboxInfo = null;
-               AppLogTag(OSP_INSTALLER, "</%s>", pName);
+               status = OnLiveBoxEndElement();
        }
        else if (strcasecmp(pName, "Content") == 0)
        {
-               __pContentInfoList->Add(*__pContentInfo);
-               __pContentInfo = null;
-               AppLogTag(OSP_INSTALLER, "</%s>", pName);
+               status = OnContentEndElement();
        }
        else if (strcasecmp(pName, "Manifest") == 0)
        {
-               if (__isDefaultAppDetected == false)
-               {
-                       fprintf(stderr, "__isDefaultAppDetected is false.\n");
-               }
-               TryReturn(__isDefaultAppDetected, false, "[osp-installer][Error] Default App is not detected...");
-               AppLogTag(OSP_INSTALLER, "</%s>", pName);
+               status = OnManifestEndElement();
        }
 
        if (!status)
@@ -336,10 +288,6 @@ ManifestHandler::OnCharacters(const char *pCharacters)
        {
                status = OnApiVersionValue(pCharacters);
        }
-       else if (strcasecmp(pName, "Secret") == 0)
-       {
-               status = OnSecretValue(pCharacters);
-       }
        else if (strcasecmp(pName, "Privilege") == 0)
        {
                status = OnPrivilegeValue(pCharacters);
@@ -348,9 +296,9 @@ ManifestHandler::OnCharacters(const char *pCharacters)
        {
                status = OnNameValue(pCharacters);
        }
-       else if (strcasecmp(pName, "Vendor") == 0)
+       else if (strcasecmp(pName, "Author") == 0)
        {
-               status = OnVendorValue(pCharacters);
+               status = OnAuthorValue(pCharacters);
        }
        else if (strcasecmp(pName, "Description") == 0)
        {
@@ -394,7 +342,7 @@ ManifestHandler::OnCharacters(const char *pCharacters)
 }
 
 bool
-ManifestHandler::OnPrivilegesElement(void)
+ManifestHandler::OnPrivilegesStartElement(void)
 {
        __pPrivilegeList = new ArrayList;
        TryReturn(__pPrivilegeList, false, "[osp-installer] __pPrivilegeList is null");
@@ -405,174 +353,291 @@ ManifestHandler::OnPrivilegesElement(void)
 }
 
 bool
-ManifestHandler::OnPrivilegesEndElement(void)
+ManifestHandler::OnUiAppStartElement(void)
 {
-       if (__pContext->IsVerificationMode() == false)
-       {
-               AppLogTag(OSP_INSTALLER, "Signature file not found. [%ls]\n", __pContext->GetSignatureXmlPath().GetPointer());
-
-               result r = E_SUCCESS;
-               String privileges;
-               String hmacPrivileges;
-               String appId = __pPackageInfoImpl->GetAppId();
-               r = PrivilegeHandler::GenerateCipherPrivilege(appId, *__pPrivilegeList, privileges, hmacPrivileges);
-               if (IsFailed(r))
-               {
-                       fprintf(stderr, "PrivilegeHandler::GenerateCipherPrivilege is failded. [%ls][%ls][%ls]\n", appId.GetPointer(), privileges.GetPointer(), hmacPrivileges.GetPointer());
-               }
-               TryReturn(!IsFailed(r), false, "[osp-installer] privMgr.GeneratePrivilegeString() failed");
-
-               __pPackageInfoImpl->SetPrivilegesValue(privileges, hmacPrivileges);
-       }
-
-       __pContext->SetPrivilegeList(__pPrivilegeList);
-       
-       AppLogTag(OSP_INSTALLER, "</Privileges>");
-
-       return true;
-}
+       XmlAttribute *pAttr = null;
 
-bool
-ManifestHandler::OnLiveBoxesElement(void)
-{
-       __pLiveBoxList = new ArrayList;
-       TryReturn(__pLiveBoxList, false, "[osp-installer] __pLiveBoxList is null");
+       __pPackageAppInfoImpl = new _PackageAppInfoImpl;
+       TryReturn(__pPackageAppInfoImpl, false, "[osp-installer] __pPackageAppInfoImpl is null");
 
-       AppLogTag(OSP_INSTALLER, "<LiveBoxes>");
+       __pAppData = new (std::nothrow) AppData;
+       TryReturn(__pAppData, false, "[osp-installer] __pAppData is null");
 
-       return true;
-}
+       pAttr = GetAttribute();
+       TryReturn(pAttr, true, "[osp-installer] pAttr is null");
 
-bool
-ManifestHandler::OnLiveBoxElement(void)
-{
-       TryReturn(__pLiveboxInfo == null, false, "[osp-installer] __pLiveboxInfo is not null");
+       char* pExecutableName = pAttr->Find("ExecutableName");
+       if (pExecutableName == null)
+       {
+               pExecutableName = pAttr->Find("Name");
+       }
+       TryReturn(pExecutableName, true, "[osp-installer] pExecutableName is null");
 
-       XmlAttribute *pAttr = null;
-       char *pUpdatePeriod = null;
-       char *pPopupEnabled = null;
-       char *pName = null;
+       __pPackageAppInfoImpl->SetName(pExecutableName);
 
-       __pLiveboxInfo = new LiveboxInfo;
-       TryReturn(__pLiveboxInfo, false, "[osp-installer] __pLiveboxInfo is null");
+       char* pDefault = pAttr->Find("Default");
+       if (pDefault)
+       {
+               __pPackageAppInfoImpl->SetDefault(pDefault);
 
-       pAttr = GetAttribute();
-       TryReturn(pAttr, true, "[osp-installer] pAttr is null");
+               if (strcasecmp(pDefault, "True") == 0)
+               {
+                       __isDefaultName = true;
+                       __isDefaultAppDetected = true;
+               }
+       }
+       else
+       {
+               __pPackageAppInfoImpl->SetDefault("False");
+       }
 
-       pUpdatePeriod = pAttr->Find("UpdatePeriod");
-       TryReturn(pUpdatePeriod, false, "[osp-installer] pUpdatePeriod is null");
+       __pPackageAppInfoImpl->SetType("UiApp");
 
-       long long updatePeriod = atoll(pUpdatePeriod);
-       __pLiveboxInfo->SetUpdatePeriod(updatePeriod);
+       char* pMainmenuVisible = pAttr->Find("MainmenuVisible");
+       if (pMainmenuVisible)
+       {
+               if (strcasecmp(pMainmenuVisible, "True") == 0)
+               {
+                       __pPackageAppInfoImpl->SetMainmenuVisible(true);
+               }
+               else
+               {
+                       __pPackageAppInfoImpl->SetMainmenuVisible(false);
+               }
 
-       pPopupEnabled = pAttr->Find("LiveBoxPopupEnabled");
-       TryReturn(pPopupEnabled, false, "[osp-installer] pPopupEnabled is null");
+               AddAppFeature("MainmenuVisible", pMainmenuVisible);
+               AppLogTag(OSP_INSTALLER, "<MainmenuVisible=%s>", pMainmenuVisible);
+       }
 
-       __pLiveboxInfo->SetPopupEnabled(pPopupEnabled);
+       char* pGlFrame = pAttr->Find("GlFrame");
+       if (pGlFrame)
+       {
+               AddAppFeature("GlFrame", pGlFrame);
+               AppLogTag(OSP_INSTALLER, "<GlFrame=%s>", pGlFrame);
+       }
 
-       pName = pAttr->Find("Name");
-       TryReturn(pName, false, "[osp-installer] pName is null");
+       char* pCategory = pAttr->Find("Category");
+       if (pCategory)
+       {
+               AppLogTag(OSP_INSTALLER, "<Category=%s>", pCategory);
 
-       __pLiveboxInfo->SetName(pName);
+               if (strcasecmp(pCategory, "home-screen") == 0)
+               {
+                       // __pCategoryList->Add(new String("home-screen"));
+                       __pAppData->__pCategoryList->Add(new String("http://tizen.org/category/homescreen"));
+               }
+               else if (strcasecmp(pCategory, "lock-screen") == 0)
+               {
+                       // __pCategoryList->Add(new String("lock-screen"));
+                       __pAppData->__pCategoryList->Add(new String("http://tizen.org/category/lockscreen"));
+               }
+               else if (strcasecmp(pCategory, "Ime") == 0)
+               {
+                       __pAppData->__pCategoryList->Add(new String("http://tizen.org/category/ime"));
+               }
 
-       AppLogTag(OSP_INSTALLER, "<Livebox UpdatePeriod=\"%lld\" pPopupEnabled=\"%s\">", updatePeriod, pPopupEnabled);
+               // CategoryType categoryType = InstallerUtil::GetCategoryType(pCategory);
+               // __pPackageAppInfoImpl->SetAppFeature(categoryType);
+       }
 
-       return true;
-}
+       String app_id;
+       if (__pContext->GetPackageNameType() == INSTALLER_PREFIX_TYPE_ORG)
+       {
+               app_id.Format(1024, PACKAGE_NAME_RULE_ORG, __pPackageInfoImpl->GetAppId().GetPointer(), pExecutableName);
+       }
+       else
+       {
+               app_id.Format(1024, PACKAGE_NAME_RULE, __pPackageInfoImpl->GetAppId().GetPointer(), pExecutableName);
+       }
 
-bool
-ManifestHandler::OnContentsElement(void)
-{
-       __pContentInfoList = new ArrayList;
-       TryReturn(__pContentInfoList, false, "[osp-installer] __pContentInfoList is null");
+       __pPackageAppInfoImpl->SetPackageName(app_id);
 
-       AppLogTag(OSP_INSTALLER, "<Contents>");
+       AppLogTag(OSP_INSTALLER, "app_id = %S", app_id.GetPointer());
+       AppLogTag(OSP_INSTALLER, "<UiApp Name=\"%s\" Default=\"%s\">", pExecutableName, pDefault ? pDefault:"False");
 
        return true;
 }
 
 bool
-ManifestHandler::OnContentElement(void)
+ManifestHandler::OnServiceAppStartElement(void)
 {
-       TryReturn(__pContentInfo == null, false, "[osp-installer] __pContentInfo is not null");
-
        XmlAttribute *pAttr = null;
+       char *pExecutableName = null;
        char *pDefault = null;
+       char *pMainmenuVisible = null;
+       char *pLaunchOnBoot = null;
+       char *pAutoRestart = null;
+       char *pUseUi = null;
 
-       __pContentInfo = new ContentInfo;
-       TryReturn(__pContentInfo, false, "[osp-installer] __pLiveboxInfo is null");
+       __pPackageAppInfoImpl = new _PackageAppInfoImpl;
+       TryReturn(__pPackageAppInfoImpl, false, "[osp-installer] __pPackageAppInfoImpl is null");
+
+       __pAppData = new (std::nothrow) AppData;
+       TryReturn(__pAppData, false, "[osp-installer] __pAppData is null");
 
        pAttr = GetAttribute();
-       TryReturn(pAttr, true, "[osp-installer] pAttr is null");
+       TryReturn(pAttr, true, "pAttr is null");
 
-       char* pId = pAttr->Find("Id");
-       if (pId)
+       pExecutableName = pAttr->Find("ExecutableName");
+       if (pExecutableName == null)
        {
-               __pContentInfo->SetContentId(pId);
+               pExecutableName = pAttr->Find("Name");
        }
+       TryReturn(pExecutableName, true, "[osp-installer] pExecutableName is null");
 
-       char* pEntryName = pAttr->Find("EntryName");
-       if (pEntryName)
-       {
-               __pContentInfo->SetContentId(pEntryName);
-       }
+       __pPackageAppInfoImpl->SetName(pExecutableName);
 
        pDefault = pAttr->Find("Default");
        if (pDefault)
        {
+               __pPackageAppInfoImpl->SetDefault(pDefault);
+
                if (strcasecmp(pDefault, "True") == 0)
                {
+                       __isDefaultName = true;
                        __isDefaultAppDetected = true;
                }
        }
-
-       AppLogTag(OSP_INSTALLER, "<Content Id=\"%s\" EntryName=\"%s\">", pId, pEntryName);
-
-       return true;
-}
-
-bool
-ManifestHandler::OnUiScalabilityElement(void)
-{
-       XmlAttribute *pAttr = null;
-       char *pCoordinateSystem = null;
-       char *pBaseScreenSize = null;
-       char *pLogicalCoordinate = null;
-
-       AppLogTag(OSP_INSTALLER, "<UiScalability>");
-
-       pAttr = GetAttribute();
-       TryReturn(pAttr, true, "[osp-installer] pAttr is null");
-
-       pCoordinateSystem = pAttr->Find("CoordinateSystem");
-       if (pCoordinateSystem)
+       else
        {
-               _AppFeatureInfoImpl* pAppFeatureInfo = new _AppFeatureInfoImpl;
-               TryReturn(pAppFeatureInfo, false, "[osp-installer] pAppFeatureInfo is null");
-
-               pAppFeatureInfo->SetName("CoordinateSystem");
-               pAppFeatureInfo->SetValue(pCoordinateSystem);
+               __pPackageAppInfoImpl->SetDefault("False");
+       }
 
-               __pPackageAppInfoImpl->AddAppFeature(*pAppFeatureInfo);
+       __pPackageAppInfoImpl->SetType("ServiceApp");
+       __pPackageAppInfoImpl->SetMainmenuVisible(false);
 
-               AppLogTag(OSP_INSTALLER, "<CoordinateSystem=%s>", pCoordinateSystem);
+       pMainmenuVisible = pAttr->Find("MainmenuVisible");
+       if (pMainmenuVisible)
+       {
+               AddAppFeature("MainmenuVisible", pMainmenuVisible);
+               AppLogTag(OSP_INSTALLER, "<MainmenuVisible=%s>", pMainmenuVisible);
        }
 
-       pBaseScreenSize = pAttr->Find("BaseScreenSize");
-       if (pBaseScreenSize)
+       pLaunchOnBoot = pAttr->Find("LaunchOnBoot");
+       if (pLaunchOnBoot)
        {
-               _AppFeatureInfoImpl* pAppFeatureInfo = new _AppFeatureInfoImpl;
-               TryReturn(pAppFeatureInfo, false, "[osp-installer] pAppFeatureInfo is null");
-
-               pAppFeatureInfo->SetName("BaseScreenSize");
-               pAppFeatureInfo->SetValue(pBaseScreenSize);
-
-               __pPackageAppInfoImpl->AddAppFeature(*pAppFeatureInfo);
-
-               AppLogTag(OSP_INSTALLER, "<BaseScreenSize=%s>", pBaseScreenSize);
+               AddAppFeature("LaunchOnBoot", pLaunchOnBoot);
+               AppLogTag(OSP_INSTALLER, "<LaunchOnBoot=%s>", pLaunchOnBoot);
        }
 
-       pLogicalCoordinate = pAttr->Find("LogicalCoordinate");
+       pAutoRestart = pAttr->Find("AutoRestart");
+       if (pAutoRestart)
+       {
+               AddAppFeature("AutoRestart", pAutoRestart);
+               AppLogTag(OSP_INSTALLER, "<AutoRestart=%s>", pAutoRestart);
+       }
+
+       pUseUi = pAttr->Find("UseUi");
+       if (pUseUi)
+       {
+               AddAppFeature("UseUi", pUseUi);
+               AppLogTag(OSP_INSTALLER, "<UseUi=%s>", pUseUi);
+       }
+
+       char* pGlFrame = pAttr->Find("GlFrame");
+       if (pGlFrame)
+       {
+               AddAppFeature("GlFrame", pGlFrame);
+               AppLogTag(OSP_INSTALLER, "<GlFrame=%s>", pGlFrame);
+       }
+
+       String app_id;
+
+       if (__pContext->GetPackageNameType() == INSTALLER_PREFIX_TYPE_ORG)
+       {
+               app_id.Format(1024, PACKAGE_NAME_RULE_ORG, __pPackageInfoImpl->GetAppId().GetPointer(), pExecutableName);
+       }
+       else
+       {
+               app_id.Format(1024, PACKAGE_NAME_RULE, __pPackageInfoImpl->GetAppId().GetPointer(), pExecutableName);
+       }
+
+       __pPackageAppInfoImpl->SetPackageName(app_id);
+
+       AppLogTag(OSP_INSTALLER, "app_id = %S", app_id.GetPointer());
+       AppLogTag(OSP_INSTALLER, "<ServiceApp Name=\"%s\" Default=\"%s\">", pExecutableName, pDefault ? pDefault:"False");
+
+       return true;
+}
+
+bool
+ManifestHandler::OnIconsStartElement(void)
+{
+       result r = E_SUCCESS;
+       int width = 0;
+       String defaultIconType;
+
+       AppLogTag(OSP_INSTALLER, "<Icons>");
+
+       r = _SystemInfoImpl::GetSysInfo(L"ScreenWidth", width);
+       if (IsFailed(r))
+       {
+               defaultIconType = L"Xhigh";
+       }
+       else
+       {
+               if (width == 480)
+               {
+                       defaultIconType = L"High";
+               }
+               else
+               {
+                       defaultIconType = L"Xhigh";
+               }
+       }
+
+       AppLogTag(OSP_INSTALLER, "ScreenWidth = [%d]", width);
+
+       __pDefaultIconType = _StringConverter::CopyToCharArrayN(defaultIconType);
+       TryReturn(__pDefaultIconType, false, "[osp-installer] __pDefaultIconType is null.");
+
+       AppLogTag(OSP_INSTALLER, "DefaultIconType = [%s]", __pDefaultIconType);
+
+       return true;
+}
+
+bool
+ManifestHandler::OnUiScalabilityStartElement(void)
+{
+       XmlAttribute *pAttr = null;
+       char *pCoordinateSystem = null;
+       char *pBaseScreenSize = null;
+       char *pLogicalCoordinate = null;
+
+       AppLogTag(OSP_INSTALLER, "<UiScalability>");
+
+       pAttr = GetAttribute();
+       TryReturn(pAttr, true, "[osp-installer] pAttr is null");
+
+       pCoordinateSystem = pAttr->Find("CoordinateSystem");
+       if (pCoordinateSystem)
+       {
+               _AppFeatureInfoImpl* pAppFeatureInfo = new _AppFeatureInfoImpl;
+               TryReturn(pAppFeatureInfo, false, "[osp-installer] pAppFeatureInfo is null");
+
+               pAppFeatureInfo->SetName("CoordinateSystem");
+               pAppFeatureInfo->SetValue(pCoordinateSystem);
+
+               __pPackageAppInfoImpl->AddAppFeature(*pAppFeatureInfo);
+
+               AppLogTag(OSP_INSTALLER, "<CoordinateSystem=%s>", pCoordinateSystem);
+       }
+
+       pBaseScreenSize = pAttr->Find("BaseScreenSize");
+       if (pBaseScreenSize)
+       {
+               _AppFeatureInfoImpl* pAppFeatureInfo = new _AppFeatureInfoImpl;
+               TryReturn(pAppFeatureInfo, false, "[osp-installer] pAppFeatureInfo is null");
+
+               pAppFeatureInfo->SetName("BaseScreenSize");
+               pAppFeatureInfo->SetValue(pBaseScreenSize);
+
+               __pPackageAppInfoImpl->AddAppFeature(*pAppFeatureInfo);
+
+               AppLogTag(OSP_INSTALLER, "<BaseScreenSize=%s>", pBaseScreenSize);
+       }
+
+       pLogicalCoordinate = pAttr->Find("LogicalCoordinate");
        if (pLogicalCoordinate)
        {
                _AppFeatureInfoImpl* pAppFeatureInfo = new _AppFeatureInfoImpl;
@@ -590,7 +655,7 @@ ManifestHandler::OnUiScalabilityElement(void)
 }
 
 bool
-ManifestHandler::OnUiThemeElement(void)
+ManifestHandler::OnUiThemeStartElement(void)
 {
        XmlAttribute *pAttr = null;
        char *pSystemTheme = null;
@@ -633,708 +698,751 @@ ManifestHandler::OnUiThemeElement(void)
 }
 
 bool
-ManifestHandler::OnIconsElement(void)
+ManifestHandler::OnAppControlStartElement(void)
 {
-       result r = E_SUCCESS;
-       int width = 0;
-       String defaultIconType;
+       XmlAttribute *pAttr = null;
+       char *pAttrValue1 = null;
+       char *pAttrValue2 = null;
 
-       AppLogTag(OSP_INSTALLER, "<Icons>");
+       pAttr = GetAttribute();
+       TryReturn(pAttr, true, "[osp-installer] pAttr is null");
 
-       r = _SystemInfoImpl::GetSysInfo(L"ScreenWidth", width);
-       if (IsFailed(r))
-       {
-               defaultIconType = L"Xhigh";     
-       }
-       else
-       {
-               if (width == 480)
-               {
-                       defaultIconType = L"High";
-               }
-               else
-               {
-                       defaultIconType = L"Xhigh";
-               }
-       }
+       pAttrValue1 = pAttr->Find("ProviderId");
+       TryReturn(pAttrValue1, true, "[osp-installer] pAttrValue1 is null");
 
-       AppLogTag(OSP_INSTALLER, "ScreenWidth = [%d]", width);
+       pAttrValue2 = pAttr->Find("Category");
+       TryReturn(pAttrValue2, true, "[osp-installer] pAttrValue2 is null");
 
-       __pDefaultIconType = _StringConverter::CopyToCharArrayN(defaultIconType);
-       TryReturn(__pDefaultIconType, false, "[osp-installer] __pDefaultIconType is null.");
+       __pAppControlInfoImpl = new _AppControlInfoImpl;
+       TryReturn(__pAppControlInfoImpl, false, "[osp-installer] __pAppControlInfoImpl is null");
 
-       AppLogTag(OSP_INSTALLER, "DefaultIconType = [%s]", __pDefaultIconType);
+       __pAppControlInfoImpl->SetProviderId(pAttrValue1);
+       __pAppControlInfoImpl->SetCategory(pAttrValue2);
+
+       AppLogTag(OSP_INSTALLER, "<AppControl ProviderId=\"%s\" Category=\"%s\">", pAttrValue1, pAttrValue2);
 
        return true;
 }
 
 bool
-ManifestHandler::OnIdValue(const char *pCharacters)
+ManifestHandler::OnCapabilityStartElement(void)
 {
-       __pPackageInfoImpl->SetAppId(pCharacters);
-       AppLogTag(OSP_INSTALLER, "<Id>%s</Id>", pCharacters);
+       XmlAttribute *pAttr = null;
+       char *pAttrValue = null;
 
-       return true;
-}
+       pAttr = GetAttribute();
+       TryReturn(pAttr, true, "[osp-installer] pAttr is null");
 
-bool
-ManifestHandler::OnVersionValue(const char *pCharacters)
-{
-       __pPackageInfoImpl->SetAppVersion(pCharacters);
-       AppLogTag(OSP_INSTALLER, "<Version>%s</Version>", pCharacters);
+       pAttrValue = pAttr->Find("OperationId");
+       TryReturn(pAttrValue, true, "[osp-installer] pAttrValue1 is null");
+
+       __pAppControlCapabilityInfoImpl = new _AppControlCapabilityInfoImpl;
+       TryReturn(__pAppControlCapabilityInfoImpl, false, "[osp-installer] __pAppControlCapabilityInfoImpl is null");
+
+       __pAppControlCapabilityInfoImpl->SetOperationId(pAttrValue);
+
+       AppLogTag(OSP_INSTALLER, "<Capability OperationId=\"%s\">", pAttrValue);
 
        return true;
 }
 
 bool
-ManifestHandler::OnTypeValue(const char *pCharacters)
+ManifestHandler::OnResolutionStartElement(void)
 {
-       __pPackageInfoImpl->SetAppType(pCharacters);
+       XmlAttribute *pAttr = null;
+       char *pAttrValue1 = null;
+       char *pAttrValue2 = null;
 
-       if (strcasecmp(pCharacters, "Contents") == 0)
+       pAttr = GetAttribute();
+       TryReturn(pAttr, true, "[osp-installer] pAttr is null");
+
+       pAttrValue1 = pAttr->Find("MimeType");
+       pAttrValue2 = pAttr->Find("UriScheme");
+
+       __pAppControlResolutionInfoImpl = new _AppControlResolutionInfoImpl;
+       TryReturn(__pAppControlResolutionInfoImpl, false, "[osp-installer] __pAppControlResolutionInfoImpl is null");
+
+       if (pAttrValue1)
        {
-               __pPackageInfoImpl->SetAppApiVersion("3.0");
+               String* pMimeType = new String(pAttrValue1);
+               __pAppControlResolutionInfoImpl->SetMimeType(pMimeType);
        }
 
-       AppLogTag(OSP_INSTALLER, "<Type>%s</Type>", pCharacters);
+       if (pAttrValue2)
+       {
+               String* pUriScheme = new String(pAttrValue2);
+               __pAppControlResolutionInfoImpl->SetUriScheme(pUriScheme);
+       }
+
+       AppLogTag(OSP_INSTALLER, "<Resolution MimeType=\"%s\" UriScheme=\"%s\">", pAttrValue1, pAttrValue2);
 
        return true;
 }
 
 bool
-ManifestHandler::OnUrlValue(const char *pCharacters)
+ManifestHandler::OnDataControlStartElement(void)
 {
-       __pPackageInfoImpl->SetAppUrl(pCharacters);
-       AppLogTag(OSP_INSTALLER, "<Url>%s</Url>", pCharacters);
+       XmlAttribute *pAttr = null;
+       char *pProviderId = null;
 
-       return true;
-}
+       pAttr = GetAttribute();
+       TryReturn(pAttr, true, "[osp-installer] pAttr is null");
 
-bool
-ManifestHandler::OnSecretValue(const char *pCharacters)
-{
-       __pPackageInfoImpl->SetAppSecret(pCharacters);
-       AppLogTag(OSP_INSTALLER, "<Secret>%s</Secret>", pCharacters);
+       pProviderId = pAttr->Find("ProviderId");
+       TryReturn(pProviderId, true, "[osp-installer] pProviderId is null");
+
+       __pDataControlInfoImpl = new _DataControlInfoImpl;
+       TryReturn(__pDataControlInfoImpl, false, "[osp-installer] __pDataControlInfoImpl is null");
+
+       __pDataControlInfoImpl->SetProviderId(pProviderId);
+
+       AppLogTag(OSP_INSTALLER, "<DataControl ProviderId=\"%s\">", pProviderId);
 
        return true;
 }
 
 bool
-ManifestHandler::OnApiVersionValue(const char *pCharacters)
+ManifestHandler::OnContentsStartElement(void)
 {
-       __pPackageInfoImpl->SetAppApiVersion(pCharacters);
-       AppLogTag(OSP_INSTALLER, "<ApiVersion>%s</ApiVersion>", pCharacters);
+       __pContentInfoList = new ArrayList;
+       TryReturn(__pContentInfoList, false, "[osp-installer] __pContentInfoList is null");
+
+       AppLogTag(OSP_INSTALLER, "<Contents>");
 
        return true;
 }
 
 bool
-ManifestHandler::OnIconValue(const char *pCharacters)
+ManifestHandler::OnContentStartElement(void)
 {
-       XmlAttribute *pAttr = 0;
-       char *pAttrValue1 = 0;
-       char *pTypeValue = 0;
-
-       pAttr = GetAttribute();
-       TryReturn(pAttr, true, "[osp-installer] pAttr is null");
+       TryReturn(__pContentInfo == null, false, "[osp-installer] __pContentInfo is not null");
 
-       pAttrValue1 = pAttr->Find("Section");
-       TryReturn(pAttrValue1, true, "[osp-installer] pAttrValue1 is null");
+       XmlAttribute *pAttr = null;
+       char *pDefault = null;
 
-       pTypeValue = pAttr->Find("Type");
-       TryReturn(pTypeValue, true, "[osp-installer] pTypeValue is null");
+       __pContentInfo = new ContentInfo;
+       TryReturn(__pContentInfo, false, "[osp-installer] __pLiveboxInfo is null");
 
-       char icon[1024] = {0,};
+       pAttr = GetAttribute();
+       TryReturn(pAttr, true, "[osp-installer] pAttr is null");
 
-       if (strcasecmp(pTypeValue, "Xhigh") == 0)
+       char* pId = pAttr->Find("Id");
+       if (pId)
        {
-               snprintf(icon, sizeof(icon), "%s/%s", "screen-density-xhigh", pCharacters);
-       }
-       else if (strcasecmp(pTypeValue, "High") == 0)
-       {
-               snprintf(icon, sizeof(icon), "%s/%s", "screen-density-high", pCharacters);
-       }
-       else
-       {
-               AppLogTag(OSP_INSTALLER, "Invalid Type [%s]", __pDefaultIconType);
-               return false;
+               __pContentInfo->SetContentId(pId);
        }
 
-       if (FindElement("Livebox") == true)
-       {
-               TryReturn(__pLiveboxInfo, false, "[osp-installer] __pLiveboxInfo is null");
-               __pLiveboxInfo->SetIcon(icon);
-       }
-       else if (FindElement("Content") == true)
+       char* pEntryName = pAttr->Find("EntryName");
+       if (pEntryName)
        {
-               TryReturn(__pContentInfo, false, "[osp-installer] __pContentInfo is null");
-               __pContentInfo->SetIcon(icon);
+               __pContentInfo->SetContentId(pEntryName);
        }
-       else
-       {
-               if (strcasecmp(pAttrValue1, "MainMenu") == 0)
-               {
-                       if (__isDefaultMainmenu == false)
-                       {
-                               __pPackageAppInfoImpl->SetMainmenuIcon(icon);
-                       }
-
-                       if (strcasecmp(pTypeValue, __pDefaultIconType) == 0)
-                       {
-                               __isDefaultMainmenu = true;
-                       }
-               }
-               else if (strcasecmp(pAttrValue1, "Setting") == 0)
-               {
-                       if (__isDefaultSetting == false)
-                       {
-                               __pPackageAppInfoImpl->SetSettingIcon(icon);
-                       }
 
-                       if (strcasecmp(pTypeValue, __pDefaultIconType) == 0)
-                       {
-                               __isDefaultSetting = true;
-                       }
-               }
-               else if (strcasecmp(pAttrValue1, "Notification") == 0)
+       pDefault = pAttr->Find("Default");
+       if (pDefault)
+       {
+               if (strcasecmp(pDefault, "True") == 0)
                {
-                       if (__isDefaultQuickpanel == false)
-                       {
-                               __pPackageAppInfoImpl->SetQuickpanelIcon(icon);
-                       }
-
-                       if (strcasecmp(pTypeValue, __pDefaultIconType) == 0)
-                       {
-                               __isDefaultQuickpanel = true;
-                       }
+                       __isDefaultAppDetected = true;
                }
        }
 
-       AppLogTag(OSP_INSTALLER, "<Icon Section=\"%s\" Type=\"%s\">%s</Icon>", pAttrValue1, pTypeValue, pCharacters);
+       AppLogTag(OSP_INSTALLER, "<Content Id=\"%s\" EntryName=\"%s\">", pId, pEntryName);
 
        return true;
 }
 
 bool
-ManifestHandler::OnPrivilegeValue(const char *pCharacters)
+ManifestHandler::OnLiveBoxesStartElement(void)
 {
-       __pPrivilegeList->Add(*new String(pCharacters));
-       AppLogTag(OSP_INSTALLER, "<Privilege>%s</Privilege>", pCharacters);
+       __pLiveBoxList = new ArrayList;
+       TryReturn(__pLiveBoxList, false, "[osp-installer] __pLiveBoxList is null");
+
+       AppLogTag(OSP_INSTALLER, "<LiveBoxes>");
 
        return true;
 }
 
 bool
-ManifestHandler::OnNameValue(const char *pCharacters)
+ManifestHandler::OnLiveBoxStartElement(void)
 {
-       XmlAttribute* pAttr = 0;
-       char* pAttrValue = 0;
+       TryReturn(__pLiveboxInfo == null, false, "[osp-installer] __pLiveboxInfo is not null");
+
+       XmlAttribute *pAttr = null;
+       char *pUpdatePeriod = null;
+       char *pPopupEnabled = null;
+       char *pName = null;
+
+       __pLiveboxInfo = new LiveboxInfo;
+       TryReturn(__pLiveboxInfo, false, "[osp-installer] __pLiveboxInfo is null");
 
        pAttr = GetAttribute();
        TryReturn(pAttr, true, "[osp-installer] pAttr is null");
 
-       pAttrValue = pAttr->Find("Locale");
-       TryReturn(pAttrValue, true, "[osp-installer] pAttrValue is null");
+       pUpdatePeriod = pAttr->Find("UpdatePeriod");
+       TryReturn(pUpdatePeriod, false, "[osp-installer] pUpdatePeriod is null");
 
-       if (FindElement("Livebox") == true)
-       {
-               TryReturn(__pLiveboxInfo, false, "[osp-installer] __pLiveboxInfo is null");
+       long long updatePeriod = atoll(pUpdatePeriod);
+       __pLiveboxInfo->SetUpdatePeriod(updatePeriod);
 
-               String* pValue = new String;
-               StringUtil::Utf8ToString(pCharacters, *pValue);
-               __pLiveboxInfo->AddName(*(new String(pAttrValue)), *pValue);
-       }
-       else if (FindElement("Content") == true)
-       {
-               TryReturn(__pContentInfo, false, "[osp-installer] __pContentInfo is null");
+       pPopupEnabled = pAttr->Find("LiveBoxPopupEnabled");
+       TryReturn(pPopupEnabled, false, "[osp-installer] pPopupEnabled is null");
 
-               String* pValue = new String;
-               StringUtil::Utf8ToString(pCharacters, *pValue);
-               __pContentInfo->AddName(*(new String(pAttrValue)), *pValue);
-       }
-       else
-       {
-               if (strcasecmp(pAttrValue, "eng-GB") == 0 || strcasecmp(pAttrValue, "eng-US") == 0)
-               {
-                       if (__isDefaultName == true)
-                       {
-                               __pPackageInfoImpl->SetAppName(pCharacters);
-                       }
-               }
+       __pLiveboxInfo->SetPopupEnabled(pPopupEnabled);
 
-               if (__pPackageAppInfoImpl)
-               {
-                       String* pValue = new String;
-                       StringUtil::Utf8ToString(pCharacters, *pValue);
-                       __pPackageAppInfoImpl->AddName(*(new String(pAttrValue)), *pValue);
-               }
-       }
+       pName = pAttr->Find("Name");
+       TryReturn(pName, false, "[osp-installer] pName is null");
 
-       AppLogTag(OSP_INSTALLER, "<Name Locale=\"%s\">%s</Name>", pAttrValue, pCharacters);
+       __pLiveboxInfo->SetName(pName);
+
+       AppLogTag(OSP_INSTALLER, "<Livebox UpdatePeriod=\"%lld\" pPopupEnabled=\"%s\">", updatePeriod, pPopupEnabled);
 
        return true;
 }
 
 bool
-ManifestHandler::OnVendorValue(const char *pCharacters)
+ManifestHandler::OnPrivilegesEndElement(void)
 {
-       XmlAttribute *pAttr = 0;
-       char *pAttrValue = 0;
-
-       pAttr = GetAttribute();
-       TryReturn(pAttr, true, "[osp-installer] pAttr is null");
+       if (__pContext->IsVerificationMode() == false)
+       {
+               AppLogTag(OSP_INSTALLER, "Signature file not found. [%ls]\n", __pContext->GetSignatureXmlPath().GetPointer());
 
-       pAttrValue = pAttr->Find("Locale");
-       TryReturn(pAttrValue, true, "[osp-installer] pAttrValue is null");
+               result r = E_SUCCESS;
+               String privileges;
+               String hmacPrivileges;
+               String appId = __pPackageInfoImpl->GetAppId();
+               r = PrivilegeHandler::GenerateCipherPrivilege(appId, *__pPrivilegeList, privileges, hmacPrivileges);
+               if (IsFailed(r))
+               {
+                       fprintf(stderr, "PrivilegeHandler::GenerateCipherPrivilege is failded. [%ls][%ls][%ls]\n", appId.GetPointer(), privileges.GetPointer(), hmacPrivileges.GetPointer());
+               }
+               TryReturn(!IsFailed(r), false, "[osp-installer] privMgr.GeneratePrivilegeString() failed");
 
-       if (strcasecmp(pAttrValue, "eng-GB") == 0 || strcasecmp(pAttrValue, "eng-US") == 0)
-       {
-               // Set default name
-               __pPackageInfoImpl->SetAppVendor(pCharacters);
+               __pPackageInfoImpl->SetPrivilegesValue(privileges, hmacPrivileges);
        }
 
-       AppLogTag(OSP_INSTALLER, "<Vendor Locale=\"%s\">%s</Vendor>", pAttrValue, pCharacters);
+       __pContext->SetPrivilegeList(__pPrivilegeList);
+
+       AppLogTag(OSP_INSTALLER, "</Privileges>");
 
        return true;
 }
 
 bool
-ManifestHandler::OnDescriptionValue(const char *pCharacters)
+ManifestHandler::OnUiAppEndElement(void)
 {
-       XmlAttribute *pAttr = 0;
-       char *pAttrValue = 0;
-
-       pAttr = GetAttribute();
-       TryReturn(pAttr, true, "[osp-installer] pAttr is null");
+       __pPackageInfoImpl->AddAppInfo(*__pPackageAppInfoImpl);
+       __pPackageAppInfoImpl = null;
 
-       pAttrValue = pAttr->Find("Locale");
-       TryReturn(pAttrValue, true, "[osp-installer] pAttrValue is null");
+       __isDefaultName = false;
 
-       if (strcasecmp(pAttrValue, "eng-GB") == 0 || strcasecmp(pAttrValue, "eng-US") == 0)
-       {
-               // Set default name
-               __pPackageInfoImpl->SetAppDescription(pCharacters);
-       }
+       __pContext->__pAppDataList->Add(__pAppData);
+       __pAppData = null;
 
-       AppLogTag(OSP_INSTALLER, "<Description Locale=\"%s\">%s</Description>", pAttrValue, pCharacters);
+       AppLogTag(OSP_INSTALLER, "</UiApp>");
 
        return true;
 }
 
 bool
-ManifestHandler::OnDataControlTypeValue(const char *pCharacters)
+ManifestHandler::OnServiceAppEndElement(void)
 {
-       XmlAttribute *pAttr = null;
-       char *pAccessValue = null;
+       __pPackageInfoImpl->AddAppInfo(*__pPackageAppInfoImpl);
+       __pPackageAppInfoImpl = null;
 
-       pAttr = GetAttribute();
-       TryReturn(pAttr, true, "[osp-installer] pAttr is null");
+       __isDefaultName = false;
 
-       pAccessValue = pAttr->Find("Access");
-       TryReturn(pAccessValue, true, "[osp-installer] pAccessValue is null");
+       __pContext->__pAppDataList->Add(__pAppData);
+       __pAppData = null;
 
-       __pDataControlTypeImpl = new _DataControlTypeImpl;
-       TryReturn(__pDataControlTypeImpl, false, "[osp-installer] __pDataControlTypeImpl is null");
+       AppLogTag(OSP_INSTALLER, "</ServiceApp>");
 
-       __pDataControlTypeImpl->SetType(pCharacters);
-       __pDataControlTypeImpl->SetAccess(pAccessValue);
+       return true;
+}
 
-       AppLogTag(OSP_INSTALLER, "<DataControlType Access=\"%s\", Type=\"%s\">", pAccessValue, pCharacters);
+bool
+ManifestHandler::OnIconsEndElement(void)
+{
+       delete[] __pDefaultIconType;
+       __pDefaultIconType = null;
+       AppLogTag(OSP_INSTALLER, "</Icons>");
 
        return true;
 }
 
 bool
-ManifestHandler::OnConditionValue(const char *pCharacters)
+ManifestHandler::OnAppControlEndElement(void)
 {
-       XmlAttribute *pAttr = null;
-       char *pName = null;
-
-       pAttr = GetAttribute();
-       TryReturn(pAttr, true, "[osp-installer] pAttr is null");
+       __pPackageAppInfoImpl->AddAppControl(__pAppControlInfoImpl);
+       __pAppControlInfoImpl = null;
+       AppLogTag(OSP_INSTALLER, "</AppControl>");
 
-       pName = pAttr->Find("Name");
-       TryReturn(pName, true, "[osp-installer] pName is null");
+       return true;
+}
 
-       __pLaunchConditionImpl = new _LaunchConditionInfoImpl;
-       TryReturn(__pLaunchConditionImpl, false, "[osp-installer] __pLaunchConditionImpl is null");
+bool
+ManifestHandler::OnCapabilityEndElement(void)
+{
+       if (__pAppControlInfoImpl)
+       {
+               __pAppControlInfoImpl->AddCapability(__pAppControlCapabilityInfoImpl);
+               __pAppControlCapabilityInfoImpl = null;
+       }
+       AppLogTag(OSP_INSTALLER, "</Capability>");
 
-       __pLaunchConditionImpl->SetName(pName);
-       __pLaunchConditionImpl->SetValue(pCharacters);
+       return true;
+}
 
-       AppLogTag(OSP_INSTALLER, "<LaunchCondition Name=\"%s\", Value=\"%s\">", pName, pCharacters);
+bool
+ManifestHandler::OnResolutionEndElement(void)
+{
+       __pAppControlCapabilityInfoImpl->AddResolution(__pAppControlResolutionInfoImpl);
+       __pAppControlResolutionInfoImpl = null;
+       AppLogTag(OSP_INSTALLER, "</Resolution>");
 
        return true;
 }
 
 bool
-ManifestHandler::OnNotificationValue(const char *pCharacters)
+ManifestHandler::OnDataControlEndElement(void)
 {
-       XmlAttribute *pAttr = null;
-       char *pName = null;
+       __pPackageAppInfoImpl->AddDataControl(__pDataControlInfoImpl);
+       __pDataControlInfoImpl = null;
+       AppLogTag(OSP_INSTALLER, "</DataControl>");
 
-       pAttr = GetAttribute();
-       TryReturn(pAttr, true, "[osp-installer] pAttr is null");
-
-       pName = pAttr->Find("Name");
-       TryReturn(pName, true, "[osp-installer] pName is null");
+       return true;
+}
 
-       __pNotificationImpl = new _NotificationInfoImpl;
-       TryReturn(__pNotificationImpl, false, "[osp-installer] __pNotificationImpl is null");
+bool
+ManifestHandler::OnDataControlTypeEndElement(void)
+{
+       __pDataControlInfoImpl->AddControlType(__pDataControlTypeImpl);
+       __pDataControlTypeImpl = null;
+       AppLogTag(OSP_INSTALLER, "</DataControlType>");
 
-       __pNotificationImpl->SetName(pName);
-       __pNotificationImpl->SetValue(pCharacters);
+       return true;
+}
 
-       AppLogTag(OSP_INSTALLER, "<Notification Name=\"%s\", Value=\"%s\">", pName, pCharacters);
+bool
+ManifestHandler::OnConditionEndElement(void)
+{
+       __pPackageAppInfoImpl->AddLaunchCondition(*__pLaunchConditionImpl);
+       __pLaunchConditionImpl = null;
+       AppLogTag(OSP_INSTALLER, "</Condition>");
 
        return true;
 }
 
 bool
-ManifestHandler::OnSizeValue(const char *pCharacters)
+ManifestHandler::OnNotificationEndElement(void)
 {
-       TryReturn(__pLiveboxInfo, false, "[osp-installer] __pLiveboxInfo is null");
-
-       __pLiveboxInfo->AddSize(*(new String(pCharacters)));
-       AppLogTag(OSP_INSTALLER, "<Size>%s</Size>", pCharacters);
+       __pPackageAppInfoImpl->AddNotification(*__pNotificationImpl);
+       __pNotificationImpl = null;
+       AppLogTag(OSP_INSTALLER, "</Notification>");
 
        return true;
 }
 
 bool
-ManifestHandler::OnInstallationLocationValue(const char *pCharacters)
+ManifestHandler::OnContentsEndElement(void)
 {
-       AppLogTag(OSP_INSTALLER, "<InstallationLocation>%s</InstallationLocation>", pCharacters);
-
-       if ((strcasecmp(pCharacters, "UserPreferred") == 0) &&
-                       (File::IsFileExist(DIR_MEMORYCARD_INSTALLATION) == true))
-       {
-               AppLogTag(OSP_INSTALLER, "INSTALLATION_STORAGE = [EXTERNAL]");
-               __pContext->SetInstallationStorage(InstallationContext::INSTALLATION_STORAGE_EXTERNAL);
-               __pPackageInfoImpl->SetAppStorageType(PACKAGE_STORAGE_TYPE_EXTERNAL);
-       }
+       __pContext->SetContentInfoList(__pContentInfoList);
+       __pContentInfoList = null;
+       AppLogTag(OSP_INSTALLER, "</Contents>");
 
        return true;
 }
 
 bool
-ManifestHandler::OnCategoryValue(const char *pCharacters)
+ManifestHandler::OnContentEndElement(void)
 {
-       TryReturn(__pAppData, false, "[osp-installer] __pAppData is null");
+       __pContentInfoList->Add(*__pContentInfo);
+       __pContentInfo = null;
+       AppLogTag(OSP_INSTALLER, "</Content>");
 
-       __pAppData->__pCategoryList->Add(new String(pCharacters));
        return true;
 }
 
 bool
-ManifestHandler::OnAppControlElement(void)
+ManifestHandler::OnLiveBoxesEndElement(void)
 {
-       XmlAttribute *pAttr = null;
-       char *pAttrValue1 = null;
-       char *pAttrValue2 = null;
+       __pContext->SetLiveBoxList(__pLiveBoxList);
+       __pLiveBoxList = null;
+       AppLogTag(OSP_INSTALLER, "</LiveBoxes>");
 
-       pAttr = GetAttribute();
-       TryReturn(pAttr, true, "[osp-installer] pAttr is null");
+       return true;
+}
 
-       pAttrValue1 = pAttr->Find("ProviderId");
-       TryReturn(pAttrValue1, true, "[osp-installer] pAttrValue1 is null");
-
-       pAttrValue2 = pAttr->Find("Category");
-       TryReturn(pAttrValue2, true, "[osp-installer] pAttrValue2 is null");
-
-       __pAppControlInfoImpl = new _AppControlInfoImpl;
-       TryReturn(__pAppControlInfoImpl, false, "[osp-installer] __pAppControlInfoImpl is null");
-
-       __pAppControlInfoImpl->SetProviderId(pAttrValue1);
-       __pAppControlInfoImpl->SetCategory(pAttrValue2);
-
-       AppLogTag(OSP_INSTALLER, "<AppControl ProviderId=\"%s\" Category=\"%s\">", pAttrValue1, pAttrValue2);
+bool
+ManifestHandler::OnLiveBoxEndElement(void)
+{
+       __pLiveBoxList->Add(*__pLiveboxInfo);
+       __pLiveboxInfo = null;
+       AppLogTag(OSP_INSTALLER, "</LiveBox>");
 
        return true;
 }
 
 bool
-ManifestHandler::OnCapabilityElement(void)
+ManifestHandler::OnManifestEndElement(void)
 {
-       XmlAttribute *pAttr = null;
-       char *pAttrValue = null;
-
-       pAttr = GetAttribute();
-       TryReturn(pAttr, true, "[osp-installer] pAttr is null");
-
-       pAttrValue = pAttr->Find("OperationId");
-       TryReturn(pAttrValue, true, "[osp-installer] pAttrValue1 is null");
-
-       __pAppControlCapabilityInfoImpl = new _AppControlCapabilityInfoImpl;
-       TryReturn(__pAppControlCapabilityInfoImpl, false, "[osp-installer] __pAppControlCapabilityInfoImpl is null");
-
-       __pAppControlCapabilityInfoImpl->SetOperationId(pAttrValue);
-
-       AppLogTag(OSP_INSTALLER, "<Capability OperationId=\"%s\">", pAttrValue);
+       if (__isDefaultAppDetected == false)
+       {
+               fprintf(stderr, "__isDefaultAppDetected is false.\n");
+       }
+       TryReturn(__isDefaultAppDetected, false, "[osp-installer][Error] Default App is not detected...");
+       AppLogTag(OSP_INSTALLER, "</Manifest>");
 
        return true;
 }
 
 bool
-ManifestHandler::OnResolutionElement(void)
+ManifestHandler::OnIdValue(const char *pCharacters)
 {
-       XmlAttribute *pAttr = null;
-       char *pAttrValue1 = null;
-       char *pAttrValue2 = null;
+       __pPackageInfoImpl->SetAppId(pCharacters);
+       AppLogTag(OSP_INSTALLER, "<Id>%s</Id>", pCharacters);
 
-       pAttr = GetAttribute();
-       TryReturn(pAttr, true, "[osp-installer] pAttr is null");
+       return true;
+}
 
-       pAttrValue1 = pAttr->Find("MimeType");
-       pAttrValue2 = pAttr->Find("UriScheme");
+bool
+ManifestHandler::OnVersionValue(const char *pCharacters)
+{
+       __pPackageInfoImpl->SetAppVersion(pCharacters);
+       AppLogTag(OSP_INSTALLER, "<Version>%s</Version>", pCharacters);
 
-       __pAppControlResolutionInfoImpl = new _AppControlResolutionInfoImpl;
-       TryReturn(__pAppControlResolutionInfoImpl, false, "[osp-installer] __pAppControlResolutionInfoImpl is null");
+       return true;
+}
 
-       if (pAttrValue1)
-       {
-               String* pMimeType = new String(pAttrValue1);
-               __pAppControlResolutionInfoImpl->SetMimeType(pMimeType);
-       }
+bool
+ManifestHandler::OnTypeValue(const char *pCharacters)
+{
+       __pPackageInfoImpl->SetAppType(pCharacters);
 
-       if (pAttrValue2)
+       if (strcasecmp(pCharacters, "Contents") == 0)
        {
-               String* pUriScheme = new String(pAttrValue2);
-               __pAppControlResolutionInfoImpl->SetUriScheme(pUriScheme);
+               __pPackageInfoImpl->SetAppApiVersion("3.0");
        }
 
-       AppLogTag(OSP_INSTALLER, "<Resolution MimeType=\"%s\" UriScheme=\"%s\">", pAttrValue1, pAttrValue2);
+       AppLogTag(OSP_INSTALLER, "<Type>%s</Type>", pCharacters);
 
        return true;
 }
 
 bool
-ManifestHandler::OnDataControlElement(void)
+ManifestHandler::OnAuthorValue(const char *pCharacters)
 {
-       XmlAttribute *pAttr = null;
-       char *pProviderId = null;
+//     XmlAttribute *pAttr = 0;
+//     char *pAttrValue = 0;
+//
+//     pAttr = GetAttribute();
+//     TryReturn(pAttr, true, "[osp-installer] pAttr is null");
+//
+//     pAttrValue = pAttr->Find("Locale");
+//     TryReturn(pAttrValue, true, "[osp-installer] pAttrValue is null");
+//
+//     if (strcasecmp(pAttrValue, "eng-GB") == 0 || strcasecmp(pAttrValue, "eng-US") == 0)
+//     {
+//             // Set default name
+//             __pPackageInfoImpl->SetAppVendor(pCharacters);
+//     }
 
-       pAttr = GetAttribute();
-       TryReturn(pAttr, true, "[osp-installer] pAttr is null");
+       __pPackageInfoImpl->SetAppVendor(pCharacters);
+       AppLogTag(OSP_INSTALLER, "<Author>%s</Author>", pCharacters);
 
-       pProviderId = pAttr->Find("ProviderId");
-       TryReturn(pProviderId, true, "[osp-installer] pProviderId is null");
+       return true;
+}
 
-       __pDataControlInfoImpl = new _DataControlInfoImpl;
-       TryReturn(__pDataControlInfoImpl, false, "[osp-installer] __pDataControlInfoImpl is null");
+bool
+ManifestHandler::OnUrlValue(const char *pCharacters)
+{
+       __pPackageInfoImpl->SetAppUrl(pCharacters);
+       AppLogTag(OSP_INSTALLER, "<Url>%s</Url>", pCharacters);
 
-       __pDataControlInfoImpl->SetProviderId(pProviderId);
+       return true;
+}
 
-       AppLogTag(OSP_INSTALLER, "<DataControl ProviderId=\"%s\">", pProviderId);
+bool
+ManifestHandler::OnApiVersionValue(const char *pCharacters)
+{
+       __pPackageInfoImpl->SetAppApiVersion(pCharacters);
+       AppLogTag(OSP_INSTALLER, "<ApiVersion>%s</ApiVersion>", pCharacters);
 
        return true;
 }
 
 bool
-ManifestHandler::OnUiAppElement(void)
+ManifestHandler::OnPrivilegeValue(const char *pCharacters)
 {
-       XmlAttribute *pAttr = null;
+       __pPrivilegeList->Add(*new String(pCharacters));
+       AppLogTag(OSP_INSTALLER, "<Privilege>%s</Privilege>", pCharacters);
 
-       __pPackageAppInfoImpl = new _PackageAppInfoImpl;
-       TryReturn(__pPackageAppInfoImpl, false, "[osp-installer] __pPackageAppInfoImpl is null");
+       return true;
+}
 
-       __pAppData = new (std::nothrow) AppData;
-       TryReturn(__pAppData, false, "[osp-installer] __pAppData is null");
+bool
+ManifestHandler::OnIconValue(const char *pCharacters)
+{
+       XmlAttribute *pAttr = 0;
+       char *pAttrValue1 = 0;
+       char *pTypeValue = 0;
 
        pAttr = GetAttribute();
        TryReturn(pAttr, true, "[osp-installer] pAttr is null");
 
-       char* pExecutableName = pAttr->Find("ExecutableName");
-       if (pExecutableName == null)
-       {
-               pExecutableName = pAttr->Find("Name");
-       }
-       TryReturn(pExecutableName, true, "[osp-installer] pExecutableName is null");
+       pAttrValue1 = pAttr->Find("Section");
+       TryReturn(pAttrValue1, true, "[osp-installer] pAttrValue1 is null");
 
-       __pPackageAppInfoImpl->SetName(pExecutableName);
+       pTypeValue = pAttr->Find("Type");
+       TryReturn(pTypeValue, true, "[osp-installer] pTypeValue is null");
 
-       char* pDefault = pAttr->Find("Default");
-       if (pDefault)
-       {
-               __pPackageAppInfoImpl->SetDefault(pDefault);
+       char icon[1024] = {0,};
 
-               if (strcasecmp(pDefault, "True") == 0)
-               {
-                       __isDefaultName = true;
-                       __isDefaultAppDetected = true;
-               }
+       if (strcasecmp(pTypeValue, "Xhigh") == 0)
+       {
+               snprintf(icon, sizeof(icon), "%s/%s", "screen-density-xhigh", pCharacters);
+       }
+       else if (strcasecmp(pTypeValue, "High") == 0)
+       {
+               snprintf(icon, sizeof(icon), "%s/%s", "screen-density-high", pCharacters);
        }
        else
        {
-               __pPackageAppInfoImpl->SetDefault("False");
+               AppLogTag(OSP_INSTALLER, "Invalid Type [%s]", __pDefaultIconType);
+               return false;
        }
 
-       __pPackageAppInfoImpl->SetType("UiApp");
-
-       char* pMainmenuVisible = pAttr->Find("MainmenuVisible");
-       if (pMainmenuVisible)
+       if (FindElement("Livebox") == true)
        {
-               if (strcasecmp(pMainmenuVisible, "True") == 0)
+               TryReturn(__pLiveboxInfo, false, "[osp-installer] __pLiveboxInfo is null");
+               __pLiveboxInfo->SetIcon(icon);
+       }
+       else if (FindElement("Content") == true)
+       {
+               TryReturn(__pContentInfo, false, "[osp-installer] __pContentInfo is null");
+               __pContentInfo->SetIcon(icon);
+       }
+       else
+       {
+               if (strcasecmp(pAttrValue1, "MainMenu") == 0)
                {
-                       __pPackageAppInfoImpl->SetMainmenuVisible(true);
+                       if (__isDefaultMainmenu == false)
+                       {
+                               __pPackageAppInfoImpl->SetMainmenuIcon(icon);
+                       }
+
+                       if (strcasecmp(pTypeValue, __pDefaultIconType) == 0)
+                       {
+                               __isDefaultMainmenu = true;
+                       }
                }
-               else
+               else if (strcasecmp(pAttrValue1, "Setting") == 0)
                {
-                       __pPackageAppInfoImpl->SetMainmenuVisible(false);
+                       if (__isDefaultSetting == false)
+                       {
+                               __pPackageAppInfoImpl->SetSettingIcon(icon);
+                       }
+
+                       if (strcasecmp(pTypeValue, __pDefaultIconType) == 0)
+                       {
+                               __isDefaultSetting = true;
+                       }
                }
+               else if (strcasecmp(pAttrValue1, "Notification") == 0)
+               {
+                       if (__isDefaultQuickpanel == false)
+                       {
+                               __pPackageAppInfoImpl->SetQuickpanelIcon(icon);
+                       }
 
-               AddAppFeature("MainmenuVisible", pMainmenuVisible);
-               AppLogTag(OSP_INSTALLER, "<MainmenuVisible=%s>", pMainmenuVisible);
+                       if (strcasecmp(pTypeValue, __pDefaultIconType) == 0)
+                       {
+                               __isDefaultQuickpanel = true;
+                       }
+               }
        }
 
-       char* pGlFrame = pAttr->Find("GlFrame");
-       if (pGlFrame)
+       AppLogTag(OSP_INSTALLER, "<Icon Section=\"%s\" Type=\"%s\">%s</Icon>", pAttrValue1, pTypeValue, pCharacters);
+
+       return true;
+}
+
+bool
+ManifestHandler::OnNameValue(const char *pCharacters)
+{
+       XmlAttribute* pAttr = 0;
+       char* pAttrValue = 0;
+
+       pAttr = GetAttribute();
+       TryReturn(pAttr, true, "[osp-installer] pAttr is null");
+
+       pAttrValue = pAttr->Find("Locale");
+       TryReturn(pAttrValue, true, "[osp-installer] pAttrValue is null");
+
+       if (FindElement("Livebox") == true)
        {
-               AddAppFeature("GlFrame", pGlFrame);
-               AppLogTag(OSP_INSTALLER, "<GlFrame=%s>", pGlFrame);
-       }
+               TryReturn(__pLiveboxInfo, false, "[osp-installer] __pLiveboxInfo is null");
 
-       char* pCategory = pAttr->Find("Category");
-       if (pCategory)
+               String* pValue = new String;
+               StringUtil::Utf8ToString(pCharacters, *pValue);
+               __pLiveboxInfo->AddName(*(new String(pAttrValue)), *pValue);
+       }
+       else if (FindElement("Content") == true)
        {
-               AppLogTag(OSP_INSTALLER, "<Category=%s>", pCategory);
+               TryReturn(__pContentInfo, false, "[osp-installer] __pContentInfo is null");
 
-               if (strcasecmp(pCategory, "home-screen") == 0)
-               {
-                       // __pCategoryList->Add(new String("home-screen"));
-                       __pAppData->__pCategoryList->Add(new String("http://tizen.org/category/homescreen"));
-               }
-               else if (strcasecmp(pCategory, "lock-screen") == 0)
+               String* pValue = new String;
+               StringUtil::Utf8ToString(pCharacters, *pValue);
+               __pContentInfo->AddName(*(new String(pAttrValue)), *pValue);
+       }
+       else
+       {
+               if (strcasecmp(pAttrValue, "eng-GB") == 0 || strcasecmp(pAttrValue, "eng-US") == 0)
                {
-                       // __pCategoryList->Add(new String("lock-screen"));
-                       __pAppData->__pCategoryList->Add(new String("http://tizen.org/category/lockscreen"));
+                       if (__isDefaultName == true)
+                       {
+                               __pPackageInfoImpl->SetAppName(pCharacters);
+                       }
                }
-               else if (strcasecmp(pCategory, "Ime") == 0)
+
+               if (__pPackageAppInfoImpl)
                {
-                       __pAppData->__pCategoryList->Add(new String("http://tizen.org/category/ime"));
+                       String* pValue = new String;
+                       StringUtil::Utf8ToString(pCharacters, *pValue);
+                       __pPackageAppInfoImpl->AddName(*(new String(pAttrValue)), *pValue);
                }
-
-               // CategoryType categoryType = InstallerUtil::GetCategoryType(pCategory);
-               // __pPackageAppInfoImpl->SetAppFeature(categoryType);
        }
 
-       String app_id;
-       if (__pContext->GetPackageNameType() == INSTALLER_PREFIX_TYPE_ORG)
-       {
-               app_id.Format(1024, PACKAGE_NAME_RULE_ORG, __pPackageInfoImpl->GetAppId().GetPointer(), pExecutableName);
-       }
-       else
+       AppLogTag(OSP_INSTALLER, "<Name Locale=\"%s\">%s</Name>", pAttrValue, pCharacters);
+
+       return true;
+}
+
+bool
+ManifestHandler::OnDescriptionValue(const char *pCharacters)
+{
+       XmlAttribute *pAttr = 0;
+       char *pAttrValue = 0;
+
+       pAttr = GetAttribute();
+       TryReturn(pAttr, true, "[osp-installer] pAttr is null");
+
+       pAttrValue = pAttr->Find("Locale");
+       TryReturn(pAttrValue, true, "[osp-installer] pAttrValue is null");
+
+       if (strcasecmp(pAttrValue, "eng-GB") == 0 || strcasecmp(pAttrValue, "eng-US") == 0)
        {
-               app_id.Format(1024, PACKAGE_NAME_RULE, __pPackageInfoImpl->GetAppId().GetPointer(), pExecutableName);
+               // Set default name
+               __pPackageInfoImpl->SetAppDescription(pCharacters);
        }
 
-       __pPackageAppInfoImpl->SetPackageName(app_id);
-
-       AppLogTag(OSP_INSTALLER, "app_id = %S", app_id.GetPointer());
-       AppLogTag(OSP_INSTALLER, "<UiApp Name=\"%s\" Default=\"%s\">", pExecutableName, pDefault ? pDefault:"False");
+       AppLogTag(OSP_INSTALLER, "<Description Locale=\"%s\">%s</Description>", pAttrValue, pCharacters);
 
        return true;
 }
 
 bool
-ManifestHandler::OnServiceAppElement(void)
+ManifestHandler::OnDataControlTypeValue(const char *pCharacters)
 {
        XmlAttribute *pAttr = null;
-       char *pExecutableName = null;
-       char *pDefault = null;
-       char *pMainmenuVisible = null;
-       char *pLaunchOnBoot = null;
-       char *pAutoRestart = null;
-       char *pUseUi = null;
+       char *pAccessValue = null;
 
-       __pPackageAppInfoImpl = new _PackageAppInfoImpl;
-       TryReturn(__pPackageAppInfoImpl, false, "[osp-installer] __pPackageAppInfoImpl is null");
+       pAttr = GetAttribute();
+       TryReturn(pAttr, true, "[osp-installer] pAttr is null");
 
-       __pAppData = new (std::nothrow) AppData;
-       TryReturn(__pAppData, false, "[osp-installer] __pAppData is null");
+       pAccessValue = pAttr->Find("Access");
+       TryReturn(pAccessValue, true, "[osp-installer] pAccessValue is null");
+
+       __pDataControlTypeImpl = new _DataControlTypeImpl;
+       TryReturn(__pDataControlTypeImpl, false, "[osp-installer] __pDataControlTypeImpl is null");
+
+       __pDataControlTypeImpl->SetType(pCharacters);
+       __pDataControlTypeImpl->SetAccess(pAccessValue);
+
+       AppLogTag(OSP_INSTALLER, "<DataControlType Access=\"%s\", Type=\"%s\">", pAccessValue, pCharacters);
+
+       return true;
+}
+
+bool
+ManifestHandler::OnConditionValue(const char *pCharacters)
+{
+       XmlAttribute *pAttr = null;
+       char *pName = null;
 
        pAttr = GetAttribute();
-       TryReturn(pAttr, true, "pAttr is null");
+       TryReturn(pAttr, true, "[osp-installer] pAttr is null");
 
-       pExecutableName = pAttr->Find("ExecutableName");
-       if (pExecutableName == null)
-       {
-               pExecutableName = pAttr->Find("Name");
-       }
-       TryReturn(pExecutableName, true, "[osp-installer] pExecutableName is null");
+       pName = pAttr->Find("Name");
+       TryReturn(pName, true, "[osp-installer] pName is null");
 
-       __pPackageAppInfoImpl->SetName(pExecutableName);
+       __pLaunchConditionImpl = new _LaunchConditionInfoImpl;
+       TryReturn(__pLaunchConditionImpl, false, "[osp-installer] __pLaunchConditionImpl is null");
 
-       pDefault = pAttr->Find("Default");
-       if (pDefault)
-       {
-               __pPackageAppInfoImpl->SetDefault(pDefault);
+       __pLaunchConditionImpl->SetName(pName);
+       __pLaunchConditionImpl->SetValue(pCharacters);
 
-               if (strcasecmp(pDefault, "True") == 0)
-               {
-                       __isDefaultName = true;
-                       __isDefaultAppDetected = true;
-               }
-       }
-       else
-       {
-               __pPackageAppInfoImpl->SetDefault("False");
-       }
+       AppLogTag(OSP_INSTALLER, "<LaunchCondition Name=\"%s\", Value=\"%s\">", pName, pCharacters);
 
-       __pPackageAppInfoImpl->SetType("ServiceApp");
-       __pPackageAppInfoImpl->SetMainmenuVisible(false);
+       return true;
+}
 
-       pMainmenuVisible = pAttr->Find("MainmenuVisible");
-       if (pMainmenuVisible)
-       {
-               AddAppFeature("MainmenuVisible", pMainmenuVisible);
-               AppLogTag(OSP_INSTALLER, "<MainmenuVisible=%s>", pMainmenuVisible);
-       }
+bool
+ManifestHandler::OnNotificationValue(const char *pCharacters)
+{
+       XmlAttribute *pAttr = null;
+       char *pName = null;
 
-       pLaunchOnBoot = pAttr->Find("LaunchOnBoot");
-       if (pLaunchOnBoot)
-       {
-               AddAppFeature("LaunchOnBoot", pLaunchOnBoot);
-               AppLogTag(OSP_INSTALLER, "<LaunchOnBoot=%s>", pLaunchOnBoot);
-       }
+       pAttr = GetAttribute();
+       TryReturn(pAttr, true, "[osp-installer] pAttr is null");
 
-       pAutoRestart = pAttr->Find("AutoRestart");
-       if (pAutoRestart)
-       {
-               AddAppFeature("AutoRestart", pAutoRestart);
-               AppLogTag(OSP_INSTALLER, "<AutoRestart=%s>", pAutoRestart);
-       }
+       pName = pAttr->Find("Name");
+       TryReturn(pName, true, "[osp-installer] pName is null");
 
-       pUseUi = pAttr->Find("UseUi");
-       if (pUseUi)
-       {
-               AddAppFeature("UseUi", pUseUi);
-               AppLogTag(OSP_INSTALLER, "<UseUi=%s>", pUseUi);
-       }
+       __pNotificationImpl = new _NotificationInfoImpl;
+       TryReturn(__pNotificationImpl, false, "[osp-installer] __pNotificationImpl is null");
 
-       char* pGlFrame = pAttr->Find("GlFrame");
-       if (pGlFrame)
-       {
-               AddAppFeature("GlFrame", pGlFrame);
-               AppLogTag(OSP_INSTALLER, "<GlFrame=%s>", pGlFrame);
-       }
+       __pNotificationImpl->SetName(pName);
+       __pNotificationImpl->SetValue(pCharacters);
 
-       String app_id;
+       AppLogTag(OSP_INSTALLER, "<Notification Name=\"%s\", Value=\"%s\">", pName, pCharacters);
 
-       if (__pContext->GetPackageNameType() == INSTALLER_PREFIX_TYPE_ORG)
-       {
-               app_id.Format(1024, PACKAGE_NAME_RULE_ORG, __pPackageInfoImpl->GetAppId().GetPointer(), pExecutableName);
-       }
-       else
+       return true;
+}
+
+bool
+ManifestHandler::OnSizeValue(const char *pCharacters)
+{
+       TryReturn(__pLiveboxInfo, false, "[osp-installer] __pLiveboxInfo is null");
+
+       __pLiveboxInfo->AddSize(*(new String(pCharacters)));
+       AppLogTag(OSP_INSTALLER, "<Size>%s</Size>", pCharacters);
+
+       return true;
+}
+
+bool
+ManifestHandler::OnInstallationLocationValue(const char *pCharacters)
+{
+       AppLogTag(OSP_INSTALLER, "<InstallationLocation>%s</InstallationLocation>", pCharacters);
+
+       if ((strcasecmp(pCharacters, "UserPreferred") == 0) &&
+                       (File::IsFileExist(DIR_MEMORYCARD_INSTALLATION) == true))
        {
-               app_id.Format(1024, PACKAGE_NAME_RULE, __pPackageInfoImpl->GetAppId().GetPointer(), pExecutableName);
+               AppLogTag(OSP_INSTALLER, "INSTALLATION_STORAGE = [EXTERNAL]");
+               __pContext->SetInstallationStorage(InstallationContext::INSTALLATION_STORAGE_EXTERNAL);
+               __pPackageInfoImpl->SetAppStorageType(PACKAGE_STORAGE_TYPE_EXTERNAL);
        }
 
-       __pPackageAppInfoImpl->SetPackageName(app_id);
+       return true;
+}
 
-       AppLogTag(OSP_INSTALLER, "app_id = %S", app_id.GetPointer());
-       AppLogTag(OSP_INSTALLER, "<ServiceApp Name=\"%s\" Default=\"%s\">", pExecutableName, pDefault ? pDefault:"False");
+bool
+ManifestHandler::OnCategoryValue(const char *pCharacters)
+{
+       TryReturn(__pAppData, false, "[osp-installer] __pAppData is null");
 
+       __pAppData->__pCategoryList->Add(new String(pCharacters));
        return true;
 }
 
@@ -1378,4 +1486,3 @@ ManifestHandler::AddAppFeature(const Tizen::Base::String& name, const Tizen::Bas
 
        return true;
 }
-
index 8b0d9aa..a15ccb8 100755 (executable)
@@ -55,27 +55,56 @@ private:
        virtual bool OnEndElement(const char *pName);
        virtual bool OnCharacters(const char *pCharacters);
 
-       bool OnPrivilegesElement(void);
+       // StartElement
+       bool OnPrivilegesStartElement(void);
+       bool OnUiAppStartElement(void);
+       bool OnServiceAppStartElement(void);
+       bool OnIconsStartElement(void);
+       bool OnUiScalabilityStartElement(void);
+       bool OnUiThemeStartElement(void);
+
+       bool OnAppControlStartElement(void);
+       bool OnCapabilityStartElement(void);
+       bool OnResolutionStartElement(void);
+       bool OnDataControlStartElement(void);
+
+       bool OnContentsStartElement(void);
+       bool OnContentStartElement(void);
+       bool OnLiveBoxesStartElement(void);
+       bool OnLiveBoxStartElement(void);
+
+       // EndElement
        bool OnPrivilegesEndElement(void);
-       bool OnLiveBoxesElement(void);
-       bool OnLiveBoxElement(void);
-       bool OnContentsElement(void);
-       bool OnContentElement(void);
-       bool OnUiScalabilityElement(void);
-       bool OnUiThemeElement(void);
-       bool OnIconsElement(void);
+       bool OnUiAppEndElement(void);
+       bool OnServiceAppEndElement(void);
+       bool OnIconsEndElement(void);
+       bool OnUiScalabilityEndElement(void);
+       bool OnUiThemeEndElement(void);
+
+       bool OnAppControlEndElement(void);
+       bool OnCapabilityEndElement(void);
+       bool OnResolutionEndElement(void);
+       bool OnDataControlEndElement(void);
+       bool OnDataControlTypeEndElement(void);
+       bool OnConditionEndElement(void);
+       bool OnNotificationEndElement(void);
 
+       bool OnContentsEndElement(void);
+       bool OnContentEndElement(void);
+       bool OnLiveBoxesEndElement(void);
+       bool OnLiveBoxEndElement(void);
+       bool OnManifestEndElement(void);
+
+       // OnValue
        bool OnIdValue(const char *pCharacters);
        bool OnVersionValue(const char *pCharacters);
        bool OnTypeValue(const char *pCharacters);
+       bool OnAuthorValue(const char *pCharacters);
        bool OnUrlValue(const char *pCharacters);
-       bool OnSecretValue(const char *pCharacters);
-       bool OnMimeTypeValue(const char *pCharacters);
        bool OnApiVersionValue(const char *pCharacters);
-       bool OnIconValue(const char *pCharacters);
        bool OnPrivilegeValue(const char *pCharacters);
+       bool OnIconValue(const char *pCharacters);
        bool OnNameValue(const char *pCharacters);
-       bool OnVendorValue(const char *pCharacters);
        bool OnDescriptionValue(const char *pCharacters);
        bool OnDataControlTypeValue(const char *pCharacters);
        bool OnConditionValue(const char *pCharacters);
@@ -84,13 +113,7 @@ private:
        bool OnInstallationLocationValue(const char *pCharacters);
        bool OnCategoryValue(const char *pCharacters);
 
-       bool OnAppControlElement(void);
-       bool OnCapabilityElement(void);
-       bool OnResolutionElement(void);
-       bool OnDataControlElement(void);
-       bool OnUiAppElement(void);
-       bool OnServiceAppElement(void);
-
+       // help functions
        bool FindElement(const char *pName);
        bool AddAppFeature(const Tizen::Base::String& name, const Tizen::Base::String& value);