#include "JniOnDPDevicesFoundListener.h"
#include "JniOnDirectPairingListener.h"
#include "JniOnPresenceListener.h"
+#include "JniOnObserveListener.h"
+#ifdef TCP_ADAPTER
+#include "JniKeepAliveListener.h"
+#endif
#include <mutex>
#ifndef _Included_org_iotivity_base_OcPlatform
JniOnPresenceListener* AddOnPresenceListener(JNIEnv* env, jobject jListener);
void RemoveOnPresenceListener(JNIEnv* env, jobject jListener);
+JniOnObserveListener* AddOnObserveListener(JNIEnv* env, jobject jListener);
+void RemoveOnObserveListener(JNIEnv* env, jobject jListener);
+
JniOnDPDevicesFoundListener* AddOnDPDevicesFoundListener(JNIEnv* env, jobject jListener);
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;
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;
std::mutex presenceMapLock;
+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
/*
* 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
*/
/*
* Class: org_iotivity_base_OcPlatform
+ * Method: subscribeDevicePresence0
+ * Signature: (Ljava/lang/String;[Ljava/lang/String;I
+ * Lorg/iotivity/base/OcResource/OnObserveListener;)Lorg/iotivity/base/OcPresenceHandle;
+ */
+ JNIEXPORT jobject JNICALL Java_org_iotivity_base_OcPlatform_subscribeDevicePresence0
+ (JNIEnv *, jclass, jstring, jobjectArray, jint, jobject);
+
+ /*
+ * Class: org_iotivity_base_OcPlatform
* Method: constructResourceObject0
* Signature: (Ljava/lang/String;Ljava/lang/String;IZ[Ljava/lang/String;[Ljava/lang/String;)Lorg/iotivity/base/OcResource;
*/
*/
JNIEXPORT void JNICALL Java_org_iotivity_base_OcPlatform_doDirectPairing0
(JNIEnv *, jclass, jobject, jint, 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: getDeviceId
+ * Signature: (I)V
+ */
+ JNIEXPORT jbyteArray JNICALL Java_org_iotivity_base_OcPlatform_getDeviceId
+ (JNIEnv *, jobject);
+
+ /*
+ * Class: org_iotivity_base_OcPlatform
+ * Method: setDeviceId
+ * Signature: (Ljava/lang/byte;)V
+ */
+ 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
#endif
-