__BEGIN_DECLS
/** GATT value type used in response to remote read requests */
-typedef struct
-{
+typedef struct {
uint8_t value[BTGATT_MAX_ATTR_LEN];
uint16_t handle;
uint16_t offset;
} btgatt_value_t;
/** GATT remote read request response type */
-typedef union
-{
+typedef union {
btgatt_value_t attr_value;
uint16_t handle;
} btgatt_response_t;
bool set_scan_rsp;
bool include_name;
bool include_txpower;
+#ifdef TIZEN_BT_HAL
+ bool include_appearance;
+#endif
uint16_t appearance;
char* manufacturer_data;
uint16_t manufacturer_data_len;
/**
* Callback invoked when indication confirmation
*/
-typedef void (*indication_confirmation_callback) ( int conn_id, int trans_id, int attr_handle, bt_bdaddr_t *bda);
+typedef void (*indication_confirmation_callback) (int conn_id, int trans_id, int attr_handle, bt_bdaddr_t *bda);
#ifdef TIZEN_BT_HAL
/**
int attr_handle, int offset, int length,
bool need_rsp, bool is_prep, uint8_t* value);
+/**
+ * Callback invoked when a remote device has requested to acqiore write to a
+ * characteristic .
+ */
+typedef void (*request_acquire_write_callback)(int mtu, int conn_id, int trans_id,
+ int attr_handle, bt_bdaddr_t *bda);
+
+typedef void (*request_acquire_notify_callback)(int fd, int conn_id, int trans_id,
+ int attr_handle);
+
+
/** Callback invoked when a previously prepared write is to be executed */
typedef void (*request_exec_write_callback)(int conn_id, int trans_id,
bt_bdaddr_t *bda, int exec_write);
+
+
/**
* Callback triggered in response to send_response if the remote device
* sends a confirmation.
#ifdef TIZEN_BT_HAL
notification_enabled_callback notif_enabled_cb;
#endif
+ request_acquire_write_callback request_acquire_write_cb;
+ request_acquire_notify_callback request_acquire_notify_cb;
} btgatt_server_callbacks_t;
/** Represents the standard BT-GATT server interface. */
typedef struct {
/** Registers a GATT server application with the stack */
- bt_status_t (*register_server)( bt_uuid_t *uuid );
+ bt_status_t (*register_server)(bt_uuid_t *uuid);
/** Unregister a server application from the stack */
- bt_status_t (*unregister_server)(int server_if );
+ bt_status_t (*unregister_server)(int server_if);
/** Create a connection to a remote peripheral */
- bt_status_t (*connect)(int server_if, const bt_bdaddr_t *bd_addr, bool is_direct );
+ bt_status_t (*connect)(int server_if, const bt_bdaddr_t *bd_addr, bool is_direct);
/** Disconnect an established connection or cancel a pending one */
bt_status_t (*disconnect)(int server_if, const bt_bdaddr_t *bd_addr,
- int conn_id );
+ int conn_id);
/** Create a new service */
- bt_status_t (*add_service)( int server_if, btgatt_srvc_id_t *srvc_id, int num_handles);
+ bt_status_t (*add_service)(int server_if, btgatt_srvc_id_t *srvc_id, int num_handles);
/** Assign an included service to it's parent service */
- bt_status_t (*add_included_service)( int server_if, int service_handle, int included_handle);
+ bt_status_t (*add_included_service)(int server_if, int service_handle, int included_handle);
/** Add a characteristic to a service */
- bt_status_t (*add_characteristic)( int server_if,
+ bt_status_t (*add_characteristic)(int server_if,
int service_handle, bt_uuid_t *uuid,
int properties, int permissions);
/** Update GATT server attribute value */
bt_status_t (*update_att_value)(int server_if, int attribute_handle,
- int value_length, char* att_value);
+ int value_length, char* att_value);
/** Start or stop advertisements to listen for incoming connections */
bt_status_t (*listen)(int server_if, bool start);
bt_status_t (*multi_adv_enable)(int server_if);
/* Update the parameters as per spec, user manual specified values and restart multi ADV */
- bt_status_t (*multi_adv_update)(int server_if, int min_interval,int max_interval,int adv_type,
+ bt_status_t (*multi_adv_update)(int server_if, int min_interval, int max_interval, int adv_type,
int chnl_map, int tx_power, int timeout_s);
+ /* Set the filter_policy value in the HAL Layer */
+ bt_status_t (*set_filter_policy)(int filter_policy);
+
/* Setup the data for the specified instance */
bt_status_t (*multi_adv_set_inst_data)(btgatt_adv_param_setup_t adv_param_setup);
/* Get current att mtu size of active connection */
bt_status_t (*get_att_mtu)(int conn_id, int *mtu_size);
+
+ /** Send a response to a acquire write/notify operation */
+ bt_status_t (*send_response_acquire)(int conn_id, int trans_id,
+ int status, int fd, int mtu, void *);
} btgatt_server_interface_t;
__END_DECLS