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_MANAGER_LE_INF_H_
22 #define CA_MANAGER_LE_INF_H_
25 #include "cautilinterface.h"
33 * Register network monitor callbacks.
34 * Adapter state changes and network state changes are delivered these callbacks.
35 * @param[in] adapterStateCB Adapter state changed callback.
36 * @param[in] connStateCB Connection state changed callback.
38 void CASetLENetworkMonitorCallbacks(CAAdapterStateChangedCB adapterStateCB,
39 CAConnectionStateChangedCB connStateCB);
42 * Set device information for auto connection.
44 CAResult_t CASetLEClientAutoConnectionDeviceInfo();
47 * Unset device information to stop auto connection.
49 CAResult_t CAUnsetLEClientAutoConnectionDeviceInfo();
52 * Start advertise to receive request for scanning or connecting.
54 void CAStartServerLEAdvertising();
57 * Stop advertise to destroy advertiser.
59 void CAStopServerLEAdvertising();
64 * initialize client connection manager
65 * @param[in] env JNI interface pointer.
66 * @param[in] jvm invocation inferface for JAVA virtual machine.
67 * @param[in] context application context.
69 * @return ::CA_STATUS_OK or ::CA_STATUS_FAILED or ::CA_MEMORY_ALLOC_FAILED
71 CAResult_t CAManagerLEClientInitialize(JNIEnv *env, JavaVM *jvm, jobject context);
74 * terminate client connection manager
75 * @param[in] env JNI interface pointer.
77 * @return ::CA_STATUS_OK or ::CA_STATUS_FAILED or ::CA_MEMORY_ALLOC_FAILED
79 CAResult_t CAManagerLEClientTerminate(JNIEnv *env);
87 #endif /* CA_MANAGER_LE_INF_H_ */