1 /* ****************************************************************
3 * Copyright 2017 Samsung Electronics All Rights Reserved.
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
11 * http://www.apache.org/licenses/LICENSE-2.0
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.
19 ******************************************************************/
21 #ifndef CA_AUTO_CONNECTOR_H_
22 #define CA_AUTO_CONNECTOR_H_
30 #define START_RECOVERY 1
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).
37 CAResult_t CAManagerStartAutoConnection(const char *remote_le_address);
40 * request connect gatt on client in adapter
41 * @param[in] remote_le_address remote address.
42 * @return gatt profile object.
44 CAResult_t CAManagerConnectGatt(const char *remote_le_address);
47 * initialize LE AutoConnection.
48 * @return ::CA_STATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h).
50 CAResult_t CAManagerInitLEAutoConnection();
53 * terminate LE AutoConnection
55 void CAManagerTerminateLEAutoConnection();
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).
63 CAResult_t CAManagerProcessRecovery(uint16_t adapter_state);
66 void CAManagerSignalToRetryCond(const char* address);
72 #endif /* CA_AUTO_CONNECTOR_H_ */