Fix namespaces
authorJunghoon Park <jh9216.park@samsung.com>
Tue, 14 Apr 2020 06:46:43 +0000 (15:46 +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>
21 files changed:
src/theme/loader/theme_info_loader.h
src/theme_plugin/theme_info_builder.cc
src/theme_plugin/theme_info_builder.h
src/theme_plugin/theme_parser.cc
src/theme_plugin/theme_parser.h
src/theme_provider/control_request_handler.cc
src/theme_provider/control_request_handler.h
src/theme_provider/db_manager.cc
src/theme_provider/db_manager.h
src/theme_provider/package_event_request_handler.cc
src/theme_provider/package_event_request_handler.h
src/theme_provider/selection_request_handler.cc
src/theme_provider/selection_request_handler.h
src/theme_provider/sqlite_connection.cc
src/theme_provider/sqlite_connection.h
src/theme_provider/sqlite_statement.cc
src/theme_provider/sqlite_statement.h
src/theme_provider/sqlite_transaction.cc
src/theme_provider/sqlite_transaction.h
src/theme_provider/theme_info_proxy.cc
src/theme_provider/theme_info_proxy.h

index 0a51e65..79f6aa6 100644 (file)
@@ -32,7 +32,7 @@ class ThemeInfoLoader : public IRequestHandler {
   std::string AddEvent(IThemeEvent& ev);
   int RemoveEvent(const std::string& id);
 
-  std::string[] QueryThemeId();
+  std::vector<std::string> QueryThemeId();
   void SetCurrent(const std::string& id);
   std::shared_ptr<ThemeInfo> LoadCurrent() const;
   std::shared_ptr<ThemeInfo> Load(const std::string& id) const;
index b51d47a..1b4e81c 100644 (file)
@@ -5,6 +5,7 @@
 #include "theme_info_builder.h"\r
 \r
 namespace ttm {\r
+namespace plugin {\r
 \r
 ThemeInfoBuilder::ThemeInfoBuilder(std::string id) {\r
 \r
@@ -47,4 +48,5 @@ loader::ThemeInfo ThemeInfoBuilder::Build() {
   return info;\r
 }\r
 \r
+}  // namespace plugin\r
 }  // namespace ttm
\ No newline at end of file
index dad0605..25ebe5c 100644 (file)
@@ -11,6 +11,7 @@
 #include "theme/loader/theme_info.h"\r
 \r
 namespace ttm {\r
+namespace plugin {\r
 \r
 class ThemeInfoBuilder {\r
  public:\r
@@ -27,6 +28,7 @@ class ThemeInfoBuilder {
 \r
 };\r
 \r
+}  // namespace plugin\r
 }  // namespace ttm\r
 \r
 #endif  // THEME_PLUGIN_THEME_INFO_BUILDER_H_\r
index 9f2bedc..71ac11f 100644 (file)
@@ -6,6 +6,7 @@
 #include "theme/loader/theme_info.h"\r
 \r
 namespace ttm {\r
+namespace plugin {\r
 \r
 loader::ThemeInfo ThemeParser::Inflate(std::string json) {\r
     loader::ThemeInfo info("id", "0.1", "0.1", "title", "resolution", "preview",\r
@@ -18,4 +19,5 @@ int ThemeParser::Commit(ThemeOperation operation,
     return 0;\r
 }\r
 \r
+}  // namesapce plugin\r
 }  // namespace ttm
\ No newline at end of file
index a51ad7d..254bed3 100644 (file)
@@ -11,6 +11,7 @@
 #include "theme/loader/theme_info.h"\r
 \r
 namespace ttm {\r
+namespace plugin {\r
 \r
 class ThemeParser {\r
  public:\r
@@ -24,6 +25,7 @@ class ThemeParser {
   int Commit(ThemeOperation operation, const loader::ThemeInfo& theme);\r
 };\r
 \r
+}  // namespace plugin\r
 }  // namespace ttm\r
 \r
 #endif  // THEME_PLUGIN_THEME_PARSER_H_\r
index d6504f0..cd9e208 100644 (file)
@@ -7,6 +7,7 @@
 #include <bundle_cpp.h>
 
 namespace ttm {
+namespace provider {
 
 using namespace dbus;
 
@@ -15,4 +16,5 @@ tizen_base::Bundle ControlRequestHandler::OnRequest(Command cmd,
   return {};
 }
 
+}  // namespace provider
 }  // namespace ttm
index 991423d..3667fb3 100644 (file)
@@ -13,6 +13,7 @@
 #include "theme/dbus/request_handler.h"
 
 namespace ttm {
+namespace provider {
 
 class ThemeInfoProxy;
 
@@ -26,6 +27,7 @@ class ControlRequestHandler : public dbus::IRequestHandler {
   std::shared_ptr<ThemeInfoProxy> proxy_;
 };
 
+}  // namespace provider
 }  // namespace ttm
 
 #endif  // THEME_PROVIDER_CONTROL_REQUEST_HANDLER_H_
index 53f054a..be7d3f2 100644 (file)
@@ -9,6 +9,7 @@
 #include <string>
 
 namespace ttm {
+namespace provider {
 
 bool DbManager::Insert(const std::string& id, const tizen_base::Bundle& info) {
   return true;
@@ -31,5 +32,5 @@ void DbManager::AddPackageEventListener(
   listeners_.emplace_back(listener);
 }
 
-
+}  // namespace provider
 }  // namespace ttm
index 784811c..df04c08 100644 (file)
 #include <vector>
 
 namespace ttm {
+namespace provider {
 
 class IThemePackageEvent {
  public:
+  virtual ~IThemePackageEvent() = default;
   virtual void OnThemePackageChanged(const std::string& id) = 0;
 };
 
@@ -30,6 +32,7 @@ class DbManager {
   std::vector<std::shared_ptr<IThemePackageEvent>> listeners_;
 };
 
+}  // namespace provider
 }  // namespace ttm
 
 #endif  // THEME_PROVIDER_DB_MANAGER_H_
index b7a0857..b885904 100644 (file)
@@ -7,10 +7,12 @@
 #include <bundle_cpp.h>
 
 namespace ttm {
+namespace provider {
 
 tizen_base::Bundle PackageEventRequestHandler::OnRequest(dbus::Command cmd,
     const tizen_base::Bundle& args) {
   return {};
 }
 
+}  // namespace provider
 }  // namespace ttm
index 9ef30fa..e7817ea 100644 (file)
@@ -13,6 +13,7 @@
 #include "theme/dbus/request_handler.h"
 
 namespace ttm {
+namespace provider {
 
 class ThemeInfoProxy;
 
@@ -26,6 +27,7 @@ class PackageEventRequestHandler : public dbus::IRequestHandler {
   std::shared_ptr<ThemeInfoProxy> proxy_;
 };
 
+}  // namespace provider
 }  // namespace ttm
 
 #endif  // THEME_PROVIDER_PACKAGE_EVENT_REQUEST_HANDLER_H_
index a498cd0..0671d6a 100644 (file)
@@ -7,6 +7,7 @@
 #include <bundle_cpp.h>
 
 namespace ttm {
+namespace provider {
 
 using namespace dbus;
 
@@ -15,4 +16,5 @@ tizen_base::Bundle SelectionRequestHandler::OnRequest(Command cmd,
   return {};
 }
 
+}  // namespace provider
 }  // namespace ttm
index 85a86f6..58ceedc 100644 (file)
@@ -13,6 +13,7 @@
 #include "theme/dbus/request_handler.h"
 
 namespace ttm {
+namespace provider {
 
 class ThemeInfoProxy;
 
@@ -26,6 +27,7 @@ class SelectionRequestHandler : public dbus::IRequestHandler {
   std::shared_ptr<ThemeInfoProxy> proxy_;
 };
 
+}  // namespace provider
 }  // namespace ttm
 
 #endif  // THEME_PROVIDER_SELECTION_REQUEST_HANDLER_H_
index 8d1bb8e..f0c5d9e 100644 (file)
@@ -15,6 +15,7 @@
 #include "theme_provider/sqlite_statement.h"
 
 namespace ttm {
+namespace provider {
 
 SQLiteConnection::SQLiteConnection(std::string path, bool readonly)
     : path_(std::move(path)), db_(nullptr) {
@@ -122,4 +123,5 @@ bool SQLiteConnection::IsValid() {
   return false;
 }
 
+}  // namesapce provider
 }  // namespace ttm
index b3d0224..3007979 100644 (file)
@@ -12,6 +12,7 @@
 #include <string>
 
 namespace ttm {
+namespace provider {
 
 class SQLiteTransaction;
 class SQLiteStatement;
@@ -49,6 +50,7 @@ class SQLiteConnection : public std::enable_shared_from_this<SQLiteConnection> {
   int error_code_;
 };
 
+}  // namespace provider
 }  // namespace ttm
 
 #endif  // THEME_PROVIDER_SQLITE_CONNECTION_H_
index 4810c42..3097596 100644 (file)
@@ -12,6 +12,7 @@
 #include "theme_provider/sqlite_connection.h"
 
 namespace ttm {
+namespace provider {
 
 SQLiteStatement::SQLiteStatement(std::shared_ptr<SQLiteConnection> sql_conn,
     sqlite3_stmt* stmt) : sql_conn_(sql_conn), stmt_(stmt) {}
@@ -93,4 +94,5 @@ std::string SQLiteStatement::GetErrorMessage() const {
   return sqlite3_errmsg(sqlite3_db_handle(stmt_));
 }
 
+}  // namespace provider
 }  // namespace ttm
index 7630cc0..b94e075 100644 (file)
@@ -11,6 +11,7 @@
 #include <string>
 
 namespace ttm {
+namespace provider {
 
 class SQLiteConnection;
 
@@ -43,6 +44,7 @@ class SQLiteStatement {
   sqlite3_stmt* stmt_;
 };
 
+}  // namespace provider
 }  // namespace ttm
 
 #endif  // THEME_PROVIDER_SQLITE_STATEMENT_H_
index 24e03d3..0fb9bcf 100644 (file)
@@ -7,6 +7,7 @@
 #include "theme_provider/sqlite_connection.h"
 
 namespace ttm {
+namespace provider {
 
 void SQLiteTransaction::lock() const {
   sql_conn_->BeginTransaction();
@@ -19,4 +20,5 @@ void SQLiteTransaction::unlock() const {
     sql_conn_->RollbackTransaction();
 }
 
+}  // namespace provider
 }  // namespace ttm
index 43a36dc..5cb61c4 100644 (file)
@@ -6,6 +6,7 @@
 #define THEME_PROVIDER_SQLITE_TRANSACTION_H_
 
 namespace ttm {
+namespace provider {
 
 class SQLiteConnection;
 
@@ -24,6 +25,7 @@ class SQLiteTransaction {
   SQLiteConnection* sql_conn_;
 };
 
+}  // namespace provider
 }  // namespace ttm
 
 #endif  // THEME_PROVIDER_SQLITE_TRANSACTION_H_
index 89fce2c..440a5b0 100644 (file)
@@ -9,6 +9,7 @@
 #include "theme/loader/theme_info.h"
 
 namespace ttm {
+namespace provider {
 
 class ThemeInfo;
 
@@ -31,4 +32,5 @@ bool SetCurrentTheme(const std::string& id) {
 void OnThemePackageChanged(const std::string& id) {
 }
 
+}  // namespace provider
 }  // namespace ttm
index bfadd0d..d2a6495 100644 (file)
@@ -11,6 +11,7 @@
 #include "theme_provider/db_manager.h"
 
 namespace ttm {
+namespace provider {
 
 class ThemeInfo;
 
@@ -23,6 +24,7 @@ class ThemeInfoProxy : public IThemePackageEvent {
   void OnThemePackageChanged(const std::string& id) override;
 };
 
+}  // namespace provider
 }  // namespace ttm
 
 #endif  // THEME_PROVIDER_THEME_INFO_PROXY_H_