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