Add gatt service changed callback APIs 90/87190/5
authorDoHyun Pyun <dh79.pyun@samsung.com>
Wed, 7 Sep 2016 01:34:43 +0000 (10:34 +0900)
committerPyun DoHyun <dh79.pyun@samsung.com>
Mon, 12 Sep 2016 10:12:12 +0000 (03:12 -0700)
Change-Id: I455f1e8015e1a09d57248db1be450344a012a5ca
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
include/bluetooth_private.h
include/mobile/bluetooth.h
include/mobile/bluetooth_type.h
include/tv/bluetooth.h
include/tv/bluetooth_type.h
include/wearable/bluetooth.h
include/wearable/bluetooth_type.h

index c774406c00702b87287ed961b507bcea9d18a855..87981db694537b1a080c1f9a41455515f0a086df 100644 (file)
@@ -262,15 +262,6 @@ int bt_adapter_set_passkey_notification(bt_adapter_passkey_notification_cb callb
  */
 int bt_adapter_unset_passkey_notification(void);
 
-typedef enum {
-       BT_GATT_CLIENT_SERVICE_ADDED,
-       BT_GATT_CLIENT_SERVICE_REMOVED,
-} bt_gatt_client_service_change_type_e;
-
-typedef void (*bt_gatt_client_service_changed_cb) (bt_gatt_client_h client,
-               bt_gatt_client_service_change_type_e change_type,
-               const char* service_uuid, void *user_data);
-
 /**
  * @ingroup CAPI_NETWORK_BLUETOOTH_DEVICE_MODULE
  * @brief  Enumerations of the Bluetooth device's LE connection mode.
@@ -1028,39 +1019,6 @@ int bt_passkey_reply(char *passkey, bool authentication_reply);
  */
 int bt_passkey_confirmation_reply(bool confirmation_reply);
 
-/**
- * @ingroup CAPI_NETWORK_BLUETOOTH_GATT_MODULE
- * @brief  Registers a callback function to be invoked when service is changed from a remote device(GATT server).
- * @since_tizen 3.0
- *
- * @param[in] client The GATT client's handle
- * @param[in] callback The callback to be invoked
- * @param[in] user_data The user data to be passed to @a callback function
- * @return  0 on success, otherwise a negative error value
- * @retval #BT_ERROR_NONE Successful
- * @retval #BT_ERROR_INVALID_PARAMETER  Invalid parameter
- * @retval #BT_ERROR_NOT_SUPPORTED  Not supported
- *
- * @see bt_gatt_client_unset_service_changed_cb()
- */
-int bt_gatt_client_set_service_changed_cb(bt_gatt_client_h client,
-               bt_gatt_client_service_changed_cb callback, void *user_data);
-
-/**
- * @ingroup CAPI_NETWORK_BLUETOOTH_GATT_MODULE
- * @brief  Unregisters a callback function
- * @since_tizen 3.0
- *
- * @param[in] client The GATT client's handle
- * @return  0 on success, otherwise a negative error value
- * @retval #BT_ERROR_NONE Successful
- * @retval #BT_ERROR_INVALID_PARAMETER  Invalid parameter
- * @retval #BT_ERROR_NOT_SUPPORTED  Not supported
- *
- * @see bt_gatt_client_unset_service_changed_cb()
- */
-int bt_gatt_client_unset_service_changed_cb(bt_gatt_client_h client);
-
 /**
  * @ingroup CAPI_NETWORK_BLUETOOTH_HID_MODULE
  * @brief Sends the custom event data.
index a712b3eacdd3c74c927a75824c372b9354f22db7..2d10b81d16f45f657db449c9db42639c4a2fadd6 100644 (file)
@@ -4507,6 +4507,39 @@ int bt_gatt_client_get_service(bt_gatt_client_h client, const char *uuid,
 int bt_gatt_client_foreach_services(bt_gatt_client_h client,
                                    bt_gatt_foreach_cb callback, void *user_data);
 
+/**
+ * @ingroup CAPI_NETWORK_BLUETOOTH_GATT_MODULE
+ * @brief  Registers a callback function to be invoked when service is changed from a remote device(GATT server).
+ * @since_tizen 3.0
+ *
+ * @param[in] client The GATT client's handle
+ * @param[in] callback The callback to be invoked
+ * @param[in] user_data The user data to be passed to @a callback function
+ * @return  0 on success, otherwise a negative error value
+ * @retval #BT_ERROR_NONE Successful
+ * @retval #BT_ERROR_INVALID_PARAMETER  Invalid parameter
+ * @retval #BT_ERROR_NOT_SUPPORTED  Not supported
+ *
+ * @see bt_gatt_client_unset_service_changed_cb()
+ */
+int bt_gatt_client_set_service_changed_cb(bt_gatt_client_h client,
+               bt_gatt_client_service_changed_cb callback, void *user_data);
+
+/**
+ * @ingroup CAPI_NETWORK_BLUETOOTH_GATT_MODULE
+ * @brief  Unregisters a callback function
+ * @since_tizen 3.0
+ *
+ * @param[in] client The GATT client's handle
+ * @return  0 on success, otherwise a negative error value
+ * @retval #BT_ERROR_NONE Successful
+ * @retval #BT_ERROR_INVALID_PARAMETER  Invalid parameter
+ * @retval #BT_ERROR_NOT_SUPPORTED  Not supported
+ *
+ * @see bt_gatt_client_set_service_changed_cb()
+ */
+int bt_gatt_client_unset_service_changed_cb(bt_gatt_client_h client);
+
 /**
  * @ingroup CAPI_NETWORK_BLUETOOTH_GATT_MODULE
  * @brief Connect to a specific LE based service on a remote bluetooth device address, asynchronously.
index a167214d46671226ccd2750c6573dfa6b7841e69..6318f988710a438aa9c943b718e9bb5a9ff2afff 100644 (file)
@@ -696,6 +696,16 @@ typedef enum {
        BT_GATT_PROPERTY_EXTENDED_PROPERTIES = 0x80,  /**< Extended properties */
 } bt_gatt_property_e;
 
