Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Plug many memleaks in the Java bindings
[simgrid.git] / src / bindings / java / jmsg_vm.h
1 /* Functions related to the Virtual Machines.                               */
2
3 /* Copyright (c) 2012-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 MSG_VM_H
9 #define MSG_VM_H
10
11 #include <jni.h>
12 #include "simgrid/msg.h"
13
14 SG_BEGIN_DECL()
15
16 /* Shut up some errors in eclipse online compiler. I wish such a pimple wouldn't be needed */
17 #ifndef JNIEXPORT
18 #define JNIEXPORT
19 #endif
20 #ifndef JNICALL
21 #define JNICALL
22 #endif
23 /* end of eclipse-mandated pimple */
24
25 void jvm_bind(JNIEnv *env, jobject jvm, msg_vm_t vm);
26 msg_vm_t jvm_get_native(JNIEnv *env, jobject jvm);
27
28 /*
29  * Class      org_simgrid_msg_VM
30  * Method      nativeInit
31  * Signature  ()V
32  */
33 JNIEXPORT void JNICALL Java_org_simgrid_msg_VM_nativeInit(JNIEnv *env, jclass cls);
34
35 /**
36  * Class      org_simgrid_msg_VM
37  * Method      isCreated
38  * Signature  ()B
39  */
40 JNIEXPORT jint JNICALL Java_org_simgrid_msg_VM_isCreated(JNIEnv *env, jobject jvm);
41
42 /**
43  * Class      org_simgrid_msg_VM
44  * Method      isRunning
45  * Signature  ()B
46  */
47 JNIEXPORT jint JNICALL Java_org_simgrid_msg_VM_isRunning(JNIEnv *env, jobject jvm);
48
49 /**
50  * Class      org_simgrid_msg_VM
51  * Method      isMigrating
52  * Signature  ()B
53  */
54 JNIEXPORT jint JNICALL Java_org_simgrid_msg_VM_isMigrating(JNIEnv *env, jobject jvm);
55
56 /**
57  * Class      org_simgrid_msg_VM
58  * Method      isSuspended
59  * Signature  ()B
60  */
61 JNIEXPORT jint JNICALL Java_org_simgrid_msg_VM_isSuspended(JNIEnv *env, jobject jvm);
62
63 /**
64  * Class      org_simgrid_msg_VM
65  * Method      isResuming
66  * Signature  ()B
67  */
68 JNIEXPORT jint JNICALL Java_org_simgrid_msg_VM_isResuming(JNIEnv *env, jobject jvm);
69
70 /**
71  * Class      org_simgrid_msg_VM
72  * Method      setBound
73  * Signature  (D)B
74  */
75 JNIEXPORT void JNICALL Java_org_simgrid_msg_VM_setBound(JNIEnv *env, jobject jvm, jdouble bound);
76
77 /**
78  * Class            org_simgrid_msg_VM
79  * Method           create
80  * Signature    ()V
81  */
82 JNIEXPORT void JNICALL Java_org_simgrid_msg_VM_create(JNIEnv* env, jobject jvm, jobject jhost, jstring jname,
83                                                       jint jramsize, jint dprate, jint mig_netspeed);
84
85 /**
86  * Class            org_simgrid_msg_VM
87  * Method           destroy
88  * Signature    ()V
89  */
90 JNIEXPORT void JNICALL Java_org_simgrid_msg_VM_nativeFinalize(JNIEnv *env, jobject jvm);
91
92 /**
93  * Class      org_simgrid_msg_VM
94  * Method      start
95  * Signature  (I)V
96  */
97 JNIEXPORT void JNICALL Java_org_simgrid_msg_VM_start(JNIEnv *env, jobject jvm);
98
99 /**
100  * Class      org_simgrid_msg_VM
101  * Method      nativeMigrate
102  * Signature  (Lorg/simgrid/msg/Host;)V
103  */
104 JNIEXPORT void JNICALL Java_org_simgrid_msg_VM_internalmig(JNIEnv *env, jobject jvm, jobject jhost);
105
106 /**
107  * Class      org_simgrid_msg_VM
108  * Method      suspend
109  * Signature  ()V
110  */
111 JNIEXPORT void JNICALL Java_org_simgrid_msg_VM_suspend(JNIEnv *env, jobject jvm);
112
113 /**
114  * Class      org_simgrid_msg_VM
115  * Method      resume
116  * Signature  ()V
117  */
118 JNIEXPORT void JNICALL Java_org_simgrid_msg_VM_resume(JNIEnv *env, jobject jvm);
119
120 /**
121  * Class      org_simgrid_msg_VM
122  * Method      shutdown
123  * Signature  ()V
124  */
125 JNIEXPORT void JNICALL Java_org_simgrid_msg_VM_shutdown(JNIEnv *env, jobject jvm);
126
127 SG_END_DECL()
128 #endif