Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Fix stupid comments
[simgrid.git] / src / java / jmsg.h
1 /*
2  * $Id$
3  *
4  * Copyright 2006,2007 Martin Quinson, Malek Cherier All right 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  * This contains the declarations of the wrapper functions used to interface
10  * the java object with the native functions of the MSG API.
11  */
12
13 #ifndef MSG4JAVA_H
14 #define MSG4JAVA_H
15
16 #include <jni.h>
17
18 JavaVM *
19 get_java_VM(void);
20
21 JNIEnv *
22 get_current_thread_env(void);
23
24 /*
25  * Class                simgrid_msg_Msg
26  * Method               processCreate
27  * Signature    (Lsimgrid/msg/Process;Lsimgrid/msg/Host;)V
28  */
29 JNIEXPORT void JNICALL 
30 Java_simgrid_msg_Msg_processCreate(JNIEnv* env,jclass cls,jobject jprocess,jobject jhost);
31
32 /*
33  * Class                simgrid_msg_Msg
34  * Method               processSuspend
35  * Signature    (Lsimgrid/msg/Process;)V
36  */
37 JNIEXPORT void JNICALL 
38 Java_simgrid_msg_Msg_processSuspend(JNIEnv* env, jclass cls, jobject jprocess);
39
40 /*
41  * Class                simgrid_msg_Msg
42  * Method               processResume
43  * Signature    (Lsimgrid/msg/Process;)V
44  */
45 JNIEXPORT void JNICALL Java_simgrid_msg_Msg_processResume
46   (JNIEnv *, jclass, jobject);
47
48 /*
49  * Class                simgrid_msg_Msg
50  * Method               processIsSuspended
51  * Signature    (Lsimgrid/msg/Process;)Z
52  */
53 JNIEXPORT jboolean JNICALL Java_simgrid_msg_Msg_processIsSuspended
54   (JNIEnv *, jclass, jobject);
55
56 /*
57  * Class                simgrid_msg_Msg
58  * Method               processKill
59  * Signature    (Lsimgrid/msg/Process;)V
60  */
61 JNIEXPORT void JNICALL Java_simgrid_msg_Msg_processKill
62   (JNIEnv *, jclass, jobject);
63
64 /*
65  * Class                simgrid_msg_Msg
66  * Method               processGetHost
67  * Signature    (Lsimgrid/msg/Process;)Lsimgrid/msg/Host;
68  */
69 JNIEXPORT jobject JNICALL Java_simgrid_msg_Msg_processGetHost
70   (JNIEnv *, jclass, jobject);
71
72 /*
73  * Class                simgrid_msg_Msg
74  * Method               processFromPID
75  * Signature    (I)Lsimgrid/msg/Process;
76  */
77 JNIEXPORT jobject JNICALL Java_simgrid_msg_Msg_processFromPID
78   (JNIEnv *, jclass, jint);
79
80 /*
81  * Class                simgrid_msg_Msg
82  * Method               processGetPID
83  * Signature    (Lsimgrid/msg/Process;)I
84  */
85 JNIEXPORT jint JNICALL Java_simgrid_msg_Msg_processGetPID
86   (JNIEnv *, jclass, jobject);
87
88 /*
89  * Class                simgrid_msg_Msg
90  * Method               processGetPPID
91  * Signature    (Lsimgrid/msg/Process;)I
92  */
93 JNIEXPORT jint JNICALL Java_simgrid_msg_Msg_processGetPPID
94   (JNIEnv *, jclass, jobject);
95
96 /*
97  * Class                simgrid_msg_Msg
98  * Method               processSelf
99  * Signature    ()Lsimgrid/msg/Process;
100  */
101 JNIEXPORT jobject JNICALL Java_simgrid_msg_Msg_processSelf
102   (JNIEnv *, jclass);
103
104 /*
105  * Class                simgrid_msg_Msg
106  * Method               processSelfPID
107  * Signature    ()I
108  */
109 JNIEXPORT jint JNICALL Java_simgrid_msg_Msg_processSelfPID
110   (JNIEnv *, jclass);
111
112 /*
113  * Class                simgrid_msg_Msg
114  * Method               processSelfPPID
115  * Signature    ()I
116  */
117 JNIEXPORT jint JNICALL Java_simgrid_msg_Msg_processSelfPPID
118   (JNIEnv *, jclass);
119
120 /*
121  * Class                simgrid_msg_Msg
122  * Method               processChangeHost
123  * Signature    (Lsimgrid/msg/Process;Lsimgrid/msg/Host;)V
124  */
125 JNIEXPORT void JNICALL Java_simgrid_msg_Msg_processChangeHost
126   (JNIEnv *, jclass, jobject, jobject);
127
128 /*
129  * Class                simgrid_msg_Msg
130  * Method               processWaitFor
131  * Signature    (D)V
132  */
133 JNIEXPORT void JNICALL Java_simgrid_msg_Msg_processWaitFor
134   (JNIEnv *, jclass, jdouble);
135
136 /*
137  * Class                simgrid_msg_Msg
138  * Method               hostGetByName
139  * Signature    (Ljava/lang/String;)Lsimgrid/msg/Host;
140  */
141 JNIEXPORT jobject JNICALL Java_simgrid_msg_Msg_hostGetByName
142   (JNIEnv *, jclass, jstring);
143
144 /*
145  * Class                simgrid_msg_Msg
146  * Method               hostGetName
147  * Signature    (Lsimgrid/msg/Host;)Ljava/lang/String;
148  */
149 JNIEXPORT jstring JNICALL Java_simgrid_msg_Msg_hostGetName
150   (JNIEnv *, jclass, jobject);
151
152 /*
153  * Class                simgrid_msg_Msg
154  * Method               hostGetNumber
155  * Signature    ()I
156  */
157 JNIEXPORT jint JNICALL Java_simgrid_msg_Msg_hostGetNumber
158   (JNIEnv *, jclass);
159
160 /*
161  * Class                simgrid_msg_Msg
162  * Method               hostSelf
163  * Signature    ()Lsimgrid/msg/Host;
164  */
165 JNIEXPORT jobject JNICALL Java_simgrid_msg_Msg_hostSelf
166   (JNIEnv *, jclass);
167
168 /*
169  * Class                simgrid_msg_Msg
170  * Method               hostGetSpeed
171  * Signature    (Lsimgrid/msg/Host;)D
172  */
173 JNIEXPORT jdouble JNICALL Java_simgrid_msg_Msg_hostGetSpeed
174   (JNIEnv *, jclass, jobject);
175
176 JNIEXPORT jint JNICALL 
177 Java_simgrid_msg_Msg_hostGetLoad(JNIEnv* env, jclass cls, jobject jhost);
178
179 /*
180  * Class                simgrid_msg_Msg
181  * Method               hostIsAvail
182  * Signature    (Lsimgrid/msg/Host;)Z
183  */
184 JNIEXPORT jboolean JNICALL Java_simgrid_msg_Msg_hostIsAvail
185   (JNIEnv *, jclass, jobject);
186
187 /*
188  * Class                simgrid_msg_Msg
189  * Method               taskCreate
190  * Signature    (Lsimgrid/msg/Task;Ljava/lang/String;DD)V
191  */
192 JNIEXPORT void JNICALL Java_simgrid_msg_Msg_taskCreate
193   (JNIEnv *, jclass, jobject, jstring, jdouble, jdouble);
194
195 JNIEXPORT void JNICALL 
196 Java_simgrid_msg_Msg_parallel_taskCreate(JNIEnv*, jclass, jobject, jstring, jobjectArray,jdoubleArray, jdoubleArray);
197
198 /*
199  * Class                simgrid_msg_Msg
200  * Method               taskGetSender
201  * Signature    (Lsimgrid/msg/Task;)Lsimgrid/msg/Process;
202  */
203 JNIEXPORT jobject JNICALL Java_simgrid_msg_Msg_taskGetSender
204   (JNIEnv *, jclass, jobject);
205
206 JNIEXPORT jobject JNICALL 
207 Java_simgrid_msg_Msg_parallelTaskGetSender(JNIEnv* env , jclass cls , jobject jparallel_task);
208
209 /*
210  * Class                simgrid_msg_Msg
211  * Method               taskGetSource
212  * Signature    (Lsimgrid/msg/Task;)Lsimgrid/msg/Host;
213  */
214 JNIEXPORT jobject JNICALL Java_simgrid_msg_Msg_taskGetSource
215   (JNIEnv *, jclass, jobject);
216
217 JNIEXPORT jobject JNICALL 
218 Java_simgrid_msg_Msg_parallelTaskGetSource(JNIEnv* env , jclass cls, jobject jparallel_task);
219
220 /*
221  * Class                simgrid_msg_Msg
222  * Method               taskGetName
223  * Signature    (Lsimgrid/msg/Task;)Ljava/lang/String;
224  */
225 JNIEXPORT jstring JNICALL Java_simgrid_msg_Msg_taskGetName
226   (JNIEnv *, jclass, jobject);
227
228 JNIEXPORT jstring JNICALL 
229 Java_simgrid_msg_Msg_parallelTaskGetName(JNIEnv* env, jclass cls, jobject jparallel_task);
230
231 /*
232  * Class                simgrid_msg_Msg
233  * Method               taskCancel
234  * Signature    (Lsimgrid/msg/Task;)V
235  */
236 JNIEXPORT void JNICALL Java_simgrid_msg_Msg_taskCancel
237   (JNIEnv *, jclass, jobject);
238
239 JNIEXPORT void JNICALL 
240 Java_simgrid_msg_Msg_parallelTaskCancel(JNIEnv* env, jclass cls, jobject jparallel_task);
241
242 /*
243  * Class                simgrid_msg_Msg
244  * Method               taskGetComputeDuration
245  * Signature    (Lsimgrid/msg/Task;)D
246  */
247 JNIEXPORT jdouble JNICALL Java_simgrid_msg_Msg_taskGetComputeDuration
248   (JNIEnv *, jclass, jobject);
249
250 JNIEXPORT jdouble JNICALL 
251 Java_simgrid_msg_Msg_parallelTaskGetComputeDuration(JNIEnv* env, jclass cls, jobject jparallel_task);
252
253 /*
254  * Class                simgrid_msg_Msg
255  * Method               taskGetRemainingDuration
256  * Signature    (Lsimgrid/msg/Task;)D
257  */
258 JNIEXPORT jdouble JNICALL Java_simgrid_msg_Msg_taskGetRemainingDuration
259   (JNIEnv *, jclass, jobject);
260
261 JNIEXPORT jdouble JNICALL 
262 Java_simgrid_msg_Msg_paralleTaskGetRemainingDuration(JNIEnv* env, jclass cls, jobject jparallel_task);
263
264 /*
265  * Class                simgrid_msg_Msg
266  * Method               taskSetPriority
267  * Signature    (Lsimgrid/msg/Task;D)V
268  */
269 JNIEXPORT void JNICALL Java_simgrid_msg_Msg_taskSetPriority
270   (JNIEnv *, jclass, jobject, jdouble);
271
272 JNIEXPORT void JNICALL 
273 Java_simgrid_msg_Msg_parallelTaskSetPriority(JNIEnv* env, jclass cls, jobject jparallel_task, jdouble priority);
274
275 /*
276  * Class                simgrid_msg_Msg
277  * Method               taskDestroy
278  * Signature    (Lsimgrid/msg/Task;)V
279  */
280 JNIEXPORT void JNICALL Java_simgrid_msg_Msg_taskDestroy
281   (JNIEnv *, jclass, jobject);
282
283 JNIEXPORT void JNICALL 
284 Java_simgrid_msg_Msg_parallelTaskDestroy(JNIEnv* env, jclass cls, jobject jparallel_task);
285
286 /*
287  * Class                simgrid_msg_Msg
288  * Method               taskExecute
289  * Signature    (Lsimgrid/msg/Task;)V
290  */
291 JNIEXPORT void JNICALL Java_simgrid_msg_Msg_taskExecute
292   (JNIEnv *, jclass, jobject);
293
294 JNIEXPORT void JNICALL 
295 Java_simgrid_msg_Msg_parallelTaskExecute(JNIEnv* env, jclass cls, jobject jparallel_task);
296
297 /*
298  * Class                simgrid_msg_Msg
299  * Method               channelGet
300  * Signature    (Lsimgrid/msg/Channel;)Lsimgrid/msg/Task;
301  */
302 JNIEXPORT jobject JNICALL Java_simgrid_msg_Msg_channelGet
303   (JNIEnv *, jclass, jobject);
304
305 /*
306  * Class                simgrid_msg_Msg
307  * Method               channelGetWithTimeout
308  * Signature    (Lsimgrid/msg/Channel;D)Lsimgrid/msg/Task;
309  */
310 JNIEXPORT jobject JNICALL Java_simgrid_msg_Msg_channelGetWithTimeout
311   (JNIEnv *, jclass, jobject, jdouble);
312
313 /*
314  * Class                simgrid_msg_Msg
315  * Method               channelGetFromHost
316  * Signature    (Lsimgrid/msg/Channel;Lsimgrid/msg/Host;)Lsimgrid/msg/Task;
317  */
318 JNIEXPORT jobject JNICALL Java_simgrid_msg_Msg_channelGetFromHost
319   (JNIEnv *, jclass, jobject, jobject);
320
321 /*
322  * Class                simgrid_msg_Msg
323  * Method               channelHasPendingCommunication
324  * Signature    (Lsimgrid/msg/Channel;)Z
325  */
326 JNIEXPORT jboolean JNICALL Java_simgrid_msg_Msg_channelHasPendingCommunication
327   (JNIEnv *, jclass, jobject);
328
329 /*
330  * Class                simgrid_msg_Msg
331  * Method               channelGetCommunicatingProcess
332  * Signature    (Lsimgrid/msg/Channel;)I
333  */
334 JNIEXPORT jint JNICALL Java_simgrid_msg_Msg_channelGetCommunicatingProcess
335   (JNIEnv *, jclass, jobject);
336
337 /*
338  * Class                simgrid_msg_Msg
339  * Method               channelGetHostWaitingTasks
340  * Signature    (Lsimgrid/msg/Channel;Lsimgrid/msg/Host;)I
341  */
342 JNIEXPORT jint JNICALL Java_simgrid_msg_Msg_channelGetHostWaitingTasks
343   (JNIEnv *, jclass, jobject, jobject);
344
345 /*
346  * Class                simgrid_msg_Msg
347  * Method               channelPut
348  * Signature    (Lsimgrid/msg/Channel;Lsimgrid/msg/Task;Lsimgrid/msg/Host;)V
349  */
350 JNIEXPORT void JNICALL Java_simgrid_msg_Msg_channelPut
351   (JNIEnv *, jclass, jobject, jobject, jobject);
352
353 /*
354  * Class                simgrid_msg_Msg
355  * Method               channelPutWithTimeout
356  * Signature    (Lsimgrid/msg/Channel;Lsimgrid/msg/Task;Lsimgrid/msg/Host;D)V
357  */
358 JNIEXPORT void JNICALL Java_simgrid_msg_Msg_channelPutWithTimeout
359   (JNIEnv *, jclass, jobject, jobject, jobject, jdouble);
360
361 /*
362  * Class                simgrid_msg_Msg
363  * Method               channelPutBounded
364  * Signature    (Lsimgrid/msg/Channel;Lsimgrid/msg/Task;Lsimgrid/msg/Host;D)V
365  */
366 JNIEXPORT void JNICALL Java_simgrid_msg_Msg_channelPutBounded
367   (JNIEnv *, jclass, jobject, jobject, jobject, jdouble);
368
369 /*
370  * Class                simgrid_msg_Msg
371  * Method               channelWait
372  * Signature    (Lsimgrid/msg/Channel;D)I
373  */
374 JNIEXPORT jint JNICALL Java_simgrid_msg_Msg_channelWait
375   (JNIEnv *, jclass, jobject, jdouble);
376
377 /*
378  * Class                simgrid_msg_Msg
379  * Method               channelSetNumber
380  * Signature    (I)V
381  */
382 JNIEXPORT void JNICALL Java_simgrid_msg_Msg_channelSetNumber
383   (JNIEnv *, jclass, jint);
384
385 /*
386  * Class                simgrid_msg_Msg
387  * Method               channelGetNumber
388  * Signature    ()I
389  */
390 JNIEXPORT jint JNICALL Java_simgrid_msg_Msg_channelGetNumber
391   (JNIEnv *, jclass);
392
393 /*
394  * Class                simgrid_msg_Msg
395  * Method               getErrCode
396  * Signature    ()I
397  */
398 JNIEXPORT jint JNICALL Java_simgrid_msg_Msg_getErrCode
399   (JNIEnv *, jclass);
400
401 /*
402  * Class                simgrid_msg_Msg
403  * Method               getClock
404  * Signature    ()D
405  */
406 JNIEXPORT jdouble JNICALL Java_simgrid_msg_Msg_getClock
407   (JNIEnv *, jclass);
408
409
410 JNIEXPORT void JNICALL Java_simgrid_msg_Msg_init
411   (JNIEnv *, jclass, jobjectArray);
412
413
414 JNIEXPORT void JNICALL
415 JNICALL Java_simgrid_msg_Msg_run(JNIEnv* env, jclass cls);
416
417 JNIEXPORT void JNICALL 
418 Java_simgrid_msg_Msg_init(JNIEnv* env, jclass cls, jobjectArray jargs);
419
420 /*
421  * Class                simgrid_msg_Msg
422  * Method               processKillAll
423  * Signature    (I)I
424  */
425 JNIEXPORT jint JNICALL Java_simgrid_msg_Msg_processKillAll
426   (JNIEnv *, jclass, jint);
427
428 /*
429  * Class                simgrid_msg_Msg
430  * Method               processExit
431  * Signature    (Lsimgrid/msg/Process;)V
432  */
433 JNIEXPORT void JNICALL Java_simgrid_msg_Msg_processExit
434   (JNIEnv *, jclass, jobject);
435
436
437 JNIEXPORT void JNICALL 
438 Java_simgrid_msg_Msg_pajeOutput(JNIEnv* env, jclass cls, jstring jpajeFile);
439
440 /*
441  * Class                simgrid_msg_Msg
442  * Method               waitSignal
443  * Signature    (Lsimgrid/msg/Process;)V
444  */
445 JNIEXPORT void JNICALL Java_simgrid_msg_Msg_waitSignal
446   (JNIEnv *, jclass, jobject);
447
448 JNIEXPORT void JNICALL 
449 Java_simgrid_msg_Msg_info(JNIEnv * , jclass , jstring );
450
451 JNIEXPORT jobjectArray JNICALL
452 Java_simgrid_msg_Msg_allHosts(JNIEnv * , jclass );
453
454 JNIEXPORT void JNICALL 
455 Java_simgrid_msg_Msg_createEnvironment(JNIEnv* env, jclass cls,jstring jplatformFile);
456
457 JNIEXPORT void JNICALL 
458 Java_simgrid_msg_Msg_platformLoad(JNIEnv* env, jclass cls, jobject jplatform);
459
460 #endif /* !MSG4JAVA_H */