Fix the incorrect Tx / Rx data size issue
[platform/core/connectivity/bluetooth-frwk.git] / include / bluetooth-api.h
index 02e9f5d..a1335c1 100644 (file)
@@ -327,18 +327,22 @@ typedef struct {
  */
 
 typedef struct {
-        time_t session_start_time;
-        time_t session_end_time;
-        uint16_t session_connected_time;
-        uint16_t session_scan_time;
-        GSList *atm_list;
+       time_t session_start_time;
+       time_t session_end_time;
+       uint32_t tx_time;
+       uint32_t rx_time;
+       uint32_t idle_time;
+       uint32_t session_connected_time;
+       uint32_t session_scan_time;
+       GSList *atm_list;
 } bt_battery_data;
 
 typedef struct {
        uid_t uid;
        pid_t pid;
-       uint16_t rx_bytes;
-       uint16_t tx_bytes;
+       uint32_t rx_bytes;
+       uint32_t tx_bytes;
+       uint time;
 } bt_battery_app_data;
 
 /**
@@ -718,6 +722,7 @@ typedef enum {
 
        BLUETOOTH_EVENT_ENABLED,                    /**< Bluetooth event adpater enabled */
        BLUETOOTH_EVENT_DISABLED,                   /**< Bluetooth event adpater disabled */
+       BLUETOOTH_EVENT_DISABLED_BATTERY_DATA,      /**< Bluetooth event adapter disabled battery data*/
        BLUETOOTH_EVENT_LE_ENABLED,                 /**< Bluetooth event adpater enabled */
        BLUETOOTH_EVENT_LE_DISABLED,                /**< Bluetooth event adpater disabled */
        BLUETOOTH_EVENT_LOCAL_NAME_CHANGED,         /**< Bluetooth event local name changed*/
@@ -866,6 +871,8 @@ typedef enum {
        BLUETOOTH_EVENT_AVRCP_SETTING_REPEAT_STATUS, /**<AVRCP service player repeat status event*/
        BLUETOOTH_EVENT_AVRCP_SETTING_SCAN_STATUS, /**<AVRCP service player scan status event*/
        BLUETOOTH_EVENT_AVRCP_DELAY_CHANGED, /**<AVRCP service transport delay changed event*/
+       BLUETOOTH_EVENT_AVRCP_VOLUME_CHANGED, /**<AVRCP service transport volume changed event*/
+       BLUETOOTH_EVENT_AUDIO_AVC_STATUS, /**<Absolute Volume Control status changed event*/
        BLUETOOTH_EVENT_HF_CONNECTED,
        BLUETOOTH_EVENT_HF_DISCONNECTED,
        BLUETOOTH_EVENT_HF_AUDIO_CONNECTED,
@@ -889,6 +896,7 @@ typedef enum {
        BLUETOOTH_EVENT_HF_CALLSETUP_DIALING,
        BLUETOOTH_EVENT_HF_CALLSETUP_ALERTING,
        BLUETOOTH_EVENT_HF_CIEV_DEVICE_STATUS_CHANGED,
+       BLUETOOTH_EVENT_AUDIO_AVC_MODE_CHANGED,
 
        BLUETOOTH_HID_CONNECTED = BLUETOOTH_EVENT_HID_BASE, /**< Input connectd event*/
        BLUETOOTH_HID_DISCONNECTED, /**< Input disconnectd event*/
@@ -1351,6 +1359,7 @@ typedef struct {
        bluetooth_device_address_t device_addr;
        unsigned char addr_type;
        int disc_reason;
+       int rssi;
 } bt_connection_info_t;
 
 /**
@@ -1712,6 +1721,10 @@ typedef struct {
        bluetooth_device_address_t device_addr;
        char *svc_path;
        bluetooth_gatt_service_change_type_t change_type;
+#ifdef TIZEN_GATT_CLIENT
+       int inst_id;
+       char *uuid;
+#endif
 } bt_gatt_service_change_t;
 
 /**
@@ -2409,8 +2422,8 @@ ret = bluetooth_disable_adapter();
  */
 int bluetooth_disable_adapter(void);
 int bluetooth_read_battery_data(bt_battery_data *latest);
-void bluetooth_set_battery_monitor_state(bool state);
-bool bluetooth_get_battery_monitor_state(void);
+int bluetooth_set_battery_monitor_state(bool state);
+int bluetooth_get_battery_monitor_state(void);
 int bluetooth_recover_adapter(void);
 int bluetooth_check_adapter_le(void);
 int bluetooth_enable_adapter_le(void);
@@ -3262,7 +3275,7 @@ is_le_scanning = bluetooth_is_le_scanning ();
  */
 gboolean bluetooth_is_le_scanning(void);
 
-gboolean bluetooth_is_scan_filter_supported(void);
+int  bluetooth_is_scan_filter_supported(gboolean *is_supported);
 
 /**
  * @fn int bluetooth_force_hcidump(int timeout)
@@ -3284,7 +3297,7 @@ gboolean bluetooth_is_scan_filter_supported(void);
 int bluetooth_force_hcidump(int timeout);
 
 /**
- * @fn int bluetooth_register_scan_filter(bluetooth_le_scan_filter_t *filter, int *slot_id)
+ * @fn int bluetooth_register_scan_filter(bluetooth_le_scan_filter_t *filter)
  * @brief Register scan filter.
  *
  * This function registers the scan filter.
@@ -3294,41 +3307,10 @@ int bluetooth_force_hcidump(int timeout);
  * @return     BLUETOOTH_ERROR_NONE - Success \n
  *
  * @param[in]   filter   scan filter to register
- * @param[out]  slot_id  the slot ID of scan filter
- *
- * @remark      None
- */
-int bluetooth_register_scan_filter(bluetooth_le_scan_filter_t *filter, int *slot_id);
-
-/**
- * @fn int bluetooth_unregister_scan_filter(int slot_id)
- * @brief Register scan filter.
- *
- * This function unregisters the scan filter.
- *
- * This function is a synchronous call.
- *
- * @return     BLUETOOTH_ERROR_NONE - Success \n
- *
- * @param[in]   slot_id  the slot ID of scan filter
  *
  * @remark      None
  */
-int bluetooth_unregister_scan_filter(int slot_id);
-
-/**
- * @fn int bluetooth_unregister_all_scan_filters(void)
- * @brief Register scan filter.
- *
- * This function usregisters all scan filters.
- *
- * This function is a synchronous call.
- *
- * @return     BLUETOOTH_ERROR_NONE - Success \n
- *
- * @remark      None
- */
-int bluetooth_unregister_all_scan_filters(void);
+int bluetooth_register_scan_filter(bluetooth_le_scan_filter_t *filter);
 
 /**
  * @fn int bluetooth_enable_rssi(const bluetooth_device_address_t *remote_address,
@@ -5708,6 +5690,15 @@ int bluetooth_disconnect_le(const bluetooth_device_address_t *device_address,
 int bluetooth_disconnect_le(const bluetooth_device_address_t *device_address);
 #endif
 
+int bluetooth_get_gatt_data_batching_available_packets(
+       int *available_packets);
+
+int bluetooth_enable_gatt_data_batching(
+       const bluetooth_device_address_t *device_address, int packet_threshold, int timeout);
+
+int bluetooth_disable_gatt_data_batching(
+       const bluetooth_device_address_t *device_address);
+
  /**
  * @fn int bluetooth_gatt_discover_characteristic_descriptor(const char *characteristic_handle);
  *