resolved the code rule warnings
[platform/core/connectivity/bluetooth-frwk.git] / bt-oal / hardware / bluetooth.h
index 40cd968..2d3c4fa 100644 (file)
@@ -53,111 +53,108 @@ __BEGIN_DECLS
 
 /** Bluetooth Address */
 typedef struct {
-    uint8_t address[6];
+       uint8_t address[6];
 } __attribute__((packed))bt_bdaddr_t;
 
 /** Bluetooth Device Name */
 typedef struct {
-    uint8_t name[249];
+       uint8_t name[249];
 } __attribute__((packed))bt_bdname_t;
 
 /** Bluetooth Adapter Visibility Modes*/
 typedef enum {
-    BT_SCAN_MODE_NONE,
-    BT_SCAN_MODE_CONNECTABLE,
-    BT_SCAN_MODE_CONNECTABLE_DISCOVERABLE
+       BT_SCAN_MODE_NONE,
+       BT_SCAN_MODE_CONNECTABLE,
+       BT_SCAN_MODE_CONNECTABLE_DISCOVERABLE
 } bt_scan_mode_t;
 
 /** Bluetooth Adapter State */
 typedef enum {
-    BT_STATE_OFF,
-    BT_STATE_ON
+       BT_STATE_OFF,
+       BT_STATE_ON
 }   bt_state_t;
 
 /** Bluetooth Error Status */
 /** We need to build on this */
 
 typedef enum {
-    BT_STATUS_SUCCESS,
-    BT_STATUS_FAIL,
-    BT_STATUS_NOT_READY,
-    BT_STATUS_NOMEM,
-    BT_STATUS_BUSY,
-    BT_STATUS_DONE,        /* request already completed */
-    BT_STATUS_UNSUPPORTED,
-    BT_STATUS_PARM_INVALID,
-    BT_STATUS_UNHANDLED,
-    BT_STATUS_AUTH_FAILURE,
-    BT_STATUS_RMT_DEV_DOWN,
-    BT_STATUS_AUTH_REJECTED
+       BT_STATUS_SUCCESS,
+       BT_STATUS_FAIL,
+       BT_STATUS_NOT_READY,
+       BT_STATUS_NOMEM,
+       BT_STATUS_BUSY,
+       BT_STATUS_DONE,        /* request already completed */
+       BT_STATUS_UNSUPPORTED,
+       BT_STATUS_PARM_INVALID,
+       BT_STATUS_UNHANDLED,
+       BT_STATUS_AUTH_FAILURE,
+       BT_STATUS_RMT_DEV_DOWN,
+       BT_STATUS_AUTH_REJECTED
 
 } bt_status_t;
 
 /** Bluetooth PinKey Code */
 typedef struct {
-    uint8_t pin[16];
+       uint8_t pin[16];
 } __attribute__((packed))bt_pin_code_t;
 
 typedef struct {
-    uint8_t status;
-    uint8_t ctrl_state;     /* stack reported state */
-    uint64_t tx_time;       /* in ms */
-    uint64_t rx_time;       /* in ms */
-    uint64_t idle_time;     /* in ms */
-    uint64_t energy_used;   /* a product of mA, V and ms */
+       uint8_t status;
+       uint8_t ctrl_state;     /* stack reported state */
+       uint64_t tx_time;       /* in ms */
+       uint64_t rx_time;       /* in ms */
+       uint64_t idle_time;     /* in ms */
+       uint64_t energy_used;   /* a product of mA, V and ms */
 } __attribute__((packed))bt_activity_energy_info;
 
 /** Bluetooth Adapter Discovery state */
 typedef enum {
-    BT_DISCOVERY_STOPPED,
-    BT_DISCOVERY_STARTED
+       BT_DISCOVERY_STOPPED,
+       BT_DISCOVERY_STARTED
 } bt_discovery_state_t;
 
 /** Bluetooth ACL connection state */
 typedef enum {
-    BT_ACL_STATE_CONNECTED,
-    BT_ACL_STATE_DISCONNECTED
+       BT_ACL_STATE_CONNECTED,
+       BT_ACL_STATE_DISCONNECTED
 } bt_acl_state_t;
 
 /** Remote Device Trusted state */
 typedef enum {
-    BT_DEVICE_TRUSTED,
-    BT_DEVICE_NOT_TRUSTED
+       BT_DEVICE_TRUSTED,
+       BT_DEVICE_NOT_TRUSTED
 } bt_device_trust_state_t;
 
 /** Bluetooth 128-bit UUID */
 typedef struct {
-   uint8_t uu[16];
+       uint8_t uu[16];
 } bt_uuid_t;
 
 /** Bluetooth SDP service record */
