blob: e9892df9bb8a4726abfccbba00dd192cdfb36280 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
|
/*
* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
* Copyright (C) INRIA - Allan CORNET
*
* This file must be used under the terms of the CeCILL.
* This source file is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
* are also available at
* http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
*
*/
/*--------------------------------------------------------------------------*/
#ifndef __JVM_FUNCTIONS_H__
#define __JVM_FUNCTIONS_H__
#include <jni.h> /* JVM functions */
#include "BOOL.h" /* BOOL */
/**
* Load JVM dynamic library
* @return TRUE or FALSE
*/
BOOL LoadDynLibJVM(char *SCILAB_PATH);
/**
* Free JVM dynamic library
* @return <ReturnValue> TRUE or FALSE
*/
BOOL FreeDynLibJVM(void);
/**
* wrapping JNI_CreateJavaVM
* @param pvm
* @param penv
* @param args
* @return <ReturnValue>
*/
jint SciJNI_CreateJavaVM(JavaVM **pvm, JNIEnv **penv, JavaVMInitArgs *args);
/**
* wrapping JNI_GetCreatedJavaVMs
* @param vmBuf
* @param BufLen
* @param nVMs
* @return <ReturnValue>
*/
jint SciJNI_GetCreatedJavaVMs(JavaVM **vmBuf, jsize BufLen, jsize *nVMs);
/**
* wrapping JNI_GetDefaultJavaVMInitArgs
* @param args
* @return <ReturnValue>
*/
jint SciJNI_GetDefaultJavaVMInitArgs(JavaVMInitArgs *args);
/**
* Check if Scilab uses embedded JRE
* @return <ReturnValue> TRUE or FALSE
*/
BOOL withEmbeddedJRE(void);
/**
* search a Created JavaVM
* @return a JavaVM or NULL (not found)
*/
JavaVM *FindCreatedJavaVM(char *SCILAB_PATH);
/**
* Load Functions for JVM
* @return TRUE or FALSE
*/
BOOL LoadFunctionsJVM(char *filedynlib);
/**
* Returns the description of the error message from the JNI return status
*
* @param status the JNI status
* @return The message describing the problem
*/
char *getJniErrorFromStatusCode(long status);
/**
* Returns if jvm symbols (JNI_GetCreatedJavaVMs, JNI_CreateJavaVM, ...) are already loaded
* @return TRUE or FALSE
*/
BOOL hasJvmSymbolsLoaded(void);
#endif /* __JVM_FUNCTIONS_H__ */
/*--------------------------------------------------------------------------*/
|