Skip to content

Commit

Permalink
template package path fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
olir committed Aug 6, 2016
1 parent d82cef7 commit 3a42297
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 23 deletions.
22 changes: 11 additions & 11 deletions src/main/resources/template/ObjectManager_c.txt
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@
NativeReference *_nref = malloc( sizeof(*_nref) );
_nref->value = (GObject *)interface;
jobject _bb = (*env)->NewDirectByteBuffer(env, (void*)_nref, sizeof(NativeReference));
jclass cls = (*env)->FindClass(env, "olir/codegenj/ObjectManager");
jclass cls = (*env)->FindClass(env, "de/serviceflow/codegenj/ObjectManager");
jmethodID mid = (*env)->GetStaticMethodID(env, cls, "dispatchObjectManagerSignal", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Object;)V");
(*env)->CallStaticVoidMethod(env, cls, mid, _signalname, _objectpath, _name, _bb);
detachCurrentThread();
Expand All @@ -123,7 +123,7 @@
NativeReference *_nref = malloc( sizeof(*_nref) );
_nref->value = (GObject *)interface;
jobject _bb = (*env)->NewDirectByteBuffer(env, (void*)_nref, sizeof(NativeReference));
jclass cls = (*env)->FindClass(env, "olir/codegenj/ObjectManager");
jclass cls = (*env)->FindClass(env, "de/serviceflow/codegenj/ObjectManager");
jmethodID mid = (*env)->GetStaticMethodID(env, cls, "dispatchObjectManagerSignal", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Object;)V");
(*env)->CallStaticVoidMethod(env, cls, mid, _signalname, _objectpath, _name, _bb);
detachCurrentThread();
Expand All @@ -138,7 +138,7 @@
JNIEnv *env = attachCurrentThread();
jstring _signalname = (*env)->NewStringUTF(env, "object-added");
jstring _objectpath = (*env)->NewStringUTF(env, objectpath);
jclass cls = (*env)->FindClass(env, "olir/codegenj/ObjectManager");
jclass cls = (*env)->FindClass(env, "de/serviceflow/codegenj/ObjectManager");
jmethodID mid = (*env)->GetStaticMethodID(env, cls, "dispatchObjectManagerSignal", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Object;)V");
(*env)->CallStaticVoidMethod(env, cls, mid, _signalname, _objectpath, NULL, NULL);
detachCurrentThread();
Expand All @@ -161,7 +161,7 @@
JNIEnv *env = attachCurrentThread();
jstring _signalname = (*env)->NewStringUTF(env, "object-removed");
jstring _objectpath = (*env)->NewStringUTF(env, objectpath);
jclass cls = (*env)->FindClass(env, "olir/codegenj/ObjectManager");
jclass cls = (*env)->FindClass(env, "de/serviceflow/codegenj/ObjectManager");
jmethodID mid = (*env)->GetStaticMethodID(env, cls, "dispatchObjectManagerSignal",
"(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Object;)V");
(*env)->CallStaticVoidMethod(env, cls, mid, _signalname, _objectpath, NULL, NULL);
Expand Down Expand Up @@ -217,8 +217,8 @@
}


