Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' of scm.gforge.inria.fr:/gitroot/simgrid/simgrid
[simgrid.git] / src / bindings / java / jmsg.h
1 /* Java Wrappers to the MSG API.                                            */
2
3 /* Copyright (c) 2007-2015. The SimGrid Team.
4  * All rights reserved.                                                     */
5
6 /* This program is free software; you can redistribute it and/or modify it
7  * under the terms of the license (GNU LGPL) which comes with this package. */
8
9 #ifndef MSG4JAVA_H
10 #define MSG4JAVA_H
11 #include <simgrid/msg.h>
12 #include <jni.h>
13
14 SG_BEGIN_DECL()
15
16 extern int JAVA_HOST_LEVEL;
17 extern int JAVA_STORAGE_LEVEL;
18
19 JavaVM *get_java_VM(void);
20 JNIEnv *get_current_thread_env(void);
21 /**
22  * This function throws the correct exception according to the status
23  * provided.
24  */
25 void jmsg_throw_status(JNIEnv *env, msg_error_t status);
26
27 /*
28  * Class                org_simgrid_msg_Msg
29  * Method               getClock
30  * Signature    ()D
31  */
32 JNIEXPORT jdouble JNICALL Java_org_simgrid_msg_Msg_getClock(JNIEnv *, jclass);
33 /**
34  * Class                org_simgrid_msg_Msg
35  * Method               run
36  */
37 JNIEXPORT void JNICALL
38     JNICALL Java_org_simgrid_msg_Msg_run(JNIEnv * env, jclass cls);
39
40 JNIEXPORT void JNICALL
41 Java_org_simgrid_msg_Msg_init(JNIEnv * env, jclass cls, jobjectArray jargs);
42
43 JNIEXPORT void JNICALL Java_org_simgrid_msg_Msg_debug(JNIEnv *, jclass,
44                                                  jstring);
45
46 JNIEXPORT void JNICALL Java_org_simgrid_msg_Msg_verb(JNIEnv *, jclass,
47                                                  jstring);
48
49 JNIEXPORT void JNICALL Java_org_simgrid_msg_Msg_info(JNIEnv *, jclass,
50                                                  jstring);
51
52 JNIEXPORT void JNICALL Java_org_simgrid_msg_Msg_warn(JNIEnv *, jclass,
53                                                  jstring);
54
55 JNIEXPORT void JNICALL Java_org_simgrid_msg_Msg_error(JNIEnv *, jclass,
56                                                  jstring);
57
58 JNIEXPORT void JNICALL Java_org_simgrid_msg_Msg_critical(JNIEnv *, jclass,
59                                                  jstring);
60
61 JNIEXPORT void JNICALL
62 Java_org_simgrid_msg_Msg_createEnvironment(JNIEnv * env, jclass cls,
63                                        jstring jplatformFile);
64 JNIEXPORT jobject JNICALL
65 Java_org_simgrid_msg_Msg_environmentGetRoutingRoot(JNIEnv * env, jclass cls);
66 JNIEXPORT void JNICALL
67 Java_org_simgrid_msg_Msg_deployApplication(JNIEnv * env, jclass cls,
68                                        jstring jdeploymentFile);
69
70 SG_END_DECL()
71
72 #endif                          /* !MSG4JAVA_H */