APPLY_PKG_CONFIG(${TARGET_TIZEN_THEME} PUBLIC
DLOG_DEPS
+ GLIB_DEPS
)
INSTALL(TARGETS ${TARGET_TIZEN_THEME} DESTINATION ${LIB_INSTALL_DIR})
--- /dev/null
+/*
+ * 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
+
#include <gio/gio.h>
+#include <list>
+#include <memory>
+
#include "theme/dbus/request_filter.h"
namespace ttm {
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
--- /dev/null
+/*
+ * 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
+
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_;
--- /dev/null
+/*
+ * 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
#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);
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