#include "JniOnDirectPairingListener.h"
#include "JniOnPresenceListener.h"
#include "JniOnObserveListener.h"
-#include "JniOnPublishResourceListener.h"
-#include "JniOnDeleteResourceListener.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);
-JniOnPublishResourceListener* AddOnPublishResourceListener(JNIEnv* env, jobject jListener);
-void RemoveOnPublishResourceListener(JNIEnv* env, jobject jListener);
-
-JniOnDeleteResourceListener* AddOnDeleteResourceListener(JNIEnv* env, jobject jListener);
-void RemoveOnDeleteResourceListener(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;
-std::map<jobject, std::pair<JniOnPublishResourceListener*, int>> onPublishResourceListenerMap;
-std::map<jobject, std::pair<JniOnDeleteResourceListener*, int>> onDeleteResourceListenerMap;
-
+#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;
-std::mutex publishResourceListenerMapLock;
-std::mutex deleteResourceListenerMapLock;
+#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
/*
* Class: org_iotivity_base_OcPlatform
+ * Method: setPropertyValue0
+ * Signature: (Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;)V
+ */
+ JNIEXPORT void JNICALL Java_org_iotivity_base_OcPlatform_setPropertyValue0
+ (JNIEnv *, jclass, jint, jstring, jobjectArray);
+
+ /*
+ * Class: org_iotivity_base_OcPlatform
+ * Method: setPropertyValue1
+ * Signature: (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
+ */
+ JNIEXPORT void JNICALL Java_org_iotivity_base_OcPlatform_setPropertyValue1
+ (JNIEnv *, jclass, jint, jstring, jstring);
+
+ /*
+ * Class: org_iotivity_base_OcPlatform
+ * Method: getPropertyValue0
+ * Signature: (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
+ */
+ JNIEXPORT void JNICALL Java_org_iotivity_base_OcPlatform_getPropertyValue0
+ (JNIEnv *, jint, jstring, jstring);
+
+ /*
+ * Class: org_iotivity_base_OcPlatform
* Method: unregisterResource0
* Signature: (Lorg/iotivity/base/OcResourceHandle;)V
*/
(JNIEnv *, jclass, jobject, jint, jstring, jobject);
/*
- * Class: org_iotivity_base_OcPlatform
- * Method: publishResourceToRD0
- * Signature: (Ljava/lang/String;ILorg/iotivity/base/OcPlatform/OnPublishResourceListener;I)V
- */
- JNIEXPORT void JNICALL Java_org_iotivity_base_OcPlatform_publishResourceToRD0
- (JNIEnv *, jclass, jstring, jint, jobject, jint);
+ * Class: org_iotivity_base_OcPlatform
+ * Method: constructAccountManagerObject0
+ * Signature: (Ljava/lang/String;I)Lorg/iotivity/base/OcAccountManager;
+ */
+ JNIEXPORT jobject JNICALL Java_org_iotivity_base_OcPlatform_constructAccountManagerObject0
+ (JNIEnv *, jclass, jstring, jint);
/*
* Class: org_iotivity_base_OcPlatform
- * Method: publishResourceToRD1
- * Signature: (Ljava/lang/String;I[Lorg/iotivity/base/OcResourceHandle
- * ;Lorg/iotivity/base/OcPlatform/OnPublishResourceListener;I)V
+ * Method: getDeviceId
+ * Signature: (I)V
*/
- JNIEXPORT void JNICALL Java_org_iotivity_base_OcPlatform_publishResourceToRD1
- (JNIEnv *, jclass, jstring, jint, jobjectArray, jobject, jint);
+ JNIEXPORT jbyteArray JNICALL Java_org_iotivity_base_OcPlatform_getDeviceId
+ (JNIEnv *, jobject);
/*
* Class: org_iotivity_base_OcPlatform
- * Method: deleteResourceFromRD0
- * Signature: (Ljava/lang/String;ILorg/iotivity/base/OcPlatform/OnDeleteResourceListener;I)V
+ * Method: setDeviceId
+ * Signature: (Ljava/lang/byte;)V
*/
- JNIEXPORT void JNICALL Java_org_iotivity_base_OcPlatform_deleteResourceFromRD0
- (JNIEnv *, jclass, jstring, jint, jobject, jint);
+ JNIEXPORT void JNICALL Java_org_iotivity_base_OcPlatform_setDeviceId(
+ JNIEnv *, jobject, jbyteArray);
/*
* Class: org_iotivity_base_OcPlatform
- * Method: deleteResourceFromRD1
- * Signature: (Ljava/lang/String;I[Lorg/iotivity/base/OcResourceHandle;Lorg/iotivity/base/OcPlatform/OnDeleteResourceListener;I)V
+ * Method: findKeepAliveResourceImpl
+ * Signature: (Ljava/lang/String;Lorg/iotivity/base/OcPlatform/KeepAliveListener;)V
*/
- JNIEXPORT void JNICALL Java_org_iotivity_base_OcPlatform_deleteResourceFromRD1
- (JNIEnv *, jclass, jstring, jint, jobjectArray, jobject, jint);
+ JNIEXPORT void JNICALL Java_org_iotivity_base_OcPlatform_findKeepAliveResourceImpl(
+ JNIEnv *, jclass, jstring, jobject);
/*
- * Class: org_iotivity_base_OcPlatform
- * Method: constructAccountManagerObject0
- * Signature: (Ljava/lang/String;I)Lorg/iotivity/base/OcAccountManager;
- */
- JNIEXPORT jobject JNICALL Java_org_iotivity_base_OcPlatform_constructAccountManagerObject0
- (JNIEnv *, jclass, jstring, jint);
-
+ * 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
#endif
-