Fix TBT socket client fail issue
[platform/core/connectivity/bluetooth-frwk.git] / bt-service-emul / bt-service-device.c
1 /*
2  * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
3  *
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
7  *
8  *              http://www.apache.org/licenses/LICENSE-2.0
9  *
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.
15  *
16  */
17
18 #include "bluetooth-api.h"
19 #include "bt-internal-types.h"
20
21 #include "bt-service-common.h"
22 #include "bt-service-event.h"
23 #include "bt-service-device.h"
24 #include "bt-service-util.h"
25
26 int _bt_bond_device(int request_id,
27                 bluetooth_device_address_t *device_address,
28                 unsigned short conn_type, GArray **out_param1)
29 {
30         BT_CHECK_PARAMETER(device_address, return);
31
32         return BLUETOOTH_ERROR_NOT_SUPPORT;
33 }
34
35 int _bt_cancel_bonding(void)
36 {
37         return BLUETOOTH_ERROR_NOT_SUPPORT;
38 }
39
40 int _bt_unbond_device(int request_id,
41                         bluetooth_device_address_t *device_address,
42                         GArray **out_param1)
43 {
44         BT_CHECK_PARAMETER(device_address, return);
45
46         return BLUETOOTH_ERROR_NOT_SUPPORT;
47 }
48
49 int _bt_search_device(int request_id,
50                         bluetooth_device_address_t *device_address)
51 {
52         BT_CHECK_PARAMETER(device_address, return);
53
54         return BLUETOOTH_ERROR_NOT_SUPPORT;
55 }
56
57 int _bt_cancel_search_device(void)
58 {
59         return BLUETOOTH_ERROR_NOT_SUPPORT;
60 }
61
62 int _bt_set_alias(bluetooth_device_address_t *device_address,
63                                       const char *alias)
64 {
65         BT_CHECK_PARAMETER(device_address, return);
66         BT_CHECK_PARAMETER(alias, return);
67
68         return BLUETOOTH_ERROR_NOT_SUPPORT;
69 }
70
71 int _bt_set_authorization(bluetooth_device_address_t *device_address,
72                                       gboolean authorize)
73 {
74         BT_CHECK_PARAMETER(device_address, return);
75
76         return BLUETOOTH_ERROR_NOT_SUPPORT;
77 }
78
79 int _bt_is_device_connected(bluetooth_device_address_t *device_address,
80                         int connection_type, gboolean *is_connected)
81 {
82         retv_if(device_address == NULL, BLUETOOTH_ERROR_INVALID_PARAM);
83         retv_if(is_connected == NULL, BLUETOOTH_ERROR_INVALID_PARAM);
84
85         *is_connected = FALSE;
86
87         return BLUETOOTH_ERROR_NOT_SUPPORT;
88 }
89
90 int _bt_get_connected_link(bluetooth_device_address_t *device_address,
91                         bluetooth_connected_link_t *connected)
92 {
93         BT_CHECK_PARAMETER(device_address, return);
94
95         return BLUETOOTH_ERROR_NOT_SUPPORT;
96 }
97
98 int _bt_connect_le_device(int request_id,
99                 const bluetooth_device_address_t *bd_addr,
100                 gboolean auto_connect)
101 {
102         BT_CHECK_PARAMETER(bd_addr, return);
103
104         return BLUETOOTH_ERROR_NOT_SUPPORT;
105 }
106
107 int _bt_disconnect_le_device(int request_id,
108                 const bluetooth_device_address_t *bd_addr)
109 {
110         BT_CHECK_PARAMETER(bd_addr, return);
111
112         return BLUETOOTH_ERROR_NOT_SUPPORT;
113 }
114
115 int _bt_connect_le_ipsp_device(const bluetooth_device_address_t *bd_addr)
116 {
117         BT_CHECK_PARAMETER(bd_addr, return);
118
119         return BLUETOOTH_ERROR_NOT_SUPPORT;
120 }
121
122 int _bt_disconnect_le_ipsp_device(const bluetooth_device_address_t *bd_addr)
123 {
124         BT_CHECK_PARAMETER(bd_addr, return);
125
126         return BLUETOOTH_ERROR_NOT_SUPPORT;
127 }
128
129 int _bt_connect_profile(char *address, char *uuid,
130                                                 void *cb, gpointer func_data)
131 {
132         return BLUETOOTH_ERROR_NOT_SUPPORT;
133 }
134
135 int _bt_disconnect_profile(char *address, char *uuid,
136                                                 void *cb, gpointer func_data)
137 {
138         return BLUETOOTH_ERROR_NOT_SUPPORT;
139 }
140
141 int _bt_enable_rssi(bluetooth_device_address_t *bd_addr, int link_type,
142                 int low_threshold, int in_range_threshold, int high_threshold)
143 {
144         BT_CHECK_PARAMETER(bd_addr, return);
145
146         return BLUETOOTH_ERROR_NOT_SUPPORT;
147 }
148
149 int _bt_get_rssi_strength(bluetooth_device_address_t *bd_addr,
150                                         int link_type)
151 {
152         BT_CHECK_PARAMETER(bd_addr, return);
153
154         return BLUETOOTH_ERROR_NOT_SUPPORT;
155 }
156
157 int _bt_le_conn_update(unsigned char *device_address,
158                                 guint16 interval_min, guint16 interval_max,
159                                 guint16 latency, guint16 time_out)
160 {
161         BT_CHECK_PARAMETER(device_address, return);
162
163         return BLUETOOTH_ERROR_NOT_SUPPORT;
164 }
165
166 int _bt_set_pin_code(bluetooth_device_address_t *device_address,
167                                 bluetooth_device_pin_code_t *pin_code)
168 {
169         BT_CHECK_PARAMETER(device_address, return);
170         BT_CHECK_PARAMETER(pin_code, return);
171
172         return BLUETOOTH_ERROR_NOT_SUPPORT;
173 }
174
175 int _bt_unset_pin_code(bluetooth_device_address_t *device_address)
176 {
177         BT_CHECK_PARAMETER(device_address, return);
178
179         return BLUETOOTH_ERROR_NOT_SUPPORT;
180 }
181
182 int _bt_get_device_pin_code(const char *address, char *pin_code)
183 {
184         BT_CHECK_PARAMETER(address, return);
185         BT_CHECK_PARAMETER(pin_code, return);
186
187         return BLUETOOTH_ERROR_NOT_SUPPORT;
188 }
189
190 int _bt_get_le_connection_parameter(bluetooth_le_connection_mode_t mode,
191                 bluetooth_le_connection_param_t *param)
192 {
193         return BLUETOOTH_ERROR_NOT_SUPPORT;
194 }
195
196 int _bt_passkey_reply(const char *passkey, gboolean authentication_reply)
197 {
198         return BLUETOOTH_ERROR_NOT_SUPPORT;
199 }
200
201 int _bt_passkey_confirmation_reply(gboolean confirmation_reply)
202 {
203         return BLUETOOTH_ERROR_NOT_SUPPORT;
204 }