From 36345f0e7fc6f77e6c101270fab8518c3ade6114 Mon Sep 17 00:00:00 2001 From: Mu-Woong Lee Date: Tue, 28 Mar 2017 22:10:04 +0900 Subject: [PATCH] Replace obsoleted util headers Change-Id: Ib239fff20cbd3163cee14786a6ac6237696b6858 Signed-off-by: Mu-Woong Lee --- src/client/context_store.cpp | 1 - src/server/SchemaLoader.cpp | 8 ++++---- src/server/StoreManager.cpp | 1 - src/shared/ContextStoreTypesPrivate.h | 2 +- src/shared/ContextStoreUtil.cpp | 35 ----------------------------------- src/shared/ContextStoreUtil.h | 29 ----------------------------- 6 files changed, 5 insertions(+), 71 deletions(-) delete mode 100644 src/shared/ContextStoreUtil.cpp delete mode 100644 src/shared/ContextStoreUtil.h diff --git a/src/client/context_store.cpp b/src/client/context_store.cpp index 2907759..0451aab 100644 --- a/src/client/context_store.cpp +++ b/src/client/context_store.cpp @@ -18,7 +18,6 @@ #include #include #include -#include #include #include "ContextStore.h" #include "ContextStoreManager.h" diff --git a/src/server/SchemaLoader.cpp b/src/server/SchemaLoader.cpp index 146ed54..edb205f 100644 --- a/src/server/SchemaLoader.cpp +++ b/src/server/SchemaLoader.cpp @@ -20,7 +20,7 @@ #include #include #include -#include +#include #include "DatabaseManager.h" #include "Schema.h" #include "SchemaChecker.h" @@ -104,7 +104,7 @@ bool SchemaLoader::load() bool SchemaLoader::__createMetadataTables() { - std::string path = PathUtil::getSystemPath(TZ_SYS_DATA, BASE_PATH "/init.sql"); + std::string path = util::getSystemPath(TZ_SYS_DATA, BASE_PATH "/init.sql"); IF_FAIL_RETURN(!path.empty(), false); std::ifstream inFile(path); @@ -354,7 +354,7 @@ Database& SystemSchemaLoader::__getDatabase() std::string SystemSchemaLoader::__getSchemaDir() { - return PathUtil::getSystemPath(TZ_SYS_DATA, BASE_PATH "/system"); + return util::getSystemPath(TZ_SYS_DATA, BASE_PATH "/system"); } @@ -369,5 +369,5 @@ Database& UserSchemaLoader::__getDatabase() std::string UserSchemaLoader::__getSchemaDir() { - return PathUtil::getSystemPath(TZ_SYS_DATA, BASE_PATH "/user"); + return util::getSystemPath(TZ_SYS_DATA, BASE_PATH "/user"); } diff --git a/src/server/StoreManager.cpp b/src/server/StoreManager.cpp index 5a6cee0..9119884 100644 --- a/src/server/StoreManager.cpp +++ b/src/server/StoreManager.cpp @@ -14,7 +14,6 @@ * limitations under the License. */ -#include #include "DatabaseManager.h" #include "UserStore.h" #include "SystemStore.h" diff --git a/src/shared/ContextStoreTypesPrivate.h b/src/shared/ContextStoreTypesPrivate.h index 9dbd2d0..3651bb8 100644 --- a/src/shared/ContextStoreTypesPrivate.h +++ b/src/shared/ContextStoreTypesPrivate.h @@ -18,7 +18,7 @@ #define __CONTEXT_STORE_TYPES_PRIVATE_H__ #include -#include +#include #define CTX_CONTEXT_STORE "ContextStore" #define CTX_CONTEXT_STORE_SPEC \ diff --git a/src/shared/ContextStoreUtil.cpp b/src/shared/ContextStoreUtil.cpp deleted file mode 100644 index 5d6d5f2..0000000 --- a/src/shared/ContextStoreUtil.cpp +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2017 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 "ContextStoreTypesPrivate.h" -#include "ContextStoreUtil.h" - -using namespace ctx; - -std::vector util::tokenizeString(std::string& in, const char* delim) -{ - std::vector tokens; - std::size_t begin = 0; - std::size_t end = in.find(delim, 0); - - while (end != std::string::npos) { - tokens.push_back(in.substr(begin, end - begin)); - begin = end + 1; - end = in.find(delim, begin); - } - - return tokens; -} diff --git a/src/shared/ContextStoreUtil.h b/src/shared/ContextStoreUtil.h deleted file mode 100644 index 52348e8..0000000 --- a/src/shared/ContextStoreUtil.h +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (c) 2017 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. - */ - -#ifndef __CONTEXT_STORE_UTIL_H__ -#define __CONTEXT_STORE_UTIL_H__ - -#include -#include - -namespace ctx { namespace util { - - std::vector tokenizeString(std::string& in, const char* delim); - -} } - -#endif -- 2.7.4