"org.freedesktop.DBus",
NULL, &error_connection);
- if(process_proxy == NULL)
+ if (process_proxy == NULL)
BT_DBG("Fail to get process_proxy");
if (error_connection) {
char *sender = data;
GVariant *param = user_data;
- _bt_send_event_to_dest(sender, BT_DEVICE_EVENT,BLUETOOTH_EVENT_GATT_CHAR_VAL_CHANGED,
+ _bt_send_event_to_dest(sender, BT_DEVICE_EVENT, BLUETOOTH_EVENT_GATT_CHAR_VAL_CHANGED,
param);
}
#endif
gboolean _bt_update_le_feature_support(const char *item, const char *value)
{
- if (item== NULL || value == NULL)
+ if (item == NULL || value == NULL)
return FALSE;
if (g_strcmp0(item, "adv_inst_max") == 0) {
adv_params.interval_min = params->interval_min;
adv_params.interval_max = params->interval_max;
adv_params.filter_policy = params->filter_policy;
- adv_params.type= params->type;
+ adv_params.type = params->type;
if (ret)
g_variant_unref(ret);
}
ret = g_dbus_proxy_call_sync(proxy, "StartLEDiscovery",
- NULL,G_DBUS_CALL_FLAGS_NONE,
+ NULL, G_DBUS_CALL_FLAGS_NONE,
-1, NULL, &error);
if (error) {
}
ret = g_dbus_proxy_call_sync(proxy, "StopLEDiscovery",
- NULL,G_DBUS_CALL_FLAGS_NONE,
+ NULL, G_DBUS_CALL_FLAGS_NONE,
-1, NULL, &error);
if (ret == NULL) {
BT_ERR("LE Scan stop failed");
retv_if(proxy == NULL, BLUETOOTH_ERROR_INTERNAL);
ret = g_dbus_proxy_call_sync(proxy, "ClearDeviceWhiteList",
- NULL,G_DBUS_CALL_FLAGS_NONE,
+ NULL, G_DBUS_CALL_FLAGS_NONE,
-1, NULL, &error);
if (error) {
retv_if(proxy == NULL, BLUETOOTH_ERROR_INTERNAL);
ret = g_dbus_proxy_call_sync(proxy, "InitializeIpsp",
- NULL,G_DBUS_CALL_FLAGS_NONE,
+ NULL, G_DBUS_CALL_FLAGS_NONE,
-1, NULL, &error);
if (error) {
BT_ERR("Initialize IPSP Failed :[%s]", error->message);
retv_if(proxy == NULL, BLUETOOTH_ERROR_INTERNAL);
ret = g_dbus_proxy_call_sync(proxy, "DeinitializeIpsp",
- NULL,G_DBUS_CALL_FLAGS_NONE,
+ NULL, G_DBUS_CALL_FLAGS_NONE,
-1, NULL, &error);
if (error) {
BT_ERR("De-Initialize IPSP Failed :[%s]", error->message);
return BLUETOOTH_ERROR_INTERNAL;
}
- g_variant_get(reply ,"(qqqq)", &max_tx_octets, &max_tx_time,
+ g_variant_get(reply, "(qqqq)", &max_tx_octets, &max_tx_time,
&max_rx_octets, &max_rx_time);
max_le_datalength->max_tx_octets = max_tx_octets;
return BLUETOOTH_ERROR_INTERNAL;
}
- g_variant_get(reply ,"(qq)", &def_tx_octets, &def_tx_time);
+ g_variant_get(reply, "(qq)", &def_tx_octets, &def_tx_time);
def_data_length->def_tx_octets = def_tx_octets;
def_data_length->def_tx_time = def_tx_time;
result = alarmmgr_add_alarm(ALARM_TYPE_VOLATILE, visible_timer.timeout,
0, NULL, &alarm_id);
- if(result < 0) {
+ if (result < 0) {
BT_ERR("Failed to create alarm error = %d\n", result);
} else {
BT_DBG("Alarm created = %d\n", alarm_id);
g_variant_get(result, "(a{sv})", &property_iter);
while (g_variant_iter_loop(property_iter, "{sv}", &key, &value)) {
- if (!g_strcmp0(key,"Paired")) {
+ if (!g_strcmp0(key, "Paired")) {
paired = g_variant_get_boolean(value);
- } else if(!g_strcmp0(key, "Address")) {
+ } else if (!g_strcmp0(key, "Address")) {
address = g_variant_get_string(value, NULL);
} else if (!g_strcmp0(key, "Alias")) {
name = g_variant_get_string(value, NULL);
} else if (!g_strcmp0(key, "ManufacturerData")) {
manufacturer_data = g_byte_array_new();
g_variant_get(value, "ay", &char_value_iter);
- while(g_variant_iter_loop(char_value_iter, "y", &char_value)) {
+
+ while (g_variant_iter_loop(char_value_iter, "y", &char_value))
g_byte_array_append(manufacturer_data, &char_value, 1);
- }
+
g_variant_iter_free(char_value_iter);
if (manufacturer_data) {
#else
#ifdef TIZEN_TV
if (_bt_set_discoverable_mode(
- BLUETOOTH_DISCOVERABLE_MODE_GENERAL_DISCOVERABLE, 0)!= BLUETOOTH_ERROR_NONE)
+ BLUETOOTH_DISCOVERABLE_MODE_GENERAL_DISCOVERABLE, 0) != BLUETOOTH_ERROR_NONE)
BT_ERR("Fail to set discoverable mode");
#endif
#endif
BT_DBG("Update vconf for BT normal Deactivation");
if (result == BLUETOOTH_ERROR_TIMEOUT)
- if (vconf_set_int(BT_OFF_DUE_TO_TIMEOUT, 1) != 0 )
+ if (vconf_set_int(BT_OFF_DUE_TO_TIMEOUT, 1) != 0)
BT_ERR("Set vconf failed");
/* Update Bluetooth Status to notify other modules */
g_variant_get(result, "(v)", &value);
g_variant_get(value, "as", &iter);
- if(iter == NULL) {
- BT_ERR("Failed to get UUIDs(%s)",service_uuid);
+ if (iter == NULL) {
+ BT_ERR("Failed to get UUIDs(%s)", service_uuid);
*used = FALSE;
g_variant_unref(result);
g_variant_unref(value);
address = g_variant_get_string(value, NULL);
_bt_convert_addr_string_to_type(dev_info->device_address.addr,
address);
- } else if(!g_strcmp0(key, "Class")) {
+ } else if (!g_strcmp0(key, "Class")) {
unsigned int cod;
cod = g_variant_get_uint32(value);
_bt_divide_device_class(&dev_info->device_class, cod);
- } else if(!g_strcmp0(key, "Name")) {
+ } else if (!g_strcmp0(key, "Name")) {
const char *name = NULL;
name = g_variant_get_string(value, NULL);
/* If there is no Alias */
g_strlcpy(dev_info->device_name.name, name,
BLUETOOTH_DEVICE_NAME_LENGTH_MAX+1);
}
- } else if(!g_strcmp0(key, "Alias")) {
+ } else if (!g_strcmp0(key, "Alias")) {
const char *alias = NULL;
alias = g_variant_get_string(value, NULL);
/* Overwrite the name */
} else if (strcasecmp(key, "ManufacturerData") == 0) {
manufacturer_data = g_byte_array_new();
g_variant_get(value, "ay", &char_value_iter);
- while(g_variant_iter_loop(char_value_iter, "y", &char_value)) {
+
+ while (g_variant_iter_loop(char_value_iter, "y", &char_value))
g_byte_array_append(manufacturer_data, &char_value, 1);
- }
+
if (manufacturer_data) {
if (manufacturer_data->len > 0) {
memcpy(dev_info->manufacturer_data.data, manufacturer_data->data, manufacturer_data->len);
bt_audio_type_t type)
{
GArray *dev_list = NULL;
- int size,i,j;
+ int size;
+ int i;
+ int j;
bluetooth_device_info_t info;
char bond_address[BT_ADDRESS_STRING_SIZE] = { 0 };
gboolean ret = FALSE;
BT_DBG("+");
- dev_list = g_array_new (FALSE, FALSE, sizeof(gchar));
+ dev_list = g_array_new(FALSE, FALSE, sizeof(gchar));
_bt_get_bonded_devices(&dev_list);
size = (dev_list->len) / sizeof(bluetooth_device_info_t);
- for (i=0; i < size; i++) {
+ for (i = 0; i < size; i++) {
info = g_array_index(dev_list, bluetooth_device_info_t, i);
_bt_convert_addr_type_to_string(bond_address,
info.device_address.addr);
case SHUFFLE:
case SCAN:
case STATUS:
- name =(char *)g_variant_get_string(reply, NULL);
+ name = (char *)g_variant_get_string(reply, NULL);
*value = __bt_media_attrval_to_val(type, name);
BT_DBG("Type[%s] and Value[%s]", __bt_media_type_to_str(type), name);
break;
const char *key = NULL;
g_variant_iter_init(&iter, item);
- while (g_variant_iter_loop(&iter, "{sv}", &key, &value)){
- if (strcasecmp(key, "Title") == 0){
+ while (g_variant_iter_loop(&iter, "{sv}", &key, &value)) {
+ if (strcasecmp(key, "Title") == 0) {
value_string = (char *)g_variant_get_string(value, NULL);
BT_DBG("Value : %s ", value_string);
metadata->title = value_string;
} else if (strcasecmp(key, "Artist") == 0) {
- value_string =(char *)g_variant_get_string(value, NULL);
+ value_string = (char *)g_variant_get_string(value, NULL);
BT_DBG("Value : %s ", value_string);
metadata->artist = value_string;
} else if (strcasecmp(key, "Album") == 0) {
- value_string =(char *)g_variant_get_string(value, NULL);
+ value_string = (char *)g_variant_get_string(value, NULL);
BT_DBG("Value : %s ", value_string);
metadata->album = value_string;
} else if (strcasecmp(key, "Genre") == 0) {
- value_string =(char *)g_variant_get_string(value, NULL);
+ value_string = (char *)g_variant_get_string(value, NULL);
BT_DBG("Value : %s ", value_string);
metadata->genre = value_string;
} else if (strcasecmp(key, "Duration") == 0) {
(strcasecmp(property, "Repeat") == 0) ||
(strcasecmp(property, "Shuffle") == 0) ||
(strcasecmp(property, "Scan") == 0) ||
- (strcasecmp(property, "Status") == 0)){
+ (strcasecmp(property, "Status") == 0)) {
const char *valstr;
unsigned int type, val;
ret = __bt_avrcp_control_parse_properties(
&metadata, reply);
- if (BLUETOOTH_ERROR_NONE != ret){
+ if (BLUETOOTH_ERROR_NONE != ret) {
/* Free key and value because of break unless free not required */
free((char *)property);
g_variant_unref(value);
if (system_gconn == NULL) {
system_gconn = _bt_gdbus_init_system_gconn();
- } else if (g_dbus_connection_is_closed(system_gconn)){
+ } else if (g_dbus_connection_is_closed(system_gconn)) {
local_system_gconn = g_bus_get_sync(G_BUS_TYPE_SYSTEM, NULL, &error);
GDBusConnection *__bt_init_session_conn(void)
{
if (session_conn == NULL)
- session_conn =g_bus_get_sync(G_BUS_TYPE_SESSION, NULL, NULL);
+ session_conn = g_bus_get_sync(G_BUS_TYPE_SESSION, NULL, NULL);
return session_conn;
}
while (count > 0 && ((i + count) < length)) {
dest[i++] = *p;
p++;
- count --;
+ count--;
}
p = next;
}
int _bt_register_osp_server_in_agent(int type, char *uuid, char *path, int fd)
{
BT_DBG("+");
- if (!_bt_agent_register_osp_server( type, uuid, path, fd))
+ if (!_bt_agent_register_osp_server(type, uuid, path, fd))
return BLUETOOTH_ERROR_INTERNAL;
return BLUETOOTH_ERROR_NONE;
int _bt_unregister_osp_server_in_agent(int type, char *uuid)
{
BT_DBG("+");
- if (!_bt_agent_unregister_osp_server( type, uuid))
+ if (!_bt_agent_unregister_osp_server(type, uuid))
return BLUETOOTH_ERROR_INTERNAL;
return BLUETOOTH_ERROR_NONE;
char *_bt_get_profile_uuid128(bt_profile_type_t profile_type)
{
- switch(profile_type) {
+ switch (profile_type) {
case BT_PROFILE_CONN_RFCOMM:
return strdup(RFCOMM_UUID_STR);
case BT_PROFILE_CONN_A2DP:
char * _bt_convert_disc_reason_to_string(int reason)
{
- switch(reason) {
+ switch (reason) {
case 1:
return "Link loss";
case 2:
#include "bt-service-dpm.h"
static dpm_policy_t policy_table[DPM_POLICY_END] = {
- [DPM_POLICY_ALLOW_BLUETOOTH] = {{DPM_BT_ERROR}},
- [DPM_POLICY_BLUETOOTH_DEVICE_RESTRICTION] = {{DPM_STATUS_ERROR}},
- [DPM_POLICY_BLUETOOTH_UUID_RESTRICTION] = {{DPM_STATUS_ERROR}},
- [DPM_POLICY_BLUETOOTH_DEVICES_WHITELIST] = {{NULL}},
- [DPM_POLICY_BLUETOOTH_DEVICES_BLACKLIST] = {{NULL}},
- [DPM_POLICY_BLUETOOTH_UUIDS_WHITELIST] = {{NULL}},
- [DPM_POLICY_BLUETOOTH_UUIDS_BLACKLIST] = {{NULL}},
- [DPM_POLICY_ALLOW_BLUETOOTH_OUTGOING_CALL] = {{DPM_STATUS_ERROR}},
- [DPM_POLICY_BLUETOOTH_PAIRING_STATE] = {{DPM_STATUS_ERROR}},
- [DPM_POLICY_BLUETOOTH_DESKTOP_CONNECTIVITY_STATE] = {{DPM_STATUS_ERROR}},
- [DPM_POLICY_BLUETOOTH_DISCOVERABLE_STATE] = {{DPM_STATUS_ERROR}},
- [DPM_POLICY_BLUETOOTH_LIMITED_DISCOVERABLE_STATE] = {{DPM_STATUS_ERROR}},
- [DPM_POLICY_BLUETOOTH_DATA_TRANSFER_STATE] = {{DPM_STATUS_ERROR}},
+ [DPM_POLICY_ALLOW_BLUETOOTH] = { {DPM_BT_ERROR} },
+ [DPM_POLICY_BLUETOOTH_DEVICE_RESTRICTION] = { {DPM_STATUS_ERROR} },
+ [DPM_POLICY_BLUETOOTH_UUID_RESTRICTION] = { {DPM_STATUS_ERROR} },
+ [DPM_POLICY_BLUETOOTH_DEVICES_WHITELIST] = { {NULL} },
+ [DPM_POLICY_BLUETOOTH_DEVICES_BLACKLIST] = { {NULL} },
+ [DPM_POLICY_BLUETOOTH_UUIDS_WHITELIST] = { {NULL} },
+ [DPM_POLICY_BLUETOOTH_UUIDS_BLACKLIST] = { {NULL} },
+ [DPM_POLICY_ALLOW_BLUETOOTH_OUTGOING_CALL] = { {DPM_STATUS_ERROR} },
+ [DPM_POLICY_BLUETOOTH_PAIRING_STATE] = { {DPM_STATUS_ERROR} },
+ [DPM_POLICY_BLUETOOTH_DESKTOP_CONNECTIVITY_STATE] = { {DPM_STATUS_ERROR} },
+ [DPM_POLICY_BLUETOOTH_DISCOVERABLE_STATE] = { {DPM_STATUS_ERROR} },
+ [DPM_POLICY_BLUETOOTH_LIMITED_DISCOVERABLE_STATE] = { {DPM_STATUS_ERROR} },
+ [DPM_POLICY_BLUETOOTH_DATA_TRANSFER_STATE] = { {DPM_STATUS_ERROR} },
};
dpm_result_t _bt_dpm_get_bluetooth_uuids_from_blacklist(GArray **out_param1)
{
dpm_result_t ret = DPM_RESULT_FAIL;
- bt_dpm_uuids_list_t uuids_list = {0, {{0}, }};
+ bt_dpm_uuids_list_t uuids_list = {0, { {0}, } };
GSList *list = policy_table[DPM_POLICY_BLUETOOTH_UUIDS_BLACKLIST].list;
int i = 0;
dpm_result_t _bt_dpm_get_bluetooth_uuids_from_whitelist(GArray **out_param1)
{
dpm_result_t ret = DPM_RESULT_FAIL;
- bt_dpm_uuids_list_t uuids_list = {0, {{0}, }};
+ bt_dpm_uuids_list_t uuids_list = {0, { {0}, } };
GSList *list = policy_table[DPM_POLICY_BLUETOOTH_UUIDS_WHITELIST].list;
int i = 0;
return DPM_RESULT_ACCESS_DENIED;
err = _bt_dpm_clear_bluetooth_uuids_from_blacklist();
- if (!err){
+ if (!err)
err = _bt_dpm_clear_bluetooth_uuids_from_blacklist();
- }
return err;
}
return DPM_RESULT_ACCESS_DENIED;
err = _bt_dpm_clear_bluetooth_devices_from_blacklist();
- if (!err){
+ if (!err)
err = _bt_dpm_clear_bluetooth_devices_from_blacklist();
- }
return err;
}
retv_if(!addr, NULL);
bt_le_adv_info_t *adv_info = NULL;
GList *current = g_list_first((GList *)p_adv_ind_list);
- while(current && current->data) {
+ while (current && current->data) {
adv_info = (bt_le_adv_info_t *)current->data;
retv_if(adv_info && !g_strcmp0(adv_info->addr, addr), adv_info);
current = g_list_next(current);
ret_if(!p_adv_ind_list);
bt_le_adv_info_t *adv_info = NULL;
GList *current = g_list_first((GList *)p_adv_ind_list);
- while(current && current->data) {
+ while (current && current->data) {
adv_info = (bt_le_adv_info_t *)current->data;
if (adv_info && !g_strcmp0(adv_info->addr, addr)) {
p_adv_ind_list = g_list_remove(p_adv_ind_list, adv_info);
} else if (strcasecmp(key, "UUIDs") == 0) {
char **uuid_value;
gsize size = 0;
- int i =0;
+ int i = 0;
size = g_variant_get_size(val);
if (size > 0) {
GVariant *optional_param;
GVariantIter iter;
GVariant *child;
- char *interface_name= NULL;
+ char *interface_name = NULL;
GVariant *inner_iter = NULL;
g_variant_get(msg, "(&o@a{sa{sv}})",
&path, &optional_param);
g_variant_iter_init(&iter, optional_param);
while ((child = g_variant_iter_next_value(&iter))) {
- g_variant_get(child,"{&s@a{sv}}", &interface_name, &inner_iter);
+ g_variant_get(child, "{&s@a{sv}}", &interface_name, &inner_iter);
if (g_strcmp0(interface_name, BT_DEVICE_INTERFACE) == 0) {
BT_DBG("Found a device: %s", path);
if (__bt_parse_device_properties(inner_iter,
node = g_list_first(p_cache_list);
- while (node != NULL){
+ while (node != NULL) {
cache_info = (bt_cache_info_t *)node->data;
if (cache_info == NULL) {
GVariant *param = NULL;
BT_DBG("+");
- if (remote_dev_info->uuid_count > 0 ) {
- for (i = 0; i<remote_dev_info->uuid_count; i++) {
+ if (remote_dev_info->uuid_count > 0) {
+ for (i = 0; i < remote_dev_info->uuid_count; i++) {
char *uuid = remote_dev_info->uuids[i];
- if (strcasecmp(uuid, HID_UUID) == 0){
+ if (strcasecmp(uuid, HID_UUID) == 0) {
int event = BLUETOOTH_EVENT_NONE;
event = (connected == TRUE) ?
node = g_list_first(p_cache_list);
- while (node != NULL){
+ while (node != NULL) {
cache_info = (bt_cache_info_t *)node->data;
if (cache_info == NULL) {
gboolean status = FALSE;
char *address = NULL;
int link_type;
- g_variant_get(msg,"(sib)", &address, &link_type, &status);
+ g_variant_get(msg, "(sib)", &address, &link_type, &status);
BT_DBG("RSSI Enabled [%s %d]", address, status);
param = g_variant_new("(isib)", result,
int rssi_dbm;
int link_type;
char *address = NULL;
- g_variant_get(msg,"(siii)", &address, &link_type, &alert_type, &rssi_dbm);
+ g_variant_get(msg, "(siii)", &address, &link_type, &alert_type, &rssi_dbm);
BT_DBG("RSSI Alert: [Address %s LinkType %d] [Type %d DBM %d]",
address, alert_type, rssi_dbm);
int rssi_dbm;
int link_type;
char *address = NULL;
- g_variant_get(msg,"(sii)", &address, &link_type, &rssi_dbm);
+ g_variant_get(msg, "(sii)", &address, &link_type, &rssi_dbm);
BT_DBG("Raw RSSI: [Address %s] [Link Type %d][RSSI DBM %d]",
address, link_type, rssi_dbm);
GError *err = NULL;
char *property = NULL;
GVariant *param = NULL;
- g_variant_iter_init (&value_iter, msg);
- while ((g_variant_iter_loop (&value_iter,"{sv}", &property, &val))) {
+ g_variant_iter_init(&value_iter, msg);
+ while ((g_variant_iter_loop(&value_iter, "{sv}", &property, &val))) {
BT_INFO("Property %s", property);
if (strcasecmp(property, "Discovering") == 0) {
gboolean powered = FALSE;
int bt_state;
- g_variant_get(val, "b" ,&powered);
+ g_variant_get(val, "b", &powered);
BT_DBG("Powered = %d", powered);
if (powered == FALSE) {
#ifdef USB_BLUETOOTH
bt_state != VCONFKEY_BT_LE_STATUS_OFF) {
_bt_set_le_disabled(BLUETOOTH_ERROR_NONE);
}
- }
- else {
+ } else {
#ifdef USB_BLUETOOTH
_bt_handle_adapter_added();
#endif
GVariantIter value_iter;
GVariant *child = NULL, *val = NULL;
char *property = NULL;
- g_variant_iter_init (&value_iter, msg);
- while ((child = g_variant_iter_next_value (&value_iter))) {
+ g_variant_iter_init(&value_iter, msg);
+ while ((child = g_variant_iter_next_value(&value_iter))) {
g_variant_get(child, "{sv}", &property, &val);
ret_if(property == NULL);
char *status;
g_variant_get(val, "s", &status);
- if (strcasecmp(status, "active") == 0){
+ if (strcasecmp(status, "active") == 0) {
_bt_obex_transfer_started(path);
} else if (strcasecmp(status, "complete") == 0) {
_bt_obex_transfer_completed(path, TRUE);
_bt_pbap_obex_transfer_completed(path, TRUE);
- } else if (strcasecmp(status, "error") == 0){
+ } else if (strcasecmp(status, "error") == 0) {
_bt_obex_transfer_completed(path, FALSE);
_bt_pbap_obex_transfer_completed(path, FALSE);
}
static int transferred = 0;
g_variant_get(val, "t", &transferred);
- _bt_obex_transfer_progress(path,transferred);
+ _bt_obex_transfer_progress(path, transferred);
}
g_free(property);
g_variant_unref(val);
char *address;
GVariant *param = NULL;
bt_remote_dev_info_t *remote_dev_info;
- g_variant_iter_init (&value_iter, msg);
+ g_variant_iter_init(&value_iter, msg);
while ((g_variant_iter_loop(&value_iter, "{sv}", &property, &val))) {
BT_DBG("Property %s", property);
if (strcasecmp(property, "Connected") == 0) {
GVariantBuilder *builder = NULL;
int i = 0;
builder = g_variant_builder_new(G_VARIANT_TYPE("as"));
- for (i=0; i < remote_dev_info->uuid_count; i++) {
+ for (i = 0; i < remote_dev_info->uuid_count; i++) {
g_variant_builder_add(builder, "s",
remote_dev_info->uuids[i]);
}
return;
}
- if(paired == FALSE) {
+ if (paired == FALSE) {
BT_INFO("Unpaired: %s", address);
__bt_update_remote_cache_devinfo(address, FALSE);
param = g_variant_new("(is)", result, address);
GVariantBuilder *builder = NULL;
int i = 0;
builder = g_variant_builder_new(G_VARIANT_TYPE("as"));
- for (i=0; i < remote_dev_info->uuid_count; i++) {
+ for (i = 0; i < remote_dev_info->uuid_count; i++) {
g_variant_builder_add(builder, "s",
remote_dev_info->uuids[i]);
}
GVariant *child = NULL;
bt_remote_dev_info_t *remote_dev_info;
GVariant *param = NULL;
- g_variant_iter_init (&value_iter, msg);
- while ((child = g_variant_iter_next_value (&value_iter))) {
+ g_variant_iter_init(&value_iter, msg);
+ while ((child = g_variant_iter_next_value(&value_iter))) {
g_variant_get(child, "{sv}", &property, &val);
BT_INFO("Property %s", property);
if (strcasecmp(property, "Connected") == 0) {
char *interface_name = NULL;
GVariant *val = NULL;
- g_variant_get(msg, "(&s@a{sv}@as)", &interface_name, &val,NULL);
+ g_variant_get(msg, "(&s@a{sv}@as)", &interface_name, &val, NULL);
if (strcasecmp(interface_name, BT_ADAPTER_INTERFACE) == 0) {
__bt_adapter_property_changed_event(val,
object_path);
} else if (strcasecmp(interface_name, BT_DEVICE_INTERFACE) == 0) {
- __bt_device_property_changed_event(val,object_path);
+ __bt_device_property_changed_event(val, object_path);
} else if (strcasecmp(interface_name, BT_OBEX_TRANSFER_INTERFACE) == 0) {
BT_DBG("BT_OBEX_TRANSFER_INTERFACE");
__bt_obex_property_changed_event(val,
GVariant *val = NULL;
GVariant *child = NULL;
- g_variant_iter_init (&value_iter, msg);
- while ((child = g_variant_iter_next_value (&value_iter))) {
+ g_variant_iter_init(&value_iter, msg);
+ while ((child = g_variant_iter_next_value(&value_iter))) {
g_variant_get(child, "{sv}", &property, &val);
ret_if(property == NULL);
g_variant_get(val, "s", &status);
BT_DBG("Status is %s", status);
- if(strcasecmp(status, "active") == 0){
+ if (strcasecmp(status, "active") == 0) {
_bt_obex_client_started(path);
- }else if (strcasecmp(status, "complete") == 0) {
+ } else if (strcasecmp(status, "complete") == 0) {
_bt_obex_client_completed(path, TRUE);
- }else if (strcasecmp(status, "error") == 0){
+ } else if (strcasecmp(status, "error") == 0) {
_bt_obex_client_completed(path, FALSE);
}
g_free(status);
GVariant *child = NULL, *val = NULL;
bt_remote_dev_info_t *remote_dev_info;
GVariant *param = NULL;
- g_variant_iter_init (&value_iter, msg);
- while ((child = g_variant_iter_next_value (&value_iter))) {
+ g_variant_iter_init(&value_iter, msg);
+ while ((child = g_variant_iter_next_value(&value_iter))) {
g_variant_get(child, "{sv}", &property, &val);
ret_if(property == NULL);
GVariant *val = NULL;
GVariantIter value_iter;
GVariant *param = NULL;
- g_variant_iter_init (&value_iter, msg);
+ g_variant_iter_init(&value_iter, msg);
while ((g_variant_iter_loop(&value_iter, "{sv}", &property, &val))) {
if (strcasecmp(property, "Connected") == 0) {
int event = BLUETOOTH_EVENT_NONE;
GVariant *val = NULL;
int result = BLUETOOTH_ERROR_NONE;
GVariant *param = NULL;
- g_variant_iter_init (&value_iter, msg);
+ g_variant_iter_init(&value_iter, msg);
char_handle = g_strdup(path);
while ((g_variant_iter_loop(&value_iter, "{sv}", &property, &val))) {
BT_INFO("Property %s", property);
} else if (strcasecmp(property, "ChangedValue") == 0) {
int len = 0;
GByteArray *gp_byte_array = NULL;
- BT_INFO("Type '%s'\n", g_variant_get_type_string (val));
+ BT_INFO("Type '%s'\n", g_variant_get_type_string(val));
if (val) {
gp_byte_array = g_byte_array_new();
len = g_variant_get_size(val);
BT_DBG("Len = %d", len);
- g_byte_array_append (gp_byte_array,
+ g_byte_array_append(gp_byte_array,
(const guint8 *) g_variant_get_data(val), len);
if (gp_byte_array->len != 0) {
GVariant *byte_array = NULL;
GVariantBuilder *builder = NULL;
int i = 0;
builder = g_variant_builder_new(G_VARIANT_TYPE("as"));
- for (i=0; i < remote_dev_info->uuid_count; i++) {
+ for (i = 0; i < remote_dev_info->uuid_count; i++) {
g_variant_builder_add(builder, "s",
remote_dev_info->uuids[i]);
}
GVariantBuilder *builder = NULL;
int i = 0;
builder = g_variant_builder_new(G_VARIANT_TYPE("as"));
- for (i=0; i < remote_dev_info->uuid_count; i++) {
+ for (i = 0; i < remote_dev_info->uuid_count; i++) {
g_variant_builder_add(builder, "s",
remote_dev_info->uuids[i]);
}
*/
_bt_obex_check_pending_transfer(address);
_bt_opp_client_is_sending(&sending);
- if(sending == TRUE)
+ if (sending == TRUE)
_bt_opp_client_check_pending_transfer(address);
param = g_variant_new("(isy)", result, address, addr_type);
_bt_send_event(BT_DEVICE_EVENT,
GVariant *child = NULL;
GVariant *val = NULL;
GVariant *param = NULL;
- g_variant_iter_init (&value_iter, msg);
- while ((child = g_variant_iter_next_value (&value_iter))) {
+ g_variant_iter_init(&value_iter, msg);
+ while ((child = g_variant_iter_next_value(&value_iter))) {
g_variant_get(child, "{sv}", &property, &val);
wait_list->out_param1);
}
g_free(address);
- }else if (strcasecmp(value, "Connected") == 0) {
+ } else if (strcasecmp(value, "Connected") == 0) {
char *address;
char connected_address[BT_ADDRESS_STRING_SIZE + 1];
bluetooth_device_address_t device_address;
node = g_list_first(p_cache_list);
- while (node != NULL){
+ while (node != NULL) {
cache_info = (bt_cache_info_t *)node->data;
p_cache_list = g_list_remove(p_cache_list, cache_info);
__bt_free_cache_info(cache_info);
{
GVariantIter iter;
GVariant *child;
- char *interface_name= NULL;
+ char *interface_name = NULL;
GVariant *inner_iter = NULL;
g_variant_iter_init(&iter, msg);
while ((child = g_variant_iter_next_value(&iter))) {
- g_variant_get(child,"{&s@a{sv}}", &interface_name, &inner_iter);
+ g_variant_get(child, "{&s@a{sv}}", &interface_name, &inner_iter);
if (g_strcmp0(interface_name,
BT_DEVICE_INTERFACE) == 0) {
g_variant_unref(inner_iter);
#else
_bt_handle_adapter_added();
#endif
- }
- else {
+ } else {
bt_event = __bt_parse_event(value);
if (bt_event == BT_DEVICE_EVENT) {
bt_cache_info_t *cache_info;
GVariantBuilder *builder = NULL;
int i = 0;
builder = g_variant_builder_new(G_VARIANT_TYPE("as"));
- for (i=0; i < dev_info->uuid_count; i++) {
+ for (i = 0; i < dev_info->uuid_count; i++) {
g_variant_builder_add(builder, "s",
dev_info->uuids[i]);
}
if (g_strcmp0(interface, BT_PROPERTIES_INTERFACE) == 0) {
char *interface_name = NULL;
- g_variant_get(msg,"(&s@a{sv}@as)", &interface_name, NULL, NULL);
+ g_variant_get(msg, "(&s@a{sv}@as)", &interface_name, NULL, NULL);
retv_if(interface_name == NULL, FALSE);
if (strcasecmp(interface_name, BT_OBEX_TRANSFER_INTERFACE) == 0) {
if (g_strcmp0(interface, BT_PROPERTIES_INTERFACE) == 0) {
char *interface_name = NULL;
- g_variant_get(msg,"(&s@a{sv}@as)", &interface_name, NULL, NULL);
+ g_variant_get(msg, "(&s@a{sv}@as)", &interface_name, NULL, NULL);
retv_if(interface_name == NULL, FALSE);
char *obj_path = NULL;
if (strcasecmp(member, "InterfacesAdded") == 0) {
BT_DBG("InterfacesAdded");
- }else if (strcasecmp(member, "InterfacesRemoved") == 0) {
+ } else if (strcasecmp(member, "InterfacesRemoved") == 0) {
if (__bt_get_object_path(parameters, &obj_path)) {
BT_ERR("Fail to get the path");
return;
}
- BT_DBG("object_path =%s",obj_path);
+ BT_DBG("object_path = %s", obj_path);
if (strncmp(obj_path, BT_SESSION_BASEPATH_CLIENT,
strlen(BT_SESSION_BASEPATH_CLIENT)) != 0
|| strstr(obj_path, "transfer") == NULL) {
g_free(obj_path);
return;
- }
- else if (strncmp(obj_path, BT_SESSION_BASEPATH_CLIENT,
+ } else if (strncmp(obj_path, BT_SESSION_BASEPATH_CLIENT,
strlen(BT_SESSION_BASEPATH_CLIENT)) == 0) {
BT_DBG("Going to call opc disconnected");
_bt_opc_disconnected(obj_path);
_bt_sending_files();
g_free(obj_path);
- }else if (__bt_is_obexd_client_event(parameters, interface_name) == TRUE){
+ } else if (__bt_is_obexd_client_event(parameters, interface_name) == TRUE) {
char *path = (char *)object_path;
BT_INFO("object_path %s", path);
if (strncmp(path, BT_SESSION_BASEPATH_CLIENT,
if (accept == GAP_AGENT_ACCEPT) {
g_dbus_method_invocation_return_value(priv->reply_context, NULL);
} else if (accept == GAP_AGENT_ACCEPT_ALWAYS) {
- bluetooth_device_address_t addr = {{0,}};
+ bluetooth_device_address_t addr = { {0,} };
int result;
_bt_convert_addr_string_to_type(addr.addr,
void _bt_get_bluetooth_device_info(char *remote_address, bluetooth_device_info_t *device)
{
GArray *dev_list = NULL;
- int size,i=0;
+ int size = 0;
+ int i = 0;
bluetooth_device_info_t info;
char bond_address[BT_ADDRESS_STRING_SIZE] = { 0 };
- dev_list = g_array_new (FALSE, FALSE, sizeof(gchar));
+ dev_list = g_array_new(FALSE, FALSE, sizeof(gchar));
if (device == NULL)
return;
_bt_get_bonded_devices(&dev_list);
size = (dev_list->len) / sizeof(bluetooth_device_info_t);
- for (i=0; i < size; i++) {
+ for (i = 0; i < size; i++) {
info = g_array_index(dev_list, bluetooth_device_info_t, i);
_bt_convert_addr_type_to_string(bond_address, info.device_address.addr);
if (strcmp(bond_address, remote_address) == 0) {
void _bt_start_timer_for_connection(char *remote_address, int connection_type)
{
GArray *dev_list = NULL;
- int size,i=0,j;
+ int size;
+ int i;
+ int j;
bluetooth_device_info_t info;
char bond_address[BT_ADDRESS_STRING_SIZE] = { 0 };
- dev_list = g_array_new (FALSE, FALSE, sizeof(gchar));
+ dev_list = g_array_new(FALSE, FALSE, sizeof(gchar));
_bt_get_bonded_devices(&dev_list);
size = (dev_list->len) / sizeof(bluetooth_device_info_t);
- for (i=0; i < size; i++) {
+ for (i = 0; i < size; i++) {
info = g_array_index(dev_list, bluetooth_device_info_t, i);
j = 0;
_bt_convert_addr_type_to_string(bond_address,
info->dev_info.device_address.addr);
BT_INFO("Adding HFP Connected device to list");
p_connection_list = g_list_append(p_connection_list, info);
- }
- else if (event == BLUETOOTH_EVENT_AG_DISCONNECTED) {
+ } else if (event == BLUETOOTH_EVENT_AG_DISCONNECTED) {
/* Delete coresponding node */
BT_INFO("Deleting HFP Connected device from list");
GList *list = NULL;
}
}
-static void __bt_hid_disconnect_cb(GDBusProxy *proxy,GAsyncResult *res,
+static void __bt_hid_disconnect_cb(GDBusProxy *proxy, GAsyncResult *res,
gpointer user_data)
{
GError *g_error = NULL;
BT_ERR("no bluetooth device info, so BT was disabled at previous session");
} else {
if (bt_status != VCONFKEY_BT_STATUS_OFF) {
- if(vconf_set_int(VCONFKEY_BT_STATUS,
+ if (vconf_set_int(VCONFKEY_BT_STATUS,
VCONFKEY_BT_STATUS_OFF) != 0)
BT_ERR("Set vconf failed\n");
BT_ERR("no bluetooth device info, so BT was disabled at previous session");
} else {
if (bt_status != VCONFKEY_BT_LE_STATUS_OFF) {
- if(vconf_set_int(VCONFKEY_BT_LE_STATUS,
+ if (vconf_set_int(VCONFKEY_BT_LE_STATUS,
VCONFKEY_BT_LE_STATUS_OFF) != 0)
BT_ERR("Set vconf failed\n");
if (_bt_eventsystem_set_value(SYS_EVENT_BT_STATE, EVT_KEY_BT_LE_STATE,
BT_DBG("State: %d, LE State: %d", status, le_status);
if ((status != BT_ACTIVATING && status != BT_ACTIVATED) &&
- (le_status != BT_LE_ACTIVATING && le_status != BT_LE_ACTIVATED)){
+ (le_status != BT_LE_ACTIVATING && le_status != BT_LE_ACTIVATED)) {
_bt_terminate_service(NULL);
}
}
handle = __bt_get_net_profile(connection,
CONNECTION_ITERATOR_TYPE_CONNECTED,
address);
- if(handle)
+ if (handle)
*is_connected = TRUE;
else
*is_connected = FALSE;
return;
}
}
- info = (bt_obex_agent_info *)malloc (sizeof(bt_obex_agent_info));
+ info = (bt_obex_agent_info *)malloc(sizeof(bt_obex_agent_info));
if (info) {
memset(info, 0, sizeof(bt_obex_agent_info));
info->path = g_strdup(path);
void _bt_obex_set_complete_cb(char *object_path,
bt_obex_complete_cb func, gpointer data)
{
- bt_obex_agent_info *info =__find_obex_agent_info(object_path);;
+ bt_obex_agent_info *info = __find_obex_agent_info(object_path);;
/* Fix : NULL_RETURNS */
if (info == NULL)
retv_if(conn == NULL, NULL);
proxy = g_dbus_proxy_new_sync(conn, G_DBUS_PROXY_FLAGS_NONE,
- NULL,BT_OBEX_SERVICE_NAME,
+ NULL, BT_OBEX_SERVICE_NAME,
transfer_path,
BT_PROPERTIES_INTERFACE,
NULL, &err);
agent_info.auth_info->transfer_path = g_strdup(path);
#ifdef TIZEN_DPM_ENABLE
- if(_bt_dpm_get_allow_bluetooth_mode() == DPM_BT_HANDSFREE_ONLY) {
+ if (_bt_dpm_get_allow_bluetooth_mode() == DPM_BT_HANDSFREE_ONLY) {
/* Free auth info in next function */
_bt_obex_server_reject_authorize();
return FALSE;
gsize len = 0;
while (g_variant_iter_loop(iter, "{sv}", &key, &val)) {
if (g_strcmp0(key, "Name") == 0) {
- agent_info.auth_info->filename = g_variant_dup_string(val,&len);
+ agent_info.auth_info->filename = g_variant_dup_string(val, &len);
} else if (g_strcmp0(key, "Address") == 0) {
bdaddress = g_variant_dup_string(val, &len);
} else if (g_strcmp0(key, "Size") == 0) {
snprintf(file_path, sizeof(file_path), "%s", filename);
g_dbus_method_invocation_return_value(agent_info.auth_info->reply_context,
- g_variant_new("(s)",&file_path));
+ g_variant_new("(s)", &file_path));
agent_info.auth_info->reply_context = NULL;
agent_info.auth_info->file_path = g_strdup(file_path);
return BLUETOOTH_ERROR_INTERNAL;
}
- g_variant_get(reply ,"(@ay@ay)", &hash, &randomizer);
+ g_variant_get(reply, "(@ay@ay)", &hash, &randomizer);
g_variant_unref(reply);
- if(hash != NULL){
+ if (hash != NULL) {
local_oob_data->hash_len = (unsigned int)g_variant_get_size(hash);
local_hash = (unsigned char *)g_variant_get_data(hash);
} else {
g_variant_unref(hash);
- if(randomizer != NULL){
+ if (randomizer != NULL) {
local_oob_data->randomizer_len = (unsigned int)g_variant_get_size(randomizer);
local_randomizer = (unsigned char *)g_variant_get_data(randomizer);
} else {
if (sending_info == NULL)
return;
- if (file_offset < sending_info->file_count){
+ if (file_offset < sending_info->file_count) {
/* Get the session bus. */
g_conn = _bt_get_session_gconn();
ret_if(g_conn == NULL);
}
g_free(mimetype);
- }else{
+ } else {
file_offset = 0;
__bt_sending_release();
}
g_clear_error(&error);
result = BLUETOOTH_ERROR_INTERNAL;
- }else{
+ } else {
BT_DBG("Session created");
- if(sending_info != NULL)
+ if (sending_info != NULL)
sending_info->session_path = g_strdup(session_path);
}
g_free(session_path);
__bt_free_sending_info(sending_info);
sending_info = NULL;
- }else {
+ } else {
BT_DBG("Calling sending_files");
_bt_sending_files();
}
signal = g_variant_new("(issi)", result,
transfer_info->remote_device,
transfer_info->filename, success);
- switch(transfer_info->operation) {
+ switch (transfer_info->operation) {
case PULL_ALL: {
_bt_send_event(BT_PBAP_CLIENT_EVENT,
BLUETOOTH_PBAP_PHONEBOOK_PULL,
GVariant *child = NULL;
GVariant *value1 = NULL;
- g_variant_get(value ,"(@a(ss))", &value1); /* Format for value1 a(ss)*/
- gsize items = g_variant_iter_init (&iter, value1);
+ g_variant_get(value, "(@a(ss))", &value1); /* Format for value1 a(ss)*/
+ gsize items = g_variant_iter_init(&iter, value1);
vcard_list = g_new0(char *, items + 1);
- for (i = 0; (child = g_variant_iter_next_value (&iter)) != NULL; i++) {
- g_variant_get(child ,"(&s&s)", &elname, &elval);
+ for (i = 0; (child = g_variant_iter_next_value(&iter)) != NULL; i++) {
+ g_variant_get(child, "(&s&s)", &elname, &elval);
memset(list_entry, 0, PBAP_VCARDLIST_MAXLENGTH);
#if 0
- g_snprintf (list_entry, PBAP_VCARDLIST_MAXLENGTH - 1,
+ g_snprintf(list_entry, PBAP_VCARDLIST_MAXLENGTH - 1,
"<card handle = \"%s\" name = \"%s\"/>", elname, elval);
#else
- g_snprintf (list_entry, PBAP_VCARDLIST_MAXLENGTH - 1,
+ g_snprintf(list_entry, PBAP_VCARDLIST_MAXLENGTH - 1,
"%s", elval);
#endif
//If possible send as Array of <STRING, STRING>
}
BT_DBG("Address = %s", address_string);
- GVariant *temp = g_variant_new_strv((const gchar * const*)vcard_list, length);
+ GVariant *temp = g_variant_new_strv((const gchar*)vcard_list, length);
signal = g_variant_new("(isv)", result, address_string, temp);
_bt_send_event(BT_PBAP_CLIENT_EVENT,
} else {
g_variant_get(value, "(o@a{sv})", &transfer, &properties);
- if (g_variant_lookup (properties, "Filename", "s", &filename) == FALSE)
+ if (g_variant_lookup(properties, "Filename", "s", &filename) == FALSE)
filename = NULL;
BT_DBG("Transfer Path: %s", transfer);
GVariant *child = NULL;
GVariant *value1 = NULL;
- g_variant_get(value ,"(@a(ss))", &value1);
- gsize items = g_variant_iter_init (&iter, value1);
+ g_variant_get(value, "(@a(ss))", &value1);
+ gsize items = g_variant_iter_init(&iter, value1);
vcard_list = g_new0(char *, items + 1);
- for (i = 0; (child = g_variant_iter_next_value (&iter)) != NULL; i++) {
+ for (i = 0; (child = g_variant_iter_next_value(&iter)) != NULL; i++) {
g_variant_get(child, "(&s&s)", &elname, &elval);
memset(list_entry, 0, PBAP_VCARDLIST_MAXLENGTH);
- g_snprintf (list_entry, PBAP_VCARDLIST_MAXLENGTH - 1,
+ g_snprintf(list_entry, PBAP_VCARDLIST_MAXLENGTH - 1,
"<card handle = \"%s\" name = \"%s\"/>", elname, elval);
//If possible send as Array of <STRING, STRING>
BT_DBG("%s", list_entry);
BT_DBG("Address = %s", address_string);
signal = g_variant_new("(is@as)", result, address_string,
- g_variant_new_strv((const gchar * const*)vcard_list, length));
+ g_variant_new_strv((const gchar *)vcard_list, length));
_bt_send_event(BT_PBAP_CLIENT_EVENT,
BLUETOOTH_PBAP_PHONEBOOK_SEARCH,
GVariant *filters;
- g_variant_builder_init (&builder, G_VARIANT_TYPE_ARRAY);
- g_variant_builder_init (&inner_builder, G_VARIANT_TYPE_ARRAY);
+ g_variant_builder_init(&builder, G_VARIANT_TYPE_ARRAY);
+ g_variant_builder_init(&inner_builder, G_VARIANT_TYPE_ARRAY);
/* Add MaxlistCount*/
g_variant_builder_add(&builder, "{sv}", "MaxCount",
- g_variant_new("u",app_param->maxlist));
+ g_variant_new("u", app_param->maxlist));
/* Add Order Filter only if other than Indexed (default)*/
if (app_param->order > 0) {
order_str = g_strdup(ORDER[app_param->order]);
g_variant_builder_add(&builder, "{sv}", "Order",
- g_variant_new("s",order_str));
+ g_variant_new("s", order_str));
}
/* Add Offset Filter only if other than 0 (default)*/
if (app_param->offset > 0) {
g_variant_builder_add(&builder, "{sv}", "Offset",
- g_variant_new("u",app_param->offset));
+ g_variant_new("u", app_param->offset));
}
/* Add Format Filter only if other than vCard 2.1 (default)*/
bt_pbap_list_parameters_t *app_param = pbap_data->app_param;
- g_variant_builder_init (&builder, G_VARIANT_TYPE_ARRAY);
+ g_variant_builder_init(&builder, G_VARIANT_TYPE_ARRAY);
/* Add MaxlistCount*/
g_variant_builder_add(&builder, "{sv}", "MaxCount",
- g_variant_new("u",app_param->maxlist));
+ g_variant_new("u", app_param->maxlist));
/* Add Order Filter only if other than Indexed (default)*/
if (app_param->order > 0) {
order_str = g_strdup(ORDER[app_param->order]);
g_variant_builder_add(&builder, "{sv}", "Order",
- g_variant_new("s",order_str));
+ g_variant_new("s", order_str));
}
/* Add Offset Filter only if other than 0 (default)*/
if (app_param->offset > 0) {
g_variant_builder_add(&builder, "{sv}", "Offset",
- g_variant_new("u",app_param->offset));
+ g_variant_new("u", app_param->offset));
}
filters = g_variant_builder_end(&builder);
GVariant *filters;
bt_pbap_pull_vcard_parameters_t *app_param = pbap_data->app_param;
- g_variant_builder_init (&builder, G_VARIANT_TYPE_ARRAY);
- g_variant_builder_init (&inner_builder, G_VARIANT_TYPE_ARRAY);
+ g_variant_builder_init(&builder, G_VARIANT_TYPE_ARRAY);
+ g_variant_builder_init(&inner_builder, G_VARIANT_TYPE_ARRAY);
/* Add Format Filter only if other than vCard 2.1 (default)*/
// if (app_param->format > 0) {
GVariantBuilder builder;
GVariant *filters;
- g_variant_builder_init (&builder, G_VARIANT_TYPE_ARRAY);
+ g_variant_builder_init(&builder, G_VARIANT_TYPE_ARRAY);
/* Add MaxlistCount*/
g_variant_builder_add(&builder, "{sv}", "MaxCount",
- g_variant_new("u",app_param->maxlist));
+ g_variant_new("u", app_param->maxlist));
/* Add Order Filter only if other than Indexed (default)*/
if (app_param->order > 0) {
order_str = g_strdup(ORDER[app_param->order]);
g_variant_builder_add(&builder, "{sv}", "Order",
- g_variant_new("s",order_str));
+ g_variant_new("s", order_str));
}
/* Add Offset Filter only if other than 0 (default)*/
if (app_param->offset > 0) {
g_variant_builder_add(&builder, "{sv}", "Offset",
- g_variant_new("u",app_param->offset));
+ g_variant_new("u", app_param->offset));
}
filters = g_variant_builder_end(&builder);
#define BT_CHECK_PARAMETER(arg, func) \
do { \
- if (arg == NULL) \
- { \
+ if (arg == NULL) { \
BT_ERR("%s is NULL", #arg); \
func BLUETOOTH_ERROR_INVALID_PARAM; \
} \
} bt_le_device_info_type_t;
typedef enum {
- BT_PROFILE_CONN_RFCOMM= 0x01,
- BT_PROFILE_CONN_A2DP= 0x02,
- BT_PROFILE_CONN_HSP= 0x04,
- BT_PROFILE_CONN_HID= 0x08,
- BT_PROFILE_CONN_NAP= 0x10,
- BT_PROFILE_CONN_HFG= 0x20,
- BT_PROFILE_CONN_GATT= 0x40,
+ BT_PROFILE_CONN_RFCOMM = 0x01,
+ BT_PROFILE_CONN_A2DP = 0x02,
+ BT_PROFILE_CONN_HSP = 0x04,
+ BT_PROFILE_CONN_HID = 0x08,
+ BT_PROFILE_CONN_NAP = 0x10,
+ BT_PROFILE_CONN_HFG = 0x20,
+ BT_PROFILE_CONN_GATT = 0x40,
BT_PROGILE_CONN_NAP = 0x80,
- BT_PROFILE_CONN_A2DP_SINK= 0x100,
- BT_PROFILE_CONN_ALL= 0xffffffff,
+ BT_PROFILE_CONN_A2DP_SINK = 0x100,
+ BT_PROFILE_CONN_ALL = 0xffffffff,
} bt_profile_type_t;
typedef struct {