Add EasySetup class and Update RemoteEnrollee class for Android Mediator
authorJihun Ha <jihun.ha@samsung.com>
Thu, 16 Jun 2016 12:47:05 +0000 (21:47 +0900)
committerMadan Lanka <lanka.madan@samsung.com>
Tue, 21 Jun 2016 04:34:01 +0000 (04:34 +0000)
1. The previous EasySetupService class is inconsistency to the class for C++
SDK.
  - Rather, EasySetup class looks better.

2. createRemoteEnrollee API is get to have void parameter

Note that, we will add several APIs in these classes when they are implemented.
And useless files will be removed soon.

Change-Id: Iacb665bb16d1c9e8be2525801dd8a0d4613234d0
Signed-off-by: Jihun Ha <jihun.ha@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/8705
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Madan Lanka <lanka.madan@samsung.com>
14 files changed:
service/easy-setup/mediator/richsdk/SConscript
service/easy-setup/mediator/richsdk/android/EasySetupCore/src/main/java/org/iotivity/service/easysetup/mediator/EasySetup.java [new file with mode: 0755]
service/easy-setup/mediator/richsdk/android/EasySetupCore/src/main/java/org/iotivity/service/easysetup/mediator/EnrolleeDeviceWiFiOnboarding.java
service/easy-setup/mediator/richsdk/android/EasySetupCore/src/main/java/org/iotivity/service/easysetup/mediator/RemoteEnrollee.java [changed mode: 0644->0755]
service/easy-setup/mediator/richsdk/android/jni/Android.mk
service/easy-setup/mediator/richsdk/android/jni/JniEasySetup.cpp [changed mode: 0644->0755]
service/easy-setup/mediator/richsdk/android/jni/JniEasySetup.h [changed mode: 0644->0755]
service/easy-setup/mediator/richsdk/android/jni/JniEsUtils.cpp [changed mode: 0644->0755]
service/easy-setup/mediator/richsdk/android/jni/JniEsUtils.h [changed mode: 0644->0755]
service/easy-setup/mediator/richsdk/android/jni/JniJvm.cpp [changed mode: 0644->0755]
service/easy-setup/mediator/richsdk/android/jni/JniProvisioningStatusLisener.cpp [changed mode: 0644->0755]
service/easy-setup/mediator/richsdk/android/jni/JniProvisioningStatusListener.h [changed mode: 0644->0755]
service/easy-setup/mediator/richsdk/android/jni/JniRemoteEnrollee.cpp [changed mode: 0644->0755]
service/easy-setup/mediator/richsdk/android/jni/JniRemoteEnrollee.h [changed mode: 0644->0755]

index de1eea0..6c0c101 100644 (file)
@@ -65,17 +65,17 @@ if target_os not in ['windows', 'winrt']:
 if target_os in ['linux']:
    easy_setup_env.AppendUnique(LIBS = ['pthread', 'dl', 'coap'])
 
-#if target_os in ['android']:
-#      easy_setup_env.AppendUnique(LIBPATH = [env.get('BUILD_DIR')])
-#      if env.get('SECURED') == '1':
-#              easy_setup_env.AppendUnique(LIBPATH = [env.get('SRC_DIR')+'/android/android_api/base/libs/armeabi'])
-#      easy_setup_env.AppendUnique(RPATH = [env.get('BUILD_DIR')])
-#      easy_setup_env.AppendUnique(CXXFLAGS = ['-frtti', '-fexceptions'])
-#      easy_setup_env.PrependUnique(LIBS = ['oc', 'octbstack', 'oc_logger', 'connectivity_abstraction', 'gnustl_shared'])
-#      if env.get('SECURED') == '1':
-#              easy_setup_env.AppendUnique(LIBS = ['ocpmapi','ocprovision'])
-#      if not env.get('RELEASE'):
-#              easy_setup_env.AppendUnique(LIBS = ['log'])
+if target_os in ['android']:
+       easy_setup_env.AppendUnique(LIBPATH = [env.get('BUILD_DIR')])
+       if env.get('SECURED') == '1':
+               easy_setup_env.AppendUnique(LIBPATH = [env.get('SRC_DIR')+'/android/android_api/base/libs/armeabi'])
+       easy_setup_env.AppendUnique(RPATH = [env.get('BUILD_DIR')])
+       easy_setup_env.AppendUnique(CXXFLAGS = ['-frtti', '-fexceptions'])
+       easy_setup_env.PrependUnique(LIBS = ['oc', 'octbstack', 'oc_logger', 'connectivity_abstraction', 'gnustl_shared'])
+       if env.get('SECURED') == '1':
+               easy_setup_env.AppendUnique(LIBS = ['ocpmapi','ocprovision'])
+       if not env.get('RELEASE'):
+               easy_setup_env.AppendUnique(LIBS = ['log'])
 
 if target_os in ['linux']:
        easy_setup_env.AppendUnique(LIBPATH = [env.get('BUILD_DIR')])
