theLink 10.0
Loading...
Searching...
No Matches
MqDumpC_jv.c
Go to the documentation of this file.
1
9/* LABEL-START */
10#define META_FILE_NAME "MqDumpC_jv.c"
11
12#include "jni_h/jvmqmsgque_MqDumpC.h"
13#include "LibMqMsgque_private_jv.h"
14
15
16jobject NS(MqDumpC_ObjNew) (MK_RT_ARGS JNIEnv *env, MQ_DMP hdl) {
17 static MkThreadLocal jobject NS_NULL = NULL;
18 return (hdl ? MK(AtomObjNew)(MK_RT_CALL env, MqDumpC_X2obj(hdl)) : MK_GET__NS_NULL(MqDumpC));
19}
20
22static jobject NS(MqDumpC_ObjCreate) (MK_RT_ARGS JNIEnv *env, MQ_DMP hdl) {
23 return MK(AtomObjCreate)(MK_RT_CALL env, MqDumpC_X2obj(hdl));
24}
25
26static MK_PTR NS(MqDumpC_selfCreate) (MK_RT_ARGS MK_OBJ obj, MK_PTR envP) {
27 JNIEnv *env = (JNIEnv*) envP;
28 return (*env)->NewObject(env, NS(Class_MqDumpC), NS(MID_MqDumpC_INIT), (jlong) obj, JNI_TRUE);
29}
30
31#define ClassInit \
32
33// printTxt("init: MqDumpC");
34
35/* LABEL-END */
36
37// BEGIN-MqDumpC - created by 'jv_MqC.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
38
42
43// doc-key: MqDumpC,MqDumpC-Class-Export,sc_
44
46JNIEXPORT jobject JNICALL Java_jvmqmsgque_MqDumpC_HandleResolve (JNIEnv *env, jclass class, jint netHdl) {
48 MQ_DMP __retVal__L = MqDumpHandleResolve(netHdl);
49 jobject __retVal__S = MQ(MqDumpC_ObjNew)(MK_RT_CALL env,__retVal__L);
50 return __retVal__S;
51}
52
53// doc-key: MqDumpC,MqDumpC-Class-Export,om_
54
55// skip class-overload: HandleGet = MqDumpHandleGet → MkObjectHandleGet
56
58// MqDumpC_Class_JV_API
59
63
64// doc-key: MqDumpC,MqDumpC-Class-Introspection,oc_
65
67JNIEXPORT jobject JNICALL Java_jvmqmsgque_MqDumpC_Next (JNIEnv *env, jobject self) {
68 MQ_DMP hdl = (MQ_DMP)pObj2Hdl(env,"MqDumpC",self);
69 JavaErrorCheck;
70 MkRtSetup_X(hdl);
71 MQ_DMP __retVal__L = MqDumpNext(hdl);
72 jobject __retVal__S = MQ(MqDumpC_ObjNew)(MK_RT_CALL env,__retVal__L);
73 return __retVal__S;
74error:
75 return 0;
76}
77
79JNIEXPORT jobject JNICALL Java_jvmqmsgque_MqDumpC_Prev (JNIEnv *env, jobject self) {
80 MQ_DMP hdl = (MQ_DMP)pObj2Hdl(env,"MqDumpC",self);
81 JavaErrorCheck;
82 MkRtSetup_X(hdl);
83 MQ_DMP __retVal__L = MqDumpPrev(hdl);
84 jobject __retVal__S = MQ(MqDumpC_ObjNew)(MK_RT_CALL env,__retVal__L);
85 return __retVal__S;
86error:
87 return 0;
88}
89
90// doc-key: MqDumpC,MqDumpC-Class-Introspection,sc_
91
93JNIEXPORT jobject JNICALL Java_jvmqmsgque_MqDumpC_Instances (JNIEnv *env, jclass class) {
95 MQ_DMP __retVal__L = MqDumpInstances();
96 jobject __retVal__S = MQ(MqDumpC_ObjNew)(MK_RT_CALL env,__retVal__L);
97 return __retVal__S;
98}
99
101// MqDumpC_Class_JV_API
102
106
107// doc-key: MqDumpC,MqDumpC-Class-Misc,sc_
108
110JNIEXPORT jobject JNICALL Java_jvmqmsgque_MqDumpC_GetNull (JNIEnv *env, jclass class) {
112 MQ_DMP __retVal__L = MqDumpGetNull();
113 jobject __retVal__S = MQ(MqDumpC_ObjNew)(MK_RT_CALL env,__retVal__L);
114 return __retVal__S;
115}
116
118// MqDumpC_Class_JV_API
119
123
124// doc-key: MqDumpC,MqDumpC-Misc,om_
125
126// skip class-overload: Log = MqDumpLog → MkObjectLog
127
129JNIEXPORT jlong JNICALL Java_jvmqmsgque_MqDumpC_SizeGet (JNIEnv *env, jobject self) {
130 MQ_DMPN hdl = (MQ_DMPN)pObj2Hdl(env,"MqDumpC",self);
131 JavaErrorCheck;
132 MkRtSetup_X(hdl);
133 MK_SIZE __retVal__L = MqDumpSizeGet(hdl);
134 jlong __retVal__S = __retVal__L;
135 return __retVal__S;
136error:
137 return 0;
138}
139
141JNIEXPORT jstring JNICALL Java_jvmqmsgque_MqDumpC_TokenGet (JNIEnv *env, jobject self) {
142 MQ_DMPN hdl = (MQ_DMPN)pObj2Hdl(env,"MqDumpC",self);
143 JavaErrorCheck;
144 MkRtSetup_X(hdl);
145 MK_STRN __retVal__L = MqDumpTokenGet(hdl);
146 jstring __retVal__S = JC2O(env,__retVal__L);
147 return __retVal__S;
148error:
149 return 0;
150}
151
153// MqDumpC_Misc_JV_API
154
158
159// doc-key: MqDumpC,MqDumpC-TOR,sCi
160
162JNIEXPORT jlong JNICALL Java_jvmqmsgque_MqDumpC_CTOR (JNIEnv *env, jclass class, jobject ctx, jobject dumpP_inout) {
164 MQ_CTX ctx_hdl = (MQ_CTX)pObj2Hdl(env,"MqContextC",ctx);
165 JavaErrorCheck;
166 MQ_DMP dumpP_inout_hdl = (MQ_DMP)pObj2Hdl__null_allow(env,dumpP_inout);
167 JavaErrorCheck;
168 enum MkErrorE errVal = MqDumpExport(ctx_hdl, &dumpP_inout_hdl);
169 MkErrorC_Check(NULL, errVal)
170 jlong __retVal__S = (jlong)dumpP_inout_hdl;
171 return __retVal__S;
172error:
173 return 0;
174}
175
177JNIEXPORT jobject JNICALL Java_jvmqmsgque_MqDumpC_Error (JNIEnv *env, jclass class, jobject error, jobject dumpP_inout) {
179 MQ_CTX error_hdl = (MQ_CTX)pObj2Hdl(env,"MqContextC",error);
180 JavaErrorCheck;
181 MQ_DMP dumpP_inout_hdl = (MQ_DMP)pObj2Hdl__null_allow(env,dumpP_inout);
182 JavaErrorCheck;
183 enum MkErrorE errVal = MqDumpError(error_hdl, &dumpP_inout_hdl);
184 MkErrorC_Check(NULL, errVal)
185 jobject __retVal__S = MQ(MqDumpC_ObjCreate)(MK_RT_CALL env,dumpP_inout_hdl);
186 return __retVal__S;
187error:
188 return 0;
189}
190
192JNIEXPORT jobject JNICALL Java_jvmqmsgque_MqDumpC_Export (JNIEnv *env, jclass class, jobject ctx, jobject dumpP_inout) {
194 MQ_CTX ctx_hdl = (MQ_CTX)pObj2Hdl(env,"MqContextC",ctx);
195 JavaErrorCheck;
196 MQ_DMP dumpP_inout_hdl = (MQ_DMP)pObj2Hdl__null_allow(env,dumpP_inout);
197 JavaErrorCheck;
198 enum MkErrorE errVal = MqDumpExport(ctx_hdl, &dumpP_inout_hdl);
199 MkErrorC_Check(NULL, errVal)
200 jobject __retVal__S = MQ(MqDumpC_ObjCreate)(MK_RT_CALL env,dumpP_inout_hdl);
201 return __retVal__S;
202error:
203 return 0;
204}
205
206// doc-key: MqDumpC,MqDumpC-TOR,sCo
207
209JNIEXPORT jobject JNICALL Java_jvmqmsgque_MqDumpC_BinSet (JNIEnv *env, jclass class, jbyteArray data) {
211 MQ_DMP dmp_out;
212 MK_BINN data_data = (MK_BINN) (*env)->GetByteArrayElements(env, data, NULL);
213 JavaErrorCheck;
214 MK_SIZE data_size = (MK_SIZE) (*env)->GetArrayLength (env, data);
215 JavaErrorCheck;
216 MkBinaryR data_ref = MkBinaryCreate(data_size,data_data);
217 enum MkErrorE errVal = MqDumpBinSet(data_ref, &dmp_out);
218 MkErrorC_Check(NULL, errVal)
219 jobject __retVal__S = MQ(MqDumpC_ObjCreate)(MK_RT_CALL env,dmp_out);
220 (*env)->ReleaseByteArrayElements(env, data, (jbyte*)data_data, JNI_ABORT);
221 return __retVal__S;
222error:
223 return 0;
224}
225
226// doc-key: MqDumpC,MqDumpC-TOR,om_
227
229JNIEXPORT jbyteArray JNICALL Java_jvmqmsgque_MqDumpC_BinGet (JNIEnv *env, jobject self) {
230 MQ_DMPN hdl = (MQ_DMPN)pObj2Hdl(env,"MqDumpC",self);
231 JavaErrorCheck;
232 MkRtSetup_X(hdl);
233 MkBinaryR __retVal__L = MqDumpBinGet(hdl);
234 jbyteArray __retVal__S = (*env)->NewByteArray(env, (jsize) __retVal__L.size);
235 JavaErrorCheck;
236 (*env)->SetByteArrayRegion(env,__retVal__S,0,(jsize) __retVal__L.size,(jbyte*)__retVal__L.data);
237 JavaErrorCheck;
238 return __retVal__S;
239error:
240 return 0;
241}
242
244JNIEXPORT void JNICALL Java_jvmqmsgque_MqDumpC_Import (JNIEnv *env, jobject self, jobject ctx) {
245 MQ_DMP hdl = (MQ_DMP)pObj2Hdl(env,"MqDumpC",self);
246 JavaErrorCheck;
247 MkRtSetup_X(hdl);
248 MQ_CTX ctx_hdl = (MQ_CTX)pObj2Hdl(env,"MqContextC",ctx);
249 JavaErrorCheck;
250 enum MkErrorE errVal = MqDumpImport(hdl, ctx_hdl);
251 MkErrorC_Check(hdl, errVal)
252error:
253 return;
254}
255
257// MqDumpC_TOR_JV_API
258
259// END-MqDumpC - created by 'jv_MqC.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
260
261// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
262
263void NS(MqDumpC_Init)(MQ_RT_ARGS_ONLY) {
265
266 MqDumpC_TT->selfCreate = NS(MqDumpC_selfCreate);
267 MqDumpC_TT->selfUnlink = MK(AtomSelfUnlink);
268}
#define ClassInit
Definition MqDumpC_jv.c:31
static MkBinaryR MkBinaryCreate(MK_SIZE size, MK_BINN data)
#define MK_UNUSED
MkErrorE
MK_PTRB * MK_PTR
const MK_STRB * MK_STRN
long MK_SIZE
MK_BINB const * MK_BINN
#define MkThreadLocal
#define MK_RT_CALL
#define MkRtSetup_X(x)
#define MK_RT_ARGS
#define MkRtSetup_NULL
struct MqContextS * MQ_CTX
class-shortcut for struct MqContextS *, all shortcut using the XX_YYY syntax (only for public API) …
#define MqDumpHandleResolve(...)
const struct MqDumpS * MQ_DMPN
class-shortcut for const struct MqDumpS *, all const shortcut using the XX_YYYC syntax (only for publ...
static MQ_DMP MqDumpGetNull(void)
Null-Slot - return a MqDumpC typed NULL instance …
#define MqDumpInstances()
static MQ_DMP MqDumpNext(MQ_DMP const dmp)
get next instance from linked-list of MqDumpS type
static MQ_DMP MqDumpPrev(MQ_DMP const dmp)
get previous instance from linked-list of MqDumpS type
struct MqDumpS * MQ_DMP
class-shortcut for struct MqDumpS *, all shortcut using the XX_YYY syntax (only for public API) …
#define MqDumpC_TT
class as MkTypeS-class-type, useable in a class-macro as: class##_TT …
#define MqDumpC_X2obj(x)
JNIEXPORT jobject JNICALL Java_jvmqmsgque_MqDumpC_GetNull(JNIEnv *env, jclass class)
Java: [static] MqDumpC MqDumpC.GetNull() → C-API Null-Slot - return a MqDumpC typed NULL instanc...
Definition MqDumpC_jv.c:110
JNIEXPORT jobject JNICALL Java_jvmqmsgque_MqDumpC_HandleResolve(JNIEnv *env, jclass class, jint netHdl)
Java: [static] MqDumpC MqDumpC.HandleResolve(int netHdl) → C-API Handle-Resolve-Slot - return a ...
Definition MqDumpC_jv.c:46
JNIEXPORT jobject JNICALL Java_jvmqmsgque_MqDumpC_Instances(JNIEnv *env, jclass class)
Java: [static] MqDumpC MqDumpC.Instances() → C-API get head-instance from linked-list of MqDumpS...
Definition MqDumpC_jv.c:93
JNIEXPORT jobject JNICALL Java_jvmqmsgque_MqDumpC_Next(JNIEnv *env, jobject self)
Java: MqDumpC dmp.Next() → C-API get next instance from linked-list of MqDumpS type
Definition MqDumpC_jv.c:67
JNIEXPORT jobject JNICALL Java_jvmqmsgque_MqDumpC_Prev(JNIEnv *env, jobject self)
Java: MqDumpC dmp.Prev() → C-API get previous instance from linked-list of MqDumpS type
Definition MqDumpC_jv.c:79
MK_STRN MqDumpTokenGet(MQ_DMPN const dump)
return the MqContextC_ServiceApi_Identifer …
MK_SIZE MqDumpSizeGet(MQ_DMPN const dump)
report the binary data size from an MqDumpS object
JNIEXPORT jstring JNICALL Java_jvmqmsgque_MqDumpC_TokenGet(JNIEnv *env, jobject self)
Java: String dump.TokenGet() → C-API return the MqContextC_ServiceApi_Identifer …
Definition MqDumpC_jv.c:141
JNIEXPORT jlong JNICALL Java_jvmqmsgque_MqDumpC_SizeGet(JNIEnv *env, jobject self)
Java: long dump.SizeGet() → C-API report the binary data size from an MqDumpS object
Definition MqDumpC_jv.c:129
#define MqDumpError(...)
#define MqDumpExport(...)
#define MqDumpBinSet(...)
#define MqDumpImport(...)
MkBinaryR MqDumpBinGet(MQ_DMPN const dump)
export the binary data from an MqDumpS object
JNIEXPORT jbyteArray JNICALL Java_jvmqmsgque_MqDumpC_BinGet(JNIEnv *env, jobject self)
Java: byte[] dump.BinGet() → C-API export the binary data from an MqDumpS object
Definition MqDumpC_jv.c:229
JNIEXPORT void JNICALL Java_jvmqmsgque_MqDumpC_Import(JNIEnv *env, jobject self, jobject ctx)
Java: dump.Import(MqContextC ctx) → C-API import the dump-package into the ctx-read-data-packag...
Definition MqDumpC_jv.c:244
JNIEXPORT jlong JNICALL Java_jvmqmsgque_MqDumpC_CTOR(JNIEnv *env, jclass class, jobject ctx, jobject dumpP_inout)
Java: [constructor,static] MqDumpC MqDumpC.Export(MqContextC ctx, ?MqDumpC dumpP_inout = null?...
Definition MqDumpC_jv.c:162
JNIEXPORT jobject JNICALL Java_jvmqmsgque_MqDumpC_Export(JNIEnv *env, jclass class, jobject ctx, jobject dumpP_inout)
Java: [constructor,static] MqDumpC MqDumpC.Export(MqContextC ctx, ?MqDumpC dumpP_inout = null?...
Definition MqDumpC_jv.c:192
JNIEXPORT jobject JNICALL Java_jvmqmsgque_MqDumpC_BinSet(JNIEnv *env, jclass class, jbyteArray data)
Java: [constructor,static] MqDumpC MqDumpC.BinSet(byte[] data) → C-API create an MqDumpS object ...
Definition MqDumpC_jv.c:209
JNIEXPORT jobject JNICALL Java_jvmqmsgque_MqDumpC_Error(JNIEnv *env, jclass class, jobject error, jobject dumpP_inout)
Java: [constructor,static] MqDumpC MqDumpC.Error(MqContextC error, ?MqDumpC dumpP_inout = null?...
Definition MqDumpC_jv.c:177
#define MQ_RT_ARGS_ONLY
MK_SIZE size
MK_BINN data
PUBLIC data structure for the jvmqmsgque-specific-data
MqDumpC - the class known as dmp or dump is used to export a jvmqmsgque data package as binary …