fix contact sample app code for resource id concept
authorGwangbok Kim <gwangbok.kim@samsung.com>
Fri, 12 Apr 2013 02:23:16 +0000 (11:23 +0900)
committerGwangbok Kim <gwangbok.kim@samsung.com>
Fri, 12 Apr 2013 02:23:16 +0000 (11:23 +0900)
Change-Id: I3fabea38d9e173251c6b0cd95c3cd06b39058c0b
Signed-off-by: Gwangbok Kim <gwangbok.kim@samsung.com>
project/inc/AppResourceId.h [new file with mode: 0644]
project/src/AppResourceId.cpp [new file with mode: 0644]
project/src/CategoryAddMemberForm.cpp
project/src/CategoryListForm.cpp
project/src/CategoryMemberForm.cpp
project/src/CategoryRemoveMemberForm.cpp
project/src/CreateContactForm.cpp
project/src/DetailViewForm.cpp
project/src/EditContactForm.cpp
project/src/FavoriteListForm.cpp
project/src/MainForm.cpp

diff --git a/project/inc/AppResourceId.h b/project/inc/AppResourceId.h
new file mode 100644 (file)
index 0000000..8347869
--- /dev/null
@@ -0,0 +1,23 @@
+//
+// Open Service Platform
+// Copyright (c) 2013 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* IDF_FORM_CONTACTS;
+
+#endif // _APP_RESOURCE_ID_H_
diff --git a/project/src/AppResourceId.cpp b/project/src/AppResourceId.cpp
new file mode 100644 (file)
index 0000000..783d56f
--- /dev/null
@@ -0,0 +1,20 @@
+//
+// Open Service Platform
+// Copyright (c) 2013 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.
+//
+
+#include "AppResourceId.h"
+
+const wchar_t* IDF_FORM_CONTACTS = L"IDF_FORM_CONTACTS";
index 5059c8b..1e62817 100755 (executable)
@@ -19,6 +19,7 @@
 
 #include "CategoryAddMemberForm.h"
 #include "SceneRegister.h"
+#include "AppResourceId.h"
 
 using namespace Tizen::App;
 using namespace Tizen::Base;
@@ -52,7 +53,7 @@ CategoryAddMemberForm::Initialize(void)
        r = GetLastResult();
        TryReturn(!IsFailed(r), false, "Failed to get instance of addressbook manager (%s)", GetErrorMessage(r));
 
-       r = Construct(L"IDF_FORM_CONTACTS");
+       r = Construct(IDF_FORM_CONTACTS);
        TryReturn(!IsFailed(r), false, "Failed to construct the form (%s).", GetErrorMessage(r));
 
        return true;
index 3d25de1..95cfffb 100644 (file)
@@ -20,6 +20,7 @@
 
 #include "CategoryListForm.h"
 #include "SceneRegister.h"
+#include "AppResourceId.h"
 
 using namespace Tizen::App;
 using namespace Tizen::Base;
@@ -52,7 +53,7 @@ CategoryListForm::Initialize(void)
        r = GetLastResult();
        TryReturn(!IsFailed(r), false, "Failed to get instance of addressbook manager (%s)", GetErrorMessage(r));
 
-       r = Construct(L"IDF_FORM_CONTACTS");
+       r = Construct(IDF_FORM_CONTACTS);
        TryReturn(!IsFailed(r), false, "Failed to construct the form (%s).", GetErrorMessage(r));
 
        return true;
index 947e17c..a13736d 100755 (executable)
@@ -19,6 +19,7 @@
 
 #include "CategoryMemberForm.h"
 #include "SceneRegister.h"
+#include "AppResourceId.h"
 
 using namespace Tizen::App;
 using namespace Tizen::Base;
@@ -50,7 +51,7 @@ CategoryMemberForm::Initialize(void)
        r = GetLastResult();
        TryReturn(!IsFailed(r), false, "Failed to get instance of addressbook manager (%s)", GetErrorMessage(r));
 
-       r = Construct(L"IDF_FORM_CONTACTS");
+       r = Construct(IDF_FORM_CONTACTS);
        TryReturn(!IsFailed(r), false, "Failed to construct the form (%s).", GetErrorMessage(r));
 
        return true;
index 601d65e..2daf325 100644 (file)
@@ -19,6 +19,7 @@
 
 #include "CategoryRemoveMemberForm.h"
 #include "SceneRegister.h"
