Browse Source

add version functions

JNI-88
Volker Birk 3 years ago
parent
commit
c2e8d47ac2
2 changed files with 14 additions and 0 deletions
  1. +4
    -0
      src/org/pEp/jniadapter/AbstractEngine.java
  2. +10
    -0
      src/org_pEp_jniadapter_AbstractEngine.cc

+ 4
- 0
src/org/pEp/jniadapter/AbstractEngine.java View File

@ -18,6 +18,7 @@ abstract class AbstractEngine implements AutoCloseable {
private Sync.NeedsFastPollCallback needsFastPollCallback;
private final static DefaultCallback defaultCallback = new DefaultCallback();
private native void init();
private native void release();
@ -33,6 +34,9 @@ abstract class AbstractEngine implements AutoCloseable {
}
}
private native String getVersion();
private native String getProtocolVersion();
private long keyserverThread;
private long keyserverQueue;


+ 10
- 0
src/org_pEp_jniadapter_AbstractEngine.cc View File

@ -201,6 +201,16 @@ extern "C" {
session(pEp::Adapter::release);
}
JNIEXPORT jstring JNICALL Java_org_pEp_jniadapter_AbstractEngine_getVersion(JNIEnv *env, jobject)
{
return env->NewStringUTF(::get_engine_version());
}
JNIEXPORT jstring JNICALL Java_org_pEp_jniadapter_AbstractEngine_getProtocolVersion(JNIEnv *env, jobject)
{
return env->NewStringUTF(::get_protocol_version());
}
int examine_identity(pEp_identity *ident, void *arg)
{
locked_queue< pEp_identity * > *queue = (locked_queue< pEp_identity * > *) arg;


Loading…
Cancel
Save