Add ThemeInfoBuilder
authorJunghyun Yeon <jungh.yeon@samsung.com>
Tue, 14 Apr 2020 00:31:16 +0000 (09:31 +0900)
committerSangyoon Jang <jeremy.jang@samsung.com>
Mon, 25 May 2020 04:28:15 +0000 (13:28 +0900)
Signed-off-by: Junghyun Yeon <jungh.yeon@samsung.com>
src/theme_plugin/CMakeLists.txt
src/theme_plugin/theme_info_builder.cc [new file with mode: 0644]
src/theme_plugin/theme_info_builder.h
src/theme_plugin/theme_parser.cc [new file with mode: 0644]
src/theme_plugin/theme_parser.h

index f664bb0..f735401 100644 (file)
@@ -1,8 +1,8 @@
 AUX_SOURCE_DIRECTORY(${CMAKE_CURRENT_SOURCE_DIR} THEME_PLUGIN_SRCS)
 
 ADD_LIBRARY(${TARGET_TIZEN_THEME_PLUGIN} SHARED ${THEME_PLUGIN_SRCS})
-
-TARGET_INCLUDE_DIRECTORIES(${TARGET_TIZEN_THEME_PLUGIN} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
+TARGET_LINK_LIBRARIES(${TARGET_TIZEN_THEME_PLUGIN} PRIVATE ${TARGET_TIZEN_THEME})
+TARGET_INCLUDE_DIRECTORIES(${TARGET_TIZEN_THEME_PLUGIN} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}../)
 
 APPLY_PKG_CONFIG(${TARGET_TIZEN_THEME_PLUGIN} PUBLIC
        GLIB_DEPS
diff --git a/src/theme_plugin/theme_info_builder.cc b/src/theme_plugin/theme_info_builder.cc
new file mode 100644 (file)
index 0000000..6b20a95
--- /dev/null
@@ -0,0 +1,49 @@
+// Copyright (c) 2020 Samsung Electronics Co., Ltd All Rights Reserved\r
+// Use of this source code is governed by an apache 2.0 license that can be\r
+// found in the LICENSE file.\r
+\r
+#include "theme_info_builder.h"\r
+\r
+namespace ttm {\r
+\r
+ThemeInfoBuilder::ThemeInfoBuilder(std::string id) {\r
+\r
+}\r
+\r
+ThemeInfoBuilder& ThemeInfoBuilder::SetVersion(std::string ver) {\r
+  return *this;\r
+}\r
+\r
+ThemeInfoBuilder& ThemeInfoBuilder::SetToolVersion(std::string ver) {\r
+  return *this;\r
+}\r
+\r
+ThemeInfoBuilder& ThemeInfoBuilder::SetTitle(std::string title) {\r
+  return *this;\r
+}\r
+\r
+ThemeInfoBuilder& ThemeInfoBuilder::SetPreview(std::string path) {\r
+  return *this;\r
+}\r
+\r
+ThemeInfoBuilder& ThemeInfoBuilder::SetDescription(std::string desc) {\r
+  return *this;\r
+}\r
+\r
+ThemeInfoBuilder& ThemeInfoBuilder::SetResolution(std::string resolution) {\r
+  return *this;\r
+}\r
+\r
+ThemeInfoBuilder& ThemeInfoBuilder::PutExtra(std::string key, std::string value) {\r
+  return *this;\r
+}\r
+\r
+ThemeInfoBuilder& ThemeInfoBuilder::PutExtraArray(std::string key, std::string value[]) {\r
+  return *this;\r
+}\r
+\r
+ThemeInfo ThemeInfoBuilder::Build() {\r
+    return {};\r
+}\r
+\r
+}  // namespace ttm
\ No newline at end of file
index 9a7680c..c2ea7d1 100644 (file)
@@ -8,13 +8,13 @@
 #include <memory>\r
 #include <string>\r
 \r
-#include "theme_info.h"\r
+#include "theme/loader/theme_info.h"\r
 \r
 namespace ttm {\r
 \r
 class ThemeInfoBuilder {\r
  public:\r
-  explicit TheInfoBuilder(std::string id);\r
+  explicit ThemeInfoBuilder(std::string id);\r
   ThemeInfoBuilder& SetVersion(std::string ver);\r
   ThemeInfoBuilder& SetToolVersion(std::string ver);\r
   ThemeInfoBuilder& SetTitle(std::string title);\r
@@ -22,7 +22,7 @@ class ThemeInfoBuilder {
   ThemeInfoBuilder& SetDescription(std::string desc);\r
   ThemeInfoBuilder& SetResolution(std::string resolution);\r
   ThemeInfoBuilder& PutExtra(std::string key, std::string value);\r
-  ThemeInfoBuilder& PutExtraArray(std::string key, std::string[] value);\r
+  ThemeInfoBuilder& PutExtraArray(std::string key, std::string value[]);\r
   ThemeInfo Build();\r
 \r
 };\r
diff --git a/src/theme_plugin/theme_parser.cc b/src/theme_plugin/theme_parser.cc
new file mode 100644 (file)
index 0000000..37b3635
--- /dev/null
@@ -0,0 +1,19 @@
+// Copyright (c) 2020 Samsung Electronics Co., Ltd All Rights Reserved\r
+// Use of this source code is governed by an apache 2.0 license that can be\r
+// found in the LICENSE file.\r
+\r
+#include "theme_parser.h"\r
+#include "theme/loader/theme_info.h"\r
+\r
+namespace ttm {\r
+\r
+ThemeInfo ThemeParser::Inflate(std::string json) {\r
+    ThemeInfo info;\r
+    return info;\r
+}\r
+\r
+int ThemeParser::Commit(ThemeOperation operation, const ThemeInfo& theme) {\r
+    return 0;\r
+}\r
+\r
+}  // namespace ttm
\ No newline at end of file
index 38e4846..ff6654b 100644 (file)
@@ -8,7 +8,7 @@
 #include <memory>\r
 #include <string>\r
 \r
-#include "theme_info.h"\r
+#include "theme/loader/theme_info.h"\r
 \r
 namespace ttm {\r
 \r
@@ -20,7 +20,7 @@ class ThemeParser {
       REMOVE\r
   };\r
 \r
-  Themeinfo Inflate(std::string json);\r
+  ThemeInfo Inflate(std::string json);\r
   int Commit(ThemeOperation operation, const ThemeInfo& theme);\r
 };\r
 \r