Remove cache_db_handler
authorChanggyu Choi <changyu.choi@samsung.com>
Mon, 8 Mar 2021 07:37:07 +0000 (16:37 +0900)
committer최창규/Tizen Platform Lab(SR)/Engineer/삼성전자 <changyu.choi@samsung.com>
Mon, 8 Mar 2021 08:17:28 +0000 (17:17 +0900)
This handler is unnecessary.

Signed-off-by: Changgyu Choi <changyu.choi@samsung.com>
src/common/database/cache_db_handler.cc [deleted file]
src/common/database/cache_db_handler.hh [deleted file]
test/unit_tests/test_database.cc

diff --git a/src/common/database/cache_db_handler.cc b/src/common/database/cache_db_handler.cc
deleted file mode 100644 (file)
index cea448a..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright (c) 2021 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * 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 "cache_db_handler.hh"
-
-namespace pkgmgr_common {
-namespace database {
-
-CacheDBHandler::CacheDBHandler(uid_t uid) : AbstractDBHandler(uid), uid_(uid) {}
-
-CacheDBHandler::~CacheDBHandler() {}
-
-bool CacheDBHandler::InitCacheDB() { return true; }
-
-bool CacheDBHandler::RemoveCache(std::string pkgid) { return true; }
-
-int CacheDBHandler::Execute() {
-  SetOpType(OPERATION_TYPE_READ);
-  SetDBType(DB_TYPE_MEMORY_PKGDB);
-  return PMINFO_R_OK;
-}
-
-}  // namespace database
-}  // namespace pkgmgr_common
diff --git a/src/common/database/cache_db_handler.hh b/src/common/database/cache_db_handler.hh
deleted file mode 100644 (file)
index 0470b77..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright (c) 2021 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * 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.
- */
-
-#ifndef CACHE_DB_HANDLER_HH_
-#define CACHE_DB_HANDLER_HH_
-
-#include <string>
-
-#include <sys/types.h>
-
-#include "abstract_db_handler.hh"
-#include "pkgmgrinfo_basic.h"
-#include "pkgmgrinfo_private.h"
-
-namespace pkgmgr_common {
-namespace database {
-
-#ifndef EXPORT_API
-#define EXPORT_API __attribute__((visibility("default")))
-#endif
-
-class EXPORT_API CacheDBHandler : public AbstractDBHandler{
- public:
-  CacheDBHandler(uid_t uid);
-  ~CacheDBHandler();
-  bool InitCacheDB();
-  bool RemoveCache(std::string pkgid);
-  int Execute() override;
-
- private:
-  uid_t uid_;
-};
-
-}  // namespace database
-}  // namespace pkgmgr_common
-
-#endif  // CACHE_DB_HANDLER_HH_
-
index 296f26d..e67889a 100644 (file)
@@ -22,7 +22,6 @@
 
 #include "common/database/abstract_db_handler.hh"
 #include "common/database/appinfo_db_handler.hh"
-#include "common/database/cache_db_handler.hh"
 #include "common/database/cert_get_db_handler.hh"
 #include "common/database/cert_set_db_handler.hh"
 #include "common/database/pkg_get_db_handler.hh"