replace : iotivity -> iotivity-sec
[platform/upstream/iotivity.git] / android / android_api / base / jni / JniOcPlatform.h
index cff6800..cd8a6ae 100644 (file)
@@ -27,7 +27,9 @@
 #include "JniOnDirectPairingListener.h"
 #include "JniOnPresenceListener.h"
 #include "JniOnObserveListener.h"
-
+#ifdef TCP_ADAPTER
+#include "JniKeepAliveListener.h"
+#endif
 #include <mutex>
 
 #ifndef _Included_org_iotivity_base_OcPlatform
@@ -56,6 +58,10 @@ void RemoveOnDPDevicesFoundListener(JNIEnv* env, jobject jListener);
 JniOnDirectPairingListener* AddOnDirectPairingListener(JNIEnv* env, jobject jListener);
 void RemoveOnDirectPairingListener(JNIEnv* env, jobject jListener);
 
+#ifdef TCP_ADAPTER
+JniKeepAliveListener* AddKeepAliveListener(JNIEnv* env, jobject jListener);
+void RemoveKeepAliveListener(JNIEnv* env, jobject jListener);
+#endif
 std::map<jobject, std::pair<JniOnResourceFoundListener*, int>> onResourceFoundListenerMap;
 std::map<jobject, std::pair<JniOnDeviceInfoListener*, int>> onDeviceInfoListenerMap;
 std::map<jobject, std::pair<JniOnPlatformInfoListener*, int>> onPlatformInfoListenerMap;
@@ -63,7 +69,9 @@ std::map<jobject, std::pair<JniOnPresenceListener*, int>> onPresenceListenerMap;
 std::map<jobject, std::pair<JniOnObserveListener*, int>> onObserveListenerMap;
 std::map<jobject, std::pair<JniOnDPDevicesFoundListener*, int>> onDPDevicesFoundListenerMap;
 std::map<jobject, std::pair<JniOnDirectPairingListener*, int>> directPairingListenerMap;
-
+#ifdef TCP_ADAPTER
+std::map<jobject, std::pair<JniKeepAliveListener*, int>> KeepAliveListenerMap;
+#endif
 std::mutex resourceFoundMapLock;
 std::mutex deviceInfoMapLock;
 std::mutex platformInfoMapLock;
@@ -71,6 +79,9 @@ std::mutex presenceMapLock;
 std::mutex observeMapLock;
 std::mutex dpDevicesFoundListenerMapLock;
 std::mutex directPairingListenerMapLock;
+#ifdef TCP_ADAPTER
+std::mutex KeepAliveListenerMapLock;
+#endif
 
 #ifdef __cplusplus
 extern "C" {
@@ -78,10 +89,27 @@ extern "C" {
     /*
     * Class:     org_iotivity_base_OcPlatform
     * Method:    configure
-    * Signature: (IILjava/lang/String;II)V
+    * Signature: (IILjava/lang/String;IILjava/lang/String;I)V
     */
     JNIEXPORT void JNICALL Java_org_iotivity_base_OcPlatform_configure
-        (JNIEnv *, jclass, jint, jint, jstring, jint, jint, jstring);
+        (JNIEnv *, jclass, jint, jint, jstring, jint, jint, jstring, jstring,
+         jstring, jint, jbyteArray, jint);
+
+    /*
+    * Class:     org_iotivity_base_OcPlatform
+    * Method:    stop
+    * Signature: ()V
+    */
+    JNIEXPORT void JNICALL Java_org_iotivity_base_OcPlatform_stop
+        (JNIEnv *, jclass);
+
+    /*
+    * Class:     org_iotivity_base_OcPlatform
+    * Method:    start
+    * Signature: ()V
+    */
+    JNIEXPORT void JNICALL Java_org_iotivity_base_OcPlatform_start
+        (JNIEnv *, jclass);
 
     /*
     * Class:     org_iotivity_base_OcPlatform
@@ -389,6 +417,21 @@ extern "C" {
     JNIEXPORT void JNICALL Java_org_iotivity_base_OcPlatform_setDeviceId(
             JNIEnv *, jobject, jbyteArray);
 
+    /*
+     * Class:     org_iotivity_base_OcPlatform
+     * Method:    findKeepAliveResourceImpl
+     * Signature: (Ljava/lang/String;Lorg/iotivity/base/OcPlatform/KeepAliveListener;)V
+     */
+    JNIEXPORT void JNICALL Java_org_iotivity_base_OcPlatform_findKeepAliveResourceImpl(
+            JNIEnv *, jclass, jstring, jobject);
+
+    /*
+     * Class:     org_iotivity_base_OcPlatform
+     * Method:    sendKeepAliveRequestImpl
+     * Signature: (Ljava/lang/String;ILorg/iotivity/base/OcPlatform/KeepAliveListener;)V
+     */
+    JNIEXPORT void JNICALL Java_org_iotivity_base_OcPlatform_sendKeepAliveRequestImpl(
+            JNIEnv *, jclass, jstring, jobject, jobject);
 #ifdef __cplusplus
 }
 #endif