Fix bt-service crash issue
[platform/core/connectivity/bluetooth-frwk.git] / bt-service / include / bt-service-common.h
index fb73c79..27953b6 100644 (file)
@@ -51,18 +51,18 @@ extern "C" {
 
 #ifndef TIZEN_TV
 #define BT_DBG(fmt, args...) \
-        SLOGD(fmt, ##args)
+       SLOGD(fmt, ##args)
 #define BT_INFO(fmt, args...) \
-        SLOGI(fmt, ##args)
+       SLOGI(fmt, ##args)
 #define BT_ERR(fmt, args...) \
-        SLOGE(fmt, ##args)
+       SLOGE(fmt, ##args)
 #else
 #define BT_DBG(fmt, args...) \
-        LOGI(fmt, ##args)
+       LOGI(fmt, ##args)
 #define BT_INFO(fmt, args...) \
-        LOGI(fmt, ##args)
+       LOGI(fmt, ##args)
 #define BT_ERR(fmt, args...) \
-        LOGE(fmt, ##args)
+       LOGE(fmt, ##args)
 #endif
 
 #define BT_INFO_C(fmt, arg...) \
@@ -175,10 +175,11 @@ extern "C" {
 #define BT_OBEXD_MANAGER_INTERFACE "org.openobex.Manager"
 #define BT_OBEXD_TRANSFER_INTERFACE "org.openobex.Transfer"
 #define BT_A2DP_SOURCE_INTERFACE "org.bluez.AudioSource"
+#define BT_PROXIMITY_MONITOR_INTERFACE "org.bluez.ProximityMonitor1"
+#define BT_PROXIMITY_REPORTER_INTERFACE "org.bluez.ProximityReporter1"
 
 #define BT_PROPERTIES_INTERFACE "org.freedesktop.DBus.Properties"
 
-
 #define BT_OBEX_SERVICE_NAME "org.bluez.obex"
 #define BT_OBEX_CLIENT_PATH "/org/bluez/obex"
 #define BT_OBEX_CLIENT_INTERFACE "org.bluez.obex.Client1"
@@ -207,6 +208,15 @@ extern "C" {
 #define BT_DUMP_SERVICE_FINISH_SIGNAL "Finish"
 
 
+#define BT_DEVICED_POWEROFF_INTERFACE "org.tizen.system.deviced.PowerOff"
+#define BT_DEVICED_POWEROFF_OBJECT_PATH "/Org/Tizen/System/DeviceD/PowerOff"
+
+#define BT_DEVICED_POWEROFF_SIGNAL "ChangeState"
+#define BT_DEVICED_POWEROFF_SIGNAL_POWEROFF_POPUP (1)
+#define BT_DEVICED_POWEROFF_SIGNAL_POWEROFF (2)
+#define BT_DEVICED_POWEROFF_SIGNAL_REBOOT (3)
+
+
 #define BT_INTERFACES_ADDED "InterfacesAdded"
 #define BT_INTERFACES_REMOVED "InterfacesRemoved"
 #define BT_NAME_OWNER_CHANGED "NameOwnerChanged"
@@ -303,6 +313,19 @@ typedef struct {
 } bt_remote_le_dev_info_t;
 
 typedef struct {
+       char *address;
+       int addr_type;
+       int rssi;
+       int adv_type;
+       int company_id;
+       int ibeacon_type;
+       int major_id;
+       int minor_id;
+       int measured_power;
+       char *uuid;
+} bt_remote_ibeacon_dev_info_t;
+
+typedef struct {
        int rssi;
        int class;
        char *address;
@@ -336,11 +359,9 @@ typedef struct {
        char *address;
 } bt_function_data_t;
 
-GDBusConnection *_bt_get_system_conn(void);
-
-GDBusConnection *_bt_get_system_gconn(void);
+GDBusConnection *_bt_gdbus_get_system_gconn(void);
 
-GDBusConnection *_bt_get_session_gconn(void);
+GDBusConnection *_bt_gdbus_get_session_gconn(void);
 
 void *_bt_get_net_conn(void);
 
@@ -354,9 +375,15 @@ char *_bt_get_device_object_path(char *address);
 
 char *_bt_get_profile_uuid128(bt_profile_type_t profile_type);
 
-char *_bt_convert_error_to_string(int error);
+const char *_bt_convert_uuid_to_string(const char *uuid);
+
+const char *_bt_convert_error_to_string(int error);
+
+const char *_bt_convert_disc_reason_to_string(int reason);
+
+const char *_bt_convert_profile_state_to_string(bt_profile_state_t state);
 
-char * _bt_convert_disc_reason_to_string(int reason);
+const char *_bt_convert_service_function_to_string(int function);
 
 void _bt_logging_connection(gboolean connect, int addr_type);