Imported Upstream version 1.1.0
[platform/upstream/iotivity.git] / resource / csdk / connectivity / src / bt_le_adapter / android / caleclient.h
1 /* ****************************************************************
2  *
3  * Copyright 2014 Samsung Electronics All Rights Reserved.
4  *
5  *
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  *      http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  *
19  ******************************************************************/
20
21 /**
22  * @file
23  * This file contains the APIs for BT LE communications.
24  */
25 #ifndef CA_LECLIENT_H_
26 #define CA_LECLIENT_H_
27
28 #include "cacommon.h"
29 #include "cathreadpool.h"
30 #include "uarraylist.h"
31 #include "jni.h"
32
33 #ifdef __cplusplus
34 extern "C"
35 {
36 #endif
37
38 static const uint16_t GATT_ERROR = 133;
39
40 static const uint16_t STATE_CHARACTER_SET = 2;
41 static const uint16_t STATE_CHARACTER_UNSET = 1;
42 static const uint16_t STATE_CHARACTER_NO_CHANGE = 0;
43
44 static const uint16_t STATE_SEND_NONE = 0;
45 static const uint16_t STATE_SEND_SUCCESS = 1;
46 static const uint16_t STATE_SEND_FAILED = 2;
47
48 typedef struct le_state_info
49 {
50     char address[CA_MACADDR_SIZE];
51     jint connectedState;
52     uint16_t notificationState;
53     uint16_t sendState;
54     jboolean autoConnectFlag;
55 } CALEState_t;
56
57 /**
58  * Callback to be notified on reception of any data from remote devices.
59  * @param[in]  address                MAC address of remote device.
60  * @param[in]  data                   Data received from remote device.
61  * @pre  Callback must be registered using CALESetCallback(CAPacketReceiveCallback callback)
62  */
63 typedef void (*CAPacketReceiveCallback)(const char *address, const uint8_t *data);
64
65 /**
66  * initialize JNI object.
67  */
68 void CALEClientJniInit();
69
70 /**
71  * set context of application.
72  */
73 void CALEClientJNISetContext();
74
75 /**
76  * create interface object and initialize the object.
77  * @return  ::CA_STATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h).
78  */
79 CAResult_t CALEClientCreateJniInterfaceObject();
80
81 /**
82  * initialize client for BLE.
83  * @return  ::CA_STATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h).
84  */
85 CAResult_t CALEClientInitialize();
86
87 /**
88  * terminate client for BLE.
89  */
90 void CALEClientTerminate();
91
92 /**
93  * destroy interface object and terminate the interface.
94  * @return  ::CA_STATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h).
95  */
96 CAResult_t CALEClientDestroyJniInterface();
97
98 /**
99  * for destroy sending routine.
100  * @param[in]   env                   JNI interface pointer.
101  * @param[in]   gatt                  Gatt profile object.
102  */
103 void CALEClientSendFinish(JNIEnv *env, jobject gatt);
104
105 /**
106  * send data for unicast (interface).
107  * @param[in]   address               remote address.
108  * @param[in]   data                  data for transmission.
109  * @param[in]   dataLen               data length.
110  * @return  ::CA_STATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h).
111  */
112 CAResult_t CALEClientSendUnicastMessage(const char *address, const uint8_t *data,
113                                         const uint32_t dataLen);
114
115 /**
116  * send data for multicast (interface).
117  * @param[in]   data                  data for transmission.
118  * @param[in]   dataLen               data length.
119  * @return  ::CA_STATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h).
120  */
121 CAResult_t CALEClientSendMulticastMessage(const uint8_t *data, const uint32_t dataLen);
122
123 /**
124  * start unicast server.
125  * @param[in]   address               remote address.
126  * @return  ::CA_STATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h).
127  */
128 CAResult_t CALEClientStartUnicastServer(const char *address);
129
130 /**
131  * start multicast server (start discovery).
132  * @return  ::CA_STATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h).
133  */
134 CAResult_t CALEClientStartMulticastServer();
135
136 /**
137  * stop unicast server.
138  */
139 void CALEClientStopUnicastServer();
140
141 /**
142  * stop multicast server (stop discovery).
143  */
144 void CALEClientStopMulticastServer();
145
146 /**
147  * set this callback for receiving data packets from peer devices.
148  * @param[in]   callback              callback to be notified on reception of
149  *                                    unicast/multicast data packets.
150  */
151 void CALEClientSetCallback(CAPacketReceiveCallback callback);
152
153 /**
154  * waiting to get scanned device from BT Platform.
155  * if there is no scanned device in the list.
156  * @param[in]   env                   JNI interface pointer.
157  * @param[in]   address               LE address.
158  * @return  ::CA_STATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h).
159  */
160 CAResult_t CALEClientIsThereScannedDevices(JNIEnv *env, const char* address);
161
162 /**
163  * send data for unicast (implement).
164  * @param[in]   address               remote address.
165  * @param[in]   data                  data for transmission.
166  * @param[in]   dataLen               data length.
167  * @return  ::CA_STATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h).
168  */
169 CAResult_t CALEClientSendUnicastMessageImpl(const char *address, const uint8_t *data,
170                                             const uint32_t dataLen);
171
172 /**
173  * send data for multicast (implement).
174  * @param[in]   env                   JNI interface pointer.
175  * @param[in]   data                  data for transmission.
176  * @param[in]   dataLen               data length.
177  * @return  ::CA_STATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h).
178  */
179 CAResult_t CALEClientSendMulticastMessageImpl(JNIEnv *env, const uint8_t *data,
180                                               const uint32_t dataLen);
181
182 /**
183  * check whether it is connected or not with remote address.
184  * @param[in]   address               remote address.
185  * @return  ::CA_STATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h).
186  */
187 CAResult_t CALECheckSendState(const char* address);
188
189 /**
190  * send data to remote device.
191  * if it isn't connected yet. connect LE before try to send data.
192  * @param[in]   env                   JNI interface pointer.
193  * @param[in]   device                bluetooth device object.
194  * @return  ::CA_STATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h).
195  */
196 CAResult_t CALEClientSendData(JNIEnv *env, jobject device);
197
198 /**
199  * get address from bluetooth gatt object.
200  * @param[in]   env                   JNI interface pointer.
201  * @param[in]   gatt                  Gatt profile object.
202  * @return  bluetooth address.
203  */
204 jstring CALEClientGetAddressFromGattObj(JNIEnv *env, jobject gatt);
205
206 /**
207  * get remote address from bluetooth socket object.
208  * @param[in]   env                   JNI interface pointer.
209  * @param[in]   bluetoothSocketObj    bluetooth socket.
210  * @return  bluetooth address.
211  */
212 jstring CALEClientGetRemoteAddress(JNIEnv *env, jobject bluetoothSocketObj);
213
214 /**
215  * close gatt.
216  * @param[in]   env                   JNI interface pointer.
217  * @param[in]   bluetoothGatt         gatt profile object.
218  * @return  ::CA_STATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h).
219  */
220 CAResult_t CALEClientGattClose(JNIEnv *env, jobject bluetoothGatt);
221
222 /**
223  * start to scan whole bluetooth devices (interface).
224  * @return  ::CA_STATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h).
225  */
226 CAResult_t CALEClientStartScan();
227
228 /**
229  * start to scan whole bluetooth devices (implement).
230  * @param[in]   env                   JNI interface pointer.
231  * @param[in]   callback              callback to receive device object by scanning.
232  * @return  ::CA_STATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h).
233  */
234 CAResult_t CALEClientStartScanImpl(JNIEnv *env, jobject callback);
235
236 /**
237  * start to scan target bluetooth devices for service uuid (implement).
238  * @param[in]   env                   JNI interface pointer.
239  * @param[in]   uuids                 target UUID.
240  * @param[in]   callback              callback to receive device object by scanning.
241  * @return  ::CA_STATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h).
242  */
243 CAResult_t CALEClientStartScanWithUUIDImpl(JNIEnv *env, jobjectArray uuids,
244                                            jobject callback);
245
246 /**
247  * get uuid object.
248  * @param[in]   env                   JNI interface pointer.
249  * @param[in]   uuid                  uuid.
250  * @return  uuid object.
251  */
252 jobject CALEClientGetUUIDObject(JNIEnv *env, const char *uuid);
253
254 /**
255  * stop scan (interface).
256  * @return  ::CA_STATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h).
257  */
258 CAResult_t CALEClientStopScan();
259
260 /**
261  * set ble scanning flag.
262  * @param[in]   flag        scan flag.
263  */
264 void CALEClientSetScanFlag(bool flag);
265
266 /**
267  * stop scan (implement).
268  * @param[in]   env                   JNI interface pointer.
269  * @param[in]   callback              callback to receive device object by scanning.
270  * @return  ::CA_STATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h).
271  */
272 CAResult_t CALEClientStopScanImpl(JNIEnv *env, jobject callback);
273
274 /**
275  * set auto connect flag for connectGatt API.
276  * @param[in]   env                   JNI interface pointer.
277  * @param[in]   jni_address           remote address.
278  * @param[in]   flag                  auto connect flag.
279  */
280 CAResult_t CALEClientSetAutoConnectFlag(JNIEnv *env, jstring jni_address, jboolean flag);
281
282 /**
283  * get auto connect flag.
284  * @param[in]   env                   JNI interface pointer.
285  * @param[in]   jni_address           remote address.
286  * @return  current auto connect flag;
287  */
288 jboolean CALEClientGetAutoConnectFlag(JNIEnv *env, jstring jni_address);
289
290 /**
291  * connect to gatt server hosted.
292  * @param[in]   env                   JNI interface pointer.
293  * @param[in]   bluetoothDevice       bluetooth Device object.
294  * @param[in]   autoconnect           whether to directly connect to the remote device(false) or
295  *                                     to automatically connect as soon as the remote device
296  *                                     becomes available.
297  * @return  gatt object
298  */
299 jobject CALEClientConnect(JNIEnv *env, jobject bluetoothDevice, jboolean autoconnect);
300
301 /**
302  * disconnect to gatt server by a target device.
303  * @param[in]   env                   JNI interface pointer.
304  * @param[in]   bluetoothGatt         Gatt profile object.
305  * @return  ::CA_STATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h).
306  */
307 CAResult_t CALEClientDisconnect(JNIEnv *env, jobject bluetoothGatt);
308
309 /**
310  * disconnect to gatt server by whole devices.
311  * @param[in]   env                   JNI interface pointer.
312  * @return  ::CA_STATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h).
313  */
314 CAResult_t CALEClientDisconnectAll(JNIEnv *env);
315
316 /**
317  * disconnect to gatt server by selected address.
318  * @param[in]   env                   JNI interface pointer.
319  * @param[in]   remoteAddress         remote address.
320  * @return  ::CA_STATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h).
321  */
322 CAResult_t CALEClientDisconnectforAddress(JNIEnv *env, jstring remoteAddress);
323
324 /**
325  * start discovery server.
326  * @param[in]   env                   JNI interface pointer.
327  * @param[in]   bluetoothGatt         Gatt profile object.
328  * @return  ::CA_STATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h).
329  */
330 CAResult_t CALEClientDiscoverServices(JNIEnv *env, jobject bluetoothGatt);
331
332 /**
333  * call CALESetValueAndWriteCharacteristic when connection is successful.
334  * @param[in]   env                   JNI interface pointer.
335  * @param[in]   gatt                  Gatt profile object.
336  * @return  ::CA_STATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h).
337  */
338 CAResult_t CALEClientWriteCharacteristic(JNIEnv *env, jobject gatt);
339
340 /**
341  * create GattCharacteristic and call CALEClientWriteCharacteristicImpl
342  * for request to write gatt characteristic.
343  * @param[in]   env                   JNI interface pointer.
344  * @param[in]   gatt                  Gatt profile object.
345  * @return  ::CA_STATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h).
346  */
347 CAResult_t CALESetValueAndWriteCharacteristic(JNIEnv *env, jobject gatt);
348
349 /**
350  * request to write gatt characteristic.
351  * @param[in]   env                   JNI interface pointer.
352  * @param[in]   bluetoothGatt         Gatt profile object.
353  * @param[in]   gattCharacteristic    characteristic object that contain data to send.
354  * @return  ::CA_STATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h).
355  */
356 CAResult_t CALEClientWriteCharacteristicImpl(JNIEnv *env, jobject bluetoothGatt,
357                                              jobject gattCharacteristic);
358
359 /**
360  * request to read gatt characteristic.
361  * @param[in]   env                   JNI interface pointer.
362  * @param[in]   bluetoothGatt         Gatt profile object.
363  * @return  ::CA_STATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h).
364  */
365 CAResult_t CALEClientReadCharacteristic(JNIEnv *env, jobject bluetoothGatt);
366
367 /**
368  * enable notification for a target device.
369  * @param[in]   env                   JNI interface pointer.
370  * @param[in]   bluetoothGatt         Gatt profile object.
371  * @param[in]   characteristic        Characteristic object.
372  * @return  ::CA_STATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h).
373  */
374 CAResult_t CALEClientSetCharacteristicNotification(JNIEnv *env, jobject bluetoothGatt,
375                                                   jobject characteristic);
376
377 /**
378  * create gatt characteristic object.
379  * @param[in]   env                   JNI interface pointer.
380  * @param[in]   bluetoothGatt         Gatt profile object.
381  * @param[in]   data                  for make Characteristic with data.
382  * @return  Gatt Characteristic object.
383  */
384 jobject CALEClientCreateGattCharacteristic(JNIEnv *env, jobject bluetoothGatt, jbyteArray data);
385
386 /**
387  * get gatt service.
388  * @param[in]   env                   JNI interface pointer.
389  * @param[in]   bluetoothGatt         Gatt profile object.
390  * @param[in]   characterUUID         for make BluetoothGattCharacteristic object.
391  * @return  Gatt Service.
392  */
393 jobject CALEClientGetGattService(JNIEnv *env, jobject bluetoothGatt, jstring characterUUID);
394
395 /**
396  * get value from characteristic.
397  * @param[in]   env                   JNI interface pointer.
398  * @param[in]   characteristic        Characteristic object.
399  * @return  value in characteristic.
400  */
401 jbyteArray CALEClientGetValueFromCharacteristic(JNIEnv *env, jobject characteristic);
402
403 /**
404  * create UUID List.
405  * @return  ::CA_STATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h).
406  */
407 CAResult_t CALEClientCreateUUIDList();
408
409 /**
410  * set UUID to descriptor.
411  * @param[in]   env                   JNI interface pointer.
412  * @param[in]   bluetoothGatt         Gatt profile object.
413  * @param[in]   characteristic        Characteristic object.
414  * @return  ::CA_STATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h).
415  */
416 CAResult_t CALEClientSetUUIDToDescriptor(JNIEnv *env, jobject bluetoothGatt,
417                                          jobject characteristic);
418
419 /**
420  * add device object to scan device list.
421  * @param[in]   env                   JNI interface pointer.
422  * @param[in]   device                bluetooth device object.
423  * @return  ::CA_STATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h).
424  */
425 CAResult_t CALEClientAddScanDeviceToList(JNIEnv *env, jobject device);
426
427 /**
428  * check whether the device exist in list or not.
429  * @param[in]   env                   JNI interface pointer.
430  * @param[in]   remoteAddress         remote address.
431  * @return  true or false.
432  */
433 bool CALEClientIsDeviceInScanDeviceList(JNIEnv *env, const char *remoteAddress);
434
435 /**
436  * remove all devices in scan device list.
437  * @param[in]   env                   JNI interface pointer.
438  * @return  ::CA_STATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h).
439  */
440 CAResult_t CALEClientRemoveAllScanDevices(JNIEnv *env);
441
442 /**
443  * remove target device in scan device list.
444  * @param[in]   env                   JNI interface pointer.
445  * @param[in]   remoteAddress         remote address.
446  * @return  ::CA_STATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h).
447  */
448 CAResult_t CALEClientRemoveDeviceInScanDeviceList(JNIEnv *env, jstring remoteAddress);
449
450 /**
451  * add gatt object to gatt object list.
452  * @param[in]   env                   JNI interface pointer.
453  * @param[in]   gatt                  Gatt profile object.
454  * @return  ::CA_STATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h).
455  */
456 CAResult_t CALEClientAddGattobjToList(JNIEnv *env, jobject gatt);
457
458 /**
459  * check whether the gatt object exist in list or not.
460  * @param[in]   env                   JNI interface pointer.
461  * @param[in]   remoteAddress         remote address.
462  * @return  true or false.
463  */
464 bool CALEClientIsGattObjInList(JNIEnv *env, const char *remoteAddress);
465
466 /**
467  * get the gatt object.
468  * @param[in]   env                   JNI interface pointer.
469  * @param[in]   remoteAddress         remote address.
470  * @return  gatt object.
471  */
472 jobject CALEClientGetGattObjInList(JNIEnv *env, const char* remoteAddress);
473
474 /**
475  * remove all gatt objects in gatt object list.
476  * @param[in]   env                   JNI interface pointer.
477  * @return  ::CA_STATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h).
478  */
479 CAResult_t CALEClientRemoveAllGattObjs(JNIEnv *env);
480
481 /**
482  * remove target device in gatt object list.
483  * @param[in]   env                   JNI interface pointer.
484  * @param[in]   gatt                  Gatt profile object.
485  * @return  ::CA_STATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h).
486  */
487 CAResult_t CALEClientRemoveGattObj(JNIEnv *env, jobject gatt);
488
489 /**
490  * remove gatt object of target device for address in gatt object list.
491  * @param[in]   env                   JNI interface pointer.
492  * @param[in]   gatt                  Gatt profile object.
493  * @return  ::CA_STATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h).
494  */
495 CAResult_t CALEClientRemoveGattObjForAddr(JNIEnv *env, jstring addr);
496
497 /**
498  * get ble address from Bluetooth device.
499  * @param[in]   env                   JNI interface pointer.
500  * @param[in]   bluetoothDevice       Bluetooth device.
501  * @return  ble address.
502  */
503 jstring CALEClientGetLEAddressFromBTDevice(JNIEnv *env, jobject bluetoothDevice);
504
505 /**
506  * update new state information.
507  * @param[in]   address               remote address.
508  * @param[in]   connectedState        connection state.
509  * @param[in]   notificationState     whether characteristic notification already set or not.
510  * @param[in]   sendState             whether sending was success or not.
511  * @return  ::CA_STATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h).
512  */
513 CAResult_t CALEClientUpdateDeviceState(const char* address, uint32_t connectedState,
514                                        uint16_t notificationState, uint16_t sendState);
515
516 /**
517  * add new state to state list.
518  * @param[in]   state                 new state.
519  * @return  ::CA_STATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h).
520  */
521 CAResult_t CALEClientAddDeviceStateToList(CALEState_t* state);
522
523 /**
524  * check whether the remote address is existed or not.
525  * @param[in]   address               remote address.
526  * @return  true or false.
527  */
528 bool CALEClientIsDeviceInList(const char *remoteAddress);
529
530 /**
531  * remove all device states.
532  * @return  ::CA_STATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h).
533  */
534 CAResult_t CALEClientRemoveAllDeviceState();
535
536 /**
537  * Reset values of device state for all of devices.
538  * this method has to be invoked when BT adapter is disabled.
539  * @return  ::CA_STATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h).
540  */
541 CAResult_t CALEClientResetDeviceStateForAll();
542
543 /**
544  * remove the device state for a remote device.
545  * @param[in]   remoteAddress         remote address.
546  * @return  ::CA_STATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h).
547  */
548 CAResult_t CALEClientRemoveDeviceState(const char* remoteAddress);
549
550 /**
551  * get state information for a remote device.
552  * @param[in]   remoteAddress         remote address.
553  * @return  CALEState_t.
554  */
555 CALEState_t* CALEClientGetStateInfo(const char* remoteAddress);
556
557 /**
558  * check whether the remote address is connected or not.
559  * @param[in]   remoteAddress         remote address.
560  * @return  true or false.
561  */
562 bool CALEClientIsConnectedDevice(const char* remoteAddress);
563
564 /**
565  * check whether the remote address set CharacteristicNotification or not.
566  * @param[in]   remoteAddress         remote address.
567  * @return  true or false.
568  */
569 bool CALEClientIsSetCharacteristic(const char* remoteAddress);
570
571 /**
572  * create scan device list.
573  */
574 void CALEClientCreateDeviceList();
575
576 /**
577  * update the counter which data is sent to remote device.
578  * @param[in]   env                   JNI interface pointer.
579  */
580 void CALEClientUpdateSendCnt(JNIEnv *env);
581
582 /**
583  * initialize mutex.
584  * @return  ::CA_STATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h).
585  */
586 CAResult_t CALEClientInitGattMutexVaraibles();
587
588 /**
589  * terminate mutex.
590  */
591 void CALEClientTerminateGattMutexVariables();
592
593 /**
594  * set send finish flag.
595  * @param[in]   flag        finish flag.
596  */
597 void CALEClientSetSendFinishFlag(bool flag);
598
599 /**
600  * close the connection of the profile proxy to the Service.
601  * @param[in]   env                   JNI interface pointer.
602  * @param[in]   gatt                  gatt profile object.
603  * @return  ::CA_STATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h).
604  */
605 CAResult_t CALEClientCloseProfileProxy(JNIEnv *env, jobject gatt);
606
607 /**
608  * connect to GATT Server hosted by this device.
609  * @param[in]   env                   JNI interface pointer.
610  * @param[in]   bluetoothDevice       bluetooth device object.
611  * @param[in]   autoconnect           connect as soon as the device becomes avaiable(true).
612  * @return  gatt profile object
613  */
614 jobject CALEClientGattConnect(JNIEnv *env, jobject bluetoothDevice, jboolean autoconnect);
615
616 #ifdef __cplusplus
617 } /* extern "C" */
618 #endif
619
620 #endif /* CA_LECLIENT_H_ */