+#include "AppResourceId.h"
 
 using namespace Tizen::App;
 using namespace Tizen::Base;
@@ -52,7 +53,7 @@ CategoryRemoveMemberForm::Initialize(void)
        r = GetLastResult();
        TryReturn(!IsFailed(r), false, "Failed to get instance of addressbook manager (%s)", GetErrorMessage(r));
 
-       r = Construct(L"IDF_FORM_CONTACTS");
+       r = Construct(IDF_FORM_CONTACTS);
        TryReturn(!IsFailed(r), false, "Failed to construct the form (%s).", GetErrorMessage(r));
 
        return true;
index c94f12b..1ed8369 100644 (file)
@@ -19,6 +19,7 @@
 
 #include "CreateContactForm.h"
 #include "SceneRegister.h"
+#include "AppResourceId.h"
 
 using namespace Tizen::App;
 using namespace Tizen::Base;
@@ -60,7 +61,7 @@ CreateContactForm::Initialize(void)
        r = GetLastResult();
        TryReturn(!IsFailed(r), false, "Failed to get instance of addressbook manager (%s)", GetErrorMessage(r));
 
-       r = Construct(L"IDF_FORM_CONTACTS");
+       r = Construct(IDF_FORM_CONTACTS);
        TryReturn(!IsFailed(r), false, "Failed to construct the form (%s).", GetErrorMessage(r));
 
        return true;
index 3353499..7c9b1de 100644 (file)
@@ -19,6 +19,7 @@
 
 #include "DetailViewForm.h"
 #include "SceneRegister.h"
+#include "AppResourceId.h"
 
 using namespace Tizen::App;
 using namespace Tizen::Base;
@@ -55,7 +56,7 @@ DetailViewForm::Initialize(void)
        r = GetLastResult();
        TryReturn(!IsFailed(r), false, "Failed to get instance of addressbook manager (%s)", GetErrorMessage(r));
 
-       r = Construct(L"IDF_FORM_CONTACTS");
+       r = Construct(IDF_FORM_CONTACTS);
        TryReturn(!IsFailed(r), false, "Failed to construct the form (%s).", GetErrorMessage(r));
 
        return true;
index 6b4c9c5..07a4182 100644 (file)
@@ -19,6 +19,7 @@
 
 #include "EditContactForm.h"
 #include "SceneRegister.h"
+#include "AppResourceId.h"
 
 using namespace Tizen::Base;
 using namespace Tizen::Base::Collection;
@@ -62,7 +63,7 @@ EditContactForm::Initialize(void)
        r = GetLastResult();
        TryReturn(!IsFailed(r), false, "Failed to get instance of addressbook manager (%s)", GetErrorMessage(r));
 
-       r = Construct(L"IDF_FORM_CONTACTS");
+       r = Construct(IDF_FORM_CONTACTS);
        TryReturn(!IsFailed(r), false, "Failed to construct the form (%s).", GetErrorMessage(r));
 
        return true;
index d88a02a..1b5090b 100644 (file)
@@ -20,6 +20,7 @@
 
 #include "FavoriteListForm.h"
 #include "SceneRegister.h"
+#include "AppResourceId.h"
 
 using namespace Tizen::App;
 using namespace Tizen::Base;
@@ -45,7 +46,7 @@ FavoriteListForm::Initialize(void)
 {
        result r = E_SUCCESS;
 
-       r = Construct(L"IDF_FORM_CONTACTS");
+       r = Construct(IDF_FORM_CONTACTS);
        TryReturn(!IsFailed(r), false, "Failed to construct the form (%s).", GetErrorMessage(r));
 
        return true;
index 1fd6954..6606d13 100644 (file)
@@ -21,6 +21,7 @@
 
 #include "MainForm.h"
 #include "SceneRegister.h"
+#include "AppResourceId.h"
 
 using namespace Tizen::App;
 using namespace Tizen::Base;
@@ -47,7 +48,7 @@ MainForm::Initialize(void)
 {
        result r = E_SUCCESS;
 
-       r = Construct(L"IDF_FORM_CONTACTS");
+       r = Construct(IDF_FORM_CONTACTS);
        TryReturn(!IsFailed(r), false, "Failed to construct the form (%s).", GetErrorMessage(r));
 
        return true;