replace : iotivity -> iotivity-sec
[platform/upstream/iotivity.git] / resource / csdk / connectivity / util / src / camanager / bt_le_manager / android / caleautoconnector.h
1 /* ****************************************************************
2  *
3  * Copyright 2016 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 #ifndef CA_AUTO_CONNECTOR_H_
22 #define CA_AUTO_CONNECTOR_H_
23
24 #include <jni.h>
25
26 #ifdef __cplusplus
27 extern "C"
28 {
29 #endif
30
31 #define STATE_OFF 10
32 #define START_RECOVERY 1
33
34 /**
35  * start auto connection.
36  * @param[in]   env                   JNI interface pointer.
37  * @param[in]   remote_le_address     remote address.
38  * @return  ::CA_STATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h).
39  */
40 CAResult_t CAManagerStartAutoConnection(JNIEnv *env, jstring remote_le_address);
41
42 /**
43  * request connect gatt on client in adapter
44  * @param[in]   env                   JNI interface pointer.
45  * @param[in]   remote_le_address     remote address.
46  * @return  ::CA_STATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h).
47  */
48 CAResult_t CAManagerConnectGatt(JNIEnv *env, jstring remote_le_address);
49
50 /**
51  * initialize LE AutoConnection.
52  * @return  ::CA_STATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h).
53  */
54 CAResult_t CAManagerInitLEAutoConnection();
55
56 /**
57  * terminate LE AutoConnection
58  */
59 void CAManagerTerminateLEAutoConnection();
60
61 /**
62  * process BT recovery.
63  * @param[in]   env                   JNI interface pointer.
64  * @param[in]   adapter_state         recovery state to process.
65  * @return  ::CA_STATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h).
66  */
67 CAResult_t CAManagerProcessRecovery(JNIEnv *env, uint16_t adapter_state);
68
69 #ifdef __cplusplus
70 } /* extern "C" */
71 #endif
72
73 #endif /* CA_AUTO_CONNECTOR_H_ */
74