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