Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
fix lua builds
[simgrid.git] / src / bindings / java / jmsg_file.h
1 /* Java bindings of the file API.                                           */
2
3 /* Copyright (c) 2012-2015. 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_JFILE_H
9 #define MSG_JFILE_H
10 #include <jni.h>
11 #include "simgrid/msg.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 jfieldID jfile_field_bind;
25
26 void jfile_bind(JNIEnv *env, jobject jfile, msg_file_t fd);
27 msg_file_t jfile_get_native(JNIEnv *env, jobject jfile);
28
29 JNIEXPORT void JNICALL Java_org_simgrid_msg_File_nativeInit(JNIEnv *env, jclass cls);
30 JNIEXPORT void JNICALL Java_org_simgrid_msg_File_open(JNIEnv *env, jobject jfile, jobject jpath);
31 JNIEXPORT jlong JNICALL Java_org_simgrid_msg_File_read(JNIEnv *env, jobject jfile, jlong jsize);
32 JNIEXPORT jlong JNICALL Java_org_simgrid_msg_File_write(JNIEnv *env, jobject jfile, jlong jsize);
33 JNIEXPORT void JNICALL Java_org_simgrid_msg_File_seek(JNIEnv *env, jobject jfile, jlong joffset, jlong jorigin);
34 JNIEXPORT void JNICALL Java_org_simgrid_msg_File_close(JNIEnv *env, jobject jfile);
35
36 SG_END_DECL()
37 #endif