JNIEXPORT void JNICALL Java_olir_codegenj_ObjectManager__1init(JNIEnv *env, jobject thisObj, jstring objectpath) {
jclass cls = (*env)->FindClass(env, "olir/codegenj/ObjectManager");
JNIEXPORT void JNICALL Java_de_serviceflow_codegenj_ObjectManager__1init(JNIEnv *env, jobject thisObj, jstring objectpath) {
jclass cls = (*env)->FindClass(env, "de/serviceflow/codegenj/ObjectManager");
jmethodID mid = (*env)->GetStaticMethodID(env, cls, "getLogLevelIntValue", "()I");
loglevel = (*env)->CallStaticIntMethod(env, cls, mid);

Expand Down Expand Up @@ -269,7 +269,7 @@ JNIEXPORT void JNICALL Java_olir_codegenj_ObjectManager__1init(JNIEnv *env, jobj
initial_objects = g_dbus_object_manager_get_objects(_client);
}

JNIEXPORT void JNICALL Java_olir_codegenj_ObjectManager__1run(JNIEnv *env, jobject thisObj) {
JNIEXPORT void JNICALL Java_de_serviceflow_codegenj_ObjectManager__1run(JNIEnv *env, jobject thisObj) {
g_list_free_full (initial_objects, g_object_unref);

jclass _cls = (*env)->GetObjectClass(env, thisObj);
Expand All @@ -285,7 +285,7 @@ JNIEXPORT void JNICALL Java_olir_codegenj_ObjectManager__1run(JNIEnv *env, jobje
manager_thread = g_thread_new(NULL, start_thread, td);
}

JNIEXPORT void JNICALL Java_olir_codegenj_ObjectManager__1destroy(JNIEnv *env, jobject thisObj) {
JNIEXPORT void JNICALL Java_de_serviceflow_codegenj_ObjectManager__1destroy(JNIEnv *env, jobject thisObj) {
g_thread_new(NULL, exit_thread, NULL);


Expand All @@ -299,7 +299,7 @@ JNIEXPORT void JNICALL Java_olir_codegenj_ObjectManager__1destroy(JNIEnv *env, j
free(_nref);
}

JNIEXPORT jobjectArray JNICALL Java_olir_codegenj_ObjectManager_getProxyObjects(JNIEnv *env, jobject thisObj, jstring interfacename, jboolean initial) {
JNIEXPORT jobjectArray JNICALL Java_de_serviceflow_codegenj_ObjectManager_getProxyObjects(JNIEnv *env, jobject thisObj, jstring interfacename, jboolean initial) {
const gchar *_interfacename = (*env)->GetStringUTFChars(env, interfacename, 0);

jclass _cls = (*env)->GetObjectClass(env, thisObj);
Expand Down Expand Up @@ -375,7 +375,7 @@ JNIEXPORT jobjectArray JNICALL Java_olir_codegenj_ObjectManager_getProxyObjects(
return(ret);
}

JNIEXPORT jstring JNICALL Java_olir_codegenj_ObjectManager_getObjectPath(JNIEnv *env, jobject thisObj, jobject bb) {
JNIEXPORT jstring JNICALL Java_de_serviceflow_codegenj_ObjectManager_getObjectPath(JNIEnv *env, jobject thisObj, jobject bb) {
NativeReference* _nref = (NativeReference*) (*env)->GetDirectBufferAddress(env, bb);
GDBusInterface *_client = (GDBusInterface *)_nref->value;
// const gchar *name = g_dbus_proxy_get_interface_name (G_DBUS_PROXY (_client));
Expand All @@ -384,7 +384,7 @@ JNIEXPORT jstring JNICALL Java_olir_codegenj_ObjectManager_getObjectPath(JNIEnv
return (*env)->NewStringUTF(env, path);
}

JNIEXPORT void JNICALL Java_olir_codegenj_ObjectManager_dump(JNIEnv *env, jobject thisObj) {
JNIEXPORT void JNICALL Java_de_serviceflow_codegenj_ObjectManager_dump(JNIEnv *env, jobject thisObj) {

jclass _cls = (*env)->GetObjectClass(env, thisObj);
jfieldID _fid = (*env)->GetFieldID(env, _cls, "_client", "Ljava/lang/Object;");
Expand Down
2 changes: 0 additions & 2 deletions src/main/resources/template/ObjectManager_java.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
/* Source generated by codegenj (https://github.com/olir/codegenj) - DO NOT EDIT!
*
* https://github.com/olir/codegenj
*
* This generated output is free and unencumbered software released into the public domain.
*
Expand Down
2 changes: 0 additions & 2 deletions src/main/resources/template/interface_c.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
/* Source generated by codegenj (https://github.com/olir/codegenj) - DO NOT EDIT!
*
* https://github.com/olir/codegenj
*
* This generated output is free and unencumbered software released into the public domain.
*
Expand Down
2 changes: 0 additions & 2 deletions src/main/resources/template/interface_java.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
/* Source generated by codegenj (https://github.com/olir/codegenj) - DO NOT EDIT!
*
* https://github.com/olir/codegenj
*
* This license does not apply to any contained documentation in the source!
*
Expand Down
6 changes: 2 additions & 4 deletions src/main/resources/template/skeleton_c.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
/* Source generated by codegenj (https://github.com/olir/codegenj) - DO NOT EDIT!
*
* https://github.com/olir/codegenj
*
* This generated output is free and unencumbered software released into the public domain.
*
Expand Down Expand Up @@ -35,7 +33,7 @@



// from olir/codegenj/ObjectManager.c
// from de/serviceflow/codegenj/ObjectManager.c
JNIEnv *attachCurrentThread();
void detachCurrentThread();

Expand Down Expand Up @@ -118,7 +116,7 @@ handle_method_call (GDBusConnection *connection,
JNIEnv *env = attachCurrentThread();

// TODO: lookup and call java methods related to method_name within new thread, deliver return value async
// jclass cls = (*env)->FindClass(env, "olir/codegenj/ObjectManager"); - todo generate class name
// jclass cls = (*env)->FindClass(env, "de/serviceflow/codegenj/ObjectManager"); - todo generate class name
//jmethodID mid = (*env)->GetStaticMethodID(env, cls, "dispatchObjectManagerSignal",
// "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Object;)V");
// (*env)->CallVoidMethod(env, cls, mid, _signalname, _objectpath, NULL, NULL); -- use callbackObj
Expand Down
2 changes: 0 additions & 2 deletions src/main/resources/template/skeleton_java.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
/* Source generated by codegenj (https://github.com/olir/codegenj) - DO NOT EDIT!
*
* https://github.com/olir/codegenj
*
* This license does not apply to any contained documentation in the source!
*
Expand Down

0 comments on commit 3a42297

Please sign in to comment.