Add the internal API for HF remote call event 75/103275/1
authorDoHyun Pyun <dh79.pyun@samsung.com>
Thu, 8 Dec 2016 01:56:06 +0000 (10:56 +0900)
committerDoHyun Pyun <dh79.pyun@samsung.com>
Thu, 8 Dec 2016 01:56:06 +0000 (10:56 +0900)
Change-Id: I347ade09e27166eed26a2f1a1afe6194bf3a35ad
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
include/bluetooth_private.h
include/wearable/bluetooth_internal.h
include/wearable/bluetooth_type_internal.h

index 9de7dde47ac7f383bb0c38f2923ac7f1c6bf8e98..c3b59e9d4242602cbac9bde6d6f0f5e60481b656 100644 (file)
@@ -693,27 +693,6 @@ typedef enum {
        BT_HF_REMOTE_DEVICE_STATE_VOICE_RECOGNITON,  /**< Voice Recognition State (0:disabled , 1:enabled) */
 } bt_hf_remote_device_state_e;
 
-/**
- * @ingroup CAPI_NETWORK_BLUETOOTH_AUDIO_HF_MODULE
- * @brief  Enumerations for the call event from Audio-Gateway device
- * @since_tizen 3.0
- */
-typedef enum {
-       BT_HF_REMOTE_CALL_EVENT_IDLE = 0x00,  /**< Idle. Neither setup call nor active call exist */
-       BT_HF_REMOTE_CALL_EVENT_INCOMING,  /**< (Call-setup event) Received an incoming call on AG */
-       BT_HF_REMOTE_CALL_EVENT_DIALING,  /**< (Call-setup event) Dialing an outgoing call on AG */
-       BT_HF_REMOTE_CALL_EVENT_ALERTING,  /**< (Call-setup event) Remote party being alerted in an outgoing call of AG */
-       BT_HF_REMOTE_CALL_EVENT_CALL_TERMINATED,  /**< (Call-setup event) Setup call is terminated without activating */
-       BT_HF_REMOTE_CALL_EVENT_CALL_STARTED,  /**< (Active call state event) Call is started on AG */
-       BT_HF_REMOTE_CALL_EVENT_CALL_ENDED,  /**< (Active call state event) Active call is terminated on AG */
-       BT_HF_REMOTE_CALL_EVENT_UNHELD,  /**< (Call held event) No calls on hold */
-       BT_HF_REMOTE_CALL_EVENT_SWAPPED,  /**< (Call held event) Call is placed on hold or active/held calls swapped */
-       BT_HF_REMOTE_CALL_EVENT_HELD,  /**< (Call held event) Calls on hold, no active call */
-       BT_HF_REMOTE_CALL_EVENT_RINGING,  /**< Incoming call is ringing event with number. This event is optional event. */
-       BT_HF_REMOTE_CALL_EVENT_WAITING,  /**< Call Waiting notification in 3-way call scenario */
-       BT_HF_REMOTE_CALL_EVENT_FAILED_TO_DIALING,  /**< Failed to dialing a outgoing call on AG */
-} bt_hf_remote_call_event_e;
-
 /**
  * @ingroup CAPI_NETWORK_BLUETOOTH_AUDIO_HF_MODULE
  * @brief  Called when a device status changed event happend from Audio-Gateway device
@@ -728,20 +707,6 @@ typedef enum {
  */
 typedef void (*bt_hf_remote_device_state_changed_cb) (bt_hf_remote_device_state_e state, int value, void *user_data);
 
-
-/**
- * @ingroup CAPI_NETWORK_BLUETOOTH_AUDIO_HF_MODULE
- * @brief  Called  when a call event happend from Audio-Gateway device
- * @since_tizen 3.0
- *
- * @param[in] event The call state chagned event from remote Audio-Gateway device
- * @param[in] user_data The user data passed from the callback registration function
- *
- * @see bt_hf_set_remote_call_event_cb()
- * @see bt_hf_unset_remote_call_event_cb()
- */
-typedef void (*bt_hf_remote_call_event_cb) (bt_hf_remote_call_event_e event, char *phone_number, void *user_data);
-
 /**
  * @ingroup CAPI_NETWORK_BLUETOOTH_AUDIO_HF_MODULE
  * @brief  Called when a vendor command event happened from Hands-Free.
index b80fb6172b6e3b330cc8035946bad2e543f39535..6c2136ecb949dddf499f1b0927542cc7dc4fea5a 100644 (file)
@@ -2165,6 +2165,39 @@ int bt_hf_set_call_handling_event_cb(bt_hf_call_handling_event_cb callback, void
  */
 int bt_hf_unset_call_handling_event_cb(void);
 
