static const struct ipc_handler cmd_handlers[] = {
/* HAL_OP_GATT_CLIENT_REGISTER */
- {handle_client_register, false,
- sizeof(struct hal_cmd_gatt_client_register)},
+ { handle_client_register, false,
+ sizeof(struct hal_cmd_gatt_client_register) },
/* HAL_OP_GATT_CLIENT_UNREGISTER */
- {handle_client_unregister, false,
- sizeof(struct hal_cmd_gatt_client_unregister)},
+ { handle_client_unregister, false,
+ sizeof(struct hal_cmd_gatt_client_unregister) },
/* HAL_OP_GATT_CLIENT_SCAN */
- {handle_client_scan, false,
- sizeof(struct hal_cmd_gatt_client_scan)},
+ { handle_client_scan, false,
+ sizeof(struct hal_cmd_gatt_client_scan) },
/* HAL_OP_GATT_CLIENT_CONNECT */
- {handle_client_connect, false,
- sizeof(struct hal_cmd_gatt_client_connect)},
+ { handle_client_connect, false,
+ sizeof(struct hal_cmd_gatt_client_connect) },
/* HAL_OP_GATT_CLIENT_DISCONNECT */
- {handle_client_disconnect, false,
- sizeof(struct hal_cmd_gatt_client_disconnect)},
+ { handle_client_disconnect, false,
+ sizeof(struct hal_cmd_gatt_client_disconnect) },
/* HAL_OP_GATT_CLIENT_LISTEN */
- {handle_client_listen, false,
- sizeof(struct hal_cmd_gatt_client_listen)},
+ { handle_client_listen, false,
+ sizeof(struct hal_cmd_gatt_client_listen) },
/* HAL_OP_GATT_CLIENT_REFRESH */
- {handle_client_refresh, false,
- sizeof(struct hal_cmd_gatt_client_refresh)},
+ { handle_client_refresh, false,
+ sizeof(struct hal_cmd_gatt_client_refresh) },
/* HAL_OP_GATT_CLIENT_SEARCH_SERVICE */
- {handle_client_search_service, true,
- sizeof(struct hal_cmd_gatt_client_search_service)},
+ { handle_client_search_service, true,
+ sizeof(struct hal_cmd_gatt_client_search_service) },
/* HAL_OP_GATT_CLIENT_GET_INCLUDED_SERVICE */
- {handle_client_get_included_service, true,
- sizeof(struct hal_cmd_gatt_client_get_included_service)},
+ { handle_client_get_included_service, true,
+ sizeof(struct hal_cmd_gatt_client_get_included_service) },
/* HAL_OP_GATT_CLIENT_GET_CHARACTERISTIC */
- {handle_client_get_characteristic, true,
- sizeof(struct hal_cmd_gatt_client_get_characteristic)},
+ { handle_client_get_characteristic, true,
+ sizeof(struct hal_cmd_gatt_client_get_characteristic) },
/* HAL_OP_GATT_CLIENT_GET_DESCRIPTOR */
- {handle_client_get_descriptor, true,
- sizeof(struct hal_cmd_gatt_client_get_descriptor)},
+ { handle_client_get_descriptor, true,
+ sizeof(struct hal_cmd_gatt_client_get_descriptor) },
/* HAL_OP_GATT_CLIENT_READ_CHARACTERISTIC */
- {handle_client_read_characteristic, false,
- sizeof(struct hal_cmd_gatt_client_read_characteristic)},
+ { handle_client_read_characteristic, false,
+ sizeof(struct hal_cmd_gatt_client_read_characteristic) },
/* HAL_OP_GATT_CLIENT_WRITE_CHARACTERISTIC */
- {handle_client_write_characteristic, true,
- sizeof(struct hal_cmd_gatt_client_write_characteristic)},
+ { handle_client_write_characteristic, true,
+ sizeof(struct hal_cmd_gatt_client_write_characteristic) },
/* HAL_OP_GATT_CLIENT_READ_DESCRIPTOR */
- {handle_client_read_descriptor, false,
- sizeof(struct hal_cmd_gatt_client_read_descriptor)},
+ { handle_client_read_descriptor, false,
+ sizeof(struct hal_cmd_gatt_client_read_descriptor) },
/* HAL_OP_GATT_CLIENT_WRITE_DESCRIPTOR */
- {handle_client_write_descriptor, true,
- sizeof(struct hal_cmd_gatt_client_write_descriptor)},
+ { handle_client_write_descriptor, true,
+ sizeof(struct hal_cmd_gatt_client_write_descriptor) },
/* HAL_OP_GATT_CLIENT_EXECUTE_WRITE */
- {handle_client_execute_write, false,
- sizeof(struct hal_cmd_gatt_client_execute_write)},
+ { handle_client_execute_write, false,
+ sizeof(struct hal_cmd_gatt_client_execute_write)},
/* HAL_OP_GATT_CLIENT_REGISTER_FOR_NOTIFICATION */
- {handle_client_register_for_notification, false,
- sizeof(struct hal_cmd_gatt_client_register_for_notification)},
+ { handle_client_register_for_notification, false,
+ sizeof(struct hal_cmd_gatt_client_register_for_notification) },
/* HAL_OP_GATT_CLIENT_DEREGISTER_FOR_NOTIFICATION */
- {handle_client_deregister_for_notification, false,
- sizeof(struct hal_cmd_gatt_client_deregister_for_notification)},
+ { handle_client_deregister_for_notification, false,
+ sizeof(struct hal_cmd_gatt_client_deregister_for_notification) },
/* HAL_OP_GATT_CLIENT_READ_REMOTE_RSSI */
- {handle_client_read_remote_rssi, false,
- sizeof(struct hal_cmd_gatt_client_read_remote_rssi)},
+ { handle_client_read_remote_rssi, false,
+ sizeof(struct hal_cmd_gatt_client_read_remote_rssi) },
/* HAL_OP_GATT_CLIENT_GET_DEVICE_TYPE */
- {handle_client_get_device_type, false,
- sizeof(struct hal_cmd_gatt_client_get_device_type)},
+ { handle_client_get_device_type, false,
+ sizeof(struct hal_cmd_gatt_client_get_device_type) },
/* HAL_OP_GATT_CLIENT_SET_ADV_DATA */
- {handle_client_set_adv_data, true,
- sizeof(struct hal_cmd_gatt_client_set_adv_data)},
+ { handle_client_set_adv_data, true,
+ sizeof(struct hal_cmd_gatt_client_set_adv_data) },
/* HAL_OP_GATT_CLIENT_TEST_COMMAND */
- {handle_client_test_command, false,
- sizeof(struct hal_cmd_gatt_client_test_command)},
+ { handle_client_test_command, false,
+ sizeof(struct hal_cmd_gatt_client_test_command) },
/* HAL_OP_GATT_SERVER_REGISTER */
- {handle_server_register, false,
- sizeof(struct hal_cmd_gatt_server_register)},
+ { handle_server_register, false,
+ sizeof(struct hal_cmd_gatt_server_register) },
/* HAL_OP_GATT_SERVER_UNREGISTER */
- {handle_server_unregister, false,
- sizeof(struct hal_cmd_gatt_server_unregister)},
+ { handle_server_unregister, false,
+ sizeof(struct hal_cmd_gatt_server_unregister) },
/* HAL_OP_GATT_SERVER_CONNECT */
- {handle_server_connect, false,
- sizeof(struct hal_cmd_gatt_server_connect)},
+ { handle_server_connect, false,
+ sizeof(struct hal_cmd_gatt_server_connect) },
/* HAL_OP_GATT_SERVER_DISCONNECT */
- {handle_server_disconnect, false,
- sizeof(struct hal_cmd_gatt_server_disconnect)},
+ { handle_server_disconnect, false,
+ sizeof(struct hal_cmd_gatt_server_disconnect) },
/* HAL_OP_GATT_SERVER_ADD_SERVICE */
- {handle_server_add_service, false,
- sizeof(struct hal_cmd_gatt_server_add_service)},
+ { handle_server_add_service, false,
+ sizeof(struct hal_cmd_gatt_server_add_service) },
/* HAL_OP_GATT_SERVER_ADD_INC_SERVICE */
- {handle_server_add_included_service, false,
- sizeof(struct hal_cmd_gatt_server_add_inc_service)},
+ { handle_server_add_included_service, false,
+ sizeof(struct hal_cmd_gatt_server_add_inc_service) },
/* HAL_OP_GATT_SERVER_ADD_CHARACTERISTIC */
- {handle_server_add_characteristic, false,
- sizeof(struct hal_cmd_gatt_server_add_characteristic)},
+ { handle_server_add_characteristic, false,
+ sizeof(struct hal_cmd_gatt_server_add_characteristic) },
/* HAL_OP_GATT_SERVER_ADD_DESCRIPTOR */
- {handle_server_add_descriptor, false,
- sizeof(struct hal_cmd_gatt_server_add_descriptor)},
+ { handle_server_add_descriptor, false,
+ sizeof(struct hal_cmd_gatt_server_add_descriptor) },
/* HAL_OP_GATT_SERVER_START_SERVICE */
- {handle_server_start_service, false,
- sizeof(struct hal_cmd_gatt_server_start_service)},
+ { handle_server_start_service, false,
+ sizeof(struct hal_cmd_gatt_server_start_service) },
/* HAL_OP_GATT_SERVER_STOP_SERVICE */
- {handle_server_stop_service, false,
- sizeof(struct hal_cmd_gatt_server_stop_service)},
+ { handle_server_stop_service, false,
+ sizeof(struct hal_cmd_gatt_server_stop_service) },
/* HAL_OP_GATT_SERVER_DELETE_SERVICE */
- {handle_server_delete_service, false,
- sizeof(struct hal_cmd_gatt_server_delete_service)},
+ { handle_server_delete_service, false,
+ sizeof(struct hal_cmd_gatt_server_delete_service) },
/* HAL_OP_GATT_SERVER_SEND_INDICATION */
- {handle_server_send_indication, true,
- sizeof(struct hal_cmd_gatt_server_send_indication)},
+ { handle_server_send_indication, true,
+ sizeof(struct hal_cmd_gatt_server_send_indication) },
/* HAL_OP_GATT_SERVER_SEND_RESPONSE */
- {handle_server_send_response, true,
- sizeof(struct hal_cmd_gatt_server_send_response)},
+ { handle_server_send_response, true,
+ sizeof(struct hal_cmd_gatt_server_send_response) },
};
bool bt_gatt_register(struct ipc *ipc, const bdaddr_t *addr)
static const struct ipc_handler cmd_handlers[] = {
/* HAL_OP_HANDSFREE_CONNECT */
- { handle_connect, false, sizeof(struct hal_cmd_handsfree_connect)},
+ { handle_connect, false,
+ sizeof(struct hal_cmd_handsfree_connect) },
/* HAL_OP_HANDSFREE_DISCONNECT */
- {handle_disconnect, false, sizeof(struct hal_cmd_handsfree_disconnect)},
+ { handle_disconnect, false,
+ sizeof(struct hal_cmd_handsfree_disconnect) },
/*HAL_OP_HANDSFREE_CONNECT_AUDIO*/
- {handle_connect_audio, false,
- sizeof(struct hal_cmd_handsfree_connect_audio)},
+ { handle_connect_audio, false,
+ sizeof(struct hal_cmd_handsfree_connect_audio) },
/*HAL_OP_HANDSFREE_DISCONNECT_AUDIO*/
- {handle_disconnect_audio, false,
- sizeof(struct hal_cmd_handsfree_disconnect_audio)},
+ { handle_disconnect_audio, false,
+ sizeof(struct hal_cmd_handsfree_disconnect_audio) },
/* define HAL_OP_HANDSFREE_START_VR */
- {handle_start_vr, false, 0 },
+ { handle_start_vr, false, 0 },
/* define HAL_OP_HANDSFREE_STOP_VR */
- {handle_stop_vr, false, 0 },
+ { handle_stop_vr, false, 0 },
/* HAL_OP_HANDSFREE_VOLUME_CONTROL */
- {handle_volume_control, false,
- sizeof(struct hal_cmd_handsfree_volume_control)},
+ { handle_volume_control, false,
+ sizeof(struct hal_cmd_handsfree_volume_control) },
/* HAL_OP_HANDSFREE_DEVICE_STATUS_NOTIF */
- {handle_device_status_notif, false,
- sizeof(struct hal_cmd_handsfree_device_status_notif)},
+ { handle_device_status_notif, false,
+ sizeof(struct hal_cmd_handsfree_device_status_notif) },
/* HAL_OP_HANDSFREE_COPS_RESPONSE */
- {handle_cops, true, sizeof(struct hal_cmd_handsfree_cops_response)},
+ { handle_cops, true,
+ sizeof(struct hal_cmd_handsfree_cops_response) },
/* HAL_OP_HANDSFREE_CIND_RESPONSE */
- { handle_cind, false, sizeof(struct hal_cmd_handsfree_cind_response)},
+ { handle_cind, false,
+ sizeof(struct hal_cmd_handsfree_cind_response) },
/* HAL_OP_HANDSFREE_FORMATTED_AT_RESPONSE */
- {handle_formatted_at_resp, true,
- sizeof(struct hal_cmd_handsfree_formatted_at_response)},
+ { handle_formatted_at_resp, true,
+ sizeof(struct hal_cmd_handsfree_formatted_at_response) },
/* HAL_OP_HANDSFREE_AT_RESPONSE */
- {handle_at_resp, false, sizeof(struct hal_cmd_handsfree_at_response)},
+ { handle_at_resp, false,
+ sizeof(struct hal_cmd_handsfree_at_response) },
/* HAL_OP_HANDSFREE_CLCC_RESPONSE */
- {handle_clcc_resp, true,
- sizeof(struct hal_cmd_handsfree_clcc_response)},
+ { handle_clcc_resp, true,
+ sizeof(struct hal_cmd_handsfree_clcc_response) },
/* HAL_OP_HANDSFREE_PHONE_STATE_CHANGE */
- {handle_phone_state_change, true,
- sizeof(struct hal_cmd_handsfree_phone_state_change)},
+ { handle_phone_state_change, true,
+ sizeof(struct hal_cmd_handsfree_phone_state_change) },
};
static sdp_record_t *headset_ag_record(void)