2 * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
19 #ifndef _BT_SERVICE_DEVICE_H_
20 #define _BT_SERVICE_DEVICE_H_
23 #include <sys/types.h>
24 #include "bluetooth-api.h"
30 int _bt_bond_device(int request_id,
31 bluetooth_device_address_t *device_address,
32 unsigned short conn_type, GArray **out_param1);
34 int _bt_cancel_bonding(void);
36 int _bt_passkey_reply(const char *passkey, gboolean authentication_reply);
38 int _bt_passkey_confirmation_reply(gboolean confirmation_reply);
40 int _bt_unbond_device(int request_id,
41 bluetooth_device_address_t *device_address,
44 int _bt_cancel_search_device(void);
46 int _bt_search_device(int request_id,
47 bluetooth_device_address_t *device_address);
49 int _bt_set_alias(bluetooth_device_address_t *device_address,
52 int _bt_set_authorization(bluetooth_device_address_t *device_address,
55 int _bt_is_gatt_connected(bluetooth_device_address_t *device_address,
56 gboolean *is_connected);
58 int _bt_is_device_connected(bluetooth_device_address_t *device_address,
59 int connection_type, gboolean *is_connected);
61 int _bt_get_connected_link(bluetooth_device_address_t *device_address,
62 bluetooth_connected_link_t *connected);
64 int _bt_set_pin_code(bluetooth_device_address_t *device_address,
65 bluetooth_device_pin_code_t *pin_code);
67 int _bt_unset_pin_code(bluetooth_device_address_t *device_address);
69 int _bt_get_device_pin_code(const char *address, char *pin_code);
71 gboolean _bt_is_device_creating(void);
73 void _bt_set_autopair_status_in_bonding_info(gboolean is_autopair);
75 bt_remote_dev_info_t *_bt_get_remote_device_info(char *address);
77 bt_remote_dev_info_t *_bt_get_remote_device_info_by_object_path(const char *object_path);
79 char *_bt_get_device_name(const char *address);
81 gboolean _bt_is_bonding_device_address(const char *address);
83 void _bt_pending_connect_le_device(void);
85 int _bt_connect_le_device(int req_id, const bluetooth_device_address_t *bd_addr,
86 gboolean auto_connect);
88 int _bt_disconnect_le_device(int req_id,
89 const bluetooth_device_address_t *bd_addr);
91 void _bt_add_le_connected_dev_info(const char *address);
92 void _bt_remove_le_connected_dev_info(const char *address);
93 int _bt_remove_all_le_conn_param_info(const char *sender);
95 int _bt_le_conn_update(const char *sender,
96 unsigned char *device_address,
97 float interval_min, float interval_max,
98 guint16 latency, guint16 time_out);
100 int _bt_get_le_connection_parameter(bluetooth_le_connection_mode_t mode,
101 bluetooth_le_connection_param_t *param);
103 int _bt_connect_profile(char *address, char *uuid,
104 void *cb, gpointer func_data);
106 int _bt_disconnect_profile(char *address, char *uuid,
107 void *cb, gpointer func_data);
109 int _bt_request_att_mtu(int request_id, bluetooth_device_address_t *device_address,
112 int _bt_get_att_mtu(bluetooth_device_address_t *device_address,
115 int _bt_get_device_ida(bluetooth_device_address_t *device_address,
116 bluetooth_device_address_t *id_address);
118 int _bt_set_trust_profile(bluetooth_device_address_t *bd_addr,
119 bluetooth_trusted_profile_t profile, gboolean trust);
121 int _bt_get_trust_profile(bluetooth_device_address_t *bd_addr,
122 bluetooth_trusted_profile_t profile, guint *trust);
124 int _bt_set_restrict_profile(bluetooth_device_address_t *bd_addr,
125 bluetooth_restricted_profile_t profile, gboolean restricted);
127 int _bt_get_restrict_profile(bluetooth_device_address_t *bd_addr,
128 bluetooth_restricted_profile_t profile, guint *restricted);
130 bluetooth_trusted_profile_t _bt_get_trusted_profile_enum(const char *uuid);
132 int _bt_connect_le_ipsp_device(const bluetooth_device_address_t *bd_addr);
134 int _bt_disconnect_le_ipsp_device(const bluetooth_device_address_t *bd_addr);
139 #endif /* __cplusplus */
140 #endif /*_BT_SERVICE_ADAPTER_H_*/