From 0ae0d7280daf3cd29be992fd9a14bcdca6d2899b Mon Sep 17 00:00:00 2001 From: "ahram.suh" Date: Mon, 10 Jun 2013 20:08:44 +0900 Subject: [PATCH] Changed to delivery key, value Change-Id: I0a66c5276d7f3d7dcc5941c2fe55742cc570ca03 --- src/IntMainForm.cpp | 46 +++++++++++++++++++++++----------------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/src/IntMainForm.cpp b/src/IntMainForm.cpp index 67829f5..deb1d46 100644 --- a/src/IntMainForm.cpp +++ b/src/IntMainForm.cpp @@ -69,6 +69,8 @@ static const wchar_t* IDB_ICON_BOOKMARK_OFF_TEMP = L"I01_icon_bookmark_off_temp. static const wchar_t* IDB_ICON_BOOKMARK_ON_TEMP = L"I01_icon_bookmark_on_temp.png"; static const wchar_t* IDS_TIZEN_SERVICE = L"tizen-service"; static const wchar_t* IDS_APPID = L"AppID"; +static const wchar_t* IDS_KEY = L"key"; +static const wchar_t* IDS_VALUE = L"value"; static const wchar_t* IDB_TITLE_PROGRESS_BAR_BG = L"I01_title_progress_bar_bg.png"; static const wchar_t* IDB_TITLE_PROGRESS_BAR = L"I01_title_progress_bar.png"; //static const wchar_t* IDB_ADDRESS_BAR_BACKGROUND = L"I01_toolbar_bg_02.9.png"; @@ -2615,7 +2617,7 @@ MainForm::OnLoadingStarted(void) if(url.Contains(IDS_TIZEN_SERVICE)) { String appId; - String delim(L":;"); + String delim(L":;,"); // Creates a StringTokenizer instance StringTokenizer strTok(url, delim); @@ -2636,20 +2638,19 @@ MainForm::OnLoadingStarted(void) token.SubString(6, appId); AppLog("AppID:%ls", appId.GetPointer()); } - else if(token.Contains("=")) + else if(token.Contains(IDS_KEY)) { - String *pKey = new String(); - String *pValue = new String(); - int index = -1; - token.IndexOf("=", 0, index); - if(index != -1) - { - token.SubString(0, index, *pKey); - token.SubString(index + 1, *pValue); - pMap->Add(pKey, pValue); - } + token.SubString(4, key); + AppLog("key:%ls", key.GetPointer()); + } + else if(token.Contains(IDS_VALUE)) + { + token.SubString(6, value); + AppLog("value:%ls", value.GetPointer()); } } + pMap->Add(key, value); + if(appId != "") { AppControl *pAppControl = null; @@ -3447,20 +3448,19 @@ MainForm::OnLoadingRequested(const Tizen::Base::String& url, token.SubString(6, appId); AppLog("AppID:%ls", appId.GetPointer()); } - else if(token.Contains("=")) + else if(token.Contains(IDS_KEY)) { - String *pKey = new String(); - String *pValue = new String(); - int index = -1; - token.IndexOf("=", 0, index); - if(index != -1) - { - token.SubString(0, index, *pKey); - token.SubString(index + 1, *pValue); - pMap->Add(pKey, pValue); - } + token.SubString(4, key); + AppLog("key:%ls", key.GetPointer()); + } + else if(token.Contains(IDS_VALUE)) + { + token.SubString(6, value); + AppLog("value:%ls", value.GetPointer()); } } + pMap->Add(key, value); + if(appId != "") { AppControl *pAppControl = null; -- 2.7.4