Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Move functions from MsgNative to Host, and from jmsg to jmsg_host
[simgrid.git] / src / jmsg.h
1 /* Java Wrappers to the MSG API.                                            */
2
3 /* Copyright (c) 2007, 2008, 2009, 2010. 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
12 #include <jni.h>
13
14 JavaVM *get_java_VM(void);
15
16 JNIEnv *get_current_thread_env(void);
17
18 /*
19  * Class                simgrid_msg_Msg
20  * Method               processCreate
21  * Signature    (Lsimgrid/msg/Process;Lsimgrid/msg/Host;)V
22  */
23 JNIEXPORT void JNICALL
24 Java_org_simgrid_msg_MsgNative_processCreate(JNIEnv * env, jclass cls,
25                                          jobject jprocess, jobject jhost);
26
27
28
29 /*
30  * Class                simgrid_msg_Msg
31  * Method               processSuspend
32  * Signature    (Lsimgrid/msg/Process;)V
33  */
34 JNIEXPORT void JNICALL
35 Java_org_simgrid_msg_MsgNative_processSuspend(JNIEnv * env, jobject obj,
36                                           jobject jprocess);
37
38 /*
39  * Class                simgrid_msg_Msg
40  * Method               processResume
41  * Signature    (Lsimgrid/msg/Process;)V
42  */
43 JNIEXPORT void JNICALL Java_org_simgrid_msg_MsgNative_processResume
44     (JNIEnv *, jclass, jobject);
45
46
47 JNIEXPORT void JNICALL
48 Java_org_simgrid_msg_Process_simulatedSleep(JNIEnv * env, jclass cls,
49                                            jdouble jmillis);
50
51
52 /*
53  * Class                simgrid_msg_Msg
54  * Method               processIsSuspended
55  * Signature    (Lsimgrid/msg/Process;)Z
56  */
57 JNIEXPORT jboolean JNICALL Java_org_simgrid_msg_MsgNative_processIsSuspended
58     (JNIEnv *, jclass, jobject);
59
60 /*
61  * Class                simgrid_msg_Msg
62  * Method               processKill
63  * Signature    (Lsimgrid/msg/Process;)V
64  */
65 JNIEXPORT void JNICALL Java_org_simgrid_msg_MsgNative_processKill
66     (JNIEnv *, jclass, jobject);
67
68 /*
69  * Class                simgrid_msg_Msg
70  * Method               processGetHost
71  * Signature    (Lsimgrid/msg/Process;)Lsimgrid/msg/Host;
72  */
73 JNIEXPORT jobject JNICALL Java_org_simgrid_msg_MsgNative_processGetHost
74     (JNIEnv *, jclass, jobject);
75
76 /*
77  * Class                simgrid_msg_Msg
78  * Method               processFromPID
79  * Signature    (I)Lsimgrid/msg/Process;
80  */
81 JNIEXPORT jobject JNICALL Java_org_simgrid_msg_MsgNative_processFromPID
82     (JNIEnv *, jclass, jint);
83
84 /*
85  * Class                simgrid_msg_Msg
86  * Method               processGetPID
87  * Signature    (Lsimgrid/msg/Process;)I
88  */
89 JNIEXPORT jint JNICALL Java_org_simgrid_msg_MsgNative_processGetPID
90     (JNIEnv *, jclass, jobject);
91
92 /*
93  * Class                simgrid_msg_Msg
94  * Method               processGetPPID
95  * Signature    (Lsimgrid/msg/Process;)I
96  */
97 JNIEXPORT jint JNICALL Java_org_simgrid_msg_MsgNative_processGetPPID
98     (JNIEnv *, jclass, jobject);
99
100 /*
101  * Class                simgrid_msg_Msg
102  * Method               processSelf
103  * Signature    ()Lsimgrid/msg/Process;
104  */
105 JNIEXPORT jobject JNICALL Java_org_simgrid_msg_MsgNative_processSelf
106     (JNIEnv *, jclass);
107
108 /*
109  * Class                simgrid_msg_Msg
110  * Method               processSelfPID
111  * Signature    ()I
112  */
113 JNIEXPORT jint JNICALL Java_org_simgrid_msg_MsgNative_processSelfPID
114     (JNIEnv *, jclass);
115
116 /*
117  * Class                simgrid_msg_Msg
118  * Method               processSelfPPID
119  * Signature    ()I
120  */
121 JNIEXPORT jint JNICALL Java_org_simgrid_msg_MsgNative_processSelfPPID
122     (JNIEnv *, jclass);
123
124 /*
125  * Class                simgrid_msg_Msg
126  * Method               processMigrate
127  * Signature    (Lsimgrid/msg/Process;Lsimgrid/msg/Host;)V
128  */
129 JNIEXPORT void JNICALL Java_org_simgrid_msg_MsgNative_processMigrate
130     (JNIEnv *, jclass, jobject, jobject);
131
132 /*
133  * Class                simgrid_msg_Msg
134  * Method               processWaitFor
135  * Signature    (D)V
136  */
137 JNIEXPORT void JNICALL Java_org_simgrid_msg_MsgNative_processWaitFor
138     (JNIEnv *, jclass, jdouble);
139
140 JNIEXPORT jint JNICALL
141 Java_org_simgrid_msg_MsgNative_hostGetLoad(JNIEnv * env, jclass cls,
142                                        jobject jhost);
143
144 /*
145  * Class                simgrid_msg_Msg
146  * Method               getClock
147  * Signature    ()D
148  */
149 JNIEXPORT jdouble JNICALL Java_org_simgrid_msg_Msg_getClock(JNIEnv *, jclass);
150
151 JNIEXPORT void JNICALL
152     JNICALL Java_org_simgrid_msg_Msg_run(JNIEnv * env, jclass cls);
153 JNIEXPORT void JNICALL
154     JNICALL Java_org_simgrid_msg_Msg_clean(JNIEnv * env, jclass cls);
155
156 JNIEXPORT void JNICALL
157 Java_org_simgrid_msg_Msg_init(JNIEnv * env, jclass cls, jobjectArray jargs);
158
159 /*
160  * Class                simgrid_msg_Msg
161  * Method               processKillAll
162  * Signature    (I)I
163  */
164 JNIEXPORT jint JNICALL Java_org_simgrid_msg_MsgNative_processKillAll
165     (JNIEnv *, jclass, jint);
166
167 /*
168  * Class                simgrid_msg_Msg
169  * Method               processExit
170  * Signature    (Lsimgrid/msg/Process;)V
171  */
172 JNIEXPORT void JNICALL Java_org_simgrid_msg_MsgNative_processExit
173     (JNIEnv *, jclass, jobject);
174
175 JNIEXPORT void JNICALL Java_org_simgrid_msg_Msg_info(JNIEnv *, jclass,
176                                                  jstring);
177
178 JNIEXPORT jobjectArray JNICALL
179 Java_org_simgrid_msg_MsgNative_allHosts(JNIEnv *, jclass);
180
181 JNIEXPORT void JNICALL
182 Java_org_simgrid_msg_Msg_createEnvironment(JNIEnv * env, jclass cls,
183                                        jstring jplatformFile);
184 JNIEXPORT void JNICALL
185 Java_org_simgrid_msg_Msg_deployApplication(JNIEnv * env, jclass cls,
186                                        jstring jdeploymentFile);
187
188 #endif                          /* !MSG4JAVA_H */