#include "JniOnDirectPairingListener.h"
#include "JniOnPresenceListener.h"
#include "JniOnObserveListener.h"
-
+#ifdef TCP_ADAPTER
+#include "JniKeepAliveListener.h"
+#endif
#include <mutex>
#ifndef _Included_org_iotivity_base_OcPlatform
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;
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;
std::mutex observeMapLock;
std::mutex dpDevicesFoundListenerMapLock;
std::mutex directPairingListenerMapLock;
+#ifdef TCP_ADAPTER
+std::mutex KeepAliveListenerMapLock;
+#endif
#ifdef __cplusplus
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
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