b8a273cd2ee2687090a37634fc02a52ef9f05016
[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 #ifdef TIZEN_FEATURE_BT_OBEX
31 typedef struct {
32         char *address;
33         char *pin_code;
34 } bt_pin_code_info_t;
35
36
37 gboolean _bt_is_device_creating(void);
38
39 bluetooth_trusted_profile_t _bt_get_trusted_profile_enum(const char *uuid);
40
41 int _bt_get_device_pin_code(const char *address, char *pin_code);
42 #endif
43
44 void _bt_device_state_handle_callback_set_request(void);
45
46 int _bt_device_get_bonded_device_info(bluetooth_device_address_t *addr);
47
48 int _bt_set_alias(bluetooth_device_address_t *device_address, const char *alias);
49
50 int _bt_bond_device(bluetooth_device_address_t *device_address,
51                 unsigned short conn_type, GArray **out_param1);
52
53 int _bt_unbond_device(bluetooth_device_address_t *device_address,
54                 GArray **out_param1);
55
56 int _bt_cancel_bonding(void);
57
58 gboolean _bt_is_bonding_device_address(const char *address);
59
60 gboolean _bt_device_is_bonding(void);
61
62 gboolean _bt_device_is_pairing(void);
63
64 int _bt_cancel_search_device(void);
65
66 int _bt_search_device(bluetooth_device_address_t *device_address);
67
68 gboolean _bt_is_bonding_device_address(const char *address);
69
70 void _bt_set_autopair_status_in_bonding_info(gboolean is_autopair);
71
72 int _bt_passkey_reply(const char *passkey, gboolean authentication_reply);
73
74 int _bt_passkey_confirmation_reply(gboolean confirmation_reply);
75
76 int _bt_set_authorization(bluetooth_device_address_t *device_address,
77                                 gboolean authorize);
78
79 gboolean _bt_is_device_connected(bluetooth_device_address_t *device_address, int svc_type);
80
81 int _bt_rfcomm_reply_conn_authorization(char *address, gboolean reply);
82
83 int _bt_get_bonded_device_info(bluetooth_device_address_t *dev_addr);
84
85 int _bt_get_bonded_devices(void);
86
87 bt_remote_dev_info_t *_bt_service_get_remote_dev_info(const char *address);
88
89 gboolean _bt_is_bonded_devices_retrived(void);
90
91 void _bt_device_handle_paired_address_list(bluetooth_device_address_t *addr_list, int count);
92
93 void _bt_device_handle_adapter_state(gboolean enabled);
94
95 int _bt_is_alias_set(bluetooth_device_address_t *device_address);
96
97 int _bt_get_connected_link(bluetooth_device_address_t *device_address);
98
99 int _bt_set_trust_profile(bluetooth_device_address_t *bd_addr,
100                 bluetooth_trusted_profile_t profile, gboolean trust);
101
102 int _bt_get_trust_profile(bluetooth_device_address_t *bd_addr,
103                 bluetooth_trusted_profile_t profile, guint *trust);
104
105 int _bt_enable_rssi(bluetooth_device_address_t *addr, int link_type,
106                 int low_threshold, int in_range_threshold, int high_threshold);
107
108 int _bt_get_rssi_strength(bluetooth_device_address_t *bd_addr, int link_type);
109 #ifdef __cplusplus
110 }
111 #endif /* __cplusplus */
112 #endif /*_BT_SERVICE_CORE_DEVICE_H_*/
113