From e3bd02ab40565e43c79f0c0a49c19ab6c7d6058c Mon Sep 17 00:00:00 2001 From: Duyoung Jang Date: Fri, 15 Mar 2013 11:25:07 +0900 Subject: [PATCH] Update AppWidegts tag Change-Id: I38586f347eba2d2860f1ce07e8789518b3538126 Signed-off-by: Duyoung Jang --- inc/InstallerDefs.h | 2 +- src/XmlHandler/ManifestHandler.cpp | 4 ++-- src/XmlHandler/Parser/ManifestLiveboxesParser.cpp | 27 +++++++++++++++-------- 3 files changed, 21 insertions(+), 12 deletions(-) diff --git a/inc/InstallerDefs.h b/inc/InstallerDefs.h index 3f79eb0..1e5b2db 100755 --- a/inc/InstallerDefs.h +++ b/inc/InstallerDefs.h @@ -23,7 +23,7 @@ #include "InstallerUtil.h" -#define OSP_INSTALLER_VERSION "version=[20130314.1]" +#define OSP_INSTALLER_VERSION "version=[20130315.1]" #define DIR_BIN L"/bin" #define DIR_INFO L"/info" diff --git a/src/XmlHandler/ManifestHandler.cpp b/src/XmlHandler/ManifestHandler.cpp index ccfdf25..00c18af 100755 --- a/src/XmlHandler/ManifestHandler.cpp +++ b/src/XmlHandler/ManifestHandler.cpp @@ -147,7 +147,7 @@ ManifestHandler::OnStartElement(const char *pName) { status = OnContentStartElement(); } - else if (strcasecmp(pName, "Liveboxes") == 0) + else if ((strcasecmp(pName, "Liveboxes") == 0) || strcasecmp(pName, "AppWidgets") == 0) { status = OnLiveboxesStartElement(pName); } @@ -185,7 +185,7 @@ ManifestHandler::OnEndElement(const char *pName) TryReturn(__pParser, false, "__pParser is null"); __pParser->OnEndElement(pName); - if (strcasecmp(pName, "Liveboxes") == 0) + if ((strcasecmp(pName, "Liveboxes") == 0) || strcasecmp(pName, "AppWidgets") == 0) { status = OnLiveboxesEndElement(); } diff --git a/src/XmlHandler/Parser/ManifestLiveboxesParser.cpp b/src/XmlHandler/Parser/ManifestLiveboxesParser.cpp index d18ecff..9a1a930 100755 --- a/src/XmlHandler/Parser/ManifestLiveboxesParser.cpp +++ b/src/XmlHandler/Parser/ManifestLiveboxesParser.cpp @@ -53,11 +53,11 @@ ManifestLiveboxesParser::OnStartElement(const char *pName) bool status = true; - if (strcasecmp(pName, "Liveboxes") == 0) + if ((strcasecmp(pName, "Liveboxes") == 0) || (strcasecmp(pName, "AppWidgets") == 0)) { status = OnLiveboxesStartElement(); } - else if (strcasecmp(pName, "Livebox") == 0) + else if ((strcasecmp(pName, "Livebox") == 0) || (strcasecmp(pName, "AppWidget") == 0)) { status = OnLiveboxStartElement(); } @@ -72,11 +72,11 @@ ManifestLiveboxesParser::OnEndElement(const char *pName) bool status = true; - if (strcasecmp(pName, "Liveboxes") == 0) + if ((strcasecmp(pName, "Liveboxes") == 0) || (strcasecmp(pName, "AppWidgets") == 0)) { status = OnLiveboxesEndElement(); } - else if (strcasecmp(pName, "Livebox") == 0) + else if ((strcasecmp(pName, "Livebox") == 0) || (strcasecmp(pName, "AppWidget") == 0)) { status = OnLiveboxEndElement(); } @@ -125,7 +125,7 @@ ManifestLiveboxesParser::OnLiveboxesStartElement() __pLiveboxDataList = new (std::nothrow) ArrayList; TryReturn(__pLiveboxDataList, false, "__pLiveboxDataList is null"); - AppLog(" "); + AppLog(" "); return true; } @@ -144,7 +144,7 @@ ManifestLiveboxesParser::OnLiveboxStartElement(void) pAttr = pHandler->GetAttribute(); TryReturn(pAttr, true, "pAttr is null"); - AppLog(" "); + AppLog(" "); char *pProviderName = pAttr->Find("ProviderName"); if (pProviderName) @@ -161,12 +161,21 @@ ManifestLiveboxesParser::OnLiveboxStartElement(void) AppLog(" - UpdatePeriod=%lld", updatePeriod); } - char *pLiveboxPopupEnabled = pAttr->Find("LiveboxPopupEnabled"); + char* pLiveboxPopupEnabled = pAttr->Find("LiveboxPopupEnabled"); if (pLiveboxPopupEnabled) { __pLiveboxData->SetPopupEnabled(pLiveboxPopupEnabled); AppLog(" - LiveboxPopupEnabled=%s", pLiveboxPopupEnabled); } + else + { + char* pAppWidgetPopupEnabled = pAttr->Find("AppWidgetPopupEnabled"); + if (pAppWidgetPopupEnabled) + { + __pLiveboxData->SetPopupEnabled(pAppWidgetPopupEnabled); + AppLog(" - AppWidgetPopupEnabled=%s", pAppWidgetPopupEnabled); + } + } char* pDefault = pAttr->Find("Default"); if (pDefault == null) @@ -188,7 +197,7 @@ ManifestLiveboxesParser::OnLiveboxesEndElement(void) { __pContext->SetLiveboxDataList(__pLiveboxDataList); __pLiveboxDataList = null; - AppLog(" "); + AppLog(" "); return true; } @@ -198,7 +207,7 @@ ManifestLiveboxesParser::OnLiveboxEndElement(void) { __pLiveboxDataList->Add(*__pLiveboxData); __pLiveboxData = null; - AppLog(" "); + AppLog(" "); return true; } -- 2.7.4