@@ -85,8 +85,8 @@ if target_os in ['linux']:
        if env.get('SECURED') == '1':
                easy_setup_env.AppendUnique(LIBS = ['ocpmapi', 'ocprovision'])
 
-#if target_os in ['android','linux']:
-if target_os in ['linux']:
+if target_os in ['android','linux']:
+#if target_os in ['linux']:
        easy_setup_env.PrependUnique(CPPPATH = [
                env.get('SRC_DIR') + '/resource/c_common/oic_malloc/include',
                env.get('SRC_DIR') + '/resource/include',
@@ -114,8 +114,8 @@ print"easysetup_path %s" % easysetup_path
 
 es_src = None
 
-#if target_os in ['android','linux']:
-if target_os in ['linux']:
+if target_os in ['android','linux']:
+#if target_os in ['linux']:
        if env.get('SECURED') == '1':
                env.AppendUnique(es_src = [os.path.join(easysetup_path, 'src/EnrolleeSecurity.cpp')])
 
diff --git a/service/easy-setup/mediator/richsdk/android/EasySetupCore/src/main/java/org/iotivity/service/easysetup/mediator/EasySetup.java b/service/easy-setup/mediator/richsdk/android/EasySetupCore/src/main/java/org/iotivity/service/easysetup/mediator/EasySetup.java
new file mode 100755 (executable)
index 0000000..597e681
--- /dev/null
@@ -0,0 +1,107 @@
+/**
+ * ***************************************************************
+ *
+ * Copyright 2017 Samsung Electronics All Rights Reserved.
+ * 
+ *
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * ****************************************************************
+ */
+
+package org.iotivity.service.easysetup.mediator;
+
+import android.content.Context;
+import android.util.Log;
+
+import java.io.IOException;
+import java.util.ArrayList;
+
+/**
+ * This is facade class, a single point of contact for Application.
+ * It contains set of APIs to do easy setup of the enrolling device.
+ * ON-BOARDING - This is a step to establish connectivity between the device & Mediator device.
+ * PROVISION   - This is a step where the netowork's detail & credentials are given to the
+ * enrolling device.
+ */
+public class EasySetup {
+
+    private static final String TAG = EasySetup.class.getName();
+
+    private static EasySetup sInstance;
+
+    //private final EasySetupStatus mCallback;
+
+    //private ArrayList<EnrolleeDevice> mEnrolleeDeviceList;
+
+    //private final ProvisioningCallback mProvisioningCallback;
+
+    private static Context mContext;
+
+       private ArrayList<RemoteEnrollee> mRemoteEnrolleeList;
+
+    protected RemoteEnrollee mRemoteEnrollee;
+
+    //function to call the native createEnrolleeDevice
+    private native RemoteEnrollee nativeCreateRemoteEnrollee();
+
+    static {
+        // Load Easy Setup JNI interface
+        System.loadLibrary("ESMediatorRich");
+        System.loadLibrary("easysetup-jni");
+    }
+
+    private EasySetup() {
+        //mCallback = callback;
+        //mProvisioningCallback = new ProvisioningCallbackImpl(mCallback);
+        //mEnrolleeDeviceList = new ArrayList<EnrolleeDevice>();
+        mContext = null;
+    }
+
+    /**
+     * Gives a singleton instance of Easy setup service and initialize the service
+     *
+     * @param callback Application needs to provide this callback to receive the status of easy
+     *                 setup process.
+     */
+
+    public synchronized static EasySetup getInstance(Context context) {
+        if (sInstance == null) {
+            sInstance = new EasySetup();
+            mContext = context;
+        }
+        return sInstance;
+    }
+
+       public synchronized RemoteEnrollee createRemoteEnrollee()
+       {
+               // native call
+               mRemoteEnrollee = nativeCreateRemoteEnrollee();
+
+               mRemoteEnrolleeList.add(mRemoteEnrollee);
+
+        return mRemoteEnrollee;
+       }
+
+    /**
+     * Reset the Easy setup Service
+     */
+
+    public void finish() {
+            //Call the stop Provisioning
+            //for (EnrolleeDevice enrolleeDevice : mEnrolleeDeviceList) {
+            //    enrolleeDevice.stopProvisioningProcess();
+        //}
+    }   
+}
index 66f12d0..ffa1b4d 100644 (file)
@@ -142,6 +142,7 @@ public class EnrolleeDeviceWiFiOnboarding extends EnrolleeDevice {
         mProvisioningCallback.onProgress(this);
         final EnrolleeDevice device = this;
         if (mProvConfig.getConnType() == ProvisioningConfig.ConnType.WiFi) {
+            /*
              try {
                  mRemoteEnrollee.registerProvisioningHandler(new IProvisionStatusNativeHandler() {
                      @Override
@@ -154,22 +155,26 @@ public class EnrolleeDeviceWiFiOnboarding extends EnrolleeDevice {
                          }
                      }
                  });
+
                  //native call
                 mRemoteEnrollee.startProvision();
              }catch(ESException e) {
                  Log.i(TAG,"startProvisioningProcess Register Listener to native exception");
              }
+             */
         }
     }
 
     protected void stopProvisioningProcess(){
         if(mState == EnrolleeState.DEVICE_PROVISIONING_STATE)
         {    //native call
+            /*
             try {
                 mRemoteEnrollee.stopProvision();
             } catch (ESException e) {
                 Log.i(TAG,"stopProvisioningProcess exception");
             }
+            */
         }else{
            Log.i(TAG,"stopProvisioningProcess : Provisioning is not in progress");
         }
old mode 100644 (file)
new mode 100755 (executable)
index 38328bc..db0206d
@@ -1,22 +1,22 @@
 /**
  * ***************************************************************
- * <p/>
+ *
  * Copyright 2016 Samsung Electronics All Rights Reserved.
- * <p/>
- * <p/>
- * <p/>
+ *
+ *
+ *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * <p/>
+ *
  * http://www.apache.org/licenses/LICENSE-2.0
- * <p/>
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
- * <p/>
+ *
  * ****************************************************************
  */
 
@@ -30,9 +30,9 @@ public class RemoteEnrollee{
     public static final String TAG = RemoteEnrollee.class.getName();
     private long m_nativeHandle;
 
-    private native void nativeStartProvision();
-    private native void nativeStopProvision();
-    private native void nativeRegisterProvisioningHandler(IProvisionStatusNativeHandler listener);
+    //private native void nativeStartProvision();
+    //private native void nativeStopProvision();
+    //private native void nativeRegisterProvisioningHandler(IProvisionStatusNativeHandler listener);
 
     /* constructor will be invoked from the native layer */
     private RemoteEnrollee(long nativeHandle){
@@ -40,20 +40,20 @@ public class RemoteEnrollee{
     }
 
     /* Register native Listener for the Provisioning state */
-    public void registerProvisioningHandler( IProvisionStatusNativeHandler provisioningListener) throws ESException{
-       // this.provisioningListener = provisioningListener;
-        nativeRegisterProvisioningHandler(provisioningListener);
-        Log.i(TAG, "JNI Callback is registered for getting provisioning status");
-    }
+    //public void registerProvisioningHandler( IProvisionStatusNativeHandler provisioningListener) throws ESException{
+    //   // this.provisioningListener = provisioningListener;
+    //    nativeRegisterProvisioningHandler(provisioningListener);
+    //    Log.i(TAG, "JNI Callback is registered for getting provisioning status");
+    //}
 
-    /* native StartProvision */
-    public void startProvision() throws ESException{
-    nativeStartProvision();
-}
+    ///* native StartProvision */
+    //public void startProvision() throws ESException{
+    //nativeStartProvision();
+       //}
 
     /* native stopProvision */
-    public void stopProvision() throws  ESException{
-    nativeStopProvision();
-}
+    //public void stopProvision() throws  ESException{
+    //nativeStopProvision();
+       //}
 
 }
index 87518ac..74d2ac3 100644 (file)
@@ -20,7 +20,7 @@ LOCAL_MODULE    := easysetup-jni
 DEFINE_FLAG =  -DWITH_POSIX -D__ANDROID__
 
 #Add Debug flags here
-DEBUG_FLAG      = -DTB_LOG
+DEBUG_FLAG = -DTB_LOG
 
 BUILD_FLAG = $(DEFINE_FLAG) $(DEBUG_FLAG)
 
@@ -34,7 +34,7 @@ LOCAL_C_INCLUDES := $(LOCAL_PATH) \
                                        $(LOCAL_PATH)/../../src \
                                        $(LOCAL_PATH)/../../../../inc \
                                        $(LOCAL_PATH)/../../../../../../resource/csdk/logger/include \
-                                   $(LOCAL_PATH)/../../../../../../resource/csdk/connectivity/common/inc \
+                                       $(LOCAL_PATH)/../../../../../../resource/csdk/connectivity/common/inc \
                                        $(LOCAL_PATH)/../../../../../../resource/c_common/oic_string/include \
                                        $(LOCAL_PATH)/../../../../../../resource/include \
                                        $(LOCAL_PATH)/../../../../../../resource/c_common \
@@ -46,7 +46,7 @@ LOCAL_C_INCLUDES := $(LOCAL_PATH) \
                                        $(LOCAL_PATH)/../../../../../../resource/csdk/security/include \
                                        $(LOCAL_PATH)/../../../../../../extlibs/cjson \
                                        $(LOCAL_PATH)/../../../../../../extlibs/boost/boost_1_58_0 \
-                    $(LOCAL_PATH)/../../../../../../extlibs/timer \
+                                       $(LOCAL_PATH)/../../../../../../extlibs/timer \
                                        $(LOCAL_PATH)/../../../../../../android/android_api/base/jni \
 
 LOCAL_SRC_FILES += $(patsubst $(LOCAL_PATH)/%, %, $(wildcard $(LOCAL_PATH)/*.cpp))
old mode 100644 (file)
new mode 100755 (executable)
index a237936..88521a0
@@ -26,42 +26,23 @@ using namespace OIC::Service;
 extern "C" {
 #endif
 JNIEXPORT jobject JNICALL
-Java_org_iotivity_service_easysetup_mediator_EasySetupService_nativeCreateEnrolleeDevice
-(JNIEnv *env, jobject interfaceClass, jstring ip, jstring ssid, jstring password,
- jint connectivityType, jboolean isSecured)
+Java_org_iotivity_service_easysetup_mediator_EasySetupService_nativeCreateRemoteEnrollee
+(JNIEnv *env, jobject interfaceClass)
 {
 
-    LOGI("JniEasySetup::nativeCreateEnrolleeDevice enter");
+    LOGI("JniEasySetup::nativeCreateRemoteEnrollee enter");
 
     std::shared_ptr<RemoteEnrollee> nativeRemoteEnrollee;
     jobject jRemoteEnrollee;
-    ProvConfig netInfo;
-    WiFiOnboadingConnection onboardConn;
-
-    const char *cIp = (env)->GetStringUTFChars(ip, NULL);
-    const char *cSssid = (env)->GetStringUTFChars(ssid, NULL);
-    const char *cPassword = (env)->GetStringUTFChars(password, NULL);
-
-    std::string sIp(cIp);
-    std::string sSssid(cSssid);
-    std::string sPassword(cPassword);
-
-    netInfo.connType = getOCConnectivityTypeFromInt(connectivityType);
-
-    onboardConn.isSecured = bool(isSecured);
-
-    OICStrcpy(onboardConn.ipAddress, IPV4_ADDR_SIZE - 1, sIp.c_str());
-    OICStrcpy(netInfo.provData.WIFI.ssid, NET_WIFI_SSID_SIZE - 1, sSssid.c_str());
-    OICStrcpy(netInfo.provData.WIFI.pwd, NET_WIFI_PWD_SIZE - 1, sPassword.c_str());
 
     try
     {
-        nativeRemoteEnrollee = EasySetup::getInstance()->createEnrolleeDevice(netInfo,onboardConn);
+        nativeRemoteEnrollee = EasySetup::getInstance()->createRemoteEnrollee();
         //create the java object
         jRemoteEnrollee = env->NewObject(g_cls_RemoteEnrollee, g_mid_RemoteEnrollee_ctor);
         if (!jRemoteEnrollee)
         {
-            LOGE("JniEasySetup::nativeCreateEnrolleeDevice Unable to create the java object");
+            LOGE("JniEasySetup::nativeCreateRemoteEnrollee Unable to create the java object");
             return NULL;
         }
 
@@ -70,12 +51,12 @@ Java_org_iotivity_service_easysetup_mediator_EasySetupService_nativeCreateEnroll
     }
     catch (ESBadRequestException exception)
     {
-        LOGE("JniEasySetup::nativeCreateEnrolleeDevice Unable to create the Native EnrolleeDevice");
+        LOGE("JniEasySetup::nativeCreateRemoteEnrollee Unable to create the Native EnrolleeDevice");
         //throw the exception to java layer
         throwESException( env,  exception.what());
     }
 
-    LOGI("JniEasySetup::nativeCreateEnrolleeDevice exit");
+    LOGI("JniEasySetup::nativeCreateRemoteEnrollee exit");
 
     return jRemoteEnrollee;
 }
old mode 100644 (file)
new mode 100755 (executable)
index 2af8935..8dd3882
@@ -47,18 +47,11 @@ extern "C" {
 /**
  * API for creating and returning the RemoteEnrollee object to Java Layer
  *
- * @param ip - ip address of Enrollee
- * @param ssid - ssid of the Enroller
- * @param password - password of the enroller
- * @param connectivityType - Connectivity Type
- * @param needSecuredEasysetup - need secured easy setup or not
- *
  * @return jobject - RemoteEnrolleee
  */
 JNIEXPORT jobject JNICALL
-Java_org_iotivity_service_easysetup_mediator_EasySetupService_nativeCreateEnrolleeDevice
-(JNIEnv *env, jobject interfaceClass, jstring ip, jstring ssid, jstring password,
- jint connectivityType, jboolean needSecuredEasysetup);
+Java_org_iotivity_service_easysetup_mediator_EasySetupService_nativeCreateRemoteEnrollee
+(JNIEnv *env, jobject interfaceClass);
 
 #ifdef __cplusplus
 }
old mode 100644 (file)
new mode 100755 (executable)
index 991ad31..5eff9d2
@@ -44,7 +44,7 @@ OCConnectivityType  getOCConnectivityTypeFromInt(int connectivityType)
     }
     return CT_DEFAULT;
 }
-
+/*
 int convertNativeProvisionStateToInt(EasySetupState nativeState)
 {
     switch (nativeState)
@@ -59,4 +59,5 @@ int convertNativeProvisionStateToInt(EasySetupState nativeState)
             return 3;
     }
     return -1;
-}
\ No newline at end of file
+}
+*/
\ No newline at end of file
old mode 100644 (file)
new mode 100755 (executable)
index f65a68c..6b90f6b
@@ -50,6 +50,6 @@ OCConnectivityType  getOCConnectivityTypeFromInt(int connectivityType);
 /**
 * @brief Convert EasySetupState Enum Value to int
 */
-int convertNativeProvisionStateToInt(EasySetupState nativeState);
+//int convertNativeProvisionStateToInt(EasySetupState nativeState);
 
 #endif //__JNI_ES_UTILS_H_
old mode 100644 (file)
new mode 100755 (executable)
index 94b15d2..07cfc33
@@ -42,7 +42,7 @@ JniProvisioningStatusListener::~JniProvisioningStatusListener()
         if (JNI_EDETACHED == ret) g_jvm->DetachCurrentThread();
     }
 }
-
+/*
 void JniProvisioningStatusListener::provisionStatusCallback (std::shared_ptr<EasySetupStatus>
         easySetupStatus)
 {
@@ -105,3 +105,4 @@ void JniProvisioningStatusListener::checkExAndRemoveListener(JNIEnv *env)
         m_ownerResource->removeProvisioningStatusListener(env, m_jwListener);
     }
 }
+*/
old mode 100644 (file)
new mode 100755 (executable)
index 8b37cac..237aa06
@@ -57,7 +57,7 @@ class JniProvisioningStatusListener
         /**
          * @brief callback function that will be passed to Native layer
         */
-        void provisionStatusCallback (std::shared_ptr<EasySetupStatus> easySetupStatus);
+        //void provisionStatusCallback (std::shared_ptr<EasySetupStatus> easySetupStatus);
 
     private:
         jweak m_jwListener;
old mode 100644 (file)
new mode 100755 (executable)
index 353d642..a1d9696
@@ -51,7 +51,7 @@ JniRemoteEnrollee *JniRemoteEnrollee::getJniRemoteEnrollee(JNIEnv *env, jobject
     }
     return remoteEnrollee;
 }
