Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
df0868d527bfc0d70dadb6a17293c7aaefe075f0
[simgrid.git] / src / bindings / java / jmsg.h
1 /* Java Wrappers to the MSG API.                                            */
2
3 /* Copyright (c) 2007-2017. The SimGrid Team. All rights reserved.          */
4
5 /* This program is free software; you can redistribute it and/or modify it
6  * under the terms of the license (GNU LGPL) which comes with this package. */
7
8 #ifndef MSG4JAVA_H
9 #define MSG4JAVA_H
10 #include <simgrid/msg.h>
11 #include <jni.h>
12
13 SG_BEGIN_DECL()
14
15 /* Shut up some errors in eclipse online compiler. I wish such a pimple wouldn't be needed */
16 #ifndef JNIEXPORT
17 #define JNIEXPORT
18 #endif
19 #ifndef JNICALL
20 #define JNICALL
21 #endif
22 /* end of eclipse-mandated pimple */
23
24 extern int JAVA_HOST_LEVEL;
25 extern int JAVA_STORAGE_LEVEL;
26
27 JavaVM *get_java_VM();
28 JNIEnv *get_current_thread_env();
29 /**
30  * This function throws the correct exception according to the status provided.
31  */
32 void jmsg_throw_status(JNIEnv *env, msg_error_t status);
33
34 JNIEXPORT jdouble JNICALL Java_org_simgrid_msg_Msg_getClock(JNIEnv *, jclass);
35 JNIEXPORT void JNICALL JNICALL Java_org_simgrid_msg_Msg_run(JNIEnv * env, jclass cls);
36
37 JNIEXPORT void JNICALL Java_org_simgrid_msg_Msg_init(JNIEnv * env, jclass cls, jobjectArray jargs);
38 JNIEXPORT void JNICALL Java_org_simgrid_msg_Msg_energyInit();
39
40 JNIEXPORT void JNICALL Java_org_simgrid_msg_Msg_debug(JNIEnv *, jclass, jstring);
41 JNIEXPORT void JNICALL Java_org_simgrid_msg_Msg_verb(JNIEnv *, jclass, jstring);
42 JNIEXPORT void JNICALL Java_org_simgrid_msg_Msg_info(JNIEnv *, jclass, jstring);
43 JNIEXPORT void JNICALL Java_org_simgrid_msg_Msg_warn(JNIEnv *, jclass, jstring);
44 JNIEXPORT void JNICALL Java_org_simgrid_msg_Msg_error(JNIEnv *, jclass, jstring);
45 JNIEXPORT void JNICALL Java_org_simgrid_msg_Msg_critical(JNIEnv *, jclass, jstring);
46
47 JNIEXPORT void JNICALL Java_org_simgrid_msg_Msg_createEnvironment(JNIEnv * env, jclass cls, jstring jplatformFile);
48 JNIEXPORT jobject JNICALL Java_org_simgrid_msg_Msg_environmentGetRoutingRoot(JNIEnv * env, jclass cls);
49 JNIEXPORT void JNICALL Java_org_simgrid_msg_Msg_deployApplication(JNIEnv * env, jclass cls, jstring jdeploymentFile);
50
51 SG_END_DECL()
52 #endif                          /* !MSG4JAVA_H */