X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/6a87962ff2bd64e3c863ea894dd745647e380c93..0f83a8218acedbbea411208a0a9bf89c4aca9455:/src/bindings/java/jmsg.h diff --git a/src/bindings/java/jmsg.h b/src/bindings/java/jmsg.h index 73e9ad9460..de185402f8 100644 --- a/src/bindings/java/jmsg.h +++ b/src/bindings/java/jmsg.h @@ -1,63 +1,52 @@ /* Java Wrappers to the MSG API. */ -/* 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 MSG4JAVA_H #define MSG4JAVA_H -#include +#include #include -JavaVM *get_java_VM(void); -JNIEnv *get_current_thread_env(void); -/** - * This function throws the correct exception according to the status - * provided. - */ -void jmsg_throw_status(JNIEnv *env, msg_error_t status); +SG_BEGIN_DECL() -/* - * Class org_simgrid_msg_Msg - * Method getClock - * Signature ()D - */ -JNIEXPORT jdouble JNICALL Java_org_simgrid_msg_Msg_getClock(JNIEnv *, jclass); -/** - * Class org_simgrid_msg_Msg - * Method run - */ -JNIEXPORT void JNICALL - JNICALL Java_org_simgrid_msg_Msg_run(JNIEnv * env, jclass cls); +/* 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 */ -JNIEXPORT void JNICALL -Java_org_simgrid_msg_Msg_init(JNIEnv * env, jclass cls, jobjectArray jargs); +extern int JAVA_HOST_LEVEL; +extern int JAVA_STORAGE_LEVEL; -JNIEXPORT void JNICALL Java_org_simgrid_msg_Msg_debug(JNIEnv *, jclass, - jstring); - -JNIEXPORT void JNICALL Java_org_simgrid_msg_Msg_verb(JNIEnv *, jclass, - jstring); - -JNIEXPORT void JNICALL Java_org_simgrid_msg_Msg_info(JNIEnv *, jclass, - jstring); +JavaVM *get_java_VM(); +JNIEnv *get_current_thread_env(); +/** + * This function throws the correct exception according to the status provided. + */ +void jmsg_throw_status(JNIEnv *env, msg_error_t status); -JNIEXPORT void JNICALL Java_org_simgrid_msg_Msg_warn(JNIEnv *, jclass, - jstring); +JNIEXPORT jdouble JNICALL Java_org_simgrid_msg_Msg_getClock(JNIEnv * env, jclass cls); +JNIEXPORT void JNICALL JNICALL Java_org_simgrid_msg_Msg_run(JNIEnv * env, jclass cls); -JNIEXPORT void JNICALL Java_org_simgrid_msg_Msg_error(JNIEnv *, jclass, - jstring); +JNIEXPORT void JNICALL Java_org_simgrid_msg_Msg_init(JNIEnv * env, jclass cls, jobjectArray jargs); +JNIEXPORT void JNICALL Java_org_simgrid_msg_Msg_energyInit(); -JNIEXPORT void JNICALL Java_org_simgrid_msg_Msg_critical(JNIEnv *, jclass, - jstring); +JNIEXPORT void JNICALL Java_org_simgrid_msg_Msg_debug(JNIEnv * env, jclass cls, jstring jargs); +JNIEXPORT void JNICALL Java_org_simgrid_msg_Msg_verb(JNIEnv * env, jclass cls, jstring jargs); +JNIEXPORT void JNICALL Java_org_simgrid_msg_Msg_info(JNIEnv * env, jclass cls, jstring jargs); +JNIEXPORT void JNICALL Java_org_simgrid_msg_Msg_warn(JNIEnv * env, jclass cls, jstring jargs); +JNIEXPORT void JNICALL Java_org_simgrid_msg_Msg_error(JNIEnv * env, jclass cls, jstring jargs); +JNIEXPORT void JNICALL Java_org_simgrid_msg_Msg_critical(JNIEnv * env, jclass cls, jstring jargs); -JNIEXPORT void JNICALL -Java_org_simgrid_msg_Msg_createEnvironment(JNIEnv * env, jclass cls, - jstring jplatformFile); -JNIEXPORT void JNICALL -Java_org_simgrid_msg_Msg_deployApplication(JNIEnv * env, jclass cls, - jstring jdeploymentFile); +JNIEXPORT void JNICALL Java_org_simgrid_msg_Msg_createEnvironment(JNIEnv * env, jclass cls, jstring jplatformFile); +JNIEXPORT jobject JNICALL Java_org_simgrid_msg_Msg_environmentGetRoutingRoot(JNIEnv * env, jclass cls); +JNIEXPORT void JNICALL Java_org_simgrid_msg_Msg_deployApplication(JNIEnv * env, jclass cls, jstring jdeploymentFile); -#endif /* !MSG4JAVA_H */ +SG_END_DECL() +#endif