X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=android%2Fandroid_api%2Fbase%2Fjni%2FJniOcPlatform.h;h=cd8a6aea150a742d6411d64a354938c7bdb25135;hb=7f00f942c39b7bc27c7eeecf213a239c3fe4173c;hp=cff68007b4cc5dcca9d4c72aa40c324687704b89;hpb=edcfc3d2329da7b914771c0dcff5f42c9b74fd93;p=platform%2Fupstream%2Fiotivity.git diff --git a/android/android_api/base/jni/JniOcPlatform.h b/android/android_api/base/jni/JniOcPlatform.h index cff6800..cd8a6ae 100644 --- a/android/android_api/base/jni/JniOcPlatform.h +++ b/android/android_api/base/jni/JniOcPlatform.h @@ -27,7 +27,9 @@ #include "JniOnDirectPairingListener.h" #include "JniOnPresenceListener.h" #include "JniOnObserveListener.h" - +#ifdef TCP_ADAPTER +#include "JniKeepAliveListener.h" +#endif #include #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> onResourceFoundListenerMap; std::map> onDeviceInfoListenerMap; std::map> onPlatformInfoListenerMap; @@ -63,7 +69,9 @@ std::map> onPresenceListenerMap; std::map> onObserveListenerMap; std::map> onDPDevicesFoundListenerMap; std::map> directPairingListenerMap; - +#ifdef TCP_ADAPTER +std::map> 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