5 #include "jorte/4all.h"
6 #include "jorte/jorte_protos_api.h"
8 jobject createPubInfo(JNIEnv *env, const ORTEPubInfo *pinfo)
19 cls = findClass(env, "org.ocera.orte.types.PubInfo");
23 printf(":!c: cls = NULL \n");
27 // call object constructor
28 mid = (*env)->GetMethodID(env, cls, "<init>", "()V");
32 printf(":!c: constructor failed! \n");
37 obj = (*env)->NewObject(env, cls, mid);
41 printf(":!c: obj = NULL \n");
45 /////////////////////////////////////////////////
47 if(!setTopic(env,cls,obj,pinfo->topic))
50 printf(":!c: seTopic() failed! \n");
55 if(!setType(env,cls,obj,pinfo->type))
58 printf(":!c: seType() failed! \n");
62 /////////////////////////////////////////////////