-typedef struct
-{
-   bt_uuid_t uuid;
-   uint16_t channel;
-   char name[256]; // what's the maximum length
+typedef struct {
+       bt_uuid_t uuid;
+       uint16_t channel;
+       char name[256]; // what's the maximum length
 } bt_service_record_t;
 
 
 /** Bluetooth Remote Version info */
-typedef struct
-{
-   int version;
-   int sub_ver;
-   int manufacturer;
+typedef struct {
+       int version;
+       int sub_ver;
+       int manufacturer;
 } bt_remote_version_t;
 
-typedef struct
-{
-    uint8_t local_privacy_enabled;
-    uint8_t max_adv_instance;
-    uint8_t rpa_offload_supported;
-    uint8_t max_irk_list_size;
-    uint8_t max_adv_filter_supported;
-    uint8_t scan_result_storage_size_lobyte;
-    uint8_t scan_result_storage_size_hibyte;
-    uint8_t activity_energy_info_supported;
-}bt_local_le_features_t;
+typedef struct {
+       uint8_t local_privacy_enabled;
+       uint8_t max_adv_instance;
+       uint8_t rpa_offload_supported;
+       uint8_t max_irk_list_size;
+       uint8_t max_adv_filter_supported;
+       uint8_t scan_result_storage_size_lobyte;
+       uint8_t scan_result_storage_size_hibyte;
+       uint8_t activity_energy_info_supported;
+} bt_local_le_features_t;
 
 /* Bluetooth Adapter and Remote Device property types */
 typedef enum {
@@ -299,26 +296,26 @@ typedef enum {
        BT_PROPERTY_MODALIAS,
 
        /**
-         * Description - BLE Device manufacturer data length
-         * Access mode - GET
-         * Data type   - uint32_t
-         */
-        BT_PROPERTY_REMOTE_DEVICE_MANUFACTURER_DATA_LEN,
+        * Description - BLE Device manufacturer data length
+        * Access mode - GET
+        * Data type   - uint32_t
+        */
+       BT_PROPERTY_REMOTE_DEVICE_MANUFACTURER_DATA_LEN,
 
-        /**
-         * Description - BLE Device manufacturer data
-         * Access mode - GET
-         * Data type   - Array of character string
-         */
-        BT_PROPERTY_REMOTE_DEVICE_MANUFACTURER_DATA,
+       /**
+        * Description - BLE Device manufacturer data
+        * Access mode - GET
+        * Data type   - Array of character string
+        */
+       BT_PROPERTY_REMOTE_DEVICE_MANUFACTURER_DATA,
 
        /**
-         * Description - Remote BLE advertising data
-         * Access mode - Only received during device found callback.
-         * Data type   - Array of uint8_t of remote BLE adv data.
-         *               (Array size inferred from property length).
-         */
-        BT_PROPERTY_REMOTE_BLE_ADV_DATA,
+        * Description - Remote BLE advertising data
+        * Access mode - Only received during device found callback.
+        * Data type   - Array of uint8_t of remote BLE adv data.
+        *               (Array size inferred from property length).
+        */
+       BT_PROPERTY_REMOTE_BLE_ADV_DATA,
 
        /**
         * Description - Local LE features
@@ -338,68 +335,67 @@ typedef enum {
 } bt_property_type_t;
 
 /** Bluetooth Adapter Property data structure */
-typedef struct
-{
-    bt_property_type_t type;
-    int len;
-    void *val;
+typedef struct {
+       bt_property_type_t type;
+       int len;
+       void *val;
 } bt_property_t;
 
 
 /** Bluetooth Device Type */
 typedef enum {
-    BT_DEVICE_DEVTYPE_BREDR = 0x1,
-    BT_DEVICE_DEVTYPE_BLE,
-    BT_DEVICE_DEVTYPE_DUAL
+       BT_DEVICE_DEVTYPE_BREDR = 0x1,
+       BT_DEVICE_DEVTYPE_BLE,
+       BT_DEVICE_DEVTYPE_DUAL
 } bt_device_type_t;
 /** Bluetooth Bond state */
 typedef enum {
-    BT_BOND_STATE_NONE,
-    BT_BOND_STATE_BONDING,
-    BT_BOND_STATE_BONDED
+       BT_BOND_STATE_NONE,
+       BT_BOND_STATE_BONDING,
+       BT_BOND_STATE_BONDED
 } bt_bond_state_t;
 
 /** Bluetooth SSP Bonding Variant */
 typedef enum {
-    BT_SSP_VARIANT_PASSKEY_CONFIRMATION,
-    BT_SSP_VARIANT_PASSKEY_ENTRY,
-    BT_SSP_VARIANT_CONSENT,
-    BT_SSP_VARIANT_PASSKEY_NOTIFICATION
+       BT_SSP_VARIANT_PASSKEY_CONFIRMATION,
+       BT_SSP_VARIANT_PASSKEY_ENTRY,
+       BT_SSP_VARIANT_CONSENT,
+       BT_SSP_VARIANT_PASSKEY_NOTIFICATION
 } bt_ssp_variant_t;
 
 /** Bluetooth Profile Service IDs */
 typedef enum {
-    BT_RES_SERVICE_ID,              /* Reserved */
-    BT_SPP_SERVICE_ID,              /* Serial port profile. */
-    BT_DUN_SERVICE_ID,              /* Dial-up networking profile. */
-    BT_A2DP_SRC_SERVICE_ID,         /* A2DP Source profile. */
-    BT_LAP_SERVICE_ID,              /* LAN access profile. */
-    BT_HSP_SERVICE_ID,              /* Headset profile. */
-    BT_HFP_SERVICE_ID,              /* Hands-free profile. */
-    BT_OPP_SERVICE_ID,              /* Object push  */
-    BT_FTP_SERVICE_ID,              /* File transfer */
-    BT_AVRCP_CT_SERVICE_ID,         /* AVRC Controller Terminal */
-    BT_ICP_SERVICE_ID,              /* Intercom Terminal */
-    BT_SYNC_SERVICE_ID,             /* Synchronization */
-    BT_BPP_SERVICE_ID,              /* Basic printing profile */
-    BT_BIP_SERVICE_ID,              /* Basic Imaging profile */
-    BT_PANU_SERVICE_ID,             /* PAN User */
-    BT_NAP_SERVICE_ID,              /* PAN Network access point */
-    BT_GN_SERVICE_ID,               /* PAN Group Ad-hoc networks */
-    BT_SAP_SERVICE_ID,              /* SIM Access profile */
-    BT_A2DP_SERVICE_ID,             /* A2DP Sink */
-    BT_AVRCP_SERVICE_ID,            /* A/V remote control */
-    BT_HID_SERVICE_ID,              /* HID */
-    BT_VDP_SERVICE_ID,              /* Video distribution */
-    BT_PBAP_SERVICE_ID,             /* PhoneBook Access Server*/
-    BT_HSP_HS_SERVICE_ID,           /* HFP HS role */
-    BT_HFP_HS_SERVICE_ID,           /* HSP HS role */
-    BT_MAP_SERVICE_ID,              /* Message Access Profile */
-    BT_MN_SERVICE_ID,               /* Message Notification Service */
-    BT_HDP_SERVICE_ID,              /* Health Device Profile */
-    BT_PCE_SERVICE_ID,              /* PhoneBook Access Client*/
+       BT_RES_SERVICE_ID,              /* Reserved */
+       BT_SPP_SERVICE_ID,              /* Serial port profile. */
+       BT_DUN_SERVICE_ID,              /* Dial-up networking profile. */
+       BT_A2DP_SRC_SERVICE_ID,         /* A2DP Source profile. */
+       BT_LAP_SERVICE_ID,              /* LAN access profile. */
+       BT_HSP_SERVICE_ID,              /* Headset profile. */
+       BT_HFP_SERVICE_ID,              /* Hands-free profile. */
+       BT_OPP_SERVICE_ID,              /* Object push  */
+       BT_FTP_SERVICE_ID,              /* File transfer */
+       BT_AVRCP_CT_SERVICE_ID,         /* AVRC Controller Terminal */
+       BT_ICP_SERVICE_ID,              /* Intercom Terminal */
+       BT_SYNC_SERVICE_ID,             /* Synchronization */
+       BT_BPP_SERVICE_ID,              /* Basic printing profile */
+       BT_BIP_SERVICE_ID,              /* Basic Imaging profile */
+       BT_PANU_SERVICE_ID,             /* PAN User */
+       BT_NAP_SERVICE_ID,              /* PAN Network access point */
+       BT_GN_SERVICE_ID,               /* PAN Group Ad-hoc networks */
+       BT_SAP_SERVICE_ID,              /* SIM Access profile */
+       BT_A2DP_SERVICE_ID,             /* A2DP Sink */
+       BT_AVRCP_SERVICE_ID,            /* A/V remote control */
+       BT_HID_SERVICE_ID,              /* HID */
+       BT_VDP_SERVICE_ID,              /* Video distribution */
+       BT_PBAP_SERVICE_ID,             /* PhoneBook Access Server*/
+       BT_HSP_HS_SERVICE_ID,           /* HFP HS role */
+       BT_HFP_HS_SERVICE_ID,           /* HSP HS role */
+       BT_MAP_SERVICE_ID,              /* Message Access Profile */
+       BT_MN_SERVICE_ID,               /* Message Notification Service */
+       BT_HDP_SERVICE_ID,              /* Health Device Profile */
+       BT_PCE_SERVICE_ID,              /* PhoneBook Access Client*/
 #ifdef TIZEN_BT_HAL
-    BT_IOTIVITY_SERVICE_ID,         /* Custom IOTIVITY UUID */
+       BT_IOTIVITY_SERVICE_ID,         /* Custom IOTIVITY UUID */
 #endif
 } bt_service_id_t;
 
@@ -412,9 +408,9 @@ typedef enum {
 
 /* Tizen BT discovery Types */
 typedef enum {
-    BT_DISC_ROLE_BREDR = 0x01,
-    BT_DISC_ROLE_LE,
-    BT_DISC_ROLE_DUAL
+       BT_DISC_ROLE_BREDR = 0x01,
+       BT_DISC_ROLE_LE,
+       BT_DISC_ROLE_DUAL
 } bt_disc_role_type_t;
 
 /** Bluetooth Trusted Profiles */
@@ -429,10 +425,10 @@ typedef enum {
 
 /** Bluetooth Bonding Authentication Notifications */
 typedef enum {
-    BT_PASSKEY_CONFIRMATION = 1,
-    BT_PASSKEY_DISPLAY,
-    BT_PASSKEY_ENTRY,
-    BT_PINCODE_ENTRY,
+       BT_PASSKEY_CONFIRMATION = 1,
+       BT_PASSKEY_DISPLAY,
+       BT_PASSKEY_ENTRY,
+       BT_PINCODE_ENTRY,
 } bt_gap_auth_variant_t;
 #endif
 
@@ -456,30 +452,30 @@ typedef void (*le_state_changed_callback)(bt_state_t state);
  * to manage sessions here.
  */
 typedef void (*adapter_properties_callback)(bt_status_t status,
-                                               int num_properties,
-                                               bt_property_t *properties);
+               int num_properties,
+               bt_property_t *properties);
 
 /** GET/SET Remote Device Properties callback */
 /** TODO: For remote device properties, do not see a need to get/set
  * multiple properties - num_properties shall be 1
  */
 typedef void (*remote_device_properties_callback)(bt_status_t status,
-                                                       bt_bdaddr_t *bd_addr,
-                                                       int num_properties,
-                                                       bt_property_t *properties);
+               bt_bdaddr_t *bd_addr,
+               int num_properties,
+               bt_property_t *properties);
 
 /** New device discovered callback */
 /** If EIR data is not present, then BD_NAME and RSSI shall be NULL and -1
  * respectively */
 typedef void (*device_found_callback)(int num_properties,
-                                         bt_property_t *properties);
+               bt_property_t *properties);
 
 /** Discovery state changed callback */
 typedef void (*discovery_state_changed_callback)(bt_discovery_state_t state);
 
 /** Bluetooth Legacy PinKey Request callback */
 typedef void (*pin_request_callback)(bt_bdaddr_t *remote_bd_addr,
-                                        bt_bdname_t *bd_name, uint32_t cod);
+               bt_bdname_t *bd_name, uint32_t cod);
 
 /** Bluetooth SSP Request callback - Just Works & Numeric Comparison*/
 /** pass_key - Shall be 0 for BT_SSP_PAIRING_VARIANT_CONSENT &
@@ -487,24 +483,24 @@ typedef void (*pin_request_callback)(bt_bdaddr_t *remote_bd_addr,
 /* TODO: Passkey request callback shall not be needed for devices with display
  * capability. We still need support this in the stack for completeness */
 typedef void (*ssp_request_callback)(bt_bdaddr_t *remote_bd_addr,
-                                        bt_bdname_t *bd_name,
-                                        uint32_t cod,
-                                        bt_ssp_variant_t pairing_variant,
-                                     uint32_t pass_key);
+               bt_bdname_t *bd_name,
+               uint32_t cod,
+               bt_ssp_variant_t pairing_variant,
+               uint32_t pass_key);
 
 /** Bluetooth Bond state changed callback */
 /* Invoked in response to create_bond, cancel_bond or remove_bond */
 typedef void (*bond_state_changed_callback)(bt_status_t status,
-                                               bt_bdaddr_t *remote_bd_addr,
-                                               bt_bond_state_t state);
+               bt_bdaddr_t *remote_bd_addr,
+               bt_bond_state_t state);
 
 /** Bluetooth ACL connection state changed callback */
 typedef void (*acl_state_changed_callback)(bt_status_t status, bt_bdaddr_t *remote_bd_addr,
-                                            bt_acl_state_t state);
+               bt_acl_state_t state);
 
 typedef enum {
-    ASSOCIATE_JVM,
-    DISASSOCIATE_JVM
+       ASSOCIATE_JVM,
+       DISASSOCIATE_JVM
 } bt_cb_thread_evt;
 
 /** Thread Associate/Disassociate JVM Callback */
