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 #include "camanagerleinterface.h"
22 #include "cautilinterface.h"
27 #define TAG "OIC_CA_UTIL_INF"
29 CAResult_t CARegisterNetworkMonitorHandler(CAAdapterStateChangedCB adapterStateCB,
30 CAConnectionStateChangedCB connStateCB)
32 OIC_LOG(DEBUG, TAG, "CARegisterNetworkMonitorHandler");
35 CASetLENetworkMonitorCallbacks(adapterStateCB, connStateCB);
40 return CA_NOT_SUPPORTED;
45 CAResult_t CASetAutoConnectionDeviceInfo(const char *address)
47 OIC_LOG(DEBUG, TAG, "CASetAutoConnectionDeviceInfo");
50 return CASetLEClientAutoConnectionDeviceInfo(address);
53 return CA_NOT_SUPPORTED;
57 CAResult_t CAUnsetAutoConnectionDeviceInfo(const char *address)
59 OIC_LOG(DEBUG, TAG, "CAUnsetAutoConnectionDeviceInfo");
62 return CAUnsetLEClientAutoConnectionDeviceInfo(address);
65 return CA_NOT_SUPPORTED;
71 * initialize client connection manager
72 * @param[in] env JNI interface pointer.
73 * @param[in] jvm invocation inferface for JAVA virtual machine.
74 * @param[in] context application context.
76 CAResult_t CAUtilClientInitialize(JNIEnv *env, JavaVM *jvm, jobject context)
78 OIC_LOG(DEBUG, TAG, "CAUtilClientInitialize");
80 return CAManagerLEClientInitialize(env, jvm, context);
82 OIC_LOG(DEBUG, TAG, "it is not supported");
86 return CA_NOT_SUPPORTED;
91 * terminate client connection manager
92 * @param[in] env JNI interface pointer.
94 CAResult_t CAUtilClientTerminate(JNIEnv *env)
96 OIC_LOG(DEBUG, TAG, "CAUtilClientTerminate");
98 return CAManagerLEClientTerminate(env);
100 OIC_LOG(DEBUG, TAG, "it is not supported");
102 return CA_NOT_SUPPORTED;