5 #include "jorte/4all.h"
6 #include "jorte/jorte_protos_api.h"
8 jobject createSubInfo(JNIEnv *env, const ORTESubInfo *sinfo)
20 cls = findClass(env, "org.ocera.orte.types.SubInfo");
24 printf(":!c: cls = NULL \n");
28 // call object constructor
29 mid = (*env)->GetMethodID(env, cls, "<init>", "()V");
33 printf(":!c: constructor failed! \n");
38 obj = (*env)->NewObject(env, cls, mid);
42 printf(":!c: obj = NULL \n");
46 /////////////////////////////////////////////////
48 if(!setTopic(env,cls,obj,sinfo->topic))
51 printf(":!c: seTopic() failed! \n");
56 if(!setType(env,cls,obj,sinfo->type))
59 printf(":!c: seType() failed! \n");
63 /////////////////////////////////////////////////