1 /******************************************************************
\r
3 * Copyright 2015 Samsung Electronics All Rights Reserved.
\r
7 * Licensed under the Apache License, Version 2.0 (the "License");
\r
8 * you may not use this file except in compliance with the License.
\r
9 * You may obtain a copy of the License at
\r
11 * http://www.apache.org/licenses/LICENSE-2.0
\r
13 * Unless required by applicable law or agreed to in writing, software
\r
14 * distributed under the License is distributed on an "AS IS" BASIS,
\r
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
\r
16 * See the License for the specific language governing permissions and
\r
17 * limitations under the License.
\r
19 ******************************************************************/
\r
20 package org.iotivity.service.easysetup.mediator;
\r
22 import android.util.Log;
\r
24 public class EasySetupCallbackHandler {
\r
25 private static final String TAG = "EasySetupCallbackHandler";
\r
26 ProvisionEnrollee provisioningListener;
\r
28 private static EasySetupCallbackHandler easySetupCallbackHandlerObj;
\r
30 public static synchronized EasySetupCallbackHandler getInstance() {
\r
31 if (null == easySetupCallbackHandlerObj) {
\r
32 easySetupCallbackHandlerObj = new EasySetupCallbackHandler();
\r
34 return easySetupCallbackHandlerObj;
\r
37 public void ProvisioningStatusCallBack(int statuscode) {
\r
38 // TODO Auto-generated method stub
\r
40 "onFinishProvisioning() inside Android Java application. statuscode - "
\r
42 if (this.provisioningListener != null) {
\r
43 this.provisioningListener.ProvisioningStatusCallBack(statuscode);
\r
45 Log.e(TAG, "provisioningListener is not registered");
\r
49 public void registerProvisioningHandler(
\r
50 ProvisionEnrollee provisioningListener) {
\r
51 this.provisioningListener = provisioningListener;
\r