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_BT_PAIRING_INTERFACE_H_
22 #define CA_BT_PAIRING_INTERFACE_H_
25 #include "cautilinterface.h"
35 * initialize BT Pairing manager
36 * @param[in] env JNI interface pointer.
37 * @param[in] jvm invocation inferface for JAVA virtual machine.
38 * @param[in] context application context.
40 * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h).
42 CAResult_t CABTPairingInitialize(JNIEnv *env, JavaVM *jvm, jobject context);
45 * start discovery for BT device which has iotivity UUID.
46 * @param[in] env JNI interface pointer.
48 * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h).
50 CAResult_t CABTPairingStartScan(JNIEnv *env);
54 * @param[in] env JNI interface pointer.
56 * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h).
58 CAResult_t CABTPairingStopScan(JNIEnv *env);
61 * bonding between devices.
62 * @param[in] env JNI interface pointer.
63 * @param[in] device bluetooth device object.
65 * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h).
67 CAResult_t CABTPairingCreateBond(JNIEnv *env, jobject device);
70 * set callback listener of found device.
71 * @param[in] listener callback listener
73 void CABTPairingSetFoundDeviceListener(jobject listener);
81 #endif /* CA_LE_MANAGER_H_ */