Initial commit of "simple" example bundle.


git-svn-id: https://svn.apache.org/repos/asf/incubator/felix/trunk@464985 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/simple/native/build.txt b/simple/native/build.txt
new file mode 100644
index 0000000..b79f659
--- /dev/null
+++ b/simple/native/build.txt
@@ -0,0 +1,6 @@
+cd ..; ant ; cd native
+javah -classpath ../simple.jar -jni org.apache.felix.simple.Activator
+gcc -I/usr/java/jdk/include \
+    -I/usr/java/jdk/include/linux \
+    -c simple_bundle_foo_method.c -o simple_bundle_foo_method.o
+ld -G simple_bundle_foo_method.o -o libfoo.so
diff --git a/simple/native/libfoo.so b/simple/native/libfoo.so
new file mode 100644
index 0000000..663cc19
--- /dev/null
+++ b/simple/native/libfoo.so
Binary files differ
diff --git a/simple/native/org_apache_felix_simple_Activator.h b/simple/native/org_apache_felix_simple_Activator.h
new file mode 100644
index 0000000..06fd02d
--- /dev/null
+++ b/simple/native/org_apache_felix_simple_Activator.h
@@ -0,0 +1,21 @@
+/* DO NOT EDIT THIS FILE - it is machine generated */
+#include <jni.h>
+/* Header for class org_apache_felix_simple_Activator */
+
+#ifndef _Included_org_apache_felix_simple_Activator
+#define _Included_org_apache_felix_simple_Activator
+#ifdef __cplusplus
+extern "C" {
+#endif
+/*
+ * Class:     org_apache_felix_simple_Activator
+ * Method:    foo
+ * Signature: ()Ljava/lang/String;
+ */
+JNIEXPORT jstring JNICALL Java_org_apache_felix_simple_Activator_foo
+  (JNIEnv *, jobject);
+
+#ifdef __cplusplus
+}
+#endif
+#endif
diff --git a/simple/native/simple_bundle_foo_method.c b/simple/native/simple_bundle_foo_method.c
new file mode 100644
index 0000000..a684abe
--- /dev/null
+++ b/simple/native/simple_bundle_foo_method.c
@@ -0,0 +1,10 @@
+#include "org_apache_felix_simple_Activator.h"
+
+JNIEXPORT jstring JNICALL
+    Java_org_apache_felix_simple_Activator_foo
+        (JNIEnv *env, jobject obj)
+{
+    char *cstr = "Hello!";
+    jstring jstr = (*env)->NewStringUTF(env, cstr);
+    return jstr;
+}