+/**
+ * @ingroup CAPI_NETWORK_BLUETOOTH_GATT_MODULE
+ * @brief  Enumerations of gatt server's service changing mode.
+ * @since_tizen 3.0
+ */
+typedef enum {
+       BT_GATT_CLIENT_SERVICE_ADDED,   /**< Service added */
+       BT_GATT_CLIENT_SERVICE_REMOVED, /**< Service removed */
+} bt_gatt_client_service_change_type_e;
+
 /**
  * @ingroup CAPI_NETWORK_BLUETOOTH_GATT_SERVER_MODULE
  * @brief  Enumerations of the attribute's permission.
@@ -1716,6 +1726,22 @@ typedef void (*bt_gatt_client_request_completed_cb) (int result,
 typedef void (*bt_gatt_client_characteristic_value_changed_cb) (bt_gatt_h characteristic,
                char *value, int len, void *user_data);
 
+/**
+ * @ingroup CAPI_NETWORK_BLUETOOTH_GATT_MODULE
+ * @brief  Called when a service of a remote GATT server has been changed.
+ * @since_tizen 3.0
+ *
+ * @param[in] client The handle of a GATT client which is associated with a remote device.
+ * @param[in] change_type The changed type
+ * @param[in] service_uuid The changed service uuid
+ * @param[in] user_data The user data passed from the registering function
+ *
+ * @see bt_gatt_client_set_characteristic_value_changed_cb()
+ */
+typedef void (*bt_gatt_client_service_changed_cb) (bt_gatt_client_h client,
+               bt_gatt_client_service_change_type_e change_type,
+               const char* service_uuid, void *user_data);
+
 /**
  * @ingroup CAPI_NETWORK_BLUETOOTH_GATT_MODULE
  * @brief Called when the connection state is changed.
index 31eab351d352246625042ee94d7c2412f5467a29..ef9bce715af340d566ddd4bbbddb5fc6ad3745cb 100644 (file)
@@ -4510,6 +4510,39 @@ int bt_gatt_client_get_service(bt_gatt_client_h client, const char *uuid,
 int bt_gatt_client_foreach_services(bt_gatt_client_h client,
                                    bt_gatt_foreach_cb callback, void *user_data);
 
+/**
+ * @ingroup CAPI_NETWORK_BLUETOOTH_GATT_MODULE
+ * @brief  Registers a callback function to be invoked when service is changed from a remote device(GATT server).
+ * @since_tizen 3.0
+ *
+ * @param[in] client The GATT client's handle
+ * @param[in] callback The callback to be invoked
+ * @param[in] user_data The user data to be passed to @a callback function
+ * @return  0 on success, otherwise a negative error value
+ * @retval #BT_ERROR_NONE Successful
+ * @retval #BT_ERROR_INVALID_PARAMETER  Invalid parameter
+ * @retval #BT_ERROR_NOT_SUPPORTED  Not supported
+ *
+ * @see bt_gatt_client_unset_service_changed_cb()
+ */
+int bt_gatt_client_set_service_changed_cb(bt_gatt_client_h client,
+               bt_gatt_client_service_changed_cb callback, void *user_data);
+
+/**
+ * @ingroup CAPI_NETWORK_BLUETOOTH_GATT_MODULE
+ * @brief  Unregisters a callback function
+ * @since_tizen 3.0
+ *
+ * @param[in] client The GATT client's handle
+ * @return  0 on success, otherwise a negative error value
+ * @retval #BT_ERROR_NONE Successful
+ * @retval #BT_ERROR_INVALID_PARAMETER  Invalid parameter
+ * @retval #BT_ERROR_NOT_SUPPORTED  Not supported
+ *
+ * @see bt_gatt_client_set_service_changed_cb()
+ */
+int bt_gatt_client_unset_service_changed_cb(bt_gatt_client_h client);
+
 /**
  * @ingroup CAPI_NETWORK_BLUETOOTH_GATT_MODULE
  * @brief Connect to a specific LE based service on a remote bluetooth device address, asynchronously.
index b5b1fde699513a9389d07f4b57de13d6ec4279d0..e49833898597b1ee6348070a7542c773a80f7335 100644 (file)
@@ -696,6 +696,16 @@ typedef enum {
        BT_GATT_PROPERTY_EXTENDED_PROPERTIES = 0x80,  /**< Extended properties */
 } bt_gatt_property_e;
 
