Change-Id: I686a9b692ae77ff858be3d6237eb0f0fd5a6aadf
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
result, info,
event_info->cb, event_info->user_data);
result, info,
event_info->cb, event_info->user_data);
if (info->data) {
g_free(info->data);
if (info->data) {
g_free(info->data);
result, ind_res,
event_info->cb, event_info->user_data);
result, ind_res,
event_info->cb, event_info->user_data);
if (ind_res->data) {
g_free(ind_res->data);
if (ind_res->data) {
g_free(ind_res->data);
return BLUETOOTH_ERROR_NONE;
}
return BLUETOOTH_ERROR_NONE;
}
- if (service_monitor_list == NULL) {
+ if (service_monitor_list == NULL)
_bt_register_manager_subscribe_signal(TRUE);
_bt_register_manager_subscribe_signal(TRUE);
addr = g_malloc0(sizeof(bluetooth_device_address_t));
memcpy(addr, address, sizeof(bluetooth_device_address_t));
addr = g_malloc0(sizeof(bluetooth_device_address_t));
memcpy(addr, address, sizeof(bluetooth_device_address_t));
if (ret != BLUETOOTH_ERROR_NONE)
BT_ERR("Failed to stop ADV %d", ret);
if (ret != BLUETOOTH_ERROR_NONE)
BT_ERR("Failed to stop ADV %d", ret);
- if (main_loop != NULL) {
g_main_loop_quit(main_loop);
g_main_loop_quit(main_loop);
}
static void _bt_otp_set_char_value(const char *obj_path,
}
static void _bt_otp_set_char_value(const char *obj_path,
- while ((filename = g_dir_read_name(dir))) {
+ while ((filename = g_dir_read_name(dir)))
list = g_slist_append(list, (gpointer) filename);
list = g_slist_append(list, (gpointer) filename);
}
if (g_strcmp0(obj_path, otp_feature_obj_path)) {
}
if (g_strcmp0(obj_path, otp_feature_obj_path)) {
- if (!selected_object) {
return BLUETOOTH_OTP_ERROR_OBJECT_NOT_SELECTED;
return BLUETOOTH_OTP_ERROR_OBJECT_NOT_SELECTED;
}
info = otp_get_char_value(obj_path);
}
info = otp_get_char_value(obj_path);
/* Send indication for CPs */
if (!g_strcmp0(char_path, otp_oacp_obj_path)) {
/* Send indication for CPs */
if (!g_strcmp0(char_path, otp_oacp_obj_path)) {
_bt_otp_send_indication(char_path, &info, &addr_hex);
_bt_otp_send_indication(char_path, &info, &addr_hex);
} else if (!g_strcmp0(char_path, otp_olcp_obj_path)) {
} else if (!g_strcmp0(char_path, otp_olcp_obj_path)) {
_bt_otp_send_indication(char_path, &info, &addr_hex);
_bt_otp_send_indication(char_path, &info, &addr_hex);
}
} else {
BT_ERR("Array Len 0");
}
} else {
BT_ERR("Array Len 0");
indicate ? "StartNotify" : "StopNotify");
BT_INFO("Type '%s'\n", g_variant_get_type_string(var));
indicate ? "StartNotify" : "StopNotify");
BT_INFO("Type '%s'\n", g_variant_get_type_string(var));
- if (!g_strcmp0(char_path, otp_oacp_obj_path)) {
+ if (!g_strcmp0(char_path, otp_oacp_obj_path))
OACP_indicate = indicate;
OACP_indicate = indicate;
- } else if (!g_strcmp0(char_path, otp_olcp_obj_path)) {
+ else if (!g_strcmp0(char_path, otp_olcp_obj_path))
OLCP_indicate = indicate;
OLCP_indicate = indicate;
BT_INFO("Interface %s, Signal %s", interface_name, signal_name);
if (g_strcmp0(interface_name, BT_OTP_INTERFACE_NAME) == 0) {
BT_INFO("Interface %s, Signal %s", interface_name, signal_name);
if (g_strcmp0(interface_name, BT_OTP_INTERFACE_NAME) == 0) {
- if (strcasecmp(signal_name, BLE_DISABLED) == 0) {
+ if (strcasecmp(signal_name, BLE_DISABLED) == 0)
BT_DBG("g_main_loop_quit called!");
BT_DBG("g_main_loop_quit called!");
- if (main_loop != NULL) {
g_main_loop_unref(main_loop);
g_main_loop_unref(main_loop);
}
if (headed_plugin_info->plugin_headed_enabled) {
}
if (headed_plugin_info->plugin_headed_enabled) {
- if (headed_plugin_info->headed_plugin->bt_is_tethering_enabled() == FALSE) {
+ if (headed_plugin_info->headed_plugin->bt_is_tethering_enabled() == false) {
BT_ERR("BT tethering is not enabled");
goto fail;
}
BT_ERR("BT tethering is not enabled");
goto fail;
}
int __get_handle_length(char *handle)
{
int i = 0;
int __get_handle_length(char *handle)
{
int i = 0;
- while (handle && (handle[i] != '\0')) {
+
+ while (handle && (handle[i] != '\0'))
builder1 = g_variant_builder_new(G_VARIANT_TYPE("ay"));
builder1 = g_variant_builder_new(G_VARIANT_TYPE("ay"));
- for (i = 0; i < length; i++) {
+ for (i = 0; i < length; i++)
g_variant_builder_add(builder1, "y", param[i]);
g_variant_builder_add(builder1, "y", param[i]);
val = g_variant_new("ay", builder1);
builder2 = g_variant_builder_new(G_VARIANT_TYPE("a{sv}"));
val = g_variant_new("ay", builder1);
builder2 = g_variant_builder_new(G_VARIANT_TYPE("a{sv}"));
const char *filename,
const char *agent_path);
void (*bt_destroy_popup_all)(void);
const char *filename,
const char *agent_path);
void (*bt_destroy_popup_all)(void);
- gboolean (*bt_launch_unable_to_pairing_syspopup)(int result);
- gboolean (*bt_is_tethering_enabled)(void);
+ bool (*bt_launch_unable_to_pairing_syspopup)(int result);
+ bool (*bt_is_tethering_enabled)(void);
int (*bt_get_mime_type)(char *file_name, char **mime_type);
};
int (*bt_get_mime_type)(char *file_name, char **mime_type);
};
#define BLUETOOTH_ATT_ERROR_WRITE_REQUEST_REJECTED 0xFC
#define BLUETOOTH_ATT_ERROR_CCCD_IMPROPERLY_CONFIGURED 0xFD
#define BLUETOOTH_ATT_ERROR_PROCEDURE_ALREADY_IN_PROGRESS 0xFE
#define BLUETOOTH_ATT_ERROR_WRITE_REQUEST_REJECTED 0xFC
#define BLUETOOTH_ATT_ERROR_CCCD_IMPROPERLY_CONFIGURED 0xFD
#define BLUETOOTH_ATT_ERROR_PROCEDURE_ALREADY_IN_PROGRESS 0xFE
-#define BLUETOOTH_ATT_ERROR_OUT_OF_RANGE 0xFF
+#define BLUETOOTH_ATT_ERROR_OUT_OF_RANGE 0xFF
/*
* Bluetooth ATT error codes specific to OTP
/*
* Bluetooth ATT error codes specific to OTP
-int bluetooth_otp_write_characteristics_value( const char *handle,
+int bluetooth_otp_write_characteristics_value(const char *handle,
unsigned char *buf, int length);
/**
unsigned char *buf, int length);
/**
#ifndef __BLUETOOTH_PLUGIN_H
#define __BLUETOOTH_PLUGIN_H
#ifndef __BLUETOOTH_PLUGIN_H
#define __BLUETOOTH_PLUGIN_H
#undef LOG_TAG
#define LOG_TAG "BLUETOOTH_FRWK_PLUGIN"
#undef LOG_TAG
#define LOG_TAG "BLUETOOTH_FRWK_PLUGIN"
} bt_agent_event_type_t;
struct bluetooth_headed_plugin_t {
} bt_agent_event_type_t;
struct bluetooth_headed_plugin_t {
- int (*bt_launch_dpmpopup) (char *mode);
+ int (*bt_launch_dpmpopup)(char *mode);
int (*bt_launch_system_popup)(bt_agent_event_type_t event_type,
const char *device_name,
const unsigned char *auth_info,
int (*bt_launch_system_popup)(bt_agent_event_type_t event_type,
const char *device_name,
const unsigned char *auth_info,
const char *agent_path);
void (*bt_destroy_popup_all)(void);
const char *agent_path);
void (*bt_destroy_popup_all)(void);
- gboolean (*bt_launch_unable_to_pairing_syspopup)(int result);
- gboolean (*bt_is_tethering_enabled)(void);
+ bool (*bt_launch_unable_to_pairing_syspopup)(int result);
+ bool (*bt_is_tethering_enabled)(void);
int (*bt_get_mime_type)(char *file_name, char **mime_type);
};
int (*bt_get_mime_type)(char *file_name, char **mime_type);
};
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
-gboolean bt_launch_unable_to_pairing_syspopup(int result)
+bool bt_launch_unable_to_pairing_syspopup(int result)
{
BT_DBG("+");
int ret = 0;
{
BT_DBG("+");
int ret = 0;
b = bundle_create();
if (b == NULL)
b = bundle_create();
if (b == NULL)
bundle_add(b, "event-type", "unable-to-pairing");
bundle_add(b, "event-type", "unable-to-pairing");
-gboolean bt_is_tethering_enabled(void)
+bool bt_is_tethering_enabled(void)
if (ret != TETHERING_ERROR_NONE)
BT_ERR("Fail to destroy tethering: %d", ret);
if (ret != TETHERING_ERROR_NONE)
BT_ERR("Fail to destroy tethering: %d", ret);
- return (gboolean)enabled;
}
int bt_get_mime_type(char *file_name, char **mime_type)
}
int bt_get_mime_type(char *file_name, char **mime_type)