Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Sort include lists according to clang-format.
[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
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 jfieldID jfile_field_bind;
26
27 void jfile_bind(JNIEnv *env, jobject jfile, msg_file_t fd);
28 msg_file_t jfile_get_native(JNIEnv *env, jobject jfile);
29
30 JNIEXPORT void JNICALL Java_org_simgrid_msg_File_nativeInit(JNIEnv *env, jclass cls);
31 JNIEXPORT void JNICALL Java_org_simgrid_msg_File_open(JNIEnv *env, jobject jfile, jobject jpath);
32 JNIEXPORT jlong JNICALL Java_org_simgrid_msg_File_read(JNIEnv *env, jobject jfile, jlong jsize);
33 JNIEXPORT jlong JNICALL Java_org_simgrid_msg_File_write(JNIEnv *env, jobject jfile, jlong jsize);
34 JNIEXPORT void JNICALL Java_org_simgrid_msg_File_seek(JNIEnv *env, jobject jfile, jlong joffset, jlong jorigin);
35 JNIEXPORT void JNICALL Java_org_simgrid_msg_File_close(JNIEnv *env, jobject jfile);
36
37 SG_END_DECL()
38 #endif