@@ -517,8 +513,8 @@ typedef void (*callback_thread_event)(bt_cb_thread_evt evt);
 typedef void (*dut_mode_recv_callback)(uint16_t opcode, uint8_t *buf, uint8_t len);
 
 /* LE Test mode callbacks
-* This callback shall be invoked whenever the le_tx_test, le_rx_test or le_test_end is invoked
-* The num_packets is valid only for le_test_end command */
+ * This callback shall be invoked whenever the le_tx_test, le_rx_test or le_test_end is invoked
+ * The num_packets is valid only for le_test_end command */
 typedef void (*le_test_mode_callback)(bt_status_t status, uint16_t num_packets);
 
 /** Callback invoked when energy details are obtained */
@@ -538,8 +534,8 @@ typedef void (*sock_authorize_request_callback) (bt_bdaddr_t *remote_bd_addr, bt
 
 /** Bluetooth ACL connection state */
 typedef enum {
-    BT_LE_CONN_STATE_CONNECTED,
-    BT_LE_CONN_STATE_DISCONNECTED
+       BT_LE_CONN_STATE_CONNECTED,
+       BT_LE_CONN_STATE_DISCONNECTED
 } bt_le_conn_state_t;
 
 /** Bluetooth ACL connection state changed callback */
@@ -560,33 +556,33 @@ typedef void (*raw_rssi_received_callback)(bt_bdaddr_t *bd_addr, int32_t link_ty
 #endif
 
 /** TODO: Add callbacks for Link Up/Down and other generic
 *  notifications/callbacks */
+ *  notifications/callbacks */
 
 /** Remote Device Trust state changed callback */
 typedef void (*device_trust_state_changed_callback)(bt_bdaddr_t *remote_bd_addr,
-                                            bt_device_trust_state_t trust);
+               bt_device_trust_state_t trust);
 
 /** Bluetooth DM callback structure. */
 typedef struct {
-    /** set to sizeof(bt_callbacks_t) */
-    size_t size;
-    adapter_state_changed_callback adapter_state_changed_cb;
-    adapter_properties_callback adapter_properties_cb;
-    remote_device_properties_callback remote_device_properties_cb;
-    device_found_callback device_found_cb;
-    discovery_state_changed_callback discovery_state_changed_cb;
-    pin_request_callback pin_request_cb;
-    ssp_request_callback ssp_request_cb;
-    bond_state_changed_callback bond_state_changed_cb;
-    acl_state_changed_callback acl_state_changed_cb;
-    callback_thread_event thread_evt_cb;
-    dut_mode_recv_callback dut_mode_recv_cb;
-    le_test_mode_callback le_test_mode_cb;
-    energy_info_callback energy_info_cb;
-    authorize_request_callback authorize_request_cb;
-    device_trust_state_changed_callback device_trust_state_changed_cb;
+       /** set to sizeof(bt_callbacks_t) */
+       size_t size;
+       adapter_state_changed_callback adapter_state_changed_cb;
+       adapter_properties_callback adapter_properties_cb;
+       remote_device_properties_callback remote_device_properties_cb;
+       device_found_callback device_found_cb;
+       discovery_state_changed_callback discovery_state_changed_cb;
+       pin_request_callback pin_request_cb;
+       ssp_request_callback ssp_request_cb;
+       bond_state_changed_callback bond_state_changed_cb;
+       acl_state_changed_callback acl_state_changed_cb;
+       callback_thread_event thread_evt_cb;
+       dut_mode_recv_callback dut_mode_recv_cb;
+       le_test_mode_callback le_test_mode_cb;
+       energy_info_callback energy_info_cb;
+       authorize_request_callback authorize_request_cb;
+       device_trust_state_changed_callback device_trust_state_changed_cb;
 #ifdef TIZEN_BT_HAL
-    sock_authorize_request_callback socket_authorize_request_cb;
+       sock_authorize_request_callback socket_authorize_request_cb;
        le_state_changed_callback le_state_changed_cb;
        le_conn_state_changed_callback le_conn_state_changed_cb;
        device_trusted_profiles_changed_callback device_trusted_profiles_changed_cb;
@@ -602,16 +598,16 @@ typedef int (*acquire_wake_lock_callout)(const char *lock_name);
 typedef int (*release_wake_lock_callout)(const char *lock_name);
 
 /** The set of functions required by bluedroid to set wake alarms and
 * grab wake locks. This struct is passed into the stack through the
 * |set_os_callouts| function on |bt_interface_t|.
 */
+ * grab wake locks. This struct is passed into the stack through the
+ * |set_os_callouts| function on |bt_interface_t|.
+ */
 typedef struct {
-  /* set to sizeof(bt_os_callouts_t) */
-  size_t size;
+       /* set to sizeof(bt_os_callouts_t) */
+       size_t size;
 
-  set_wake_alarm_callout set_wake_alarm;
-  acquire_wake_lock_callout acquire_wake_lock;
-  release_wake_lock_callout release_wake_lock;
+       set_wake_alarm_callout set_wake_alarm;
+       acquire_wake_lock_callout acquire_wake_lock;
+       release_wake_lock_callout release_wake_lock;
 } bt_os_callouts_t;
 
 /** NOTE: By default, no profiles are initialized at the time of init/enable.
@@ -635,200 +631,200 @@ typedef struct {
 
 /** Represents the standard Bluetooth DM interface. */
 typedef struct {
-    /** set to sizeof(bt_interface_t) */
-    size_t size;
-    /**
-     * Opens the interface and provides the callback routines
-     * to the implemenation of this interface.
-     */
-    int (*init)(bt_callbacks_t* callbacks );
+       /** set to sizeof(bt_interface_t) */
+       size_t size;
+       /**
+        * Opens the interface and provides the callback routines
+        * to the implemenation of this interface.
+        */
+       int (*init)(bt_callbacks_t*callbacks);
 
-    /** Enable Bluetooth. */
-    int (*enable)(void);
+       /** Enable Bluetooth. */
+       int (*enable)(void);
 
-    /** Disable Bluetooth. */
-    int (*disable)(void);
+       /** Disable Bluetooth. */
+       int (*disable)(void);
 
 #ifdef TIZEN_BT_HAL
-    /** Reset Bluetooth. */
-    int (*reset)(void);
+       /** Reset Bluetooth. */
+       int (*reset)(void);
 #endif
 
 #ifdef TIZEN_BT_HAL
-    /** Enable LE Bluetooth. */
-    int (*le_enable)(void);
+       /** Enable LE Bluetooth. */
+       int (*le_enable)(void);
 
-    /** Disable LE Bluetooth. */
-    int (*le_disable)(void);
+       /** Disable LE Bluetooth. */
+       int (*le_disable)(void);
 
-    int (*le_init)(void);
+       int (*le_init)(void);
 
-    void (*le_deinit)(void);
+       void (*le_deinit)(void);
 #endif
 
-    /** Closes the interface. */
-    void (*cleanup)(void);
+       /** Closes the interface. */
+       void (*cleanup)(void);
 
 #ifdef TIZEN_BT_HAL
-    /** Get Bluetooth Adapter Powered status */
-    int (*get_adapter_powered_status)(uint8_t *status);
+       /** Get Bluetooth Adapter Powered status */
+       int (*get_adapter_powered_status)(uint8_t *status);
 #endif
 
-    /** Get all Bluetooth Adapter properties at init */
-    int (*get_adapter_properties)(void);
+       /** Get all Bluetooth Adapter properties at init */
+       int (*get_adapter_properties)(void);
 
-    /** Get Bluetooth Adapter property of 'type' */
-    int (*get_adapter_property)(bt_property_type_t type);
+       /** Get Bluetooth Adapter property of 'type' */
+       int (*get_adapter_property)(bt_property_type_t type);
 
-    /** Set Bluetooth Adapter property of 'type' */
-    /* Based on the type, val shall be one of
-     * bt_bdaddr_t or bt_bdname_t or bt_scanmode_t etc
-     */
-    int (*set_adapter_property)(const bt_property_t *property);
+       /** Set Bluetooth Adapter property of 'type' */
+       /* Based on the type, val shall be one of
+        * bt_bdaddr_t or bt_bdname_t or bt_scanmode_t etc
+        */
+       int (*set_adapter_property)(const bt_property_t *property);
 
-    /** Get all Remote Device properties */
-    int (*get_remote_device_properties)(bt_bdaddr_t *remote_addr);
+       /** Get all Remote Device properties */
+       int (*get_remote_device_properties)(bt_bdaddr_t *remote_addr);
 
-    /** Get Remote Device property of 'type' */
-    int (*get_remote_device_property)(bt_bdaddr_t *remote_addr,
-                                      bt_property_type_t type);
+       /** Get Remote Device property of 'type' */
+       int (*get_remote_device_property)(bt_bdaddr_t *remote_addr,
+                       bt_property_type_t type);
 
-    /** Set Remote Device property of 'type' */
-    int (*set_remote_device_property)(bt_bdaddr_t *remote_addr,
-                                      const bt_property_t *property);
+       /** Set Remote Device property of 'type' */
+       int (*set_remote_device_property)(bt_bdaddr_t *remote_addr,
+                       const bt_property_t *property);
 
-    /** Get Remote Device's service record  for the given UUID */
-    int (*get_remote_service_record)(bt_bdaddr_t *remote_addr,
-                                     bt_uuid_t *uuid);
+       /** Get Remote Device's service record  for the given UUID */
+       int (*get_remote_service_record)(bt_bdaddr_t *remote_addr,
+                       bt_uuid_t *uuid);
 
-    /** Start SDP to get remote services */
-    int (*get_remote_services)(bt_bdaddr_t *remote_addr);
+       /** Start SDP to get remote services */
+       int (*get_remote_services)(bt_bdaddr_t *remote_addr);
 
-    /** Start Discovery */
-    int (*start_discovery)(void);
+       /** Start Discovery */
+       int (*start_discovery)(void);
 
 #ifdef TIZEN_BT_HAL
-    int (*start_custom_discovery)(bt_disc_role_type_t disc_type);
+       int (*start_custom_discovery)(bt_disc_role_type_t disc_type);
 #endif
 
-    /** Cancel Discovery */
-    int (*cancel_discovery)(void);
-
-    /** Create Bluetooth Bonding */
-    int (*create_bond)(const bt_bdaddr_t *bd_addr, int transport);
-
-    /** Remove Bond */
-    int (*remove_bond)(const bt_bdaddr_t *bd_addr);
-
-    /** Cancel Bond */
-    int (*cancel_bond)(const bt_bdaddr_t *bd_addr);
-
-    /**
-     * Get the connection status for a given remote device.
-     * return value of 0 means the device is not connected,
-     * non-zero return status indicates an active connection.
-     */
-    int (*get_connection_state)(const bt_bdaddr_t *bd_addr);
-
-    /** BT Legacy PinKey Reply */
-    /** If accept==FALSE, then pin_len and pin_code shall be 0x0 */
-    int (*pin_reply)(const bt_bdaddr_t *bd_addr, uint8_t accept,
-                     uint8_t pin_len, bt_pin_code_t *pin_code);
-
-    /** BT SSP Reply - Just Works, Numeric Comparison and Passkey
-     * passkey shall be zero for BT_SSP_VARIANT_PASSKEY_COMPARISON &
-     * BT_SSP_VARIANT_CONSENT
-     * For BT_SSP_VARIANT_PASSKEY_ENTRY, if accept==FALSE, then passkey
-     * shall be zero */
-    int (*ssp_reply)(const bt_bdaddr_t *bd_addr, bt_ssp_variant_t variant,
-                     uint8_t accept, uint32_t passkey);
-
-    /** Get Bluetooth profile interface */
-    const void* (*get_profile_interface) (const char *profile_id);
-
-    /** Bluetooth Test Mode APIs - Bluetooth must be enabled for these APIs */
-    /* Configure DUT Mode - Use this mode to enter/exit DUT mode */
-    int (*dut_mode_configure)(uint8_t enable);
-
-    /* Send any test HCI (vendor-specific) command to the controller. Must be in DUT Mode */
-    int (*dut_mode_send)(uint16_t opcode, uint8_t *buf, uint8_t len);
-    /** BLE Test Mode APIs */
-    /* opcode MUST be one of: LE_Receiver_Test, LE_Transmitter_Test, LE_Test_End */
-    int (*le_test_mode)(uint16_t opcode, uint8_t *buf, uint8_t len);
-
-    /* enable or disable bluetooth HCI snoop log */
-    int (*config_hci_snoop_log)(uint8_t enable);
-
-    /** Sets the OS call-out functions that bluedroid needs for alarms and wake locks.
-      * This should be called immediately after a successful |init|.
-      */
-    int (*set_os_callouts)(bt_os_callouts_t *callouts);
-
-    /** Read Energy info details - return value indicates BT_STATUS_SUCCESS or BT_STATUS_NOT_READY
-      * Success indicates that the VSC command was sent to controller
-      */
-    int (*read_energy_info)();
-
-     /* Tizen Specific: Send  service level Authorization response */
-     int (*authorize_response)(const bt_bdaddr_t *bd_addr, bt_service_id_t service_id,
-                                       uint8_t authorize, uint8_t save_settings);
-
-     /** Set auto authorization for peer device. Should be a paired device */
-     int (*set_authorization)(bt_bdaddr_t *bd_addr, uint8_t auth);
+       /** Cancel Discovery */
+       int (*cancel_discovery)(void);
+
+       /** Create Bluetooth Bonding */
+       int (*create_bond)(const bt_bdaddr_t *bd_addr, int transport);
+
+       /** Remove Bond */
+       int (*remove_bond)(const bt_bdaddr_t *bd_addr);
+
+       /** Cancel Bond */
+       int (*cancel_bond)(const bt_bdaddr_t *bd_addr);
+
+       /**
+        * Get the connection status for a given remote device.
+        * return value of 0 means the device is not connected,
+        * non-zero return status indicates an active connection.
+        */
+       int (*get_connection_state)(const bt_bdaddr_t *bd_addr);
+
+       /** BT Legacy PinKey Reply */
+       /** If accept==FALSE, then pin_len and pin_code shall be 0x0 */
+       int (*pin_reply)(const bt_bdaddr_t *bd_addr, uint8_t accept,
+                       uint8_t pin_len, bt_pin_code_t *pin_code);
+
+       /** BT SSP Reply - Just Works, Numeric Comparison and Passkey
+        * passkey shall be zero for BT_SSP_VARIANT_PASSKEY_COMPARISON &
+        * BT_SSP_VARIANT_CONSENT
+        * For BT_SSP_VARIANT_PASSKEY_ENTRY, if accept==FALSE, then passkey
+        * shall be zero */
+       int (*ssp_reply)(const bt_bdaddr_t *bd_addr, bt_ssp_variant_t variant,
+                       uint8_t accept, uint32_t passkey);
+
+       /** Get Bluetooth profile interface */
+       const void* (*get_profile_interface) (const char *profile_id);
+
+       /** Bluetooth Test Mode APIs - Bluetooth must be enabled for these APIs */
+       /* Configure DUT Mode - Use this mode to enter/exit DUT mode */
+       int (*dut_mode_configure)(uint8_t enable);
+
+       /* Send any test HCI (vendor-specific) command to the controller. Must be in DUT Mode */
+       int (*dut_mode_send)(uint16_t opcode, uint8_t *buf, uint8_t len);
+       /** BLE Test Mode APIs */
+       /* opcode MUST be one of: LE_Receiver_Test, LE_Transmitter_Test, LE_Test_End */
+       int (*le_test_mode)(uint16_t opcode, uint8_t *buf, uint8_t len);
+
+       /* enable or disable bluetooth HCI snoop log */
+       int (*config_hci_snoop_log)(uint8_t enable);
+
+       /** Sets the OS call-out functions that bluedroid needs for alarms and wake locks.
+        * This should be called immediately after a successful |init|.
+        */
+       int (*set_os_callouts)(bt_os_callouts_t *callouts);
+
+       /** Read Energy info details - return value indicates BT_STATUS_SUCCESS or BT_STATUS_NOT_READY
+        * Success indicates that the VSC command was sent to controller
+        */
+       int (*read_energy_info)();
+
+       /* Tizen Specific: Send  service level Authorization response */
+       int (*authorize_response)(const bt_bdaddr_t *bd_addr, bt_service_id_t service_id,
+                       uint8_t authorize, uint8_t save_settings);
+
+       /** Set auto authorization for peer device. Should be a paired device */
+       int (*set_authorization)(bt_bdaddr_t *bd_addr, uint8_t auth);
 #ifdef TIZEN_BT_HAL
-    /**
-     * get the service connection status for a given remote device.
-     * return value of 0 means the device is not connected,
-     * non-zero return status indicates an active connection.
-     */
-    int (*get_service_connection_state)(const bt_bdaddr_t *bd_addr, bt_service_id_t rem_svc_id);
-
-    /*
-     * Enable/Disable osp server in gap agent.
-     * enable == 0/1 -> Register/Unregister osp server.
-     */
-    int (*set_agent_osp_server)(uint32_t type, uint8_t enable);
-
-    /**
-     * Set profile as trusted for remote device
-     */
-    int (*set_trusted_profile)(bt_bdaddr_t *bd_addr, bt_trusted_profile_t profile, uint8_t trust);
-
-    /**
-     * Get profile trusted status for remote device
-     */
-    int (*get_trusted_profile)(bt_bdaddr_t *bd_addr, bt_trusted_profile_t profile, uint32_t *trusted);
-
-    /**
-     * Get raw RSSI strength of remote device for connected link type
-     * conn_link_type: (0 = BR/EDR link, 1 = LE link, 0xFF = Any (Default))
-     */
-    int (*get_connected_link_rssi_strength)(bt_bdaddr_t *bd_addr, uint32_t conn_link_type);
-
-    /**
-     * Enable RSSI monitoring of remote device for connected link type
-     * conn_link_type: (0 = BR/EDR link, 1 = LE link, 0xFF = Any (Default))
-     * Threshold : (low_threshold, in_range_threshold, high_threshold)
-     */
-    int (*enable_rssi_monitoring)(bt_bdaddr_t *bd_addr, uint32_t conn_link_type,
-                   int low_threshold, int in_range_threshold, int high_threshold);
-    /*
-     * Enable/Disable GAP authentication notification to application
-     * enable == 0/1 -> Enable/Disable notification sending
-     * type == value from bt_gap_auth_variant_t
-     */
-    int (*enable_gap_auth_notifications)(uint32_t type, uint8_t enable);
+       /**
+        * get the service connection status for a given remote device.
+        * return value of 0 means the device is not connected,
+        * non-zero return status indicates an active connection.
+        */
+       int (*get_service_connection_state)(const bt_bdaddr_t *bd_addr, bt_service_id_t rem_svc_id);
+
+       /*
+        * Enable/Disable osp server in gap agent.
+        * enable == 0/1 -> Register/Unregister osp server.
+        */
+       int (*set_agent_osp_server)(uint32_t type, uint8_t enable);
+
+       /**
+        * Set profile as trusted for remote device
+        */
+       int (*set_trusted_profile)(bt_bdaddr_t *bd_addr, bt_trusted_profile_t profile, uint8_t trust);
+
+       /**
+        * Get profile trusted status for remote device
+        */
+       int (*get_trusted_profile)(bt_bdaddr_t *bd_addr, bt_trusted_profile_t profile, uint32_t *trusted);
+
+       /**
+        * Get raw RSSI strength of remote device for connected link type
+        * conn_link_type: (0 = BR/EDR link, 1 = LE link, 0xFF = Any (Default))
+        */
+       int (*get_connected_link_rssi_strength)(bt_bdaddr_t *bd_addr, uint32_t conn_link_type);
+
+       /**
+        * Enable RSSI monitoring of remote device for connected link type
+        * conn_link_type: (0 = BR/EDR link, 1 = LE link, 0xFF = Any (Default))
+        * Threshold : (low_threshold, in_range_threshold, high_threshold)
+        */
+       int (*enable_rssi_monitoring)(bt_bdaddr_t *bd_addr, uint32_t conn_link_type,
+                       int low_threshold, int in_range_threshold, int high_threshold);
+       /*
+        * Enable/Disable GAP authentication notification to application
+        * enable == 0/1 -> Enable/Disable notification sending
+        * type == value from bt_gap_auth_variant_t
+        */
+       int (*enable_gap_auth_notifications)(uint32_t type, uint8_t enable);
 
 #endif
 } bt_interface_t;
 
 /** TODO: Need to add APIs for Service Discovery, Service authorization and
 *       connection management. Also need to add APIs for configuring
 *       properties of remote bonded devices such as name, UUID etc. */
+ *       connection management. Also need to add APIs for configuring
+ *       properties of remote bonded devices such as name, UUID etc. */
 
 typedef struct {
-    struct hw_device_t common;
-    const bt_interface_t* (*get_bluetooth_interface)();
+       struct hw_device_t common;
+       const bt_interface_t* (*get_bluetooth_interface)();
 } bluetooth_device_t;
 
 typedef bluetooth_device_t bluetooth_module_t;