RESET/ACK messages requirement to add additional data from CA .
[platform/upstream/iotivity.git] / resource / csdk / connectivity / samples / android / sample_service / src / com / iotivity / service / RMInterface.java
index 58c7bb7..1733b57 100644 (file)
@@ -1,4 +1,3 @@
-
 package com.iotivity.service;
 
 import android.content.Context;
@@ -8,15 +7,15 @@ public class RMInterface {
     static {
         // Load RI JNI interface
         System.loadLibrary("RMInterface");
-        
+
         // Load CA JNI interface
         System.loadLibrary("CAInterface");
     }
 
     private com.iotivity.service.MainActivity mResponseListener = null;
-    
+
     public native void setNativeResponseListener(Object listener);
-    
+
     public native void RMInitialize(Context context);
 
     public native void RMTerminate();
@@ -29,28 +28,31 @@ public class RMInterface {
 
     public native void RMFindResource(String uri);
 
-    public native void RMSendRequest(String uri, String payload, int selectedNetwork, int isSecured, int msgType);
+    public native void RMSendRequest(String uri, String payload,
+            int selectedNetwork, int isSecured, int msgType);
 
-    public native void RMSendResponse(String uri, String payload, int selectedNetwork, int isSecured);
+    public native void RMSendResponse(int selectedNetwork, int isSecured,
+            int msgType, int responseValue);
 
-    public native void RMAdvertiseResource(String advertiseResource, int selectedNetwork);
-    
-    public native void RMSendNotification(String uri, String payload, int selectedNetwork, int isSecured);
+    public native void RMAdvertiseResource(String advertiseResource,
+            int selectedNetwork);
+
+    public native void RMSendNotification(String uri, String payload,
+            int selectedNetwork, int isSecured);
 
     public native void RMSelectNetwork(int interestedNetwork);
 
     public native void RMHandleRequestResponse();
-    
+
     public void setResponseListener(com.iotivity.service.MainActivity listener) {
-       mResponseListener = listener;
-       setNativeResponseListener(this);
+        mResponseListener = listener;
+        setNativeResponseListener(this);
     }
-    
+
     private void OnResponseReceived(String subject, String receivedData) {
-       
-       if (null != mResponseListener) {
-               mResponseListener.OnResponseReceived(subject, receivedData);
-       }
+        if (null != mResponseListener) {
+            mResponseListener.OnResponseReceived(subject, receivedData);
+        }
     }
-    
+
 }
\ No newline at end of file