+/**
+ * @ingroup CAPI_NETWORK_BLUETOOTH_GATT_MODULE
+ * @brief  Enumerations of gatt server's service changing mode.
+ * @since_tizen 3.0
+ */
+typedef enum {
+       BT_GATT_CLIENT_SERVICE_ADDED,   /**< Service added */
+       BT_GATT_CLIENT_SERVICE_REMOVED, /**< Service removed */
+} bt_gatt_client_service_change_type_e;
+
 /**
  * @ingroup CAPI_NETWORK_BLUETOOTH_GATT_SERVER_MODULE
  * @brief  Enumerations of the attribute's permission.
@@ -1716,6 +1726,23 @@ typedef void (*bt_gatt_client_request_completed_cb) (int result,
 typedef void (*bt_gatt_client_characteristic_value_changed_cb) (bt_gatt_h characteristic,
                char *value, int len, void *user_data);
 
+
+/**
+ * @ingroup CAPI_NETWORK_BLUETOOTH_GATT_MODULE
+ * @brief  Called when a service of a remote GATT server has been changed.
+ * @since_tizen 3.0
+ *
+ * @param[in] client The handle of a GATT client which is associated with a remote device.
+ * @param[in] change_type The changed type
+ * @param[in] service_uuid The changed service uuid
+ * @param[in] user_data The user data passed from the registering function
+ *
+ * @see bt_gatt_client_set_characteristic_value_changed_cb()
+ */
+typedef void (*bt_gatt_client_service_changed_cb) (bt_gatt_client_h client,
+               bt_gatt_client_service_change_type_e change_type,
+               const char* service_uuid, void *user_data);
+
 /**
  * @ingroup CAPI_NETWORK_BLUETOOTH_GATT_MODULE
  * @brief Called when the connection state is changed.
index c4bd7662259435b2bd94ef6b0b638d0a76d07d92..2c5efc6c6583ba32ff4d2eaa54348ce0cb176c42 100644 (file)
@@ -4160,6 +4160,39 @@ int bt_gatt_client_get_service(bt_gatt_client_h client, const char *uuid,
 int bt_gatt_client_foreach_services(bt_gatt_client_h client,
                                    bt_gatt_foreach_cb callback, void *user_data);
 
+/**
+ * @ingroup CAPI_NETWORK_BLUETOOTH_GATT_MODULE
+ * @brief  Registers a callback function to be invoked when service is changed from a remote device(GATT server).
+ * @since_tizen 3.0
+ *
+ * @param[in] client The GATT client's handle
+ * @param[in] callback The callback to be invoked
+ * @param[in] user_data The user data to be passed to @a callback function
+ * @return  0 on success, otherwise a negative error value
+ * @retval #BT_ERROR_NONE Successful
+ * @retval #BT_ERROR_INVALID_PARAMETER  Invalid parameter
+ * @retval #BT_ERROR_NOT_SUPPORTED  Not supported
+ *
+ * @see bt_gatt_client_unset_service_changed_cb()
+ */
+int bt_gatt_client_set_service_changed_cb(bt_gatt_client_h client,
+               bt_gatt_client_service_changed_cb callback, void *user_data);
+
+/**
+ * @ingroup CAPI_NETWORK_BLUETOOTH_GATT_MODULE
+ * @brief  Unregisters a callback function
+ * @since_tizen 3.0
+ *
+ * @param[in] client The GATT client's handle
+ * @return  0 on success, otherwise a negative error value
+ * @retval #BT_ERROR_NONE Successful
+ * @retval #BT_ERROR_INVALID_PARAMETER  Invalid parameter
+ * @retval #BT_ERROR_NOT_SUPPORTED  Not supported
+ *
+ * @see bt_gatt_client_set_service_changed_cb()
+ */
+int bt_gatt_client_unset_service_changed_cb(bt_gatt_client_h client);
+
 /**
  * @ingroup CAPI_NETWORK_BLUETOOTH_GATT_MODULE
  * @brief Connect to a specific LE based service on a remote bluetooth device address, asynchronously.
index 10a6767176c6bfb860a4fc6ded079146a8c0760c..37c47e77ccae19e6126064ba962514f96d3e0713 100644 (file)
@@ -695,6 +695,16 @@ typedef enum {
        BT_GATT_PROPERTY_EXTENDED_PROPERTIES = 0x80,  /**< Extended properties */
 } bt_gatt_property_e;
 