-
+/*
 void JniRemoteEnrollee::startProvisioning(JNIEnv *env)
 {
     try
@@ -156,4 +156,4 @@ Java_org_iotivity_service_easysetup_mediator_RemoteEnrollee_nativeRegisterProvis
 
     LOGD("nativeRegisterProvisioningHandler Exit");
 }
-
+*/
old mode 100644 (file)
new mode 100755 (executable)
index de1f297..d8779a0
@@ -60,17 +60,17 @@ class JniRemoteEnrollee
 
         // ***** JNI APIs internally call the APIs of this class ***** //
 
-        void startProvisioning(JNIEnv *env);
-        void stopProvisioning(JNIEnv *env);
-        void registerProvisioningHandler(JNIEnv *env, jobject jListener);
+        //void startProvisioning(JNIEnv *env);
+        //void stopProvisioning(JNIEnv *env);
+        //void registerProvisioningHandler(JNIEnv *env, jobject jListener);
 
-        JniProvisioningStatusListener *addProvisioningStatusListener(JNIEnv *env, jobject jListener);
-        void removeProvisioningStatusListener(JNIEnv *env, jobject jListener);
+        //JniProvisioningStatusListener *addProvisioningStatusListener(JNIEnv *env, jobject jListener);
+        //void removeProvisioningStatusListener(JNIEnv *env, jobject jListener);
 
         static JniRemoteEnrollee *getJniRemoteEnrollee(JNIEnv *env, jobject thiz);
 
     private:
