2 * ***************************************************************
4 * Copyright 2015 Samsung Electronics All Rights Reserved.
8 * Licensed under the Apache License, Version 2.0 (the "License");
9 * you may not use this file except in compliance with the License.
10 * You may obtain a copy of the License at
12 * http://www.apache.org/licenses/LICENSE-2.0
14 * Unless required by applicable law or agreed to in writing, software
15 * distributed under the License is distributed on an "AS IS" BASIS,
16 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 * See the License for the specific language governing permissions and
18 * limitations under the License.
20 * ****************************************************************
24 package org.iotivity.service.easysetup.mediator;
26 import android.util.Log;
28 public class RemoteEnrollee{
30 public static final String TAG = RemoteEnrollee.class.getName();
31 private long m_nativeHandle;
33 private native void nativeStartProvision();
34 private native void nativeStopProvision();
35 private native void nativeRegisterProvisioningHandler(IProvisionStatusNativeHandler listener);
36 //private IProvisionStatusNativeHandler provisioningListener;
39 /* constructor will be invoked from the native layer */
40 private RemoteEnrollee(long nativeHandle){
41 this.m_nativeHandle = nativeHandle;
44 /* Register native Listener for the Provisioning state */
45 public void registerProvisioningHandler( IProvisionStatusNativeHandler provisioningListener) throws ESException{
46 // this.provisioningListener = provisioningListener;
47 nativeRegisterProvisioningHandler(provisioningListener);
48 Log.i(TAG, "JNI Callback is registered for getting provisioning status");
51 /* native StartProvision */
52 public void startProvision() throws ESException{
53 nativeStartProvision();
56 /* native stopProvision */
57 public void stopProvision() throws ESException{
58 nativeStopProvision();