X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/6d42f087b6455decd2eb71db29d38d6909fd6165..7eef625065d0b3af4a64b5665009491426db974f:/src/java/jmsg.h diff --git a/src/java/jmsg.h b/src/java/jmsg.h index 6690965b0b..0d0d7a1d79 100644 --- a/src/java/jmsg.h +++ b/src/java/jmsg.h @@ -1,33 +1,28 @@ -/* - * $Id$ - * - * Copyright 2006,2007 Martin Quinson, Malek Cherier All right 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. - * - * This contains the declarations of the wrapper functions used to interface - * the java object with the native functions of the MSG API. - */ +/* Java Wrappers to the MSG API. */ + +/* Copyright (c) 2007, 2008, 2009, 2010. 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. */ #ifndef MSG4JAVA_H #define MSG4JAVA_H #include -JavaVM * -get_java_VM(void); +JavaVM *get_java_VM(void); -JNIEnv * -get_current_thread_env(void); +JNIEnv *get_current_thread_env(void); /* * Class simgrid_msg_Msg * Method processCreate * Signature (Lsimgrid/msg/Process;Lsimgrid/msg/Host;)V */ -JNIEXPORT void JNICALL -Java_simgrid_msg_MsgNative_processCreate(JNIEnv* env,jclass cls,jobject jprocess,jobject jhost); +JNIEXPORT void JNICALL +Java_simgrid_msg_MsgNative_processCreate(JNIEnv * env, jclass cls, + jobject jprocess, jobject jhost); @@ -36,8 +31,9 @@ Java_simgrid_msg_MsgNative_processCreate(JNIEnv* env,jclass cls,jobject jprocess * Method processSuspend * Signature (Lsimgrid/msg/Process;)V */ -JNIEXPORT void JNICALL -Java_simgrid_msg_MsgNative_processSuspend(JNIEnv* env, jclass cls, jobject jprocess); +JNIEXPORT void JNICALL +Java_simgrid_msg_MsgNative_processSuspend(JNIEnv * env, jclass cls, + jobject jprocess); /* * Class simgrid_msg_Msg @@ -175,8 +171,9 @@ JNIEXPORT jobject JNICALL Java_simgrid_msg_MsgNative_hostSelf JNIEXPORT jdouble JNICALL Java_simgrid_msg_MsgNative_hostGetSpeed (JNIEnv *, jclass, jobject); -JNIEXPORT jint JNICALL -Java_simgrid_msg_MsgNative_hostGetLoad(JNIEnv* env, jclass cls, jobject jhost); +JNIEXPORT jint JNICALL +Java_simgrid_msg_MsgNative_hostGetLoad(JNIEnv * env, jclass cls, + jobject jhost); /* * Class simgrid_msg_Msg @@ -194,8 +191,10 @@ JNIEXPORT jboolean JNICALL Java_simgrid_msg_MsgNative_hostIsAvail JNIEXPORT void JNICALL Java_simgrid_msg_MsgNative_taskCreate (JNIEnv *, jclass, jobject, jstring, jdouble, jdouble); -JNIEXPORT void JNICALL -Java_simgrid_msg_MsgNative_parallel_taskCreate(JNIEnv*, jclass, jobject, jstring, jobjectArray,jdoubleArray, jdoubleArray); +JNIEXPORT void JNICALL +Java_simgrid_msg_MsgNative_parallel_taskCreate(JNIEnv *, jclass, jobject, + jstring, jobjectArray, + jdoubleArray, jdoubleArray); /* * Class simgrid_msg_Msg @@ -269,83 +268,33 @@ JNIEXPORT void JNICALL Java_simgrid_msg_MsgNative_taskDestroy JNIEXPORT void JNICALL Java_simgrid_msg_MsgNative_taskExecute (JNIEnv *, jclass, jobject); -/* - * Class simgrid_msg_Msg - * Method taskGetWithTimeout - * Signature (I;D;Lsimgrid/msg/Host;)Lsimgrid/msg/Task; - */ -JNIEXPORT jobject JNICALL Java_simgrid_msg_MsgNative_taskGet - (JNIEnv *, jclass, jint, jdouble, jobject); - -JNIEXPORT jobject JNICALL -Java_simgrid_msg_MsgNative_taskReceive +JNIEXPORT jobject JNICALL + Java_simgrid_msg_MsgNative_taskReceive (JNIEnv *, jclass, jstring, jdouble, jobject); -/* - * Class simgrid_msg_Msg - * Method taskHasPendingCommunication - * Signature (I)Z - */ -JNIEXPORT jboolean JNICALL Java_simgrid_msg_MsgNative_taskProbe - (JNIEnv *, jclass, jint); - -/* - * Class simgrid_msg_Msg - * Method taskGetCommunicatingProcess - * Signature (I)Lsimgrid/msg/Process; - */ -JNIEXPORT jobject JNICALL Java_simgrid_msg_MsgNative_taskGetCommunicatingProcess - (JNIEnv *, jclass, jint); - -/* - * Class simgrid_msg_Msg - * Method taskGetHostWaitingTasks - * Signature (Lsimgrid/msg/Host;I)I - */ -JNIEXPORT jint JNICALL Java_simgrid_msg_MsgNative_taskProbeHost - (JNIEnv *, jclass, jobject, jint); - -/* - * Class simgrid_msg_Msg - * Method hostPutWith - * Signature (Lsimgrid/msg/Host;I;Lsimgrid/msg/Task;D)V - */ -JNIEXPORT void JNICALL Java_simgrid_msg_MsgNative_hostPut - (JNIEnv *, jclass, jobject, jint, jobject, jdouble); - -JNIEXPORT void JNICALL -Java_simgrid_msg_MsgNative_taskSend +JNIEXPORT void JNICALL + Java_simgrid_msg_MsgNative_taskSend (JNIEnv *, jclass, jstring, jobject, jdouble); -/* - * Class simgrid_msg_Msg - * Method hostPutBounded - * Signature (Lsimgrid/msg/Host;I;Lsimgrid/msg/Task;D)V - */ -JNIEXPORT void JNICALL Java_simgrid_msg_MsgNative_hostPutBounded - (JNIEnv *, jclass, jobject, jint, jobject, jdouble); - /* * Class simgrid_msg_Msg * Method getErrCode * Signature ()I */ -JNIEXPORT jint JNICALL Java_simgrid_msg_Msg_getErrCode - (JNIEnv *, jclass); +JNIEXPORT jint JNICALL Java_simgrid_msg_Msg_getErrCode(JNIEnv *, jclass); /* * Class simgrid_msg_Msg * Method getClock * Signature ()D */ -JNIEXPORT jdouble JNICALL Java_simgrid_msg_Msg_getClock - (JNIEnv *, jclass); +JNIEXPORT jdouble JNICALL Java_simgrid_msg_Msg_getClock(JNIEnv *, jclass); JNIEXPORT void JNICALL -JNICALL Java_simgrid_msg_Msg_run(JNIEnv* env, jclass cls); + JNICALL Java_simgrid_msg_Msg_run(JNIEnv * env, jclass cls); -JNIEXPORT void JNICALL -Java_simgrid_msg_Msg_init(JNIEnv* env, jclass cls, jobjectArray jargs); +JNIEXPORT void JNICALL +Java_simgrid_msg_Msg_init(JNIEnv * env, jclass cls, jobjectArray jargs); /* * Class simgrid_msg_Msg @@ -363,31 +312,34 @@ JNIEXPORT jint JNICALL Java_simgrid_msg_MsgNative_processKillAll JNIEXPORT void JNICALL Java_simgrid_msg_MsgNative_processExit (JNIEnv *, jclass, jobject); -JNIEXPORT void JNICALL -Java_simgrid_msg_Msg_pajeOutput(JNIEnv* env, jclass cls, jstring jpajeFile); - -JNIEXPORT void JNICALL -Java_simgrid_msg_Msg_info(JNIEnv * , jclass , jstring ); +JNIEXPORT void JNICALL Java_simgrid_msg_Msg_info(JNIEnv *, jclass, jstring); JNIEXPORT jobjectArray JNICALL -Java_simgrid_msg_MsgNative_allHosts(JNIEnv * , jclass ); +Java_simgrid_msg_MsgNative_allHosts(JNIEnv *, jclass); -JNIEXPORT void JNICALL -Java_simgrid_msg_Msg_createEnvironment(JNIEnv* env, jclass cls,jstring jplatformFile); +JNIEXPORT void JNICALL +Java_simgrid_msg_Msg_createEnvironment(JNIEnv * env, jclass cls, + jstring jplatformFile); -JNIEXPORT void JNICALL +JNIEXPORT void JNICALL Java_simgrid_msg_MsgNative_selectContextFactory(JNIEnv *, jclass, jstring); -JNIEXPORT void JNICALL -Java_simgrid_msg_MsgNative_taskSendBounded(JNIEnv*, jclass, jstring, jobject, jdouble); +JNIEXPORT void JNICALL +Java_simgrid_msg_MsgNative_taskSendBounded(JNIEnv *, jclass, jstring, jobject, + jdouble); -JNIEXPORT jboolean JNICALL -Java_simgrid_msg_MsgNative_taskListen(JNIEnv*, jclass, jstring); +JNIEXPORT jboolean JNICALL +Java_simgrid_msg_MsgNative_taskListen(JNIEnv *, jclass, jstring); -JNIEXPORT jint JNICALL -Java_simgrid_msg_MsgNative_taskListenFromHost(JNIEnv*, jclass, jstring, jobject); +JNIEXPORT jint JNICALL +Java_simgrid_msg_MsgNative_taskListenFromHost(JNIEnv *, jclass, jstring, + jobject); -JNIEXPORT jint JNICALL -Java_simgrid_msg_MsgNative_taskListenFrom(JNIEnv*, jclass, jstring); +JNIEXPORT jint JNICALL +Java_simgrid_msg_MsgNative_taskListenFrom(JNIEnv *, jclass, jstring); + +JNIEXPORT void JNICALL +Java_simgrid_msg_Msg_deployApplication(JNIEnv * env, jclass cls, + jstring jdeploymentFile); -#endif /* !MSG4JAVA_H */ +#endif /* !MSG4JAVA_H */