theConfig 10.0
Loading...
Searching...
No Matches
LcCall_jv.c File Reference

tag: nhi1-release-250425 More...

#include <jni.h>
#include "LibLcConfig_jv.h"
+ Include dependency graph for LcCall_jv.c:

Go to the source code of this file.

Functions

void jvlcconfig_SettingDeleteFree (LcSettingDeleteFreeF_ARGS)
 
enum MkErrorE jvlcconfig_SettingDeleteCall (LcSettingDeleteCallF_ARGS)
 
void jvlcconfig_ConfigIncludeFree (LcConfigIncludeFreeF_ARGS)
 
enum MkErrorE jvlcconfig_ConfigIncludeCall (LcConfigIncludeCallF_ARGS)
 

Detailed Description

tag: nhi1-release-250425

Definition in file LcCall_jv.c.

Function Documentation

◆ jvlcconfig_ConfigIncludeCall()

enum MkErrorE jvlcconfig_ConfigIncludeCall ( LcConfigIncludeCallF_ARGS )

Definition at line 67 of file LcCall_jv.c.

68{
70
71 struct MkProcCallS const * const call = (struct MkProcCallS const * const) cfg->fConfigIncludeData;
72 JNIEnv *env = call->env;
73
74 jstring incDirO = (*env)->NewStringUTF(env,incDir?incDir:"");
75 jstring pathO = (*env)->NewStringUTF(env,path?path:"");
76 jobject ret = MK(MkBufferListC_ObjNew)(MK_RT_CALL env,ret_inout);
77
78 // call the function
79 if (call->class == NULL) {
80 // method call of the same class
81 (*env)->CallObjectMethod(env, call->object, call->method, incDirO, pathO, ret);
82 } else if (call->object == NULL) {
83 // static method call returning an object
84 (*env)->CallStaticObjectMethod(env, call->class, call->method, incDirO, pathO, ret);
85 } else {
86 // method call of an other class
87 (*env)->CallNonvirtualObjectMethod(env, call->object, call->class, call->method, incDirO, pathO, ret);
88 }
89
90 // check on error
91 if((*env)->ExceptionCheck(env) != JNI_FALSE) {
92 // is the ERROR from "java" or "jvmkkernel"
93 OT_ERROR_LNG_2_META(cfg);
94 }
95 return MkErrorStack_0E_Check();
96}
#define LcConfigIncludeCallF_CHECK
#define MkErrorStack_0E_Check()
#define MK_RT_CALL

◆ jvlcconfig_ConfigIncludeFree()

void jvlcconfig_ConfigIncludeFree ( LcConfigIncludeFreeF_ARGS )

Definition at line 56 of file LcCall_jv.c.

57{
58 if (cfg->fConfigIncludeData == NULL) return;
59 MK(ProcFree)((struct MkProcCallS **)&cfg->fConfigIncludeData);
60
61 cfg->fConfigIncludeData = NULL;
62 cfg->fConfigIncludeCall = NULL;
63 cfg->fConfigIncludeFree = NULL;
64}

◆ jvlcconfig_SettingDeleteCall()

enum MkErrorE jvlcconfig_SettingDeleteCall ( LcSettingDeleteCallF_ARGS )

Definition at line 26 of file LcCall_jv.c.

27{
29
30 struct MkProcCallS const * const call = (struct MkProcCallS const * const) cfg->fSettingDeleteData;
31 JNIEnv *env = call->env;
32
33 jlong hdl = (jlong) MkObjectHandleGet_1X(cfs);
34
35 // call the function
36 if (call->class == NULL) {
37 // method call of the same class
38 (*env)->CallVoidMethod(env, call->object, call->method, hdl);
39 } else if (call->object == NULL) {
40 // static method call returning an object
41 (*env)->CallStaticVoidMethod(env, call->class, call->method, hdl);
42 } else {
43 // method call of an other class
44 (*env)->CallNonvirtualVoidMethod(env, call->object, call->class, call->method, hdl);
45 }
46
47 // check on error
48 if((*env)->ExceptionCheck(env) != JNI_FALSE) {
49 // is the ERROR from "java" or "jvmkkernel"
50 OT_ERROR_LNG_2_META(cfg);
51 }
52 return MkErrorStack_0E_Check();
53}
#define LcSettingDeleteCallF_CHECK
#define MkObjectHandleGet_1X(x)

◆ jvlcconfig_SettingDeleteFree()

void jvlcconfig_SettingDeleteFree ( LcSettingDeleteFreeF_ARGS )

Definition at line 15 of file LcCall_jv.c.

16{
17 if (cfg->fSettingDeleteData == NULL) return;
18 MK(ProcFree)((struct MkProcCallS **)&cfg->fSettingDeleteData);
19
20 cfg->fSettingDeleteData = NULL;
21 cfg->fSettingDeleteCall = NULL;
22 cfg->fSettingDeleteFree = NULL;
23}