+/**
+ * @ingroup CAPI_NETWORK_BLUETOOTH_AUDIO_HF_MODULE
+ * @brief  Registers a callback function that will be invoked when a call event happend from Audio-Gateway device.
+ * @since_tizen 3.0
+ * @param[in] callback The callback function to register
+ * @param[in] user_data The user data to be passed to the callback function
+ * @return   0 on success, otherwise a negative error value.
+ * @retval #BT_ERROR_NONE  Successful
+ * @retval #BT_ERROR_NOT_INITIALIZED  Not initialized
+ * @retval #BT_ERROR_INVALID_PARAMETER  Invalid parameter
+ * @retval #BT_ERROR_NOT_SUPPORTED  Not supported
+ * @pre The Bluetooth audio service must be initialized with bt_audio_initialize().
+ * @see bt_audio_initialize()
+ * @see bt_hf_remote_call_event_cb()
+ * @see bt_hf_unset_remote_call_event_cb()
+ */
+int bt_hf_set_remote_call_event_cb(bt_hf_remote_call_event_cb callback, void *user_data);
+
+/**
+ * @ingroup CAPI_NETWORK_BLUETOOTH_AUDIO_HF_MODULE
+ * @brief  Unregisters a callback function.
+ * @since_tizen 3.0
+ * @return   0 on success, otherwise a negative error value.
+ * @retval #BT_ERROR_NONE  Successful
+ * @retval #BT_ERROR_NOT_INITIALIZED  Not initialized
+ * @retval #BT_ERROR_NOT_SUPPORTED  Not supported
+ * @pre The Bluetooth audio service must be initialized with bt_audio_initialize().
+ * @see bt_audio_initialize()
+ * @see bt_hf_remote_call_event_cb()
+ * @see bt_hf_set_remote_call_event_cb()
+ */
+int bt_hf_unset_remote_call_event_cb(void);
+
 /**
  * @ingroup CAPI_NETWORK_BLUETOOTH_AUDIO_HF_MODULE
  * @brief  Registers a callback function that will be invoked when a multi call handling event happened from Hands-Free.
index 21e1a2a813bce03d0c6aa4448351ab4d75a9b795..ffbefd5e80274a1d027278c26a881ff9a890bc5b 100644 (file)
@@ -88,6 +88,27 @@ typedef enum {
        BT_AG_CALL_STATE_WAITING,  /**< Waiting for connected indication event after answering an incoming call*/
 } bt_ag_call_state_e;
 
+/**
+ * @ingroup CAPI_NETWORK_BLUETOOTH_AUDIO_HF_MODULE
+ * @brief  Enumerations for the call event from Audio-Gateway device
+ * @since_tizen 3.0
+ */
+typedef enum {
+       BT_HF_REMOTE_CALL_EVENT_IDLE = 0x00,  /**< Idle. Neither setup call nor active call exist */
+       BT_HF_REMOTE_CALL_EVENT_INCOMING,  /**< (Call-setup event) Received an incoming call on AG */
+       BT_HF_REMOTE_CALL_EVENT_DIALING,  /**< (Call-setup event) Dialing an outgoing call on AG */
+       BT_HF_REMOTE_CALL_EVENT_ALERTING,  /**< (Call-setup event) Remote party being alerted in an outgoing call of AG */
+       BT_HF_REMOTE_CALL_EVENT_CALL_TERMINATED,  /**< (Call-setup event) Setup call is terminated without activating */
+       BT_HF_REMOTE_CALL_EVENT_CALL_STARTED,  /**< (Active call state event) Call is started on AG */
+       BT_HF_REMOTE_CALL_EVENT_CALL_ENDED,  /**< (Active call state event) Active call is terminated on AG */
+       BT_HF_REMOTE_CALL_EVENT_UNHELD,  /**< (Call held event) No calls on hold */
+       BT_HF_REMOTE_CALL_EVENT_SWAPPED,  /**< (Call held event) Call is placed on hold or active/held calls swapped */
+       BT_HF_REMOTE_CALL_EVENT_HELD,  /**< (Call held event) Calls on hold, no active call */
+       BT_HF_REMOTE_CALL_EVENT_RINGING,  /**< Incoming call is ringing event with number. This event is optional event. */
+       BT_HF_REMOTE_CALL_EVENT_WAITING,  /**< Call Waiting notification in 3-way call scenario */
+       BT_HF_REMOTE_CALL_EVENT_FAILED_TO_DIALING,  /**< Failed to dialing a outgoing call on AG */
+} bt_hf_remote_call_event_e;
+
 /**
  * @ingroup CAPI_NETWORK_BLUETOOTH_OPP_MODULE
  * @brief  Enumerations for the transfer type
@@ -741,6 +762,19 @@ typedef struct {
        char *message; /**< Command message */
 } bt_hf_vendor_dep_at_cmd_s;
 
+/**
+ * @ingroup CAPI_NETWORK_BLUETOOTH_AUDIO_HF_MODULE
+ * @brief  Called  when a call event happend from Audio-Gateway device
+ * @since_tizen 3.0
+ *
+ * @param[in] event The call state chagned event from remote Audio-Gateway device
+ * @param[in] user_data The user data passed from the callback registration function
+ *
+ * @see bt_hf_set_remote_call_event_cb()
+ * @see bt_hf_unset_remote_call_event_cb()
+ */
+typedef void (*bt_hf_remote_call_event_cb) (bt_hf_remote_call_event_e event, char *phone_number, void *user_data);
+
 /**
  * @ingroup CAPI_NETWORK_BLUETOOTH_AUDIO_AG_MODULE
  * @brief  Called when a XSAT vendor command is transmitted from Hands-Free.