Add empty body
authorJunghoon Park <jh9216.park@samsung.com>
Tue, 14 Apr 2020 07:37:01 +0000 (16:37 +0900)
committerSangyoon Jang <jeremy.jang@samsung.com>
Mon, 25 May 2020 04:28:15 +0000 (13:28 +0900)
Signed-off-by: Junghoon Park <jh9216.park@samsung.com>
src/theme/CMakeLists.txt
src/theme/dbus/request_broker.cc [new file with mode: 0644]
src/theme/dbus/request_broker.h
src/theme/dbus/request_filter.cc [new file with mode: 0644]
src/theme/dbus/request_filter.h
src/theme/loader/theme_info_loader.cc [new file with mode: 0644]
src/theme/loader/theme_info_loader.h

index 650b392..9bff442 100644 (file)
@@ -13,6 +13,7 @@ TARGET_INCLUDE_DIRECTORIES(${TARGET_TIZEN_THEME} PUBLIC "${CMAKE_CURRENT_SOURCE_
 
 APPLY_PKG_CONFIG(${TARGET_TIZEN_THEME} PUBLIC
   DLOG_DEPS
+  GLIB_DEPS
 )
 
 INSTALL(TARGETS ${TARGET_TIZEN_THEME} DESTINATION ${LIB_INSTALL_DIR})
diff --git a/src/theme/dbus/request_broker.cc b/src/theme/dbus/request_broker.cc
new file mode 100644 (file)
index 0000000..edd6de0
--- /dev/null
@@ -0,0 +1,46 @@
+/*
+ * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.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://www.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 "theme/dbus/request_broker.h"
+
+namespace ttm {
+namespace dbus {
+
+RequestBroker& RequestBroker::GetInst() {
+  static RequestBroker sBroker;
+
+  return sBroker;
+}
+
+GDBusConnection* RequestBroker::GetConnection() {
+  return nullptr;
+}
+
+int RequestBroker::RegisterRequestFilter(const RequestFilter& filter) {
+  return 0;
+}
+
+tizen_base::Bundle RequestBroker::SendData(Command cmd,
+    const tizen_base::Bundle& data) {
+  return {};
+}
+
+void RequestBroker::SendDataAsync(Command cmd, const tizen_base::Bundle&) {
+}
+
+}  // namespace dbus
+}  // namespace ttm
+
index 9014c89..0ddaa20 100644 (file)
@@ -19,6 +19,9 @@
 
 #include <gio/gio.h>
 
+#include <list>
+#include <memory>
+
 #include "theme/dbus/request_filter.h"
 
 namespace ttm {
@@ -30,14 +33,14 @@ class RequestBroker {
   GDBusConnection* GetConnection();
 
   int RegisterRequestFilter(const RequestFilter& filter);
-  tizen_base::Bundle& SendData(Command cmd, const tizen_base::Bundle&);
-  void SendDataAsync(Command cmd, const tize_base::Bundle&);
+  tizen_base::Bundle SendData(Command cmd, const tizen_base::Bundle&);
+  void SendDataAsync(Command cmd, const tizen_base::Bundle&);
 
  private:
-  DBusConnectionManager();
-  ~DBusConnectionManager();
+  RequestBroker() = default;
+  ~RequestBroker() = default;
   GDBusConnection* connection_ = nullptr;
-  std::List<std::shared_ptr<RequestFilter>> filters_;
+  std::list<std::shared_ptr<RequestFilter>> filters_;
 };
 
 }  // namespace dbus
diff --git a/src/theme/dbus/request_filter.cc b/src/theme/dbus/request_filter.cc
new file mode 100644 (file)
index 0000000..e66ac4e
--- /dev/null
@@ -0,0 +1,36 @@
+/*
+ * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.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://www.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 "theme/dbus/request_filter.h"
+
+namespace ttm {
+namespace dbus {
+
+bool RequestFilter::IsOneway() const {
+  return false;
+}
+
+Command RequestFilter::GetCmd() const {
+  return cmd_;
+}
+
+const IRequestHandler& RequestFilter::GetHandler() const {
+  return *handler_;
+}
+
+}  // namespace dbus
+}  // namespace ttm
+
index ab17af6..ec18155 100644 (file)
@@ -28,9 +28,9 @@ class RequestFilter {
  public:
   RequestFilter(Command cmd, std::shared_ptr<IRequestHandler> handler)
       : cmd_(cmd), handler_(handler) { }
-  bool IsOneway();
-  Command GetCmd();
-  const IRequestHandler& GetHandler();
+  bool IsOneway() const;
+  Command GetCmd() const;
+  const IRequestHandler& GetHandler() const;
  private:
   Command cmd_;
   std::shared_ptr<IRequestHandler> handler_;
diff --git a/src/theme/loader/theme_info_loader.cc b/src/theme/loader/theme_info_loader.cc
new file mode 100644 (file)
index 0000000..6838557
--- /dev/null
@@ -0,0 +1,53 @@
+/*
+ * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.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://www.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 <string>
+
+#include "theme/loader/theme_info_loader.h"
+
+namespace ttm {
+namespace loader {
+
+tizen_base::Bundle ThemeInfoLoader::OnRequest(dbus::Command cmd,
+    const tizen_base::Bundle& args) {
+  return {};
+}
+
+std::string ThemeInfoLoader::AddEvent(IThemeEvent& ev) {
+  return "";
+}
+
+int ThemeInfoLoader::RemoveEvent(const std::string& id) {
+  return 0;
+}
+
+std::vector<std::string> ThemeInfoLoader::QueryThemeId() {
+  return {};
+}
+
+void ThemeInfoLoader::SetCurrent(const std::string& id) {
+}
+
+std::shared_ptr<ThemeInfo> ThemeInfoLoader::LoadCurrent() const {
+  return nullptr;
+}
+
+std::shared_ptr<ThemeInfo> ThemeInfoLoader::Load(const std::string& id) const {
+  return nullptr;
+}
+
+}  // namespace loader
+}  // namespace ttm
index 79f6aa6..134b435 100644 (file)
 #ifndef THEME_LOADER_THEME_INFO_LOADER_H_
 #define THEME_LOADER_THEME_INFO_LOADER_H_
 
+#include <memory>
+#include <list>
+
 #include "theme/dbus/request_handler.h"
+#include "theme/loader/theme_event.h"
+#include "theme/loader/theme_info.h"
 
 namespace ttm {
 namespace loader {
 
-class ThemeInfoLoader : public IRequestHandler {
+class ThemeInfoLoader : public dbus::IRequestHandler {
  public:
-  explicit ThemeInfoLoader(std::shared_ptr<ThemeInfoProxy> cache)
-      : IRequestHandler(), cache_(cache) { }
-  tizen_base::Bundle OnRequest(Command cmd,
+  explicit ThemeInfoLoader(std::shared_ptr<ThemeInfo> cache)
+      : IRequestHandler(), cache_(std::move(cache)) { }
+  tizen_base::Bundle OnRequest(dbus::Command cmd,
     const tizen_base::Bundle& args) override;
 
   std::string AddEvent(IThemeEvent& ev);
@@ -36,9 +41,10 @@ class ThemeInfoLoader : public IRequestHandler {
   void SetCurrent(const std::string& id);
   std::shared_ptr<ThemeInfo> LoadCurrent() const;
   std::shared_ptr<ThemeInfo> Load(const std::string& id) const;
+
  private:
   std::shared_ptr<ThemeInfo> cache_;
-  std::List<IThemeEvent> listeners_;
+  std::list<std::shared_ptr<IThemeEvent>> listeners_;
 };
 
 }  // namespace loader