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 int _bt_connect_le_device(int request_id,
74 const bluetooth_device_address_t *bd_addr,
75 gboolean auto_connect);
77 int _bt_disconnect_le_device(int request_id,
78 const bluetooth_device_address_t *bd_addr);
80 int _bt_enable_rssi(bluetooth_device_address_t *bd_addr, int link_type,
81 int low_threshold, int in_range_threshold, int high_threshold);
83 int _bt_get_rssi_strength(bluetooth_device_address_t *bd_addr,
86 int _bt_le_conn_update(unsigned char *device_address,
87 guint16 interval_min, guint16 interval_max,
88 guint16 latency, guint16 time_out);
90 int _bt_get_le_connection_parameter(bluetooth_le_connection_mode_t mode,
91 bluetooth_le_connection_param_t *param);
93 int _bt_connect_profile(char *address, char *uuid,
94 void *cb, gpointer func_data);
96 int _bt_disconnect_profile(char *address, char *uuid,
97 void *cb, gpointer func_data);
98 int _bt_connect_le_ipsp_device(const bluetooth_device_address_t *bd_addr);
100 int _bt_disconnect_le_ipsp_device(const bluetooth_device_address_t *bd_addr);
105 #endif /* __cplusplus */
106 #endif /*_BT_SERVICE_ADAPTER_H_*/