Make constant variables about the resource
authorso.yu <so.yu@samsung.com>
Thu, 11 Apr 2013 14:43:20 +0000 (23:43 +0900)
committerso.yu <so.yu@samsung.com>
Thu, 11 Apr 2013 14:43:29 +0000 (23:43 +0900)
Change-Id: I6b6cb93de29e7e32b18e72fcb85787fc592ee1fb
Signed-off-by: so.yu <so.yu@samsung.com>
project/inc/AppResourceId.h [new file with mode: 0644]
project/src/Alice.cpp
project/src/AppResourceId.cpp [new file with mode: 0644]
project/src/Bob.cpp
project/src/CipherMessageSettings.cpp
project/src/ViewCertForm.cpp

diff --git a/project/inc/AppResourceId.h b/project/inc/AppResourceId.h
new file mode 100644 (file)
index 0000000..4281a89
--- /dev/null
@@ -0,0 +1,62 @@
+//
+// Tizen C++ SDK
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+#ifndef _APP_RESOURCE_ID_H_
+#define _APP_RESOURCE_ID_H_
+
+extern const wchar_t* IDC_ALICE_AES_BUTTON;
+extern const wchar_t* IDC_ALICE_EDITAREA1;
+extern const wchar_t* IDC_ALICE_GEN_KEY_BUTTON;
+extern const wchar_t* IDC_ALICE_HASH_BUTTON;
+extern const wchar_t* IDC_ALICE_SIGN_BUTTON;
+extern const wchar_t* IDC_ALICE_VIEW_BOB_BUTTON;
+extern const wchar_t* IDC_BOB_AES_BUTTON;
+extern const wchar_t* IDC_BOB_EDITAREA1;
+extern const wchar_t* IDC_BOB_HASH_BUTTON;
+extern const wchar_t* IDC_BOB_RSA_BUTTON;
+extern const wchar_t* IDC_BOB_SIGN_BUTTON;
+extern const wchar_t* IDC_BOB_VIEW_ALICE_BUTTON;
+extern const wchar_t* IDC_BUTTON_CANCEL;
+extern const wchar_t* IDC_BUTTON_CERT_UNINSTALL;
+extern const wchar_t* IDC_BUTTON_CERT_VERIFY;
+extern const wchar_t* IDC_BUTTON_OK;
+extern const wchar_t* IDC_BUTTON_ROOT_INSTALL;
+extern const wchar_t* IDC_BUTTON_SETTINGS;
+extern const wchar_t* IDC_BUTTON_VIEW_ROOT;
+extern const wchar_t* IDC_CHECKBUTTON_PADDING;
+extern const wchar_t* IDC_LABEL_CERT_TYPE;
+extern const wchar_t* IDC_LABEL_ISSUER;
+extern const wchar_t* IDC_LABEL_PUBLIC_KEY;
+extern const wchar_t* IDC_LABEL_SERIAL;
+extern const wchar_t* IDC_LABEL_SIGN_ALGO;
+extern const wchar_t* IDC_LABEL_STATUS;
+extern const wchar_t* IDC_LABEL_SUBJECT;
+extern const wchar_t* IDC_LABEL_VALID_FROM;
+extern const wchar_t* IDC_LABEL_VALID_TO;
+extern const wchar_t* IDC_LABEL_VERSION;
+extern const wchar_t* IDC_LISTVIEW_HASH;
+extern const wchar_t* IDC_LISTVIEW_KEYEX;
+extern const wchar_t* IDC_LISTVIEW_SYMALGO;
+extern const wchar_t* IDC_LISTVIEW_SYMMODE;
+extern const wchar_t* IDC_SCROLLPANEL1;
+extern const wchar_t* IDC_STATUS_LABEL;
+extern const wchar_t* IDF_FORM1;
+extern const wchar_t* IDF_FORM2;
+extern const wchar_t* IDF_FORM3;
+extern const wchar_t* IDF_FORM4;
+
+#endif /* _APP_RESOURCE_ID_H_ */
index 745b9de..0821672 100644 (file)
 
 #include <new>
 #include <FApp.h>
-#include <Alice.h>
+#include "AppResourceId.h"
+#include "Alice.h"
+#include "CryptoHandler.h"
 #include "SceneRegister.h"
-#include <CryptoHandler.h>
 
 using namespace Tizen::App;
 using namespace Tizen::Base;
