separate plugin-api of place_category 29/74029/1
authorchanywa <cbible.kim@samsung.com>
Fri, 10 Jun 2016 11:21:28 +0000 (20:21 +0900)
committerchanywa <cbible.kim@samsung.com>
Fri, 10 Jun 2016 11:21:28 +0000 (20:21 +0900)
Change-Id: I6ccf14e01a9dec05aab5f44ff551078fb189d362

include/maps_place_category.h
include/maps_place_category_plugin.h [new file with mode: 0644]
src/api/maps_place_category.cpp

index f7c8259..b9b12ed 100644 (file)
@@ -50,26 +50,6 @@ typedef void *maps_place_category_h;
 /*----------------------------------------------------------------------------*/
 
 /**
- * @brief      Creates a new place category handle.
- * @details This function creates a new place category handle and allocates all
- * needed resources.
- * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
- * @remarks @a category must be released using maps_place_category_destroy().
- * \n @a category may be cloned using maps_place_category_clone().
- *
- * @param[out] category        A handle of a new place category on success
- * @return     0 on success, otherwise a negative error value
- * @retval     #MAPS_ERROR_NONE Successful
- * @retval     #MAPS_ERROR_OUT_OF_MEMORY Out of memory
- * @retval     #MAPS_ERROR_INVALID_PARAMETER Invalid parameter
- *
- * @see maps_place_category_destroy()
- * @see maps_place_category_clone()
- */
-int maps_place_category_create(maps_place_category_h *category);
-
-
-/**
  * @brief      Clones the place category handle.
  * @details This function clones the place category handle @a origin and all its
  * resources.
@@ -86,7 +66,7 @@ int maps_place_category_create(maps_place_category_h *category);
  * @see maps_place_category_destroy()
  */
 int maps_place_category_clone(const maps_place_category_h origin,
-                             maps_place_category_h *cloned);
+                                                               maps_place_category_h *cloned);
 
 
 /**
@@ -109,66 +89,6 @@ int maps_place_category_destroy(maps_place_category_h category);
 /*----------------------------------------------------------------------------*/
 
 /**
- * @brief      Sets the place category id.
- * @details This function sets the place category id.
- * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
- *
- * @param[in]  category        The handle of place category
- * @param[in]  id              The place category id
- * @return     0 on success, otherwise a negative error value
- * @retval     #MAPS_ERROR_NONE Successful
- * @retval     #MAPS_ERROR_INVALID_PARAMETER Invalid parameter
- *
- * @pre @a category is created using maps_place_category_create().
- *
- * @see maps_place_category_create()
- * @see maps_place_category_get_id()
- */
-int maps_place_category_set_id(maps_place_category_h category,
-                              const char *id);
-
-
-/**
- * @brief      Sets the place category name.
- * @details This function sets the place category name.
- * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
- *
- * @param[in]  category        The handle of place category
- * @param[in]  name            The place category name
- * @return     0 on success, otherwise a negative error value
- * @retval     #MAPS_ERROR_NONE Successful
- * @retval     #MAPS_ERROR_INVALID_PARAMETER Invalid parameter
- *
- * @pre @a category is created using maps_place_category_create().
- *
- * @see maps_place_category_create()
- * @see maps_place_category_get_name()
- */
-int maps_place_category_set_name(maps_place_category_h category,
-                                const char *name);
-
-
-/**
- * @brief      Sets the place category URL.
- * @details This function sets the place category URL.
- * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
- *
- * @param[in]  category        The handle of place category
- * @param[in]  url             The place category URL
- * @return     0 on success, otherwise a negative error value
- * @retval     #MAPS_ERROR_NONE Successful
- * @retval     #MAPS_ERROR_INVALID_PARAMETER Invalid parameter
- *
- * @pre @a category is created using maps_place_category_create().
- *
- * @see maps_place_category_create()
- * @see maps_place_category_get_url()
- */
-int maps_place_category_set_url(maps_place_category_h category,
-                               const char *url);
-
-
-/**
  * @brief      Gets the place category id.
  * @details This function gets the place category id.
  * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
@@ -180,8 +100,7 @@ int maps_place_category_set_url(maps_place_category_h category,
  * @retval     #MAPS_ERROR_NONE Successful
  * @retval     #MAPS_ERROR_INVALID_PARAMETER Invalid parameter
  */
-int maps_place_category_get_id(const maps_place_category_h category,
-                              char **id);
+int maps_place_category_get_id(const maps_place_category_h category, char **id);
 
 /**
  * @brief      Gets the place category name.
@@ -195,8 +114,7 @@ int maps_place_category_get_id(const maps_place_category_h category,
  * @retval     #MAPS_ERROR_NONE Successful
  * @retval     #MAPS_ERROR_INVALID_PARAMETER Invalid parameter
  */
