2 * ***************************************************************
4 * Copyright 2016 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 nativeSetCloudProvInfo(String authCode, String autoProvider, String ciServer);
34 private native void nativeStartCloudProvisioning(CloudProvisioningCallback callback);
36 /* constructor will be invoked from the native layer */
37 private RemoteEnrollee(long nativeHandle){
38 this.m_nativeHandle = nativeHandle;
41 /* native setCloudProvInfo */
42 public void setCloudProvInfo(CloudProvInfo cloudInfo) throws ESException{
43 nativeSetCloudProvInfo(cloudInfo.getAuthCode(), cloudInfo.getAuthProvider(), cloudInfo.getCiServer());
46 /* native startCloudProvisioning */
47 public void startCloudProvisioning(CloudProvisioningCallback callback) throws ESException{
50 nativeStartCloudProvisioning(callback);
53 Log.d(TAG, "CloudProvisioningCallback is null ");