android-go/examples/pgp/jni_android.h
Greg f5a3da4398 Working version which returns data via Go channels after waiting for
all user interactions to complete successfully. Streamline code and
eliminating PgpFragment (make PgpConnect itself a Fragment).
2019-11-15 20:17:43 -05:00

17 lines
929 B
C

#include <jni.h>
void SetLoader(JNIEnv* env, jobject context);
jclass FindClass(JNIEnv* env, char* name);
jobject CreateObject(JNIEnv* env, jclass cls);
jobject NewPgpConnect(JNIEnv* env, jobject act);
const char* Decrypt(JNIEnv* env, jobject p, char* cdata, int datalen, int chint);
const char* Encrypt(JNIEnv* env, jobject p, char* cid, int idlen, char* cdata, int datalen, int chint);
void stringResult(JNIEnv* env, jclass cls, jint requestCode, jobject response);
void CallVoidMethod(JNIEnv *env, jobject obj, jmethodID methodID);
void CallVoidMethod1(JNIEnv *env, jobject obj, jmethodID methodID, jobject arg);
jint CallIntMethod(JNIEnv *env, jobject obj, jmethodID methodID);
jmethodID GetMethodID(JNIEnv *env, jclass clazz, const char *name, const char *sig);
jint GetEnv(JavaVM *vm, JNIEnv **env, jint version);
jint AttachCurrentThread(JavaVM *vm, JNIEnv **p_env, void *thr_args);
jint DetachCurrentThread(JavaVM *vm);