Remove all namespaces from ckm-error.h header.
authorBartlomiej Grzelewski <b.grzelewski@samsung.com>
Mon, 7 Jul 2014 12:26:42 +0000 (14:26 +0200)
committerBartlomiej Grzelewski <b.grzelewski@samsung.com>
Fri, 12 Sep 2014 12:58:49 +0000 (14:58 +0200)
Change-Id: I90e6d818fa42e486356926107ae069e439010f02

packaging/key-manager.spec
src/CMakeLists.txt
src/include/ckm/ckm-echo.h [new file with mode: 0644]
src/include/ckm/ckm-error.h
src/include/ckm/ckm-type.h
src/manager/client/client-echo.cpp
src/manager/client/client-error.cpp

index bf4ca3e..3d95137 100755 (executable)
@@ -164,6 +164,7 @@ fi
 %{_includedir}/ckm/ckm/ckm-manager.h
 %{_includedir}/ckm/ckm/ckm-control.h
 %{_includedir}/ckm/ckm/ckm-error.h
+%{_includedir}/ckm/ckm/ckm-echo.h
 %{_includedir}/ckm/ckm/ckm-type.h
 %{_includedir}/ckm/ckmc/ckmc-manager.h
 %{_includedir}/ckm/ckmc/ckmc-control.h
index 2319eb5..d0aadae 100644 (file)
@@ -145,6 +145,7 @@ INSTALL(FILES
     ${KEY_MANAGER_SRC_PATH}/include/ckm/ckm-manager.h
     ${KEY_MANAGER_SRC_PATH}/include/ckm/ckm-control.h
     ${KEY_MANAGER_SRC_PATH}/include/ckm/ckm-error.h
+    ${KEY_MANAGER_SRC_PATH}/include/ckm/ckm-echo.h
     ${KEY_MANAGER_SRC_PATH}/include/ckm/ckm-type.h
     DESTINATION /usr/include/ckm/ckm
     )
diff --git a/src/include/ckm/ckm-echo.h b/src/include/ckm/ckm-echo.h
new file mode 100644 (file)
index 0000000..643470a
--- /dev/null
@@ -0,0 +1,40 @@
+/*
+ *  Copyright (c) 2014 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
+ *
+ * @file    ckm-manager.h
+ * @version 1.0
+ * @brief   This file contains APIs of the Central Key Manager
+*/
+#ifndef KEY_MANAGER_ECHO_H
+#define KEY_MANAGER_ECHO_H
+/*
+ * This function was created mainly for testing ckm-manager client/service
+ * proper behaviour. It sends a message and returns message from service,
+ * which should be a pure echo.
+ *
+ * \param[in] Message for service
+ * \param[out] Response from service
+ *
+ * \return CKM_API_ERROR_INPUT_PARAM when trying to pass NULL message
+ * \return CKM_API_SUCCESS on success
+ */
+namespace CKM {
+
+int key_manager_echo(const char* echo, char** oche);
+
+} // namespace CKM
+
+#endif
+
index ea81e04..538edca 100644 (file)
@@ -1,10 +1,6 @@
 /*
- *  ckm-manager
- *
  *  Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved
  *
- *  Contact: Bumjin Im <bj.im@samsung.com>
- *
  *  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
  *  See the License for the specific language governing permissions and
  *  limitations under the License
  *
- */
-
-#ifndef KEY_MANAGER_H
-#define KEY_MANAGER_H
-
-#include <sys/types.h>
-
-/**
  * @file    ckm-manager.h
  * @version 1.0
  * @brief   This file contains APIs of the Central Key Manager
 */
+#ifndef _CKM_ERROR_H_
+#define _CKM_ERROR_H_
 
-/**
- * @defgroup SecurityFW
- * @{
- *
- * @defgroup KEY_MANAGER Central Key Manager
- * @version  1.0
- * @brief    Central Key Manager client library functions
- *
-*/
-
-/**
- * @addtogroup KEY_MANAGER
- * @{
-*/
+#ifdef __cplusplus
+extern "C" {
+#endif
 
 /**
  * \name Return Codes
 #define CKM_API_ERROR_UNKNOWN -255
 /** @}*/
 
-namespace CKM {
-const char * ErrorToString(int error);
-} // namespace CKM
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * This function was created mainly for testing ckm-manager client/service
- * proper behaviour. It sends a message and returns message from service,
- * which should be a pure echo.
- *
- * \param[in] Message for service
- * \param[out] Response from service
- *
- * \return CKM_API_ERROR_INPUT_PARAM when trying to pass NULL message
- * \return CKM_API_SUCCESS on success
- */
-
-int key_manager_echo(const char* echo, char** oche);
-
-
 #ifdef __cplusplus
 }
 #endif
 
-/**
- * @}
-*/
-
-/**
- * @}
-*/
-
 #endif
index a5e4fb9..a054918 100644 (file)
@@ -92,5 +92,7 @@ enum class DBCMAlgType : int {
 class GenericKey;
 class CertificateImpl;
 
+const char * ErrorToString(int error);
+
 } // namespace CKM
 
index eef5d11..d1f4611 100644 (file)
@@ -27,6 +27,7 @@
 #include <protocols.h>
 
 #include <ckm/ckm-error.h>
+#include <ckm/ckm-echo.h>
 
 KEY_MANAGER_API
 int key_manager_echo(const char *echo, char** oche) {
index 12357f8..c25b003 100644 (file)
@@ -19,6 +19,7 @@
  * @brief       This file contains example of ckm-manager client implementation
  */
 #include <ckm/ckm-error.h>
+#include <ckm/ckm-type.h>
 
 #define ERRORDESCRIBE(name) case name: return #name