theLink 10.0
Loading...
Searching...
No Matches
MqContextC_py.c
Go to the documentation of this file.
1
9/* LABEL-START */
10
11#define META_FILE_NAME "MqContextC_py.c"
12
14
15// PY class
16#define OT_CLASS (&NS(MqContextCR))
17#define OT_CLASS_NAME "MqContextC"
18
19#define OT_LNG2META(O) MqCtx(VAL2MNG(O))
20
21#define OT_retObj_CONSTR(mng) OT_retObj_SET(NS(MqContextC_CTOR)(MK_RT_CALL (PyTypeObject*)class,mng))
22
23#define OT_SETUP_hdl OT_SETUP_hdl_tmpl(MqContextC)
24#define OT_SETUP_hdl__null_allow OT_SETUP_hdl_tmpl__null_allow(MqContextC)
25#define OT_SETUP_hdl_constr MK_RT_UNUSED AllRtSetup_NULL; \
26 MQ_CTX hdl = (MQ_CTX) OT_CLASS;
27#define OT_SETUP_hdl_destr OT_SETUP_hdl_tmpl__null_allow(MqContextC)
28#define OT_SETUP_hdl_static MK_RT_UNUSED AllRtSetup_NULL; \
29 __attribute__((unused)) MK_TYP hdl = MqContextC##_TT;
30
31#define OT_SETUP_hdl_static_constr OT_SETUP_hdl_static
32
33#if !defined(SetupRtFromObj_X)
34 #define SetupRtFromObj_X(hdl) AllRtSetup_X(hdl)
35 #define SetupRtFromObj_XN(hdl) AllRtSetup_XN(hdl)
36#endif
37
38// MO class
39#undef MqContextCTT
40#define MqContextCTT MQ(MqMsgqueThreadState).MqContextCTT
41/* MqContextC_MK_NULL defined in LibMqMsgque_py.h */
42
43__attribute__((unused)) mk_inline
44OT_OBJ_T NS(MqContextC_CTOR) (MK_RT_ARGS OT_CLS_T type, MQ_CTX hdl) {
45 return MK(AtomCreate)(MK_RT_CALL type,MqContextC_X2obj(hdl));
46}
47
48// helper: mk_dbg_color_ln(MK_COLOR_YELLOW,"hdl<%p>, self<%p>", obj, self);
49
50// META: ObjNew feature: selfCreate will be called from "ObjNew->MkSelfNew" if MkObj need a SELF pointer
51static MK_PTR NS(MqContextC_selfCreate) (MK_RT_ARGS MK_OBJ const obj, MK_PTR const env) {
52 return MK(AtomCreate) (MK_RT_CALL OT_CLASS,obj);
53}
54// META: called if MkObj must be destroyed and if the SELF is still alive → goal: destroy the SELF
55static void NS(MqContextC_selfDelete) (MK_RT_ARGS MK_PTR self, MK_PTR const env) {
56 MK(AtomDeleteHard) (MK_RT_CALL OT_SELF);
57}
58// META: called to destroy link from SELF to META
59static void NS(MqContextC_selfUnlink) (MK_RT_ARGS MK_PTR self, MK_PTR const env) {
60 MkObjectC_Obj *selfO = (MkObjectC_Obj*) self;
61 selfO->hdl = NULL;
62}
63
64// initialize the PY and MO class specific object
65#define ClassInit \
66 /* if not already done, initialize NEW META type */ \
67 if (MqContextCTT == NULL) MqContextCTT = MqContextSTT; \
68 \
69 /* protect against double call */ \
70 if (MqContextCTT->selfCreate == NS(MqContextC_selfCreate)) return MK_OK; \
71 \
72 /* add "selfCreate" and "selfDelete" feature to the META-Class */ \
73 MqContextCTT->selfCreate = NS(MqContextC_selfCreate); \
74 MqContextCTT->selfDelete = NS(MqContextC_selfDelete); \
75 MqContextCTT->selfUnlink = NS(MqContextC_selfUnlink); \
76 \
77 if (!PyType_HasFeature(OT_CLASS,Py_TPFLAGS_READY)) { \
78 NS(MqContextCR).tp_base = MqContextC_base; \
79 OtErrorCheckLng (PyType_Ready(OT_CLASS)); \
80 } \
81 OtErrorCheckLng(PyModule_AddObjectRef(m, "MqContextC", (PyObject *)OT_CLASS)); \
82 \
83 /* define the "NULL" object */ \
84 MqContextC_MK_NULL = Py_NewRef(MK(AtomCreate) (MK_RT_CALL OT_CLASS, NULL /*obj*/));
85
86/* LABEL-END */
87
88#if 0
89// initialize the PY and MO class specific object
90#define ClassInit \
91 /* if not already done, initialize NEW MQ type */ \
92 if (MqContextCTT == NULL) MqContextCTT = MqContextSTT; \
93 \
94 /* protect against double call */ \
95 if (MqContextCTT->selfCreate == NS(MqContextC_selfCreate)) return MK_OK; \
96 \
97 /* add "selfCreate" and "selfDelete" feature to the MQ-Class */ \
98 MqContextCTT->selfCreate = NS(MqContextC_selfCreate); \
99 MqContextCTT->selfDelete = NS(MqContextC_selfDelete); \
100 \
101 if (!PyType_HasFeature(OT_CLASS,Py_TPFLAGS_READY)) { \
102M0; \
103 NS(MqContextCR).tp_base = OT_MqContextC_base; \
104printZ(Py_REFCNT(OT_CLASS)); \
105 OtErrorCheckLng (PyType_Ready(OT_CLASS)); \
106 } \
107printP(PyThreadState_Get()); \
108printZ(Py_REFCNT(OT_CLASS)); \
109 OtErrorCheckLng(PyModule_AddObjectRef(m, "MqContextC", (PyObject *)OT_CLASS)); \
110printZ(Py_REFCNT(OT_CLASS)); \
111 \
112 /* define the "NULL" object */ \
113 NS(MqMsgqueThreadState).MqContextC_MK_NULL = Py_NewRef(MK(AtomCreate) (MK_RT_CALL OT_CLASS, NULL /*obj*/, false));
114#endif
115
116#define META_CONTEXT_S hdl
117
123
124// BEGIN-DOC - created by 'py_MqS.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
125
126// doc-key: MqContextC,MqClass,oc_,func
127#define ClassFactoryGet_doc "MqFactoryC ctx.ClassFactoryGet() (const)"
128
129// doc-key: MqContextC,MqClass,om_,func
130#define ClassFactorySet_doc "ctx.ClassFactorySet(item:MqFactoryC)"
131#define ClassIdentGet_doc "string ctx.ClassIdentGet() (const)"
132#define ClassIdentSet_doc "ctx.ClassIdentSet(ident:string)"
133#define ClassOriginalIdentGet_doc "string ctx.ClassOriginalIdentGet() (const)"
134
135// doc-key: MqContextC,MqConfig,oco,func
136#define ConfigGetIoTcpL_doc "MkBufferListC ctx.ConfigGetIoTcpL()"
137
138// doc-key: MqContextC,MqConfig,om_,func
139#define ConfigCheckStartAs_doc "bool ctx.ConfigCheckStartAs(data:MqStartE)"
140#define ConfigGetBuffersize_doc "int32 ctx.ConfigGetBuffersize() (const)"
141#define ConfigGetIdentFrom_doc "MqIdentE ctx.ConfigGetIdentFrom()"
142#define ConfigGetIoPipe_doc "int32 ctx.ConfigGetIoPipe()"
143#define ConfigGetIoUds_doc "string ctx.ConfigGetIoUds() (const)"
144#define ConfigGetIsParent_doc "bool ctx.ConfigGetIsParent()"
145#define ConfigGetIsServer_doc "bool ctx.ConfigGetIsServer()"
146#define ConfigGetIsString_doc "bool ctx.ConfigGetIsString()"
147#define ConfigGetName_doc "string ctx.ConfigGetName() (const)"
148#define ConfigGetPkgsize_doc "int32 ctx.ConfigGetPkgsize() (const)"
149#define ConfigGetPostfix_doc "string ctx.ConfigGetPostfix() (const)"
150#define ConfigGetPrefix_doc "string ctx.ConfigGetPrefix() (const)"
151#define ConfigGetStartAs_doc "MqStartE ctx.ConfigGetStartAs()"
152#define ConfigGetStatusIs_doc "MqStatusIsEF ctx.ConfigGetStatusIs()"
153#define ConfigGetStorage_doc "string ctx.ConfigGetStorage() (const)"
154#define ConfigGetTimeout_doc "MkTimeoutE|int32 ctx.ConfigGetTimeout() (const)"
155#define ConfigReset_doc "ctx.ConfigReset()"
156#define ConfigSetAllDebug_doc "ctx.ConfigSetAllDebug(data:int32)"
157#define ConfigSetBgError_doc "ctx.ConfigSetBgError(?callback:callable=None?)"
158#define ConfigSetBuffersize_doc "ctx.ConfigSetBuffersize(data:int32)"
159#define ConfigSetConfigFile_doc "ctx.ConfigSetConfigFile(filename:string)"
160#define ConfigSetDaemon_doc "ctx.ConfigSetDaemon(pidfile:string)"
161#define ConfigSetEvent_doc "ctx.ConfigSetEvent(?callback:callable=None?)"
162#define ConfigSetIdentFrom_doc "ctx.ConfigSetIdentFrom(data:MqIdentE)"
163#define ConfigSetIgnoreExit_doc "ctx.ConfigSetIgnoreExit(data:bool)"
164#define ConfigSetIoPipe_doc "ctx.ConfigSetIoPipe(fh:int32)"
165#define ConfigSetIoTcp_doc "ctx.ConfigSetIoTcp(?host:string=\"None\"?, ?port:string=\"None\"?, ?myhost:string=\"None\"?, ?myport:string=\"None\"?)"
166#define ConfigSetIoTcpL_doc "ctx.ConfigSetIoTcpL(vals:MkBufferListC)"
167#define ConfigSetIoUds_doc "ctx.ConfigSetIoUds(file:string)"
168#define ConfigSetIsServer_doc "ctx.ConfigSetIsServer(data:bool)"
169#define ConfigSetIsString_doc "ctx.ConfigSetIsString(data:bool)"
170#define ConfigSetName_doc "ctx.ConfigSetName(data:string)"
171#define ConfigSetPkgsize_doc "ctx.ConfigSetPkgsize(data:int32)"
172#define ConfigSetPostfix_doc "ctx.ConfigSetPostfix(data:string)"
173#define ConfigSetPrefix_doc "ctx.ConfigSetPrefix(data:string)"
174#define ConfigSetServerCleanup_doc "ctx.ConfigSetServerCleanup(?callback:callable=None?)"
175#define ConfigSetServerSetup_doc "ctx.ConfigSetServerSetup(?callback:callable=None?)"
176#define ConfigSetStartAs_doc "ctx.ConfigSetStartAs(data:MqStartE)"
177#define ConfigSetStartAsString_doc "ctx.ConfigSetStartAsString(data:string)"
178#define ConfigSetStorage_doc "ctx.ConfigSetStorage(data:string)"
179#define ConfigSetTimeout_doc "ctx.ConfigSetTimeout(data:MkTimeoutE|int32)"
180
181// doc-key: MqContextC,MqConfig,omo,func
182#define ConfigGetIoTcp_doc "{host:string port:string myhost:string myport:string} ctx.ConfigGetIoTcp()"
183
184// doc-key: MqContextC,MqContext,sCc,func
185#define Create_doc "MqContextC MqContextC.Create(?tmpl:MqContextC=None?)"
186#define new_doc "MqContextC MqContextC.new(?tmpl:MqContextC=None?)"
187
188// doc-key: MqContextC,MqContext,sc_,func
189#define GetNull_doc "MqContextC MqContextC.GetNull()"
190#define HandleResolve_doc "MqContextC MqContextC.HandleResolve(netHdl:MK_HDL)"
191#define Instances_doc "MqContextC MqContextC.Instances()"
192
193// doc-key: MqContextC,MqContext,oc_,func
194#define ErrorFORMAT_doc "MkErrorC fmtobj.ErrorFORMAT() (const)"
195#define GetBuffer_doc "MkBufferC ctx.GetBuffer()"
196#define Next_doc "MqContextC ctx.Next()"
197#define Prev_doc "MqContextC ctx.Prev()"
198
199// doc-key: MqContextC,MqContext,om_,func
200#define ErrorCopy_doc "MkErrorE targetCtx.ErrorCopy(sourceCtx:MqContextC) (const)"
201#define ErrorMove_doc "MkErrorE targetCtx.ErrorMove(sourceCtx:MqContextC) (const)"
202// skip class-overload: HandleGet → MkObjectHandleGet
203// skip class-overload: Log → MkObjectLog
204#define LogConfig_doc "ctx.LogConfig(?fmtobj:MkObjectC=None?, ?debug:int32=0?, ?callfunc:string=\"MK_NULL\"?, ?lvl:int32=0?) (const)"
205#define LogEnv_doc "ctx.LogEnv(?fmtobj:MkObjectC=None?, ?debug:int32=0?, ?callfunc:string=\"MK_NULL\"?, ?lvl:int32=0?) (const)"
206#define LogLink_doc "ctx.LogLink(?fmtobj:MkObjectC=None?, ?debug:int32=0?, ?callfunc:string=\"MK_NULL\"?, ?lvl:int32=0?) (const)"
207#define LogSetup_doc "ctx.LogSetup(?fmtobj:MkObjectC=None?, ?debug:int32=0?, ?callfunc:string=\"MK_NULL\"?, ?lvl:int32=0?) (const)"
208#define LogShort_doc "ctx.LogShort(?fmtobj:MkObjectC=None?, ?debug:int32=0?, ?callfunc:string=\"MK_NULL\"?, ?lvl:int32=0?, ?label:string=\"None\"?) (const)"
209#define LogType_doc "ctx.LogType(?fmtobj:MkObjectC=None?, ?debug:int32=0?, ?callfunc:string=\"MK_NULL\"?, ?lvl:int32=0?) (const)"
210// skip class-overload: ToString → MkObjectToString
211
212// doc-key: MqContextC,MqEnv,om_,func
213#define EnvProtect_doc "ctx.EnvProtect()"
214#define EnvRestore_doc "ctx.EnvRestore()"
215
216// doc-key: MqContextC,MqExit,om_,func
217#define Exit_doc "int32 ctx.Exit(?callfunc:string=\"MK_NULL\"?, ?callfile:string=\"MK_NULL\"?, ?callline:int32=-1?)"
218
219// doc-key: MqContextC,MqGet,oc_,func
220#define GetRoot_doc "MqContextC ctx.GetRoot()"
221
222// doc-key: MqContextC,MqLink,oc_,func
223#define LinkGetParent_doc "MqContextC ctx.LinkGetParent()"
224
225// doc-key: MqContextC,MqLink,om_,func
226#define LinkConnect_doc "ctx.LinkConnect()"
227#define LinkCreate_doc "ctx.LinkCreate(?args:MkBufferListC...=None?)"
228#define LinkCreateChild_doc "ctx.LinkCreateChild(parent:MqContextC, ?args:MkBufferListC...=None?)"
229#define LinkDelete_doc "ctx.LinkDelete()"
230#define LinkGetCtxId_doc "int32 ctx.LinkGetCtxId()"
231#define LinkGetTargetIdent_doc "string ctx.LinkGetTargetIdent()"
232#define LinkIsConnected_doc "bool ctx.LinkIsConnected()"
233#define LinkIsParent_doc "bool ctx.LinkIsParent()"
234#define LinkShutdown_doc "ctx.LinkShutdown()"
235
236// doc-key: MqContextC,MqLog,om_,func
237#define LogParentOrChild_doc "string ctx.LogParentOrChild() (const)"
238#define LogServerOrClient_doc "string ctx.LogServerOrClient() (const)"
239
240// doc-key: MqContextC,MqProcess,om_,func
241#define ProcessEvent_doc "ctx.ProcessEvent(?wait:MqWaitOnEventE=NO?, ?timeout:MkTimeoutE|int32=DEFAULT?)"
242
243// doc-key: MqContextC,MqProxy,om_,func
244#define ProxyForward_doc "sourceCtx.ProxyForward(targetCtx:MqContextC, ?dump:MqDumpC=None?, ?timeout:MkTimeoutE|int32=DEFAULT?)"
245#define ProxyItem_doc "sourceCtx.ProxyItem(targetCtx:MqContextC)"
246
247// doc-key: MqContextC,MqRead,oci,func
248#define ReadALL_doc "MkBufferListC ctx.ReadALL(?val_inout:MkBufferListC=None?)"
249
250// doc-key: MqContextC,MqRead,oco,func
251#define ReadBFL_doc "MkBufferListC ctx.ReadBFL()"
252#define ReadBUF_doc "MkBufferC ctx.ReadBUF()"
253
254// doc-key: MqContextC,MqRead,om_,func
255#define ReadDbg_doc "ctx.ReadDbg()"
256#define ReadGetNextType_doc "MkTypeE ctx.ReadGetNextType()"
257#define ReadGetNumItems_doc "int32 ctx.ReadGetNumItems()"
258#define ReadItemExists_doc "bool ctx.ReadItemExists()"
259#define ReadL_END_doc "ctx.ReadL_END()"
260#define ReadL_START_doc "ctx.ReadL_START(?buf:MkBufferC=None?)"
261#define ReadT_END_doc "ctx.ReadT_END()"
262#define ReadT_START_doc "ctx.ReadT_START()"
263#define ReadUndo_doc "ctx.ReadUndo()"
264
265// doc-key: MqContextC,MqRead,omo,func
266#define ReadBIN_doc "binary ctx.ReadBIN()"
267#define ReadBOL_doc "bool ctx.ReadBOL()"
268#define ReadBinaryR_doc "binary ctx.ReadBinaryR()"
269#define ReadDBL_doc "double ctx.ReadDBL()"
270#define ReadFLT_doc "float ctx.ReadFLT()"
271#define ReadHDL_doc "MK_HDL ctx.ReadHDL()"
272#define ReadI16_doc "int16 ctx.ReadI16()"
273#define ReadI32_doc "int32 ctx.ReadI32()"
274#define ReadI64_doc "int64 ctx.ReadI64()"
275#define ReadI8_doc "int8 ctx.ReadI8()"
276#define ReadLIST_doc "[list...] ctx.ReadLIST()"
277#define ReadLONG_doc "long ctx.ReadLONG()"
278#define ReadNEXT_doc "obj ctx.ReadNEXT()"
279#define ReadSTR_doc "string ctx.ReadSTR()"
280#define ReadStringR_doc "string ctx.ReadStringR()"
281
282// doc-key: MqContextC,MqRoute,oco,func
283#define RouteGetTree_doc "MkBufferListC ctx.RouteGetTree()"
284
285// doc-key: MqContextC,MqRoute,om_,func
286#define RouteCreate_doc "ctx.RouteCreate(route:string, service:string, ?overwrite:bool=false?)"
287#define RouteDelete_doc "ctx.RouteDelete(route:string, service:string, ?overwrite:bool=false?)"
288#define RouteResolve_doc "[MqContextC...] ctx.RouteResolve(ident:string, ?retnum:int32=-1?)"
289#define RouteTraverse_doc "ctx.RouteTraverse(service:string, ?args:MkBufferListC...=None?)"
290
291// doc-key: MqContextC,MqRoute,omo,func
292#define RouteGetPath_doc "string ctx.RouteGetPath()"
293
294// doc-key: MqContextC,MqSend,om_,func
295#define Send_doc "ctx.Send(cstr:string, args:args...)"
296#define SendBFL_doc "ctx.SendBFL(val:MkBufferListC)"
297#define SendBIN_doc "ctx.SendBIN(val:binary)"
298#define SendBOL_doc "ctx.SendBOL(val:bool)"
299#define SendBUF_doc "ctx.SendBUF(val:MkBufferC)"
300#define SendBUS_FLAT_doc "ctx.SendBUS_FLAT(val:MkBufferStreamC)"
301#define SendBinaryR_doc "ctx.SendBinaryR(val:binary)"
302#define SendDBL_doc "ctx.SendDBL(val:double)"
303#define SendEND_doc "ctx.SendEND(token:string[4], ?timeout:MkTimeoutE|int32=DEFAULT?)"
304#define SendEND_AND_CALLBACK_doc "ctx.SendEND_AND_CALLBACK(token:string[4], callback:callable, ?timeout:MkTimeoutE|int32=DEFAULT?)"
305#define SendEND_AND_SUB_doc "ctx.SendEND_AND_SUB(token:string[4], callback:callable, ?timeout:MkTimeoutE|int32=DEFAULT?)"
306#define SendEND_AND_TRANSACTION_doc "ctx.SendEND_AND_TRANSACTION(token:string[4], callback:string[4], ?timeout:MkTimeoutE|int32=DEFAULT?)"
307#define SendEND_AND_WAIT_doc "ctx.SendEND_AND_WAIT(token:string[4], ?timeout:MkTimeoutE|int32=DEFAULT?)"
308#define SendERROR_doc "ctx.SendERROR()"
309#define SendFLT_doc "ctx.SendFLT(val:float)"
310#define SendHDL_doc "ctx.SendHDL(val:MK_HDL)"
311#define SendI16_doc "ctx.SendI16(val:int16)"
312#define SendI32_doc "ctx.SendI32(val:int32)"
313#define SendI64_doc "ctx.SendI64(val:int64)"
314#define SendI8_doc "ctx.SendI8(val:int8)"
315#define SendLONG_doc "ctx.SendLONG(val:long)"
316#define SendLTR_doc "ctx.SendLTR(transLId:int32)"
317#define SendL_END_doc "ctx.SendL_END()"
318#define SendL_FLAT_doc "ctx.SendL_FLAT(val:MkBufferListC)"
319#define SendL_START_doc "ctx.SendL_START()"
320#define SendRETURN_doc "ctx.SendRETURN()"
321#define SendRETURN_SUB_doc "ctx.SendRETURN_SUB()"
322#define SendSTART_doc "ctx.SendSTART()"
323#define SendSTR_doc "ctx.SendSTR(val:string)"
324#define SendSYNC_doc "ctx.SendSYNC()"
325#define SendStringR_doc "ctx.SendStringR(val:string)"
326#define SendT_END_doc "ctx.SendT_END()"
327#define SendT_START_doc "ctx.SendT_START()"
328
329// doc-key: MqContextC,MqService,om_,func
330#define ServiceCreate_doc "ctx.ServiceCreate(token:string[4], callback:callable)"
331#define ServiceDelete_doc "ctx.ServiceDelete(token:string[4])"
332#define ServiceIsTransaction_doc "bool ctx.ServiceIsTransaction()"
333#define ServiceProxy_doc "ctx.ServiceProxy(token:string[4], ?id:MqSlaveE|int32=MQ_SLAVE_OTHER?)"
334#define ServiceProxyCtx_doc "ctx.ServiceProxyCtx(token:string[4], target:MqContextC)"
335#define ServiceProxyCtxExists_doc "bool ctx.ServiceProxyCtxExists(token:string[4], target:MqContextC)"
336#define ServiceProxyRoundRobin_doc "ctx.ServiceProxyRoundRobin(token:string[4], ident:string)"
337#define ServiceStorage_doc "ctx.ServiceStorage(token:string[4])"
338#define ServiceTokenCheck_doc "bool ctx.ServiceTokenCheck(token:string[4])"
339#define ServiceTokenExists_doc "bool ctx.ServiceTokenExists(token:string[4])"
340#define ServiceTokenGet_doc "string[4] ctx.ServiceTokenGet()"
341
342// doc-key: MqContextC,MqSlave,oc_,func
343#define SlaveGetMaster_doc "MqContextC ctx.SlaveGetMaster()"
344
345// doc-key: MqContextC,MqSlave,oco,func
346#define SlaveGet_doc "MqContextC ctx.SlaveGet(id:MqSlaveE|int32)"
347#define SlaveGetFilter_doc "MqContextC ctx.SlaveGetFilter()"
348#define SlaveGetProxy_doc "MqContextC ctx.SlaveGetProxy(id:MqSlaveE|int32)"
349
350// doc-key: MqContextC,MqSlave,om_,func
351#define SlaveCheck_doc "bool ctx.SlaveCheck(id:MqSlaveE|int32) (const)"
352#define SlaveCreate_doc "ctx.SlaveCreate(id:MqSlaveE|int32, slave:MqContextC)"
353#define SlaveDelete_doc "ctx.SlaveDelete(id:MqSlaveE|int32)"
354#define SlaveIs_doc "bool ctx.SlaveIs() (const)"
355#define SlaveWorker_doc "ctx.SlaveWorker(id:MqSlaveE|int32, ?fct:string=\"WORKER\"?, ?args:MkBufferListC...=None?)"
356
357// doc-key: MqContextC,MqStorage,oci,func
358#define StorageDelete_doc "int32 ctx.StorageDelete(?*transLIdP_inout:int32=0?)"
359#define StorageImport_doc "int32 ctx.StorageImport(?*transLIdP_inout:int32=0?)"
360
361// doc-key: MqContextC,MqStorage,om_,func
362#define StorageClose_doc "ctx.StorageClose()"
363#define StorageDecrRef_doc "ctx.StorageDecrRef(transLId:int32)"
364#define StorageIncrRef_doc "ctx.StorageIncrRef(transLId:int32)"
365#define StorageLog_doc "ctx.StorageLog(?callfunc:string=\"MK_NULL\"?)"
366#define StorageOpen_doc "ctx.StorageOpen(storageFile:string)"
367
368// doc-key: MqContextC,MqStorage,omo,func
369#define StorageCount_doc "int32 ctx.StorageCount()"
370#define StorageErrCnt_doc "int32 ctx.StorageErrCnt(transLId:int32)"
371#define StorageExport_doc "int32 ctx.StorageExport()"
372#define StorageResolve_doc "{otherCtxP:MqContextC otherLIdP:int32} ctx.StorageResolve()"
373
374// END-DOC - created by 'py_MqS.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
375
376#undef Send_doc
377#define Send_doc Send_doc_extra
378
379#define Debug_doc "None ctx.Debug(prefix:str, obj=self:object)"
380
386
389PyObject* NS(MqContextC_ReadNEXT) (MqContextC_ARGS);
391
394PyObject* NS(MqContextC_ReadLIST) (MqContextC_ARGS);
396
399static PyObject* NS(MqContextC_Debug) (MqContextC_ARGS) {
400 PyObject *strO=NULL, *utf8=NULL;
402 OT_SETUP_VARARGS(1,2,"None ctx.Debug(prefix:str, obj=self:object)")
403 MK_STRN prefix=0;
405 OT_SETUP_OBJ(obj,self)
408 LngErrorCheckN(strO = PyObject_Repr(obj));
409 LngErrorCheckN(utf8 = PyUnicode_AsUTF8String(strO));
410 MkLogV_4M(hdl,prefix,0,"%s, type=%s, refCnt=%-3zi\n",
411 PyBytes_AsString(utf8), Py_TYPE(obj)->tp_name, Py_REFCNT(obj)-1);
413 goto end;
414error:
416end:
417 Py_CLEAR(strO);
418 Py_CLEAR(utf8);
420}
421
424static PyObject* NS(MqContextC_Debug2) (MqContextC_ARGS) {
426 OT_SETUP_VARARGS(1,2,"None ctx.Debug2(prefix:str, ?obj=self:object?)")
427 MK_STRN prefix=0;
429 OT_SETUP_OBJ(obj,self)
432 MkLogV_4M(hdl,prefix,0,"self<%p>, type<%s>, refCount<%li>\n", obj, Py_TYPE(obj)->tp_name, (long) Py_REFCNT(obj)-1);
434 goto end;
435error:
437end:
439}
440
441// -----------------------------------------------------------------------------
442
443// BEGIN-MqContextC - created by 'py_MqC.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
444
448
449// doc-key: MqContextC,MqContextC-Class-Export,sc_
450
452static OT_ProcRet NS(MqContextC_HandleResolve) (OtClass_ARGS) {
455 MK_HDL netHdl = 0;
458 MQ_CTX retVal = MqContextHandleResolve (netHdl);
459 OT_retObj_SET_CTX(retVal);
460 goto end;
461 error:
463 end:
465}
466
467// doc-key: MqContextC,MqContextC-Class-Export,om_
468
469// skip on class-overload: MqContextHandleGet → MkObjectHandleGet
471static OT_ProcRet NS(MqContextC_HandleGet) (MqContextC_ARGS) {OT_ERROR_LNG_RETURN;}
472
474// MqContextC_Class_PY_API
475
479
480// doc-key: MqContextC,MqContextC-Class-Introspection,oc_
481
483static OT_ProcRet NS(MqContextC_Next) (MqContextC_ARGS) {
487 MQ_CTX retVal = MqContextNext (hdl);
488 OT_retObj_SET_CTX(retVal);
489 goto end;
490 error:
492 end:
494}
495
497static OT_ProcRet NS(MqContextC_Prev) (MqContextC_ARGS) {
501 MQ_CTX retVal = MqContextPrev (hdl);
502 OT_retObj_SET_CTX(retVal);
503 goto end;
504 error:
506 end:
508}
509
510// doc-key: MqContextC,MqContextC-Class-Introspection,sc_
511
513static OT_ProcRet NS(MqContextC_Instances) (OtClass_ARGS) {
517 MQ_CTX retVal = MqContextInstances ();
518 OT_retObj_SET_CTX(retVal);
519 goto end;
520 error:
522 end:
524}
525
527// MqContextC_Class_PY_API
528
532
533// doc-key: MqContextC,MqContextC-Class-Misc,sc_
534
536static OT_ProcRet NS(MqContextC_GetNull) (OtClass_ARGS) {
540 MQ_CTX retVal = MqContextGetNull ();
541 OT_retObj_SET_CTX(retVal);
542 goto end;
543 error:
545 end:
547}
548
550// MqContextC_Class_PY_API
551
555
556// doc-key: MqContextC,MqContextC-ClassApi-Class,oc_
557
559static OT_ProcRet NS(MqContextC_ClassFactoryGet) (MqContextC_ARGS) {
563 MQ_FCT retVal = MqClassFactoryGet (hdl);
564 OT_retObj_SET_FCT(retVal);
565 goto end;
566 error:
568 end:
570}
571
572// doc-key: MqContextC,MqContextC-ClassApi-Class,om_
573
575static OT_ProcRet NS(MqContextC_ClassFactorySet) (MqContextC_ARGS) {
578 MQ_FCT item = 0;
581 MkErrorC_Check(hdl,MqClassFactorySet (hdl, item));
583 goto end;
584 error:
586 end:
588}
589
591static OT_ProcRet NS(MqContextC_ClassIdentGet) (MqContextC_ARGS) {
596 goto end;
597 error:
599 end:
601}
602
604static OT_ProcRet NS(MqContextC_ClassIdentSet) (MqContextC_ARGS) {
607 MK_STRN ident = 0;
610 MkErrorC_Check(hdl,MqClassIdentSet (hdl, ident));
612 goto end;
613 error:
615 end:
617}
618
620static OT_ProcRet NS(MqContextC_ClassOriginalIdentGet) (MqContextC_ARGS) {
625 goto end;
626 error:
628 end:
630}
631
633// MqContextC_ClassApi_Class_PY_API
634
638
639// doc-key: MqContextC,MqContextC-ConfigApi-Get,oco
640
642static OT_ProcRet NS(MqContextC_ConfigGetIoTcpL) (MqContextC_ARGS) {
646 MK_BFL vals_out;
647 MkErrorC_Check(hdl,MqConfigGetIoTcpL (hdl, &vals_out));
648 OT_retObj_SET_BFL(vals_out);
649 goto end;
650 error:
652 end:
654}
655
656// doc-key: MqContextC,MqContextC-ConfigApi-Get,om_
657
659static OT_ProcRet NS(MqContextC_ConfigGetBuffersize) (MqContextC_ARGS) {
664 goto end;
665 error:
667 end:
669}
670
672static OT_ProcRet NS(MqContextC_ConfigGetIdentFrom) (MqContextC_ARGS) {
677 goto end;
678 error:
680 end:
682}
683
685static OT_ProcRet NS(MqContextC_ConfigGetIoPipe) (MqContextC_ARGS) {
690 goto end;
691 error:
693 end:
695}
696
698static OT_ProcRet NS(MqContextC_ConfigGetIoUds) (MqContextC_ARGS) {
703 goto end;
704 error:
706 end:
708}
709
711static OT_ProcRet NS(MqContextC_ConfigGetIsParent) (MqContextC_ARGS) {
716 goto end;
717 error:
719 end:
721}
722
724static OT_ProcRet NS(MqContextC_ConfigGetIsServer) (MqContextC_ARGS) {
729 goto end;
730 error:
732 end:
734}
735
737static OT_ProcRet NS(MqContextC_ConfigGetIsString) (MqContextC_ARGS) {
742 goto end;
743 error:
745 end:
747}
748
750static OT_ProcRet NS(MqContextC_ConfigGetName) (MqContextC_ARGS) {
755 goto end;
756 error:
758 end:
760}
761
763static OT_ProcRet NS(MqContextC_ConfigGetPkgsize) (MqContextC_ARGS) {
768 goto end;
769 error:
771 end:
773}
774
776static OT_ProcRet NS(MqContextC_ConfigGetPostfix) (MqContextC_ARGS) {
781 goto end;
782 error:
784 end:
786}
787
789static OT_ProcRet NS(MqContextC_ConfigGetPrefix) (MqContextC_ARGS) {
794 goto end;
795 error:
797 end:
799}
800
802static OT_ProcRet NS(MqContextC_ConfigGetStartAs) (MqContextC_ARGS) {
807 goto end;
808 error:
810 end:
812}
813
815static OT_ProcRet NS(MqContextC_ConfigGetStatusIs) (MqContextC_ARGS) {
820 goto end;
821 error:
823 end:
825}
826
828static OT_ProcRet NS(MqContextC_ConfigGetStorage) (MqContextC_ARGS) {
833 goto end;
834 error:
836 end:
838}
839
841static OT_ProcRet NS(MqContextC_ConfigGetTimeout) (MqContextC_ARGS) {
846 goto end;
847 error:
849 end:
851}
852
854static OT_ProcRet NS(MqContextC_ConfigSetConfigFile) (MqContextC_ARGS) {
857 MK_STRN filename = 0;
860 MkErrorC_Check(hdl,MqConfigSetConfigFile (hdl, filename));
862 goto end;
863 error:
865 end:
867}
868
869// doc-key: MqContextC,MqContextC-ConfigApi-Get,omo
870
872static OT_ProcRet NS(MqContextC_ConfigGetIoTcp) (MqContextC_ARGS) {
876 MK_STRN host_out;
877 MK_STRN port_out;
878 MK_STRN myhost_out;
879 MK_STRN myport_out;
880 MkErrorC_Check(hdl,MqConfigGetIoTcp (hdl, &host_out, &port_out, &myhost_out, &myport_out));
884 OT_retObj_APPEND(OT_TMP_STR_OBJ(myhost_out));
885 OT_retObj_APPEND(OT_TMP_STR_OBJ(myport_out));
886 goto end;
887 error:
889 end:
891}
892
894// MqContextC_ConfigApi_Get_PY_API
895
899
900// doc-key: MqContextC,MqContextC-ConfigApi-Interface,om_
901
903static OT_ProcRet NS(MqContextC_ConfigSetBgError) (MqContextC_ARGS) {
906 OT_SETUP_CALLABLE(callback)
909 MqServiceCallbackF fCall = (callback == NULL ? NULL : NS(ServiceCall));
910 MqConfigSetBgError (hdl, fCall, callback, NS(ServiceFree), NS(ServiceCopy));
912 goto end;
913 error:
915 end:
916 OT_CLEANUP_CALLABLE(callback)
918}
919
921static OT_ProcRet NS(MqContextC_ConfigSetEvent) (MqContextC_ARGS) {
924 OT_SETUP_CALLABLE(callback)
927 MqServiceCallbackF fCall = (callback == NULL ? NULL : NS(ServiceCall));
928 MqConfigSetEvent (hdl, fCall, callback, NS(ServiceFree), NS(ServiceCopy));
930 goto end;
931 error:
933 end:
934 OT_CLEANUP_CALLABLE(callback)
936}
937
939static OT_ProcRet NS(MqContextC_ConfigSetServerCleanup) (MqContextC_ARGS) {
942 OT_SETUP_CALLABLE(callback)
945 MqServiceCallbackF fCall = (callback == NULL ? NULL : NS(ServiceCall));
946 MqConfigSetServerCleanup (hdl, fCall, callback, NS(ServiceFree), NS(ServiceCopy));
948 goto end;
949 error:
951 end:
952 OT_CLEANUP_CALLABLE(callback)
954}
955
957static OT_ProcRet NS(MqContextC_ConfigSetServerSetup) (MqContextC_ARGS) {
960 OT_SETUP_CALLABLE(callback)
963 MqServiceCallbackF fCall = (callback == NULL ? NULL : NS(ServiceCall));
964 MqConfigSetServerSetup (hdl, fCall, callback, NS(ServiceFree), NS(ServiceCopy));
966 goto end;
967 error:
969 end:
970 OT_CLEANUP_CALLABLE(callback)
972}
973
975// MqContextC_ConfigApi_Interface_PY_API
976
980
981// doc-key: MqContextC,MqContextC-ConfigApi-Misc,om_
982
984static OT_ProcRet NS(MqContextC_ConfigReset) (MqContextC_ARGS) {
988 MqConfigReset (hdl);
990 goto end;
991 error:
993 end:
995}
996
998// MqContextC_ConfigApi_Misc_PY_API
999
1003
1004// doc-key: MqContextC,MqContextC-ConfigApi-Set,om_
1005
1007static OT_ProcRet NS(MqContextC_ConfigCheckStartAs) (MqContextC_ARGS) {
1010 enum MqStartE data = 0;
1014 goto end;
1015 error:
1017 end:
1019}
1020
1022static OT_ProcRet NS(MqContextC_ConfigSetAllDebug) (MqContextC_ARGS) {
1025 MK_I32 data = 0;
1028 MkErrorC_Check(hdl,MqConfigSetAllDebug (hdl, data));
1030 goto end;
1031 error:
1033 end:
1035}
1036
1038static OT_ProcRet NS(MqContextC_ConfigSetBuffersize) (MqContextC_ARGS) {
1041 MK_I32 data = 0;
1044 MqConfigSetBuffersize (hdl, data);
1046 goto end;
1047 error:
1049 end:
1051}
1052
1054static OT_ProcRet NS(MqContextC_ConfigSetDaemon) (MqContextC_ARGS) {
1057 MK_STRN pidfile = 0;
1060 MkErrorC_Check(hdl,MqConfigSetDaemon (hdl, pidfile));
1062 goto end;
1063 error:
1065 end:
1067}
1068
1070static OT_ProcRet NS(MqContextC_ConfigSetIdentFrom) (MqContextC_ARGS) {
1073 enum MqIdentE data = 0;
1076 MqConfigSetIdentFrom (hdl, data);
1078 goto end;
1079 error:
1081 end:
1083}
1084
1086static OT_ProcRet NS(MqContextC_ConfigSetIgnoreExit) (MqContextC_ARGS) {
1089 MK_BOOL data = 0;
1092 MqConfigSetIgnoreExit (hdl, data);
1094 goto end;
1095 error:
1097 end:
1099}
1100
1102static OT_ProcRet NS(MqContextC_ConfigSetIoPipe) (MqContextC_ARGS) {
1105 MQ_SOCK_HDL fh = 0;
1108 MkErrorC_Check(hdl,MqConfigSetIoPipe (hdl, fh));
1110 goto end;
1111 error:
1113 end:
1115}
1116
1118static OT_ProcRet NS(MqContextC_ConfigSetIoTcp) (MqContextC_ARGS) {
1121 MK_STRN host = NULL;
1123 MK_STRN port = NULL;
1125 MK_STRN myhost = NULL;
1127 MK_STRN myport = NULL;
1130 MkErrorC_Check(hdl,MqConfigSetIoTcp (hdl, host, port, myhost, myport));
1132 goto end;
1133 error:
1135 end:
1137}
1138
1140static OT_ProcRet NS(MqContextC_ConfigSetIoTcpL) (MqContextC_ARGS) {
1143 MkBufferListCreateTLS_T(vals,10);
1146 MkErrorC_Check(hdl,MqConfigSetIoTcpL (hdl, vals));
1148 goto end;
1149 error:
1151 end:
1153}
1154
1156static OT_ProcRet NS(MqContextC_ConfigSetIoUds) (MqContextC_ARGS) {
1159 MK_STRN file = 0;
1162 MkErrorC_Check(hdl,MqConfigSetIoUds (hdl, file));
1164 goto end;
1165 error:
1167 end:
1169}
1170
1172static OT_ProcRet NS(MqContextC_ConfigSetIsServer) (MqContextC_ARGS) {
1175 MK_BOOL data = 0;
1178 MqConfigSetIsServer (hdl, data);
1180 goto end;
1181 error:
1183 end:
1185}
1186
1188static OT_ProcRet NS(MqContextC_ConfigSetIsString) (MqContextC_ARGS) {
1191 MK_BOOL data = 0;
1194 MqConfigSetIsString (hdl, data);
1196 goto end;
1197 error:
1199 end:
1201}
1202
1204static OT_ProcRet NS(MqContextC_ConfigSetName) (MqContextC_ARGS) {
1207 MK_STRN data = 0;
1210 MqConfigSetName (hdl, data);
1212 goto end;
1213 error:
1215 end:
1217}
1218
1220static OT_ProcRet NS(MqContextC_ConfigSetPkgsize) (MqContextC_ARGS) {
1223 MK_I32 data = 0;
1226 MqConfigSetPkgsize (hdl, data);
1228 goto end;
1229 error:
1231 end:
1233}
1234
1236static OT_ProcRet NS(MqContextC_ConfigSetPostfix) (MqContextC_ARGS) {
1239 MK_STRN data = 0;
1242 MqConfigSetPostfix (hdl, data);
1244 goto end;
1245 error:
1247 end:
1249}
1250
1252static OT_ProcRet NS(MqContextC_ConfigSetPrefix) (MqContextC_ARGS) {
1255 MK_STRN data = 0;
1258 MqConfigSetPrefix (hdl, data);
1260 goto end;
1261 error:
1263 end:
1265}
1266
1268static OT_ProcRet NS(MqContextC_ConfigSetStartAs) (MqContextC_ARGS) {
1271 enum MqStartE data = 0;
1274 MkErrorC_Check(hdl,MqConfigSetStartAs (hdl, data));
1276 goto end;
1277 error:
1279 end:
1281}
1282
1284static OT_ProcRet NS(MqContextC_ConfigSetStartAsString) (MqContextC_ARGS) {
1287 MK_STRN data = 0;
1292 goto end;
1293 error:
1295 end:
1297}
1298
1300static OT_ProcRet NS(MqContextC_ConfigSetStorage) (MqContextC_ARGS) {
1303 MK_STRN data = 0;
1306 MqConfigSetStorage (hdl, data);
1308 goto end;
1309 error:
1311 end:
1313}
1314
1316static OT_ProcRet NS(MqContextC_ConfigSetTimeout) (MqContextC_ARGS) {
1319 MK_TIME_T data = 0;
1322 MqConfigSetTimeout (hdl, data);
1324 goto end;
1325 error:
1327 end:
1329}
1330
1332// MqContextC_ConfigApi_Set_PY_API
1333
1337
1338// doc-key: MqContextC,MqContextC-EnvApi-Env,om_
1339
1341static OT_ProcRet NS(MqContextC_EnvProtect) (MqContextC_ARGS) {
1345 MqEnvProtect (hdl);
1347 goto end;
1348 error:
1350 end:
1352}
1353
1355static OT_ProcRet NS(MqContextC_EnvRestore) (MqContextC_ARGS) {
1359 MqEnvRestore (hdl);
1361 goto end;
1362 error:
1364 end:
1366}
1367
1369// MqContextC_EnvApi_Env_PY_API
1370
1374
1375// doc-key: MqContextC,MqContextC-ErrorApi-Error,oc_
1376
1378static OT_ProcRet NS(MqContextC_ErrorFORMAT) (MqContextC_ARGS) {
1382 MK_ERR retVal = MqContextErrorFORMAT (hdl);
1383 OT_retObj_SET_ERR(retVal);
1384 goto end;
1385 error:
1387 end:
1389}
1390
1391// doc-key: MqContextC,MqContextC-ErrorApi-Error,om_
1392
1394OT_ProcRet NS(MqContextC_ErrorCopy) (MqContextC_ARGS) {
1397 MQ_CTXN sourceCtx = 0;
1400 OT_retObj_SET(OT_NEW_Mk_enum_OBJ(ErrorE,MqContextErrorCopy (hdl, sourceCtx)));
1401 goto end;
1402 error:
1404 end:
1406}
1407
1409OT_ProcRet NS(MqContextC_ErrorMove) (MqContextC_ARGS) {
1412 MQ_CTXN sourceCtx = 0;
1415 OT_retObj_SET(OT_NEW_Mk_enum_OBJ(ErrorE,MqContextErrorMove (hdl, sourceCtx)));
1416 goto end;
1417 error:
1419 end:
1421}
1422
1424// MqContextC_ErrorApi_Error_PY_API
1425
1429
1430// doc-key: MqContextC,MqContextC-HighApi-High,om_
1431
1433OT_ProcRet NS(MqContextC_Send) (MqContextC_ARGS) ; // skip template-required
1434
1436// MqContextC_HighApi_High_PY_API
1437
1441
1442// doc-key: MqContextC,MqContextC-LinkApi-Link,oc_
1443
1445static OT_ProcRet NS(MqContextC_LinkGetParent) (MqContextC_ARGS) {
1449 MQ_CTX retVal = MqLinkGetParent (hdl);
1450 OT_retObj_SET_CTX(retVal);
1451 goto end;
1452 error:
1454 end:
1456}
1457
1458// doc-key: MqContextC,MqContextC-LinkApi-Link,om_
1459
1461static OT_ProcRet NS(MqContextC_LinkConnect) (MqContextC_ARGS) {
1465 MkErrorC_Check(hdl,MqLinkConnect (hdl));
1467 goto end;
1468 error:
1470 end:
1472}
1473
1475static OT_ProcRet NS(MqContextC_LinkCreate) (MqContextC_ARGS) {
1478 MkBufferListCreateTLS_T(args,10);
1481 MkErrorC_Check(hdl,MqLinkCreate (hdl, args));
1483 goto end;
1484 error:
1486 end:
1488}
1489
1491static OT_ProcRet NS(MqContextC_LinkCreateChild) (MqContextC_ARGS) {
1494 MQ_CTX parent = 0;
1496 MkBufferListCreateTLS_T(args,10);
1499 MkErrorC_Check(hdl,MqLinkCreateChild (hdl, parent, args));
1501 goto end;
1502 error:
1504 end:
1506}
1507
1509static OT_ProcRet NS(MqContextC_LinkDelete) (MqContextC_ARGS) {
1513 MqLinkDelete (hdl);
1515 goto end;
1516 error:
1518 end:
1520}
1521
1523static OT_ProcRet NS(MqContextC_LinkGetCtxId) (MqContextC_ARGS) {
1528 goto end;
1529 error:
1531 end:
1533}
1534
1536static OT_ProcRet NS(MqContextC_LinkGetTargetIdent) (MqContextC_ARGS) {
1541 goto end;
1542 error:
1544 end:
1546}
1547
1549static OT_ProcRet NS(MqContextC_LinkIsConnected) (MqContextC_ARGS) {
1554 goto end;
1555 error:
1557 end:
1559}
1560
1562static OT_ProcRet NS(MqContextC_LinkIsParent) (MqContextC_ARGS) {
1567 goto end;
1568 error:
1570 end:
1572}
1573
1575static OT_ProcRet NS(MqContextC_LinkShutdown) (MqContextC_ARGS) {
1579 MkErrorC_Check(hdl,MqLinkShutdown (hdl));
1581 goto end;
1582 error:
1584 end:
1586}
1587
1589// MqContextC_LinkApi_Link_PY_API
1590
1594
1595// doc-key: MqContextC,MqContextC-LogApi-Log,om_
1596
1597// skip on class-overload: MqContextLog → MkObjectLog
1600
1602static OT_ProcRet NS(MqContextC_LogConfig) (MqContextC_ARGS) {
1605 MK_OBJN fmtobj = NULL;
1607 MK_DBG debug = 0;
1609 MK_STRN callfunc = NULL;
1611 MK_I32 lvl = 0;
1614 if (debug > MkRuntimeDebugGet()) {
1616 goto end;
1617 }
1618 if (MkSysStringIsNULL(callfunc)) {callfunc = OT_GET_CALL_PROC;}
1619 MqContextLogConfig (hdl, fmtobj, debug, callfunc, lvl);
1621 goto end;
1622 error:
1624 end:
1627}
1628
1630static OT_ProcRet NS(MqContextC_LogEnv) (MqContextC_ARGS) {
1633 MK_OBJN fmtobj = NULL;
1635 MK_DBG debug = 0;
1637 MK_STRN callfunc = NULL;
1639 MK_I32 lvl = 0;
1642 if (debug > MkRuntimeDebugGet()) {
1644 goto end;
1645 }
1646 if (MkSysStringIsNULL(callfunc)) {callfunc = OT_GET_CALL_PROC;}
1647 MqContextLogEnv (hdl, fmtobj, debug, callfunc, lvl);
1649 goto end;
1650 error:
1652 end:
1655}
1656
1658static OT_ProcRet NS(MqContextC_LogLink) (MqContextC_ARGS) {
1661 MK_OBJN fmtobj = NULL;
1663 MK_DBG debug = 0;
1665 MK_STRN callfunc = NULL;
1667 MK_I32 lvl = 0;
1670 if (debug > MkRuntimeDebugGet()) {
1672 goto end;
1673 }
1674 if (MkSysStringIsNULL(callfunc)) {callfunc = OT_GET_CALL_PROC;}
1675 MqContextLogLink (hdl, fmtobj, debug, callfunc, lvl);
1677 goto end;
1678 error:
1680 end:
1683}
1684
1686static OT_ProcRet NS(MqContextC_LogSetup) (MqContextC_ARGS) {
1689 MK_OBJN fmtobj = NULL;
1691 MK_DBG debug = 0;
1693 MK_STRN callfunc = NULL;
1695 MK_I32 lvl = 0;
1698 if (debug > MkRuntimeDebugGet()) {
1700 goto end;
1701 }
1702 if (MkSysStringIsNULL(callfunc)) {callfunc = OT_GET_CALL_PROC;}
1703 MqContextLogSetup (hdl, fmtobj, debug, callfunc, lvl);
1705 goto end;
1706 error:
1708 end:
1711}
1712
1714static OT_ProcRet NS(MqContextC_LogShort) (MqContextC_ARGS) {
1717 MK_OBJN fmtobj = NULL;
1719 MK_DBG debug = 0;
1721 MK_STRN callfunc = NULL;
1723 MK_I32 lvl = 0;
1725 MK_STRN label = NULL;
1728 if (debug > MkRuntimeDebugGet()) {
1730 goto end;
1731 }
1732 if (MkSysStringIsNULL(callfunc)) {callfunc = OT_GET_CALL_PROC;}
1733 MqContextLogShort (hdl, fmtobj, debug, callfunc, lvl, label);
1735 goto end;
1736 error:
1738 end:
1741}
1742
1744static OT_ProcRet NS(MqContextC_LogType) (MqContextC_ARGS) {
1747 MK_OBJN fmtobj = NULL;
1749 MK_DBG debug = 0;
1751 MK_STRN callfunc = NULL;
1753 MK_I32 lvl = 0;
1756 if (debug > MkRuntimeDebugGet()) {
1758 goto end;
1759 }
1760 if (MkSysStringIsNULL(callfunc)) {callfunc = OT_GET_CALL_PROC;}
1761 MqContextLogType (hdl, fmtobj, debug, callfunc, lvl);
1763 goto end;
1764 error:
1766 end:
1769}
1770
1772static OT_ProcRet NS(MqContextC_LogParentOrChild) (MqContextC_ARGS) {
1777 goto end;
1778 error:
1780 end:
1782}
1783
1785static OT_ProcRet NS(MqContextC_LogServerOrClient) (MqContextC_ARGS) {
1790 goto end;
1791 error:
1793 end:
1795}
1796
1798// MqContextC_LogApi_Log_PY_API
1799
1803
1804// doc-key: MqContextC,MqContextC-MiscApi-Misc,oc_
1805
1807static OT_ProcRet NS(MqContextC_GetBuffer) (MqContextC_ARGS) {
1811 MK_BUF retVal = MqContextGetBuffer (hdl);
1812 OT_retObj_SET_BUF(retVal);
1813 goto end;
1814 error:
1816 end:
1818}
1819
1821static OT_ProcRet NS(MqContextC_GetRoot) (MqContextC_ARGS) {
1825 MQ_CTX retVal = MqGetRoot (hdl);
1826 OT_retObj_SET_CTX(retVal);
1827 goto end;
1828 error:
1830 end:
1832}
1833
1834// doc-key: MqContextC,MqContextC-MiscApi-Misc,om_
1835
1836// skip on class-overload: MqContextToString → MkObjectToString
1838static OT_ProcRet NS(MqContextC_ToString) (MqContextC_ARGS) {OT_ERROR_LNG_RETURN;}
1839
1841static OT_ProcRet NS(MqContextC_Exit) (MqContextC_ARGS) {
1844 MK_STRN callfunc = NULL;
1846 MK_STRN callfile = NULL;
1848 MK_I32 callline = -1;
1851 if (callline == -1 ) {callline = OT_GET_CALL_LINE;}
1852 if (MkSysStringIsNULL(callfile)) {callfile = OT_GET_CALL_FILE;}
1853 if (MkSysStringIsNULL(callfunc)) {callfunc = OT_GET_CALL_PROC;}
1854 OT_retObj_SET_I32(MqExit (hdl, callfunc, callfile, callline));
1855 goto end;
1856 error:
1858 end:
1861}
1862
1880
1882// MqContextC_MiscApi_Misc_PY_API
1883
1887
1888// doc-key: MqContextC,MqContextC-ProxyApi-Proxy,om_
1889
1891static OT_ProcRet NS(MqContextC_ProxyForward) (MqContextC_ARGS) {
1894 MQ_CTX targetCtx = 0;
1896 MQ_DMP dump = NULL;
1901 MkErrorC_Check(hdl,MqProxyForward (hdl, targetCtx, dump, timeout));
1903 goto end;
1904 error:
1906 end:
1908}
1909
1911static OT_ProcRet NS(MqContextC_ProxyItem) (MqContextC_ARGS) {
1914 MQ_CTX targetCtx = 0;
1917 MkErrorC_Check(hdl,MqProxyItem (hdl, targetCtx));
1919 goto end;
1920 error:
1922 end:
1924}
1925
1927// MqContextC_ProxyApi_Proxy_PY_API
1928
1932
1933// doc-key: MqContextC,MqContextC-ReadApi-Atom,oci
1934
1936static OT_ProcRet NS(MqContextC_ReadALL) (MqContextC_ARGS) {
1939 MkBufferListCreateTLS_T(val_inout,10);
1942 MkErrorC_Check(hdl,MqReadALL (hdl, &val_inout));
1943 OT_retObj_SET_BFL(val_inout);
1944 goto end;
1945 error:
1947 end:
1949}
1950
1951// doc-key: MqContextC,MqContextC-ReadApi-Atom,oco
1952
1954static OT_ProcRet NS(MqContextC_ReadBFL) (MqContextC_ARGS) {
1958 MK_BFL val_out;
1959 MkErrorC_Check(hdl,MqReadBFL (hdl, &val_out));
1960 OT_retObj_SET_BFL(val_out);
1961 goto end;
1962 error:
1964 end:
1966}
1967
1969static OT_ProcRet NS(MqContextC_ReadBUF) (MqContextC_ARGS) {
1973 MK_BUF val_out;
1974 MkErrorC_Check(hdl,MqReadBUF (hdl, &val_out));
1975 OT_retObj_SET_BUF(val_out);
1976 goto end;
1977 error:
1979 end:
1981}
1982
1983// doc-key: MqContextC,MqContextC-ReadApi-Atom,omo
1984
1986static OT_ProcRet NS(MqContextC_ReadBIN) (MqContextC_ARGS) {
1990 MkBinaryR val_out;
1991 MkErrorC_Check(hdl,MqReadBIN (hdl, &val_out));
1992 MkBinaryR retVal = val_out;
1994 goto end;
1995 error:
1997 end:
1999}
2000
2002static OT_ProcRet NS(MqContextC_ReadBOL) (MqContextC_ARGS) {
2006 MK_BOL val_out;
2007 MkErrorC_Check(hdl,MqReadBOL (hdl, &val_out));
2008 OT_retObj_SET_BOL(val_out == 1);
2009 goto end;
2010 error:
2012 end:
2014}
2015
2017static OT_ProcRet NS(MqContextC_ReadBinaryR) (MqContextC_ARGS) {
2021 MkBinaryR val_out;
2022 MkErrorC_Check(hdl,MqReadBinaryR (hdl, &val_out));
2023 MkBinaryR retVal = val_out;
2025 goto end;
2026 error:
2028 end:
2030}
2031
2033static OT_ProcRet NS(MqContextC_ReadDBL) (MqContextC_ARGS) {
2037 MK_DBL val_out;
2038 MkErrorC_Check(hdl,MqReadDBL (hdl, &val_out));
2039 OT_retObj_SET_DBL(val_out);
2040 goto end;
2041 error:
2043 end:
2045}
2046
2048static OT_ProcRet NS(MqContextC_ReadFLT) (MqContextC_ARGS) {
2052 MK_FLT val_out;
2053 MkErrorC_Check(hdl,MqReadFLT (hdl, &val_out));
2054 OT_retObj_SET_FLT(val_out);
2055 goto end;
2056 error:
2058 end:
2060}
2061
2063static OT_ProcRet NS(MqContextC_ReadHDL) (MqContextC_ARGS) {
2067 MK_HDL val_out;
2068 MkErrorC_Check(hdl,MqReadHDL (hdl, &val_out));
2069 OT_retObj_SET_HDL(val_out);
2070 goto end;
2071 error:
2073 end:
2075}
2076
2078static OT_ProcRet NS(MqContextC_ReadI16) (MqContextC_ARGS) {
2082 MK_I16 val_out;
2083 MkErrorC_Check(hdl,MqReadI16 (hdl, &val_out));
2084 OT_retObj_SET_I16(val_out);
2085 goto end;
2086 error:
2088 end:
2090}
2091
2093static OT_ProcRet NS(MqContextC_ReadI32) (MqContextC_ARGS) {
2097 MK_I32 val_out;
2098 MkErrorC_Check(hdl,MqReadI32 (hdl, &val_out));
2099 OT_retObj_SET_I32(val_out);
2100 goto end;
2101 error:
2103 end:
2105}
2106
2108static OT_ProcRet NS(MqContextC_ReadI64) (MqContextC_ARGS) {
2112 MK_I64 val_out;
2113 MkErrorC_Check(hdl,MqReadI64 (hdl, &val_out));
2114 OT_retObj_SET_I64(val_out);
2115 goto end;
2116 error:
2118 end:
2120}
2121
2123static OT_ProcRet NS(MqContextC_ReadI8) (MqContextC_ARGS) {
2127 MK_I8 val_out;
2128 MkErrorC_Check(hdl,MqReadI8 (hdl, &val_out));
2129 OT_retObj_SET_I8(val_out);
2130 goto end;
2131 error:
2133 end:
2135}
2136
2138OT_ProcRet NS(MqContextC_ReadLIST) (MqContextC_ARGS) ; // skip template-required
2139
2141static OT_ProcRet NS(MqContextC_ReadLONG) (MqContextC_ARGS) {
2145 MK_LONG val_out;
2146 MkErrorC_Check(hdl,MqReadLONG (hdl, &val_out));
2147 OT_retObj_SET_LONG(val_out);
2148 goto end;
2149 error:
2151 end:
2153}
2154
2156OT_ProcRet NS(MqContextC_ReadNEXT) (MqContextC_ARGS) ; // skip template-required
2157
2159static OT_ProcRet NS(MqContextC_ReadSTR) (MqContextC_ARGS) {
2163 MK_STRN val_out;
2164 MkErrorC_Check(hdl,MqReadSTR (hdl, &val_out));
2165 OT_retObj_SET_STR(val_out);
2166 goto end;
2167 error:
2169 end:
2171}
2172
2174static OT_ProcRet NS(MqContextC_ReadStringR) (MqContextC_ARGS) {
2178 MkStringR val_out;
2179 MkErrorC_Check(hdl,MqReadStringR (hdl, &val_out));
2180 MkStringR retVal = val_out;
2182 goto end;
2183 error:
2185 end:
2187}
2188
2190// MqContextC_ReadApi_Atom_PY_API
2191
2195
2196// doc-key: MqContextC,MqContextC-ReadApi-Block,om_
2197
2199static OT_ProcRet NS(MqContextC_ReadL_END) (MqContextC_ARGS) {
2203 MkErrorC_Check(hdl,MqReadL_END (hdl));
2205 goto end;
2206 error:
2208 end:
2210}
2211
2213static OT_ProcRet NS(MqContextC_ReadL_START) (MqContextC_ARGS) {
2216 MK_BUF buf = NULL;
2219 MkErrorC_Check(hdl,MqReadL_START (hdl, buf));
2221 goto end;
2222 error:
2224 end:
2226}
2227
2229static OT_ProcRet NS(MqContextC_ReadT_END) (MqContextC_ARGS) {
2233 MkErrorC_Check(hdl,MqReadT_END (hdl));
2235 goto end;
2236 error:
2238 end:
2240}
2241
2243static OT_ProcRet NS(MqContextC_ReadT_START) (MqContextC_ARGS) {
2247 MkErrorC_Check(hdl,MqReadT_START (hdl));
2249 goto end;
2250 error:
2252 end:
2254}
2255
2257// MqContextC_ReadApi_Block_PY_API
2258
2262
2263// doc-key: MqContextC,MqContextC-ReadApi-Misc,om_
2264
2266static OT_ProcRet NS(MqContextC_ReadDbg) (MqContextC_ARGS) {
2270 MqReadDbg (hdl);
2272 goto end;
2273 error:
2275 end:
2277}
2278
2280static OT_ProcRet NS(MqContextC_ReadGetNextType) (MqContextC_ARGS) {
2285 goto end;
2286 error:
2288 end:
2290}
2291
2293static OT_ProcRet NS(MqContextC_ReadGetNumItems) (MqContextC_ARGS) {
2298 goto end;
2299 error:
2301 end:
2303}
2304
2306static OT_ProcRet NS(MqContextC_ReadItemExists) (MqContextC_ARGS) {
2311 goto end;
2312 error:
2314 end:
2316}
2317
2319static OT_ProcRet NS(MqContextC_ReadUndo) (MqContextC_ARGS) {
2323 MkErrorC_Check(hdl,MqReadUndo (hdl));
2325 goto end;
2326 error:
2328 end:
2330}
2331
2333// MqContextC_ReadApi_Misc_PY_API
2334
2338
2339// doc-key: MqContextC,MqContextC-RouteApi-Route,oco
2340
2342static OT_ProcRet NS(MqContextC_RouteGetTree) (MqContextC_ARGS) {
2346 MK_BFL treeP_out;
2347 MkErrorC_Check(hdl,MqRouteGetTree (hdl, &treeP_out));
2348 OT_retObj_SET_BFL(treeP_out);
2349 goto end;
2350 error:
2352 end:
2354}
2355
2356// doc-key: MqContextC,MqContextC-RouteApi-Route,om_
2357
2359static OT_ProcRet NS(MqContextC_RouteCreate) (MqContextC_ARGS) {
2362 MK_STRN route = 0;
2364 MK_STRN service = 0;
2366 MK_BOOL overwrite = false;
2367 OT_CHECK_OPTIONAL(OT_CHECK_bool (overwrite))
2369 MkErrorC_Check(hdl,MqRouteCreate (hdl, route, service, overwrite));
2371 goto end;
2372 error:
2374 end:
2376}
2377
2379static OT_ProcRet NS(MqContextC_RouteDelete) (MqContextC_ARGS) {
2382 MK_STRN route = 0;
2384 MK_STRN service = 0;
2386 MK_BOOL overwrite = false;
2387 OT_CHECK_OPTIONAL(OT_CHECK_bool (overwrite))
2389 MkErrorC_Check(hdl,MqRouteDelete (hdl, route, service, overwrite));
2391 goto end;
2392 error:
2394 end:
2396}
2397
2399static OT_ProcRet NS(MqContextC_RouteResolve) (MqContextC_ARGS) {
2402 MK_STRN ident = 0;
2404 MK_NUM retnum = -1;
2407 MQ_CTX_A retVal = MqRouteResolve (hdl, ident, retnum);
2409 for (int i=0; i<retVal.size; i++) {
2411 }
2412 goto end;
2413 error:
2415 end:
2417}
2418
2420static OT_ProcRet NS(MqContextC_RouteTraverse) (MqContextC_ARGS) {
2423 MK_STRN service = 0;
2425 MkBufferListCreateTLS_T(args,10);
2428 MkErrorC_Check(hdl,MqRouteTraverse (hdl, service, args));
2430 goto end;
2431 error:
2433 end:
2435}
2436
2437// doc-key: MqContextC,MqContextC-RouteApi-Route,omo
2438
2440static OT_ProcRet NS(MqContextC_RouteGetPath) (MqContextC_ARGS) {
2444 MK_STRN path_out;
2445 MkErrorC_Check(hdl,MqRouteGetPath (hdl, &path_out));
2446 OT_retObj_SET_STR(path_out);
2447 goto end;
2448 error:
2450 end:
2452}
2453
2455// MqContextC_RouteApi_Route_PY_API
2456
2460
2461// doc-key: MqContextC,MqContextC-SendApi-Atom,om_
2462
2464static OT_ProcRet NS(MqContextC_SendBFL) (MqContextC_ARGS) {
2470 MkErrorC_Check(hdl,MqSendBFL (hdl, val));
2472 goto end;
2473 error:
2475 end:
2477}
2478
2480static OT_ProcRet NS(MqContextC_SendBIN) (MqContextC_ARGS) {
2483 MkBinaryR val = {0};
2486 MkErrorC_Check(hdl,MqSendBIN (hdl, val));
2488 goto end;
2489 error:
2491 end:
2493}
2494
2496static OT_ProcRet NS(MqContextC_SendBOL) (MqContextC_ARGS) {
2499 MK_BOL val = 0;
2502 MkErrorC_Check(hdl,MqSendBOL (hdl, (MK_BOL)(val?1:0)));
2504 goto end;
2505 error:
2507 end:
2509}
2510
2512static OT_ProcRet NS(MqContextC_SendBUF) (MqContextC_ARGS) {
2515 MK_BUFN val = 0;
2518 MkErrorC_Check(hdl,MqSendBUF (hdl, val));
2520 goto end;
2521 error:
2523 end:
2525}
2526
2528static OT_ProcRet NS(MqContextC_SendBUS_FLAT) (MqContextC_ARGS) {
2531 MK_BUSN val = 0;
2534 MkErrorC_Check(hdl,MqSendBUS_FLAT (hdl, val));
2536 goto end;
2537 error:
2539 end:
2541}
2542
2544static OT_ProcRet NS(MqContextC_SendBinaryR) (MqContextC_ARGS) {
2547 MkBinaryR val = {0};
2550 MkErrorC_Check(hdl,MqSendBinaryR (hdl, val));
2552 goto end;
2553 error:
2555 end:
2557}
2558
2560static OT_ProcRet NS(MqContextC_SendDBL) (MqContextC_ARGS) {
2563 MK_DBL val = 0;
2566 MkErrorC_Check(hdl,MqSendDBL (hdl, val));
2568 goto end;
2569 error:
2571 end:
2573}
2574
2576static OT_ProcRet NS(MqContextC_SendFLT) (MqContextC_ARGS) {
2579 MK_FLT val = 0;
2582 MkErrorC_Check(hdl,MqSendFLT (hdl, val));
2584 goto end;
2585 error:
2587 end:
2589}
2590
2592static OT_ProcRet NS(MqContextC_SendHDL) (MqContextC_ARGS) {
2595 MK_HDL val = 0;
2598 MkErrorC_Check(hdl,MqSendHDL (hdl, val));
2600 goto end;
2601 error:
2603 end:
2605}
2606
2608static OT_ProcRet NS(MqContextC_SendI16) (MqContextC_ARGS) {
2611 MK_I16 val = 0;
2614 MkErrorC_Check(hdl,MqSendI16 (hdl, val));
2616 goto end;
2617 error:
2619 end:
2621}
2622
2624static OT_ProcRet NS(MqContextC_SendI32) (MqContextC_ARGS) {
2627 MK_I32 val = 0;
2630 MkErrorC_Check(hdl,MqSendI32 (hdl, val));
2632 goto end;
2633 error:
2635 end:
2637}
2638
2640static OT_ProcRet NS(MqContextC_SendI64) (MqContextC_ARGS) {
2643 MK_I64 val = 0;
2646 MkErrorC_Check(hdl,MqSendI64 (hdl, val));
2648 goto end;
2649 error:
2651 end:
2653}
2654
2656static OT_ProcRet NS(MqContextC_SendI8) (MqContextC_ARGS) {
2659 MK_I8 val = 0;
2662 MkErrorC_Check(hdl,MqSendI8 (hdl, (MK_I8)(val)));
2664 goto end;
2665 error:
2667 end:
2669}
2670
2672static OT_ProcRet NS(MqContextC_SendLONG) (MqContextC_ARGS) {
2675 MK_LONG val = 0;
2678 MkErrorC_Check(hdl,MqSendLONG (hdl, val));
2680 goto end;
2681 error:
2683 end:
2685}
2686
2688static OT_ProcRet NS(MqContextC_SendLTR) (MqContextC_ARGS) {
2691 MQ_LTR transLId = 0;
2694 MkErrorC_Check(hdl,MqSendLTR (hdl, transLId));
2696 goto end;
2697 error:
2699 end:
2701}
2702
2704static OT_ProcRet NS(MqContextC_SendL_FLAT) (MqContextC_ARGS) {
2710 MkErrorC_Check(hdl,MqSendL_FLAT (hdl, val));
2712 goto end;
2713 error:
2715 end:
2717}
2718
2720static OT_ProcRet NS(MqContextC_SendSTR) (MqContextC_ARGS) {
2723 MK_STRN val = 0;
2726 MkErrorC_Check(hdl,MqSendSTR (hdl, val));
2728 goto end;
2729 error:
2731 end:
2733}
2734
2736static OT_ProcRet NS(MqContextC_SendStringR) (MqContextC_ARGS) {
2739 MkStringR val = {0};
2742 MkErrorC_Check(hdl,MqSendStringR (hdl, val));
2744 goto end;
2745 error:
2747 end:
2749}
2750
2752// MqContextC_SendApi_Atom_PY_API
2753
2757
2758// doc-key: MqContextC,MqContextC-SendApi-Basics,om_
2759
2777
2779static OT_ProcRet NS(MqContextC_SendEND_AND_CALLBACK) (MqContextC_ARGS) {
2782 MQ_TOK token = 0;
2784 OT_SETUP_CALLABLE(callback)
2789 MkErrorC_Check(hdl,MqSendEND_AND_CALLBACK (hdl, token, NS(ServiceCall), callback, NS(ServiceFree), timeout));
2791 goto end;
2792 error:
2794 end:
2795 OT_CLEANUP_CALLABLE(callback)
2797}
2798
2800static OT_ProcRet NS(MqContextC_SendEND_AND_SUB) (MqContextC_ARGS) {
2803 MQ_TOK token = 0;
2805 OT_SETUP_CALLABLE(callback)
2810 MkErrorC_Check(hdl,MqSendEND_AND_SUB (hdl, token, NS(ServiceCall), callback, NS(ServiceFree), timeout));
2812 goto end;
2813 error:
2815 end:
2816 OT_CLEANUP_CALLABLE(callback)
2818}
2819
2821static OT_ProcRet NS(MqContextC_SendEND_AND_TRANSACTION) (MqContextC_ARGS) {
2824 MQ_TOK token = 0;
2826 MQ_TOK callback = 0;
2833 goto end;
2834 error:
2836 end:
2838}
2839
2857
2859static OT_ProcRet NS(MqContextC_SendSTART) (MqContextC_ARGS) {
2863 MkErrorC_Check(hdl,MqSendSTART (hdl));
2865 goto end;
2866 error:
2868 end:
2870}
2871
2873static OT_ProcRet NS(MqContextC_SendSYNC) (MqContextC_ARGS) {
2877 MkErrorC_Check(hdl,MqSendSYNC (hdl));
2879 goto end;
2880 error:
2882 end:
2884}
2885
2887// MqContextC_SendApi_Basics_PY_API
2888
2892
2893// doc-key: MqContextC,MqContextC-SendApi-Block,om_
2894
2896static OT_ProcRet NS(MqContextC_SendL_END) (MqContextC_ARGS) {
2900 MkErrorC_Check(hdl,MqSendL_END (hdl));
2902 goto end;
2903 error:
2905 end:
2907}
2908
2910static OT_ProcRet NS(MqContextC_SendL_START) (MqContextC_ARGS) {
2914 MkErrorC_Check(hdl,MqSendL_START (hdl));
2916 goto end;
2917 error:
2919 end:
2921}
2922
2924static OT_ProcRet NS(MqContextC_SendT_END) (MqContextC_ARGS) {
2928 MkErrorC_Check(hdl,MqSendT_END (hdl));
2930 goto end;
2931 error:
2933 end:
2935}
2936
2938static OT_ProcRet NS(MqContextC_SendT_START) (MqContextC_ARGS) {
2942 MkErrorC_Check(hdl,MqSendT_START (hdl));
2944 goto end;
2945 error:
2947 end:
2949}
2950
2952// MqContextC_SendApi_Block_PY_API
2953
2957
2958// doc-key: MqContextC,MqContextC-SendApi-Return,om_
2959
2961static OT_ProcRet NS(MqContextC_SendERROR) (MqContextC_ARGS) {
2965 MkErrorC_Check(hdl,MqSendERROR (hdl));
2967 goto end;
2968 error:
2970 end:
2972}
2973
2975static OT_ProcRet NS(MqContextC_SendRETURN) (MqContextC_ARGS) {
2979 MkErrorC_Check(hdl,MqSendRETURN (hdl));
2981 goto end;
2982 error:
2984 end:
2986}
2987
2989static OT_ProcRet NS(MqContextC_SendRETURN_SUB) (MqContextC_ARGS) {
2995 goto end;
2996 error:
2998 end:
3000}
3001
3003// MqContextC_SendApi_Return_PY_API
3004
3008
3009// doc-key: MqContextC,MqContextC-ServiceApi-Service,om_
3010
3012static OT_ProcRet NS(MqContextC_ServiceCreate) (MqContextC_ARGS) {
3015 MQ_TOK token = 0;
3017 OT_SETUP_CALLABLE(callback)
3020 MkErrorC_Check(hdl,MqServiceCreate (hdl, token, NS(ServiceCall), callback, NS(ServiceFree), NULL));
3022 goto end;
3023 error:
3025 end:
3026 OT_CLEANUP_CALLABLE(callback)
3028}
3029
3031static OT_ProcRet NS(MqContextC_ServiceDelete) (MqContextC_ARGS) {
3034 MQ_TOK token = 0;
3039 goto end;
3040 error:
3042 end:
3044}
3045
3047static OT_ProcRet NS(MqContextC_ServiceIsTransaction) (MqContextC_ARGS) {
3052 goto end;
3053 error:
3055 end:
3057}
3058
3060static OT_ProcRet NS(MqContextC_ServiceProxy) (MqContextC_ARGS) {
3063 MQ_TOK token = 0;
3068 MkErrorC_Check(hdl,MqServiceProxy (hdl, token, id));
3070 goto end;
3071 error:
3073 end:
3075}
3076
3078static OT_ProcRet NS(MqContextC_ServiceProxyCtx) (MqContextC_ARGS) {
3081 MQ_TOK token = 0;
3083 MQ_CTX target = 0;
3086 MkErrorC_Check(hdl,MqServiceProxyCtx (hdl, token, target));
3088 goto end;
3089 error:
3091 end:
3093}
3094
3096static OT_ProcRet NS(MqContextC_ServiceProxyCtxExists) (MqContextC_ARGS) {
3099 MQ_TOK token = 0;
3101 MQ_CTX target = 0;
3105 goto end;
3106 error:
3108 end:
3110}
3111
3113static OT_ProcRet NS(MqContextC_ServiceProxyRoundRobin) (MqContextC_ARGS) {
3116 MQ_TOK token = 0;
3118 MK_STRN ident = 0;
3123 goto end;
3124 error:
3126 end:
3128}
3129
3131static OT_ProcRet NS(MqContextC_ServiceStorage) (MqContextC_ARGS) {
3134 MQ_TOK token = 0;
3139 goto end;
3140 error:
3142 end:
3144}
3145
3147static OT_ProcRet NS(MqContextC_ServiceTokenCheck) (MqContextC_ARGS) {
3150 MQ_TOK token = 0;
3154 goto end;
3155 error:
3157 end:
3159}
3160
3162static OT_ProcRet NS(MqContextC_ServiceTokenExists) (MqContextC_ARGS) {
3165 MQ_TOK token = 0;
3169 goto end;
3170 error:
3172 end:
3174}
3175
3177static OT_ProcRet NS(MqContextC_ServiceTokenGet) (MqContextC_ARGS) {
3182 goto end;
3183 error:
3185 end:
3187}
3188
3190// MqContextC_ServiceApi_Service_PY_API
3191
3195
3196// doc-key: MqContextC,MqContextC-SlaveApi-Slave,oc_
3197
3199static OT_ProcRet NS(MqContextC_SlaveGetMaster) (MqContextC_ARGS) {
3203 MQ_CTX retVal = MqSlaveGetMaster (hdl);
3204 OT_retObj_SET_CTX(retVal);
3205 goto end;
3206 error:
3208 end:
3210}
3211
3212// doc-key: MqContextC,MqContextC-SlaveApi-Slave,oco
3213
3215static OT_ProcRet NS(MqContextC_SlaveGet) (MqContextC_ARGS) {
3218 MQ_SLAVE_ID id = 0;
3221 MQ_CTX ctx_out;
3222 MkErrorC_Check(hdl,MqSlaveGet (hdl, id, &ctx_out));
3223 OT_retObj_SET_CTX(ctx_out);
3224 goto end;
3225 error:
3227 end:
3229}
3230
3232static OT_ProcRet NS(MqContextC_SlaveGetFilter) (MqContextC_ARGS) {
3236 MQ_CTX ctx_out;
3237 MkErrorC_Check(hdl,MqSlaveGetFilter (hdl, &ctx_out));
3238 OT_retObj_SET_CTX(ctx_out);
3239 goto end;
3240 error:
3242 end:
3244}
3245
3247static OT_ProcRet NS(MqContextC_SlaveGetProxy) (MqContextC_ARGS) {
3250 MQ_SLAVE_ID id = 0;
3253 MQ_CTX ctx_out;
3254 MkErrorC_Check(hdl,MqSlaveGetProxy (hdl, id, &ctx_out));
3255 OT_retObj_SET_CTX(ctx_out);
3256 goto end;
3257 error:
3259 end:
3261}
3262
3263// doc-key: MqContextC,MqContextC-SlaveApi-Slave,om_
3264
3266static OT_ProcRet NS(MqContextC_SlaveCheck) (MqContextC_ARGS) {
3269 MQ_SLAVE_ID id = 0;
3273 goto end;
3274 error:
3276 end:
3278}
3279
3281static OT_ProcRet NS(MqContextC_SlaveCreate) (MqContextC_ARGS) {
3284 MQ_SLAVE_ID id = 0;
3286 MQ_CTX slave = 0;
3289 MkErrorC_Check(hdl,MqSlaveCreate (hdl, id, slave));
3291 goto end;
3292 error:
3294 end:
3296}
3297
3299static OT_ProcRet NS(MqContextC_SlaveDelete) (MqContextC_ARGS) {
3302 MQ_SLAVE_ID id = 0;
3305 MkErrorC_Check(hdl,MqSlaveDelete (hdl, id));
3307 goto end;
3308 error:
3310 end:
3312}
3313
3315static OT_ProcRet NS(MqContextC_SlaveIs) (MqContextC_ARGS) {
3320 goto end;
3321 error:
3323 end:
3325}
3326
3328static OT_ProcRet NS(MqContextC_SlaveWorker) (MqContextC_ARGS) {
3331 MQ_SLAVE_ID id = 0;
3333 MK_STRN fct = "WORKER";
3335 MkBufferListCreateTLS_T(args,10);
3338 MkErrorC_Check(hdl,MqSlaveWorker (hdl, id, fct, args));
3340 goto end;
3341 error:
3343 end:
3345}
3346
3348// MqContextC_SlaveApi_Slave_PY_API
3349
3353
3354// doc-key: MqContextC,MqContextC-StorageApi-Storage,oci
3355
3357static OT_ProcRet NS(MqContextC_StorageDelete) (MqContextC_ARGS) {
3360 MQ_LTR transLIdP_inout = 0;
3361 OT_CHECK_OPTIONAL(OT_CHECK_NI4 (transLIdP_inout))
3363 MkErrorC_Check(hdl,MqStorageDelete (hdl, &transLIdP_inout));
3364 OT_retObj_SET_I32(transLIdP_inout);
3365 goto end;
3366 error:
3368 end:
3370}
3371
3373static OT_ProcRet NS(MqContextC_StorageImport) (MqContextC_ARGS) {
3376 MQ_LTR transLIdP_inout = 0;
3377 OT_CHECK_OPTIONAL(OT_CHECK_NI4 (transLIdP_inout))
3379 MkErrorC_Check(hdl,MqStorageImport (hdl, &transLIdP_inout));
3380 OT_retObj_SET_I32(transLIdP_inout);
3381 goto end;
3382 error:
3384 end:
3386}
3387
3388// doc-key: MqContextC,MqContextC-StorageApi-Storage,om_
3389
3391static OT_ProcRet NS(MqContextC_StorageClose) (MqContextC_ARGS) {
3395 MkErrorC_Check(hdl,MqStorageClose (hdl));
3397 goto end;
3398 error:
3400 end:
3402}
3403
3405static OT_ProcRet NS(MqContextC_StorageDecrRef) (MqContextC_ARGS) {
3408 MQ_LTR transLId = 0;
3411 MkErrorC_Check(hdl,MqStorageDecrRef (hdl, transLId));
3413 goto end;
3414 error:
3416 end:
3418}
3419
3421static OT_ProcRet NS(MqContextC_StorageIncrRef) (MqContextC_ARGS) {
3424 MQ_LTR transLId = 0;
3427 MkErrorC_Check(hdl,MqStorageIncrRef (hdl, transLId));
3429 goto end;
3430 error:
3432 end:
3434}
3435
3437static OT_ProcRet NS(MqContextC_StorageLog) (MqContextC_ARGS) {
3440 MK_STRN callfunc = NULL;
3443 if (MkSysStringIsNULL(callfunc)) {callfunc = OT_GET_CALL_PROC;}
3444 MkErrorC_Check(hdl,MqStorageLog (hdl, callfunc));
3446 goto end;
3447 error:
3449 end:
3452}
3453
3455static OT_ProcRet NS(MqContextC_StorageOpen) (MqContextC_ARGS) {
3458 MK_STRN storageFile = 0;
3459 OT_CHECK_REQUIRED(OT_CHECK_STRN (storageFile))
3461 MkErrorC_Check(hdl,MqStorageOpen (hdl, storageFile));
3463 goto end;
3464 error:
3466 end:
3468}
3469
3470// doc-key: MqContextC,MqContextC-StorageApi-Storage,omo
3471
3473static OT_ProcRet NS(MqContextC_StorageCount) (MqContextC_ARGS) {
3477 MQ_LTR cnt_out;
3478 MkErrorC_Check(hdl,MqStorageCount (hdl, &cnt_out));
3479 OT_retObj_SET_I32(cnt_out);
3480 goto end;
3481 error:
3483 end:
3485}
3486
3488static OT_ProcRet NS(MqContextC_StorageErrCnt) (MqContextC_ARGS) {
3491 MQ_LTR transLId = 0;
3494 MK_I32 cnt_out;
3495 MkErrorC_Check(hdl,MqStorageErrCnt (hdl, transLId, &cnt_out));
3496 OT_retObj_SET_I32(cnt_out);
3497 goto end;
3498 error:
3500 end:
3502}
3503
3505static OT_ProcRet NS(MqContextC_StorageExport) (MqContextC_ARGS) {
3509 MQ_LTR ltid_out;
3510 MkErrorC_Check(hdl,MqStorageExport (hdl, &ltid_out));
3511 OT_retObj_SET_I32(ltid_out);
3512 goto end;
3513 error:
3515 end:
3517}
3518
3520static OT_ProcRet NS(MqContextC_StorageResolve) (MqContextC_ARGS) {
3524 MQ_CTX otherCtxP_out;
3525 MQ_LTR otherLIdP_out;
3526 MkErrorC_Check(hdl,MqStorageResolve (hdl, &otherCtxP_out, &otherLIdP_out));
3528 OT_retObj_APPEND(OT_TMP_CTX_OBJ(otherCtxP_out));
3529 OT_retObj_APPEND(OT_TMP_I32_OBJ(otherLIdP_out));
3530 goto end;
3531 error:
3533 end:
3535}
3536
3538// MqContextC_StorageApi_Storage_PY_API
3539
3543
3544// doc-key: MqContextC,MqContextC-TOR,sCc
3545
3547static OT_ProcRet NS(MqContextC_Create) (OtClass_ARGS) {
3550 MQ_CTX tmpl = NULL;
3553 MQ_CTX retVal = MqContextCreate (MqContextCTT, tmpl);
3554 if (retVal == NULL) {
3555 OT_ERROR_CONSTRUCTOR(MqContextC);
3556 goto error;
3557 }
3558 OT_CONSTRUCTOR_POST(retVal)
3559 OT_retObj_SET_CTX(retVal);
3560 goto end;
3561 error:
3563 end:
3565}
3566
3568static OT_ProcRet NS(MqContextC_new) (CONSTR_ARGS) {
3571 MQ_CTX tmpl = NULL;
3573 MQ_CTX retVal = MqContextCreate (MqContextCTT, tmpl);
3574 if (retVal == NULL) {
3575 OT_ERROR_CONSTRUCTOR(MqContextC);
3576 goto error;
3577 }
3578 OT_CONSTRUCTOR_POST(retVal)
3579 OT_retObj_CONSTR(retVal);
3580 goto end;
3581 error:
3583 end:
3585}
3586
3588// MqContextC_TOR_PY_API
3589
3590// END-MqContextC - created by 'py_MqC.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
3591
3592// vim: Marker(o)
3598
3599static PyMethodDef NS(MqContextC_Methods)[] = {
3600
3601 { "Debug", (PyCFunction) NS(MqContextC_Debug), METH_VARARGS, "debugging…" },
3602 { "Debug2", (PyCFunction) NS(MqContextC_Debug2), METH_VARARGS, "debugging…" },
3603 { "ReadLIST", (PyCFunction) NS(MqContextC_ReadLIST), METH_NOARGS, "read entire list…" },
3604
3605 // BEGIN-CLASS - created by 'py_MqS.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
3606
3607 // doc-key: MqContextC,MqContext,sCc
3608 { "Create" , (PyCFunction) NS(MqContextC_Create) , METH_VARARGS|METH_CLASS , Create_doc },
3609
3610 // doc-key: MqContextC,MqContext,sc_
3611 { "GetNull" , (PyCFunction) NS(MqContextC_GetNull) , METH_NOARGS|METH_CLASS , GetNull_doc },
3612 { "HandleResolve" , (PyCFunction) NS(MqContextC_HandleResolve) , METH_O|METH_CLASS , HandleResolve_doc },
3613 { "Instances" , (PyCFunction) NS(MqContextC_Instances) , METH_NOARGS|METH_CLASS , Instances_doc },
3614
3615 // END-CLASS - created by 'py_MqS.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
3616
3617 // BEGIN-OBJ - created by 'py_MqS.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
3618
3619 // doc-key: MqContextC,MqClass,oc_
3620 { "ClassFactoryGet" , (PyCFunction) NS(MqContextC_ClassFactoryGet) , METH_NOARGS , ClassFactoryGet_doc },
3621
3622 // doc-key: MqContextC,MqClass,om_
3623 { "ClassFactorySet" , (PyCFunction) NS(MqContextC_ClassFactorySet) , METH_O , ClassFactorySet_doc },
3624 { "ClassIdentGet" , (PyCFunction) NS(MqContextC_ClassIdentGet) , METH_NOARGS , ClassIdentGet_doc },
3625 { "ClassIdentSet" , (PyCFunction) NS(MqContextC_ClassIdentSet) , METH_O , ClassIdentSet_doc },
3626 { "ClassOriginalIdentGet" , (PyCFunction) NS(MqContextC_ClassOriginalIdentGet) , METH_NOARGS , ClassOriginalIdentGet_doc },
3627
3628 // doc-key: MqContextC,MqConfig,oco
3629 { "ConfigGetIoTcpL" , (PyCFunction) NS(MqContextC_ConfigGetIoTcpL) , METH_NOARGS , ConfigGetIoTcpL_doc },
3630
3631 // doc-key: MqContextC,MqConfig,om_
3632 { "ConfigCheckStartAs" , (PyCFunction) NS(MqContextC_ConfigCheckStartAs) , METH_O , ConfigCheckStartAs_doc },
3633 { "ConfigGetBuffersize" , (PyCFunction) NS(MqContextC_ConfigGetBuffersize) , METH_NOARGS , ConfigGetBuffersize_doc },
3634 { "ConfigGetIdentFrom" , (PyCFunction) NS(MqContextC_ConfigGetIdentFrom) , METH_NOARGS , ConfigGetIdentFrom_doc },
3635 { "ConfigGetIoPipe" , (PyCFunction) NS(MqContextC_ConfigGetIoPipe) , METH_NOARGS , ConfigGetIoPipe_doc },
3636 { "ConfigGetIoUds" , (PyCFunction) NS(MqContextC_ConfigGetIoUds) , METH_NOARGS , ConfigGetIoUds_doc },
3637 { "ConfigGetIsParent" , (PyCFunction) NS(MqContextC_ConfigGetIsParent) , METH_NOARGS , ConfigGetIsParent_doc },
3638 { "ConfigGetIsServer" , (PyCFunction) NS(MqContextC_ConfigGetIsServer) , METH_NOARGS , ConfigGetIsServer_doc },
3639 { "ConfigGetIsString" , (PyCFunction) NS(MqContextC_ConfigGetIsString) , METH_NOARGS , ConfigGetIsString_doc },
3640 { "ConfigGetName" , (PyCFunction) NS(MqContextC_ConfigGetName) , METH_NOARGS , ConfigGetName_doc },
3641 { "ConfigGetPkgsize" , (PyCFunction) NS(MqContextC_ConfigGetPkgsize) , METH_NOARGS , ConfigGetPkgsize_doc },
3642 { "ConfigGetPostfix" , (PyCFunction) NS(MqContextC_ConfigGetPostfix) , METH_NOARGS , ConfigGetPostfix_doc },
3643 { "ConfigGetPrefix" , (PyCFunction) NS(MqContextC_ConfigGetPrefix) , METH_NOARGS , ConfigGetPrefix_doc },
3644 { "ConfigGetStartAs" , (PyCFunction) NS(MqContextC_ConfigGetStartAs) , METH_NOARGS , ConfigGetStartAs_doc },
3645 { "ConfigGetStatusIs" , (PyCFunction) NS(MqContextC_ConfigGetStatusIs) , METH_NOARGS , ConfigGetStatusIs_doc },
3646 { "ConfigGetStorage" , (PyCFunction) NS(MqContextC_ConfigGetStorage) , METH_NOARGS , ConfigGetStorage_doc },
3647 { "ConfigGetTimeout" , (PyCFunction) NS(MqContextC_ConfigGetTimeout) , METH_NOARGS , ConfigGetTimeout_doc },
3648 { "ConfigReset" , (PyCFunction) NS(MqContextC_ConfigReset) , METH_NOARGS , ConfigReset_doc },
3649 { "ConfigSetAllDebug" , (PyCFunction) NS(MqContextC_ConfigSetAllDebug) , METH_O , ConfigSetAllDebug_doc },
3650 { "ConfigSetBgError" , (PyCFunction) NS(MqContextC_ConfigSetBgError) , METH_VARARGS , ConfigSetBgError_doc },
3651 { "ConfigSetBuffersize" , (PyCFunction) NS(MqContextC_ConfigSetBuffersize) , METH_O , ConfigSetBuffersize_doc },
3652 { "ConfigSetConfigFile" , (PyCFunction) NS(MqContextC_ConfigSetConfigFile) , METH_O , ConfigSetConfigFile_doc },
3653 { "ConfigSetDaemon" , (PyCFunction) NS(MqContextC_ConfigSetDaemon) , METH_O , ConfigSetDaemon_doc },
3654 { "ConfigSetEvent" , (PyCFunction) NS(MqContextC_ConfigSetEvent) , METH_VARARGS , ConfigSetEvent_doc },
3655 { "ConfigSetIdentFrom" , (PyCFunction) NS(MqContextC_ConfigSetIdentFrom) , METH_O , ConfigSetIdentFrom_doc },
3656 { "ConfigSetIgnoreExit" , (PyCFunction) NS(MqContextC_ConfigSetIgnoreExit) , METH_O , ConfigSetIgnoreExit_doc },
3657 { "ConfigSetIoPipe" , (PyCFunction) NS(MqContextC_ConfigSetIoPipe) , METH_O , ConfigSetIoPipe_doc },
3658 { "ConfigSetIoTcp" , (PyCFunction) NS(MqContextC_ConfigSetIoTcp) , METH_VARARGS , ConfigSetIoTcp_doc },
3659 { "ConfigSetIoTcpL" , (PyCFunction) NS(MqContextC_ConfigSetIoTcpL) , METH_O , ConfigSetIoTcpL_doc },
3660 { "ConfigSetIoUds" , (PyCFunction) NS(MqContextC_ConfigSetIoUds) , METH_O , ConfigSetIoUds_doc },
3661 { "ConfigSetIsServer" , (PyCFunction) NS(MqContextC_ConfigSetIsServer) , METH_O , ConfigSetIsServer_doc },
3662 { "ConfigSetIsString" , (PyCFunction) NS(MqContextC_ConfigSetIsString) , METH_O , ConfigSetIsString_doc },
3663 { "ConfigSetName" , (PyCFunction) NS(MqContextC_ConfigSetName) , METH_O , ConfigSetName_doc },
3664 { "ConfigSetPkgsize" , (PyCFunction) NS(MqContextC_ConfigSetPkgsize) , METH_O , ConfigSetPkgsize_doc },
3665 { "ConfigSetPostfix" , (PyCFunction) NS(MqContextC_ConfigSetPostfix) , METH_O , ConfigSetPostfix_doc },
3666 { "ConfigSetPrefix" , (PyCFunction) NS(MqContextC_ConfigSetPrefix) , METH_O , ConfigSetPrefix_doc },
3667 { "ConfigSetServerCleanup" , (PyCFunction) NS(MqContextC_ConfigSetServerCleanup) , METH_VARARGS , ConfigSetServerCleanup_doc },
3668 { "ConfigSetServerSetup" , (PyCFunction) NS(MqContextC_ConfigSetServerSetup) , METH_VARARGS , ConfigSetServerSetup_doc },
3669 { "ConfigSetStartAs" , (PyCFunction) NS(MqContextC_ConfigSetStartAs) , METH_O , ConfigSetStartAs_doc },
3670 { "ConfigSetStartAsString" , (PyCFunction) NS(MqContextC_ConfigSetStartAsString) , METH_O , ConfigSetStartAsString_doc },
3671 { "ConfigSetStorage" , (PyCFunction) NS(MqContextC_ConfigSetStorage) , METH_O , ConfigSetStorage_doc },
3672 { "ConfigSetTimeout" , (PyCFunction) NS(MqContextC_ConfigSetTimeout) , METH_O , ConfigSetTimeout_doc },
3673
3674 // doc-key: MqContextC,MqConfig,omo
3675 { "ConfigGetIoTcp" , (PyCFunction) NS(MqContextC_ConfigGetIoTcp) , METH_NOARGS , ConfigGetIoTcp_doc },
3676
3677 // doc-key: MqContextC,MqContext,oc_
3678 { "ErrorFORMAT" , (PyCFunction) NS(MqContextC_ErrorFORMAT) , METH_NOARGS , ErrorFORMAT_doc },
3679 { "GetBuffer" , (PyCFunction) NS(MqContextC_GetBuffer) , METH_NOARGS , GetBuffer_doc },
3680 { "Next" , (PyCFunction) NS(MqContextC_Next) , METH_NOARGS , Next_doc },
3681 { "Prev" , (PyCFunction) NS(MqContextC_Prev) , METH_NOARGS , Prev_doc },
3682
3683 // doc-key: MqContextC,MqContext,om_
3684 { "ErrorCopy" , (PyCFunction) NS(MqContextC_ErrorCopy) , METH_O , ErrorCopy_doc },
3685 { "ErrorMove" , (PyCFunction) NS(MqContextC_ErrorMove) , METH_O , ErrorMove_doc },
3686 // skip class-overload: MqContextHandleGet → HandleGet, NS(MqContextC_HandleGet)
3687 // skip class-overload: MqContextLog → Log, NS(MqContextC_Log)
3688 { "LogConfig" , (PyCFunction) NS(MqContextC_LogConfig) , METH_VARARGS , LogConfig_doc },
3689 { "LogEnv" , (PyCFunction) NS(MqContextC_LogEnv) , METH_VARARGS , LogEnv_doc },
3690 { "LogLink" , (PyCFunction) NS(MqContextC_LogLink) , METH_VARARGS , LogLink_doc },
3691 { "LogSetup" , (PyCFunction) NS(MqContextC_LogSetup) , METH_VARARGS , LogSetup_doc },
3692 { "LogShort" , (PyCFunction) NS(MqContextC_LogShort) , METH_VARARGS , LogShort_doc },
3693 { "LogType" , (PyCFunction) NS(MqContextC_LogType) , METH_VARARGS , LogType_doc },
3694 // skip class-overload: MqContextToString → ToString, NS(MqContextC_ToString)
3695
3696 // doc-key: MqContextC,MqEnv,om_
3697 { "EnvProtect" , (PyCFunction) NS(MqContextC_EnvProtect) , METH_NOARGS , EnvProtect_doc },
3698 { "EnvRestore" , (PyCFunction) NS(MqContextC_EnvRestore) , METH_NOARGS , EnvRestore_doc },
3699
3700 // doc-key: MqContextC,MqExit,om_
3701 { "Exit" , (PyCFunction) NS(MqContextC_Exit) , METH_VARARGS , Exit_doc },
3702
3703 // doc-key: MqContextC,MqGet,oc_
3704 { "GetRoot" , (PyCFunction) NS(MqContextC_GetRoot) , METH_NOARGS , GetRoot_doc },
3705
3706 // doc-key: MqContextC,MqLink,oc_
3707 { "LinkGetParent" , (PyCFunction) NS(MqContextC_LinkGetParent) , METH_NOARGS , LinkGetParent_doc },
3708
3709 // doc-key: MqContextC,MqLink,om_
3710 { "LinkConnect" , (PyCFunction) NS(MqContextC_LinkConnect) , METH_NOARGS , LinkConnect_doc },
3711 { "LinkCreate" , (PyCFunction) NS(MqContextC_LinkCreate) , METH_VARARGS , LinkCreate_doc },
3712 { "LinkCreateChild" , (PyCFunction) NS(MqContextC_LinkCreateChild) , METH_VARARGS , LinkCreateChild_doc },
3713 { "LinkDelete" , (PyCFunction) NS(MqContextC_LinkDelete) , METH_NOARGS , LinkDelete_doc },
3714 { "LinkGetCtxId" , (PyCFunction) NS(MqContextC_LinkGetCtxId) , METH_NOARGS , LinkGetCtxId_doc },
3715 { "LinkGetTargetIdent" , (PyCFunction) NS(MqContextC_LinkGetTargetIdent) , METH_NOARGS , LinkGetTargetIdent_doc },
3716 { "LinkIsConnected" , (PyCFunction) NS(MqContextC_LinkIsConnected) , METH_NOARGS , LinkIsConnected_doc },
3717 { "LinkIsParent" , (PyCFunction) NS(MqContextC_LinkIsParent) , METH_NOARGS , LinkIsParent_doc },
3718 { "LinkShutdown" , (PyCFunction) NS(MqContextC_LinkShutdown) , METH_NOARGS , LinkShutdown_doc },
3719
3720 // doc-key: MqContextC,MqLog,om_
3721 { "LogParentOrChild" , (PyCFunction) NS(MqContextC_LogParentOrChild) , METH_NOARGS , LogParentOrChild_doc },
3722 { "LogServerOrClient" , (PyCFunction) NS(MqContextC_LogServerOrClient) , METH_NOARGS , LogServerOrClient_doc },
3723
3724 // doc-key: MqContextC,MqProcess,om_
3725 { "ProcessEvent" , (PyCFunction) NS(MqContextC_ProcessEvent) , METH_VARARGS , ProcessEvent_doc },
3726
3727 // doc-key: MqContextC,MqProxy,om_
3728 { "ProxyForward" , (PyCFunction) NS(MqContextC_ProxyForward) , METH_VARARGS , ProxyForward_doc },
3729 { "ProxyItem" , (PyCFunction) NS(MqContextC_ProxyItem) , METH_O , ProxyItem_doc },
3730
3731 // doc-key: MqContextC,MqRead,oci
3732 { "ReadALL" , (PyCFunction) NS(MqContextC_ReadALL) , METH_VARARGS , ReadALL_doc },
3733
3734 // doc-key: MqContextC,MqRead,oco
3735 { "ReadBFL" , (PyCFunction) NS(MqContextC_ReadBFL) , METH_NOARGS , ReadBFL_doc },
3736 { "ReadBUF" , (PyCFunction) NS(MqContextC_ReadBUF) , METH_NOARGS , ReadBUF_doc },
3737
3738 // doc-key: MqContextC,MqRead,om_
3739 { "ReadDbg" , (PyCFunction) NS(MqContextC_ReadDbg) , METH_NOARGS , ReadDbg_doc },
3740 { "ReadGetNextType" , (PyCFunction) NS(MqContextC_ReadGetNextType) , METH_NOARGS , ReadGetNextType_doc },
3741 { "ReadGetNumItems" , (PyCFunction) NS(MqContextC_ReadGetNumItems) , METH_NOARGS , ReadGetNumItems_doc },
3742 { "ReadItemExists" , (PyCFunction) NS(MqContextC_ReadItemExists) , METH_NOARGS , ReadItemExists_doc },
3743 { "ReadL_END" , (PyCFunction) NS(MqContextC_ReadL_END) , METH_NOARGS , ReadL_END_doc },
3744 { "ReadL_START" , (PyCFunction) NS(MqContextC_ReadL_START) , METH_VARARGS , ReadL_START_doc },
3745 { "ReadT_END" , (PyCFunction) NS(MqContextC_ReadT_END) , METH_NOARGS , ReadT_END_doc },
3746 { "ReadT_START" , (PyCFunction) NS(MqContextC_ReadT_START) , METH_NOARGS , ReadT_START_doc },
3747 { "ReadUndo" , (PyCFunction) NS(MqContextC_ReadUndo) , METH_NOARGS , ReadUndo_doc },
3748
3749 // doc-key: MqContextC,MqRead,omo
3750 { "ReadBIN" , (PyCFunction) NS(MqContextC_ReadBIN) , METH_NOARGS , ReadBIN_doc },
3751 { "ReadBOL" , (PyCFunction) NS(MqContextC_ReadBOL) , METH_NOARGS , ReadBOL_doc },
3752 { "ReadBinaryR" , (PyCFunction) NS(MqContextC_ReadBinaryR) , METH_NOARGS , ReadBinaryR_doc },
3753 { "ReadDBL" , (PyCFunction) NS(MqContextC_ReadDBL) , METH_NOARGS , ReadDBL_doc },
3754 { "ReadFLT" , (PyCFunction) NS(MqContextC_ReadFLT) , METH_NOARGS , ReadFLT_doc },
3755 { "ReadHDL" , (PyCFunction) NS(MqContextC_ReadHDL) , METH_NOARGS , ReadHDL_doc },
3756 { "ReadI16" , (PyCFunction) NS(MqContextC_ReadI16) , METH_NOARGS , ReadI16_doc },
3757 { "ReadI32" , (PyCFunction) NS(MqContextC_ReadI32) , METH_NOARGS , ReadI32_doc },
3758 { "ReadI64" , (PyCFunction) NS(MqContextC_ReadI64) , METH_NOARGS , ReadI64_doc },
3759 { "ReadI8" , (PyCFunction) NS(MqContextC_ReadI8) , METH_NOARGS , ReadI8_doc },
3760 { "ReadLIST" , (PyCFunction) NS(MqContextC_ReadLIST) , METH_NOARGS , ReadLIST_doc },
3761 { "ReadLONG" , (PyCFunction) NS(MqContextC_ReadLONG) , METH_NOARGS , ReadLONG_doc },
3762 { "ReadNEXT" , (PyCFunction) NS(MqContextC_ReadNEXT) , METH_NOARGS , ReadNEXT_doc },
3763 { "ReadSTR" , (PyCFunction) NS(MqContextC_ReadSTR) , METH_NOARGS , ReadSTR_doc },
3764 { "ReadStringR" , (PyCFunction) NS(MqContextC_ReadStringR) , METH_NOARGS , ReadStringR_doc },
3765
3766 // doc-key: MqContextC,MqRoute,oco
3767 { "RouteGetTree" , (PyCFunction) NS(MqContextC_RouteGetTree) , METH_NOARGS , RouteGetTree_doc },
3768
3769 // doc-key: MqContextC,MqRoute,om_
3770 { "RouteCreate" , (PyCFunction) NS(MqContextC_RouteCreate) , METH_VARARGS , RouteCreate_doc },
3771 { "RouteDelete" , (PyCFunction) NS(MqContextC_RouteDelete) , METH_VARARGS , RouteDelete_doc },
3772 { "RouteResolve" , (PyCFunction) NS(MqContextC_RouteResolve) , METH_VARARGS , RouteResolve_doc },
3773 { "RouteTraverse" , (PyCFunction) NS(MqContextC_RouteTraverse) , METH_VARARGS , RouteTraverse_doc },
3774
3775 // doc-key: MqContextC,MqRoute,omo
3776 { "RouteGetPath" , (PyCFunction) NS(MqContextC_RouteGetPath) , METH_NOARGS , RouteGetPath_doc },
3777
3778 // doc-key: MqContextC,MqSend,om_
3779 { "Send" , (PyCFunction) NS(MqContextC_Send) , METH_VARARGS , Send_doc },
3780 { "SendBFL" , (PyCFunction) NS(MqContextC_SendBFL) , METH_O , SendBFL_doc },
3781 { "SendBIN" , (PyCFunction) NS(MqContextC_SendBIN) , METH_O , SendBIN_doc },
3782 { "SendBOL" , (PyCFunction) NS(MqContextC_SendBOL) , METH_O , SendBOL_doc },
3783 { "SendBUF" , (PyCFunction) NS(MqContextC_SendBUF) , METH_O , SendBUF_doc },
3784 { "SendBUS_FLAT" , (PyCFunction) NS(MqContextC_SendBUS_FLAT) , METH_O , SendBUS_FLAT_doc },
3785 { "SendBinaryR" , (PyCFunction) NS(MqContextC_SendBinaryR) , METH_O , SendBinaryR_doc },
3786 { "SendDBL" , (PyCFunction) NS(MqContextC_SendDBL) , METH_O , SendDBL_doc },
3787 { "SendEND" , (PyCFunction) NS(MqContextC_SendEND) , METH_VARARGS , SendEND_doc },
3788 { "SendEND_AND_CALLBACK" , (PyCFunction) NS(MqContextC_SendEND_AND_CALLBACK) , METH_VARARGS , SendEND_AND_CALLBACK_doc },
3789 { "SendEND_AND_SUB" , (PyCFunction) NS(MqContextC_SendEND_AND_SUB) , METH_VARARGS , SendEND_AND_SUB_doc },
3790 { "SendEND_AND_TRANSACTION" , (PyCFunction) NS(MqContextC_SendEND_AND_TRANSACTION) , METH_VARARGS , SendEND_AND_TRANSACTION_doc },
3791 { "SendEND_AND_WAIT" , (PyCFunction) NS(MqContextC_SendEND_AND_WAIT) , METH_VARARGS , SendEND_AND_WAIT_doc },
3792 { "SendERROR" , (PyCFunction) NS(MqContextC_SendERROR) , METH_NOARGS , SendERROR_doc },
3793 { "SendFLT" , (PyCFunction) NS(MqContextC_SendFLT) , METH_O , SendFLT_doc },
3794 { "SendHDL" , (PyCFunction) NS(MqContextC_SendHDL) , METH_O , SendHDL_doc },
3795 { "SendI16" , (PyCFunction) NS(MqContextC_SendI16) , METH_O , SendI16_doc },
3796 { "SendI32" , (PyCFunction) NS(MqContextC_SendI32) , METH_O , SendI32_doc },
3797 { "SendI64" , (PyCFunction) NS(MqContextC_SendI64) , METH_O , SendI64_doc },
3798 { "SendI8" , (PyCFunction) NS(MqContextC_SendI8) , METH_O , SendI8_doc },
3799 { "SendLONG" , (PyCFunction) NS(MqContextC_SendLONG) , METH_O , SendLONG_doc },
3800 { "SendLTR" , (PyCFunction) NS(MqContextC_SendLTR) , METH_O , SendLTR_doc },
3801 { "SendL_END" , (PyCFunction) NS(MqContextC_SendL_END) , METH_NOARGS , SendL_END_doc },
3802 { "SendL_FLAT" , (PyCFunction) NS(MqContextC_SendL_FLAT) , METH_O , SendL_FLAT_doc },
3803 { "SendL_START" , (PyCFunction) NS(MqContextC_SendL_START) , METH_NOARGS , SendL_START_doc },
3804 { "SendRETURN" , (PyCFunction) NS(MqContextC_SendRETURN) , METH_NOARGS , SendRETURN_doc },
3805 { "SendRETURN_SUB" , (PyCFunction) NS(MqContextC_SendRETURN_SUB) , METH_NOARGS , SendRETURN_SUB_doc },
3806 { "SendSTART" , (PyCFunction) NS(MqContextC_SendSTART) , METH_NOARGS , SendSTART_doc },
3807 { "SendSTR" , (PyCFunction) NS(MqContextC_SendSTR) , METH_O , SendSTR_doc },
3808 { "SendSYNC" , (PyCFunction) NS(MqContextC_SendSYNC) , METH_NOARGS , SendSYNC_doc },
3809 { "SendStringR" , (PyCFunction) NS(MqContextC_SendStringR) , METH_O , SendStringR_doc },
3810 { "SendT_END" , (PyCFunction) NS(MqContextC_SendT_END) , METH_NOARGS , SendT_END_doc },
3811 { "SendT_START" , (PyCFunction) NS(MqContextC_SendT_START) , METH_NOARGS , SendT_START_doc },
3812
3813 // doc-key: MqContextC,MqService,om_
3814 { "ServiceCreate" , (PyCFunction) NS(MqContextC_ServiceCreate) , METH_VARARGS , ServiceCreate_doc },
3815 { "ServiceDelete" , (PyCFunction) NS(MqContextC_ServiceDelete) , METH_O , ServiceDelete_doc },
3816 { "ServiceIsTransaction" , (PyCFunction) NS(MqContextC_ServiceIsTransaction) , METH_NOARGS , ServiceIsTransaction_doc },
3817 { "ServiceProxy" , (PyCFunction) NS(MqContextC_ServiceProxy) , METH_VARARGS , ServiceProxy_doc },
3818 { "ServiceProxyCtx" , (PyCFunction) NS(MqContextC_ServiceProxyCtx) , METH_VARARGS , ServiceProxyCtx_doc },
3819 { "ServiceProxyCtxExists" , (PyCFunction) NS(MqContextC_ServiceProxyCtxExists) , METH_VARARGS , ServiceProxyCtxExists_doc },
3820 { "ServiceProxyRoundRobin" , (PyCFunction) NS(MqContextC_ServiceProxyRoundRobin) , METH_VARARGS , ServiceProxyRoundRobin_doc },
3821 { "ServiceStorage" , (PyCFunction) NS(MqContextC_ServiceStorage) , METH_O , ServiceStorage_doc },
3822 { "ServiceTokenCheck" , (PyCFunction) NS(MqContextC_ServiceTokenCheck) , METH_O , ServiceTokenCheck_doc },
3823 { "ServiceTokenExists" , (PyCFunction) NS(MqContextC_ServiceTokenExists) , METH_O , ServiceTokenExists_doc },
3824 { "ServiceTokenGet" , (PyCFunction) NS(MqContextC_ServiceTokenGet) , METH_NOARGS , ServiceTokenGet_doc },
3825
3826 // doc-key: MqContextC,MqSlave,oc_
3827 { "SlaveGetMaster" , (PyCFunction) NS(MqContextC_SlaveGetMaster) , METH_NOARGS , SlaveGetMaster_doc },
3828
3829 // doc-key: MqContextC,MqSlave,oco
3830 { "SlaveGet" , (PyCFunction) NS(MqContextC_SlaveGet) , METH_O , SlaveGet_doc },
3831 { "SlaveGetFilter" , (PyCFunction) NS(MqContextC_SlaveGetFilter) , METH_NOARGS , SlaveGetFilter_doc },
3832 { "SlaveGetProxy" , (PyCFunction) NS(MqContextC_SlaveGetProxy) , METH_O , SlaveGetProxy_doc },
3833
3834 // doc-key: MqContextC,MqSlave,om_
3835 { "SlaveCheck" , (PyCFunction) NS(MqContextC_SlaveCheck) , METH_O , SlaveCheck_doc },
3836 { "SlaveCreate" , (PyCFunction) NS(MqContextC_SlaveCreate) , METH_VARARGS , SlaveCreate_doc },
3837 { "SlaveDelete" , (PyCFunction) NS(MqContextC_SlaveDelete) , METH_O , SlaveDelete_doc },
3838 { "SlaveIs" , (PyCFunction) NS(MqContextC_SlaveIs) , METH_NOARGS , SlaveIs_doc },
3839 { "SlaveWorker" , (PyCFunction) NS(MqContextC_SlaveWorker) , METH_VARARGS , SlaveWorker_doc },
3840
3841 // doc-key: MqContextC,MqStorage,oci
3842 { "StorageDelete" , (PyCFunction) NS(MqContextC_StorageDelete) , METH_VARARGS , StorageDelete_doc },
3843 { "StorageImport" , (PyCFunction) NS(MqContextC_StorageImport) , METH_VARARGS , StorageImport_doc },
3844
3845 // doc-key: MqContextC,MqStorage,om_
3846 { "StorageClose" , (PyCFunction) NS(MqContextC_StorageClose) , METH_NOARGS , StorageClose_doc },
3847 { "StorageDecrRef" , (PyCFunction) NS(MqContextC_StorageDecrRef) , METH_O , StorageDecrRef_doc },
3848 { "StorageIncrRef" , (PyCFunction) NS(MqContextC_StorageIncrRef) , METH_O , StorageIncrRef_doc },
3849 { "StorageLog" , (PyCFunction) NS(MqContextC_StorageLog) , METH_VARARGS , StorageLog_doc },
3850 { "StorageOpen" , (PyCFunction) NS(MqContextC_StorageOpen) , METH_O , StorageOpen_doc },
3851
3852 // doc-key: MqContextC,MqStorage,omo
3853 { "StorageCount" , (PyCFunction) NS(MqContextC_StorageCount) , METH_NOARGS , StorageCount_doc },
3854 { "StorageErrCnt" , (PyCFunction) NS(MqContextC_StorageErrCnt) , METH_O , StorageErrCnt_doc },
3855 { "StorageExport" , (PyCFunction) NS(MqContextC_StorageExport) , METH_NOARGS , StorageExport_doc },
3856 { "StorageResolve" , (PyCFunction) NS(MqContextC_StorageResolve) , METH_NOARGS , StorageResolve_doc },
3857
3858 // END-OBJ - created by 'py_MqS.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
3859
3860 {NULL, NULL, 0, NULL} /* Sentinel */
3861};
3862
3863MK_UNUSED static void NS(sParentBeforeFork)(MQ_CTX mqctx) {
3864 PyOS_BeforeFork();
3865}
3866
3867MK_UNUSED static void NS(sParentAfterFork)(MQ_CTX mqctx) {
3868 PyOS_AfterFork_Parent();
3869}
3870
3871MK_UNUSED static void NS(sChildAfterFork)(MQ_CTX mqctx) {
3872 PyOS_AfterFork_Child();
3873}
3874
3875// new objects are in "local-scope" at python… if an object was added with "SlaveCreate"
3876// the underlying "context" will disappear after leving the "local-scope"
3877static void NS(sIncrSelf)(MK_RT_ARGS MQ_CTX hdl, MK_PTR const env) {
3879 Py_INCREF(self);
3880}
3881
3882static void NS(sDecrSelf)(MK_RT_ARGS MQ_CTX hdl, MK_PTR const env) {
3883 OT_OBJ_T self = OT_SELF_X(hdl);
3884 Py_CLEAR(self);
3885}
3886
3887static int NS(sProcessExit) (MK_RT_ARGS int num) {
3888//MqDLogX(context,__func__,0,"self<%p>, refCount<%li>\n", context->obj.self, ((PyObject*)context->obj.self)->ob_refcnt);
3889 Py_Exit(num);
3890 return num;
3891}
3892
3893MK_UNUSED static int NS(sThreadExit) (MK_RT_ARGS int num) {
3894//MqDLogX(context,__func__,0,"self<%p>, refCount<%li>\n", context->obj.self, ((PyObject*)context->obj.self)->ob_refcnt);
3895
3896//mk_dbg_color_ln(MK_COLOR_RED,"%s, current state<%p>, rt state<%p>", "thread EXIT", PyThreadState_Get(), MK_RT_REF.mkThreadData);
3897
3898 Py_EndInterpreter(MK_RT_REF.mkThreadData.ptr);
3899
3900 MK_RT_REF.mkThreadData.ptr = NULL;
3901
3902 return num;
3903}
3904
3905static PyObject* NS(sMqContextC_Str) (MqContextC_Obj *self) {
3906 MkRtSetup_X(self->hdl);
3907 return STRN2VAL(MkSysPrintF("MqContextC[%s]", self->hdl ? MqConfigGetName(self->hdl) : NULL));
3908}
3909
3910static PyObject *NS(sMqContextC_Repr)(MqContextC_Obj* self)
3911{
3913 return PyUnicode_FromFormat("%s={nm:%s|sf:%p|rf:%i|cx:%p}",Py_TYPE(self)->tp_name,MqConfigGetName(hdl),self,Py_REFCNT(self)-1,hdl);
3914error:
3915 return NULL;
3916}
3917
3918#define MqContextC_Doc "The pymqmsgque project is an infrastructure to link software together to\n\
3919act like a single software. To link mean distributing work from one\n\
3920software to an other software an wait or not wait for an answer. The\n\
3921linking is done using unix or inet domain sockets and is based on\n\
3922packages send from one software to an other software and back. The\n\
3923pymqmsgque project is used to handle all the different aspects for setup\n\
3924and maintain the link and is responsible for:\n\
3925\n\
3926o starting and stopping the server application\n\
3927o starting and stopping the communication interface\n\
3928o sending and receiving package data\n\
3929o reading and writing data from or into a package\n\
3930o setup and maintain the event-handling for an asynchronous transfer\n\
3931o propagate the error messages from the server to the client"
3932
3938
3940 PyVarObject_HEAD_INIT(NULL, 0)
3941 .tp_name = "pymqmsgque.MqContextC",
3942 .tp_basicsize = sizeof(MqContextC_Obj),
3943 .tp_itemsize = 0,
3944 .tp_new = (newfunc) NS(MqContextC_new),
3945 .tp_doc = MqContextC_Doc,
3946 .tp_methods = NS(MqContextC_Methods),
3947 .tp_str = (reprfunc) NS(sMqContextC_Str),
3948 .tp_repr = (reprfunc) NS(sMqContextC_Repr),
3949 .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
3950 .tp_base = NULL
3951};
3952
3953int
3954NS(pMqContextC_Init)(MK_RT_ARGS OT_OBJ_T m) {
3956
3957 // define type
3958 MqContextCTT = MkTypeDup2(MqContextC_TT,"PyMqContextC");
3959 MqContextCT->fIncrSelf = NS(sIncrSelf);
3960 MqContextCT->fDecrSelf = NS(sDecrSelf);
3961// >> replaced by os_fork
3962// MqContextCT->fParentBeforeFork = NS(sParentBeforeFork);
3963// MqContextCT->fParentAfterFork = NS(sParentAfterFork);
3964// MqContextCT->fChildAfterFork = NS(sChildAfterFork);
3965 MqContextCT->MqProcessExitCB = NS(sProcessExit);
3966 MqContextCT->MqThreadExitCB = NS(sThreadExit);
3967 //MqContextCT->ignoreDisasterSetup = true;
3968 MqContextCT->ignoreThread = true;
3969
3970 ClassInit
3971
3972 return 0;
3973error:
3974 return -1;
3975}
3976
3977// vim: nowrap
#define OT_CHECK_NI1(val)
#define LngErrorCheckN(PROC)
#define OT_CHECK_bool(val)
#define OT_retObj_SET_I8(nat)
#define OT_SELF
#define MK(n)
#define OT_retObj_SET_FLT(nat)
#define OT_SETUP_VARARGS(min, max, d)
#define OT_retObj_SET_BOL(nat)
#define OT_SETUP_NOARG(d)
#define OT_SETUP_ONEARG(d)
#define OT_SETUP_OBJ(o, v)
#define OT_ERROR_LNG_RETURN
#define OT_CHECK_NI4(val)
#define OT_CHECK_NI8(val)
#define OT_retObj_SET_I16(nat)
#define OT_retObj_SET_Error
#define OT_CHECK_NF8(val)
#define OT_SELF_X(x)
#define OT_CONSTRUCTOR_POST(x)
#define OT_GET_CALL_LINE
#define OT_CHECK_NIL(val)
#define OT_FRAME_CLEANUP
#define OT_retObj_SET_BUF(nat)
#define OT_ERROR_CONSTRUCTOR(class)
#define OT_retObj_SET_DBL(nat)
#define OT_retObj_SET_I64(nat)
#define OT_retObj_SET_LONG(nat)
#define OT_retObj_SET_List
#define OT_retObj_SET_HDL(nat)
#define OT_CHECK_REQUIRED(val)
#define OT_retObj_SET_None
#define OT_retObj_SET_I32(nat)
#define OT_GET_CALL_FILE
PyTypeObject * OT_CLS_T
#define OT_CHECK_NF4(val)
#define OT_retObj_SET_BFL(nat)
#define OT_TMP_I32_OBJ(val)
#define OT_GET__ME_REF_MkBinaryR(b)
#define OT_SETUP_CONSTRUCTOR_ARGS(...)
#define OT_retObj_RETURN
#define OT_GET_CALL_PROC
#define OT_retObj_APPEND(var)
PyObject * OT_OBJ_T
#define OT_CHECK__ME_REF_MkStringR(val)
#define OT_CHECK__ME_REF_MkBinaryR(val)
#define OT_CHECK_NI2(val)
#define OT_retObj_SET_STR(nat)
#define OT_CHECK_NB1(val)
#define OT_CLASS_TYPE_REF
#define OT_NEW_Mk_enum_OBJ(typ, val)
#define OT_CHECK_OPTIONAL(val)
#define OT_TMP_STR_OBJ(val)
#define OT_retObj_SET_ERR(nat)
#define OT_retObj_SET(val)
#define OT_CHECK_NOARGS
#define MkErrorC_Check(mng, PROC)
#define OT_ProcRet
#define OT_GET__ME_REF_MkStringR(b)
#define CONSTR_ARGS
#define OtClass_ARGS
#define STRN2VAL(nat)
#define OT_CHECK_STRN(val)
tag: nhi1-release-250425
static MK_UNUSED int num
#define OT_SETUP_self
struct MqContextC_Obj MqContextC_Obj
#define OT_NEW_Mq_enum_OBJ(typ, val)
#define OT_retObj_SET_CTX(nat)
#define NS(n)
#define OT_retObj_SET_FCT(nat)
#define MqContextC_ARGS
#define OT_TMP_CTX_OBJ(val)
tag: nhi1-release-250425
tag: nhi1-release-250425
#define ConfigGetStartAs_doc
#define ServiceTokenGet_doc
#define Instances_doc
#define ConfigGetIoTcp_doc
#define MqContextCTT
#define ProxyItem_doc
#define ConfigGetName_doc
#define SlaveCreate_doc
#define LogShort_doc
#define RouteCreate_doc
#define ConfigSetIoPipe_doc
#define ReadBIN_doc
#define ReadBUF_doc
#define ConfigGetIsString_doc
#define SendT_START_doc
#define LogType_doc
#define SendLONG_doc
#define StorageDelete_doc
#define SendBinaryR_doc
#define ServiceProxy_doc
#define OT_SETUP_hdl_static_constr
#define ConfigSetIgnoreExit_doc
#define ConfigSetBgError_doc
#define SendEND_AND_WAIT_doc
#define ClassOriginalIdentGet_doc
#define StorageClose_doc
#define ServiceProxyRoundRobin_doc
#define ConfigCheckStartAs_doc
#define RouteDelete_doc
#define ConfigSetName_doc
#define StorageIncrRef_doc
#define ConfigSetIdentFrom_doc
#define ClassFactoryGet_doc
#define SlaveWorker_doc
#define SendSTART_doc
#define ReadUndo_doc
#define ProxyForward_doc
#define ReadBFL_doc
#define LinkDelete_doc
#define ConfigGetStatusIs_doc
#define SendL_END_doc
#define ConfigSetDaemon_doc
#define StorageDecrRef_doc
#define ConfigGetPrefix_doc
#define SlaveGetProxy_doc
#define ConfigSetAllDebug_doc
#define OT_SETUP_hdl
#define ReadI64_doc
#define LinkCreateChild_doc
#define ConfigSetBuffersize_doc
#define ServiceStorage_doc
#define GetBuffer_doc
#define GetRoot_doc
#define ConfigGetIdentFrom_doc
#define SendERROR_doc
#define ServiceTokenCheck_doc
#define OT_retObj_CONSTR(mng)
#define ReadI32_doc
#define SlaveGetFilter_doc
#define ReadGetNextType_doc
#define ErrorFORMAT_doc
#define ServiceDelete_doc
#define EnvProtect_doc
#define LogConfig_doc
#define ProcessEvent_doc
#define SendI32_doc
#define LinkConnect_doc
#define ConfigSetIsString_doc
#define StorageCount_doc
#define ConfigSetTimeout_doc
#define LogParentOrChild_doc
#define RouteResolve_doc
#define ConfigSetPrefix_doc
#define LogServerOrClient_doc
#define ConfigSetIoTcp_doc
#define ConfigGetStorage_doc
#define SendStringR_doc
#define StorageOpen_doc
#define LogSetup_doc
#define SendBFL_doc
#define ConfigSetServerCleanup_doc
#define ErrorCopy_doc
#define ConfigGetTimeout_doc
#define GetNull_doc
#define ReadT_END_doc
#define ConfigGetPkgsize_doc
#define SendI16_doc
#define ConfigSetIoUds_doc
#define ConfigSetIsServer_doc
#define LinkIsConnected_doc
#define Next_doc
#define RouteGetPath_doc
#define SlaveGet_doc
#define ConfigSetConfigFile_doc
#define SendL_FLAT_doc
#define ConfigSetServerSetup_doc
#define RouteTraverse_doc
#define ConfigSetStorage_doc
#define SendSTR_doc
#define Send_doc
#define ReadNEXT_doc
#define SendEND_AND_TRANSACTION_doc
#define ConfigGetBuffersize_doc
#define ConfigGetIoUds_doc
#define ReadDbg_doc
#define SendBUS_FLAT_doc
#define Create_doc
#define ReadGetNumItems_doc
#define ServiceTokenExists_doc
#define ServiceCreate_doc
#define HandleResolve_doc
#define SendI64_doc
#define StorageResolve_doc
#define ReadL_END_doc
#define StorageLog_doc
#define ServiceProxyCtx_doc
#define LogLink_doc
#define SendEND_doc
#define Prev_doc
#define ClassIdentSet_doc
#define ReadHDL_doc
#define SendHDL_doc
#define SendDBL_doc
#define ConfigSetStartAsString_doc
#define MqContextC_Doc
#define ConfigGetIsServer_doc
#define ReadFLT_doc
#define StorageImport_doc
#define SendRETURN_SUB_doc
#define OT_CLASS
#define OT_SETUP_hdl_static
#define SendRETURN_doc
#define OT_SETUP_hdl_constr
#define Exit_doc
#define SendLTR_doc
#define ReadALL_doc
#define ReadI8_doc
#define ReadBinaryR_doc
#define SendBIN_doc
#define EnvRestore_doc
#define ConfigGetIoPipe_doc
#define ReadLIST_doc
#define StorageErrCnt_doc
#define ClassIdentGet_doc
#define SendEND_AND_CALLBACK_doc
#define ConfigSetIoTcpL_doc
#define ReadDBL_doc
#define SendL_START_doc
#define RouteGetTree_doc
#define ConfigSetPkgsize_doc
#define ServiceProxyCtxExists_doc
#define LinkShutdown_doc
#define LinkCreate_doc
#define LogEnv_doc
#define ClassFactorySet_doc
#define OT_SETUP_hdl__null_allow
#define SlaveGetMaster_doc
#define SlaveCheck_doc
#define ConfigSetPostfix_doc
#define SlaveIs_doc
#define new_doc
#define ReadL_START_doc
#define ServiceIsTransaction_doc
#define ConfigGetIsParent_doc
#define LinkGetParent_doc
#define ReadI16_doc
#define StorageExport_doc
#define LinkGetTargetIdent_doc
#define SendI8_doc
#define ReadT_START_doc
#define ReadStringR_doc
#define SlaveDelete_doc
#define SendT_END_doc
#define ConfigReset_doc
#define ReadItemExists_doc
#define ReadLONG_doc
#define ConfigSetEvent_doc
#define ConfigGetPostfix_doc
#define LinkGetCtxId_doc
#define ConfigGetIoTcpL_doc
#define SendEND_AND_SUB_doc
#define LinkIsParent_doc
#define SendBUF_doc
#define ErrorMove_doc
#define ReadSTR_doc
#define SendSYNC_doc
#define ClassInit
#define SendBOL_doc
#define ConfigSetStartAs_doc
#define SendFLT_doc
#define ReadBOL_doc
#define error
Definition high_lng.h:339
#define mqctx
#define MkBufferListCreateTLS_T(name, num)
#define mk_inline
#define MK_NULL_NO
#define MK_NULL_YES
#define MK_UNUSED
#define MK_DEPRECATED
MK_TIMEOUT_DEFAULT
int32_t MK_NUM
float MK_FLT
MK_PTRB * MK_PTR
const MK_STRB * MK_STRN
signed char MK_I8
signed long long MK_I64
bool MK_BOOL
unsigned char MK_BOL
long MK_LONG
signed short int MK_I16
double MK_DBL
time_t MK_TIME_T
int32_t MK_HDL
signed int MK_I32
int MK_DBG
#define MkLogV_4M(x, callfunc, debug, printfmt,...)
#define MkSysPrintF(...)
static bool MkSysStringIsNULL(MK_STRN str)
static MK_I32 MkRuntimeDebugGet(void)
#define MK_RT_CALL
#define MkRtSetup_X(x)
#define MK_RT_ARGS
#define MK_RT_REF
#define MkTypeDup2(...)
static MK_ERR MqContextErrorFORMAT(MQ_CTXN const fmtobj)
helper used to access MkErrorDEFAULT from MqContextC
#define MqClassFactorySet(...)
MK_STRN MqClassIdentGet(MQ_CTXN const ctx)
get the application-identification …
#define MqClassIdentSet(...)
MK_STRN MqClassOriginalIdentGet(MQ_CTXN const ctx)
get the MqFactoryS::originalIdent from the MqContextC
MQ_FCT const MqClassFactoryGet(MQ_CTXN const ctx)
get the MqFactoryC used by the MqContextC
#define MqContextHandleResolve(...)
#define MqContextInstances()
static MQ_CTX MqContextNext(MQ_CTX const ctx)
get next instance from linked-list of MqContextS type
static MQ_CTX MqContextPrev(MQ_CTX const ctx)
get previous instance from linked-list of MqContextS type
static MQ_CTX MqContextGetNull(void)
Null-Slot - return a MqContextC typed NULL instance …
#define MqContextC_X2obj(x)
#define MqContextCT
class as MqTypeCtxS-class-type for MqContextC in the Target-Programming-Language (TPL) …
#define MqContextC_TT
class as MkTypeS-class-type, useable in a class-macro as: class##_TT …
static enum MqStartE MqConfigGetStartAs(MQ_CTX const ctx)
return the MqConfigS::startAs value
static MK_I32 MqConfigGetPkgsize(MQ_CTXN const ctx)
get the maximun size of a BDY package
static MK_STRN MqConfigGetName(MQ_CTXN const ctx)
get the name of the context object
static MK_TIME_T MqConfigGetTimeout(MQ_CTXN const ctx)
get the timeout value of the context object
static bool MqConfigGetIsParent(MQ_CTX const ctx)
does the context object is a parent ? An objext is a parent id the MqConfigS::parent attribute is Non...
#define MqConfigSetConfigFile(...)
static MK_I32 MqConfigGetBuffersize(MQ_CTXN const ctx)
get the minimum of the read/send buffersize of the socket
static MK_STRN MqConfigGetPostfix(MQ_CTXN const ctx)
get the MqConfigS::dispPostfix
static bool MqConfigGetIsServer(MQ_CTX const ctx)
does the context object is a server ?
static MQ_SOCK_HDL MqConfigGetIoPipe(MQ_CTX const ctx)
return the MqIoPipeConfigS
static MK_STRN MqConfigGetPrefix(MQ_CTXN const ctx)
get the MqConfigS::dispPrefix
static MK_STRN MqConfigGetStorage(MQ_CTXN const ctx)
get the storage of the context object
static MK_STRN MqConfigGetIoUds(MQ_CTXN const ctx)
return the MqIoUdsConfigS
enum MkErrorE MqConfigGetIoTcp(MQ_CTX const ctx, MK_STRN *host_out, MK_STRN *port_out, MK_STRN *myhost_out, MK_STRN *myport_out)
get the configuration-data of the tcp-client-server-link …
#define MqConfigGetIoTcpL(...)
static enum MqIdentE MqConfigGetIdentFrom(MQ_CTX const ctx)
get the MqConfigS::identFrom
static enum MqStatusIsEF MqConfigGetStatusIs(MQ_CTX const ctx)
return the MqContextS::statusIs value
static bool MqConfigGetIsString(MQ_CTX const ctx)
does the context object is using the string-mode ?
#define MqConfigSetBgError(...)
#define MqConfigSetServerSetup(...)
#define MqConfigSetServerCleanup(...)
#define MqConfigSetEvent(...)
#define MqConfigReset(...)
#define MqConfigSetDaemon(...)
#define MqConfigSetPrefix(...)
void MqConfigSetPkgsize(MQ_CTX const ctx, MK_I32 data)
set the MqIoConfigS::pkgsize value
bool MqConfigCheckStartAs(MQ_CTX const ctx, enum MqStartE data)
check if MqConfigS::startAs can be set to data
#define MqConfigSetIoPipe(...)
void MqConfigSetIgnoreExit(MQ_CTX const ctx, bool data)
set the MqSetupS::ignoreExit value
#define MqConfigSetIoTcp(...)
#define MqConfigSetPostfix(...)
#define MqConfigSetName(...)
void MqConfigSetTimeout(MQ_CTX const ctx, MK_TIME_T data)
set the MqIoConfigS::timeout value
enum MkErrorE MqConfigSetStartAsString(MQ_CTX const ctx, MK_STRN data)
set the MqConfigS::startAs value using string default, thread, fork or spawn
void MqConfigSetIsString(MQ_CTX const ctx, bool data)
set the MqConfigS::native value 'S'string or 'L'owEndian or 'B'igEndian
#define MqConfigSetIoUds(...)
void MqConfigSetIdentFrom(MQ_CTX const ctx, enum MqIdentE data)
set the MqConfigS::identFrom value
enum MkErrorE MqConfigSetStartAs(MQ_CTX const ctx, enum MqStartE data)
set the MqConfigS::startAs value
void MqConfigSetBuffersize(MQ_CTX const ctx, MK_I32 data)
set the MqIoConfigS::buffersize value
#define MqConfigSetAllDebug(...)
#define MqConfigSetIoTcpL(...)
#define MqConfigSetStorage(...)
void MqConfigSetIsServer(MQ_CTX const ctx, bool data)
set the MqSetupS::isServer value
void MqEnvRestore(MQ_CTX ctx)
restore the service-environment
#define MqEnvProtect(...)
#define MqContextErrorMove(...)
#define MqContextErrorCopy(...)
#define MqContextLogShort(...)
#define MqContextLogEnv(...)
static MK_STRN MqLogParentOrChild(MQ_CTXN ctx)
is ctx a PARENT or a CHILD ? …
#define MqContextLogConfig(...)
#define MqContextLogSetup(...)
#define MqContextLogLink(...)
#define MqContextLogType(...)
static MK_STRN MqLogServerOrClient(MQ_CTXN const ctx)
is ctx a SERVER or a CLIENT ? …
#define MqProcessEvent(...)
#define MqExit(...)
#define MqContextGetBuffer(...)
static MQ_CTX MqGetRoot(MQ_CTX ctx)
get the Root (toplevel initial context)
#define MqProxyItem(...)
#define MqProxyForward(...)
#define MqReadI64(...)
#define MqReadSTR(...)
#define MqReadI16(...)
#define MqReadDBL(...)
#define MqReadBFL(...)
#define MqReadBUF(...)
#define MqReadHDL(...)
#define MqReadLONG(...)
#define MqReadI8(...)
#define MqReadBIN(...)
#define MqReadFLT(...)
#define MqReadBinaryR(...)
#define MqReadALL(...)
#define MqReadStringR(...)
#define MqReadBOL(...)
#define MqReadI32(...)
#define MqReadT_START(...)
#define MqReadL_START(...)
#define MqReadT_END(...)
#define MqReadL_END(...)
#define MqReadDbg(...)
enum MkTypeE MqReadGetNextType(MQ_CTX const ctx)
get the type (MkTypeE) of the next Item in the read-data-buffer or "0" if not available
MK_NUM MqReadGetNumItems(MQ_CTX const ctx)
get the number of items left in the read-data-package …
bool MqReadItemExists(MQ_CTX const ctx)
check if an item exists in the read-data-package …
#define MqReadUndo(...)
#define MqRouteDelete(...)
#define MqRouteTraverse(...)
#define MqRouteGetTree(...)
#define MqRouteCreate(...)
#define MqRouteGetPath(...)
#define MqRouteResolve(...)
#define MqSendBIN(...)
#define MqSendLONG(...)
#define MqSendI8(...)
#define MqSendBOL(...)
#define MqSendI64(...)
#define MqSendI32(...)
#define MqSendBFL(...)
#define MqSendStringR(...)
#define MqSendI16(...)
#define MqSendL_FLAT(...)
#define MqSendSTR(...)
#define MqSendLTR(...)
#define MqSendHDL(...)
#define MqSendFLT(...)
#define MqSendDBL(...)
#define MqSendBUF(...)
#define MqSendBUS_FLAT(...)
#define MqSendBinaryR(...)
#define MqSendSTART(...)
#define MqSendEND_AND_TRANSACTION(...)
#define MqSendEND_AND_CALLBACK(...)
#define MqSendEND_AND_SUB(...)
#define MqSendEND_AND_WAIT(...)
#define MqSendEND(...)
#define MqSendSYNC(...)
#define MqSendL_START(...)
#define MqSendT_END(...)
#define MqSendL_END(...)
#define MqSendT_START(...)
#define MqSendRETURN_SUB(...)
#define MqSendERROR(...)
#define MqSendRETURN(...)
bool MqServiceTokenCheck(MQ_CTX const ctx, MQ_TOK const token)
in an ongoing-service-call check if the current MqContextC_ServiceApi_Identifer is token …
#define MqServiceStorage(...)
#define MqServiceProxyCtx(...)
bool MqServiceProxyCtxExists(MQ_CTX const ctx, MQ_TOK const token, MQ_CTX const target)
check if service who belongs to token is a proxy-service
MQ_TOK MqServiceTokenGet(MQ_CTX const ctx)
in an ongoing-service-call get the current MqContextC_ServiceApi_Identifer …
static bool MqServiceIsTransaction(MQ_CTX const ctx)
check if the ongoing-service-call belongs to a transaction …
#define MqServiceCreate(...)
#define MqServiceProxy(...)
MK_STRN MQ_TOK
MqContextC - a char[4+1] or hex[8+1] string used to unique identify a service …
MqTokenF MqServiceCallbackF
MqContextC - the callback-function is used as a service-handle or as a event-handle …
#define MqServiceProxyRoundRobin(...)
#define MqServiceDelete(...)
bool MqServiceTokenExists(MQ_CTX const ctx, MQ_TOK const token)
check if the MqContextC_ServiceApi_Identifer token is defined as ctx service …
#define MqSlaveGet(...)
static bool MqSlaveIs(MQ_CTXN const ctx)
is the context a slave-context ? …
#define MqSlaveGetProxy(...)
#define MqSlaveCreate(...)
static bool MqSlaveCheck(MQ_CTXN const ctx, MQ_SLAVE_ID const id)
check if slave-id is valid
#define MqSlaveGetFilter(...)
static MQ_CTX MqSlaveGetMaster(MQ_CTX const ctx)
opposite function of MqSlaveGetFilter
#define MqSlaveDelete(...)
#define MqSlaveWorker(...)
#define MqStorageIncrRef(...)
#define MqStorageResolve(...)
#define MqStorageLog(...)
#define MqStorageExport(...)
#define MqStorageDecrRef(...)
#define MqStorageClose(...)
#define MqStorageOpen(...)
#define MqStorageImport(...)
#define MqStorageCount(...)
#define MqStorageDelete(...)
#define MqStorageErrCnt(...)
#define MqContextCreate(...)
MqWaitOnEventE
wait for an event? …
MqIdentE
identify the application using prefix (default) or factory …
MqStartE
User preferences on HOWTO start a new entity.
@ MQ_WAIT_NO
Check for one event but do not wait …
@ MQ_SLAVE_OTHER
internal: on the master-ctx get the slave-ctx and on the slave-ctx get the master-ctx
MK_NUM MQ_SLAVE_ID
a slave identiver
int MQ_LTR
32bit longterm transaction token because PHP-32 does NOT support long long
int MQ_SOCK_HDL
#define MQ_STATIC_RT
MK_OBJ const obj
Definition high_lng.h:136
MK_STRB token[9]
Definition high_lng.h:229
MK_TIME_T timeout
Definition high_lng.h:133
#define OT_CHECK_NIH(val)
#define OT_CHECK_STR(val)
#define OT_CHECK_CALLABLE(val)
#define OT_CHECK_BUFN(val, nullB)
#define OT_CHECK_BUF(val, nullB)
#define OT_CLEANUP_CALLABLE(val)
#define OT_CHECK_BFLN(val, nullB)
#define OT_CHECK_ENUM(ename, val)
#define OT_SETUP_CALLABLE(val)
#define OT_CHECK_TIME_T(val)
#define OT_CHECK_BUSN(val, nullB)
#define OT_CHECK_LNG_T(val)
#define OT_CHECK_BAC(val)
#define OT_CHECK_OBJN(val, nullB)
#define OT_CHECK_BFL(val, nullB)
#define OT_CHECK_CTXN(val, nullB)
#define OT_CHECK_FCT(val, nullB)
#define OT_CHECK_SLAVE_ID(val)
#define OT_CHECK_CTX(val, nullB)
#define OT_CHECK_DMP(val, nullB)
array of MqContextC instances
MQ_CTX * data
PyObject_HEAD MK_OBJ hdl
PUBLIC data structure for the pymqmsgque-specific-data
MqDumpC - the class known as dmp or dump is used to export a pymqmsgque data package as binary …
data used to define a factory