]> rtime.felk.cvut.cz Git - orte.git/blobdiff - orte/libjorte/JORTEPublicationPropertiesGet.c
JORTE: update license headers and clean-up includes
[orte.git] / orte / libjorte / JORTEPublicationPropertiesGet.c
index f97f5a704247e949e0de5a8df3bc24a2d6cbe051..4024c3376b0be86699068e0145e2de08bf630c47 100644 (file)
@@ -7,6 +7,7 @@
   * (by command 'javah -jni class_with_native_function')
   *
   * @author Lukas Pokorny (lukas_pokorny@centrum.cz)
+  * @author Martin Vajnar (martin.vajnar@gmail.com)
   * @author CTU FEE Prague - Department of Control Engineering (dce.felk.cvut.cz)
   * @author Project ORTE - OCERA Real Time Ethernet (www.ocera.org)
   * @author dedication to Kj
   *
   */
 
-#include <string.h>
-#include <stdlib.h>
-// library header file's path
-#include "orte.h"
-// enable TEST_STAGE run level
-#include "jorte/4all.h"
-#include "jorte/jorte_protos_api.h"
-// pregenerated header
-#include "jorte/org_ocera_orte_Publication.h"
-
+#include "jorte/jorte.h"
 
 JNIEXPORT jobject JNICALL
 Java_org_ocera_orte_Publication_jORTEPublicationPropertiesGet
-(JNIEnv *env, jobject obj, jint j_appDomain_handle)
+(JNIEnv *env, jobject obj, jlong j_appDomain_handle)
 {
   // jni types
   jclass         cls_pp   = NULL; // PublProp class
@@ -71,7 +63,7 @@ Java_org_ocera_orte_Publication_jORTEPublicationPropertiesGet
       break;
     }
     // find class
-    cls_pp = (*env)->FindClass(env, "org/ocera/orte/types/PublProp");
+    cls_pp = findClass(env, "org.ocera.orte.types.PublProp");
     if(cls_pp == 0)
     {
       #ifdef TEST_STAGE
@@ -104,7 +96,7 @@ Java_org_ocera_orte_Publication_jORTEPublicationPropertiesGet
     // setting object's fields
     /////////////////////////////////////////////////
     // set topic
-    if(!setTopic(env,cls_pp,obj_pp,publ_prop->topic))
+    if(!setTopic(env,cls_pp,obj_pp,(const char *)publ_prop->topic))
     {
       #ifdef TEST_STAGE
         printf(":!c: setTopic() failed! \n");
@@ -113,7 +105,7 @@ Java_org_ocera_orte_Publication_jORTEPublicationPropertiesGet
     }
     /////////////////////////////////////////////////
     // set type
-    if(!setType(env,cls_pp,obj_pp,publ_prop->typeName))
+    if(!setType(env,cls_pp,obj_pp,(const char *)publ_prop->typeName))
     {
       #ifdef TEST_STAGE
         printf(":!c: setType() failed! \n");
@@ -158,7 +150,7 @@ Java_org_ocera_orte_Publication_jORTEPublicationPropertiesGet
                             jbool);
     /////////////////////////////////////////////////
     // fieldID - persistence
-    cls_ntpT = (*env)->FindClass(env, "org/ocera/orte/types/NtpTime");
+    cls_ntpT = findClass(env, "org.ocera.orte.types.NtpTime");
     if(cls_ntpT == 0)
     {
       #ifdef TEST_STAGE