X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/4233134b16caf9ccba18a6b08e79d24d443ece75..f9436b840852218b39dce22d6057b6f223168daa:/src/bindings/java/jmsg_as.h diff --git a/src/bindings/java/jmsg_as.h b/src/bindings/java/jmsg_as.h index 00b21fc986..89ac082910 100644 --- a/src/bindings/java/jmsg_as.h +++ b/src/bindings/java/jmsg_as.h @@ -1,51 +1,37 @@ -/* Functions related to the java As instances. */ +/* Functions related to the java As instances. */ -/* Copyright (c) 2007-2012. The SimGrid Team. - * All rights reserved. */ +/* Copyright (c) 2007-2017. The SimGrid Team. All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it - * under the terms of the license (GNU LGPL) which comes with this package. */ - + * under the terms of the license (GNU LGPL) which comes with this package. */ #ifndef MSG_JAS_H #define MSG_JAS_H #include -#include "msg/msg.h" - -/* Functions related to the java host instances. */ - -/* Copyright (c) 2007-2012. The SimGrid Team. - * All rights reserved. */ - -/* This program is free software; you can redistribute it and/or modify it - * under the terms of the license (GNU LGPL) which comes with this package. */ - -#include "msg/msg.h" -#include "jmsg.h" -#include "jmsg_host.h" - -jobject jas_new_instance(JNIEnv * env); -jobject jas_ref(JNIEnv * env, jobject jas); -void jas_unref(JNIEnv * env, jobject jas); -void jas_bind(jobject jas, msg_as_t as, JNIEnv * env); -msg_as_t jas_get_native(JNIEnv * env, jobject jas); - -JNIEXPORT void JNICALL -Java_org_simgrid_msg_As_nativeInit(JNIEnv *env, jclass cls); - -JNIEXPORT jobject JNICALL -Java_org_simgrid_msg_As_getName(JNIEnv * env, jobject jas); - -JNIEXPORT jobjectArray JNICALL -Java_org_simgrid_msg_As_getSons(JNIEnv * env, jobject jas); - -JNIEXPORT jobject JNICALL -Java_org_simgrid_msg_As_getProperty(JNIEnv *env, jobject jhost, jobject jname); - -JNIEXPORT jobject JNICALL -Java_org_simgrid_msg_As_getModel(JNIEnv * env, jobject jas); - -JNIEXPORT jobjectArray JNICALL -Java_org_simgrid_msg_As_getHosts(JNIEnv * env, jobject jas); - -#endif /*!MSG_JAS_H */ +#include "simgrid/msg.h" + +SG_BEGIN_DECL() + +/* Shut up some errors in eclipse online compiler. I wish such a pimple wouldn't be needed */ +#ifndef JNIEXPORT +#define JNIEXPORT +#endif +#ifndef JNICALL +#define JNICALL +#endif +/* end of eclipse-mandated pimple */ + +jobject jnetzone_new_instance(JNIEnv* env); +jobject jnetzone_ref(JNIEnv* env, jobject jnetzone); +void jnetzone_unref(JNIEnv* env, jobject jnetzone); +void jnetzone_bind(jobject jas, msg_netzone_t as, JNIEnv* env); +simgrid::s4u::NetZone* jnetzone_get_native(JNIEnv* env, jobject jnetzone); + +JNIEXPORT void JNICALL Java_org_simgrid_msg_As_nativeInit(JNIEnv *env, jclass cls); +JNIEXPORT jobject JNICALL Java_org_simgrid_msg_As_getName(JNIEnv * env, jobject jas); +JNIEXPORT jobjectArray JNICALL Java_org_simgrid_msg_As_getSons(JNIEnv* env, jobject jnetzone); +JNIEXPORT jobject JNICALL Java_org_simgrid_msg_As_getProperty(JNIEnv *env, jobject jhost, jobject jname); +JNIEXPORT jobjectArray JNICALL Java_org_simgrid_msg_As_getHosts(JNIEnv* env, jobject jnetzone); + +SG_END_DECL() +#endif