theLink 10.0 NHI1 - theKernel - theLink - theConfig - theSq3Lite - theCompiler - theBrain - theGuard
c - tcl - cs - py - rb - jv - cc
Loading...
Searching...
No Matches
MqContextC_py.c
Go to the documentation of this file.
1
12/* LABEL-START */
13
14#define META_FILE_NAME "MqContextC_py.c"
15
16#include "LibMqMsgque_private_py.h"
17
18// PY class
19#define OT_CLASS (&NS(MqContextCR))
20#define OT_CLASS_NAME "MqContextC"
21
22#define OT_LNG2META(O) MqCtx(VAL2MNG(O))
23
24#define OT_retObj_CONSTR(mng) OT_retObj_SET(NS(MqContextC_CTOR)(MK_RT_CALL (PyTypeObject*)class,mng))
25
26#define OT_SETUP_hdl OT_SETUP_hdl_tmpl(MqContextC)
27#define OT_SETUP_hdl__null_allow OT_SETUP_hdl_tmpl__null_allow(MqContextC)
28#define OT_SETUP_hdl_constr MK_RT_UNUSED AllRtSetup_NULL; \
29 MQ_CTX hdl = (MQ_CTX) &MkERROR;
30#define OT_SETUP_hdl_destr OT_SETUP_hdl_tmpl__null_allow(MqContextC)
31#define OT_SETUP_hdl_static MK_RT_UNUSED AllRtSetup_NULL; \
32 __attribute__((unused)) MK_TYP hdl = MqContextC##_TT;
33
34#define OT_SETUP_hdl_static_constr OT_SETUP_hdl_static
35
36#if !defined(SetupRtFromObj_X)
37 #define SetupRtFromObj_X(hdl) AllRtSetup_X(hdl)
38 #define SetupRtFromObj_XN(hdl) AllRtSetup_XN(hdl)
39#endif
40
41// MO class
42#undef MqContextCTT
43#define MqContextCTT MQ(MqMsgqueThreadState).MqContextCTT
44/* MqContextC_MK_NULL defined in LibMqMsgque_py.h */
45
46__attribute__((unused)) mk_inline
47OT_LNG_T NS(MqContextC_CTOR) (MK_RT_ARGS OT_LNG_CLASS_T type, MQ_CTX hdl) {
48 return MK(AtomCreate)(MK_RT_CALL type,MqContextC_X2obj(hdl),true);
49}
50
51// helper: mk_debug_color(MK_COLOR_YELLOW,"hdl<%p>, self<%p>", obj, self);
52
53// MQ: ObjNew feature: selfCreate will be called from "ObjNew->MkSelfNew" if MkObj need a SELF pointer
54static MK_PTR NS(MqContextC_selfCreate) (MK_RT_ARGS MK_OBJ const obj, MK_PTR const env) {
55 return MK(AtomCreate) (MK_RT_CALL OT_CLASS,obj,true);
56}
57// MQ: called if MkObj must be destroyed and if the SELF is still alive → goal: destroy the SELF
58static void NS(MqContextC_selfDelete) (MK_RT_ARGS MK_PTR self, MK_PTR const env) {
59 OT_OBJECT_DELETE_HARD(OT_SELF);
60}
61// MQ: called to destroy link from SELF to META
62static void NS(MqContextC_selfUnlink) (MK_RT_ARGS MK_PTR self, MK_PTR const env) {
63 MkObjectC_Obj *selfO = (MkObjectC_Obj*) self;
64 selfO->hdl = NULL;
65}
66
67// initialize the PY and MO class specific object
68#define ClassInit \
69 /* if not already done, initialize NEW MQ type */ \
70 if (MqContextCTT == NULL) MqContextCTT = MqContextSTT; \
71 \
72 /* protect against double call */ \
73 if (MqContextCTT->selfCreate == NS(MqContextC_selfCreate)) return MK_OK; \
74 \
75 /* add "selfCreate" and "selfDelete" feature to the MQ-Class */ \
76 MqContextCTT->selfCreate = NS(MqContextC_selfCreate); \
77 MqContextCTT->selfDelete = NS(MqContextC_selfDelete); \
78 MqContextCTT->selfUnlink = NS(MqContextC_selfUnlink); \
79 \
80 if (!PyType_HasFeature(OT_CLASS,Py_TPFLAGS_READY)) { \
81 NS(MqContextCR).tp_base = OT_MqContextC_base; \
82 LngErrorCheck (PyType_Ready(OT_CLASS)); \
83 } \
84 LngErrorCheck(PyModule_AddObjectRef(m, "MqContextC", (PyObject *)OT_CLASS)); \
85 \
86 /* define the "NULL" object */ \
87 MqContextC_MK_NULL = Py_NewRef(MK(AtomCreate) (MK_RT_CALL OT_CLASS, NULL /*obj*/, false));
88
89/* LABEL-END */
90
91#if 0
92// initialize the PY and MO class specific object
93#define ClassInit \
94 /* if not already done, initialize NEW MQ type */ \
95 if (MqContextCTT == NULL) MqContextCTT = MqContextSTT; \
96 \
97 /* protect against double call */ \
98 if (MqContextCTT->selfCreate == NS(MqContextC_selfCreate)) return MK_OK; \
99 \
100 /* add "selfCreate" and "selfDelete" feature to the MQ-Class */ \
101 MqContextCTT->selfCreate = NS(MqContextC_selfCreate); \
102 MqContextCTT->selfDelete = NS(MqContextC_selfDelete); \
103 \
104 if (!PyType_HasFeature(OT_CLASS,Py_TPFLAGS_READY)) { \
105M0; \
106 NS(MqContextCR).tp_base = OT_MqContextC_base; \
107printZ(Py_REFCNT(OT_CLASS)); \
108 LngErrorCheck (PyType_Ready(OT_CLASS)); \
109 } \
110printP(PyThreadState_Get()); \
111printZ(Py_REFCNT(OT_CLASS)); \
112 LngErrorCheck(PyModule_AddObjectRef(m, "MqContextC", (PyObject *)OT_CLASS)); \
113printZ(Py_REFCNT(OT_CLASS)); \
114 \
115 /* define the "NULL" object */ \
116 NS(MqMsgqueThreadState).MqContextC_MK_NULL = Py_NewRef(MK(AtomCreate) (MK_RT_CALL OT_CLASS, NULL /*obj*/, false));
117#endif
118
119#define META_CONTEXT_S hdl
120
126
127// BEGIN-DOC - created by 'py_MqS.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
128
129// doc-key: MqContextC,MqClass,oc_,func
130#define ClassFactoryGet_doc "MqFactoryC ctx.ClassFactoryGet() (const)"
131
132// doc-key: MqContextC,MqClass,om_,func
133#define ClassFactorySet_doc "ctx.ClassFactorySet(item:MqFactoryC)"
134#define ClassIdentGet_doc "string ctx.ClassIdentGet() (const)"
135#define ClassIdentSet_doc "ctx.ClassIdentSet(ident:string)"
136#define ClassOriginalIdentGet_doc "string ctx.ClassOriginalIdentGet() (const)"
137
138// doc-key: MqContextC,MqConfig,oco,func
139#define ConfigGetIoTcpL_doc "MkBufferListC ctx.ConfigGetIoTcpL()"
140
141// doc-key: MqContextC,MqConfig,om_,func
142#define ConfigCheckStartAs_doc "bool ctx.ConfigCheckStartAs(data:MqStartE)"
143#define ConfigGetBuffersize_doc "int32 ctx.ConfigGetBuffersize() (const)"
144#define ConfigGetIdentFrom_doc "MqIdentE ctx.ConfigGetIdentFrom()"
145#define ConfigGetIoPipe_doc "int32 ctx.ConfigGetIoPipe()"
146#define ConfigGetIoUds_doc "string ctx.ConfigGetIoUds() (const)"
147#define ConfigGetIsParent_doc "bool ctx.ConfigGetIsParent()"
148#define ConfigGetIsServer_doc "bool ctx.ConfigGetIsServer()"
149#define ConfigGetIsString_doc "bool ctx.ConfigGetIsString()"
150#define ConfigGetName_doc "string ctx.ConfigGetName() (const)"
151#define ConfigGetPkgsize_doc "int32 ctx.ConfigGetPkgsize() (const)"
152#define ConfigGetPostfix_doc "string ctx.ConfigGetPostfix() (const)"
153#define ConfigGetPrefix_doc "string ctx.ConfigGetPrefix() (const)"
154#define ConfigGetStartAs_doc "MqStartE ctx.ConfigGetStartAs()"
155#define ConfigGetStatusIs_doc "MqStatusIsEF ctx.ConfigGetStatusIs()"
156#define ConfigGetStorage_doc "string ctx.ConfigGetStorage() (const)"
157#define ConfigGetTimeout_doc "MkTimeoutE|int32 ctx.ConfigGetTimeout() (const)"
158#define ConfigReset_doc "ctx.ConfigReset()"
159#define ConfigSetAllDebug_doc "ctx.ConfigSetAllDebug(data:int32)"
160#define ConfigSetBgError_doc "ctx.ConfigSetBgError(?callback:callable=None?)"
161#define ConfigSetBuffersize_doc "ctx.ConfigSetBuffersize(data:int32)"
162#define ConfigSetConfigFile_doc "ctx.ConfigSetConfigFile(filename:string)"
163#define ConfigSetDaemon_doc "ctx.ConfigSetDaemon(pidfile:string)"
164#define ConfigSetEvent_doc "ctx.ConfigSetEvent(?callback:callable=None?)"
165#define ConfigSetIdentFrom_doc "ctx.ConfigSetIdentFrom(data:MqIdentE)"
166#define ConfigSetIgnoreExit_doc "ctx.ConfigSetIgnoreExit(data:bool)"
167#define ConfigSetIoPipe_doc "ctx.ConfigSetIoPipe(fh:int32)"
168#define ConfigSetIoTcp_doc "ctx.ConfigSetIoTcp(?host:string=\"None\"?, ?port:string=\"None\"?, ?myhost:string=\"None\"?, ?myport:string=\"None\"?)"
169#define ConfigSetIoTcpL_doc "ctx.ConfigSetIoTcpL(vals:MkBufferListC)"
170#define ConfigSetIoUds_doc "ctx.ConfigSetIoUds(file:string)"
171#define ConfigSetIsServer_doc "ctx.ConfigSetIsServer(data:bool)"
172#define ConfigSetIsString_doc "ctx.ConfigSetIsString(data:bool)"
173#define ConfigSetName_doc "ctx.ConfigSetName(data:string)"
174#define ConfigSetPkgsize_doc "ctx.ConfigSetPkgsize(data:int32)"
175#define ConfigSetPostfix_doc "ctx.ConfigSetPostfix(data:string)"
176#define ConfigSetPrefix_doc "ctx.ConfigSetPrefix(data:string)"
177#define ConfigSetServerCleanup_doc "ctx.ConfigSetServerCleanup(?callback:callable=None?)"
178#define ConfigSetServerSetup_doc "ctx.ConfigSetServerSetup(?callback:callable=None?)"
179#define ConfigSetStartAs_doc "ctx.ConfigSetStartAs(data:MqStartE)"
180#define ConfigSetStartAsString_doc "ctx.ConfigSetStartAsString(data:string)"
181#define ConfigSetStorage_doc "ctx.ConfigSetStorage(data:string)"
182#define ConfigSetTimeout_doc "ctx.ConfigSetTimeout(data:MkTimeoutE|int32)"
183
184// doc-key: MqContextC,MqConfig,omo,func
185#define ConfigGetIoTcp_doc "{host:string port:string myhost:string myport:string} ctx.ConfigGetIoTcp()"
186
187// doc-key: MqContextC,MqContext,sCc,func
188#define Create_doc "MqContextC MqContextC.Create(?tmpl:MqContextC=None?)"
189#define new_doc "MqContextC MqContextC.new(?tmpl:MqContextC=None?)"
190
191// doc-key: MqContextC,MqContext,sc_,func
192#define GetNull_doc "MqContextC MqContextC.GetNull()"
193#define HandleResolve_doc "MqContextC MqContextC.HandleResolve(netHdl:MK_HDL)"
194#define Instances_doc "MqContextC MqContextC.Instances()"
195
196// doc-key: MqContextC,MqContext,oc_,func
197#define ErrorFORMAT_doc "MkErrorC fmtobj.ErrorFORMAT() (const)"
198#define GetBuffer_doc "MkBufferC ctx.GetBuffer()"
199#define Next_doc "MqContextC ctx.Next()"
200#define Prev_doc "MqContextC ctx.Prev()"
201
202// doc-key: MqContextC,MqContext,om_,func
203#define ErrorCopy_doc "MkErrorE targetCtx.ErrorCopy(sourceCtx:MqContextC) (const)"
204#define ErrorMove_doc "MkErrorE targetCtx.ErrorMove(sourceCtx:MqContextC) (const)"
205#define HandleGet_doc "MK_HDL ctx.HandleGet()"
206#define Log_doc "ctx.Log(?fmtobj:MkObjectC=None?, ?debug:int32=0?, ?callfunc:string=\"MK_NULL\"?, ?lvl:int32=0?) (const)"
207#define LogConfig_doc "ctx.LogConfig(?fmtobj:MkObjectC=None?, ?debug:int32=0?, ?callfunc:string=\"MK_NULL\"?, ?lvl:int32=0?) (const)"
208#define LogEnv_doc "ctx.LogEnv(?fmtobj:MkObjectC=None?, ?debug:int32=0?, ?callfunc:string=\"MK_NULL\"?, ?lvl:int32=0?) (const)"
209#define LogLink_doc "ctx.LogLink(?fmtobj:MkObjectC=None?, ?debug:int32=0?, ?callfunc:string=\"MK_NULL\"?, ?lvl:int32=0?) (const)"
210#define LogSetup_doc "ctx.LogSetup(?fmtobj:MkObjectC=None?, ?debug:int32=0?, ?callfunc:string=\"MK_NULL\"?, ?lvl:int32=0?) (const)"
211#define LogShort_doc "ctx.LogShort(?fmtobj:MkObjectC=None?, ?debug:int32=0?, ?callfunc:string=\"MK_NULL\"?, ?lvl:int32=0?, ?label:string=\"None\"?) (const)"
212#define LogType_doc "ctx.LogType(?fmtobj:MkObjectC=None?, ?debug:int32=0?, ?callfunc:string=\"MK_NULL\"?, ?lvl:int32=0?) (const)"
213#define ToString_doc "string ctx.ToString() (const)"
214
215// doc-key: MqContextC,MqEnv,om_,func
216#define EnvProtect_doc "ctx.EnvProtect()"
217#define EnvRestore_doc "ctx.EnvRestore()"
218
219// doc-key: MqContextC,MqExit,om_,func
220#define Exit_doc "ctx.Exit(?callfunc:string=\"MK_NULL\"?, ?callfile:string=\"MK_NULL\"?, ?callline:int32=-1?)"
221
222// doc-key: MqContextC,MqGet,oc_,func
223#define GetRoot_doc "MqContextC ctx.GetRoot()"
224
225// doc-key: MqContextC,MqLink,oc_,func
226#define LinkGetParent_doc "MqContextC ctx.LinkGetParent()"
227
228// doc-key: MqContextC,MqLink,om_,func
229#define LinkConnect_doc "ctx.LinkConnect()"
230#define LinkCreate_doc "ctx.LinkCreate(?args:MkBufferListC...=None?)"
231#define LinkCreateChild_doc "ctx.LinkCreateChild(parent:MqContextC, ?args:MkBufferListC...=None?)"
232#define LinkDelete_doc "ctx.LinkDelete()"
233#define LinkGetCtxId_doc "int32 ctx.LinkGetCtxId()"
234#define LinkGetTargetIdent_doc "string ctx.LinkGetTargetIdent()"
235#define LinkIsConnected_doc "bool ctx.LinkIsConnected()"
236#define LinkIsParent_doc "bool ctx.LinkIsParent()"
237#define LinkShutdown_doc "ctx.LinkShutdown()"
238
239// doc-key: MqContextC,MqLog,om_,func
240#define LogParentOrChild_doc "string ctx.LogParentOrChild() (const)"
241#define LogServerOrClient_doc "string ctx.LogServerOrClient() (const)"
242
243// doc-key: MqContextC,MqProcess,om_,func
244#define ProcessEvent_doc "ctx.ProcessEvent(?wait:MqWaitOnEventE=NO?, ?timeout:MkTimeoutE|int32=DEFAULT?)"
245
246// doc-key: MqContextC,MqProxy,om_,func
247#define ProxyForward_doc "sourceCtx.ProxyForward(targetCtx:MqContextC, ?dump:MqDumpC=None?, ?timeout:MkTimeoutE|int32=DEFAULT?)"
248#define ProxyItem_doc "sourceCtx.ProxyItem(targetCtx:MqContextC)"
249
250// doc-key: MqContextC,MqRead,oci,func
251#define ReadALL_doc "MkBufferListC ctx.ReadALL(?val_inout:MkBufferListC=None?)"
252
253// doc-key: MqContextC,MqRead,oco,func
254#define ReadBFL_doc "MkBufferListC ctx.ReadBFL()"
255#define ReadBUF_doc "MkBufferC ctx.ReadBUF()"
256
257// doc-key: MqContextC,MqRead,om_,func
258#define ReadDbg_doc "ctx.ReadDbg()"
259#define ReadGetNextType_doc "MkTypeE ctx.ReadGetNextType()"
260#define ReadGetNumItems_doc "int32 ctx.ReadGetNumItems()"
261#define ReadItemExists_doc "bool ctx.ReadItemExists()"
262#define ReadL_END_doc "ctx.ReadL_END()"
263#define ReadL_START_doc "ctx.ReadL_START(?buf:MkBufferC=None?)"
264#define ReadT_END_doc "ctx.ReadT_END()"
265#define ReadT_START_doc "ctx.ReadT_START()"
266#define ReadUndo_doc "ctx.ReadUndo()"
267
268// doc-key: MqContextC,MqRead,omo,func
269#define ReadBIN_doc "binary ctx.ReadBIN()"
270#define ReadBOL_doc "bool ctx.ReadBOL()"
271#define ReadBinaryR_doc "binary ctx.ReadBinaryR()"
272#define ReadDBL_doc "double ctx.ReadDBL()"
273#define ReadFLT_doc "float ctx.ReadFLT()"
274#define ReadHDL_doc "MK_HDL ctx.ReadHDL()"
275#define ReadI16_doc "int16 ctx.ReadI16()"
276#define ReadI32_doc "int32 ctx.ReadI32()"
277#define ReadI64_doc "int64 ctx.ReadI64()"
278#define ReadI8_doc "int8 ctx.ReadI8()"
279#define ReadLIST_doc "[list...] ctx.ReadLIST()"
280#define ReadLONG_doc "long ctx.ReadLONG()"
281#define ReadNEXT_doc "obj ctx.ReadNEXT()"
282#define ReadSTR_doc "string ctx.ReadSTR()"
283#define ReadStringR_doc "string ctx.ReadStringR()"
284
285// doc-key: MqContextC,MqRoute,oco,func
286#define RouteGetTree_doc "MkBufferListC ctx.RouteGetTree()"
287
288// doc-key: MqContextC,MqRoute,om_,func
289#define RouteCreate_doc "ctx.RouteCreate(route:string, service:string, ?overwrite:bool=false?)"
290#define RouteDelete_doc "ctx.RouteDelete(route:string, service:string, ?overwrite:bool=false?)"
291#define RouteResolve_doc "[MqContextC...] ctx.RouteResolve(ident:string, ?retnum:int32=-1?)"
292#define RouteTraverse_doc "ctx.RouteTraverse(service:string, ?args:MkBufferListC...=None?)"
293
294// doc-key: MqContextC,MqRoute,omo,func
295#define RouteGetPath_doc "string ctx.RouteGetPath()"
296
297// doc-key: MqContextC,MqSend,om_,func
298#define Send_doc "ctx.Send(cstr:string, args:args...)"
299#define SendBFL_doc "ctx.SendBFL(val:MkBufferListC)"
300#define SendBIN_doc "ctx.SendBIN(val:binary)"
301#define SendBOL_doc "ctx.SendBOL(val:bool)"
302#define SendBUF_doc "ctx.SendBUF(val:MkBufferC)"
303#define SendBUS_FLAT_doc "ctx.SendBUS_FLAT(val:MkBufferStreamC)"
304#define SendBinaryR_doc "ctx.SendBinaryR(val:binary)"
305#define SendDBL_doc "ctx.SendDBL(val:double)"
306#define SendEND_doc "ctx.SendEND(token:string[4], ?timeout:MkTimeoutE|int32=DEFAULT?)"
307#define SendEND_AND_CALLBACK_doc "ctx.SendEND_AND_CALLBACK(token:string[4], callback:callable, ?timeout:MkTimeoutE|int32=DEFAULT?)"
308#define SendEND_AND_SUB_doc "ctx.SendEND_AND_SUB(token:string[4], callback:callable, ?timeout:MkTimeoutE|int32=DEFAULT?)"
309#define SendEND_AND_TRANSACTION_doc "ctx.SendEND_AND_TRANSACTION(token:string[4], callback:string[4], ?timeout:MkTimeoutE|int32=DEFAULT?)"
310#define SendEND_AND_WAIT_doc "ctx.SendEND_AND_WAIT(token:string[4], ?timeout:MkTimeoutE|int32=DEFAULT?)"
311#define SendERROR_doc "ctx.SendERROR()"
312#define SendFLT_doc "ctx.SendFLT(val:float)"
313#define SendHDL_doc "ctx.SendHDL(val:MK_HDL)"
314#define SendI16_doc "ctx.SendI16(val:int16)"
315#define SendI32_doc "ctx.SendI32(val:int32)"
316#define SendI64_doc "ctx.SendI64(val:int64)"
317#define SendI8_doc "ctx.SendI8(val:int8)"
318#define SendLONG_doc "ctx.SendLONG(val:long)"
319#define SendLTR_doc "ctx.SendLTR(transLId:int32)"
320#define SendL_END_doc "ctx.SendL_END()"
321#define SendL_FLAT_doc "ctx.SendL_FLAT(val:MkBufferListC)"
322#define SendL_START_doc "ctx.SendL_START()"
323#define SendRETURN_doc "ctx.SendRETURN()"
324#define SendRETURN_SUB_doc "ctx.SendRETURN_SUB()"
325#define SendSTART_doc "ctx.SendSTART()"
326#define SendSTR_doc "ctx.SendSTR(val:string)"
327#define SendSYNC_doc "ctx.SendSYNC()"
328#define SendStringR_doc "ctx.SendStringR(val:string)"
329#define SendT_END_doc "ctx.SendT_END()"
330#define SendT_START_doc "ctx.SendT_START()"
331
332// doc-key: MqContextC,MqService,om_,func
333#define ServiceCreate_doc "ctx.ServiceCreate(token:string[4], callback:callable)"
334#define ServiceDelete_doc "ctx.ServiceDelete(token:string[4])"
335#define ServiceIsTransaction_doc "bool ctx.ServiceIsTransaction()"
336#define ServiceProxy_doc "ctx.ServiceProxy(token:string[4], ?id:MqSlaveE|int32=MQ_SLAVE_OTHER?)"
337#define ServiceProxyCtx_doc "ctx.ServiceProxyCtx(token:string[4], target:MqContextC)"
338#define ServiceProxyCtxExists_doc "bool ctx.ServiceProxyCtxExists(token:string[4], target:MqContextC)"
339#define ServiceProxyRoundRobin_doc "ctx.ServiceProxyRoundRobin(token:string[4], ident:string)"
340#define ServiceStorage_doc "ctx.ServiceStorage(token:string[4])"
341#define ServiceTokenCheck_doc "bool ctx.ServiceTokenCheck(token:string[4])"
342#define ServiceTokenExists_doc "bool ctx.ServiceTokenExists(token:string[4])"
343#define ServiceTokenGet_doc "string[4] ctx.ServiceTokenGet()"
344
345// doc-key: MqContextC,MqSlave,oc_,func
346#define SlaveGetMaster_doc "MqContextC ctx.SlaveGetMaster()"
347
348// doc-key: MqContextC,MqSlave,oco,func
349#define SlaveGet_doc "MqContextC ctx.SlaveGet(id:MqSlaveE|int32)"
350#define SlaveGetFilter_doc "MqContextC ctx.SlaveGetFilter()"
351#define SlaveGetProxy_doc "MqContextC ctx.SlaveGetProxy(id:MqSlaveE|int32)"
352
353// doc-key: MqContextC,MqSlave,om_,func
354#define SlaveCheck_doc "bool ctx.SlaveCheck(id:MqSlaveE|int32) (const)"
355#define SlaveCreate_doc "ctx.SlaveCreate(id:MqSlaveE|int32, slave:MqContextC)"
356#define SlaveDelete_doc "ctx.SlaveDelete(id:MqSlaveE|int32)"
357#define SlaveIs_doc "bool ctx.SlaveIs() (const)"
358#define SlaveWorker_doc "ctx.SlaveWorker(id:MqSlaveE|int32, ?fct:string=\"WORKER\"?, ?args:MkBufferListC...=None?)"
359
360// doc-key: MqContextC,MqStorage,oci,func
361#define StorageDelete_doc "int32 ctx.StorageDelete(?*transLIdP_inout:int32=0?)"
362#define StorageImport_doc "int32 ctx.StorageImport(?*transLIdP_inout:int32=0?)"
363
364// doc-key: MqContextC,MqStorage,om_,func
365#define StorageClose_doc "ctx.StorageClose()"
366#define StorageDecrRef_doc "ctx.StorageDecrRef(transLId:int32)"
367#define StorageIncrRef_doc "ctx.StorageIncrRef(transLId:int32)"
368#define StorageLog_doc "ctx.StorageLog(?callfunc:string=\"MK_NULL\"?)"
369#define StorageOpen_doc "ctx.StorageOpen(storageFile:string)"
370
371// doc-key: MqContextC,MqStorage,omo,func
372#define StorageCount_doc "int32 ctx.StorageCount()"
373#define StorageErrCnt_doc "int32 ctx.StorageErrCnt(transLId:int32)"
374#define StorageExport_doc "int32 ctx.StorageExport()"
375#define StorageResolve_doc "{otherCtxP:MqContextC otherLIdP:int32} ctx.StorageResolve()"
376
377// END-DOC - created by 'py_MqS.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
378
379#undef Send_doc
380#define Send_doc Send_doc_extra
381
382#define Debug_doc "None ctx.Debug(prefix:str, obj=self:object)"
383
389
392PyObject* NS(MqContextC_ReadNEXT) (MqContextC_ARGS);
393#include "tmpl/MqContextC_ReadNEXT_lng.h"
394
397PyObject* NS(MqContextC_ReadLIST) (MqContextC_ARGS);
398#include "tmpl/MqContextC_ReadLIST_lng.h"
399
402static PyObject* NS(MqContextC_Debug) (MqContextC_ARGS) {
403 PyObject *strO=NULL, *utf8=NULL;
405 OT_SETUP_VARARGS(1,2,"None ctx.Debug(prefix:str, obj=self:object)")
406 MK_STRN prefix=0;
407 OT_CHECK_REQUIRED(OT_CHECK_STR(prefix))
408 OT_SETUP_OBJ(obj,self)
409 OT_CHECK_OPTIONAL(OT_CHECK_LNG_T(obj))
410 OT_CHECK_NOARGS
411 LngErrorCheckN(strO = PyObject_Repr(obj));
412 LngErrorCheckN(utf8 = PyUnicode_AsUTF8String(strO));
413 MkLogV_4M(hdl,prefix,0,"%s, type=%s, refCnt=%-3zi\n",
414 PyBytes_AsString(utf8), Py_TYPE(obj)->tp_name, Py_REFCNT(obj)-1);
415 OT_retObj_SET_None
416 goto end;
417error:
418 OT_retObj_SET_Error
419end:
420 Py_CLEAR(strO);
421 Py_CLEAR(utf8);
423}
424
427static PyObject* NS(MqContextC_Debug2) (MqContextC_ARGS) {
429 OT_SETUP_VARARGS(1,2,"None ctx.Debug2(prefix:str, ?obj=self:object?)")
430 MK_STRN prefix=0;
431 OT_CHECK_REQUIRED(OT_CHECK_STR(prefix))
432 OT_SETUP_OBJ(obj,self)
433 OT_CHECK_OPTIONAL(OT_CHECK_LNG_T(obj))
434 OT_CHECK_NOARGS
435 MkLogV_4M(hdl,prefix,0,"self<%p>, type<%s>, refCount<%li>\n", obj, Py_TYPE(obj)->tp_name, (long) Py_REFCNT(obj)-1);
436 OT_retObj_SET_None
437 goto end;
438error:
439 OT_retObj_SET_Error
440end:
442}
443
444// -----------------------------------------------------------------------------
445
446// BEGIN-MqContextC - created by 'py_MqC.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
447
451
452// doc-key: MqContextC,MqContextC-Class-Export,sc_
453
455static OT_ProcRet NS(MqContextC_HandleResolve) (OtClass_ARGS) {
457 OT_SETUP_ONEARG(HandleResolve_doc)
458 MK_HDL netHdl = 0;
459 OT_CHECK_REQUIRED(OT_CHECK_NIH (netHdl))
460 OT_CHECK_NOARGS
461 MQ_CTX retVal = MqContextHandleResolve (netHdl);
462 OT_retObj_SET_CTX(retVal)
463 goto end;
464 error:
465 OT_retObj_SET_Error
466 end:
468}
469
470// doc-key: MqContextC,MqContextC-Class-Export,om_
471
472// skip class-overload: HandleGet = MqContextHandleGet → MkObjectHandleGet
473
475// MqContextC_Class_PY_API
476
480
481// doc-key: MqContextC,MqContextC-Class-Introspection,oc_
482
484static OT_ProcRet NS(MqContextC_Next) (MqContextC_ARGS) {
486 OT_SETUP_NOARG(Next_doc)
487 OT_CHECK_NOARGS
488 MQ_CTX retVal = MqContextNext (hdl);
489 OT_retObj_SET_CTX(retVal)
490 goto end;
491 error:
492 OT_retObj_SET_Error
493 end:
495}
496
498static OT_ProcRet NS(MqContextC_Prev) (MqContextC_ARGS) {
500 OT_SETUP_NOARG(Prev_doc)
501 OT_CHECK_NOARGS
502 MQ_CTX retVal = MqContextPrev (hdl);
503 OT_retObj_SET_CTX(retVal)
504 goto end;
505 error:
506 OT_retObj_SET_Error
507 end:
509}
510
511// doc-key: MqContextC,MqContextC-Class-Introspection,sc_
512
514static OT_ProcRet NS(MqContextC_Instances) (OtClass_ARGS) {
516 OT_SETUP_NOARG(Instances_doc)
517 OT_CHECK_NOARGS
518 MQ_CTX retVal = MqContextInstances ();
519 OT_retObj_SET_CTX(retVal)
520 goto end;
521 error:
522 OT_retObj_SET_Error
523 end:
525}
526
528// MqContextC_Class_PY_API
529
533
534// doc-key: MqContextC,MqContextC-Class-Misc,sc_
535
537static OT_ProcRet NS(MqContextC_GetNull) (OtClass_ARGS) {
539 OT_SETUP_NOARG(GetNull_doc)
540 OT_CHECK_NOARGS
541 MQ_CTX retVal = MqContextGetNull ();
542 OT_retObj_SET_CTX(retVal)
543 goto end;
544 error:
545 OT_retObj_SET_Error
546 end:
548}
549
551// MqContextC_Class_PY_API
552
556
557// doc-key: MqContextC,MqContextC-ClassApi-Class,oc_
558
560static OT_ProcRet NS(MqContextC_ClassFactoryGet) (MqContextC_ARGS) {
562 OT_SETUP_NOARG(ClassFactoryGet_doc)
563 OT_CHECK_NOARGS
564 MQ_FCT retVal = MqClassFactoryGet (hdl);
565 OT_retObj_SET_FCT(retVal)
566 goto end;
567 error:
568 OT_retObj_SET_Error
569 end:
571}
572
573// doc-key: MqContextC,MqContextC-ClassApi-Class,om_
574
576static OT_ProcRet NS(MqContextC_ClassFactorySet) (MqContextC_ARGS) {
578 OT_SETUP_ONEARG(ClassFactorySet_doc)
579 MQ_FCT item = 0;
580 OT_CHECK_REQUIRED(OT_CHECK_FCT (item,MK_NULL_NO))
581 OT_CHECK_NOARGS
582 MkErrorC_Check(hdl,MqClassFactorySet (hdl, item));
583 OT_retObj_SET_None
584 goto end;
585 error:
586 OT_retObj_SET_Error
587 end:
589}
590
592static OT_ProcRet NS(MqContextC_ClassIdentGet) (MqContextC_ARGS) {
594 OT_SETUP_NOARG(ClassIdentGet_doc)
595 OT_CHECK_NOARGS
596 OT_retObj_SET_STR(MqClassIdentGet (hdl))
597 goto end;
598 error:
599 OT_retObj_SET_Error
600 end:
602}
603
605static OT_ProcRet NS(MqContextC_ClassIdentSet) (MqContextC_ARGS) {
607 OT_SETUP_ONEARG(ClassIdentSet_doc)
608 MK_STRN ident = 0;
609 OT_CHECK_REQUIRED(OT_CHECK_STRN (ident))
610 OT_CHECK_NOARGS
611 MkErrorC_Check(hdl,MqClassIdentSet (hdl, ident));
612 OT_retObj_SET_None
613 goto end;
614 error:
615 OT_retObj_SET_Error
616 end:
618}
619
621static OT_ProcRet NS(MqContextC_ClassOriginalIdentGet) (MqContextC_ARGS) {
623 OT_SETUP_NOARG(ClassOriginalIdentGet_doc)
624 OT_CHECK_NOARGS
625 OT_retObj_SET_STR(MqClassOriginalIdentGet (hdl))
626 goto end;
627 error:
628 OT_retObj_SET_Error
629 end:
631}
632
634// MqContextC_ClassApi_Class_PY_API
635
639
640// doc-key: MqContextC,MqContextC-ConfigApi-Get,oco
641
643static OT_ProcRet NS(MqContextC_ConfigGetIoTcpL) (MqContextC_ARGS) {
645 OT_SETUP_NOARG(ConfigGetIoTcpL_doc)
646 OT_CHECK_NOARGS
647 MK_BFL vals_out;
648 MkErrorC_Check(hdl,MqConfigGetIoTcpL (hdl, &vals_out));
649 OT_retObj_SET_BFL(vals_out)
650 goto end;
651 error:
652 OT_retObj_SET_Error
653 end:
655}
656
657// doc-key: MqContextC,MqContextC-ConfigApi-Get,om_
658
660static OT_ProcRet NS(MqContextC_ConfigGetBuffersize) (MqContextC_ARGS) {
662 OT_SETUP_NOARG(ConfigGetBuffersize_doc)
663 OT_CHECK_NOARGS
664 OT_retObj_SET_I32(MqConfigGetBuffersize (hdl))
665 goto end;
666 error:
667 OT_retObj_SET_Error
668 end:
670}
671
673static OT_ProcRet NS(MqContextC_ConfigGetIdentFrom) (MqContextC_ARGS) {
675 OT_SETUP_NOARG(ConfigGetIdentFrom_doc)
676 OT_CHECK_NOARGS
677 OT_retObj_SET(OT_NEW_Mq_enum_OBJ(IdentE,MqConfigGetIdentFrom (hdl)))
678 goto end;
679 error:
680 OT_retObj_SET_Error
681 end:
683}
684
686static OT_ProcRet NS(MqContextC_ConfigGetIoPipe) (MqContextC_ARGS) {
688 OT_SETUP_NOARG(ConfigGetIoPipe_doc)
689 OT_CHECK_NOARGS
690 OT_retObj_SET_I32(MqConfigGetIoPipe (hdl))
691 goto end;
692 error:
693 OT_retObj_SET_Error
694 end:
696}
697
699static OT_ProcRet NS(MqContextC_ConfigGetIoUds) (MqContextC_ARGS) {
701 OT_SETUP_NOARG(ConfigGetIoUds_doc)
702 OT_CHECK_NOARGS
703 OT_retObj_SET_STR(MqConfigGetIoUds (hdl))
704 goto end;
705 error:
706 OT_retObj_SET_Error
707 end:
709}
710
712static OT_ProcRet NS(MqContextC_ConfigGetIsParent) (MqContextC_ARGS) {
714 OT_SETUP_NOARG(ConfigGetIsParent_doc)
715 OT_CHECK_NOARGS
716 OT_retObj_SET_BOL(MqConfigGetIsParent (hdl))
717 goto end;
718 error:
719 OT_retObj_SET_Error
720 end:
722}
723
725static OT_ProcRet NS(MqContextC_ConfigGetIsServer) (MqContextC_ARGS) {
727 OT_SETUP_NOARG(ConfigGetIsServer_doc)
728 OT_CHECK_NOARGS
729 OT_retObj_SET_BOL(MqConfigGetIsServer (hdl))
730 goto end;
731 error:
732 OT_retObj_SET_Error
733 end:
735}
736
738static OT_ProcRet NS(MqContextC_ConfigGetIsString) (MqContextC_ARGS) {
740 OT_SETUP_NOARG(ConfigGetIsString_doc)
741 OT_CHECK_NOARGS
742 OT_retObj_SET_BOL(MqConfigGetIsString (hdl))
743 goto end;
744 error:
745 OT_retObj_SET_Error
746 end:
748}
749
751static OT_ProcRet NS(MqContextC_ConfigGetName) (MqContextC_ARGS) {
753 OT_SETUP_NOARG(ConfigGetName_doc)
754 OT_CHECK_NOARGS
755 OT_retObj_SET_STR(MqConfigGetName (hdl))
756 goto end;
757 error:
758 OT_retObj_SET_Error
759 end:
761}
762
764static OT_ProcRet NS(MqContextC_ConfigGetPkgsize) (MqContextC_ARGS) {
766 OT_SETUP_NOARG(ConfigGetPkgsize_doc)
767 OT_CHECK_NOARGS
768 OT_retObj_SET_I32(MqConfigGetPkgsize (hdl))
769 goto end;
770 error:
771 OT_retObj_SET_Error
772 end:
774}
775
777static OT_ProcRet NS(MqContextC_ConfigGetPostfix) (MqContextC_ARGS) {
779 OT_SETUP_NOARG(ConfigGetPostfix_doc)
780 OT_CHECK_NOARGS
781 OT_retObj_SET_STR(MqConfigGetPostfix (hdl))
782 goto end;
783 error:
784 OT_retObj_SET_Error
785 end:
787}
788
790static OT_ProcRet NS(MqContextC_ConfigGetPrefix) (MqContextC_ARGS) {
792 OT_SETUP_NOARG(ConfigGetPrefix_doc)
793 OT_CHECK_NOARGS
794 OT_retObj_SET_STR(MqConfigGetPrefix (hdl))
795 goto end;
796 error:
797 OT_retObj_SET_Error
798 end:
800}
801
803static OT_ProcRet NS(MqContextC_ConfigGetStartAs) (MqContextC_ARGS) {
805 OT_SETUP_NOARG(ConfigGetStartAs_doc)
806 OT_CHECK_NOARGS
807 OT_retObj_SET(OT_NEW_Mq_enum_OBJ(StartE,MqConfigGetStartAs (hdl)))
808 goto end;
809 error:
810 OT_retObj_SET_Error
811 end:
813}
814
816static OT_ProcRet NS(MqContextC_ConfigGetStatusIs) (MqContextC_ARGS) {
818 OT_SETUP_NOARG(ConfigGetStatusIs_doc)
819 OT_CHECK_NOARGS
820 OT_retObj_SET(OT_NEW_Mq_enum_OBJ(StatusIsEF,MqConfigGetStatusIs (hdl)))
821 goto end;
822 error:
823 OT_retObj_SET_Error
824 end:
826}
827
829static OT_ProcRet NS(MqContextC_ConfigGetStorage) (MqContextC_ARGS) {
831 OT_SETUP_NOARG(ConfigGetStorage_doc)
832 OT_CHECK_NOARGS
833 OT_retObj_SET_STR(MqConfigGetStorage (hdl))
834 goto end;
835 error:
836 OT_retObj_SET_Error
837 end:
839}
840
842static OT_ProcRet NS(MqContextC_ConfigGetTimeout) (MqContextC_ARGS) {
844 OT_SETUP_NOARG(ConfigGetTimeout_doc)
845 OT_CHECK_NOARGS
846 OT_retObj_SET_LONG(MqConfigGetTimeout (hdl))
847 goto end;
848 error:
849 OT_retObj_SET_Error
850 end:
852}
853
855static OT_ProcRet NS(MqContextC_ConfigSetConfigFile) (MqContextC_ARGS) {
857 OT_SETUP_ONEARG(ConfigSetConfigFile_doc)
858 MK_STRN filename = 0;
859 OT_CHECK_REQUIRED(OT_CHECK_STRN (filename))
860 OT_CHECK_NOARGS
861 MkErrorC_Check(hdl,MqConfigSetConfigFile (hdl, filename));
862 OT_retObj_SET_None
863 goto end;
864 error:
865 OT_retObj_SET_Error
866 end:
868}
869
870// doc-key: MqContextC,MqContextC-ConfigApi-Get,omo
871
873static OT_ProcRet NS(MqContextC_ConfigGetIoTcp) (MqContextC_ARGS) {
875 OT_SETUP_NOARG(ConfigGetIoTcp_doc)
876 OT_CHECK_NOARGS
877 MK_STRN host_out;
878 MK_STRN port_out;
879 MK_STRN myhost_out;
880 MK_STRN myport_out;
881 MkErrorC_Check(hdl,MqConfigGetIoTcp (hdl, &host_out, &port_out, &myhost_out, &myport_out));
882 OT_retObj_SET_List
883 OT_retObj_APPEND(OT_TMP_STR_OBJ(host_out))
884 OT_retObj_APPEND(OT_TMP_STR_OBJ(port_out))
885 OT_retObj_APPEND(OT_TMP_STR_OBJ(myhost_out))
886 OT_retObj_APPEND(OT_TMP_STR_OBJ(myport_out))
887 goto end;
888 error:
889 OT_retObj_SET_Error
890 end:
892}
893
895// MqContextC_ConfigApi_Get_PY_API
896
900
901// doc-key: MqContextC,MqContextC-ConfigApi-Interface,om_
902
904static OT_ProcRet NS(MqContextC_ConfigSetBgError) (MqContextC_ARGS) {
906 OT_SETUP_VARARGS(0,1,ConfigSetBgError_doc)
907 OT_SETUP_CALLABLE(callback)
908 OT_CHECK_OPTIONAL(OT_CHECK_CALLABLE(callback))
909 OT_CHECK_NOARGS
910 MqServiceCallbackF fCall = (callback == NULL ? NULL : NS(ServiceCall));
911 MqConfigSetBgError (hdl, fCall, callback, NS(ServiceFree), NS(ServiceCopy));
912 OT_retObj_SET_None
913 goto end;
914 error:
915 OT_retObj_SET_Error
916 end:
917 OT_CLEANUP_CALLABLE(callback)
919}
920
922static OT_ProcRet NS(MqContextC_ConfigSetEvent) (MqContextC_ARGS) {
924 OT_SETUP_VARARGS(0,1,ConfigSetEvent_doc)
925 OT_SETUP_CALLABLE(callback)
926 OT_CHECK_OPTIONAL(OT_CHECK_CALLABLE(callback))
927 OT_CHECK_NOARGS
928 MqServiceCallbackF fCall = (callback == NULL ? NULL : NS(ServiceCall));
929 MqConfigSetEvent (hdl, fCall, callback, NS(ServiceFree), NS(ServiceCopy));
930 OT_retObj_SET_None
931 goto end;
932 error:
933 OT_retObj_SET_Error
934 end:
935 OT_CLEANUP_CALLABLE(callback)
937}
938
940static OT_ProcRet NS(MqContextC_ConfigSetServerCleanup) (MqContextC_ARGS) {
942 OT_SETUP_VARARGS(0,1,ConfigSetServerCleanup_doc)
943 OT_SETUP_CALLABLE(callback)
944 OT_CHECK_OPTIONAL(OT_CHECK_CALLABLE(callback))
945 OT_CHECK_NOARGS
946 MqServiceCallbackF fCall = (callback == NULL ? NULL : NS(ServiceCall));
947 MqConfigSetServerCleanup (hdl, fCall, callback, NS(ServiceFree), NS(ServiceCopy));
948 OT_retObj_SET_None
949 goto end;
950 error:
951 OT_retObj_SET_Error
952 end:
953 OT_CLEANUP_CALLABLE(callback)
955}
956
958static OT_ProcRet NS(MqContextC_ConfigSetServerSetup) (MqContextC_ARGS) {
960 OT_SETUP_VARARGS(0,1,ConfigSetServerSetup_doc)
961 OT_SETUP_CALLABLE(callback)
962 OT_CHECK_OPTIONAL(OT_CHECK_CALLABLE(callback))
963 OT_CHECK_NOARGS
964 MqServiceCallbackF fCall = (callback == NULL ? NULL : NS(ServiceCall));
965 MqConfigSetServerSetup (hdl, fCall, callback, NS(ServiceFree), NS(ServiceCopy));
966 OT_retObj_SET_None
967 goto end;
968 error:
969 OT_retObj_SET_Error
970 end:
971 OT_CLEANUP_CALLABLE(callback)
973}
974
976// MqContextC_ConfigApi_Interface_PY_API
977
981
982// doc-key: MqContextC,MqContextC-ConfigApi-Misc,om_
983
985static OT_ProcRet NS(MqContextC_ConfigReset) (MqContextC_ARGS) {
987 OT_SETUP_NOARG(ConfigReset_doc)
988 OT_CHECK_NOARGS
989 MqConfigReset (hdl);
990 OT_retObj_SET_None
991 goto end;
992 error:
993 OT_retObj_SET_Error
994 end:
996}
997
999// MqContextC_ConfigApi_Misc_PY_API
1000
1004
1005// doc-key: MqContextC,MqContextC-ConfigApi-Set,om_
1006
1008static OT_ProcRet NS(MqContextC_ConfigCheckStartAs) (MqContextC_ARGS) {
1010 OT_SETUP_ONEARG(ConfigCheckStartAs_doc)
1011 enum MqStartE data = 0;
1012 OT_CHECK_REQUIRED(OT_CHECK_ENUM (MqStartE,data))
1013 OT_CHECK_NOARGS
1014 OT_retObj_SET_BOL(MqConfigCheckStartAs (hdl, data))
1015 goto end;
1016 error:
1017 OT_retObj_SET_Error
1018 end:
1020}
1021
1023static OT_ProcRet NS(MqContextC_ConfigSetAllDebug) (MqContextC_ARGS) {
1025 OT_SETUP_ONEARG(ConfigSetAllDebug_doc)
1026 MK_I32 data = 0;
1027 OT_CHECK_REQUIRED(OT_CHECK_NI4 (data))
1028 OT_CHECK_NOARGS
1029 MkErrorC_Check(hdl,MqConfigSetAllDebug (hdl, data));
1030 OT_retObj_SET_None
1031 goto end;
1032 error:
1033 OT_retObj_SET_Error
1034 end:
1036}
1037
1039static OT_ProcRet NS(MqContextC_ConfigSetBuffersize) (MqContextC_ARGS) {
1041 OT_SETUP_ONEARG(ConfigSetBuffersize_doc)
1042 MK_I32 data = 0;
1043 OT_CHECK_REQUIRED(OT_CHECK_NI4 (data))
1044 OT_CHECK_NOARGS
1045 MqConfigSetBuffersize (hdl, data);
1046 OT_retObj_SET_None
1047 goto end;
1048 error:
1049 OT_retObj_SET_Error
1050 end:
1052}
1053
1055static OT_ProcRet NS(MqContextC_ConfigSetDaemon) (MqContextC_ARGS) {
1057 OT_SETUP_ONEARG(ConfigSetDaemon_doc)
1058 MK_STRN pidfile = 0;
1059 OT_CHECK_REQUIRED(OT_CHECK_STRN (pidfile))
1060 OT_CHECK_NOARGS
1061 MkErrorC_Check(hdl,MqConfigSetDaemon (hdl, pidfile));
1062 OT_retObj_SET_None
1063 goto end;
1064 error:
1065 OT_retObj_SET_Error
1066 end:
1068}
1069
1071static OT_ProcRet NS(MqContextC_ConfigSetIdentFrom) (MqContextC_ARGS) {
1073 OT_SETUP_ONEARG(ConfigSetIdentFrom_doc)
1074 enum MqIdentE data = 0;
1075 OT_CHECK_REQUIRED(OT_CHECK_ENUM (MqIdentE,data))
1076 OT_CHECK_NOARGS
1077 MqConfigSetIdentFrom (hdl, data);
1078 OT_retObj_SET_None
1079 goto end;
1080 error:
1081 OT_retObj_SET_Error
1082 end:
1084}
1085
1087static OT_ProcRet NS(MqContextC_ConfigSetIgnoreExit) (MqContextC_ARGS) {
1089 OT_SETUP_ONEARG(ConfigSetIgnoreExit_doc)
1090 MK_BOOL data = 0;
1091 OT_CHECK_REQUIRED(OT_CHECK_bool (data))
1092 OT_CHECK_NOARGS
1093 MqConfigSetIgnoreExit (hdl, data);
1094 OT_retObj_SET_None
1095 goto end;
1096 error:
1097 OT_retObj_SET_Error
1098 end:
1100}
1101
1103static OT_ProcRet NS(MqContextC_ConfigSetIoPipe) (MqContextC_ARGS) {
1105 OT_SETUP_ONEARG(ConfigSetIoPipe_doc)
1106 MQ_SOCK_HDL fh = 0;
1107 OT_CHECK_REQUIRED(OT_CHECK_NI4 (fh))
1108 OT_CHECK_NOARGS
1109 MkErrorC_Check(hdl,MqConfigSetIoPipe (hdl, fh));
1110 OT_retObj_SET_None
1111 goto end;
1112 error:
1113 OT_retObj_SET_Error
1114 end:
1116}
1117
1119static OT_ProcRet NS(MqContextC_ConfigSetIoTcp) (MqContextC_ARGS) {
1121 OT_SETUP_VARARGS(0,4,ConfigSetIoTcp_doc)
1122 MK_STRN host = NULL;
1123 OT_CHECK_OPTIONAL(OT_CHECK_STRN (host))
1124 MK_STRN port = NULL;
1125 OT_CHECK_OPTIONAL(OT_CHECK_STRN (port))
1126 MK_STRN myhost = NULL;
1127 OT_CHECK_OPTIONAL(OT_CHECK_STRN (myhost))
1128 MK_STRN myport = NULL;
1129 OT_CHECK_OPTIONAL(OT_CHECK_STRN (myport))
1130 OT_CHECK_NOARGS
1131 MkErrorC_Check(hdl,MqConfigSetIoTcp (hdl, host, port, myhost, myport));
1132 OT_retObj_SET_None
1133 goto end;
1134 error:
1135 OT_retObj_SET_Error
1136 end:
1138}
1139
1141static OT_ProcRet NS(MqContextC_ConfigSetIoTcpL) (MqContextC_ARGS) {
1143 OT_SETUP_ONEARG(ConfigSetIoTcpL_doc)
1144 MkBufferListCreateTLS_T(vals,10);
1145 OT_CHECK_REQUIRED(OT_CHECK_BFL (vals,MK_NULL_NO))
1146 OT_CHECK_NOARGS
1147 MkErrorC_Check(hdl,MqConfigSetIoTcpL (hdl, vals));
1148 OT_retObj_SET_None
1149 goto end;
1150 error:
1151 OT_retObj_SET_Error
1152 end:
1154}
1155
1157static OT_ProcRet NS(MqContextC_ConfigSetIoUds) (MqContextC_ARGS) {
1159 OT_SETUP_ONEARG(ConfigSetIoUds_doc)
1160 MK_STRN file = 0;
1161 OT_CHECK_REQUIRED(OT_CHECK_STRN (file))
1162 OT_CHECK_NOARGS
1163 MkErrorC_Check(hdl,MqConfigSetIoUds (hdl, file));
1164 OT_retObj_SET_None
1165 goto end;
1166 error:
1167 OT_retObj_SET_Error
1168 end:
1170}
1171
1173static OT_ProcRet NS(MqContextC_ConfigSetIsServer) (MqContextC_ARGS) {
1175 OT_SETUP_ONEARG(ConfigSetIsServer_doc)
1176 MK_BOOL data = 0;
1177 OT_CHECK_REQUIRED(OT_CHECK_bool (data))
1178 OT_CHECK_NOARGS
1179 MqConfigSetIsServer (hdl, data);
1180 OT_retObj_SET_None
1181 goto end;
1182 error:
1183 OT_retObj_SET_Error
1184 end:
1186}
1187
1189static OT_ProcRet NS(MqContextC_ConfigSetIsString) (MqContextC_ARGS) {
1191 OT_SETUP_ONEARG(ConfigSetIsString_doc)
1192 MK_BOOL data = 0;
1193 OT_CHECK_REQUIRED(OT_CHECK_bool (data))
1194 OT_CHECK_NOARGS
1195 MqConfigSetIsString (hdl, data);
1196 OT_retObj_SET_None
1197 goto end;
1198 error:
1199 OT_retObj_SET_Error
1200 end:
1202}
1203
1205static OT_ProcRet NS(MqContextC_ConfigSetName) (MqContextC_ARGS) {
1207 OT_SETUP_ONEARG(ConfigSetName_doc)
1208 MK_STRN data = 0;
1209 OT_CHECK_REQUIRED(OT_CHECK_STRN (data))
1210 OT_CHECK_NOARGS
1211 MqConfigSetName (hdl, data);
1212 OT_retObj_SET_None
1213 goto end;
1214 error:
1215 OT_retObj_SET_Error
1216 end:
1218}
1219
1221static OT_ProcRet NS(MqContextC_ConfigSetPkgsize) (MqContextC_ARGS) {
1223 OT_SETUP_ONEARG(ConfigSetPkgsize_doc)
1224 MK_I32 data = 0;
1225 OT_CHECK_REQUIRED(OT_CHECK_NI4 (data))
1226 OT_CHECK_NOARGS
1227 MqConfigSetPkgsize (hdl, data);
1228 OT_retObj_SET_None
1229 goto end;
1230 error:
1231 OT_retObj_SET_Error
1232 end:
1234}
1235
1237static OT_ProcRet NS(MqContextC_ConfigSetPostfix) (MqContextC_ARGS) {
1239 OT_SETUP_ONEARG(ConfigSetPostfix_doc)
1240 MK_STRN data = 0;
1241 OT_CHECK_REQUIRED(OT_CHECK_STRN (data))
1242 OT_CHECK_NOARGS
1243 MqConfigSetPostfix (hdl, data);
1244 OT_retObj_SET_None
1245 goto end;
1246 error:
1247 OT_retObj_SET_Error
1248 end:
1250}
1251
1253static OT_ProcRet NS(MqContextC_ConfigSetPrefix) (MqContextC_ARGS) {
1255 OT_SETUP_ONEARG(ConfigSetPrefix_doc)
1256 MK_STRN data = 0;
1257 OT_CHECK_REQUIRED(OT_CHECK_STRN (data))
1258 OT_CHECK_NOARGS
1259 MqConfigSetPrefix (hdl, data);
1260 OT_retObj_SET_None
1261 goto end;
1262 error:
1263 OT_retObj_SET_Error
1264 end:
1266}
1267
1269static OT_ProcRet NS(MqContextC_ConfigSetStartAs) (MqContextC_ARGS) {
1271 OT_SETUP_ONEARG(ConfigSetStartAs_doc)
1272 enum MqStartE data = 0;
1273 OT_CHECK_REQUIRED(OT_CHECK_ENUM (MqStartE,data))
1274 OT_CHECK_NOARGS
1275 MkErrorC_Check(hdl,MqConfigSetStartAs (hdl, data));
1276 OT_retObj_SET_None
1277 goto end;
1278 error:
1279 OT_retObj_SET_Error
1280 end:
1282}
1283
1285static OT_ProcRet NS(MqContextC_ConfigSetStartAsString) (MqContextC_ARGS) {
1287 OT_SETUP_ONEARG(ConfigSetStartAsString_doc)
1288 MK_STRN data = 0;
1289 OT_CHECK_REQUIRED(OT_CHECK_STRN (data))
1290 OT_CHECK_NOARGS
1291 MkErrorC_Check(hdl,MqConfigSetStartAsString (hdl, data));
1292 OT_retObj_SET_None
1293 goto end;
1294 error:
1295 OT_retObj_SET_Error
1296 end:
1298}
1299
1301static OT_ProcRet NS(MqContextC_ConfigSetStorage) (MqContextC_ARGS) {
1303 OT_SETUP_ONEARG(ConfigSetStorage_doc)
1304 MK_STRN data = 0;
1305 OT_CHECK_REQUIRED(OT_CHECK_STRN (data))
1306 OT_CHECK_NOARGS
1307 MqConfigSetStorage (hdl, data);
1308 OT_retObj_SET_None
1309 goto end;
1310 error:
1311 OT_retObj_SET_Error
1312 end:
1314}
1315
1317static OT_ProcRet NS(MqContextC_ConfigSetTimeout) (MqContextC_ARGS) {
1319 OT_SETUP_ONEARG(ConfigSetTimeout_doc)
1320 MK_TIME_T data = 0;
1321 OT_CHECK_REQUIRED(OT_CHECK_TIME_T (data))
1322 OT_CHECK_NOARGS
1323 MqConfigSetTimeout (hdl, data);
1324 OT_retObj_SET_None
1325 goto end;
1326 error:
1327 OT_retObj_SET_Error
1328 end:
1330}
1331
1333// MqContextC_ConfigApi_Set_PY_API
1334
1338
1339// doc-key: MqContextC,MqContextC-EnvApi-Env,om_
1340
1342static OT_ProcRet NS(MqContextC_EnvProtect) (MqContextC_ARGS) {
1344 OT_SETUP_NOARG(EnvProtect_doc)
1345 OT_CHECK_NOARGS
1346 MqEnvProtect (hdl);
1347 OT_retObj_SET_None
1348 goto end;
1349 error:
1350 OT_retObj_SET_Error
1351 end:
1353}
1354
1356static OT_ProcRet NS(MqContextC_EnvRestore) (MqContextC_ARGS) {
1358 OT_SETUP_NOARG(EnvRestore_doc)
1359 OT_CHECK_NOARGS
1360 MqEnvRestore (hdl);
1361 OT_retObj_SET_None
1362 goto end;
1363 error:
1364 OT_retObj_SET_Error
1365 end:
1367}
1368
1370// MqContextC_EnvApi_Env_PY_API
1371
1375
1376// doc-key: MqContextC,MqContextC-ErrorApi-Error,oc_
1377
1379static OT_ProcRet NS(MqContextC_ErrorFORMAT) (MqContextC_ARGS) {
1381 OT_SETUP_NOARG(ErrorFORMAT_doc)
1382 OT_CHECK_NOARGS
1383 MK_ERR retVal = MqContextErrorFORMAT (hdl);
1384 OT_retObj_SET_ERR(retVal)
1385 goto end;
1386 error:
1387 OT_retObj_SET_Error
1388 end:
1390}
1391
1392// doc-key: MqContextC,MqContextC-ErrorApi-Error,om_
1393
1395OT_ProcRet NS(MqContextC_ErrorCopy) (MqContextC_ARGS) {
1397 OT_SETUP_ONEARG(ErrorCopy_doc)
1398 MQ_CTXN sourceCtx = 0;
1399 OT_CHECK_REQUIRED(OT_CHECK_CTXN (sourceCtx,MK_NULL_NO))
1400 OT_CHECK_NOARGS
1401 OT_retObj_SET(OT_NEW_Mk_enum_OBJ(ErrorE,MqContextErrorCopy (hdl, sourceCtx)))
1402 goto end;
1403 error:
1404 OT_retObj_SET_Error
1405 end:
1407}
1408
1410OT_ProcRet NS(MqContextC_ErrorMove) (MqContextC_ARGS) {
1412 OT_SETUP_ONEARG(ErrorMove_doc)
1413 MQ_CTXN sourceCtx = 0;
1414 OT_CHECK_REQUIRED(OT_CHECK_CTXN (sourceCtx,MK_NULL_NO))
1415 OT_CHECK_NOARGS
1416 OT_retObj_SET(OT_NEW_Mk_enum_OBJ(ErrorE,MqContextErrorMove (hdl, sourceCtx)))
1417 goto end;
1418 error:
1419 OT_retObj_SET_Error
1420 end:
1422}
1423
1425// MqContextC_ErrorApi_Error_PY_API
1426
1430
1431// doc-key: MqContextC,MqContextC-HighApi-High,om_
1432
1434OT_ProcRet NS(MqContextC_Send) (MqContextC_ARGS) ; // skip template-required
1435
1437// MqContextC_HighApi_High_PY_API
1438
1442
1443// doc-key: MqContextC,MqContextC-LinkApi-Link,oc_
1444
1446static OT_ProcRet NS(MqContextC_LinkGetParent) (MqContextC_ARGS) {
1448 OT_SETUP_NOARG(LinkGetParent_doc)
1449 OT_CHECK_NOARGS
1450 MQ_CTX retVal = MqLinkGetParent (hdl);
1451 OT_retObj_SET_CTX(retVal)
1452 goto end;
1453 error:
1454 OT_retObj_SET_Error
1455 end:
1457}
1458
1459// doc-key: MqContextC,MqContextC-LinkApi-Link,om_
1460
1462static OT_ProcRet NS(MqContextC_LinkConnect) (MqContextC_ARGS) {
1464 OT_SETUP_NOARG(LinkConnect_doc)
1465 OT_CHECK_NOARGS
1466 MkErrorC_Check(hdl,MqLinkConnect (hdl));
1467 OT_retObj_SET_None
1468 goto end;
1469 error:
1470 OT_retObj_SET_Error
1471 end:
1473}
1474
1476static OT_ProcRet NS(MqContextC_LinkCreate) (MqContextC_ARGS) {
1478 OT_SETUP_VARARGS(0,99,LinkCreate_doc)
1479 MkBufferListCreateTLS_T(args,10);
1480 OT_CHECK_OPTIONAL(OT_CHECK_BAC (args))
1481 OT_CHECK_NOARGS
1482 MkErrorC_Check(hdl,MqLinkCreate (hdl, args));
1483 OT_retObj_SET_None
1484 goto end;
1485 error:
1486 OT_retObj_SET_Error
1487 end:
1489}
1490
1492static OT_ProcRet NS(MqContextC_LinkCreateChild) (MqContextC_ARGS) {
1494 OT_SETUP_VARARGS(1,99,LinkCreateChild_doc)
1495 MQ_CTX parent = 0;
1496 OT_CHECK_REQUIRED(OT_CHECK_CTX (parent,MK_NULL_NO))
1497 MkBufferListCreateTLS_T(args,10);
1498 OT_CHECK_OPTIONAL(OT_CHECK_BAC (args))
1499 OT_CHECK_NOARGS
1500 MkErrorC_Check(hdl,MqLinkCreateChild (hdl, parent, args));
1501 OT_retObj_SET_None
1502 goto end;
1503 error:
1504 OT_retObj_SET_Error
1505 end:
1507}
1508
1510static OT_ProcRet NS(MqContextC_LinkDelete) (MqContextC_ARGS) {
1512 OT_SETUP_NOARG(LinkDelete_doc)
1513 OT_CHECK_NOARGS
1514 MqLinkDelete (hdl);
1515 OT_retObj_SET_None
1516 goto end;
1517 error:
1518 OT_retObj_SET_Error
1519 end:
1521}
1522
1524static OT_ProcRet NS(MqContextC_LinkGetCtxId) (MqContextC_ARGS) {
1526 OT_SETUP_NOARG(LinkGetCtxId_doc)
1527 OT_CHECK_NOARGS
1528 OT_retObj_SET_I32(MqLinkGetCtxId (hdl))
1529 goto end;
1530 error:
1531 OT_retObj_SET_Error
1532 end:
1534}
1535
1537static OT_ProcRet NS(MqContextC_LinkGetTargetIdent) (MqContextC_ARGS) {
1539 OT_SETUP_NOARG(LinkGetTargetIdent_doc)
1540 OT_CHECK_NOARGS
1541 OT_retObj_SET_STR(MqLinkGetTargetIdent (hdl))
1542 goto end;
1543 error:
1544 OT_retObj_SET_Error
1545 end:
1547}
1548
1550static OT_ProcRet NS(MqContextC_LinkIsConnected) (MqContextC_ARGS) {
1552 OT_SETUP_NOARG(LinkIsConnected_doc)
1553 OT_CHECK_NOARGS
1554 OT_retObj_SET_BOL(MqLinkIsConnected (hdl))
1555 goto end;
1556 error:
1557 OT_retObj_SET_Error
1558 end:
1560}
1561
1563static OT_ProcRet NS(MqContextC_LinkIsParent) (MqContextC_ARGS) {
1565 OT_SETUP_NOARG(LinkIsParent_doc)
1566 OT_CHECK_NOARGS
1567 OT_retObj_SET_BOL(MqLinkIsParent (hdl))
1568 goto end;
1569 error:
1570 OT_retObj_SET_Error
1571 end:
1573}
1574
1576static OT_ProcRet NS(MqContextC_LinkShutdown) (MqContextC_ARGS) {
1578 OT_SETUP_NOARG(LinkShutdown_doc)
1579 OT_CHECK_NOARGS
1580 MkErrorC_Check(hdl,MqLinkShutdown (hdl));
1581 OT_retObj_SET_None
1582 goto end;
1583 error:
1584 OT_retObj_SET_Error
1585 end:
1587}
1588
1590// MqContextC_LinkApi_Link_PY_API
1591
1595
1596// doc-key: MqContextC,MqContextC-LogApi-Log,om_
1597
1598// skip class-overload: Log = MqContextLog → MkObjectLog
1599
1601static OT_ProcRet NS(MqContextC_LogConfig) (MqContextC_ARGS) {
1603 OT_SETUP_VARARGS(0,4,LogConfig_doc)
1604 MK_OBJN fmtobj = NULL;
1605 OT_CHECK_OPTIONAL(OT_CHECK_OBJN (fmtobj,MK_NULL_YES))
1606 MK_DBG debug = 0;
1607 OT_CHECK_OPTIONAL(OT_CHECK_NI4 (debug))
1608 MK_STRN callfunc = NULL;
1609 OT_CHECK_OPTIONAL(OT_CHECK_STRN (callfunc))
1610 MK_I32 lvl = 0;
1611 OT_CHECK_OPTIONAL(OT_CHECK_NI4 (lvl))
1612 OT_CHECK_NOARGS
1613 if (debug > MkRuntimeGetDebug()) {
1614 OT_retObj_SET_None;
1615 goto end;
1616 }
1617 if (MkSysStringIsNULL(callfunc)) {callfunc = OT_GET_CALL_PROC;}
1618 OT_FRAME_CLEANUP;
1619 MqContextLogConfig (hdl, fmtobj, debug, callfunc, lvl);
1620 OT_retObj_SET_None
1621 goto end;
1622 error:
1623 OT_retObj_SET_Error
1624 end:
1626}
1627
1629static OT_ProcRet NS(MqContextC_LogEnv) (MqContextC_ARGS) {
1631 OT_SETUP_VARARGS(0,4,LogEnv_doc)
1632 MK_OBJN fmtobj = NULL;
1633 OT_CHECK_OPTIONAL(OT_CHECK_OBJN (fmtobj,MK_NULL_YES))
1634 MK_DBG debug = 0;
1635 OT_CHECK_OPTIONAL(OT_CHECK_NI4 (debug))
1636 MK_STRN callfunc = NULL;
1637 OT_CHECK_OPTIONAL(OT_CHECK_STRN (callfunc))
1638 MK_I32 lvl = 0;
1639 OT_CHECK_OPTIONAL(OT_CHECK_NI4 (lvl))
1640 OT_CHECK_NOARGS
1641 if (debug > MkRuntimeGetDebug()) {
1642 OT_retObj_SET_None;
1643 goto end;
1644 }
1645 if (MkSysStringIsNULL(callfunc)) {callfunc = OT_GET_CALL_PROC;}
1646 OT_FRAME_CLEANUP;
1647 MqContextLogEnv (hdl, fmtobj, debug, callfunc, lvl);
1648 OT_retObj_SET_None
1649 goto end;
1650 error:
1651 OT_retObj_SET_Error
1652 end:
1654}
1655
1657static OT_ProcRet NS(MqContextC_LogLink) (MqContextC_ARGS) {
1659 OT_SETUP_VARARGS(0,4,LogLink_doc)
1660 MK_OBJN fmtobj = NULL;
1661 OT_CHECK_OPTIONAL(OT_CHECK_OBJN (fmtobj,MK_NULL_YES))
1662 MK_DBG debug = 0;
1663 OT_CHECK_OPTIONAL(OT_CHECK_NI4 (debug))
1664 MK_STRN callfunc = NULL;
1665 OT_CHECK_OPTIONAL(OT_CHECK_STRN (callfunc))
1666 MK_I32 lvl = 0;
1667 OT_CHECK_OPTIONAL(OT_CHECK_NI4 (lvl))
1668 OT_CHECK_NOARGS
1669 if (debug > MkRuntimeGetDebug()) {
1670 OT_retObj_SET_None;
1671 goto end;
1672 }
1673 if (MkSysStringIsNULL(callfunc)) {callfunc = OT_GET_CALL_PROC;}
1674 OT_FRAME_CLEANUP;
1675 MqContextLogLink (hdl, fmtobj, debug, callfunc, lvl);
1676 OT_retObj_SET_None
1677 goto end;
1678 error:
1679 OT_retObj_SET_Error
1680 end:
1682}
1683
1685static OT_ProcRet NS(MqContextC_LogSetup) (MqContextC_ARGS) {
1687 OT_SETUP_VARARGS(0,4,LogSetup_doc)
1688 MK_OBJN fmtobj = NULL;
1689 OT_CHECK_OPTIONAL(OT_CHECK_OBJN (fmtobj,MK_NULL_YES))
1690 MK_DBG debug = 0;
1691 OT_CHECK_OPTIONAL(OT_CHECK_NI4 (debug))
1692 MK_STRN callfunc = NULL;
1693 OT_CHECK_OPTIONAL(OT_CHECK_STRN (callfunc))
1694 MK_I32 lvl = 0;
1695 OT_CHECK_OPTIONAL(OT_CHECK_NI4 (lvl))
1696 OT_CHECK_NOARGS
1697 if (debug > MkRuntimeGetDebug()) {
1698 OT_retObj_SET_None;
1699 goto end;
1700 }
1701 if (MkSysStringIsNULL(callfunc)) {callfunc = OT_GET_CALL_PROC;}
1702 OT_FRAME_CLEANUP;
1703 MqContextLogSetup (hdl, fmtobj, debug, callfunc, lvl);
1704 OT_retObj_SET_None
1705 goto end;
1706 error:
1707 OT_retObj_SET_Error
1708 end:
1710}
1711
1713static OT_ProcRet NS(MqContextC_LogShort) (MqContextC_ARGS) {
1715 OT_SETUP_VARARGS(0,5,LogShort_doc)
1716 MK_OBJN fmtobj = NULL;
1717 OT_CHECK_OPTIONAL(OT_CHECK_OBJN (fmtobj,MK_NULL_YES))
1718 MK_DBG debug = 0;
1719 OT_CHECK_OPTIONAL(OT_CHECK_NI4 (debug))
1720 MK_STRN callfunc = NULL;
1721 OT_CHECK_OPTIONAL(OT_CHECK_STRN (callfunc))
1722 MK_I32 lvl = 0;
1723 OT_CHECK_OPTIONAL(OT_CHECK_NI4 (lvl))
1724 MK_STRN label = NULL;
1725 OT_CHECK_OPTIONAL(OT_CHECK_STRN (label))
1726 OT_CHECK_NOARGS
1727 if (debug > MkRuntimeGetDebug()) {
1728 OT_retObj_SET_None;
1729 goto end;
1730 }
1731 if (MkSysStringIsNULL(callfunc)) {callfunc = OT_GET_CALL_PROC;}
1732 OT_FRAME_CLEANUP;
1733 MqContextLogShort (hdl, fmtobj, debug, callfunc, lvl, label);
1734 OT_retObj_SET_None
1735 goto end;
1736 error:
1737 OT_retObj_SET_Error
1738 end:
1740}
1741
1743static OT_ProcRet NS(MqContextC_LogType) (MqContextC_ARGS) {
1745 OT_SETUP_VARARGS(0,4,LogType_doc)
1746 MK_OBJN fmtobj = NULL;
1747 OT_CHECK_OPTIONAL(OT_CHECK_OBJN (fmtobj,MK_NULL_YES))
1748 MK_DBG debug = 0;
1749 OT_CHECK_OPTIONAL(OT_CHECK_NI4 (debug))
1750 MK_STRN callfunc = NULL;
1751 OT_CHECK_OPTIONAL(OT_CHECK_STRN (callfunc))
1752 MK_I32 lvl = 0;
1753 OT_CHECK_OPTIONAL(OT_CHECK_NI4 (lvl))
1754 OT_CHECK_NOARGS
1755 if (debug > MkRuntimeGetDebug()) {
1756 OT_retObj_SET_None;
1757 goto end;
1758 }
1759 if (MkSysStringIsNULL(callfunc)) {callfunc = OT_GET_CALL_PROC;}
1760 OT_FRAME_CLEANUP;
1761 MqContextLogType (hdl, fmtobj, debug, callfunc, lvl);
1762 OT_retObj_SET_None
1763 goto end;
1764 error:
1765 OT_retObj_SET_Error
1766 end:
1768}
1769
1771static OT_ProcRet NS(MqContextC_LogParentOrChild) (MqContextC_ARGS) {
1773 OT_SETUP_NOARG(LogParentOrChild_doc)
1774 OT_CHECK_NOARGS
1775 OT_retObj_SET_STR(MqLogParentOrChild (hdl))
1776 goto end;
1777 error:
1778 OT_retObj_SET_Error
1779 end:
1781}
1782
1784static OT_ProcRet NS(MqContextC_LogServerOrClient) (MqContextC_ARGS) {
1786 OT_SETUP_NOARG(LogServerOrClient_doc)
1787 OT_CHECK_NOARGS
1788 OT_retObj_SET_STR(MqLogServerOrClient (hdl))
1789 goto end;
1790 error:
1791 OT_retObj_SET_Error
1792 end:
1794}
1795
1797// MqContextC_LogApi_Log_PY_API
1798
1802
1803// doc-key: MqContextC,MqContextC-MiscApi-Misc,oc_
1804
1806static OT_ProcRet NS(MqContextC_GetBuffer) (MqContextC_ARGS) {
1808 OT_SETUP_NOARG(GetBuffer_doc)
1809 OT_CHECK_NOARGS
1810 MK_BUF retVal = MqContextGetBuffer (hdl);
1811 OT_retObj_SET_BUF(retVal)
1812 goto end;
1813 error:
1814 OT_retObj_SET_Error
1815 end:
1817}
1818
1820static OT_ProcRet NS(MqContextC_GetRoot) (MqContextC_ARGS) {
1822 OT_SETUP_NOARG(GetRoot_doc)
1823 OT_CHECK_NOARGS
1824 MQ_CTX retVal = MqGetRoot (hdl);
1825 OT_retObj_SET_CTX(retVal)
1826 goto end;
1827 error:
1828 OT_retObj_SET_Error
1829 end:
1831}
1832
1833// doc-key: MqContextC,MqContextC-MiscApi-Misc,om_
1834
1835// skip class-overload: ToString = MqContextToString → MkObjectToString
1836
1838static OT_ProcRet NS(MqContextC_Exit) (MqContextC_ARGS) {
1840 OT_SETUP_VARARGS(0,3,Exit_doc)
1841 MK_STRN callfunc = NULL;
1842 OT_CHECK_OPTIONAL(OT_CHECK_STRN (callfunc))
1843 MK_STRN callfile = NULL;
1844 OT_CHECK_OPTIONAL(OT_CHECK_STRN (callfile))
1845 MK_I32 callline = -1;
1846 OT_CHECK_OPTIONAL(OT_CHECK_NI4 (callline))
1847 OT_CHECK_NOARGS
1848 if (callline == -1 ) {callline = OT_GET_CALL_LINE;}
1849 if (MkSysStringIsNULL(callfile)) {callfile = OT_GET_CALL_FILE;}
1850 if (MkSysStringIsNULL(callfunc)) {callfunc = OT_GET_CALL_PROC;}
1851 OT_FRAME_CLEANUP;
1852 MqExit (hdl, callfunc, callfile, callline);
1853 OT_retObj_SET_None
1854 goto end;
1855 error:
1856 OT_retObj_SET_Error
1857 end:
1859}
1860
1862static OT_ProcRet NS(MqContextC_ProcessEvent) (MqContextC_ARGS) {
1864 OT_SETUP_VARARGS(0,2,ProcessEvent_doc)
1865 enum MqWaitOnEventE wait = MQ_WAIT_NO;
1866 OT_CHECK_OPTIONAL(OT_CHECK_ENUM (MqWaitOnEventE,wait))
1867 MK_TIME_T timeout = MK_TIMEOUT_DEFAULT;
1868 OT_CHECK_OPTIONAL(OT_CHECK_TIME_T (timeout))
1869 OT_CHECK_NOARGS
1870 MkErrorC_Check(hdl,MqProcessEvent (hdl, wait, timeout));
1871 OT_retObj_SET_None
1872 goto end;
1873 error:
1874 OT_retObj_SET_Error
1875 end:
1877}
1878
1880// MqContextC_MiscApi_Misc_PY_API
1881
1885
1886// doc-key: MqContextC,MqContextC-ProxyApi-Proxy,om_
1887
1889static OT_ProcRet NS(MqContextC_ProxyForward) (MqContextC_ARGS) {
1891 OT_SETUP_VARARGS(1,3,ProxyForward_doc)
1892 MQ_CTX targetCtx = 0;
1893 OT_CHECK_REQUIRED(OT_CHECK_CTX (targetCtx,MK_NULL_NO))
1894 MQ_DMP dump = NULL;
1895 OT_CHECK_OPTIONAL(OT_CHECK_DMP (dump,MK_NULL_YES))
1896 MK_TIME_T timeout = MK_TIMEOUT_DEFAULT;
1897 OT_CHECK_OPTIONAL(OT_CHECK_TIME_T (timeout))
1898 OT_CHECK_NOARGS
1899 MkErrorC_Check(hdl,MqProxyForward (hdl, targetCtx, dump, timeout));
1900 OT_retObj_SET_None
1901 goto end;
1902 error:
1903 OT_retObj_SET_Error
1904 end:
1906}
1907
1909static OT_ProcRet NS(MqContextC_ProxyItem) (MqContextC_ARGS) {
1911 OT_SETUP_ONEARG(ProxyItem_doc)
1912 MQ_CTX targetCtx = 0;
1913 OT_CHECK_REQUIRED(OT_CHECK_CTX (targetCtx,MK_NULL_NO))
1914 OT_CHECK_NOARGS
1915 MkErrorC_Check(hdl,MqProxyItem (hdl, targetCtx));
1916 OT_retObj_SET_None
1917 goto end;
1918 error:
1919 OT_retObj_SET_Error
1920 end:
1922}
1923
1925// MqContextC_ProxyApi_Proxy_PY_API
1926
1930
1931// doc-key: MqContextC,MqContextC-ReadApi-Atom,oci
1932
1934static OT_ProcRet NS(MqContextC_ReadALL) (MqContextC_ARGS) {
1936 OT_SETUP_VARARGS(0,1,ReadALL_doc)
1937 MkBufferListCreateTLS_T(val_inout,10);
1938 OT_CHECK_OPTIONAL(OT_CHECK_BFL (val_inout,MK_NULL_YES))
1939 OT_CHECK_NOARGS
1940 MkErrorC_Check(hdl,MqReadALL (hdl, &val_inout));
1941 OT_retObj_SET_BFL(val_inout)
1942 goto end;
1943 error:
1944 OT_retObj_SET_Error
1945 end:
1947}
1948
1949// doc-key: MqContextC,MqContextC-ReadApi-Atom,oco
1950
1952static OT_ProcRet NS(MqContextC_ReadBFL) (MqContextC_ARGS) {
1954 OT_SETUP_NOARG(ReadBFL_doc)
1955 OT_CHECK_NOARGS
1956 MK_BFL val_out;
1957 MkErrorC_Check(hdl,MqReadBFL (hdl, &val_out));
1958 OT_retObj_SET_BFL(val_out)
1959 goto end;
1960 error:
1961 OT_retObj_SET_Error
1962 end:
1964}
1965
1967static OT_ProcRet NS(MqContextC_ReadBUF) (MqContextC_ARGS) {
1969 OT_SETUP_NOARG(ReadBUF_doc)
1970 OT_CHECK_NOARGS
1971 MK_BUF val_out;
1972 MkErrorC_Check(hdl,MqReadBUF (hdl, &val_out));
1973 OT_retObj_SET_BUF(val_out)
1974 goto end;
1975 error:
1976 OT_retObj_SET_Error
1977 end:
1979}
1980
1981// doc-key: MqContextC,MqContextC-ReadApi-Atom,omo
1982
1984static OT_ProcRet NS(MqContextC_ReadBIN) (MqContextC_ARGS) {
1986 OT_SETUP_NOARG(ReadBIN_doc)
1987 OT_CHECK_NOARGS
1988 MkBinaryR val_out;
1989 MkErrorC_Check(hdl,MqReadBIN (hdl, &val_out));
1990 MkBinaryR retVal = val_out;
1991 OT_retObj_SET(OT_GET__ME_REF_MkBinaryR(retVal))
1992 goto end;
1993 error:
1994 OT_retObj_SET_Error
1995 end:
1997}
1998
2000static OT_ProcRet NS(MqContextC_ReadBOL) (MqContextC_ARGS) {
2002 OT_SETUP_NOARG(ReadBOL_doc)
2003 OT_CHECK_NOARGS
2004 MK_BOL val_out;
2005 MkErrorC_Check(hdl,MqReadBOL (hdl, &val_out));
2006 OT_retObj_SET_BOL(val_out == 1)
2007 goto end;
2008 error:
2009 OT_retObj_SET_Error
2010 end:
2012}
2013
2015static OT_ProcRet NS(MqContextC_ReadBinaryR) (MqContextC_ARGS) {
2017 OT_SETUP_NOARG(ReadBinaryR_doc)
2018 OT_CHECK_NOARGS
2019 MkBinaryR val_out;
2020 MkErrorC_Check(hdl,MqReadBinaryR (hdl, &val_out));
2021 MkBinaryR retVal = val_out;
2022 OT_retObj_SET(OT_GET__ME_REF_MkBinaryR(retVal))
2023 goto end;
2024 error:
2025 OT_retObj_SET_Error
2026 end:
2028}
2029
2031static OT_ProcRet NS(MqContextC_ReadDBL) (MqContextC_ARGS) {
2033 OT_SETUP_NOARG(ReadDBL_doc)
2034 OT_CHECK_NOARGS
2035 MK_DBL val_out;
2036 MkErrorC_Check(hdl,MqReadDBL (hdl, &val_out));
2037 OT_retObj_SET_DBL(val_out)
2038 goto end;
2039 error:
2040 OT_retObj_SET_Error
2041 end:
2043}
2044
2046static OT_ProcRet NS(MqContextC_ReadFLT) (MqContextC_ARGS) {
2048 OT_SETUP_NOARG(ReadFLT_doc)
2049 OT_CHECK_NOARGS
2050 MK_FLT val_out;
2051 MkErrorC_Check(hdl,MqReadFLT (hdl, &val_out));
2052 OT_retObj_SET_FLT(val_out)
2053 goto end;
2054 error:
2055 OT_retObj_SET_Error
2056 end:
2058}
2059
2061static OT_ProcRet NS(MqContextC_ReadHDL) (MqContextC_ARGS) {
2063 OT_SETUP_NOARG(ReadHDL_doc)
2064 OT_CHECK_NOARGS
2065 MK_HDL val_out;
2066 MkErrorC_Check(hdl,MqReadHDL (hdl, &val_out));
2067 OT_retObj_SET_HDL(val_out)
2068 goto end;
2069 error:
2070 OT_retObj_SET_Error
2071 end:
2073}
2074
2076static OT_ProcRet NS(MqContextC_ReadI16) (MqContextC_ARGS) {
2078 OT_SETUP_NOARG(ReadI16_doc)
2079 OT_CHECK_NOARGS
2080 MK_I16 val_out;
2081 MkErrorC_Check(hdl,MqReadI16 (hdl, &val_out));
2082 OT_retObj_SET_I16(val_out)
2083 goto end;
2084 error:
2085 OT_retObj_SET_Error
2086 end:
2088}
2089
2091static OT_ProcRet NS(MqContextC_ReadI32) (MqContextC_ARGS) {
2093 OT_SETUP_NOARG(ReadI32_doc)
2094 OT_CHECK_NOARGS
2095 MK_I32 val_out;
2096 MkErrorC_Check(hdl,MqReadI32 (hdl, &val_out));
2097 OT_retObj_SET_I32(val_out)
2098 goto end;
2099 error:
2100 OT_retObj_SET_Error
2101 end:
2103}
2104
2106static OT_ProcRet NS(MqContextC_ReadI64) (MqContextC_ARGS) {
2108 OT_SETUP_NOARG(ReadI64_doc)
2109 OT_CHECK_NOARGS
2110 MK_I64 val_out;
2111 MkErrorC_Check(hdl,MqReadI64 (hdl, &val_out));
2112 OT_retObj_SET_I64(val_out)
2113 goto end;
2114 error:
2115 OT_retObj_SET_Error
2116 end:
2118}
2119
2121static OT_ProcRet NS(MqContextC_ReadI8) (MqContextC_ARGS) {
2123 OT_SETUP_NOARG(ReadI8_doc)
2124 OT_CHECK_NOARGS
2125 MK_I8 val_out;
2126 MkErrorC_Check(hdl,MqReadI8 (hdl, &val_out));
2127 OT_retObj_SET_I8(val_out)
2128 goto end;
2129 error:
2130 OT_retObj_SET_Error
2131 end:
2133}
2134
2136OT_ProcRet NS(MqContextC_ReadLIST) (MqContextC_ARGS) ; // skip template-required
2137
2139static OT_ProcRet NS(MqContextC_ReadLONG) (MqContextC_ARGS) {
2141 OT_SETUP_NOARG(ReadLONG_doc)
2142 OT_CHECK_NOARGS
2143 MK_LONG val_out;
2144 MkErrorC_Check(hdl,MqReadLONG (hdl, &val_out));
2145 OT_retObj_SET_LONG(val_out)
2146 goto end;
2147 error:
2148 OT_retObj_SET_Error
2149 end:
2151}
2152
2154OT_ProcRet NS(MqContextC_ReadNEXT) (MqContextC_ARGS) ; // skip template-required
2155
2157static OT_ProcRet NS(MqContextC_ReadSTR) (MqContextC_ARGS) {
2159 OT_SETUP_NOARG(ReadSTR_doc)
2160 OT_CHECK_NOARGS
2161 MK_STRN val_out;
2162 MkErrorC_Check(hdl,MqReadSTR (hdl, &val_out));
2163 OT_retObj_SET_STR(val_out)
2164 goto end;
2165 error:
2166 OT_retObj_SET_Error
2167 end:
2169}
2170
2172static OT_ProcRet NS(MqContextC_ReadStringR) (MqContextC_ARGS) {
2174 OT_SETUP_NOARG(ReadStringR_doc)
2175 OT_CHECK_NOARGS
2176 MkStringR val_out;
2177 MkErrorC_Check(hdl,MqReadStringR (hdl, &val_out));
2178 MkStringR retVal = val_out;
2179 OT_retObj_SET(OT_GET__ME_REF_MkStringR(retVal))
2180 goto end;
2181 error:
2182 OT_retObj_SET_Error
2183 end:
2185}
2186
2188// MqContextC_ReadApi_Atom_PY_API
2189
2193
2194// doc-key: MqContextC,MqContextC-ReadApi-Block,om_
2195
2197static OT_ProcRet NS(MqContextC_ReadL_END) (MqContextC_ARGS) {
2199 OT_SETUP_NOARG(ReadL_END_doc)
2200 OT_CHECK_NOARGS
2201 MkErrorC_Check(hdl,MqReadL_END (hdl));
2202 OT_retObj_SET_None
2203 goto end;
2204 error:
2205 OT_retObj_SET_Error
2206 end:
2208}
2209
2211static OT_ProcRet NS(MqContextC_ReadL_START) (MqContextC_ARGS) {
2213 OT_SETUP_VARARGS(0,1,ReadL_START_doc)
2214 MK_BUF buf = NULL;
2215 OT_CHECK_OPTIONAL(OT_CHECK_BUF (buf,MK_NULL_YES))
2216 OT_CHECK_NOARGS
2217 MkErrorC_Check(hdl,MqReadL_START (hdl, buf));
2218 OT_retObj_SET_None
2219 goto end;
2220 error:
2221 OT_retObj_SET_Error
2222 end:
2224}
2225
2227static OT_ProcRet NS(MqContextC_ReadT_END) (MqContextC_ARGS) {
2229 OT_SETUP_NOARG(ReadT_END_doc)
2230 OT_CHECK_NOARGS
2231 MkErrorC_Check(hdl,MqReadT_END (hdl));
2232 OT_retObj_SET_None
2233 goto end;
2234 error:
2235 OT_retObj_SET_Error
2236 end:
2238}
2239
2241static OT_ProcRet NS(MqContextC_ReadT_START) (MqContextC_ARGS) {
2243 OT_SETUP_NOARG(ReadT_START_doc)
2244 OT_CHECK_NOARGS
2245 MkErrorC_Check(hdl,MqReadT_START (hdl));
2246 OT_retObj_SET_None
2247 goto end;
2248 error:
2249 OT_retObj_SET_Error
2250 end:
2252}
2253
2255// MqContextC_ReadApi_Block_PY_API
2256
2260
2261// doc-key: MqContextC,MqContextC-ReadApi-Misc,om_
2262
2264static OT_ProcRet NS(MqContextC_ReadDbg) (MqContextC_ARGS) {
2266 OT_SETUP_NOARG(ReadDbg_doc)
2267 OT_CHECK_NOARGS
2268 MqReadDbg (hdl);
2269 OT_retObj_SET_None
2270 goto end;
2271 error:
2272 OT_retObj_SET_Error
2273 end:
2275}
2276
2278static OT_ProcRet NS(MqContextC_ReadGetNextType) (MqContextC_ARGS) {
2280 OT_SETUP_NOARG(ReadGetNextType_doc)
2281 OT_CHECK_NOARGS
2282 OT_retObj_SET(OT_NEW_Mk_enum_OBJ(TypeE,MqReadGetNextType (hdl)))
2283 goto end;
2284 error:
2285 OT_retObj_SET_Error
2286 end:
2288}
2289
2291static OT_ProcRet NS(MqContextC_ReadGetNumItems) (MqContextC_ARGS) {
2293 OT_SETUP_NOARG(ReadGetNumItems_doc)
2294 OT_CHECK_NOARGS
2295 OT_retObj_SET_I32(MqReadGetNumItems (hdl))
2296 goto end;
2297 error:
2298 OT_retObj_SET_Error
2299 end:
2301}
2302
2304static OT_ProcRet NS(MqContextC_ReadItemExists) (MqContextC_ARGS) {
2306 OT_SETUP_NOARG(ReadItemExists_doc)
2307 OT_CHECK_NOARGS
2308 OT_retObj_SET_BOL(MqReadItemExists (hdl))
2309 goto end;
2310 error:
2311 OT_retObj_SET_Error
2312 end:
2314}
2315
2317static OT_ProcRet NS(MqContextC_ReadUndo) (MqContextC_ARGS) {
2319 OT_SETUP_NOARG(ReadUndo_doc)
2320 OT_CHECK_NOARGS
2321 MkErrorC_Check(hdl,MqReadUndo (hdl));
2322 OT_retObj_SET_None
2323 goto end;
2324 error:
2325 OT_retObj_SET_Error
2326 end:
2328}
2329
2331// MqContextC_ReadApi_Misc_PY_API
2332
2336
2337// doc-key: MqContextC,MqContextC-RouteApi-Route,oco
2338
2340static OT_ProcRet NS(MqContextC_RouteGetTree) (MqContextC_ARGS) {
2342 OT_SETUP_NOARG(RouteGetTree_doc)
2343 OT_CHECK_NOARGS
2344 MK_BFL treeP_out;
2345 MkErrorC_Check(hdl,MqRouteGetTree (hdl, &treeP_out));
2346 OT_retObj_SET_BFL(treeP_out)
2347 goto end;
2348 error:
2349 OT_retObj_SET_Error
2350 end:
2352}
2353
2354// doc-key: MqContextC,MqContextC-RouteApi-Route,om_
2355
2357static OT_ProcRet NS(MqContextC_RouteCreate) (MqContextC_ARGS) {
2359 OT_SETUP_VARARGS(2,3,RouteCreate_doc)
2360 MK_STRN route = 0;
2361 OT_CHECK_REQUIRED(OT_CHECK_STRN (route))
2362 MK_STRN service = 0;
2363 OT_CHECK_REQUIRED(OT_CHECK_STRN (service))
2364 MK_BOOL overwrite = false;
2365 OT_CHECK_OPTIONAL(OT_CHECK_bool (overwrite))
2366 OT_CHECK_NOARGS
2367 MkErrorC_Check(hdl,MqRouteCreate (hdl, route, service, overwrite));
2368 OT_retObj_SET_None
2369 goto end;
2370 error:
2371 OT_retObj_SET_Error
2372 end:
2374}
2375
2377static OT_ProcRet NS(MqContextC_RouteDelete) (MqContextC_ARGS) {
2379 OT_SETUP_VARARGS(2,3,RouteDelete_doc)
2380 MK_STRN route = 0;
2381 OT_CHECK_REQUIRED(OT_CHECK_STRN (route))
2382 MK_STRN service = 0;
2383 OT_CHECK_REQUIRED(OT_CHECK_STRN (service))
2384 MK_BOOL overwrite = false;
2385 OT_CHECK_OPTIONAL(OT_CHECK_bool (overwrite))
2386 OT_CHECK_NOARGS
2387 MkErrorC_Check(hdl,MqRouteDelete (hdl, route, service, overwrite));
2388 OT_retObj_SET_None
2389 goto end;
2390 error:
2391 OT_retObj_SET_Error
2392 end:
2394}
2395
2397static OT_ProcRet NS(MqContextC_RouteResolve) (MqContextC_ARGS) {
2399 OT_SETUP_VARARGS(1,2,RouteResolve_doc)
2400 MK_STRN ident = 0;
2401 OT_CHECK_REQUIRED(OT_CHECK_STRN (ident))
2402 MK_NUM retnum = -1;
2403 OT_CHECK_OPTIONAL(OT_CHECK_NI4 (retnum))
2404 OT_CHECK_NOARGS
2405 MQ_CTX_A retVal = MqRouteResolve (hdl, ident, retnum);
2406 OT_retObj_SET_List
2407 for (int i=0; i<retVal.size; i++) {
2408 OT_retObj_APPEND(OT_TMP_CTX_OBJ(retVal.data[i]));
2409 }
2410 goto end;
2411 error:
2412 OT_retObj_SET_Error
2413 end:
2415}
2416
2418static OT_ProcRet NS(MqContextC_RouteTraverse) (MqContextC_ARGS) {
2420 OT_SETUP_VARARGS(1,99,RouteTraverse_doc)
2421 MK_STRN service = 0;
2422 OT_CHECK_REQUIRED(OT_CHECK_STRN (service))
2423 MkBufferListCreateTLS_T(args,10);
2424 OT_CHECK_OPTIONAL(OT_CHECK_BAC (args))
2425 OT_CHECK_NOARGS
2426 MkErrorC_Check(hdl,MqRouteTraverse (hdl, service, args));
2427 OT_retObj_SET_None
2428 goto end;
2429 error:
2430 OT_retObj_SET_Error
2431 end:
2433}
2434
2435// doc-key: MqContextC,MqContextC-RouteApi-Route,omo
2436
2438static OT_ProcRet NS(MqContextC_RouteGetPath) (MqContextC_ARGS) {
2440 OT_SETUP_NOARG(RouteGetPath_doc)
2441 OT_CHECK_NOARGS
2442 MK_STRN path_out;
2443 MkErrorC_Check(hdl,MqRouteGetPath (hdl, &path_out));
2444 OT_retObj_SET_STR(path_out)
2445 goto end;
2446 error:
2447 OT_retObj_SET_Error
2448 end:
2450}
2451
2453// MqContextC_RouteApi_Route_PY_API
2454
2458
2459// doc-key: MqContextC,MqContextC-SendApi-Atom,om_
2460
2462static OT_ProcRet NS(MqContextC_SendBFL) (MqContextC_ARGS) {
2464 OT_SETUP_ONEARG(SendBFL_doc)
2466 OT_CHECK_REQUIRED(OT_CHECK_BFLN (val,MK_NULL_NO))
2467 OT_CHECK_NOARGS
2468 MkErrorC_Check(hdl,MqSendBFL (hdl, val));
2469 OT_retObj_SET_None
2470 goto end;
2471 error:
2472 OT_retObj_SET_Error
2473 end:
2475}
2476
2478static OT_ProcRet NS(MqContextC_SendBIN) (MqContextC_ARGS) {
2480 OT_SETUP_ONEARG(SendBIN_doc)
2481 MkBinaryR val = {0};
2482 OT_CHECK_REQUIRED(OT_CHECK__ME_REF_MkBinaryR(val))
2483 OT_CHECK_NOARGS
2484 MkErrorC_Check(hdl,MqSendBIN (hdl, val));
2485 OT_retObj_SET_None
2486 goto end;
2487 error:
2488 OT_retObj_SET_Error
2489 end:
2491}
2492
2494static OT_ProcRet NS(MqContextC_SendBOL) (MqContextC_ARGS) {
2496 OT_SETUP_ONEARG(SendBOL_doc)
2497 MK_BOL val = 0;
2498 OT_CHECK_REQUIRED(OT_CHECK_NB1 (val))
2499 OT_CHECK_NOARGS
2500 MkErrorC_Check(hdl,MqSendBOL (hdl, (MK_BOL)(val?1:0)));
2501 OT_retObj_SET_None
2502 goto end;
2503 error:
2504 OT_retObj_SET_Error
2505 end:
2507}
2508
2510static OT_ProcRet NS(MqContextC_SendBUF) (MqContextC_ARGS) {
2512 OT_SETUP_ONEARG(SendBUF_doc)
2513 MK_BUFN val = 0;
2514 OT_CHECK_REQUIRED(OT_CHECK_BUFN (val,MK_NULL_NO))
2515 OT_CHECK_NOARGS
2516 MkErrorC_Check(hdl,MqSendBUF (hdl, val));
2517 OT_retObj_SET_None
2518 goto end;
2519 error:
2520 OT_retObj_SET_Error
2521 end:
2523}
2524
2526static OT_ProcRet NS(MqContextC_SendBUS_FLAT) (MqContextC_ARGS) {
2528 OT_SETUP_ONEARG(SendBUS_FLAT_doc)
2529 MK_BUSN val = 0;
2530 OT_CHECK_REQUIRED(OT_CHECK_BUSN (val,MK_NULL_NO))
2531 OT_CHECK_NOARGS
2532 MkErrorC_Check(hdl,MqSendBUS_FLAT (hdl, val));
2533 OT_retObj_SET_None
2534 goto end;
2535 error:
2536 OT_retObj_SET_Error
2537 end:
2539}
2540
2542static OT_ProcRet NS(MqContextC_SendBinaryR) (MqContextC_ARGS) {
2544 OT_SETUP_ONEARG(SendBinaryR_doc)
2545 MkBinaryR val = {0};
2546 OT_CHECK_REQUIRED(OT_CHECK__ME_REF_MkBinaryR(val))
2547 OT_CHECK_NOARGS
2548 MkErrorC_Check(hdl,MqSendBinaryR (hdl, val));
2549 OT_retObj_SET_None
2550 goto end;
2551 error:
2552 OT_retObj_SET_Error
2553 end:
2555}
2556
2558static OT_ProcRet NS(MqContextC_SendDBL) (MqContextC_ARGS) {
2560 OT_SETUP_ONEARG(SendDBL_doc)
2561 MK_DBL val = 0;
2562 OT_CHECK_REQUIRED(OT_CHECK_NF8 (val))
2563 OT_CHECK_NOARGS
2564 MkErrorC_Check(hdl,MqSendDBL (hdl, val));
2565 OT_retObj_SET_None
2566 goto end;
2567 error:
2568 OT_retObj_SET_Error
2569 end:
2571}
2572
2574static OT_ProcRet NS(MqContextC_SendFLT) (MqContextC_ARGS) {
2576 OT_SETUP_ONEARG(SendFLT_doc)
2577 MK_FLT val = 0;
2578 OT_CHECK_REQUIRED(OT_CHECK_NF4 (val))
2579 OT_CHECK_NOARGS
2580 MkErrorC_Check(hdl,MqSendFLT (hdl, val));
2581 OT_retObj_SET_None
2582 goto end;
2583 error:
2584 OT_retObj_SET_Error
2585 end:
2587}
2588
2590static OT_ProcRet NS(MqContextC_SendHDL) (MqContextC_ARGS) {
2592 OT_SETUP_ONEARG(SendHDL_doc)
2593 MK_HDL val = 0;
2594 OT_CHECK_REQUIRED(OT_CHECK_NIH (val))
2595 OT_CHECK_NOARGS
2596 MkErrorC_Check(hdl,MqSendHDL (hdl, val));
2597 OT_retObj_SET_None
2598 goto end;
2599 error:
2600 OT_retObj_SET_Error
2601 end:
2603}
2604
2606static OT_ProcRet NS(MqContextC_SendI16) (MqContextC_ARGS) {
2608 OT_SETUP_ONEARG(SendI16_doc)
2609 MK_I16 val = 0;
2610 OT_CHECK_REQUIRED(OT_CHECK_NI2 (val))
2611 OT_CHECK_NOARGS
2612 MkErrorC_Check(hdl,MqSendI16 (hdl, val));
2613 OT_retObj_SET_None
2614 goto end;
2615 error:
2616 OT_retObj_SET_Error
2617 end:
2619}
2620
2622static OT_ProcRet NS(MqContextC_SendI32) (MqContextC_ARGS) {
2624 OT_SETUP_ONEARG(SendI32_doc)
2625 MK_I32 val = 0;
2626 OT_CHECK_REQUIRED(OT_CHECK_NI4 (val))
2627 OT_CHECK_NOARGS
2628 MkErrorC_Check(hdl,MqSendI32 (hdl, val));
2629 OT_retObj_SET_None
2630 goto end;
2631 error:
2632 OT_retObj_SET_Error
2633 end:
2635}
2636
2638static OT_ProcRet NS(MqContextC_SendI64) (MqContextC_ARGS) {
2640 OT_SETUP_ONEARG(SendI64_doc)
2641 MK_I64 val = 0;
2642 OT_CHECK_REQUIRED(OT_CHECK_NI8 (val))
2643 OT_CHECK_NOARGS
2644 MkErrorC_Check(hdl,MqSendI64 (hdl, val));
2645 OT_retObj_SET_None
2646 goto end;
2647 error:
2648 OT_retObj_SET_Error
2649 end:
2651}
2652
2654static OT_ProcRet NS(MqContextC_SendI8) (MqContextC_ARGS) {
2656 OT_SETUP_ONEARG(SendI8_doc)
2657 MK_I8 val = 0;
2658 OT_CHECK_REQUIRED(OT_CHECK_NI1 (val))
2659 OT_CHECK_NOARGS
2660 MkErrorC_Check(hdl,MqSendI8 (hdl, (MK_I8)(val)));
2661 OT_retObj_SET_None
2662 goto end;
2663 error:
2664 OT_retObj_SET_Error
2665 end:
2667}
2668
2670static OT_ProcRet NS(MqContextC_SendLONG) (MqContextC_ARGS) {
2672 OT_SETUP_ONEARG(SendLONG_doc)
2673 MK_LONG val = 0;
2674 OT_CHECK_REQUIRED(OT_CHECK_NIL (val))
2675 OT_CHECK_NOARGS
2676 MkErrorC_Check(hdl,MqSendLONG (hdl, val));
2677 OT_retObj_SET_None
2678 goto end;
2679 error:
2680 OT_retObj_SET_Error
2681 end:
2683}
2684
2686static OT_ProcRet NS(MqContextC_SendLTR) (MqContextC_ARGS) {
2688 OT_SETUP_ONEARG(SendLTR_doc)
2689 MQ_LTR transLId = 0;
2690 OT_CHECK_REQUIRED(OT_CHECK_NI4 (transLId))
2691 OT_CHECK_NOARGS
2692 MkErrorC_Check(hdl,MqSendLTR (hdl, transLId));
2693 OT_retObj_SET_None
2694 goto end;
2695 error:
2696 OT_retObj_SET_Error
2697 end:
2699}
2700
2702static OT_ProcRet NS(MqContextC_SendL_FLAT) (MqContextC_ARGS) {
2704 OT_SETUP_ONEARG(SendL_FLAT_doc)
2706 OT_CHECK_REQUIRED(OT_CHECK_BFLN (val,MK_NULL_NO))
2707 OT_CHECK_NOARGS
2708 MkErrorC_Check(hdl,MqSendL_FLAT (hdl, val));
2709 OT_retObj_SET_None
2710 goto end;
2711 error:
2712 OT_retObj_SET_Error
2713 end:
2715}
2716
2718static OT_ProcRet NS(MqContextC_SendSTR) (MqContextC_ARGS) {
2720 OT_SETUP_ONEARG(SendSTR_doc)
2721 MK_STRN val = 0;
2722 OT_CHECK_REQUIRED(OT_CHECK_STRN (val))
2723 OT_CHECK_NOARGS
2724 MkErrorC_Check(hdl,MqSendSTR (hdl, val));
2725 OT_retObj_SET_None
2726 goto end;
2727 error:
2728 OT_retObj_SET_Error
2729 end:
2731}
2732
2734static OT_ProcRet NS(MqContextC_SendStringR) (MqContextC_ARGS) {
2736 OT_SETUP_ONEARG(SendStringR_doc)
2737 MkStringR val = {0};
2738 OT_CHECK_REQUIRED(OT_CHECK__ME_REF_MkStringR(val))
2739 OT_CHECK_NOARGS
2740 MkErrorC_Check(hdl,MqSendStringR (hdl, val));
2741 OT_retObj_SET_None
2742 goto end;
2743 error:
2744 OT_retObj_SET_Error
2745 end:
2747}
2748
2750// MqContextC_SendApi_Atom_PY_API
2751
2755
2756// doc-key: MqContextC,MqContextC-SendApi-Basics,om_
2757
2759static OT_ProcRet NS(MqContextC_SendEND) (MqContextC_ARGS) {
2761 OT_SETUP_VARARGS(1,2,SendEND_doc)
2762 MQ_TOK token = 0;
2763 OT_CHECK_REQUIRED(OT_CHECK_STRN (token))
2764 MK_TIME_T timeout = MK_TIMEOUT_DEFAULT;
2765 OT_CHECK_OPTIONAL(OT_CHECK_TIME_T (timeout))
2766 OT_CHECK_NOARGS
2767 MkErrorC_Check(hdl,MqSendEND (hdl, token, timeout));
2768 OT_retObj_SET_None
2769 goto end;
2770 error:
2771 OT_retObj_SET_Error
2772 end:
2774}
2775
2777static OT_ProcRet NS(MqContextC_SendEND_AND_CALLBACK) (MqContextC_ARGS) {
2779 OT_SETUP_VARARGS(2,3,SendEND_AND_CALLBACK_doc)
2780 MQ_TOK token = 0;
2781 OT_CHECK_REQUIRED(OT_CHECK_STRN (token))
2782 OT_SETUP_CALLABLE(callback)
2783 OT_CHECK_REQUIRED(OT_CHECK_CALLABLE(callback))
2784 MK_TIME_T timeout = MK_TIMEOUT_DEFAULT;
2785 OT_CHECK_OPTIONAL(OT_CHECK_TIME_T (timeout))
2786 OT_CHECK_NOARGS
2787 MkErrorC_Check(hdl,MqSendEND_AND_CALLBACK (hdl, token, NS(ServiceCall), callback, NS(ServiceFree), timeout));
2788 OT_retObj_SET_None
2789 goto end;
2790 error:
2791 OT_retObj_SET_Error
2792 end:
2793 OT_CLEANUP_CALLABLE(callback)
2795}
2796
2798static OT_ProcRet NS(MqContextC_SendEND_AND_SUB) (MqContextC_ARGS) {
2800 OT_SETUP_VARARGS(2,3,SendEND_AND_SUB_doc)
2801 MQ_TOK token = 0;
2802 OT_CHECK_REQUIRED(OT_CHECK_STRN (token))
2803 OT_SETUP_CALLABLE(callback)
2804 OT_CHECK_REQUIRED(OT_CHECK_CALLABLE(callback))
2805 MK_TIME_T timeout = MK_TIMEOUT_DEFAULT;
2806 OT_CHECK_OPTIONAL(OT_CHECK_TIME_T (timeout))
2807 OT_CHECK_NOARGS
2808 MkErrorC_Check(hdl,MqSendEND_AND_SUB (hdl, token, NS(ServiceCall), callback, NS(ServiceFree), timeout));
2809 OT_retObj_SET_None
2810 goto end;
2811 error:
2812 OT_retObj_SET_Error
2813 end:
2814 OT_CLEANUP_CALLABLE(callback)
2816}
2817
2819static OT_ProcRet NS(MqContextC_SendEND_AND_TRANSACTION) (MqContextC_ARGS) {
2821 OT_SETUP_VARARGS(2,3,SendEND_AND_TRANSACTION_doc)
2822 MQ_TOK token = 0;
2823 OT_CHECK_REQUIRED(OT_CHECK_STRN (token))
2824 MQ_TOK callback = 0;
2825 OT_CHECK_REQUIRED(OT_CHECK_STRN (callback))
2826 MK_TIME_T timeout = MK_TIMEOUT_DEFAULT;
2827 OT_CHECK_OPTIONAL(OT_CHECK_TIME_T (timeout))
2828 OT_CHECK_NOARGS
2829 MkErrorC_Check(hdl,MqSendEND_AND_TRANSACTION (hdl, token, callback, timeout));
2830 OT_retObj_SET_None
2831 goto end;
2832 error:
2833 OT_retObj_SET_Error
2834 end:
2836}
2837
2839static OT_ProcRet NS(MqContextC_SendEND_AND_WAIT) (MqContextC_ARGS) {
2841 OT_SETUP_VARARGS(1,2,SendEND_AND_WAIT_doc)
2842 MQ_TOK token = 0;
2843 OT_CHECK_REQUIRED(OT_CHECK_STRN (token))
2844 MK_TIME_T timeout = MK_TIMEOUT_DEFAULT;
2845 OT_CHECK_OPTIONAL(OT_CHECK_TIME_T (timeout))
2846 OT_CHECK_NOARGS
2847 MkErrorC_Check(hdl,MqSendEND_AND_WAIT (hdl, token, timeout));
2848 OT_retObj_SET_None
2849 goto end;
2850 error:
2851 OT_retObj_SET_Error
2852 end:
2854}
2855
2857static OT_ProcRet NS(MqContextC_SendSTART) (MqContextC_ARGS) {
2859 OT_SETUP_NOARG(SendSTART_doc)
2860 OT_CHECK_NOARGS
2861 MkErrorC_Check(hdl,MqSendSTART (hdl));
2862 OT_retObj_SET_None
2863 goto end;
2864 error:
2865 OT_retObj_SET_Error
2866 end:
2868}
2869
2871static OT_ProcRet NS(MqContextC_SendSYNC) (MqContextC_ARGS) {
2873 OT_SETUP_NOARG(SendSYNC_doc)
2874 OT_CHECK_NOARGS
2875 MkErrorC_Check(hdl,MqSendSYNC (hdl));
2876 OT_retObj_SET_None
2877 goto end;
2878 error:
2879 OT_retObj_SET_Error
2880 end:
2882}
2883
2885// MqContextC_SendApi_Basics_PY_API
2886
2890
2891// doc-key: MqContextC,MqContextC-SendApi-Block,om_
2892
2894static OT_ProcRet NS(MqContextC_SendL_END) (MqContextC_ARGS) {
2896 OT_SETUP_NOARG(SendL_END_doc)
2897 OT_CHECK_NOARGS
2898 MkErrorC_Check(hdl,MqSendL_END (hdl));
2899 OT_retObj_SET_None
2900 goto end;
2901 error:
2902 OT_retObj_SET_Error
2903 end:
2905}
2906
2908static OT_ProcRet NS(MqContextC_SendL_START) (MqContextC_ARGS) {
2910 OT_SETUP_NOARG(SendL_START_doc)
2911 OT_CHECK_NOARGS
2912 MkErrorC_Check(hdl,MqSendL_START (hdl));
2913 OT_retObj_SET_None
2914 goto end;
2915 error:
2916 OT_retObj_SET_Error
2917 end:
2919}
2920
2922static OT_ProcRet NS(MqContextC_SendT_END) (MqContextC_ARGS) {
2924 OT_SETUP_NOARG(SendT_END_doc)
2925 OT_CHECK_NOARGS
2926 MkErrorC_Check(hdl,MqSendT_END (hdl));
2927 OT_retObj_SET_None
2928 goto end;
2929 error:
2930 OT_retObj_SET_Error
2931 end:
2933}
2934
2936static OT_ProcRet NS(MqContextC_SendT_START) (MqContextC_ARGS) {
2938 OT_SETUP_NOARG(SendT_START_doc)
2939 OT_CHECK_NOARGS
2940 MkErrorC_Check(hdl,MqSendT_START (hdl));
2941 OT_retObj_SET_None
2942 goto end;
2943 error:
2944 OT_retObj_SET_Error
2945 end:
2947}
2948
2950// MqContextC_SendApi_Block_PY_API
2951
2955
2956// doc-key: MqContextC,MqContextC-SendApi-Return,om_
2957
2959static OT_ProcRet NS(MqContextC_SendERROR) (MqContextC_ARGS) {
2961 OT_SETUP_NOARG(SendERROR_doc)
2962 OT_CHECK_NOARGS
2963 MkErrorC_Check(hdl,MqSendERROR (hdl));
2964 OT_retObj_SET_None
2965 goto end;
2966 error:
2967 OT_retObj_SET_Error
2968 end:
2970}
2971
2973static OT_ProcRet NS(MqContextC_SendRETURN) (MqContextC_ARGS) {
2975 OT_SETUP_NOARG(SendRETURN_doc)
2976 OT_CHECK_NOARGS
2977 MkErrorC_Check(hdl,MqSendRETURN (hdl));
2978 OT_retObj_SET_None
2979 goto end;
2980 error:
2981 OT_retObj_SET_Error
2982 end:
2984}
2985
2987static OT_ProcRet NS(MqContextC_SendRETURN_SUB) (MqContextC_ARGS) {
2989 OT_SETUP_NOARG(SendRETURN_SUB_doc)
2990 OT_CHECK_NOARGS
2991 MkErrorC_Check(hdl,MqSendRETURN_SUB (hdl));
2992 OT_retObj_SET_None
2993 goto end;
2994 error:
2995 OT_retObj_SET_Error
2996 end:
2998}
2999
3001// MqContextC_SendApi_Return_PY_API
3002
3006
3007// doc-key: MqContextC,MqContextC-ServiceApi-Service,om_
3008
3010static OT_ProcRet NS(MqContextC_ServiceCreate) (MqContextC_ARGS) {
3012 OT_SETUP_VARARGS(2,2,ServiceCreate_doc)
3013 MQ_TOK token = 0;
3014 OT_CHECK_REQUIRED(OT_CHECK_STRN (token))
3015 OT_SETUP_CALLABLE(callback)
3016 OT_CHECK_REQUIRED(OT_CHECK_CALLABLE(callback))
3017 OT_CHECK_NOARGS
3018 MkErrorC_Check(hdl,MqServiceCreate (hdl, token, NS(ServiceCall), callback, NS(ServiceFree), NULL));
3019 OT_retObj_SET_None
3020 goto end;
3021 error:
3022 OT_retObj_SET_Error
3023 end:
3024 OT_CLEANUP_CALLABLE(callback)
3026}
3027
3029static OT_ProcRet NS(MqContextC_ServiceDelete) (MqContextC_ARGS) {
3031 OT_SETUP_ONEARG(ServiceDelete_doc)
3032 MQ_TOK token = 0;
3033 OT_CHECK_REQUIRED(OT_CHECK_STRN (token))
3034 OT_CHECK_NOARGS
3035 MkErrorC_Check(hdl,MqServiceDelete (hdl, token));
3036 OT_retObj_SET_None
3037 goto end;
3038 error:
3039 OT_retObj_SET_Error
3040 end:
3042}
3043
3045static OT_ProcRet NS(MqContextC_ServiceIsTransaction) (MqContextC_ARGS) {
3047 OT_SETUP_NOARG(ServiceIsTransaction_doc)
3048 OT_CHECK_NOARGS
3049 OT_retObj_SET_BOL(MqServiceIsTransaction (hdl))
3050 goto end;
3051 error:
3052 OT_retObj_SET_Error
3053 end:
3055}
3056
3058static OT_ProcRet NS(MqContextC_ServiceProxy) (MqContextC_ARGS) {
3060 OT_SETUP_VARARGS(1,2,ServiceProxy_doc)
3061 MQ_TOK token = 0;
3062 OT_CHECK_REQUIRED(OT_CHECK_STRN (token))
3064 OT_CHECK_OPTIONAL(OT_CHECK_SLAVE_ID (id))
3065 OT_CHECK_NOARGS
3066 MkErrorC_Check(hdl,MqServiceProxy (hdl, token, id));
3067 OT_retObj_SET_None
3068 goto end;
3069 error:
3070 OT_retObj_SET_Error
3071 end:
3073}
3074
3076static OT_ProcRet NS(MqContextC_ServiceProxyCtx) (MqContextC_ARGS) {
3078 OT_SETUP_VARARGS(2,2,ServiceProxyCtx_doc)
3079 MQ_TOK token = 0;
3080 OT_CHECK_REQUIRED(OT_CHECK_STRN (token))
3081 MQ_CTX target = 0;
3082 OT_CHECK_REQUIRED(OT_CHECK_CTX (target,MK_NULL_NO))
3083 OT_CHECK_NOARGS
3084 MkErrorC_Check(hdl,MqServiceProxyCtx (hdl, token, target));
3085 OT_retObj_SET_None
3086 goto end;
3087 error:
3088 OT_retObj_SET_Error
3089 end:
3091}
3092
3094static OT_ProcRet NS(MqContextC_ServiceProxyCtxExists) (MqContextC_ARGS) {
3096 OT_SETUP_VARARGS(2,2,ServiceProxyCtxExists_doc)
3097 MQ_TOK token = 0;
3098 OT_CHECK_REQUIRED(OT_CHECK_STRN (token))
3099 MQ_CTX target = 0;
3100 OT_CHECK_REQUIRED(OT_CHECK_CTX (target,MK_NULL_NO))
3101 OT_CHECK_NOARGS
3102 OT_retObj_SET_BOL(MqServiceProxyCtxExists (hdl, token, target))
3103 goto end;
3104 error:
3105 OT_retObj_SET_Error
3106 end:
3108}
3109
3111static OT_ProcRet NS(MqContextC_ServiceProxyRoundRobin) (MqContextC_ARGS) {
3113 OT_SETUP_VARARGS(2,2,ServiceProxyRoundRobin_doc)
3114 MQ_TOK token = 0;
3115 OT_CHECK_REQUIRED(OT_CHECK_STRN (token))
3116 MK_STRN ident = 0;
3117 OT_CHECK_REQUIRED(OT_CHECK_STRN (ident))
3118 OT_CHECK_NOARGS
3119 MkErrorC_Check(hdl,MqServiceProxyRoundRobin (hdl, token, ident));
3120 OT_retObj_SET_None
3121 goto end;
3122 error:
3123 OT_retObj_SET_Error
3124 end:
3126}
3127
3129static OT_ProcRet NS(MqContextC_ServiceStorage) (MqContextC_ARGS) {
3131 OT_SETUP_ONEARG(ServiceStorage_doc)
3132 MQ_TOK token = 0;
3133 OT_CHECK_REQUIRED(OT_CHECK_STRN (token))
3134 OT_CHECK_NOARGS
3135 MkErrorC_Check(hdl,MqServiceStorage (hdl, token));
3136 OT_retObj_SET_None
3137 goto end;
3138 error:
3139 OT_retObj_SET_Error
3140 end:
3142}
3143
3145static OT_ProcRet NS(MqContextC_ServiceTokenCheck) (MqContextC_ARGS) {
3147 OT_SETUP_ONEARG(ServiceTokenCheck_doc)
3148 MQ_TOK token = 0;
3149 OT_CHECK_REQUIRED(OT_CHECK_STRN (token))
3150 OT_CHECK_NOARGS
3151 OT_retObj_SET_BOL(MqServiceTokenCheck (hdl, token))
3152 goto end;
3153 error:
3154 OT_retObj_SET_Error
3155 end:
3157}
3158
3160static OT_ProcRet NS(MqContextC_ServiceTokenExists) (MqContextC_ARGS) {
3162 OT_SETUP_ONEARG(ServiceTokenExists_doc)
3163 MQ_TOK token = 0;
3164 OT_CHECK_REQUIRED(OT_CHECK_STRN (token))
3165 OT_CHECK_NOARGS
3166 OT_retObj_SET_BOL(MqServiceTokenExists (hdl, token))
3167 goto end;
3168 error:
3169 OT_retObj_SET_Error
3170 end:
3172}
3173
3175static OT_ProcRet NS(MqContextC_ServiceTokenGet) (MqContextC_ARGS) {
3177 OT_SETUP_NOARG(ServiceTokenGet_doc)
3178 OT_CHECK_NOARGS
3179 OT_retObj_SET_STR(MqServiceTokenGet (hdl))
3180 goto end;
3181 error:
3182 OT_retObj_SET_Error
3183 end:
3185}
3186
3188// MqContextC_ServiceApi_Service_PY_API
3189
3193
3194// doc-key: MqContextC,MqContextC-SlaveApi-Slave,oc_
3195
3197static OT_ProcRet NS(MqContextC_SlaveGetMaster) (MqContextC_ARGS) {
3199 OT_SETUP_NOARG(SlaveGetMaster_doc)
3200 OT_CHECK_NOARGS
3201 MQ_CTX retVal = MqSlaveGetMaster (hdl);
3202 OT_retObj_SET_CTX(retVal)
3203 goto end;
3204 error:
3205 OT_retObj_SET_Error
3206 end:
3208}
3209
3210// doc-key: MqContextC,MqContextC-SlaveApi-Slave,oco
3211
3213static OT_ProcRet NS(MqContextC_SlaveGet) (MqContextC_ARGS) {
3215 OT_SETUP_ONEARG(SlaveGet_doc)
3216 MQ_SLAVE_ID id = 0;
3217 OT_CHECK_REQUIRED(OT_CHECK_SLAVE_ID (id))
3218 OT_CHECK_NOARGS
3219 MQ_CTX ctx_out;
3220 MkErrorC_Check(hdl,MqSlaveGet (hdl, id, &ctx_out));
3221 OT_retObj_SET_CTX(ctx_out)
3222 goto end;
3223 error:
3224 OT_retObj_SET_Error
3225 end:
3227}
3228
3230static OT_ProcRet NS(MqContextC_SlaveGetFilter) (MqContextC_ARGS) {
3232 OT_SETUP_NOARG(SlaveGetFilter_doc)
3233 OT_CHECK_NOARGS
3234 MQ_CTX ctx_out;
3235 MkErrorC_Check(hdl,MqSlaveGetFilter (hdl, &ctx_out));
3236 OT_retObj_SET_CTX(ctx_out)
3237 goto end;
3238 error:
3239 OT_retObj_SET_Error
3240 end:
3242}
3243
3245static OT_ProcRet NS(MqContextC_SlaveGetProxy) (MqContextC_ARGS) {
3247 OT_SETUP_ONEARG(SlaveGetProxy_doc)
3248 MQ_SLAVE_ID id = 0;
3249 OT_CHECK_REQUIRED(OT_CHECK_SLAVE_ID (id))
3250 OT_CHECK_NOARGS
3251 MQ_CTX ctx_out;
3252 MkErrorC_Check(hdl,MqSlaveGetProxy (hdl, id, &ctx_out));
3253 OT_retObj_SET_CTX(ctx_out)
3254 goto end;
3255 error:
3256 OT_retObj_SET_Error
3257 end:
3259}
3260
3261// doc-key: MqContextC,MqContextC-SlaveApi-Slave,om_
3262
3264static OT_ProcRet NS(MqContextC_SlaveCheck) (MqContextC_ARGS) {
3266 OT_SETUP_ONEARG(SlaveCheck_doc)
3267 MQ_SLAVE_ID id = 0;
3268 OT_CHECK_REQUIRED(OT_CHECK_SLAVE_ID (id))
3269 OT_CHECK_NOARGS
3270 OT_retObj_SET_BOL(MqSlaveCheck (hdl, id))
3271 goto end;
3272 error:
3273 OT_retObj_SET_Error
3274 end:
3276}
3277
3279static OT_ProcRet NS(MqContextC_SlaveCreate) (MqContextC_ARGS) {
3281 OT_SETUP_VARARGS(2,2,SlaveCreate_doc)
3282 MQ_SLAVE_ID id = 0;
3283 OT_CHECK_REQUIRED(OT_CHECK_SLAVE_ID (id))
3284 MQ_CTX slave = 0;
3285 OT_CHECK_REQUIRED(OT_CHECK_CTX (slave,MK_NULL_NO))
3286 OT_CHECK_NOARGS
3287 MkErrorC_Check(hdl,MqSlaveCreate (hdl, id, slave));
3288 OT_retObj_SET_None
3289 goto end;
3290 error:
3291 OT_retObj_SET_Error
3292 end:
3294}
3295
3297static OT_ProcRet NS(MqContextC_SlaveDelete) (MqContextC_ARGS) {
3299 OT_SETUP_ONEARG(SlaveDelete_doc)
3300 MQ_SLAVE_ID id = 0;
3301 OT_CHECK_REQUIRED(OT_CHECK_SLAVE_ID (id))
3302 OT_CHECK_NOARGS
3303 MkErrorC_Check(hdl,MqSlaveDelete (hdl, id));
3304 OT_retObj_SET_None
3305 goto end;
3306 error:
3307 OT_retObj_SET_Error
3308 end:
3310}
3311
3313static OT_ProcRet NS(MqContextC_SlaveIs) (MqContextC_ARGS) {
3315 OT_SETUP_NOARG(SlaveIs_doc)
3316 OT_CHECK_NOARGS
3317 OT_retObj_SET_BOL(MqSlaveIs (hdl))
3318 goto end;
3319 error:
3320 OT_retObj_SET_Error
3321 end:
3323}
3324
3326static OT_ProcRet NS(MqContextC_SlaveWorker) (MqContextC_ARGS) {
3328 OT_SETUP_VARARGS(1,99,SlaveWorker_doc)
3329 MQ_SLAVE_ID id = 0;
3330 OT_CHECK_REQUIRED(OT_CHECK_SLAVE_ID (id))
3331 MK_STRN fct = "WORKER";
3332 OT_CHECK_OPTIONAL(OT_CHECK_STRN (fct))
3333 MkBufferListCreateTLS_T(args,10);
3334 OT_CHECK_OPTIONAL(OT_CHECK_BAC (args))
3335 OT_CHECK_NOARGS
3336 MkErrorC_Check(hdl,MqSlaveWorker (hdl, id, fct, args));
3337 OT_retObj_SET_None
3338 goto end;
3339 error:
3340 OT_retObj_SET_Error
3341 end:
3343}
3344
3346// MqContextC_SlaveApi_Slave_PY_API
3347
3351
3352// doc-key: MqContextC,MqContextC-StorageApi-Storage,oci
3353
3355static OT_ProcRet NS(MqContextC_StorageDelete) (MqContextC_ARGS) {
3357 OT_SETUP_VARARGS(0,1,StorageDelete_doc)
3358 MQ_LTR transLIdP_inout = 0;
3359 OT_CHECK_OPTIONAL(OT_CHECK_NI4 (transLIdP_inout))
3360 OT_CHECK_NOARGS
3361 MkErrorC_Check(hdl,MqStorageDelete (hdl, &transLIdP_inout));
3362 OT_retObj_SET_I32(transLIdP_inout)
3363 goto end;
3364 error:
3365 OT_retObj_SET_Error
3366 end:
3368}
3369
3371static OT_ProcRet NS(MqContextC_StorageImport) (MqContextC_ARGS) {
3373 OT_SETUP_VARARGS(0,1,StorageImport_doc)
3374 MQ_LTR transLIdP_inout = 0;
3375 OT_CHECK_OPTIONAL(OT_CHECK_NI4 (transLIdP_inout))
3376 OT_CHECK_NOARGS
3377 MkErrorC_Check(hdl,MqStorageImport (hdl, &transLIdP_inout));
3378 OT_retObj_SET_I32(transLIdP_inout)
3379 goto end;
3380 error:
3381 OT_retObj_SET_Error
3382 end:
3384}
3385
3386// doc-key: MqContextC,MqContextC-StorageApi-Storage,om_
3387
3389static OT_ProcRet NS(MqContextC_StorageClose) (MqContextC_ARGS) {
3391 OT_SETUP_NOARG(StorageClose_doc)
3392 OT_CHECK_NOARGS
3393 MkErrorC_Check(hdl,MqStorageClose (hdl));
3394 OT_retObj_SET_None
3395 goto end;
3396 error:
3397 OT_retObj_SET_Error
3398 end:
3400}
3401
3403static OT_ProcRet NS(MqContextC_StorageDecrRef) (MqContextC_ARGS) {
3405 OT_SETUP_ONEARG(StorageDecrRef_doc)
3406 MQ_LTR transLId = 0;
3407 OT_CHECK_REQUIRED(OT_CHECK_NI4 (transLId))
3408 OT_CHECK_NOARGS
3409 MkErrorC_Check(hdl,MqStorageDecrRef (hdl, transLId));
3410 OT_retObj_SET_None
3411 goto end;
3412 error:
3413 OT_retObj_SET_Error
3414 end:
3416}
3417
3419static OT_ProcRet NS(MqContextC_StorageIncrRef) (MqContextC_ARGS) {
3421 OT_SETUP_ONEARG(StorageIncrRef_doc)
3422 MQ_LTR transLId = 0;
3423 OT_CHECK_REQUIRED(OT_CHECK_NI4 (transLId))
3424 OT_CHECK_NOARGS
3425 MkErrorC_Check(hdl,MqStorageIncrRef (hdl, transLId));
3426 OT_retObj_SET_None
3427 goto end;
3428 error:
3429 OT_retObj_SET_Error
3430 end:
3432}
3433
3435static OT_ProcRet NS(MqContextC_StorageLog) (MqContextC_ARGS) {
3437 OT_SETUP_VARARGS(0,1,StorageLog_doc)
3438 MK_STRN callfunc = NULL;
3439 OT_CHECK_OPTIONAL(OT_CHECK_STRN (callfunc))
3440 OT_CHECK_NOARGS
3441 if (MkSysStringIsNULL(callfunc)) {callfunc = OT_GET_CALL_PROC;}
3442 OT_FRAME_CLEANUP;
3443 MkErrorC_Check(hdl,MqStorageLog (hdl, callfunc));
3444 OT_retObj_SET_None
3445 goto end;
3446 error:
3447 OT_retObj_SET_Error
3448 end:
3450}
3451
3453static OT_ProcRet NS(MqContextC_StorageOpen) (MqContextC_ARGS) {
3455 OT_SETUP_ONEARG(StorageOpen_doc)
3456 MK_STRN storageFile = 0;
3457 OT_CHECK_REQUIRED(OT_CHECK_STRN (storageFile))
3458 OT_CHECK_NOARGS
3459 MkErrorC_Check(hdl,MqStorageOpen (hdl, storageFile));
3460 OT_retObj_SET_None
3461 goto end;
3462 error:
3463 OT_retObj_SET_Error
3464 end:
3466}
3467
3468// doc-key: MqContextC,MqContextC-StorageApi-Storage,omo
3469
3471static OT_ProcRet NS(MqContextC_StorageCount) (MqContextC_ARGS) {
3473 OT_SETUP_NOARG(StorageCount_doc)
3474 OT_CHECK_NOARGS
3475 MQ_LTR cnt_out;
3476 MkErrorC_Check(hdl,MqStorageCount (hdl, &cnt_out));
3477 OT_retObj_SET_I32(cnt_out)
3478 goto end;
3479 error:
3480 OT_retObj_SET_Error
3481 end:
3483}
3484
3486static OT_ProcRet NS(MqContextC_StorageErrCnt) (MqContextC_ARGS) {
3488 OT_SETUP_ONEARG(StorageErrCnt_doc)
3489 MQ_LTR transLId = 0;
3490 OT_CHECK_REQUIRED(OT_CHECK_NI4 (transLId))
3491 OT_CHECK_NOARGS
3492 MK_I32 cnt_out;
3493 MkErrorC_Check(hdl,MqStorageErrCnt (hdl, transLId, &cnt_out));
3494 OT_retObj_SET_I32(cnt_out)
3495 goto end;
3496 error:
3497 OT_retObj_SET_Error
3498 end:
3500}
3501
3503static OT_ProcRet NS(MqContextC_StorageExport) (MqContextC_ARGS) {
3505 OT_SETUP_NOARG(StorageExport_doc)
3506 OT_CHECK_NOARGS
3507 MQ_LTR ltid_out;
3508 MkErrorC_Check(hdl,MqStorageExport (hdl, &ltid_out));
3509 OT_retObj_SET_I32(ltid_out)
3510 goto end;
3511 error:
3512 OT_retObj_SET_Error
3513 end:
3515}
3516
3518static OT_ProcRet NS(MqContextC_StorageResolve) (MqContextC_ARGS) {
3520 OT_SETUP_NOARG(StorageResolve_doc)
3521 OT_CHECK_NOARGS
3522 MQ_CTX otherCtxP_out;
3523 MQ_LTR otherLIdP_out;
3524 MkErrorC_Check(hdl,MqStorageResolve (hdl, &otherCtxP_out, &otherLIdP_out));
3525 OT_retObj_SET_List
3526 OT_retObj_APPEND(OT_TMP_CTX_OBJ(otherCtxP_out))
3527 OT_retObj_APPEND(OT_TMP_I32_OBJ(otherLIdP_out))
3528 goto end;
3529 error:
3530 OT_retObj_SET_Error
3531 end:
3533}
3534
3536// MqContextC_StorageApi_Storage_PY_API
3537
3541
3542// doc-key: MqContextC,MqContextC-TOR,sCc
3543
3545static OT_ProcRet NS(MqContextC_Create) (OtClass_ARGS) {
3547 OT_SETUP_VARARGS(0,1,Create_doc)
3548 MQ_CTX tmpl = NULL;
3549 OT_CHECK_OPTIONAL(OT_CHECK_CTX (tmpl,MK_NULL_YES))
3550 OT_CHECK_NOARGS
3551 MQ_CTX retVal = MqContextCreate (MqContextCTT, tmpl);
3552 if (retVal == NULL) {
3553 OT_ERROR_CONSTRUCTOR(MqContextC)
3554 goto error;
3555 }
3556 OT_CONSTRUCTOR_POST(retVal)
3557 OT_retObj_SET_CTX(retVal)
3558 goto end;
3559 error:
3560 OT_retObj_SET_Error
3561 end:
3563}
3564
3566static OT_ProcRet NS(MqContextC_new) (CONSTR_ARGS) {
3568 OT_SETUP_CONSTRUCTOR_ARGS(0,1,new_doc)
3569 MQ_CTX tmpl = NULL;
3570 OT_CHECK_OPTIONAL(OT_CHECK_CTX (tmpl,MK_NULL_YES))
3571 MQ_CTX retVal = MqContextCreate (MqContextCTT, tmpl);
3572 if (retVal == NULL) {
3573 OT_ERROR_CONSTRUCTOR(MqContextC)
3574 goto error;
3575 }
3576 OT_CONSTRUCTOR_POST(retVal)
3577 OT_retObj_CONSTR(retVal)
3578 goto end;
3579 error:
3580 OT_retObj_SET_Error
3581 end:
3583}
3584
3586// MqContextC_TOR_PY_API
3587
3588// END-MqContextC - created by 'py_MqC.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
3589
3590// vim: Marker(o)
3596
3597static PyMethodDef NS(MqContextC_Methods)[] = {
3598
3599 { "Debug", (PyCFunction) NS(MqContextC_Debug), METH_VARARGS, "debugging…" },
3600 { "Debug2", (PyCFunction) NS(MqContextC_Debug2), METH_VARARGS, "debugging…" },
3601 { "ReadLIST", (PyCFunction) NS(MqContextC_ReadLIST), METH_NOARGS, "read entire list…" },
3602
3603 // BEGIN-CLASS - created by 'py_MqS.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
3604
3605 // doc-key: MqContextC,MqContext,sCc
3606 { "Create" , (PyCFunction) NS(MqContextC_Create) , METH_VARARGS|METH_CLASS , Create_doc },
3607
3608 // doc-key: MqContextC,MqContext,sc_
3609 { "GetNull" , (PyCFunction) NS(MqContextC_GetNull) , METH_NOARGS|METH_CLASS , GetNull_doc },
3610 { "HandleResolve" , (PyCFunction) NS(MqContextC_HandleResolve) , METH_O|METH_CLASS , HandleResolve_doc },
3611 { "Instances" , (PyCFunction) NS(MqContextC_Instances) , METH_NOARGS|METH_CLASS , Instances_doc },
3612
3613 // END-CLASS - created by 'py_MqS.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
3614
3615 // BEGIN-OBJ - created by 'py_MqS.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
3616
3617 // doc-key: MqContextC,MqClass,oc_
3618 { "ClassFactoryGet" , (PyCFunction) NS(MqContextC_ClassFactoryGet) , METH_NOARGS , ClassFactoryGet_doc },
3619
3620 // doc-key: MqContextC,MqClass,om_
3621 { "ClassFactorySet" , (PyCFunction) NS(MqContextC_ClassFactorySet) , METH_O , ClassFactorySet_doc },
3622 { "ClassIdentGet" , (PyCFunction) NS(MqContextC_ClassIdentGet) , METH_NOARGS , ClassIdentGet_doc },
3623 { "ClassIdentSet" , (PyCFunction) NS(MqContextC_ClassIdentSet) , METH_O , ClassIdentSet_doc },
3624 { "ClassOriginalIdentGet" , (PyCFunction) NS(MqContextC_ClassOriginalIdentGet) , METH_NOARGS , ClassOriginalIdentGet_doc },
3625
3626 // doc-key: MqContextC,MqConfig,oco
3627 { "ConfigGetIoTcpL" , (PyCFunction) NS(MqContextC_ConfigGetIoTcpL) , METH_NOARGS , ConfigGetIoTcpL_doc },
3628
3629 // doc-key: MqContextC,MqConfig,om_
3630 { "ConfigCheckStartAs" , (PyCFunction) NS(MqContextC_ConfigCheckStartAs) , METH_O , ConfigCheckStartAs_doc },
3631 { "ConfigGetBuffersize" , (PyCFunction) NS(MqContextC_ConfigGetBuffersize) , METH_NOARGS , ConfigGetBuffersize_doc },
3632 { "ConfigGetIdentFrom" , (PyCFunction) NS(MqContextC_ConfigGetIdentFrom) , METH_NOARGS , ConfigGetIdentFrom_doc },
3633 { "ConfigGetIoPipe" , (PyCFunction) NS(MqContextC_ConfigGetIoPipe) , METH_NOARGS , ConfigGetIoPipe_doc },
3634 { "ConfigGetIoUds" , (PyCFunction) NS(MqContextC_ConfigGetIoUds) , METH_NOARGS , ConfigGetIoUds_doc },
3635 { "ConfigGetIsParent" , (PyCFunction) NS(MqContextC_ConfigGetIsParent) , METH_NOARGS , ConfigGetIsParent_doc },
3636 { "ConfigGetIsServer" , (PyCFunction) NS(MqContextC_ConfigGetIsServer) , METH_NOARGS , ConfigGetIsServer_doc },
3637 { "ConfigGetIsString" , (PyCFunction) NS(MqContextC_ConfigGetIsString) , METH_NOARGS , ConfigGetIsString_doc },
3638 { "ConfigGetName" , (PyCFunction) NS(MqContextC_ConfigGetName) , METH_NOARGS , ConfigGetName_doc },
3639 { "ConfigGetPkgsize" , (PyCFunction) NS(MqContextC_ConfigGetPkgsize) , METH_NOARGS , ConfigGetPkgsize_doc },
3640 { "ConfigGetPostfix" , (PyCFunction) NS(MqContextC_ConfigGetPostfix) , METH_NOARGS , ConfigGetPostfix_doc },
3641 { "ConfigGetPrefix" , (PyCFunction) NS(MqContextC_ConfigGetPrefix) , METH_NOARGS , ConfigGetPrefix_doc },
3642 { "ConfigGetStartAs" , (PyCFunction) NS(MqContextC_ConfigGetStartAs) , METH_NOARGS , ConfigGetStartAs_doc },
3643 { "ConfigGetStatusIs" , (PyCFunction) NS(MqContextC_ConfigGetStatusIs) , METH_NOARGS , ConfigGetStatusIs_doc },
3644 { "ConfigGetStorage" , (PyCFunction) NS(MqContextC_ConfigGetStorage) , METH_NOARGS , ConfigGetStorage_doc },
3645 { "ConfigGetTimeout" , (PyCFunction) NS(MqContextC_ConfigGetTimeout) , METH_NOARGS , ConfigGetTimeout_doc },
3646 { "ConfigReset" , (PyCFunction) NS(MqContextC_ConfigReset) , METH_NOARGS , ConfigReset_doc },
3647 { "ConfigSetAllDebug" , (PyCFunction) NS(MqContextC_ConfigSetAllDebug) , METH_O , ConfigSetAllDebug_doc },
3648 { "ConfigSetBgError" , (PyCFunction) NS(MqContextC_ConfigSetBgError) , METH_VARARGS , ConfigSetBgError_doc },
3649 { "ConfigSetBuffersize" , (PyCFunction) NS(MqContextC_ConfigSetBuffersize) , METH_O , ConfigSetBuffersize_doc },
3650 { "ConfigSetConfigFile" , (PyCFunction) NS(MqContextC_ConfigSetConfigFile) , METH_O , ConfigSetConfigFile_doc },
3651 { "ConfigSetDaemon" , (PyCFunction) NS(MqContextC_ConfigSetDaemon) , METH_O , ConfigSetDaemon_doc },
3652 { "ConfigSetEvent" , (PyCFunction) NS(MqContextC_ConfigSetEvent) , METH_VARARGS , ConfigSetEvent_doc },
3653 { "ConfigSetIdentFrom" , (PyCFunction) NS(MqContextC_ConfigSetIdentFrom) , METH_O , ConfigSetIdentFrom_doc },
3654 { "ConfigSetIgnoreExit" , (PyCFunction) NS(MqContextC_ConfigSetIgnoreExit) , METH_O , ConfigSetIgnoreExit_doc },
3655 { "ConfigSetIoPipe" , (PyCFunction) NS(MqContextC_ConfigSetIoPipe) , METH_O , ConfigSetIoPipe_doc },
3656 { "ConfigSetIoTcp" , (PyCFunction) NS(MqContextC_ConfigSetIoTcp) , METH_VARARGS , ConfigSetIoTcp_doc },
3657 { "ConfigSetIoTcpL" , (PyCFunction) NS(MqContextC_ConfigSetIoTcpL) , METH_O , ConfigSetIoTcpL_doc },
3658 { "ConfigSetIoUds" , (PyCFunction) NS(MqContextC_ConfigSetIoUds) , METH_O , ConfigSetIoUds_doc },
3659 { "ConfigSetIsServer" , (PyCFunction) NS(MqContextC_ConfigSetIsServer) , METH_O , ConfigSetIsServer_doc },
3660 { "ConfigSetIsString" , (PyCFunction) NS(MqContextC_ConfigSetIsString) , METH_O , ConfigSetIsString_doc },
3661 { "ConfigSetName" , (PyCFunction) NS(MqContextC_ConfigSetName) , METH_O , ConfigSetName_doc },
3662 { "ConfigSetPkgsize" , (PyCFunction) NS(MqContextC_ConfigSetPkgsize) , METH_O , ConfigSetPkgsize_doc },
3663 { "ConfigSetPostfix" , (PyCFunction) NS(MqContextC_ConfigSetPostfix) , METH_O , ConfigSetPostfix_doc },
3664 { "ConfigSetPrefix" , (PyCFunction) NS(MqContextC_ConfigSetPrefix) , METH_O , ConfigSetPrefix_doc },
3665 { "ConfigSetServerCleanup" , (PyCFunction) NS(MqContextC_ConfigSetServerCleanup) , METH_VARARGS , ConfigSetServerCleanup_doc },
3666 { "ConfigSetServerSetup" , (PyCFunction) NS(MqContextC_ConfigSetServerSetup) , METH_VARARGS , ConfigSetServerSetup_doc },
3667 { "ConfigSetStartAs" , (PyCFunction) NS(MqContextC_ConfigSetStartAs) , METH_O , ConfigSetStartAs_doc },
3668 { "ConfigSetStartAsString" , (PyCFunction) NS(MqContextC_ConfigSetStartAsString) , METH_O , ConfigSetStartAsString_doc },
3669 { "ConfigSetStorage" , (PyCFunction) NS(MqContextC_ConfigSetStorage) , METH_O , ConfigSetStorage_doc },
3670 { "ConfigSetTimeout" , (PyCFunction) NS(MqContextC_ConfigSetTimeout) , METH_O , ConfigSetTimeout_doc },
3671
3672 // doc-key: MqContextC,MqConfig,omo
3673 { "ConfigGetIoTcp" , (PyCFunction) NS(MqContextC_ConfigGetIoTcp) , METH_NOARGS , ConfigGetIoTcp_doc },
3674
3675 // doc-key: MqContextC,MqContext,oc_
3676 { "ErrorFORMAT" , (PyCFunction) NS(MqContextC_ErrorFORMAT) , METH_NOARGS , ErrorFORMAT_doc },
3677 { "GetBuffer" , (PyCFunction) NS(MqContextC_GetBuffer) , METH_NOARGS , GetBuffer_doc },
3678 { "Next" , (PyCFunction) NS(MqContextC_Next) , METH_NOARGS , Next_doc },
3679 { "Prev" , (PyCFunction) NS(MqContextC_Prev) , METH_NOARGS , Prev_doc },
3680
3681 // doc-key: MqContextC,MqContext,om_
3682 { "ErrorCopy" , (PyCFunction) NS(MqContextC_ErrorCopy) , METH_O , ErrorCopy_doc },
3683 { "ErrorMove" , (PyCFunction) NS(MqContextC_ErrorMove) , METH_O , ErrorMove_doc },
3684 // skip class-overload: MqContextHandleGet → HandleGet, NS(MqContextC_HandleGet)
3685 // skip class-overload: MqContextLog → Log, NS(MqContextC_Log)
3686 { "LogConfig" , (PyCFunction) NS(MqContextC_LogConfig) , METH_VARARGS , LogConfig_doc },
3687 { "LogEnv" , (PyCFunction) NS(MqContextC_LogEnv) , METH_VARARGS , LogEnv_doc },
3688 { "LogLink" , (PyCFunction) NS(MqContextC_LogLink) , METH_VARARGS , LogLink_doc },
3689 { "LogSetup" , (PyCFunction) NS(MqContextC_LogSetup) , METH_VARARGS , LogSetup_doc },
3690 { "LogShort" , (PyCFunction) NS(MqContextC_LogShort) , METH_VARARGS , LogShort_doc },
3691 { "LogType" , (PyCFunction) NS(MqContextC_LogType) , METH_VARARGS , LogType_doc },
3692 // skip class-overload: MqContextToString → ToString, NS(MqContextC_ToString)
3693
3694 // doc-key: MqContextC,MqEnv,om_
3695 { "EnvProtect" , (PyCFunction) NS(MqContextC_EnvProtect) , METH_NOARGS , EnvProtect_doc },
3696 { "EnvRestore" , (PyCFunction) NS(MqContextC_EnvRestore) , METH_NOARGS , EnvRestore_doc },
3697
3698 // doc-key: MqContextC,MqExit,om_
3699 { "Exit" , (PyCFunction) NS(MqContextC_Exit) , METH_VARARGS , Exit_doc },
3700
3701 // doc-key: MqContextC,MqGet,oc_
3702 { "GetRoot" , (PyCFunction) NS(MqContextC_GetRoot) , METH_NOARGS , GetRoot_doc },
3703
3704 // doc-key: MqContextC,MqLink,oc_
3705 { "LinkGetParent" , (PyCFunction) NS(MqContextC_LinkGetParent) , METH_NOARGS , LinkGetParent_doc },
3706
3707 // doc-key: MqContextC,MqLink,om_
3708 { "LinkConnect" , (PyCFunction) NS(MqContextC_LinkConnect) , METH_NOARGS , LinkConnect_doc },
3709 { "LinkCreate" , (PyCFunction) NS(MqContextC_LinkCreate) , METH_VARARGS , LinkCreate_doc },
3710 { "LinkCreateChild" , (PyCFunction) NS(MqContextC_LinkCreateChild) , METH_VARARGS , LinkCreateChild_doc },
3711 { "LinkDelete" , (PyCFunction) NS(MqContextC_LinkDelete) , METH_NOARGS , LinkDelete_doc },
3712 { "LinkGetCtxId" , (PyCFunction) NS(MqContextC_LinkGetCtxId) , METH_NOARGS , LinkGetCtxId_doc },
3713 { "LinkGetTargetIdent" , (PyCFunction) NS(MqContextC_LinkGetTargetIdent) , METH_NOARGS , LinkGetTargetIdent_doc },
3714 { "LinkIsConnected" , (PyCFunction) NS(MqContextC_LinkIsConnected) , METH_NOARGS , LinkIsConnected_doc },
3715 { "LinkIsParent" , (PyCFunction) NS(MqContextC_LinkIsParent) , METH_NOARGS , LinkIsParent_doc },
3716 { "LinkShutdown" , (PyCFunction) NS(MqContextC_LinkShutdown) , METH_NOARGS , LinkShutdown_doc },
3717
3718 // doc-key: MqContextC,MqLog,om_
3719 { "LogParentOrChild" , (PyCFunction) NS(MqContextC_LogParentOrChild) , METH_NOARGS , LogParentOrChild_doc },
3720 { "LogServerOrClient" , (PyCFunction) NS(MqContextC_LogServerOrClient) , METH_NOARGS , LogServerOrClient_doc },
3721
3722 // doc-key: MqContextC,MqProcess,om_
3723 { "ProcessEvent" , (PyCFunction) NS(MqContextC_ProcessEvent) , METH_VARARGS , ProcessEvent_doc },
3724
3725 // doc-key: MqContextC,MqProxy,om_
3726 { "ProxyForward" , (PyCFunction) NS(MqContextC_ProxyForward) , METH_VARARGS , ProxyForward_doc },
3727 { "ProxyItem" , (PyCFunction) NS(MqContextC_ProxyItem) , METH_O , ProxyItem_doc },
3728
3729 // doc-key: MqContextC,MqRead,oci
3730 { "ReadALL" , (PyCFunction) NS(MqContextC_ReadALL) , METH_VARARGS , ReadALL_doc },
3731
3732 // doc-key: MqContextC,MqRead,oco
3733 { "ReadBFL" , (PyCFunction) NS(MqContextC_ReadBFL) , METH_NOARGS , ReadBFL_doc },
3734 { "ReadBUF" , (PyCFunction) NS(MqContextC_ReadBUF) , METH_NOARGS , ReadBUF_doc },
3735
3736 // doc-key: MqContextC,MqRead,om_
3737 { "ReadDbg" , (PyCFunction) NS(MqContextC_ReadDbg) , METH_NOARGS , ReadDbg_doc },
3738 { "ReadGetNextType" , (PyCFunction) NS(MqContextC_ReadGetNextType) , METH_NOARGS , ReadGetNextType_doc },
3739 { "ReadGetNumItems" , (PyCFunction) NS(MqContextC_ReadGetNumItems) , METH_NOARGS , ReadGetNumItems_doc },
3740 { "ReadItemExists" , (PyCFunction) NS(MqContextC_ReadItemExists) , METH_NOARGS , ReadItemExists_doc },
3741 { "ReadL_END" , (PyCFunction) NS(MqContextC_ReadL_END) , METH_NOARGS , ReadL_END_doc },
3742 { "ReadL_START" , (PyCFunction) NS(MqContextC_ReadL_START) , METH_VARARGS , ReadL_START_doc },
3743 { "ReadT_END" , (PyCFunction) NS(MqContextC_ReadT_END) , METH_NOARGS , ReadT_END_doc },
3744 { "ReadT_START" , (PyCFunction) NS(MqContextC_ReadT_START) , METH_NOARGS , ReadT_START_doc },
3745 { "ReadUndo" , (PyCFunction) NS(MqContextC_ReadUndo) , METH_NOARGS , ReadUndo_doc },
3746
3747 // doc-key: MqContextC,MqRead,omo
3748 { "ReadBIN" , (PyCFunction) NS(MqContextC_ReadBIN) , METH_NOARGS , ReadBIN_doc },
3749 { "ReadBOL" , (PyCFunction) NS(MqContextC_ReadBOL) , METH_NOARGS , ReadBOL_doc },
3750 { "ReadBinaryR" , (PyCFunction) NS(MqContextC_ReadBinaryR) , METH_NOARGS , ReadBinaryR_doc },
3751 { "ReadDBL" , (PyCFunction) NS(MqContextC_ReadDBL) , METH_NOARGS , ReadDBL_doc },
3752 { "ReadFLT" , (PyCFunction) NS(MqContextC_ReadFLT) , METH_NOARGS , ReadFLT_doc },
3753 { "ReadHDL" , (PyCFunction) NS(MqContextC_ReadHDL) , METH_NOARGS , ReadHDL_doc },
3754 { "ReadI16" , (PyCFunction) NS(MqContextC_ReadI16) , METH_NOARGS , ReadI16_doc },
3755 { "ReadI32" , (PyCFunction) NS(MqContextC_ReadI32) , METH_NOARGS , ReadI32_doc },
3756 { "ReadI64" , (PyCFunction) NS(MqContextC_ReadI64) , METH_NOARGS , ReadI64_doc },
3757 { "ReadI8" , (PyCFunction) NS(MqContextC_ReadI8) , METH_NOARGS , ReadI8_doc },
3758 { "ReadLIST" , (PyCFunction) NS(MqContextC_ReadLIST) , METH_NOARGS , ReadLIST_doc },
3759 { "ReadLONG" , (PyCFunction) NS(MqContextC_ReadLONG) , METH_NOARGS , ReadLONG_doc },
3760 { "ReadNEXT" , (PyCFunction) NS(MqContextC_ReadNEXT) , METH_NOARGS , ReadNEXT_doc },
3761 { "ReadSTR" , (PyCFunction) NS(MqContextC_ReadSTR) , METH_NOARGS , ReadSTR_doc },
3762 { "ReadStringR" , (PyCFunction) NS(MqContextC_ReadStringR) , METH_NOARGS , ReadStringR_doc },
3763
3764 // doc-key: MqContextC,MqRoute,oco
3765 { "RouteGetTree" , (PyCFunction) NS(MqContextC_RouteGetTree) , METH_NOARGS , RouteGetTree_doc },
3766
3767 // doc-key: MqContextC,MqRoute,om_
3768 { "RouteCreate" , (PyCFunction) NS(MqContextC_RouteCreate) , METH_VARARGS , RouteCreate_doc },
3769 { "RouteDelete" , (PyCFunction) NS(MqContextC_RouteDelete) , METH_VARARGS , RouteDelete_doc },
3770 { "RouteResolve" , (PyCFunction) NS(MqContextC_RouteResolve) , METH_VARARGS , RouteResolve_doc },
3771 { "RouteTraverse" , (PyCFunction) NS(MqContextC_RouteTraverse) , METH_VARARGS , RouteTraverse_doc },
3772
3773 // doc-key: MqContextC,MqRoute,omo
3774 { "RouteGetPath" , (PyCFunction) NS(MqContextC_RouteGetPath) , METH_NOARGS , RouteGetPath_doc },
3775
3776 // doc-key: MqContextC,MqSend,om_
3777 { "Send" , (PyCFunction) NS(MqContextC_Send) , METH_VARARGS , Send_doc },
3778 { "SendBFL" , (PyCFunction) NS(MqContextC_SendBFL) , METH_O , SendBFL_doc },
3779 { "SendBIN" , (PyCFunction) NS(MqContextC_SendBIN) , METH_O , SendBIN_doc },
3780 { "SendBOL" , (PyCFunction) NS(MqContextC_SendBOL) , METH_O , SendBOL_doc },
3781 { "SendBUF" , (PyCFunction) NS(MqContextC_SendBUF) , METH_O , SendBUF_doc },
3782 { "SendBUS_FLAT" , (PyCFunction) NS(MqContextC_SendBUS_FLAT) , METH_O , SendBUS_FLAT_doc },
3783 { "SendBinaryR" , (PyCFunction) NS(MqContextC_SendBinaryR) , METH_O , SendBinaryR_doc },
3784 { "SendDBL" , (PyCFunction) NS(MqContextC_SendDBL) , METH_O , SendDBL_doc },
3785 { "SendEND" , (PyCFunction) NS(MqContextC_SendEND) , METH_VARARGS , SendEND_doc },
3786 { "SendEND_AND_CALLBACK" , (PyCFunction) NS(MqContextC_SendEND_AND_CALLBACK) , METH_VARARGS , SendEND_AND_CALLBACK_doc },
3787 { "SendEND_AND_SUB" , (PyCFunction) NS(MqContextC_SendEND_AND_SUB) , METH_VARARGS , SendEND_AND_SUB_doc },
3788 { "SendEND_AND_TRANSACTION" , (PyCFunction) NS(MqContextC_SendEND_AND_TRANSACTION) , METH_VARARGS , SendEND_AND_TRANSACTION_doc },
3789 { "SendEND_AND_WAIT" , (PyCFunction) NS(MqContextC_SendEND_AND_WAIT) , METH_VARARGS , SendEND_AND_WAIT_doc },
3790 { "SendERROR" , (PyCFunction) NS(MqContextC_SendERROR) , METH_NOARGS , SendERROR_doc },
3791 { "SendFLT" , (PyCFunction) NS(MqContextC_SendFLT) , METH_O , SendFLT_doc },
3792 { "SendHDL" , (PyCFunction) NS(MqContextC_SendHDL) , METH_O , SendHDL_doc },
3793 { "SendI16" , (PyCFunction) NS(MqContextC_SendI16) , METH_O , SendI16_doc },
3794 { "SendI32" , (PyCFunction) NS(MqContextC_SendI32) , METH_O , SendI32_doc },
3795 { "SendI64" , (PyCFunction) NS(MqContextC_SendI64) , METH_O , SendI64_doc },
3796 { "SendI8" , (PyCFunction) NS(MqContextC_SendI8) , METH_O , SendI8_doc },
3797 { "SendLONG" , (PyCFunction) NS(MqContextC_SendLONG) , METH_O , SendLONG_doc },
3798 { "SendLTR" , (PyCFunction) NS(MqContextC_SendLTR) , METH_O , SendLTR_doc },
3799 { "SendL_END" , (PyCFunction) NS(MqContextC_SendL_END) , METH_NOARGS , SendL_END_doc },
3800 { "SendL_FLAT" , (PyCFunction) NS(MqContextC_SendL_FLAT) , METH_O , SendL_FLAT_doc },
3801 { "SendL_START" , (PyCFunction) NS(MqContextC_SendL_START) , METH_NOARGS , SendL_START_doc },
3802 { "SendRETURN" , (PyCFunction) NS(MqContextC_SendRETURN) , METH_NOARGS , SendRETURN_doc },
3803 { "SendRETURN_SUB" , (PyCFunction) NS(MqContextC_SendRETURN_SUB) , METH_NOARGS , SendRETURN_SUB_doc },
3804 { "SendSTART" , (PyCFunction) NS(MqContextC_SendSTART) , METH_NOARGS , SendSTART_doc },
3805 { "SendSTR" , (PyCFunction) NS(MqContextC_SendSTR) , METH_O , SendSTR_doc },
3806 { "SendSYNC" , (PyCFunction) NS(MqContextC_SendSYNC) , METH_NOARGS , SendSYNC_doc },
3807 { "SendStringR" , (PyCFunction) NS(MqContextC_SendStringR) , METH_O , SendStringR_doc },
3808 { "SendT_END" , (PyCFunction) NS(MqContextC_SendT_END) , METH_NOARGS , SendT_END_doc },
3809 { "SendT_START" , (PyCFunction) NS(MqContextC_SendT_START) , METH_NOARGS , SendT_START_doc },
3810
3811 // doc-key: MqContextC,MqService,om_
3812 { "ServiceCreate" , (PyCFunction) NS(MqContextC_ServiceCreate) , METH_VARARGS , ServiceCreate_doc },
3813 { "ServiceDelete" , (PyCFunction) NS(MqContextC_ServiceDelete) , METH_O , ServiceDelete_doc },
3814 { "ServiceIsTransaction" , (PyCFunction) NS(MqContextC_ServiceIsTransaction) , METH_NOARGS , ServiceIsTransaction_doc },
3815 { "ServiceProxy" , (PyCFunction) NS(MqContextC_ServiceProxy) , METH_VARARGS , ServiceProxy_doc },
3816 { "ServiceProxyCtx" , (PyCFunction) NS(MqContextC_ServiceProxyCtx) , METH_VARARGS , ServiceProxyCtx_doc },
3817 { "ServiceProxyCtxExists" , (PyCFunction) NS(MqContextC_ServiceProxyCtxExists) , METH_VARARGS , ServiceProxyCtxExists_doc },
3818 { "ServiceProxyRoundRobin" , (PyCFunction) NS(MqContextC_ServiceProxyRoundRobin) , METH_VARARGS , ServiceProxyRoundRobin_doc },
3819 { "ServiceStorage" , (PyCFunction) NS(MqContextC_ServiceStorage) , METH_O , ServiceStorage_doc },
3820 { "ServiceTokenCheck" , (PyCFunction) NS(MqContextC_ServiceTokenCheck) , METH_O , ServiceTokenCheck_doc },
3821 { "ServiceTokenExists" , (PyCFunction) NS(MqContextC_ServiceTokenExists) , METH_O , ServiceTokenExists_doc },
3822 { "ServiceTokenGet" , (PyCFunction) NS(MqContextC_ServiceTokenGet) , METH_NOARGS , ServiceTokenGet_doc },
3823
3824 // doc-key: MqContextC,MqSlave,oc_
3825 { "SlaveGetMaster" , (PyCFunction) NS(MqContextC_SlaveGetMaster) , METH_NOARGS , SlaveGetMaster_doc },
3826
3827 // doc-key: MqContextC,MqSlave,oco
3828 { "SlaveGet" , (PyCFunction) NS(MqContextC_SlaveGet) , METH_O , SlaveGet_doc },
3829 { "SlaveGetFilter" , (PyCFunction) NS(MqContextC_SlaveGetFilter) , METH_NOARGS , SlaveGetFilter_doc },
3830 { "SlaveGetProxy" , (PyCFunction) NS(MqContextC_SlaveGetProxy) , METH_O , SlaveGetProxy_doc },
3831
3832 // doc-key: MqContextC,MqSlave,om_
3833 { "SlaveCheck" , (PyCFunction) NS(MqContextC_SlaveCheck) , METH_O , SlaveCheck_doc },
3834 { "SlaveCreate" , (PyCFunction) NS(MqContextC_SlaveCreate) , METH_VARARGS , SlaveCreate_doc },
3835 { "SlaveDelete" , (PyCFunction) NS(MqContextC_SlaveDelete) , METH_O , SlaveDelete_doc },
3836 { "SlaveIs" , (PyCFunction) NS(MqContextC_SlaveIs) , METH_NOARGS , SlaveIs_doc },
3837 { "SlaveWorker" , (PyCFunction) NS(MqContextC_SlaveWorker) , METH_VARARGS , SlaveWorker_doc },
3838
3839 // doc-key: MqContextC,MqStorage,oci
3840 { "StorageDelete" , (PyCFunction) NS(MqContextC_StorageDelete) , METH_VARARGS , StorageDelete_doc },
3841 { "StorageImport" , (PyCFunction) NS(MqContextC_StorageImport) , METH_VARARGS , StorageImport_doc },
3842
3843 // doc-key: MqContextC,MqStorage,om_
3844 { "StorageClose" , (PyCFunction) NS(MqContextC_StorageClose) , METH_NOARGS , StorageClose_doc },
3845 { "StorageDecrRef" , (PyCFunction) NS(MqContextC_StorageDecrRef) , METH_O , StorageDecrRef_doc },
3846 { "StorageIncrRef" , (PyCFunction) NS(MqContextC_StorageIncrRef) , METH_O , StorageIncrRef_doc },
3847 { "StorageLog" , (PyCFunction) NS(MqContextC_StorageLog) , METH_VARARGS , StorageLog_doc },
3848 { "StorageOpen" , (PyCFunction) NS(MqContextC_StorageOpen) , METH_O , StorageOpen_doc },
3849
3850 // doc-key: MqContextC,MqStorage,omo
3851 { "StorageCount" , (PyCFunction) NS(MqContextC_StorageCount) , METH_NOARGS , StorageCount_doc },
3852 { "StorageErrCnt" , (PyCFunction) NS(MqContextC_StorageErrCnt) , METH_O , StorageErrCnt_doc },
3853 { "StorageExport" , (PyCFunction) NS(MqContextC_StorageExport) , METH_NOARGS , StorageExport_doc },
3854 { "StorageResolve" , (PyCFunction) NS(MqContextC_StorageResolve) , METH_NOARGS , StorageResolve_doc },
3855
3856 // END-OBJ - created by 'py_MqS.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
3857
3858 {NULL, NULL, 0, NULL} /* Sentinel */
3859};
3860
3861MK_UNUSED static void NS(sParentBeforeFork)(MQ_CTX mqctx) {
3862 PyOS_BeforeFork();
3863}
3864
3865MK_UNUSED static void NS(sParentAfterFork)(MQ_CTX mqctx) {
3866 PyOS_AfterFork_Parent();
3867}
3868
3869MK_UNUSED static void NS(sChildAfterFork)(MQ_CTX mqctx) {
3870 PyOS_AfterFork_Child();
3871}
3872
3873// new objects are in "local-scope" at python… if an object was added with "SlaveCreate"
3874// the underlying "context" will disappear after leving the "local-scope"
3875static void NS(sIncrSelf)(MK_RT_ARGS MQ_CTX hdl, MK_PTR const env) {
3876 OT_SETUP_self
3877 Py_INCREF(self);
3878}
3879
3880static void NS(sDecrSelf)(MK_RT_ARGS MQ_CTX hdl, MK_PTR const env) {
3881 OT_LNG_T self = OT_SELF_X(hdl);
3882 Py_CLEAR(self);
3883}
3884
3885static void NS(sProcessExit) (MK_RT_ARGS int num) {
3886//MqDLogX(context,__func__,0,"self<%p>, refCount<%li>\n", context->obj.self, ((PyObject*)context->obj.self)->ob_refcnt);
3887 Py_Exit(num);
3888}
3889
3890MK_UNUSED static void NS(sThreadExit) (MK_RT_ARGS int num) {
3891//MqDLogX(context,__func__,0,"self<%p>, refCount<%li>\n", context->obj.self, ((PyObject*)context->obj.self)->ob_refcnt);
3892
3893//mk_debug_color(MK_COLOR_RED,"%s, current state<%p>, rt state<%p>", "thread EXIT", PyThreadState_Get(), MK_RT_REF.threadData);
3894
3895 Py_EndInterpreter(MK_RT_REF.threadData);
3896
3897 MK_RT_REF.threadData = NULL;
3898}
3899
3900static PyObject* NS(sMqContextC_Str) (MqContextC_Obj *self) {
3901 MkRtSetup_X(self->hdl);
3902 return STRN2VAL(MkSysPrintF("MqContextC[%s]", self->hdl ? MqConfigGetName(self->hdl) : NULL));
3903}
3904
3905static PyObject *NS(sMqContextC_Repr)(MqContextC_Obj* self)
3906{
3908 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);
3909error:
3910 return NULL;
3911}
3912
3913#define MqContextC_Doc "The pymqmsgque project is an infrastructure to link software together to\n\
3914act like a single software. To link mean distributing work from one\n\
3915software to an other software an wait or not wait for an answer. The\n\
3916linking is done using unix or inet domain sockets and is based on\n\
3917packages send from one software to an other software and back. The\n\
3918pymqmsgque project is used to handle all the different aspects for setup\n\
3919and maintain the link and is responsible for:\n\
3920\n\
3921o starting and stopping the server application\n\
3922o starting and stopping the communication interface\n\
3923o sending and receiving package data\n\
3924o reading and writing data from or into a package\n\
3925o setup and maintain the event-handling for an asynchronous transfer\n\
3926o propagate the error messages from the server to the client"
3927
3933
3934OT_CLASS_TYPE_REF NS(MqContextCR) = {
3935 PyVarObject_HEAD_INIT(NULL, 0)
3936 .tp_name = "pymqmsgque.MqContextC",
3937 .tp_basicsize = sizeof(MqContextC_Obj),
3938 .tp_itemsize = 0,
3939 .tp_new = (newfunc) NS(MqContextC_new),
3940 .tp_doc = MqContextC_Doc,
3941 .tp_methods = NS(MqContextC_Methods),
3942 .tp_str = (reprfunc) NS(sMqContextC_Str),
3943 .tp_repr = (reprfunc) NS(sMqContextC_Repr),
3944 .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
3945 .tp_base = NULL
3946};
3947
3948int
3949NS(pMqContextC_Init)(MK_RT_ARGS OT_LNG_T m) {
3951
3952 // define type
3953 MqContextCTT = MkTypeDup2(MqContextC_TT,"pymqmsgque_MqContextC");
3954 MqContextCT->fIncrSelf = NS(sIncrSelf);
3955 MqContextCT->fDecrSelf = NS(sDecrSelf);
3956// >> replaced by os_fork
3957// MqContextCT->fParentBeforeFork = NS(sParentBeforeFork);
3958// MqContextCT->fParentAfterFork = NS(sParentAfterFork);
3959// MqContextCT->fChildAfterFork = NS(sChildAfterFork);
3960 MqContextCT->MqProcessExitCB = NS(sProcessExit);
3961 MqContextCT->MqThreadExitCB = NS(sThreadExit);
3962 //MqContextCT->ignoreDisasterSetup = true;
3963 MqContextCT->ignoreThread = true;
3964
3965 ClassInit
3966
3967 return 0;
3968error:
3969 return -1;
3970}
3971
3972// vim: nowrap
static MK_UNUSED int num
#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 OT_retObj_RETURN
#define error
#define mqctx
#define MkBufferListCreateTLS_T(name, num)
#define mk_inline
#define MK_NULL_NO
#define MK_NULL_YES
#define MK_UNUSED
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 MkRuntimeGetDebug(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 MqCtxTypeS-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
array of MqContextC instances
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