From 239daec094ba809688af5c6ea850607b0034d17c Mon Sep 17 00:00:00 2001 From: kelson42 Date: Mon, 1 Apr 2013 19:15:54 +0200 Subject: [PATCH] + stub of Kiwix JNI --- JNIKiwix.h | 29 +++++++++++++++++++++++++++++ JNIKiwix.java | 12 ++++++++++++ kiwix.c | 11 +++++++++++ 3 files changed, 52 insertions(+) create mode 100644 JNIKiwix.h create mode 100644 JNIKiwix.java create mode 100644 kiwix.c diff --git a/JNIKiwix.h b/JNIKiwix.h new file mode 100644 index 000000000..f054c7b4c --- /dev/null +++ b/JNIKiwix.h @@ -0,0 +1,29 @@ +/* DO NOT EDIT THIS FILE - it is machine generated */ +#include +/* Header for class JNIKiwix */ + +#ifndef _Included_JNIKiwix +#define _Included_JNIKiwix +#ifdef __cplusplus +extern "C" { +#endif +/* + * Class: JNIKiwix + * Method: nativeLoadZIM + * Signature: ()Ljava/lang/Boolean; + */ +JNIEXPORT jobject JNICALL Java_JNIKiwix_nativeLoadZIM + (JNIEnv *, jobject); + +/* + * Class: JNIKiwix + * Method: nativeGetContent + * Signature: (Ljava/lang/String;)Ljava/lang/String; + */ +JNIEXPORT jstring JNICALL Java_JNIKiwix_nativeGetContent + (JNIEnv *, jobject, jstring); + +#ifdef __cplusplus +} +#endif +#endif diff --git a/JNIKiwix.java b/JNIKiwix.java new file mode 100644 index 000000000..d1a21a1d8 --- /dev/null +++ b/JNIKiwix.java @@ -0,0 +1,12 @@ +public class JNIKiwix { + public native Boolean nativeLoadZIM(); + public native String nativeGetContent(String url); + + static { + System.loadLibrary("kiwix"); + } + + public static void main(String[] args) { + return; + } +} \ No newline at end of file diff --git a/kiwix.c b/kiwix.c new file mode 100644 index 000000000..04b288b09 --- /dev/null +++ b/kiwix.c @@ -0,0 +1,11 @@ +#include +#include +#include +#include +#include "JNIKiwix.h" + +JNIEXPORT jobject JNICALL Java_JNIKiwix_nativeLoadZIM(JNIEnv *env, jobject obj) { +} + +JNIEXPORT jstring JNICALL Java_JNIKiwix_nativeGetContent(JNIEnv *env, jobject obj, jstring url) { +}