1 /* ****************************************************************
3 * Copyright 2016 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_
32 #define START_RECOVERY 1
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).
40 CAResult_t CAManagerStartAutoConnection(JNIEnv *env, jstring remote_le_address);
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).
48 CAResult_t CAManagerConnectGatt(JNIEnv *env, jstring remote_le_address);
51 * initialize LE AutoConnection.
52 * @return ::CA_STATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h).
54 CAResult_t CAManagerInitLEAutoConnection();
57 * terminate LE AutoConnection
59 void CAManagerTerminateLEAutoConnection();
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).
67 CAResult_t CAManagerProcessRecovery(JNIEnv *env, uint16_t adapter_state);
73 #endif /* CA_AUTO_CONNECTOR_H_ */