[bluetooth] setFolder 59/102859/2
authorPiotr Dabrowski <p.dabrowski2@samsung.com>
Tue, 25 Oct 2016 11:06:55 +0000 (13:06 +0200)
committerPyun DoHyun <dh79.pyun@samsung.com>
Thu, 8 Dec 2016 00:11:57 +0000 (16:11 -0800)
Change-Id: I45b00792eb1905ee727613de6095480d58f522f2

include/mobile/bluetooth_internal.h
include/wearable/bluetooth_internal.h
src/bluetooth-map-client.c

index daef288055498478f88c728dcd50996473f52f16..80f84fca9fab34fd47ed277780403771e22aaa0a 100644 (file)
@@ -1562,6 +1562,25 @@ int bt_map_client_deinitialize(void);
 int bt_map_client_create_session(const char* remote_address, bt_map_session_info_h* session);
 int bt_map_client_destroy_session(bt_map_session_info_h session);
 
+/**
+ * @ingroup CAPI_NETWORK_BLUETOOTH_MAP_CLIENT_MODULE
+ * @brief Request set folder.
+ * @since_tizen 3.0
+ * @param[in] handle Session handle
+ * @param[in] folder Folder name
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #BT_ERROR_NONE  Successful
+ * @retval #BT_ERROR_NOT_INITIALIZED  Not initialized
+ * @retval #BT_ERROR_OPERATION_FAILED  Operation failed
+ * @retval #BT_ERROR_NOT_SUPPORTED   Not supported
+ *
+ * @see  bt_map_client_set_folder()
+ */
+int bt_map_client_set_folder(
+    bt_map_session_info_h handle,
+    const char *folder
+);
+
 /**
  * @ingroup CAPI_NETWORK_BLUETOOTH_MAP_CLIENT_MODULE
  * @brief Request remote to update its inbox.
index 20929cc6fcb63ee7eaf1f99d773f4988980e20f5..13e72fae49c5c7876c5e063675065dd4fd548b62 100644 (file)
@@ -1532,6 +1532,25 @@ int bt_map_client_deinitialize(void);
 int bt_map_client_create_session(const char* remote_address, bt_map_session_info_h* session);
 int bt_map_client_destroy_session(bt_map_session_info_h session);
 
+/**
+ * @ingroup CAPI_NETWORK_BLUETOOTH_MAP_CLIENT_MODULE
+ * @brief Request set folder.
+ * @since_tizen 3.0
+ * @param[in] handle Session handle
+ * @param[in] folder Folder name
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #BT_ERROR_NONE  Successful
+ * @retval #BT_ERROR_NOT_INITIALIZED  Not initialized
+ * @retval #BT_ERROR_OPERATION_FAILED  Operation failed
+ * @retval #BT_ERROR_NOT_SUPPORTED   Not supported
+ *
+ * @see  bt_map_client_set_folder()
+ */
+int bt_map_client_set_folder(
+    bt_map_session_info_h handle,
+    const char *folder
+);
+
 /**
  * @ingroup CAPI_NETWORK_BLUETOOTH_MAP_CLIENT_MODULE
  * @brief Request remote to update its inbox.
index 1aad5b4780ad7d0dad1be4c32c225f59cc5c5704..8a150be96f49e2b157a99c5f5fc07a2799ba81f6 100644 (file)
@@ -90,7 +90,6 @@ int bt_map_client_deinitialize(void)
        return error_code;
 }
 
-
 int bt_map_client_create_session(const char* remote_address, bt_map_session_info_h* out_h)
 {
        BT_DBG("bt_map_client_create_session");
@@ -140,10 +139,25 @@ int bt_map_client_destroy_session(bt_map_session_info_h s)
        return error_code;
 }
 
-int bt_map_client_set_folder(const char *name)
+int bt_map_client_set_folder(bt_map_session_info_h handle, const char *name)
 {
-       /* TODO: MAP */
-       return BT_ERROR_NONE;
+       int error_code = BT_ERROR_NONE;
+
+       //BT_CHECK_MAP_CLIENT_SUPPORT();
+       BT_CHECK_INIT_STATUS();
+       BT_CHECK_MAP_CLIENT_INIT_STATUS();
+       BT_CHECK_INPUT_PARAMETER(handle);
+       BT_CHECK_INPUT_PARAMETER(name);
+
+       bt_map_session_info_s* session = (bt_map_session_info_s*)handle;
+
+       error_code = _bt_get_error_code(bluetooth_map_set_folder(session, name));
+
+       if (error_code != BT_ERROR_NONE) {
+               BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(error_code),
+                               error_code);
+       }
+       return error_code;
 }
 
 int bt_map_client_update_inbox(bt_map_session_info_h handle)