-        JniEsListenerManager<JniProvisioningStatusListener> m_provisioingStatus;
+        //JniEsListenerManager<JniProvisioningStatusListener> m_provisioingStatus;
         std::shared_ptr<RemoteEnrollee> m_sharedResource;
 
 };
@@ -83,25 +83,25 @@ extern "C" {
 /**
  * API for starting the provisioning process.
  */
-JNIEXPORT void JNICALL
-Java_org_iotivity_service_easysetup_mediator_RemoteEnrollee_nativeStartProvision
-(JNIEnv *env, jobject jClass);
+//JNIEXPORT void JNICALL
+//Java_org_iotivity_service_easysetup_mediator_RemoteEnrollee_nativeStartProvision
+//(JNIEnv *env, jobject jClass);
 
 /**
  * API for stopping the provisioning process.
  */
-JNIEXPORT void JNICALL
-Java_org_iotivity_service_easysetup_mediator_RemoteEnrollee_nativeStopProvision
-(JNIEnv *env, jobject jClass);
+//JNIEXPORT void JNICALL
+//Java_org_iotivity_service_easysetup_mediator_RemoteEnrollee_nativeStopProvision
+//(JNIEnv *env, jobject jClass);
 
 /**
  * API for setting the lisener for recieiving provisioning status.
  *
  * @param provisiongListener - Provisioning listener [callback from native layer will be passing to this listener]
  */
-JNIEXPORT void JNICALL
-Java_org_iotivity_service_easysetup_mediator_RemoteEnrollee_nativeRegisterProvisioningHandler
-(JNIEnv *env, jobject jClass, jobject provisiongListener);
+//JNIEXPORT void JNICALL
+//Java_org_iotivity_service_easysetup_mediator_RemoteEnrollee_nativeRegisterProvisioningHandler
+//(JNIEnv *env, jobject jClass, jobject provisiongListener);
 
 #ifdef __cplusplus
 }