@@ -53,7 +54,7 @@ bool
 Alice::Initialize()
 {
        // Construct an XML form
-       Form::Construct(L"IDF_FORM1");
+       Form::Construct(IDF_FORM1);
        return true;
 
        return true;
@@ -65,14 +66,14 @@ Alice::OnInitializing(void)
        Tizen::Ui::Controls::Button* pButton;
 
        // Get a VIEW CERT button via resource ID
-       pButton = static_cast< Button* >(GetControl(L"IDC_ALICE_GEN_KEY_BUTTON"));
+       pButton = static_cast< Button* >(GetControl(IDC_ALICE_GEN_KEY_BUTTON));
        if (pButton != null)
        {
                pButton->SetActionId(ID_BUTTON_GEN_KEY);
                pButton->AddActionEventListener(*this);
        }
        // Get a AES button via resource ID
-       pButton = static_cast< Button* >(GetControl(L"IDC_ALICE_AES_BUTTON"));
+       pButton = static_cast< Button* >(GetControl(IDC_ALICE_AES_BUTTON));
        if (pButton != null)
        {
                pButton->SetActionId(ID_BUTTON_AES);
@@ -80,28 +81,28 @@ Alice::OnInitializing(void)
        }
 
        // Get a HASH button via resource ID
-       pButton = static_cast< Button* >(GetControl(L"IDC_ALICE_HASH_BUTTON"));
+       pButton = static_cast< Button* >(GetControl(IDC_ALICE_HASH_BUTTON));
        if (pButton != null)
        {
                pButton->SetActionId(ID_BUTTON_HASH);
                pButton->AddActionEventListener(*this);
        }
        // Get a SIGN button via resource ID
-       pButton = static_cast< Button* >(GetControl(L"IDC_ALICE_SIGN_BUTTON"));
+       pButton = static_cast< Button* >(GetControl(IDC_ALICE_SIGN_BUTTON));
        if (pButton != null)
        {
                pButton->SetActionId(ID_BUTTON_SIGN);
                pButton->AddActionEventListener(*this);
        }
        // Get a VIEW CERT button via resource ID
-       pButton = static_cast< Button* >(GetControl(L"IDC_ALICE_VIEW_BOB_BUTTON"));
+       pButton = static_cast< Button* >(GetControl(IDC_ALICE_VIEW_BOB_BUTTON));
        if (pButton != null)
        {
                pButton->SetActionId(ID_BUTTON_VIEW_CERT);
                pButton->AddActionEventListener(*this);
        }
        // Get a SETTINGS button via resource ID
-       pButton = static_cast< Button* >(GetControl(L"IDC_BUTTON_SETTINGS"));
+       pButton = static_cast< Button* >(GetControl(IDC_BUTTON_SETTINGS));
        if (pButton != null)
        {
                pButton->SetActionId(ID_BUTTON_SETTINGS);
@@ -171,7 +172,7 @@ Alice::OnActionPerformed(const Tizen::Ui::Control& source, int actionId)
                Tizen::Ui::Controls::EditArea* pEditArea;
 
                // Get a EditArea button via resource ID
-               pEditArea = static_cast< EditArea* >(GetControl(L"IDC_ALICE_EDITAREA1"));
+               pEditArea = static_cast< EditArea* >(GetControl(IDC_ALICE_EDITAREA1));
                if (pEditArea != null)
                {
                        String textStr = pEditArea->GetText();
@@ -203,7 +204,7 @@ Alice::OnActionPerformed(const Tizen::Ui::Control& source, int actionId)
                Tizen::Ui::Controls::EditArea* pEditArea;
 
                // Get a EditArea button via resource ID
-               pEditArea = static_cast< EditArea* >(GetControl(L"IDC_ALICE_EDITAREA1"));
+               pEditArea = static_cast< EditArea* >(GetControl(IDC_ALICE_EDITAREA1));
                if (pEditArea != null)
                {
                        String textStr = pEditArea->GetText();
@@ -236,7 +237,7 @@ Alice::OnActionPerformed(const Tizen::Ui::Control& source, int actionId)
                Tizen::Ui::Controls::EditArea* pEditArea;
 
                // Get a EditArea button via resource ID
-               pEditArea = static_cast< EditArea* >(GetControl(L"IDC_ALICE_EDITAREA1"));
+               pEditArea = static_cast< EditArea* >(GetControl(IDC_ALICE_EDITAREA1));
                if (pEditArea != null)
                {
                        String textStr = pEditArea->GetText();
@@ -347,7 +348,7 @@ Alice::CreateSendMsgForm()
 void
 Alice::SetStatusLable(String statusMsg)
 {
-       Tizen::Ui::Controls::Label* pStatusLable = static_cast< Tizen::Ui::Controls::Label* >(GetControl(L"IDC_STATUS_LABEL"));
+       Tizen::Ui::Controls::Label* pStatusLable = static_cast< Tizen::Ui::Controls::Label* >(GetControl(IDC_STATUS_LABEL));
        if (pStatusLable != null)
        {
                pStatusLable->SetText(statusMsg);
diff --git a/project/src/AppResourceId.cpp b/project/src/AppResourceId.cpp
new file mode 100644 (file)
index 0000000..d2490dd
--- /dev/null
@@ -0,0 +1,57 @@
+//
+// Tizen C++ SDK
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+const wchar_t* IDC_ALICE_AES_BUTTON = L"IDC_ALICE_AES_BUTTON";
+const wchar_t* IDC_ALICE_EDITAREA1 = L"IDC_ALICE_EDITAREA1";
+const wchar_t* IDC_ALICE_GEN_KEY_BUTTON = L"IDC_ALICE_GEN_KEY_BUTTON";
+const wchar_t* IDC_ALICE_HASH_BUTTON = L"IDC_ALICE_HASH_BUTTON";
+const wchar_t* IDC_ALICE_SIGN_BUTTON = L"IDC_ALICE_SIGN_BUTTON";
+const wchar_t* IDC_ALICE_VIEW_BOB_BUTTON = L"IDC_ALICE_VIEW_BOB_BUTTON";
+const wchar_t* IDC_BOB_AES_BUTTON = L"IDC_BOB_AES_BUTTON";
+const wchar_t* IDC_BOB_EDITAREA1 = L"IDC_BOB_EDITAREA1";
+const wchar_t* IDC_BOB_HASH_BUTTON = L"IDC_BOB_HASH_BUTTON";
+const wchar_t* IDC_BOB_RSA_BUTTON = L"IDC_BOB_RSA_BUTTON";
+const wchar_t* IDC_BOB_SIGN_BUTTON = L"IDC_BOB_SIGN_BUTTON";
+const wchar_t* IDC_BOB_VIEW_ALICE_BUTTON = L"IDC_BOB_VIEW_ALICE_BUTTON";
+const wchar_t* IDC_BUTTON_CANCEL = L"IDC_BUTTON_CANCEL";
+const wchar_t* IDC_BUTTON_CERT_UNINSTALL = L"IDC_BUTTON_CERT_UNINSTALL";
+const wchar_t* IDC_BUTTON_CERT_VERIFY = L"IDC_BUTTON_CERT_VERIFY";
+const wchar_t* IDC_BUTTON_OK = L"IDC_BUTTON_OK";
+const wchar_t* IDC_BUTTON_ROOT_INSTALL = L"IDC_BUTTON_ROOT_INSTALL";
+const wchar_t* IDC_BUTTON_SETTINGS = L"IDC_BUTTON_SETTINGS";
+const wchar_t* IDC_BUTTON_VIEW_ROOT = L"IDC_BUTTON_VIEW_ROOT";
+const wchar_t* IDC_CHECKBUTTON_PADDING = L"IDC_CHECKBUTTON_PADDING";
+const wchar_t* IDC_LABEL_CERT_TYPE = L"IDC_LABEL_CERT_TYPE";
+const wchar_t* IDC_LABEL_ISSUER = L"IDC_LABEL_ISSUER";
+const wchar_t* IDC_LABEL_PUBLIC_KEY = L"IDC_LABEL_PUBLIC_KEY";
+const wchar_t* IDC_LABEL_SERIAL = L"IDC_LABEL_SERIAL";
+const wchar_t* IDC_LABEL_SIGN_ALGO = L"IDC_LABEL_SIGN_ALGO";
+const wchar_t* IDC_LABEL_STATUS = L"IDC_LABEL_STATUS";
+const wchar_t* IDC_LABEL_SUBJECT = L"IDC_LABEL_SUBJECT";
+const wchar_t* IDC_LABEL_VALID_FROM = L"IDC_LABEL_VALID_FROM";
+const wchar_t* IDC_LABEL_VALID_TO = L"IDC_LABEL_VALID_TO";
+const wchar_t* IDC_LABEL_VERSION = L"IDC_LABEL_VERSION";
+const wchar_t* IDC_LISTVIEW_HASH = L"IDC_LISTVIEW_HASH";
+const wchar_t* IDC_LISTVIEW_KEYEX = L"IDC_LISTVIEW_KEYEX";
+const wchar_t* IDC_LISTVIEW_SYMALGO = L"IDC_LISTVIEW_SYMALGO";
+const wchar_t* IDC_LISTVIEW_SYMMODE = L"IDC_LISTVIEW_SYMMODE";
+const wchar_t* IDC_SCROLLPANEL1 = L"IDC_SCROLLPANEL1";
+const wchar_t* IDC_STATUS_LABEL = L"IDC_STATUS_LABEL";
+const wchar_t* IDF_FORM1 = L"IDF_FORM1";
+const wchar_t* IDF_FORM2 = L"IDF_FORM2";
+const wchar_t* IDF_FORM3 = L"IDF_FORM3";
+const wchar_t* IDF_FORM4 = L"IDF_FORM4";
index d0555f8..968d3d2 100644 (file)
@@ -17,8 +17,9 @@
 
 #include <new>
 #include <FApp.h>
-#include <Bob.h>
-#include <CryptoHandler.h>
+#include "AppResourceId.h"
+#include "Bob.h"
+#include "CryptoHandler.h"
 #include "SceneRegister.h"
 
 using namespace Tizen::App;
@@ -51,7 +52,7 @@ bool
 Bob::Initialize()
 {
        // Construct an XML form
-       Form::Construct(L"IDF_FORM2");
+       Form::Construct(IDF_FORM2);
 
        return true;
 }
@@ -62,7 +63,7 @@ Bob::OnInitializing(void)
        Tizen::Ui::Controls::Button* pButton;
 
        // Get a AES button via resource ID
-       pButton = static_cast< Button* >(GetControl(L"IDC_BOB_AES_BUTTON"));
+       pButton = static_cast< Button* >(GetControl(IDC_BOB_AES_BUTTON));
        if (pButton != null)
        {
                pButton->SetActionId(ID_BUTTON_AES);
@@ -70,7 +71,7 @@ Bob::OnInitializing(void)
        }
 
        // Get a RSA button via resource ID
-       pButton = static_cast< Button* >(GetControl(L"IDC_BOB_RSA_BUTTON"));
+       pButton = static_cast< Button* >(GetControl(IDC_BOB_RSA_BUTTON));
        if (pButton != null)
        {
                pButton->SetActionId(ID_BUTTON_RSA);
@@ -78,21 +79,21 @@ Bob::OnInitializing(void)
        }
 
        // Get a HASH button via resource ID
-       pButton = static_cast< Button* >(GetControl(L"IDC_BOB_HASH_BUTTON"));
+       pButton = static_cast< Button* >(GetControl(IDC_BOB_HASH_BUTTON));
        if (pButton != null)
        {
                pButton->SetActionId(ID_BUTTON_HASH);
                pButton->AddActionEventListener(*this);
        }
        // Get a SIGN button via resource ID
-       pButton = static_cast< Button* >(GetControl(L"IDC_BOB_SIGN_BUTTON"));
+       pButton = static_cast< Button* >(GetControl(IDC_BOB_SIGN_BUTTON));
        if (pButton != null)
        {
                pButton->SetActionId(ID_BUTTON_SIGN);
                pButton->AddActionEventListener(*this);
        }
        // Get a VIEW CERT button via resource ID
-       pButton = static_cast< Button* >(GetControl(L"IDC_BOB_VIEW_ALICE_BUTTON"));
+       pButton = static_cast< Button* >(GetControl(IDC_BOB_VIEW_ALICE_BUTTON));
        if (pButton != null)
        {
                pButton->SetActionId(ID_BUTTON_VIEW_CERT);
@@ -140,7 +141,7 @@ Bob::OnActionPerformed(const Tizen::Ui::Control& source, int actionId)
                }
 
                // Get a EditArea button via resource ID
-               pEditArea = static_cast< EditArea* >(GetControl(L"IDC_BOB_EDITAREA1"));
+               pEditArea = static_cast< EditArea* >(GetControl(IDC_BOB_EDITAREA1));
                if (pEditArea != null)
                {
                        pEditArea->SetText(message);
@@ -171,7 +172,7 @@ Bob::OnActionPerformed(const Tizen::Ui::Control& source, int actionId)
                }
 
                // Get a EditArea button via resource ID
-               pEditArea = static_cast< EditArea* >(GetControl(L"IDC_BOB_EDITAREA1"));
+               pEditArea = static_cast< EditArea* >(GetControl(IDC_BOB_EDITAREA1));
                if (pEditArea)
                {
                        pEditArea->SetText(textStr);
@@ -203,7 +204,7 @@ Bob::OnActionPerformed(const Tizen::Ui::Control& source, int actionId)
                textStr = textStr + GetErrorMessage(r);
 
                // Get a EditArea button via resource ID
-               pEditArea = static_cast< EditArea* >(GetControl(L"IDC_BOB_EDITAREA1"));
+               pEditArea = static_cast< EditArea* >(GetControl(IDC_BOB_EDITAREA1));
                if (pEditArea)
                {
                        pEditArea->SetText(textStr);
@@ -232,7 +233,7 @@ Bob::OnActionPerformed(const Tizen::Ui::Control& source, int actionId)
                textStr = textStr + GetErrorMessage(r);
 
                // Get a EditArea button via resource ID
-               pEditArea = static_cast< EditArea* >(GetControl(L"IDC_BOB_EDITAREA1"));
+               pEditArea = static_cast< EditArea* >(GetControl(IDC_BOB_EDITAREA1));
                if (pEditArea != null)
                {
                        pEditArea->SetText(textStr);
index d63a527..11bcc0e 100644 (file)
@@ -19,8 +19,9 @@
 #include <FApp.h>
 #include <FGraphics.h>
 #include <FIo.h>
-#include <CipherMessageSettings.h>
-#include <CryptoHandler.h>
+#include "AppResourceId.h"
+#include "CipherMessageSettings.h"
+#include "CryptoHandler.h"
 #include "SceneRegister.h"
 
 
@@ -49,7 +50,7 @@ CipherMessageSetting::~CipherMessageSetting(void)
 bool
 CipherMessageSetting::Initialize(void)
 {
-       Form::Construct(L"IDF_FORM4");
+       Form::Construct(IDF_FORM4);
        return true;
 }
 
@@ -59,7 +60,7 @@ CipherMessageSetting::OnInitializing(void)
 
        Tizen::Ui::Controls::Button* pButton = null;
 
-       Tizen::Ui::Controls::ScrollPanel* pScrollPanel = static_cast< ScrollPanel* >(GetControl(L"IDC_SCROLLPANEL1"));
+       Tizen::Ui::Controls::ScrollPanel* pScrollPanel = static_cast< ScrollPanel* >(GetControl(IDC_SCROLLPANEL1));
        if (pScrollPanel == null)
        {
                return E_FAILURE;
@@ -68,14 +69,14 @@ CipherMessageSetting::OnInitializing(void)
        AddItemsInLists(*pScrollPanel);
 
        // Get a OK button via resource ID
-       pButton = static_cast< Button* >(pScrollPanel->GetControl(L"IDC_BUTTON_OK"));
+       pButton = static_cast< Button* >(pScrollPanel->GetControl(IDC_BUTTON_OK));
        if (pButton != null)
        {
                pButton->SetActionId(ID_BUTTON_OK);
                pButton->AddActionEventListener(*this);
        }
 
-       pButton = static_cast< Button* >(pScrollPanel->GetControl(L"IDC_BUTTON_CANCEL"));
+       pButton = static_cast< Button* >(pScrollPanel->GetControl(IDC_BUTTON_CANCEL));
        if (pButton != null)
        {
                pButton->SetActionId(ID_BUTTON_CANCEL);
@@ -83,7 +84,7 @@ CipherMessageSetting::OnInitializing(void)
        }
 
        // Get a OK button via resource ID
-       pButton = static_cast< Button* >(pScrollPanel->GetControl(L"IDC_BUTTON_VIEW_ROOT"));
+       pButton = static_cast< Button* >(pScrollPanel->GetControl(IDC_BUTTON_VIEW_ROOT));
        if (pButton != null)
        {
                pButton->SetActionId(ID_BUTTON_ROOT_VIEW);
@@ -315,12 +316,12 @@ void
 CipherMessageSetting::SavePadding(CryptoHandler* pCryptoHandler)
 {
        // Get a Symmetric button via resource ID
-       Tizen::Ui::Controls::ScrollPanel* pScrollPanel = static_cast< ScrollPanel* >(GetControl(L"IDC_SCROLLPANEL1"));
+       Tizen::Ui::Controls::ScrollPanel* pScrollPanel = static_cast< ScrollPanel* >(GetControl(IDC_SCROLLPANEL1));
        if (pScrollPanel == null)
        {
                return;
        }
-       CheckButton* pCheckButton = static_cast< CheckButton* >(pScrollPanel->GetControl(L"IDC_CHECKBUTTON_PADDING"));
+       CheckButton* pCheckButton = static_cast< CheckButton* >(pScrollPanel->GetControl(IDC_CHECKBUTTON_PADDING));
        if (pCheckButton != null && pCryptoHandler != null)
        {
                pCryptoHandler->SetPadding(L"NOPADDING");
@@ -355,7 +356,7 @@ CipherMessageSetting::AddItemsInLists(Tizen::Ui::Controls::ScrollPanel& scrollPa
        CheckButton* pCheckButton = null;
        CryptoHandler* pCryptoHandler = CryptoHandler::GetInstance();
 
-       __pListKeyEx = static_cast< ListView* >(scrollPanel.GetControl(L"IDC_LISTVIEW_KEYEX"));
+       __pListKeyEx = static_cast< ListView* >(scrollPanel.GetControl(IDC_LISTVIEW_KEYEX));
        if (__pListKeyEx != null)
        {
                __pListKeyEx->SetFocusable(true);
@@ -370,7 +371,7 @@ CipherMessageSetting::AddItemsInLists(Tizen::Ui::Controls::ScrollPanel& scrollPa
                }
        }
 
-       __pListSymAlgo = static_cast< ListView* >(scrollPanel.GetControl(L"IDC_LISTVIEW_SYMALGO"));
+       __pListSymAlgo = static_cast< ListView* >(scrollPanel.GetControl(IDC_LISTVIEW_SYMALGO));
        if (__pListSymAlgo != null)
        {
                __pListSymAlgo->SetFocusable(true);
@@ -400,7 +401,7 @@ CipherMessageSetting::AddItemsInLists(Tizen::Ui::Controls::ScrollPanel& scrollPa
                }
        }
 
-       __pListSymMode = static_cast< ListView* >(scrollPanel.GetControl(L"IDC_LISTVIEW_SYMMODE"));
+       __pListSymMode = static_cast< ListView* >(scrollPanel.GetControl(IDC_LISTVIEW_SYMMODE));
        if (__pListSymMode != null)
        {
                __pListSymMode->SetFocusable(true);
@@ -420,7 +421,7 @@ CipherMessageSetting::AddItemsInLists(Tizen::Ui::Controls::ScrollPanel& scrollPa
                }
        }
 
-       __pListHash = static_cast< ListView* >(scrollPanel.GetControl(L"IDC_LISTVIEW_HASH"));
+       __pListHash = static_cast< ListView* >(scrollPanel.GetControl(IDC_LISTVIEW_HASH));
        if (__pListHash != null)
        {
                __pListHash->SetFocusable(true);
@@ -436,7 +437,7 @@ CipherMessageSetting::AddItemsInLists(Tizen::Ui::Controls::ScrollPanel& scrollPa
 
        }
 
-       pCheckButton = static_cast< CheckButton* >(scrollPanel.GetControl(L"IDC_CHECKBUTTON_PADDING"));
+       pCheckButton = static_cast< CheckButton* >(scrollPanel.GetControl(IDC_CHECKBUTTON_PADDING));
        if (pCheckButton != null)
        {
                if (pCryptoHandler != null && (pCryptoHandler->GetPadding() != L"NOPADDING"))
index 69c3a08..f2c8eba 100644 (file)
@@ -18,8 +18,9 @@
 #include <new>
 #include <FApp.h>
 #include <FText.h>
-#include <ViewCertForm.h>
-#include <CryptoHandler.h>
+#include "AppResourceId.h"
+#include "ViewCertForm.h"
+#include "CryptoHandler.h"
 #include "SceneRegister.h"
 
 using namespace Tizen::App;
@@ -50,7 +51,7 @@ bool
 ViewCertForm::Initialize()
 {
        // Construct an XML form
-       Form::Construct(L"IDF_FORM3");
+       Form::Construct(IDF_FORM3);
 
        return true;
 }
@@ -61,14 +62,14 @@ ViewCertForm::OnInitializing(void)
        result r = E_SUCCESS;
        Tizen::Ui::Controls::Button* pButton;
 
-       Tizen::Ui::Controls::ScrollPanel* pScrollPanel = static_cast< ScrollPanel* >(GetControl(L"IDC_SCROLLPANEL1"));
+       Tizen::Ui::Controls::ScrollPanel* pScrollPanel = static_cast< ScrollPanel* >(GetControl(IDC_SCROLLPANEL1));
        if (pScrollPanel == null)
        {
                return E_FAILURE;
        }
 
        // Get a OK button via resource ID
-       pButton = static_cast< Button* >(pScrollPanel->GetControl(L"IDC_BUTTON_OK"));
+       pButton = static_cast< Button* >(pScrollPanel->GetControl(IDC_BUTTON_OK));
        if (pButton != null)
        {
                pButton->SetActionId(ID_BUTTON_OK);
@@ -76,7 +77,7 @@ ViewCertForm::OnInitializing(void)
        }
 
        // Get a OK button via resource ID
-       pButton = static_cast< Button* >(pScrollPanel->GetControl(L"IDC_BUTTON_ROOT_INSTALL"));
+       pButton = static_cast< Button* >(pScrollPanel->GetControl(IDC_BUTTON_ROOT_INSTALL));
        if (pButton != null)
        {
                pButton->SetActionId(ID_BUTTON_CERT_INSTALL);
@@ -84,14 +85,14 @@ ViewCertForm::OnInitializing(void)
        }
 
        // Get a OK button via resource ID
-       pButton = static_cast< Button* >(pScrollPanel->GetControl(L"IDC_BUTTON_CERT_VERIFY"));
+       pButton = static_cast< Button* >(pScrollPanel->GetControl(IDC_BUTTON_CERT_VERIFY));
        if (pButton != null)
        {
                pButton->SetActionId(ID_BUTTON_CERT_VERIFY);
                pButton->AddActionEventListener(*this);
        }
        // Get a OK button via resource ID
-       pButton = static_cast< Button* >(pScrollPanel->GetControl(L"IDC_BUTTON_CERT_UNINSTALL"));
+       pButton = static_cast< Button* >(pScrollPanel->GetControl(IDC_BUTTON_CERT_UNINSTALL));
        if (pButton != null)
        {
                pButton->SetActionId(ID_BUTTON_CERT_UNINSTALL);
@@ -207,13 +208,13 @@ ViewCertForm::ViewCert(X509Certificate* pCertificate)
 
        }
 
-       Tizen::Ui::Controls::ScrollPanel* pScrollPanel = static_cast< ScrollPanel* >(GetControl(L"IDC_SCROLLPANEL1"));
+       Tizen::Ui::Controls::ScrollPanel* pScrollPanel = static_cast< ScrollPanel* >(GetControl(IDC_SCROLLPANEL1));
        if (pScrollPanel == null)
        {
                return E_FAILURE;
        }
 
-       pLabel = static_cast< Label* >(pScrollPanel->GetControl(L"IDC_LABEL_VERSION"));
+       pLabel = static_cast< Label* >(pScrollPanel->GetControl(IDC_LABEL_VERSION));
        if (pLabel != null)
        {
                strContent = L":V";
@@ -221,7 +222,7 @@ ViewCertForm::ViewCert(X509Certificate* pCertificate)
                pLabel->SetText(strContent);
        }
 
-       pLabel = static_cast< Label* >(pScrollPanel->GetControl(L"IDC_LABEL_CERT_TYPE"));
+       pLabel = static_cast< Label* >(pScrollPanel->GetControl(IDC_LABEL_CERT_TYPE));
        if (pLabel != null)
        {
 
@@ -254,7 +255,7 @@ ViewCertForm::ViewCert(X509Certificate* pCertificate)
                pLabel->SetText(strContent);
        }
 
-       pLabel = static_cast< Label* >(pScrollPanel->GetControl(L"IDC_LABEL_SERIAL"));
+       pLabel = static_cast< Label* >(pScrollPanel->GetControl(IDC_LABEL_SERIAL));
        if (pLabel != null)
        {
                strContent = L":";
@@ -262,7 +263,7 @@ ViewCertForm::ViewCert(X509Certificate* pCertificate)
                pLabel->SetText(strContent);
        }
 
-       pLabel = static_cast< Label* >(pScrollPanel->GetControl(L"IDC_LABEL_SIGN_ALGO"));
+       pLabel = static_cast< Label* >(pScrollPanel->GetControl(IDC_LABEL_SIGN_ALGO));
        if (pLabel != null)
        {
                strContent = L":";
@@ -270,21 +271,21 @@ ViewCertForm::ViewCert(X509Certificate* pCertificate)
                pLabel->SetText(strContent);
        }
 
-       pLabel = static_cast< Label* >(pScrollPanel->GetControl(L"IDC_LABEL_ISSUER"));
+       pLabel = static_cast< Label* >(pScrollPanel->GetControl(IDC_LABEL_ISSUER));
        if (pLabel != null)
        {
                strContent = L":";
                strContent = strContent + pCertificate->GetIssuer();
                pLabel->SetText(strContent);
        }
-       pLabel = static_cast< Label* >(pScrollPanel->GetControl(L"IDC_LABEL_VALID_FROM"));
+       pLabel = static_cast< Label* >(pScrollPanel->GetControl(IDC_LABEL_VALID_FROM));
        if (pLabel != null)
        {
                strContent = L":";
                strContent = strContent + pCertificate->GetNotBefore();
                pLabel->SetText(strContent);
        }
-       pLabel = static_cast< Label* >(pScrollPanel->GetControl(L"IDC_LABEL_VALID_TO"));
+       pLabel = static_cast< Label* >(pScrollPanel->GetControl(IDC_LABEL_VALID_TO));
        if (pLabel != null)
        {
                strContent = L":";
@@ -292,7 +293,7 @@ ViewCertForm::ViewCert(X509Certificate* pCertificate)
                pLabel->SetText(strContent);
        }
 
-       pLabel = static_cast< Label* >(pScrollPanel->GetControl(L"IDC_LABEL_SUBJECT"));
+       pLabel = static_cast< Label* >(pScrollPanel->GetControl(IDC_LABEL_SUBJECT));
        if (pLabel != null)
        {
                strContent = L":";
@@ -306,7 +307,7 @@ ViewCertForm::ViewCert(X509Certificate* pCertificate)
        pPubKeyBuf = pPubKey->GetEncodedN();
        TryCatch(pPubKeyBuf != null, r = GetLastResult(), "[%s] Failed to encode public key", GetErrorMessage(r));
 
-       pLabel = static_cast< Label* >(pScrollPanel->GetControl(L"IDC_LABEL_PUBLIC_KEY"));
+       pLabel = static_cast< Label* >(pScrollPanel->GetControl(IDC_LABEL_PUBLIC_KEY));
        if (pLabel != null)
        {
                CryptoHandler::GetHexString(pPubKeyBuf, strContent);
@@ -332,13 +333,13 @@ ViewCertForm::SetCert(Tizen::Security::Cert::X509Certificate* pCertificate)
 void
 ViewCertForm::ShowStatus(String statusMessage)
 {
-       Tizen::Ui::Controls::ScrollPanel* pScrollPanel = static_cast< ScrollPanel* >(GetControl(L"IDC_SCROLLPANEL1"));
+       Tizen::Ui::Controls::ScrollPanel* pScrollPanel = static_cast< ScrollPanel* >(GetControl(IDC_SCROLLPANEL1));
        if (pScrollPanel == null)
        {
                return;
        }
 
-       Label* pLabel = static_cast< Label* >(pScrollPanel->GetControl(L"IDC_LABEL_STATUS"));
+       Label* pLabel = static_cast< Label* >(pScrollPanel->GetControl(IDC_LABEL_STATUS));
        if (pLabel != null)
        {
                pLabel->SetText(statusMessage);