-int maps_place_category_get_name(const maps_place_category_h category,
-                                char **name);
+int maps_place_category_get_name(const maps_place_category_h category, char **name);
 
 /**
  * @brief      Gets the place category URL.
@@ -210,8 +128,7 @@ int maps_place_category_get_name(const maps_place_category_h category,
  * @retval     #MAPS_ERROR_NONE Successful
  * @retval     #MAPS_ERROR_INVALID_PARAMETER Invalid parameter
  */
-int maps_place_category_get_url(const maps_place_category_h category,
-                               char **url);
+int maps_place_category_get_url(const maps_place_category_h category, char **url);
 
 #ifdef __cplusplus
 }
diff --git a/include/maps_place_category_plugin.h b/include/maps_place_category_plugin.h
new file mode 100644 (file)
index 0000000..322eafb
--- /dev/null
@@ -0,0 +1,122 @@
+/*
+ * 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.
+ */
+
+#ifndef __MAPS_PLACE_CATEGORY_PLUGINH__
+#define __MAPS_PLACE_CATEGORY_PLUGINH__
+
+#include <maps_place_category.h>
+
+/**
+ * @ingroup    CAPI_MAPS_PLUGIN_PLACE_MODULE
+ * @defgroup   CAPI_MAPS_PLUGIN_PLACE_CATEGORY_MODULE Category
+ *
+ * @file maps_place_category_plugin.h
+ * @brief This file contains the functions related to Place Category
+ * information, needed in plug-in development.
+ *
+ * @addtogroup CAPI_MAPS_PLUGIN_PLACE_CATEGORY_MODULE
+ * @{
+ * @brief This provides APIs related to Place Category information, used in
+ * Place Discovery and Search, needed in plug-in development.
+ */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @brief      Creates a new place category handle.
+ * @details This function creates a new place category handle and allocates all
+ * needed resources.
+ * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
+ * @remarks @a category must be released using maps_place_category_destroy().
+ * \n @a category may be cloned using maps_place_category_clone().
+ *
+ * @param[out] category        A handle of a new place category on success
+ * @return     0 on success, otherwise a negative error value
+ * @retval     #MAPS_ERROR_NONE Successful
+ * @retval     #MAPS_ERROR_OUT_OF_MEMORY Out of memory
+ * @retval     #MAPS_ERROR_INVALID_PARAMETER Invalid parameter
+ *
+ * @see maps_place_category_destroy()
+ * @see maps_place_category_clone()
+ */
+int maps_place_category_create(maps_place_category_h *category);
+
+
+/**
+ * @brief      Sets the place category id.
+ * @details This function sets the place category id.
+ * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
+ *
+ * @param[in]  category        The handle of place category
+ * @param[in]  id              The place category id
+ * @return     0 on success, otherwise a negative error value
+ * @retval     #MAPS_ERROR_NONE Successful
+ * @retval     #MAPS_ERROR_INVALID_PARAMETER Invalid parameter
+ *
+ * @pre @a category is created using maps_place_category_create().
+ *
+ * @see maps_place_category_create()
+ * @see maps_place_category_get_id()
+ */
+int maps_place_category_set_id(maps_place_category_h category, const char *id);
+
+
+/**
+ * @brief      Sets the place category name.
+ * @details This function sets the place category name.
+ * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
+ *
+ * @param[in]  category        The handle of place category
+ * @param[in]  name            The place category name
+ * @return     0 on success, otherwise a negative error value
+ * @retval     #MAPS_ERROR_NONE Successful
+ * @retval     #MAPS_ERROR_INVALID_PARAMETER Invalid parameter
+ *
+ * @pre @a category is created using maps_place_category_create().
+ *
+ * @see maps_place_category_create()
+ * @see maps_place_category_get_name()
+ */
+int maps_place_category_set_name(maps_place_category_h category, const char *name);
+
+
+/**
+ * @brief      Sets the place category URL.
+ * @details This function sets the place category URL.
+ * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
+ *
+ * @param[in]  category        The handle of place category
+ * @param[in]  url             The place category URL
+ * @return     0 on success, otherwise a negative error value
+ * @retval     #MAPS_ERROR_NONE Successful
+ * @retval     #MAPS_ERROR_INVALID_PARAMETER Invalid parameter
+ *
+ * @pre @a category is created using maps_place_category_create().
+ *
+ * @see maps_place_category_create()
+ * @see maps_place_category_get_url()
+ */
+int maps_place_category_set_url(maps_place_category_h category, const char *url);
+
+#ifdef __cplusplus
+}
+#endif
+/**
+ * @}
+ */
+#endif                         /* __MAPS_PLACE_CATEGORY_PLUGINH__ */
index a1e9ff3..e3337ea 100755 (executable)
@@ -17,7 +17,7 @@
 #include "maps_extra_types.h"
 #include <glib.h>
 #include "maps_util.h"
-#include "maps_place_category.h"
+#include "maps_place_category_plugin.h"
 
 typedef struct _maps_place_category_s
 {