Add the sender name in signal subscribe function
[platform/core/connectivity/bluetooth-frwk.git] / bt-service-adaptation / services / include / bt-service-core-device.h
1 /*
2  * Copyright (c) 2015 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
3  *
4  * Contact:  Anupam Roy <anupam.r@samsung.com>
5  *
6  * Licensed under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  *              http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  *
18  */
19
20 #ifndef _BT_SERVICE_CORE_DEVICE_H_
21 #define _BT_SERVICE_CORE_DEVICE_H_
22
23 #include <sys/types.h>
24 #include "bluetooth-api.h"
25
26 #ifdef __cplusplus
27 extern "C" {
28 #endif
29
30 #define BT_DEVICE_PIN_CODE_SLOT_MAX 10
31 typedef struct {
32         char *address;
33         char *pin_code;
34 } bt_pin_code_info_t;
35
36 gboolean _bt_is_device_creating(void);
37
38 #ifdef TIZEN_GATT_CLIENT
39 int _bt_le_connection_update(const char *sender,
40                 unsigned char *device_address,
41                 float interval_min, float interval_max,
42                 guint16 latency, guint16 time_out);
43 #endif
44
45 #ifdef TIZEN_FEATURE_BT_OBEX
46 bluetooth_trusted_profile_t _bt_get_trusted_profile_enum(const char *uuid);
47 #endif
48
49 void _bt_device_state_handle_callback_set_request(void);
50
51 int _bt_device_get_bonded_device_info(bluetooth_device_address_t *addr);
52
53 int _bt_set_alias(bluetooth_device_address_t *device_address, const char *alias);
54
55 int _bt_bond_device(bluetooth_device_address_t *device_address,
56                 unsigned short conn_type, GArray **out_param1);
57
58 int _bt_unbond_device(bluetooth_device_address_t *device_address,
59                 GArray **out_param1);
60
61 int _bt_cancel_bonding(void);
62
63 gboolean _bt_is_bonding_device_address(const char *address);
64
65 gboolean _bt_device_is_bonding(void);
66
67 gboolean _bt_device_is_pairing(void);
68
69 int _bt_cancel_search_device(void);
70
71 int _bt_search_device(bluetooth_device_address_t *device_address);
72
73 gboolean _bt_is_bonding_device_address(const char *address);
74
75 void _bt_set_autopair_status_in_bonding_info(gboolean is_autopair);
76
77 int _bt_passkey_reply(const char *passkey, gboolean authentication_reply);
78
79 int _bt_passkey_confirmation_reply(gboolean confirmation_reply);
80
81 int _bt_set_authorization(bluetooth_device_address_t *device_address,
82                                 gboolean authorize);
83
84 gboolean _bt_is_device_connected(bluetooth_device_address_t *device_address, int svc_type);
85
86 int _bt_rfcomm_reply_conn_authorization(char *address, gboolean reply);
87
88 int _bt_get_bonded_device_info(bluetooth_device_address_t *dev_addr);
89
90 int _bt_get_bonded_devices(void);
91
92 void _bt_service_get_bonded_dev_list(GArray **dev_list);
93
94 bt_remote_dev_info_t *_bt_service_get_remote_dev_info(const char *address);
95
96 gboolean _bt_is_bonded_devices_retrived(void);
97
98 void _bt_device_handle_paired_address_list(bluetooth_device_address_t *addr_list, int count);
99
100 void _bt_device_handle_adapter_state(gboolean enabled);
101
102 int _bt_is_alias_set(bluetooth_device_address_t *device_address);
103
104 int _bt_get_connected_link(bluetooth_device_address_t *device_address);
105
106 int _bt_set_trust_profile(bluetooth_device_address_t *bd_addr,
107                 bluetooth_trusted_profile_t profile, gboolean trust);
108
109 int _bt_get_trust_profile(bluetooth_device_address_t *bd_addr,
110                 bluetooth_trusted_profile_t profile, guint *trust);
111
112 int _bt_enable_rssi(bluetooth_device_address_t *addr, int link_type,
113                 int low_threshold, int in_range_threshold, int high_threshold);
114
115 int _bt_get_rssi_strength(bluetooth_device_address_t *bd_addr, int link_type);
116
117 int _bt_set_passkey_notification(const char *sender, gboolean enable);
118
119 int _bt_set_pin_code(bluetooth_device_address_t *device_address,
120                 bluetooth_device_pin_code_t *pin_code);
121
122 int _bt_unset_pin_code(bluetooth_device_address_t *device_address);
123
124 int _bt_disconnect_device(bluetooth_device_address_t *device_addr);
125
126 int _bt_get_le_connection_parameter(bluetooth_le_connection_mode_t mode,
127                 bluetooth_le_connection_param_t *param);
128 int _bt_device_get_ida(bluetooth_device_address_t *device_address,
129                 bluetooth_device_address_t *id_address);
130 #ifdef __cplusplus
131 }
132 #endif /* __cplusplus */
133 #endif /*_BT_SERVICE_CORE_DEVICE_H_*/
134