" </interface>"
"</node>";
-GDBusNodeInfo *otp_node_info = NULL;
+static GDBusNodeInfo *otp_node_info = NULL;
static GDBusConnection *g_conn;
static guint g_owner_id = 0;
#define BT_HAL_MULTI_ADV_UPDATE_EVT 5
#define BT_HAL_LEGACY_ADV_STATUS 6
-handle_stack_msg gatt_le_event_cb;
+static handle_stack_msg gatt_le_event_cb;
/* Advertising filter_policy */
static int adv_filter_policy;
bt_bdaddr_t bd_addr;
};
-struct avrcp_proxy proxy_array[BT_AUDIO_SOURCE_MAX];
+static struct avrcp_proxy proxy_array[BT_AUDIO_SOURCE_MAX];
static guint bus_id;
-GDBusNodeInfo *new_conn_node;
+static GDBusNodeInfo *new_conn_node;
static const gchar rfcomm_agent_xml[] =
"<node name='/'>"
" <interface name='org.bluez.Profile1'>"
#include "bt-hal-event-receiver.h"
#include "bt-hal-adapter-le.h"
+#include "bt-hal-gatt.h"
#include "bt-hal-gatt-client.h"
#include "bt-hal-dbus-common-utils.h"
#include "bt-hal-utils.h"
/************************************************************************************
** Static variables
************************************************************************************/
-extern const btgatt_callbacks_t *bt_gatt_callbacks;
-#define CHECK_BTGATT_INIT() if (bt_gatt_callbacks == NULL)\
+#define CHECK_BTGATT_INIT() if (_bt_hal_gatt_interface_ready() == false)\
{\
ERR("%s: BTGATT not initialized", __FUNCTION__);\
return BT_STATUS_NOT_READY;\
#include "bt-hal-utils.h"
#include "bt-hal-dbus-common-utils.h"
+#include "bt-hal-gatt.h"
#include "bt-hal-adapter-le.h"
#include "bt-hal-event-receiver.h"
** Static variables
************************************************************************************/
extern const btgatt_callbacks_t *bt_gatt_callbacks;
-guint owner_id;
-GDBusConnection *g_conn = NULL;
-//GDBusConnection *conn = NULL;
-GDBusNodeInfo *manager_node_info = NULL;
-guint manager_id;
+static guint owner_id;
+static GDBusConnection *g_conn = NULL;
+static GDBusNodeInfo *manager_node_info = NULL;
+static guint manager_id;
/* Global handles which needs to be incremented during each addition */
static int gatt_service_handle = 10;
static gboolean instance_id_used[BT_GATTS_MAX];
-#define CHECK_BTGATT_INIT() if (bt_gatt_callbacks == NULL)\
+#define CHECK_BTGATT_INIT() if (_bt_hal_gatt_interface_ready() == false)\
{\
ERR("%s: BTGATT not initialized", __FUNCTION__);\
return BT_STATUS_NOT_READY;\
} bt_hal_le_adv_info_t;
/****************************************** Global Variables ******************************************/
-const btgatt_callbacks_t *bt_gatt_callbacks = NULL;
+static const btgatt_callbacks_t *bt_gatt_callbacks = NULL;
extern btgatt_client_interface_t btgatt_client_interface;
extern btgatt_server_interface_t btgatt_server_interface;
static void __bt_hal_handle_gatt_client_mtu_exchange_completed(void *buf, uint16_t len);
/*****************************************************************************************************/
-static bool interface_ready(void)
+bool _bt_hal_gatt_interface_ready(void)
{
return bt_gatt_callbacks != NULL;
}
{
DBG("GATT event 0x%x", message);
/* Check if GATT interface is Ready */
- if (!interface_ready())
+ if (!_bt_hal_gatt_interface_ready())
return;
switch (message) {
#include <stdio.h>
#include <hardware/bt_gatt.h>
+bool _bt_hal_gatt_interface_ready(void);
+
btgatt_interface_t *bt_get_gatt_interface(void);
void bt_hal_release_pending_adv_ind_list(void);
static GMainContext *event_thread_context;
static oal_event_callback event_handler_cb;
-GMainLoop *event_loop;
+static GMainLoop *event_loop;
void _bt_event_dispatcher_deinit()
{
#define BT_DBG(fmt, arg...) SLOGD(fmt, ##arg)
/* OTP object paths */
-char *otp_obj_path = NULL;
-char *otp_feature_obj_path = NULL;
-char *otp_object_name_obj_path = NULL;
-char *otp_object_type_obj_path = NULL;
-char *otp_object_size_obj_path = NULL;
-char *otp_object_first_created_obj_path = NULL;
-char *otp_object_last_modified_obj_path = NULL;
-char *otp_object_id_obj_path = NULL;
-char *otp_object_prop_obj_path = NULL;
-char *otp_oacp_obj_path = NULL;
-char *otp_olcp_obj_path = NULL;
-char *otp_oacp_desc_obj_path = NULL;
-char *otp_olcp_desc_obj_path = NULL;
+static char *otp_obj_path = NULL;
+static char *otp_feature_obj_path = NULL;
+static char *otp_object_name_obj_path = NULL;
+static char *otp_object_type_obj_path = NULL;
+static char *otp_object_size_obj_path = NULL;
+static char *otp_object_first_created_obj_path = NULL;
+static char *otp_object_last_modified_obj_path = NULL;
+static char *otp_object_id_obj_path = NULL;
+static char *otp_object_prop_obj_path = NULL;
+static char *otp_oacp_obj_path = NULL;
+static char *otp_olcp_obj_path = NULL;
+static char *otp_oacp_desc_obj_path = NULL;
+static char *otp_olcp_desc_obj_path = NULL;
static GMainLoop *main_loop;
-GDBusNodeInfo *otp_node_info = NULL;
+static GDBusNodeInfo *otp_node_info = NULL;
static GDBusConnection *conn;
static GDBusConnection *g_conn;
static int adv_handle = 0;
static gboolean OACP_indicate = FALSE;
static gboolean OLCP_indicate = FALSE;
-char *directory = NULL;
-gboolean mutiple_obj_support = false;
+static char *directory = NULL;
+static gboolean mutiple_obj_support = false;
static gboolean otc_connection_status = FALSE;
-struct oacp_operation *oacp_op = NULL;
-unsigned int timeout_id;
-unsigned int oacp_create_timeout_id;
-uint64_t curr_obj_id, prev_obj_id;
+static struct oacp_operation *oacp_op = NULL;
+static unsigned int timeout_id;
+static unsigned int oacp_create_timeout_id;
+static uint64_t curr_obj_id, prev_obj_id;
static gboolean oacp_create = FALSE;
static const gchar otp_introspection_xml[] =
gboolean is_scanning;
} bt_adapter_le_scanner_t;
-GSList *scanner_list = NULL;
+static GSList *scanner_list = NULL;
static gboolean is_le_set_scan_parameter = FALSE;
static gboolean is_le_scanning = FALSE;
static gboolean scan_filter_enabled = FALSE;
#include "bt-service-ipsp.h"
#endif
/* For maintaining Application Sync API call requests */
-GSList *invocation_list = NULL;
+static GSList *invocation_list = NULL;
static GDBusConnection *bt_service_conn;
static guint owner_id = 0;
static cynara *p_cynara;
static cynara_configuration *conf;
-const char *requester_unique_creds = NULL;
+static const char *requester_unique_creds = NULL;
static const gchar bt_service_introspection_xml[] =
"<node name='/org/projectx/bt_service'>"
void *data;
} bt_service_oal_event_data_t;
-_bt_battery_data_t *current_session_data = NULL;
+static _bt_battery_data_t *current_session_data = NULL;
static void __bt_bm_add_prev_time(uint32_t scan_time);
static int __bt_start_session_time(void);
void *data;
} bt_service_oal_event_data_t;
-_bt_service_event_handler_callback adapter_cb;
-_bt_service_event_handler_callback device_cb;
-_bt_service_event_handler_callback hid_cb;
-_bt_service_event_handler_callback hid_device_cb;
-_bt_service_event_handler_callback socket_cb;
-_bt_service_event_handler_callback audio_event_cb;
-_bt_service_event_handler_callback a2dp_source_cb;
-_bt_service_event_handler_callback a2dp_sink_cb;
-_bt_service_event_handler_callback ag_cb;
-_bt_service_event_handler_callback hdp_cb;
-_bt_service_event_handler_callback avrcp_ctrl_cb;
-_bt_service_event_handler_callback avrcp_cb;
-_bt_service_event_handler_callback adapter_le_cb;
-_bt_service_event_handler_callback adapter_gatt_cb;
-_bt_service_event_handler_callback hf_client_cb;
-_bt_service_event_handler_callback mesh_cb;
+static _bt_service_event_handler_callback adapter_cb;
+static _bt_service_event_handler_callback device_cb;
+static _bt_service_event_handler_callback hid_cb;
+static _bt_service_event_handler_callback hid_device_cb;
+static _bt_service_event_handler_callback socket_cb;
+static _bt_service_event_handler_callback audio_event_cb;
+static _bt_service_event_handler_callback a2dp_source_cb;
+static _bt_service_event_handler_callback a2dp_sink_cb;
+static _bt_service_event_handler_callback ag_cb;
+static _bt_service_event_handler_callback hdp_cb;
+static _bt_service_event_handler_callback avrcp_ctrl_cb;
+static _bt_service_event_handler_callback avrcp_cb;
+static _bt_service_event_handler_callback adapter_le_cb;
+static _bt_service_event_handler_callback adapter_gatt_cb;
+static _bt_service_event_handler_callback hf_client_cb;
+static _bt_service_event_handler_callback mesh_cb;
void _bt_service_register_event_handler_callback(
bt_service_module_t module, _bt_service_event_handler_callback cb)
} bt_incoming_bond_data_t;
/* Bonding and Pairing Informations */
-bt_bond_data_t *trigger_bond_info;
-bt_bond_data_t *trigger_unbond_info;
-bt_pairing_data_t *trigger_pairing_info;
-bt_service_search_info_data_t *service_search_info;
+static bt_bond_data_t *trigger_bond_info;
+static bt_bond_data_t *trigger_unbond_info;
+static bt_pairing_data_t *trigger_pairing_info;
+static bt_service_search_info_data_t *service_search_info;
-bt_incoming_bond_data_t *incoming_bond_info;
+static bt_incoming_bond_data_t *incoming_bond_info;
typedef enum {
BT_DEVICE_BOND_STATE_NONE,
#define BDADDR_ANY (&(bluetooth_device_address_t) {{0, 0, 0, 0, 0, 0} })
#ifdef TIZEN_GATT_CLIENT
-char uuid_list[NUM_UUID][BT_UUID_STRING_MAX] = {"0000b00b-0000-0000-f065-080080fa49b5", /* Used by BLEAPP */
+static char uuid_list[NUM_UUID][BT_UUID_STRING_MAX] = {"0000b00b-0000-0000-f065-080080fa49b5", /* Used by BLEAPP */
"0000b00b-1111-1111-0123-456789ab0cd2", /* Used by BLEAPP */
"0000b00b-2222-1111-0123-456789ab0cd2",
"0000b00b-3333-1111-0123-456789ab0cd2",
"0000b00c-2222-1111-0123-456789ab0cd2",
"0000b00c-3333-1111-0123-456789ab0cd2"};
#else
-char uuid_list[NUM_UUID][BT_UUID_STRING_MAX] = {"0000b00b-0000-0000-f065-080080fa49b5", /* Used by BLEAPP */
+static char uuid_list[NUM_UUID][BT_UUID_STRING_MAX] = {"0000b00b-0000-0000-f065-080080fa49b5", /* Used by BLEAPP */
"0000b00b-1111-1111-0123-456789ab0cd2", /* Used by BLEAPP */
"0000b00b-2222-1111-0123-456789ab0cd2",
"0000b00b-3333-1111-0123-456789ab0cd2",
static GSList *transfer_list = NULL;
-bt_session_info_t *session_info;
+static bt_session_info_t *session_info;
static void __bt_free_session_info(bt_session_info_t *info)
{
#define BT_MIME_TYPE_MAX_LEN 20
static GSList *transfer_list = NULL;
-bt_sending_info_t *sending_info;
+static bt_sending_info_t *sending_info;
static int file_offset = 0;
#define DBUS_TIEMOUT 20 * 1000 /* 20 Seconds */
#define PBAP_DEFAULT_DOWNLAOD_PATH "/opt/usr/home/owner/media/Downloads"
#define PBAP_DEFAULT_FILE_NAME "pb.vcf"
-char *FIELDS[] = {
+static char *FIELDS[] = {
"VERSION",
"FN",
"N",
"X-IRMC-CALL-DATETIME", /* 29 */
};
-char *SOURCE[] = {
+static char *SOURCE[] = {
"int", //Phone memory
"sim" // SIM memory
};
-char *TYPE[] = {
+static char *TYPE[] = {
"pb", //Phonebook for the saved contacts
"ich", //Incoming call history
"och", //Outgoing call history
"cch", //Combined Call History cch = ich + och + mch
};
-char *FORMAT[] = {
+static char *FORMAT[] = {
"vcard21", // vCard Format 2.1 (Default)
"vcard30", // vCard Format 3.0
};
-char *ORDER[] = {
+static char *ORDER[] = {
"indexed", // Index (default)
"alphanumeric", // Alphanumeric
"phonetic", // Phonetic
};
-char *SEARCH_FIELD[] = {
+static char *SEARCH_FIELD[] = {
"name", // Search by Name(default)
"number", // Search by Phone Number
"sound", // Search by phonetic sound
#include "bt-service-event.h"
//#include "bt-service-device.h"
-guint nap_connected_device_count = 0;
+static guint nap_connected_device_count = 0;
static GDBusConnection *manager_conn;
void bt_set_device_values(gboolean connected, int state)
bt_socket_client_conn_cb conn_cb;
} bt_socket_info_t;
-bt_socket_info_t *pending_conn_info;
+static bt_socket_info_t *pending_conn_info;
/* Function to handle socket disconnection */
void __handle_socket_disconnected(event_socket_client_conn_t *client_info)