+/**
+ * @ingroup CAPI_NETWORK_BLUETOOTH_GATT_MODULE
+ * @brief  Enumerations of gatt server's service changing mode.
+ * @since_tizen 3.0
+ */
+typedef enum {
+       BT_GATT_CLIENT_SERVICE_ADDED,   /**< Service added */
+       BT_GATT_CLIENT_SERVICE_REMOVED, /**< Service removed */
+} bt_gatt_client_service_change_type_e;
+
 /**
  * @ingroup CAPI_NETWORK_BLUETOOTH_GATT_SERVER_MODULE
  * @brief  Enumerations of the attribute's permission.
@@ -1591,6 +1601,23 @@ typedef void (*bt_gatt_client_request_completed_cb) (int result,
 typedef void (*bt_gatt_client_characteristic_value_changed_cb) (bt_gatt_h characteristic,
                char *value, int len, void *user_data);
 
+
+/**
+ * @ingroup CAPI_NETWORK_BLUETOOTH_GATT_MODULE
+ * @brief  Called when a service of a remote GATT server has been changed.
+ * @since_tizen 3.0
+ *
+ * @param[in] client The handle of a GATT client which is associated with a remote device.
+ * @param[in] change_type The changed type
+ * @param[in] service_uuid The changed service uuid
+ * @param[in] user_data The user data passed from the registering function
+ *
+ * @see bt_gatt_client_set_characteristic_value_changed_cb()
+ */
+typedef void (*bt_gatt_client_service_changed_cb) (bt_gatt_client_h client,
+               bt_gatt_client_service_change_type_e change_type,
+               const char* service_uuid, void *user_data);
+
 /**
  * @ingroup CAPI_NETWORK_BLUETOOTH_GATT_MODULE
  * @brief Called when the connection state is changed.