theLink 10.0 NHI1 - theKernel - theLink - theConfig - theSq3Lite - theCompiler - theBrain - theGuard - theLib
c - tcl - atl - cs - py - rb - jv - cc
Loading...
Searching...
No Matches
LibMqMsgque_mq.h
Go to the documentation of this file.
1
12#pragma once
13
14#include "LibMkKernel_mk.h"
15
16// =========================================================================
17// global __parser__ definition :
18
19__parser__(library=MqMsgque@internal@Mq);
20
21// MARK_D ################################################################
22// -----------------------------------------------------------------------
23// documentation order
38
52
76
84
92
99
107
114
119
120// =========================================================================================
121// Makefile: CPPFLAGS definitions
122// Config: configure definitions
123
124// define: META_TCP_ONLY_IPV4
125// source: msgque_mq.h
126// default: not set, use IPV8
127// definition: Force the IPV4 support and disable IPV8
128
129// define: META_COMPILE_AS_CC
130// source: Makefile
131// target: kernel_mk.h
132// default: only set by "ccmqmsgque" to compile "C" code as "C++" code
133// definition: By default, the "C" code is compiled as "C" code into a "C" library and eventually linked
134// to the library of the target programming language. With the "META_COMPILE_AS_CC" preprocessor
135// flag, the "C" code is not compiled into an independent library but is translated directly
136// into the target programming language (C++) library along with the additional C++ code as C++
137// code in the "ccmqmsgque::libmkkernel" namespace.
138// The following changes are done:
139// 1. "BEGIN_MK_C_DECLS" is set to "namespace libmsgque {"
140
141// define: META_HAVE_LIBCONFIG
142// source: user defind at build using '-DMETA_HAVE_LIBCONFIG=1/0' or set with the "configure" script
143// default: the default is "1 = set" - other value is "0 = not set"
144// definition: 1. Add the 'libconfig' library to the build to support config-files
145// 2. If the extension is build ontop of libmqmsgque the extension have to set META_HAVE_LIBCONFIG
146// according to libmqmsgque. If META_HAVE_LIBCONFIG differs from libmqmsgque than compile-error occure.
147// 3. autoconf example is at: NHI1/theLink/phpmsgque/MqMsgque/config.m4
148
149#ifndef META_HAVE_LIBCONFIG
150 #error "META_HAVE_LIBCONFIG was NOT defined, require 1 or 0"
151#endif
152
153// define: META_USE_GLOBAL_EVENT
154// source: only libmqmsgque build
155// default: do NOT(0) use META_USE_GLOBAL_EVENT
156// definition: 1. Add the "geDat" array to collect all "MqEventS" in all "MqRuntimeS"
157// 2. Protected by semaphore "geSem"
158// 3. NOT really usefull, free some data on exit
159// 4. In the PAST the "MqContectS" related to the "MqEventS" was freed also, BUT this is very buggy.
160
161#ifndef META_USE_GLOBAL_EVENT
162# define META_USE_GLOBAL_EVENT 0
163#endif
164
165// define: META_BROKEN_LINK_SEND_FAIL_COUNTER
166// source: only libmqmsgque build
167// default: fail after 16 attemp to send a data package
168// definition: 1. used in "pSendEND" -> "pIoCheckLast"
169
170#define META_BROKEN_LINK_SEND_FAIL_COUNTER 16
171
172// define: META_STATIC
173// reference: META_STATIC from kernel_mk.h
174
175#ifdef META_STATIC
176# undef MQ_C_BUILD_DLL
177# define MQ_C_BUILD_DLL
178#endif
179
180#if META_DEBUG
181# define MQ_DEBUG_RUNTIME mk_dbg_color_ln(MK_COLOR_YELLOW,"mkrt<%p:%p>, mqrt<%p:%p>", mkrt, MkRT, mqrt, MqRT)
182#else
183# define MQ_DEBUG_RUNTIME
184#endif
185
186// =========================================================================
216#if META_HAS_THREAD
217# define MQ_RT_ARGS_ONLY MK_RT mkrt, MQ_RT mqrt
218# define MQ_RT_ARGS MQ_RT_ARGS_ONLY,
219# define MQ_RT_CALL_ONLY mkrt, mqrt
220# define MQ_RT_CALL MQ_RT_CALL_ONLY,
221# define MQ_RT_PTR mqrt
222# define MQ_RT_REF (*mqrt)
223#else
224# define MQ_RT_ARGS_ONLY void
225# define MQ_RT_ARGS
226# define MQ_RT_CALL_ONLY
227# define MQ_RT_CALL
228# define MQ_RT_PTR &MqRuntimeRLS
229# define MQ_RT_REF MqRuntimeRLS
230#endif
232
233// ".c" file
234#define MQ_INSTANCE_RT_X(x) MK_INSTANCE_RT_X(x) ; MqRtSetup_XN(x)
235#define MQ_INSTANCE_RT_X_NULL(x) MK_INSTANCE_RT_X_NULL(x) ; MqRtSetup_X(x)
236#define MQ_INSTANCE_RT_O(o) MK_INSTANCE_RT_O(o) ; MqRtSetup_ON(o)
237#define MQ_INSTANCE_RT_O_NULL(o) MK_INSTANCE_RT_O_NULL(o) ; MqRtSetup_O(o)
238#define MQ_DESTRUCTOR_RT_X(c,x) MK_DESTRUCTOR_RT_X(c,x) ; MqRtSetup_XN(x)
239#define MQ_STATIC_RT MK_STATIC_RT ; MqRtSetup_NULL
241// MqRuntimeC_C_API
242
243/* BEGIN_MQ_C_DECLS should be used at the beginning of your declarations,
244 so that C++ compilers don't mangle their names. Use END_MQ_C_DECLS at
245 the end of C declarations.
246*/
247
248#undef BEGIN_MQ_C_DECLS
249#undef END_MQ_C_DECLS
250#if defined(META_COMPILE_AS_CC)
251# define BEGIN_MQ_C_DECLS namespace libmqmsgque { using namespace libmkkernel;
252# define END_MQ_C_DECLS }
253#elif defined(__cplusplus)
254# define BEGIN_MQ_C_DECLS extern "C" {
255# define END_MQ_C_DECLS }
256#else
257# define BEGIN_MQ_C_DECLS /* empty */
258# define END_MQ_C_DECLS /* empty */
259#endif
260
261// MARK_O
262#ifndef PARSE_C_HEADER_TO_META
263# include "gen/msgque_overload_mq.h"
264#endif
265
267
268// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
269
344/* ####################################################################### */
345/* ### ### */
346/* ### K E R N A L - A P I ### */
347/* ### ### */
348/* ####################################################################### */
349
350/*****************************************************************************/
351/* */
352/* windows conform extern */
353/* */
354/*****************************************************************************/
355
380
381// BEGIN-HEADER - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
382
383// If the source of libmqmsgque is direct used in an external library
384// (without dynamic linking) and this library should *not* export
385// the symbol's of libmqmsgque then the flag META_IGNORE_EXTERN have
386// to be set
387#undef MQ_EXTERN
388#if defined(META_IGNORE_EXTERN)
389# define MQ_EXTERN
390#elif defined(PIC)
391 // does we build a DLL ?
392# if defined(DLL_EXPORT)
393 // does we build the libmqmsgque library ?
394# if defined(MQ_C_BUILD_DLL)
395# define MQ_EXTERN __declspec(dllexport)
396# else
397# define MQ_EXTERN __declspec(dllimport)
398# endif
399# else
400 // no DLL - architecture specific extern specifier
401# define MQ_EXTERN __attribute__ ((visibility("default")))
402# endif
403#else
405# define MQ_EXTERN
406#endif
407
408// external data lookup
409#undef MQ_EXTERN_DATA
410#if defined(META_PRIVATE)
411# define MQ_EXTERN_DATA extern
412#elif defined(META_IGNORE_EXTERN)
413# define MQ_EXTERN_DATA extern
414#elif defined(PIC)
415 // does we build a DLL ?
416# if defined(DLL_EXPORT)
417 // does we build the libmqmsgque library ?
418# if defined(MQ_C_BUILD_DLL)
419# define MQ_EXTERN_DATA __declspec(dllexport)
420# else
421# define MQ_EXTERN_DATA __declspec(dllimport)
422# endif
423# else
424 // no DLL - architecture specific extern specifier
425# define MQ_EXTERN_DATA __attribute__ ((visibility("default"))) extern
426# endif
427#else
428# define MQ_EXTERN_DATA extern
429#endif
430
431// END-HEADER - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
432
434// MqMsgque_Compiler_C_API
435
436/*****************************************************************************/
437/* */
438/* types/generic */
439/* */
440/*****************************************************************************/
441
444
446typedef struct config_t config_t;
449
450struct MqContextS;
451struct MqTransS;
452struct MqConfigS;
453struct MqEventS;
454struct MqFactoryS;
455struct MqDumpS;
456
458__parser__(type=ME_NI4_MQ_LTR)
459typedef int MQ_LTR;
461__parser__(type=ME_NI4_MQ_ROU)
462typedef int MQ_ROU;
464__parser__(type=ME_NI4_MQ_SLAVE_ID)
466
468__parser__(type=ME_NI4_MQ_HDL:"handle data-type")
469typedef int MQ_HDL;
470
472// MqMsgque_Type_C_API
473
474/* MARK_C ********************************************************************/
475/* */
476/* class types */
477/* */
478/*****************************************************************************/
479
480// BEGIN-ShortDef - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
481
485 __parser__(internal,type=ME_CCC_MqErrorC:"extension management class for MqErrorS":internal)
486 typedef struct MqErrorS * MQ_ERR;
488 __parser__(internal,type=ME_CCN_MqErrorC:"const - extension management class for MqErrorS":internal)
489 typedef const struct MqErrorS * MQ_ERRN;
491 __parser__(ignore)
492 typedef struct MqErrorS MQ_ERRR;
494// MqErrorC_Class_C_API
495
499 __parser__(internal,type=ME_CCC_MqRuntimeC:"MqRuntimeC class handle":internal)
500 typedef struct MqRuntimeS * MQ_RT;
502 __parser__(internal,type=ME_CCN_MqRuntimeC:"const - MqRuntimeC class handle":internal)
503 typedef const struct MqRuntimeS * MQ_RTN;
505 __parser__(ignore)
506 typedef struct MqRuntimeS MQ_RTR;
508// MqRuntimeC_Class_C_API
509
513 __parser__(internal,type=ME_CCC_MqTypeCtxC:"MqContextS type":internal)
514 typedef struct MqTypeCtxS * MQ_CTXTYP;
516 __parser__(internal,type=ME_CCN_MqTypeCtxC:"const - MqContextS type":internal)
517 typedef const struct MqTypeCtxS * MQ_CTXTYPN;
519 __parser__(ignore)
520 typedef struct MqTypeCtxS MQ_CTXTYPR;
522// MqTypeCtxC_Class_C_API
523
527 __parser__(type=ME_CCC_MqFactoryC:"MqFactoryC class handle":primary)
528 typedef struct MqFactoryS * MQ_FCT;
530 __parser__(type=ME_CCN_MqFactoryC:"const - MqFactoryC class handle":primary)
531 typedef const struct MqFactoryS * MQ_FCTN;
533 __parser__(ignore)
534 typedef struct MqFactoryS MQ_FCTR;
536// MqFactoryC_Class_C_API
537
541 __parser__(type=ME_CCC_MqContextC:"MqContextC class handle":primary)
542 typedef struct MqContextS * MQ_CTX;
544 __parser__(type=ME_CCN_MqContextC:"const - MqContextC class handle":primary)
545 typedef const struct MqContextS * MQ_CTXN;
547 __parser__(ignore)
548 typedef struct MqContextS MQ_CTXR;
550// MqContextC_Class_C_API
551
555 __parser__(type=ME_CCC_MqDumpC:"MqDumpC class handle":primary)
556 typedef struct MqDumpS * MQ_DMP;
558 __parser__(type=ME_CCN_MqDumpC:"const - MqDumpC class handle":primary)
559 typedef const struct MqDumpS * MQ_DMPN;
561 __parser__(ignore)
562 typedef struct MqDumpS MQ_DMPR;
564// MqDumpC_Class_C_API
565
569 __parser__(internal,type=ME_CCC_MqEnvC:"MqEnvC class handle":internal)
570 typedef struct MqEnvS * MQ_ENV;
572 __parser__(internal,type=ME_CCN_MqEnvC:"const - MqEnvC class handle":internal)
573 typedef const struct MqEnvS * MQ_ENVN;
575 __parser__(ignore)
576 typedef struct MqEnvS MQ_ENVR;
578// MqEnvC_Class_C_API
579
580// END-ShortDef - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
581
584__parser__(type=ME_ACX_MqContextC:"ARRAY of MQ_CTX")
585typedef struct {
588} MQ_CTX_A;
589
590/*****************************************************************************/
591/* */
592/* sockets */
593/* */
594/*****************************************************************************/
595
598
599#if defined(__MINGW32__) || defined(_MSC_VER)
600typedef SOCKET MQ_SOCK_HDL;
601# define MK_FORMAT_SOCK "%I64u"
602#else
603__parser__(type=ME_NI4_MQ_SOCK_HDL)
604typedef int MQ_SOCK_HDL;
605# define MK_FORMAT_SOCK "%i"
606#endif
607
609// MqMsgque_Type_C_API
610
611/*****************************************************************************/
612/* */
613/* type definitions */
614/* */
615/*****************************************************************************/
616
619
620__parser__push__(doc-group=Enum);
621
624
626__parser__(internal)
635
636// BEGIN-MqHandShakeE - created by 'c_MqS.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
637
640__parser__(internal,no-rpc,prefix=EnumFunc,return-type-default-no)
642
645__parser__(internal,no-rpc,prefix=EnumFunc,return-type-default-no)
648 return (MK_I32) value;
649}
650
653__parser__(internal,no-rpc,prefix=EnumFunc)
655
656// END-MqHandShakeE - created by 'c_MqS.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
657
659// MqHandShakeE
660
663
665__parser__(internal)
673
674// BEGIN-MqTransTypeE - created by 'c_MqS.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
675
678__parser__(internal,no-rpc,prefix=EnumFunc,return-type-default-no)
680
683__parser__(internal,no-rpc,prefix=EnumFunc,return-type-default-no)
686 return (MK_I32) value;
687}
688
691__parser__(internal,no-rpc,prefix=EnumFunc)
693
694// END-MqTransTypeE - created by 'c_MqS.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
695
697// MqTransTypeE
698
701
707// [MqIdentE]
712// [MqIdentE]
713
714// BEGIN-MqIdentE - created by 'c_MqS.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
715
718__parser__(doc-group=Enum,doc-index=_ignore_,class=MqMsgque,no-rpc,prefix=EnumFunc,return-type-default-no)
720
723__parser__(doc-group=Enum,doc-index=_ignore_,class=MqMsgque,no-rpc,prefix=EnumFunc,return-type-default-no)
726 return (MK_I32) value;
727}
728
731__parser__(doc-group=Enum,doc-index=_ignore_,class=MqMsgque,no-rpc,prefix=EnumFunc)
732MQ_EXTERN enum MkErrorE MqIdentE_FromInt ( MK_I32 const value, enum MqIdentE * value_out ) MK_ATTR_STATIC ;
733
734// END-MqIdentE - created by 'c_MqS.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
735
737// MqIdentE
738
740
742// MqMsgque_Enum_C_API
743
746
747struct MqTypeCtxS;
748
749//__parser__(type=ME_TYC:"a managed object class type pointer")
750__parser__(internal)
752typedef struct MqTypeCtxS * MQ_CTXT;
753
755// MqTypeCtxC_C_API
756
757// #######################################################################
758// -----------------------------------------------------------------------
763
777__parser__(ignore)
778struct MqEnvS {
779 // BEGIN-MqEnvS-super - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
780
781 union {
782 struct MkObjectS obj; // instance-base MkObjectS
783 } super;
784
785 // END-MqEnvS-super - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
786
793 struct MqEnvS *link;
794 struct {
795 bool SIdLck : 1;
796 bool LIdLck : 1;
797 } bits;
798};
799
800// BEGIN-MqEnvS-Definition - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
801
805 __parser__push__(prefix=Class, doc-group=Define, doc-index=Class);
806
807// Signature --------------------------------------------------------------
810
811 #define MqEnvC_SIGNATURE (MkObjectC_SIGNATURE ^ (15u<<10))
812 #define MqEnvC_MASK (((1u<<22)-1)<<10)
813
815
816// CompileTimeCast --------------------------------------------------------------
819
820 #define MqEnvC_X2env(x) (x)
821 #define MqEnvC_X2obj(x) MkOBJ(x)
822
824
825// TypeDef --------------------------------------------------------------
828
830 __parser__(ignore) typedef struct MqEnvS MqEnvCR;
832 __parser__(ignore) typedef const struct MqEnvS MqEnvCNR;
834 #define MqEnvC_T (&MQ_RT_REF._MqEnvC_T)
836 #define MqEnvC_TT (MkTYP(MqEnvC_T))
838 #define MqEnvST MqEnvC_T
840 #define MqEnvSTT (MkTYP(MqEnvST))
842 #define MqEnvC_type MQ_ENV
844 #define MqEnvCT_X(instance) ( (struct MkTypeDefS *) (MkOBJ_R(instance).type) )
846 #define MqEnvCTT_X(instance) (MkOBJ_R(instance).type)
848 #define MqEnvCT_TT(typ) ( (struct MkTypeDefS *) (typ) )
850 #define MqEnvC_NS MQ
852 #define MqEnvCTT MqEnvCTT
854 #define MqEnvCT ( (struct MkTypeDefS *) MqEnvCTT )
855
857
858// TypeCheck --------------------------------------------------------------
861
862 #pragma GCC diagnostic push
863 #pragma GCC diagnostic ignored "-Wattributes"
864
867 __parser__(class=MqEnvC,static,ignore)
870 return MkSanitizeCheck(MqEnvC,mng);
871 }
872
875 __parser__(class=MqEnvC,static,ignore)
878 return MkSanitizeCheckO(MqEnvC,obj);
879 }
880
881 #pragma GCC diagnostic pop
882 #define MqEnvC_Check(mng) MqEnvCheck(mng)
883
885
886// RunTimeCast --------------------------------------------------------------
889
891 __parser__(class=MqEnvC,ignore,static)
892 META_ATTRIBUTE_SANITIZE
895 return (MqEnvCheck(mng) ? (MQ_ENV)mng : NULL);
896 }
897
899 __parser__(class=MqEnvC,ignore,static)
900 META_ATTRIBUTE_SANITIZE
903 return (MqEnvCheck(mng) ? (MQ_ENVN)mng : NULL);
904 }
905
907 #define MqEnvRaise(_env) if (!_MkCheckX(MqEnvC,_env)) { \
908 MkErrorSetC_1E("'MqEnvC' hdl is NULL"); \
909 goto error ; \
910 }
911
913 #define MqENV_R(x) (*(x)).super.env
915 #define MqENV(x) (&MqENV_R(x))
916
918
921// MqEnvC_Class_Define_C_API
922
923// END-MqEnvS-Definition - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
924
926// MqEnvC_C_API
927
930
931// \brief check service call environment at the beginning of the service call
932#define MQ_SERVICE_CALL_CHECK do { \
933 assert (__data__ != NULL); \
934 if (MqCtxCheck(mqctx) == false || MkOBJ_R(mqctx).self == NULL) return MK_OK; \
935} while (0)
936
937// [MqTokenF]
939#define MQ_SERVICE_CALL_ARGS MK_RT_ARGS MQ_CTX const mqctx, MK_PTR const __data__
941#define MQ_SERVICE_CALL MK_RT_CALL mqctx, __data__
942
956__parser__(flags=public-internal)
957typedef enum MkErrorE ( MK_DECL *MqTokenF ) ( MQ_SERVICE_CALL_ARGS );
958// [MqTokenF]
959
960// [MqDataFreeF]
962#define MQ_SERVICE_FREE_ARGS MK_RT_ARGS MQ_CTX const mqctx, MK_PTR *dataP __parser__(inout)
963
965__parser__(flags=public-internal)
967// [MqDataFreeF]
968
969// [MqDataCopyF]
971#define MQ_SERVICE_COPY_ARGS MK_RT_ARGS MQ_CTX const mqctx, MK_PTR *dataP __parser__(inout)
972
974__parser__(flags=public-internal)
976// [MqDataCopyF]
977
979// MqContextC_ConfigApi_C_API
980
983__parser__(ignore)
991
996
997 // slaves link
1001};
1002
1003#if defined(MQ_C_BUILD_DLL)
1004
1005 #define META_SECTION_DEFINE
1006 #include "MqLinkS_mq.h"
1007 #undef META_SECTION_DEFINE
1008
1009#else // MQ_C_BUILD_DLL
1010
1013__parser__(ignore)
1014struct MqLinkS {
1015
1016 // PUBLIC variables
1017
1021 #define MqLinkS_targetIdent_size 64
1023
1024 // context-management variables
1027
1028 // protected environment
1029 struct MqEnvS protect;
1031
1032 // master/slave relationship
1033 struct MqLinkSlaveS slave;
1034
1035 // offset calculated by "Nhi1InternalSize"
1036 MK_BINB private_variables[40656];
1037};
1038
1039#endif // MQ_C_BUILD_DLL
1040
1041/* MARK_F ################################################################ */
1042/* ### ### */
1043/* ### C T X - C O N F I G - A P I ### */
1044/* ### ### */
1045/* ####################################################################### */
1046
1166// MqContextC_ConfigApi_C_API
1167
1168// #######################################################################
1169// -----------------------------------------------------------------------
1174
1175__parser__push__(doc-group=Misc,doc-index=ConfigApi);
1176
1185typedef enum MkErrorE ( MK_DECL
1186 *MqCreateF
1187) (
1188 MK_RT_ARGS
1189 MQ_CTX const ctx,
1190 MK_BFL const args
1191);
1192
1193#define MQ_CALLBACK_CREATE_ARGS MK_RT_ARGS MQ_CTX const mqctx, MK_BFL const argv
1194#define MQ_CALLBACK_CREATE_CALL MK_RT_CALL mqctx, argv
1195
1204typedef void ( MK_DECL
1205 *MqDeleteF
1206) (
1207 MQ_CTX const ctx
1208);
1209
1212typedef void ( MK_DECL
1213 *MqHelpF
1214) (
1215 MK_STRN basename
1216) __attribute__ ((noreturn));
1217
1230typedef int ( MK_DECL
1231 *MqExitF
1232) (
1234 int num
1235);
1236
1250typedef bool ( MK_DECL
1252) (
1254 MQ_CTX const ctx,
1255 const struct MkIdS * idP __parser__(in)
1256);
1257
1261typedef void (MK_DECL *MqSetupF) ( MQ_CTX const ctx ) ;
1262
1275typedef void (MK_DECL *MqRefCountF) ( MK_RT_ARGS MQ_CTX ctx , MK_PTR const env) ;
1276
1282__parser__(ignore)
1286
1297__parser__(ignore)
1304
1311__parser__(ignore)
1315
1317__parser__(ignore)
1319};
1320
1325__parser__(ignore)
1327};
1328
1329/*****************************************************************************/
1330/* */
1331/* create / delete */
1332/* */
1333/*****************************************************************************/
1334
1338 MQ_CTX const ctx
1340
1342__parser__(internal)
1345 MQ_CTX const to,
1346 MQ_CTX const from
1348
1357// from being overwritten.
1358__parser__(hide)
1361 MQ_CTX const to,
1362 MQ_CTXN const from
1364
1366
1368// MqContextC_ConfigApi_Misc_C_API
1369
1370// #######################################################################
1371// -----------------------------------------------------------------------
1380__parser__push__(no-rpc,template-overload,doc-group=Setup,prefix=Setup);
1381
1385#ifndef META_COMPILE_AS_CC
1386__attribute__ ((constructor(300)))
1387#endif
1388__parser__(no-inline)
1390
1394#ifndef META_COMPILE_AS_CC
1395__attribute__ ((destructor(300)))
1396#endif
1397__parser__(no-inline)
1399
1401__parser__(ignore)
1403
1405
1407// MqMsgque_Setup_C_API
1408
1409
1410// #######################################################################
1411// -----------------------------------------------------------------------
1415
1416__parser__push__(doc-group=Enum,doc-index=_ignore_,class=MqMsgque);
1417
1420
1426// [MqStartE]
1433// [MqStartE]
1434
1435// BEGIN-MqStartE - created by 'c_MqS.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
1436
1439__parser__(doc-group=Enum,doc-index=_ignore_,class=MqMsgque,no-rpc,prefix=EnumFunc,return-type-default-no)
1441
1444__parser__(doc-group=Enum,doc-index=_ignore_,class=MqMsgque,no-rpc,prefix=EnumFunc,return-type-default-no)
1447 return (MK_I32) value;
1448}
1449
1452__parser__(doc-group=Enum,doc-index=_ignore_,class=MqMsgque,no-rpc,prefix=EnumFunc)
1453MQ_EXTERN enum MkErrorE MqStartE_FromInt ( MK_I32 const value, enum MqStartE * value_out ) MK_ATTR_STATIC ;
1454
1455// END-MqStartE - created by 'c_MqS.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
1456
1458
1461
1467// [MqStatusIsEF]
1468__parser__(enum-is-flag)
1476// [MqStatusIsEF]
1477
1478// BEGIN-MqStatusIsEF - created by 'c_MqS.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
1479
1482__parser__(doc-group=Enum,doc-index=_ignore_,class=MqMsgque,no-rpc,prefix=EnumFunc,return-type-default-no)
1484
1487__parser__(doc-group=Enum,doc-index=_ignore_,class=MqMsgque,no-rpc,prefix=EnumFunc,return-type-default-no)
1490 return (MK_I32) value;
1491}
1492
1495__parser__(doc-group=Enum,doc-index=_ignore_,class=MqMsgque,no-rpc,prefix=EnumFunc)
1497
1498// END-MqStatusIsEF - created by 'c_MqS.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
1499
1501// MqStatusIsEF
1502
1505
1507__parser__(internal,enum-is-flag)
1516
1517// BEGIN-MqFactoryE - created by 'c_MqS.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
1518
1521__parser__(internal,no-rpc,prefix=EnumFunc,return-type-default-no)
1523
1526__parser__(internal,no-rpc,prefix=EnumFunc,return-type-default-no)
1529 return (MK_I32) value;
1530}
1531
1534__parser__(internal,no-rpc,prefix=EnumFunc)
1536
1537// END-MqFactoryE - created by 'c_MqS.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
1538
1540// MqFactoryE
1541
1544
1546__parser__(internal)
1554
1555// BEGIN-MqIoComE - created by 'c_MqS.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
1556
1559__parser__(internal,no-rpc,prefix=EnumFunc,return-type-default-no)
1561
1564__parser__(internal,no-rpc,prefix=EnumFunc,return-type-default-no)
1567 return (MK_I32) value;
1568}
1569
1572__parser__(internal,no-rpc,prefix=EnumFunc)
1573MQ_EXTERN enum MkErrorE MqIoComE_FromInt ( MK_I32 const value, enum MqIoComE * value_out ) MK_ATTR_STATIC ;
1574
1575// END-MqIoComE - created by 'c_MqS.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
1576
1578// MqIoComE
1579
1582
1588// [MqWaitOnEventE]
1621// [MqWaitOnEventE]
1622
1623// BEGIN-MqWaitOnEventE - created by 'c_MqS.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
1624
1627__parser__(doc-group=Enum,doc-index=_ignore_,class=MqMsgque,no-rpc,prefix=EnumFunc,return-type-default-no)
1629
1632__parser__(doc-group=Enum,doc-index=_ignore_,class=MqMsgque,no-rpc,prefix=EnumFunc,return-type-default-no)
1635 return (MK_I32) value;
1636}
1637
1640__parser__(doc-group=Enum,doc-index=_ignore_,class=MqMsgque,no-rpc,prefix=EnumFunc)
1642
1643// END-MqWaitOnEventE - created by 'c_MqS.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
1644
1646// MqWaitOnEventE
1647
1650
1657// [MqSlaveE]
1658__parser__(enum-accept-integer=int32)
1670// [MqSlaveE]
1671
1672// BEGIN-MqSlaveE - created by 'c_MqS.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
1673
1676__parser__(doc-group=Enum,doc-index=_ignore_,class=MqMsgque,no-rpc,prefix=EnumFunc,return-type-default-no)
1678
1681__parser__(doc-group=Enum,doc-index=_ignore_,class=MqMsgque,no-rpc,prefix=EnumFunc,return-type-default-no)
1684 return (MK_I32) value;
1685}
1686
1689__parser__(doc-group=Enum,doc-index=_ignore_,class=MqMsgque,no-rpc,prefix=EnumFunc)
1690MQ_EXTERN enum MkErrorE MqSlaveE_FromInt ( MK_I32 const value, enum MqSlaveE * value_out ) MK_ATTR_STATIC ;
1691
1692// END-MqSlaveE - created by 'c_MqS.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
1693
1695// MqSlaveE
1696
1698
1700// MqMsgque_Enum_C_API
1701
1704__parser__(ignore)
1709
1710// #######################################################################
1711// -----------------------------------------------------------------------
1715
1717__parser__(ignore)
1719
1725
1728
1731
1739
1741 struct MqIoUdsConfigS uds;
1742
1744 struct MqIoTcpConfigS tcp;
1745
1747 struct MqIoPipeConfigS pipe;
1748
1750 struct MqIoLoopConfigS loop;
1751
1753 struct MqIoInitConfigS init;
1754};
1755
1757__parser__(ignore)
1759
1762
1784
1785 #define MqConfigS_dispName_size 64
1814
1815 #define MqConfigS_dispPrefix_size 64
1831
1832 #define MqConfigS_dispPostfix_size 64
1846
1849
1852
1855
1857 struct MqIoConfigS io;
1858
1866 #define MqConfigS_storageFile_size 256
1868
1869 struct {
1870 bool dispNameLOCK :1 ;
1874 } bits;
1875
1913
1915
1916#if META_HAVE_LIBCONFIG
1967
1970
1973#else
1974 void * cfg_dummy;
1975 void * rootH_dummy;
1976 void * filterH_dummy;
1977#endif // META_HAVE_LIBCONFIG
1978
1979};
1980
1982__parser__(ignore)
1983struct MqSetupS {
1984
2005 //MK_STRN ident;
2007
2010
2021 struct MqCallbackS BgError;
2022
2032
2045 // PRIVATE: \attention the \RMKNS{BFL} commandline-arguments are available at \RCNs{LinkS::alfa} in \RCNs{ContextS::link}
2046 struct MqCallbackS ServerSetup;
2047
2057 struct MqCallbackS ServerCleanup;
2058
2059 // misc
2060
2080 struct MqCallbackS Event;
2081
2084
2097};
2098
2100// MqContextC_ConfigApi_Misc_C_API
2101
2102// #######################################################################
2103// -----------------------------------------------------------------------
2108
2109__parser__push__(doc-group=Set,doc-index=ConfigApi);
2110
2112MQ_EXTERN void
2115 MQ_CTX const ctx,
2118
2126__parser__(internal)
2127MQ_EXTERN void
2130 MQ_CTX const ctx,
2133
2135MQ_EXTERN void
2138 MQ_CTX const ctx,
2141
2143MQ_EXTERN void
2146 MQ_CTX const ctx,
2149
2151MQ_EXTERN void
2154 MQ_CTX const ctx,
2157
2158
2162__parser__(internal)
2163MQ_EXTERN void
2165 MQ_CTX const ctx,
2168
2175 MQ_CTX const ctx,
2176 MK_I32 const data
2178
2182MQ_EXTERN void
2184 MQ_CTX const ctx,
2185 bool data
2187
2191 MQ_CTX const ctx,
2192 enum MqStartE data
2194
2198 MQ_CTX const ctx,
2201
2203MQ_EXTERN bool
2205 MQ_CTX const ctx,
2206 enum MqStartE data
2208
2218 MQ_CTX const ctx,
2219 MK_STRN file
2221
2228__parser__(flags=public-internal)
2232 MQ_CTX const ctx,
2233 MK_STRN host __parser__(default=F#STRING_NULL),
2234 MK_STRN port __parser__(default=F#STRING_NULL),
2235 MK_STRN myhost __parser__(default=F#STRING_NULL),
2236 MK_STRN myport __parser__(default=F#STRING_NULL)
2238
2240//
2245__parser__(no-type-extension,overload=MqConfigSetIoTcp)
2249 MQ_CTX const ctx,
2250 MK_BFL const vals
2252
2257//
2265 MQ_CTX const ctx,
2266 MQ_SOCK_HDL fh
2268
2286 MQ_CTX const ctx,
2287 MK_STRN pidfile
2289
2291MQ_EXTERN void
2293 MQ_CTX const ctx,
2294 MK_I32 data
2296
2298MQ_EXTERN void
2300 MQ_CTX const ctx,
2301 MK_I32 data
2303
2305MQ_EXTERN void
2307 MQ_CTX const ctx,
2310
2312MQ_EXTERN void
2314 MQ_CTX const ctx,
2315 bool data
2317
2319MQ_EXTERN void
2321 MQ_CTX const ctx,
2322 enum MqIdentE data
2324
2326MQ_EXTERN void
2328 MQ_CTX const ctx,
2329 bool data
2332
2334// MqContextC_ConfigApi_Set_C_API
2335
2336
2337// #######################################################################
2338// -----------------------------------------------------------------------
2360
2361__parser__push__(doc-group=Interface,doc-index=ConfigApi);
2362
2375#define MqInterfaceDoc(mkrt,ctx,fCall,callback,fFree,fCopy)
2376
2382__parser__(no-rpc,callback-name=ServerSetup,callback-null,flags=public-internal)
2383MQ_EXTERN void
2386 MQ_CTX const ctx,
2387 MqTokenF fCall __parser__(callback-call),
2388 MK_CBP callback __parser__(callback-data,null-allowed),
2389 MqDataFreeF fFree __parser__(callback-free,null-allowed),
2390 MqDataCopyF fCopy __parser__(callback-copy,null-allowed)
2392
2398__parser__(no-rpc,callback-name=ServerCleanup,callback-null,flags=public-internal)
2399MQ_EXTERN void
2402 MQ_CTX const ctx,
2403 MqTokenF fCall __parser__(callback-call),
2404 MK_CBP callback __parser__(callback-data),
2405 MqDataFreeF fFree __parser__(callback-free),
2406 MqDataCopyF fCopy __parser__(callback-copy)
2408
2414__parser__(no-rpc,callback-name=BgError,callback-null,flags=public-internal)
2415MQ_EXTERN void
2418 MQ_CTX const ctx,
2419 MqTokenF fCall __parser__(callback-call),
2420 MK_CBP callback __parser__(callback-data),
2421 MqDataFreeF fFree __parser__(callback-free),
2422 MqDataCopyF fCopy __parser__(callback-copy)
2424
2434__parser__(no-rpc,callback-name=Event,callback-null,flags=public-internal)
2435MQ_EXTERN void
2438 MQ_CTX const ctx,
2439 MqTokenF fCall __parser__(callback-call),
2440 MK_CBP callback __parser__(callback-data),
2441 MqDataFreeF fFree __parser__(callback-free),
2442 MqDataCopyF fCopy __parser__(callback-copy)
2444
2446
2448// MqContextC_ConfigApi_Interface_C_API
2449
2450// #######################################################################
2451// -----------------------------------------------------------------------
2456
2459#define MQ_IS_SERVER(ctx) (ctx->setup.isServer == true)
2460#define MQ_IS_SERVER_PARENT(ctx) (MQ_IS_SERVER(ctx) && MQ_IS_PARENT(ctx))
2461#define MQ_IS_CLIENT(ctx) (ctx->setup.isServer == false)
2462#define MQ_IS_CLIENT_PARENT(ctx) (MQ_IS_CLIENT(ctx) && MQ_IS_PARENT(ctx))
2463#define MQ_IS_CHILD(ctx) ((ctx)->config.parent != NULL)
2464#define MQ_IS_PARENT(ctx) ((ctx)->config.parent == NULL)
2465#define MQ_IS_SLAVE(ctx) ((ctx)->config.master != NULL)
2466#define MQ_IS_MASTER(ctx) ((ctx)->config.master == NULL)
2467#define MQ_IS_LOOPBACK(ctx) ((ctx)->config.io.com == MQ_IO_LOOP)
2468
2469#define MQ_GET_PARENT(ctx) (MQ_IS_CHILD(ctx) ? ctx->link.ctxIdP : ctx)
2470#define MQ_GET_MASTER(ctx) (MQ_IS_SLAVE(ctx) ? ctx->config.master : ctx)
2471
2472#define MQ_IS_ON_EXIT(ctx) (MQ_GET_PARENT(ctx)->bits.onExit == true)
2474
2476
2477/* ####################################################################### */
2478/* ### ### */
2479/* ### C T X - L O G - A P I ### */
2480/* ### ### */
2481/* ####################################################################### */
2482
2497
2498__parser__push__(doc-group=Log,doc-index=LogApi);
2499
2510__parser__(const,class-overload=MkObjectLog)
2513 MQ_CTXN const ctx ,
2515 MK_DBG const debug __parser__(default=0),
2516 MK_STRN const callfunc __parser__(default=F#FUNC),
2517 MK_I32 const lvl __parser__(default=0)
2519
2531__parser__(const)
2534 MQ_CTXN const ctx ,
2536 MK_DBG const debug __parser__(default=0),
2537 MK_STRN const callfunc __parser__(default=F#FUNC),
2538 MK_I32 const lvl __parser__(default=0),
2539 MK_STRN const label __parser__(default=F#STRING_NULL)
2541
2550__parser__(const)
2553 MQ_CTXN const ctx ,
2555 MK_DBG const debug __parser__(default=0),
2556 MK_STRN const callfunc __parser__(default=F#FUNC),
2557 MK_I32 const lvl __parser__(default=0)
2559
2568__parser__(const)
2571 MQ_CTXN const ctx ,
2573 MK_DBG const debug __parser__(default=0),
2574 MK_STRN const callfunc __parser__(default=F#FUNC),
2575 MK_I32 const lvl __parser__(default=0)
2577
2586__parser__(const)
2589 MQ_CTXN ctx ,
2591 MK_DBG const debug __parser__(default=0),
2592 MK_STRN const callfunc __parser__(default=F#FUNC),
2593 MK_I32 const lvl __parser__(default=0)
2595
2606__parser__(const)
2609 MQ_CTX const ctx ,
2611 MK_DBG const debug __parser__(default=0),
2612 MK_STRN const callfunc __parser__(default=F#FUNC),
2613 MK_I32 const lvl __parser__(default=0)
2615
2626__parser__(const,flags=new)
2629 MQ_CTX const ctx ,
2631 MK_DBG const debug __parser__(default=0),
2632 MK_STRN const callfunc __parser__(default=F#FUNC),
2633 MK_I32 const lvl __parser__(default=0)
2635
2636__parser__(ignore)
2638
2639// end of class=MqContextC,doc-group=Log
2641
2643// MqContextC_LogApi_Log_C_API
2644
2645// #######################################################################
2646// -----------------------------------------------------------------------
2659
2668typedef int (*MqSysSelectF) (int max, void* read, void* write, void* except, struct timeval* timeout);
2669
2686
2711__parser__(hide)
2713 struct MqSysServerThreadMainS *data __parser__(in,silent)
2714);
2715
2730typedef enum MkErrorE (*MqSysServerSpawnF) (
2732 MQ_CTX const ctx,
2733 char *const * argv,
2734 MK_STRN name,
2735 struct MkIdS * idPtrOut
2736);
2737
2752typedef enum MkErrorE (*MqSysServerThreadF) (
2754 MQ_CTX const ctx,
2755 struct MqSysServerThreadMainS * const argP __parser__(in) ,
2756 MK_STRN name,
2757 int state,
2758 struct MkIdS * idPtrOut __parser__(in)
2759);
2760
2777typedef enum MkErrorE (*MqSysServerForkF) (
2779 MQ_CTX const ctx,
2780 MQ_FCT factory,
2781 MK_BFL* argsP,
2782 MK_STRN name,
2783 MQ_SOCK_HDL socket,
2784 struct MkIdS * idPtrOut __parser__(in)
2785);
2786
2788__parser__(ignore)
2802
2804__parser__(ignore)
2806
2808// - MqMsgque_Sys_C_API
2809
2810/* MARK_E ################################################################ */
2811/* ### ### */
2812/* ### E R R O R - A P I ### */
2813/* ### ### */
2814/* ####################################################################### */
2815
2826
2828__parser__(internal)
2829struct MqErrorS {
2830 // BEGIN-MqErrorS-super - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
2831
2832 union {
2833 struct MkObjectS obj; // instance-base MkObjectS
2834 struct MkExtensionS ext; // instance-base MkExtensionS
2835 struct MkErrExtS errext; // instance-base MkErrExtS
2837
2838 // END-MqErrorS-super - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
2839
2840 // instance attributes
2841 char errhint; // the TYPE if the \e errobj U=undefined, C=client, S=server
2842
2843 MQ_CTXN client_ctx; // context source of the error, NULL = current context
2844
2845 // The \e error_protect is used in \RCNs{SendERROR} to restructure the environment at
2846 // the time of the error. The data is a copy of the \RCNs{LinkS::protect} data
2847 struct MqEnvS client_protect;
2848
2849 MQ_CTXN server_ctx; // context source of the error, NULL = current context
2850
2851 // The \e error_protect is used in \RCNs{SendERROR} to restructure the environment at
2852 // the time of the error. The data is a copy of the \RCNs{LinkS::protect} data
2853 struct MqEnvS server_protect;
2854};
2855
2856// BEGIN-MqErrorS-Definition - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
2857
2861 __parser__push__(prefix=Class, doc-group=Define, doc-index=Class);
2862
2863// Signature --------------------------------------------------------------
2866
2867 #define MqErrorC_SIGNATURE (MkErrExtC_SIGNATURE ^ (1u<<3))
2868 #define MqErrorC_MASK (((1u<<29)-1)<<3)
2869
2871
2872// CompileTimeCast --------------------------------------------------------------
2875
2876 #define MqErrorC_X2err(x) (x)
2877 #define MqErrorC_X2errext(x) MkERREXT(x)
2878 #define MqErrorC_X2ext(x) MkEXT(x)
2879 #define MqErrorC_X2obj(x) MkOBJ(x)
2880
2882
2883// TypeDef --------------------------------------------------------------
2886
2888 __parser__(ignore) typedef struct MqErrorS MqErrorCR;
2890 __parser__(ignore) typedef const struct MqErrorS MqErrorCNR;
2892 #define MqErrorC_T (&MQ_RT_REF._MqErrorC_T)
2894 #define MqErrorC_TT (MkTYP(MqErrorC_T))
2896 #define MqErrorST MqErrorC_T
2898 #define MqErrorSTT (MkTYP(MqErrorST))
2900 #define MqErrorC_type MQ_ERR
2902 #define MqErrorCT_X(instance) ( (struct MkTypeDefS *) (MkOBJ_R(instance).type) )
2904 #define MqErrorCTT_X(instance) (MkOBJ_R(instance).type)
2906 #define MqErrorCT_TT(typ) ( (struct MkTypeDefS *) (typ) )
2908 #define MqErrorC_NS MQ
2910 #define MqErrorCTT MqErrorCTT
2912 #define MqErrorCT ( (struct MkTypeDefS *) MqErrorCTT )
2913
2915
2916// TypeCheck --------------------------------------------------------------
2919
2920 #pragma GCC diagnostic push
2921 #pragma GCC diagnostic ignored "-Wattributes"
2922
2925 __parser__(class=MqErrorC,static,ignore)
2928 return MkSanitizeCheck(MqErrorC,mng);
2929 }
2930
2933 __parser__(class=MqErrorC,static,ignore)
2936 return MkSanitizeCheckO(MqErrorC,obj);
2937 }
2938
2939 #pragma GCC diagnostic pop
2940 #define MqErrorC_Check(mng) MqErrCheck(mng)
2941
2943
2944// RunTimeCast --------------------------------------------------------------
2947
2949 __parser__(class=MqErrorC,ignore,static)
2950 META_ATTRIBUTE_SANITIZE
2953 return (MqErrCheck(mng) ? (MQ_ERR)mng : NULL);
2954 }
2955
2957 __parser__(class=MqErrorC,ignore,static)
2958 META_ATTRIBUTE_SANITIZE
2961 return (MqErrCheck(mng) ? (MQ_ERRN)mng : NULL);
2962 }
2963
2965 #define MqErrRaise(_err) if (!_MkCheckX(MqErrorC,_err)) { \
2966 MkErrorSetC_1E("'MqErrorC' hdl is NULL"); \
2967 goto error ; \
2968 }
2969
2971 #define MqERR_R(x) (*(x)).super.err
2973 #define MqERR(x) (&MqERR_R(x))
2974
2976
2979// MqErrorC_Class_Define_C_API
2980
2981// END-MqErrorS-Definition - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
2982
2985#define MqERROR_R(r) ((*r).error_mq)
2986#define MqERROR_RT MqERROR_R(&MQ_RT_REF)
2987#define MqERROR_O(o) MqERROR_R(MqRT_O(o))
2988#define MqERROR_X(x) MqERROR_R(MqRT_X(x))
2989#define MqERROR_XN(x) MqERROR_R(MqRT_XN(x))
2990#define MqERROR MqERROR_R(&MqRuntimeRLS)
2992
2993
2999__parser__(ignore)
3001 MQ_ERR const err
3003
3005// MqErrorC_C_API
3006
3007/* ####################################################################### */
3008/* ### ### */
3009/* ### F A C T O R Y - A P I ### */
3010/* ### ### */
3011/* ####################################################################### */
3012
3070
3071#define MqFactoryPanic(fct) if (fct == NULL) MkPanicC(MK_ERROR_PANIC, __func__, -1, "MqFactoryS exception");
3072
3081typedef enum MkErrorE ( MK_DECL
3083) (
3085 MQ_CTX const tmpl,
3086 enum MqFactoryE create,
3087 MQ_FCT const fct,
3088 MQ_CTX * ctx_out
3089);
3090
3092#define MQ_CALLBACK_FACTORY_CTOR_ARGS \
3093 MQ_RT_ARGS \
3094 MQ_CTX const tmpl, \
3095 enum MqFactoryE create, \
3096 struct MqFactoryS * const fct, \
3097 MQ_CTX *contextP \
3098
3099#define MQ_CALLBACK_FACTORY_CTOR_CALL MQ_RT_CALL tmpl, create, fct, contextP
3100
3114typedef void ( MK_DECL
3116) (
3118 MQ_CTX ctx,
3119 bool doFactoryCleanup,
3120 MQ_FCT const fct
3121) ;
3122
3124#define MQ_CALLBACK_FACTORY_DTOR_ARGS \
3125 MQ_RT_ARGS \
3126 MQ_CTX ctx, \
3127 bool doFactoryCleanup, \
3128 MQ_FCT const fct \
3129
3131typedef void ( MK_DECL
3133) (
3135 MK_PTR *dataP __parser__(inout)
3136) ;
3137
3139typedef void ( MK_DECL
3141) (
3143 MK_PTR *dataP __parser__(inout)
3144) ;
3145
3147__parser__(ignore)
3154
3156__parser__(ignore)
3163
3164#define MqDbgFct_2(f,c) \
3165 mk_dbg_color_ln(c,"MqDbgFct[%-16s]: fct<P=%p:T=%p:R=%p>, MqFactoryC_TT<%p>", \
3166 MK_TRIM_LEFT(16,f->originalIdent), f, MkTYP_X(f), MkRT_X(f), MqFactoryC_TT)
3167#define MqDbgFct(f) MqDbgFct_2(f,MK_COLOR_YELLOW)
3168
3173 // BEGIN-MqFactoryS-super - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
3174
3175 union {
3176 struct MkObjectS obj; // instance-base MkObjectS
3178
3179 // END-MqFactoryS-super - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
3180
3181 // instance attributes
3183 #define MqFactoryS_originalIdent_size 63
3188};
3189
3190// BEGIN-MqFactoryS-Definition - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
3191
3195 __parser__push__(prefix=Class, doc-group=Define, doc-index=Class);
3196
3197// Signature --------------------------------------------------------------
3200
3201 #define MqFactoryC_SIGNATURE (MkObjectC_SIGNATURE ^ (12u<<10))
3202 #define MqFactoryC_MASK (((1u<<22)-1)<<10)
3203
3205
3206// CompileTimeCast --------------------------------------------------------------
3209
3210 #define MqFactoryC_X2fct(x) (x)
3211 #define MqFactoryC_X2obj(x) MkOBJ(x)
3212
3214
3215// TypeDef --------------------------------------------------------------
3218
3220 __parser__(ignore) typedef struct MqFactoryS MqFactoryCR;
3222 __parser__(ignore) typedef const struct MqFactoryS MqFactoryCNR;
3224 #define MqFactoryC_T (&MQ_RT_REF._MqFactoryC_T)
3226 #define MqFactoryC_TT (MkTYP(MqFactoryC_T))
3228 #define MqFactoryST MqFactoryC_T
3230 #define MqFactorySTT (MkTYP(MqFactoryST))
3232 #define MqFactoryC_type MQ_FCT
3234 #define MqFactoryCT_X(instance) ( (struct MkTypeDefS *) (MkOBJ_R(instance).type) )
3236 #define MqFactoryCTT_X(instance) (MkOBJ_R(instance).type)
3238 #define MqFactoryCT_TT(typ) ( (struct MkTypeDefS *) (typ) )
3240 #define MqFactoryC_NS MQ
3242 #define MqFactoryCTT MqFactoryCTT
3244 #define MqFactoryCT ( (struct MkTypeDefS *) MqFactoryCTT )
3245
3247
3248// TypeCheck --------------------------------------------------------------
3251
3252 #pragma GCC diagnostic push
3253 #pragma GCC diagnostic ignored "-Wattributes"
3254
3257 __parser__(class=MqFactoryC,static,hide)
3260 return MkSanitizeCheck(MqFactoryC,mng);
3261 }
3262
3265 __parser__(class=MqFactoryC,static,hide)
3268 return MkSanitizeCheckO(MqFactoryC,obj);
3269 }
3270
3271 #pragma GCC diagnostic pop
3272 #define MqFactoryC_Check(mng) MqFctCheck(mng)
3273
3275
3276// RunTimeCast --------------------------------------------------------------
3279
3281 __parser__(class=MqFactoryC,hide,static)
3282 META_ATTRIBUTE_SANITIZE
3285 return (MqFctCheck(mng) ? (MQ_FCT)mng : NULL);
3286 }
3287
3289 __parser__(class=MqFactoryC,hide,static)
3290 META_ATTRIBUTE_SANITIZE
3293 return (MqFctCheck(mng) ? (MQ_FCTN)mng : NULL);
3294 }
3295
3297 #define MqFctRaise(_fct) if (!_MkCheckX(MqFactoryC,_fct)) { \
3298 MkErrorSetC_1E("'MqFactoryC' hdl is NULL"); \
3299 goto error ; \
3300 }
3301
3303 #define MqFCT_R(x) (*(x)).super.fct
3305 #define MqFCT(x) (&MqFCT_R(x))
3306
3308
3311// MqFactoryC_Class_Define_C_API
3312
3313// END-MqFactoryS-Definition - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
3314
3315// =========================================================================
3316// BEGIN-MqFactoryS-Export - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
3317
3320
3323
3324__parser__push__(doc-group=_ignore_,doc-index=Class,doc-name=Export,class=MqFactoryC);
3325
3341__parser__(class-overload=MkObjectHandleGet)
3345 MQ_FCT const fct __parser__(null-allowed)
3346) {
3347 return MkObjectHandleGet(fct?MkOBJ(fct):NULL);
3348}
3349
3358__parser__(flags=new)
3362 MK_HDL const netHdl
3363) {
3364 return MqFct(MkObjectHandleResolve(netHdl));
3365}
3366
3376#define MqFactoryHandleResolve_e(netHdl) ({ \
3377 MK_HDL tmpHdl=netHdl; \
3378 MQ_FCT tmp; \
3379 if (tmpHdl==0) { \
3380 tmp=NULL; \
3381 } else { \
3382 tmp=MqFactoryHandleResolve(tmpHdl); \
3383 if (tmp==NULL) { \
3384 MkErrorSetC_1_NULL("ERROR: 'MqFactoryC' handle is 'NULL'"); \
3385 goto error; \
3386 }; \
3387 }; \
3388 tmp; \
3389})
3390
3392
3394// Class export & import
3395
3399 __parser__(flags=new,doc-group=_ignore_,doc-index=Class,doc-name=Misc,class=MqFactoryC,null-return-allow)
3402 return (MQ_FCT)MK_NULL;
3403 }
3405// MqFactoryC - Misc - function
3406
3408// MqFactoryC_Class_C_API
3409
3410// END-MqFactoryS-Export - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
3411
3412// #######################################################################
3413// -----------------------------------------------------------------------
3418
3419__parser__push__(doc-group=Get);
3420
3422__parser__(hide)
3424 MQ_FCTN const fct
3426
3428__parser__(internal)
3430 MQ_FCTN const fct
3432
3436 MQ_FCTN const fct
3438
3454 MK_STRN const ident __parser__(default=S#"")
3456
3470 MK_STRN const ident __parser__(default=S#"")
3472
3486// [MqFactoryGetCalledL_RT]
3487__parser__(no-type-extension,overload=MqFactoryGetCalled)
3490 MK_BFLN largs __parser__(argument)
3492// [MqFactoryGetCalledL_RT]
3493
3495
3497// MqFactoryC_Get_C_API
3498
3499// #######################################################################
3500// -----------------------------------------------------------------------
3505
3506__parser__push__(doc-group=TOR);
3507
3515__parser__(hide)
3518 MQ_FCT const fct
3520
3523
3536__parser__(destructor)
3539 MQ_FCT fct
3541
3543
3572__parser__(constructor,lng-constr,no-rpc,overload-c-no)
3575 MK_OBJN const error __parser__(internal,default=NULL), //C# reguire non "ERROR" name
3576// constructor
3577 MqFactoryCTorF const createCallF __parser__(internal,default=FactoryObjCreate),
3578 MK_CCP const constructor __parser__(constructor),
3579 MqFactoryDataFreeF const createDataFreeF __parser__(internal,default=FactoryFree),
3580 MqFactoryDataCopyF const createDataCopyF __parser__(internal,default=FactoryDup2),
3581// destructor
3582 MqFactoryDTorF const deleteCallF __parser__(internal,default=FactoryObjDelete),
3583 MK_CCP const destructor __parser__(internal,default=NULL),
3584 MqFactoryDataFreeF const deleteDataFreeF __parser__(internal,default=NULL),
3585 MqFactoryDataCopyF const deleteDataCopyF __parser__(internal,default=NULL),
3586
3587 MK_STRN const ident __parser__(default=F#CTOR#constructor)
3589
3590#define MqFactoryAdd_1(fct) MqFactoryAdd(MK_ERROR_PANIC,fct,NULL, NULL, NULL, NULL, NULL, NULL, NULL, #fct)
3591#define MqFactoryAdd_2(fct,ident) MqFactoryAdd(MK_ERROR_PANIC,fct,NULL, NULL, NULL, NULL, NULL, NULL, NULL, ident)
3592#define MqFactoryAdd_3(ctor,dtor,ident) MqFactoryAdd(MK_ERROR_PANIC,ctor,NULL, NULL, NULL, dtor, NULL, NULL, NULL, ident)
3593
3605__parser__(constructor,internal)
3608 MK_OBJN const error,
3609 MK_STRN const ident,
3610 MkSelfCreateF const fctCreate,
3611 MkSelfDeleteF const fctDelete,
3612 MkConstructorF const constructor,
3613 MkSelfDeleteF const selfDelete
3615
3617__parser__(constructor)
3620 MQ_FCTN const fct,
3621 MK_STRN const ident
3623
3625
3627// MqFactoryC_TOR_C_API
3628
3629// #######################################################################
3630// -----------------------------------------------------------------------
3635
3636__parser__push__(doc-group=Misc);
3637
3655 MQ_FCT const fct
3657
3677 MQ_FCT const fct
3679
3684
3689
3709__parser__(class=MqFactoryC,flags=virtual)
3712 MQ_FCT const fct,
3713 MQ_CTX const tmpl __parser__(internal,default=NULL),
3714 MQ_CTX* const val_out
3716
3723 MK_STRN const callfunc __parser__(default=F#FUNC)
3725
3728
3739__parser__(const,class-overload=MkObjectLog)
3742 MQ_FCTN const fct ,
3744 MK_DBG const debug __parser__(default=0),
3745 MK_STRN const callfunc __parser__(default=F#FUNC),
3746 MK_I32 const lvl __parser__(default=0)
3748
3749#define MqFactoryLog_2M(fct,m) MqFactoryLog(fct,MkObj(m),0,__func__,0)
3750
3752// MqFactoryLog
3753
3755
3757// MqFactoryC_Misc_C_API
3758
3760// MqFactoryC_C_API
3761
3762// #######################################################################
3763// -----------------------------------------------------------------------
3768
3774__parser__(ignore)
3776 // BEGIN-MqTypeCtxS-super - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
3777
3778 union {
3779 struct MkObjectS obj; // instance-base MkObjectS
3780 struct MkTypeS typ; // instance-base MkTypeS
3782
3783 // END-MqTypeCtxS-super - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
3784
3785 // instance attributes
3786
3795
3798
3801
3804
3809
3814
3817
3820
3823
3826
3829
3832
3837 struct MqLinkSetupS Child;
3838
3841 struct MqLinkSetupS Parent;
3842
3855 struct MqCallbackS Idle;
3856
3859
3862
3872
3875
3878
3887};
3888
3889// BEGIN-MqTypeCtxS-Definition - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
3890
3894 __parser__push__(prefix=Class, doc-group=Define, doc-index=Class);
3895
3896// Signature --------------------------------------------------------------
3899
3900 #define MqTypeCtxC_SIGNATURE (MkTypeC_SIGNATURE ^ (2u<<6))
3901 #define MqTypeCtxC_MASK (((1u<<26)-1)<<6)
3902
3904
3905// CompileTimeCast --------------------------------------------------------------
3908
3909 #define MqTypeCtxC_X2ctxtyp(x) (x)
3910 #define MqTypeCtxC_X2typ(x) MkTYP(x)
3911 #define MqTypeCtxC_X2obj(x) MkOBJ(x)
3912
3914
3915// TypeDef --------------------------------------------------------------
3918
3920 __parser__(ignore) typedef struct MqTypeCtxS MqTypeCtxCR;
3922 __parser__(ignore) typedef const struct MqTypeCtxS MqTypeCtxCNR;
3924 #define MqTypeCtxSTT (&MQ_RT_REF._MqTypeCtxC_TT)
3926 #define MqTypeCtxC_TT (&MQ_RT_REF._MqTypeCtxC_TT)
3928 #define MqTypeCtxC_type MQ_CTXTYP
3930 #define MqTypeCtxCT_X(instance) ( (struct MkTypeS *) (MkOBJ_R(instance).type) )
3932 #define MqTypeCtxCTT_X(instance) (MkOBJ_R(instance).type)
3934 #define MqTypeCtxCT_TT(typ) ( (struct MkTypeS *) (typ) )
3936 #define MqTypeCtxC_NS MQ
3938 #define MqTypeCtxCTT MqTypeCtxCTT
3940 #define MqTypeCtxCT ( (struct MkTypeS *) MqTypeCtxCTT )
3941
3943
3944// TypeCheck --------------------------------------------------------------
3947
3948 #pragma GCC diagnostic push
3949 #pragma GCC diagnostic ignored "-Wattributes"
3950
3953 __parser__(class=MqTypeCtxC,static,ignore)
3956 return MkSanitizeCheck(MqTypeCtxC,mng);
3957 }
3958
3961 __parser__(class=MqTypeCtxC,static,ignore)
3964 return MkSanitizeCheckO(MqTypeCtxC,obj);
3965 }
3966
3967 #pragma GCC diagnostic pop
3968 #define MqTypeCtxC_Check(mng) MqCtxTypCheck(mng)
3969
3971
3974// MqTypeCtxC_Class_Define_C_API
3975
3976// END-MqTypeCtxS-Definition - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
3977
3979__parser__(class=MqContextC,internal,static)
3981 if (!MkObjCheck(mng)) return NULL;
3982 MK_OBJ obj = (MK_OBJ) mng;
3983 if (MqCtxTypCheck(obj)) return (MQ_CTXT)obj;
3984 MQ_CTXT typ = (MQ_CTXT) obj->type;
3985 if (MqCtxTypCheck(typ)) return typ;
3986 return NULL;
3987}
3988
3999__parser__(ignore,const,class-overload=MkObjectLog)
4002 MQ_CTXT const ctxtype ,
4004 MK_DBG const debug __parser__(default=0),
4005 MK_STRN const callfunc __parser__(default=F#FUNC),
4006 MK_I32 const lvl __parser__(default=0)
4008
4009#define MqTypeCtxLog_1(typ) MqTypeCtxLog_RT(MK_RT_CALL typ,NULL,0,__func__,0)
4010
4012// MqTypeCtxC_C_API
4013
4014/* ####################################################################### */
4015/* ### ### */
4016/* ### C O N T E X T - A P I ### */
4017/* ### ### */
4018/* ####################################################################### */
4019
4101
4102// ===================================================================================================
4103
4105#if defined(MQ_C_BUILD_DLL)
4106
4107 #define META_SECTION_DEFINE
4108 #include "MqContextS_mq.h"
4109 #undef META_SECTION_DEFINE
4110
4111#else // MQ_C_BUILD_DLL
4112
4114 // BEGIN-MqContextS-super - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
4115
4116 union {
4117 struct MkObjectS obj; // instance-base MkObjectS
4119
4120 // END-MqContextS-super - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
4121
4122 // instance attributes
4123 const
4128 struct MqLinkS link;
4129
4130 // offset calculated by "Nhi1InternalSize"
4132};
4133
4134#endif // MQ_C_BUILD_DLL
4135
4136// BEGIN-MqContextS-Definition - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
4137
4141 __parser__push__(prefix=Class, doc-group=Define, doc-index=Class);
4142
4143// Signature --------------------------------------------------------------
4146
4147 #define MqContextC_SIGNATURE (MkObjectC_SIGNATURE ^ (13u<<10))
4148 #define MqContextC_MASK (((1u<<22)-1)<<10)
4149
4151
4152// CompileTimeCast --------------------------------------------------------------
4155
4156 #define MqContextC_X2ctx(x) (x)
4157 #define MqContextC_X2obj(x) MkOBJ(x)
4158
4160
4161// TypeDef --------------------------------------------------------------
4164
4166 __parser__(ignore) typedef struct MqContextS MqContextCR;
4168 __parser__(ignore) typedef const struct MqContextS MqContextCNR;
4170 #define MqContextC_T (&MQ_RT_REF._MqContextC_T)
4172 #define MqContextC_TT (MkTYP(MqContextC_T))
4174 #define MqContextST MqContextC_T
4176 #define MqContextSTT (MkTYP(MqContextST))
4178 #define MqContextC_type MQ_CTX
4180 #define MqContextCT_X(instance) ( (struct MqTypeCtxS *) (MkOBJ_R(instance).type) )
4182 #define MqContextCTT_X(instance) (MkOBJ_R(instance).type)
4184 #define MqContextCT_TT(typ) ( (struct MqTypeCtxS *) (typ) )
4186 #define MqContextC_NS MQ
4188 #define MqContextCTT MqContextCTT
4190 #define MqContextCT ( (struct MqTypeCtxS *) MqContextCTT )
4191
4193
4194// TypeCheck --------------------------------------------------------------
4197
4198 #pragma GCC diagnostic push
4199 #pragma GCC diagnostic ignored "-Wattributes"
4200
4203 __parser__(class=MqContextC,static,hide)
4206 return MkSanitizeCheck(MqContextC,mng);
4207 }
4208
4211 __parser__(class=MqContextC,static,hide)
4214 return MkSanitizeCheckO(MqContextC,obj);
4215 }
4216
4217 #pragma GCC diagnostic pop
4218 #define MqContextC_Check(mng) MqCtxCheck(mng)
4219
4221
4222// RunTimeCast --------------------------------------------------------------
4225
4227 __parser__(class=MqContextC,hide,static)
4228 META_ATTRIBUTE_SANITIZE
4231 return (MqCtxCheck(mng) ? (MQ_CTX)mng : NULL);
4232 }
4233
4235 __parser__(class=MqContextC,hide,static)
4236 META_ATTRIBUTE_SANITIZE
4239 return (MqCtxCheck(mng) ? (MQ_CTXN)mng : NULL);
4240 }
4241
4243 #define MqCtxRaise(_ctx) if (!_MkCheckX(MqContextC,_ctx)) { \
4244 MkErrorSetC_1E("'MqContextC' hdl is NULL"); \
4245 goto error ; \
4246 }
4247
4249 #define MqCTX_R(x) (*(x)).super.ctx
4251 #define MqCTX(x) (&MqCTX_R(x))
4252
4254
4257// MqContextC_Class_Define_C_API
4258
4259// END-MqContextS-Definition - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
4260
4261// =========================================================================
4262// BEGIN-MqContextS-Export - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
4263
4266
4269
4270__parser__push__(doc-group=_ignore_,doc-index=Class,doc-name=Export,class=MqContextC);
4271
4287__parser__(class-overload=MkObjectHandleGet)
4291 MQ_CTX const ctx __parser__(null-allowed)
4292) {
4293 return MkObjectHandleGet(ctx?MkOBJ(ctx):NULL);
4294}
4295
4304__parser__(flags=new)
4308 MK_HDL const netHdl
4309) {
4310 return MqCtx(MkObjectHandleResolve(netHdl));
4311}
4312
4322#define MqContextHandleResolve_e(netHdl) ({ \
4323 MK_HDL tmpHdl=netHdl; \
4324 MQ_CTX tmp; \
4325 if (tmpHdl==0) { \
4326 tmp=NULL; \
4327 } else { \
4328 tmp=MqContextHandleResolve(tmpHdl); \
4329 if (tmp==NULL) { \
4330 MkErrorSetC_1_NULL("ERROR: 'MqContextC' handle is 'NULL'"); \
4331 goto error; \
4332 }; \
4333 }; \
4334 tmp; \
4335})
4336
4338
4340// Class export & import
4341
4345 __parser__(flags=new,doc-group=_ignore_,doc-index=Class,doc-name=Misc,class=MqContextC,null-return-allow)
4348 return (MQ_CTX)MK_NULL;
4349 }
4351// MqContextC - Misc - function
4352
4354// MqContextC_Class_C_API
4355
4356// END-MqContextS-Export - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
4357
4359// MqContextC_C_API
4360
4361// #######################################################################
4362// -----------------------------------------------------------------------
4367
4368__parser__push__(doc-group=TOR);
4369
4371__parser__(internal)
4374 MQ_CTX const ctx,
4375 MK_TYP type,
4376 MQ_CTX const tmpl
4378
4385__parser__(internal)
4388 MQ_CTX const ctx
4390
4409__parser__(constructor,lng-constr)
4412 MK_TYP type __parser__(internal,default=NULL),
4413 MQ_CTX const tmpl __parser__(default=NULL)
4415
4422__parser__(internal,constructor)
4425 MK_TYP type __parser__(internal,default=NULL),
4426 MQ_CTX const tmpl __parser__(default=NULL),
4427 MQ_CTX *ctx_out
4429
4432
4443__parser__(destructor)
4446 MQ_CTX ctx
4448
4450
4452
4454// MqContextC_TOR_C_API
4455
4456// #######################################################################
4457// -----------------------------------------------------------------------
4463
4464__parser__push__(doc-group=Error,doc-index=ErrorApi);
4465
4486__parser__(error-ignore,no-static)
4489 MQ_CTXN const targetCtx ,
4490 MQ_CTXN const sourceCtx
4492
4507__parser__(error-ignore,no-static)
4510 MQ_CTXN const targetCtx ,
4511 MQ_CTXN const sourceCtx
4513
4518 MQ_CTXN const fmtobj __parser__(default=NULL)
4519) {
4520 return MkErrorFORMAT(MkOBJ(fmtobj));
4521}
4522
4524
4526// MqContextC_ErrorApi_Error_C_API
4527
4528
4529// #######################################################################
4530// -----------------------------------------------------------------------
4535
4536__parser__push__(doc-group=Misc,doc-index=MiscApi);
4537
4541 return ctx ? (MQ_IS_SLAVE(ctx) ? MqGetRoot(ctx->config.master) : MQ_GET_PARENT(ctx)) : NULL;
4542}
4543
4545__parser__(ignore)
4548 return ctx ? (MQ_IS_SLAVE(ctx) ? MqGetRoot(ctx->config.master) : MQ_GET_PARENT(ctx)) : NULL;
4549}
4550
4597 MQ_CTX const ctx __parser__(null-allowed),
4598 MK_STRN const callfunc __parser__(default=F#FUNC),
4599 MK_STRN const callfile __parser__(default=F#FILE),
4600 MK_I32 const callline __parser__(default=F#LINE)
4602
4615__parser__(internal)
4618 MQ_CTX const ctx
4620
4637__parser__(hide)
4640 MQ_CTX const ctx,
4641 MK_BFLN args
4643
4653 MQ_CTX const ctx
4655
4704
4707 MQ_CTX const ctx,
4708 enum MqWaitOnEventE const wait __parser__(default=MQ_WAIT_NO),
4709 MK_TIME_T timeout __parser__(default=MK_TIMEOUT_DEFAULT)
4711
4712// sync with: MkObjectToString
4713//
4724__parser__(class-overload=MkObjectToString)
4727 MQ_CTXN const ctx
4729
4730/*
4742__parser__(internal)
4743MQ_EXTERN bool MK_DECL MqContextCheckLock (
4744 MQ_CTX ctx
4745) MK_ATTR_INSTANCE ;
4746*/
4747
4749
4751// MqContextC_MiscApi_Misc_C_API
4752
4753// #######################################################################
4754// -----------------------------------------------------------------------
4780
4781__parser__push__(doc-group=Env,doc-index=EnvApi);
4782
4788 MQ_CTX ctx
4790
4794 MQ_CTX ctx
4796
4799
4811__parser__(const,ignore,class-overload=MkObjectLog)
4814 MQ_ENVN const env ,
4816 MK_DBG const debug __parser__(default=0),
4817 MK_STRN const callfunc __parser__(default=F#FUNC),
4818 MK_I32 const lvl __parser__(default=0),
4819 MK_STRN const label __parser__(default=S#"ENV")
4821
4822#define MqEnvLog_0() MqEnvLog(&(META_CONTEXT_S)->link.protect,META_CONTEXT_S,NULL,0,__func__,0,"ENV")
4823#define MqEnvLog_1(env) MqEnvLog(env,NULL,NULL,0,__func__,0,"ENV")
4824#define MqEnvLog_2(env,fmt) MqEnvLog(env,fmt,NULL,0,__func__,0,"ENV")
4825#define MqEnvLog_3(env,fmt,lbl) MqEnvLog(env,fmt,lbl,0,__func__,0,"ENV")
4826
4828
4830
4832// MqContextC_EnvApi_Env_C_API
4833
4834// #######################################################################
4835// -----------------------------------------------------------------------
4912
4934
4935__parser__push__(doc-group=Storage,doc-index=StorageApi);
4936
4946 MQ_CTX const ctx,
4947 MQ_LTR transLId,
4948 MK_I32 *cnt_out
4950
4965 MQ_CTX const ctx,
4966 MK_STRN const storageFile
4968
4979 MQ_CTX const ctx
4981
4995 MQ_CTX const ctx,
4996 MQ_LTR *ltid_out
4998
5036 MQ_CTX const ctx,
5037 MQ_LTR *transLIdP_inout __parser__(default=0)
5039
5049 MQ_CTX const ctx,
5050 MQ_LTR transLId
5052
5062 MQ_CTX const ctx,
5063 MQ_LTR transLId
5065
5080 MQ_CTX const ctx,
5081 MQ_LTR *transLIdP_inout __parser__(default=0)
5083
5092 MQ_CTX const ctx,
5093 MQ_LTR *cnt_out
5095
5098
5102 MQ_CTX const ctx,
5103 MK_STRN const callfunc __parser__(default=F#FUNC)
5105
5106#define MqStorageLog_1(ctx) MqStorageLog(ctx,__func__)
5107
5109
5116__parser__(no-rpc)
5119 MQ_CTX const ctx,
5120 MQ_CTX *otherCtxP_out,
5121 MQ_LTR *otherLIdP_out
5123
5125
5127// MqContextC_StorageApi_Storage_C_API
5128
5129// #######################################################################
5130// -----------------------------------------------------------------------
5213__parser__push__(doc-group=Link,doc-index=LinkApi);
5214
5254 MQ_CTX const ctx,
5255 MK_BAC args __parser__(default=NULL)
5257
5270 MQ_CTX const ctx
5272
5287 MQ_CTX const ctx
5289
5308 MQ_CTX const ctx,
5309 MQ_CTX const parent,
5310 MK_BAC const args __parser__(default=NULL)
5312
5328__parser__(hide,overload-c-no)
5331 MQ_CTX const ctx,
5332 MK_BAC const args __parser__(default=NULL)
5334
5346 MQ_CTX const ctx
5348
5359 MQ_CTX const ctx
5361
5368 // BUF FIX: result always a context id "ctx" is valid
5369 // test: Nhi1Exec lcconfig.test --block-2 --fast-testing --lang-tcl -verbose e
5370 // -match lcconfig-2-5-* --num "1 3 1" --com-uds
5371 // RPC send "object-delete-message" on server-parent-context which can be
5372 // a client-child. The MqLinkGetParent is used to resolve this
5373 // file: LibLcConfigRpcClient.tcl
5374 return ctx ? MQ_GET_PARENT(ctx) : NULL;
5375}
5376
5385 return ctx ? MQ_IS_PARENT(ctx) : false;
5386}
5387
5399 return ctx ? ctx->link.ctxId : 0;
5400}
5401
5411 return ctx && ctx->link.ctxIdP ? ctx->link.ctxIdP->link.targetIdent : "";
5412}
5413
5415
5417// MqContextC_LinkApi_Link_C_API
5418
5419
5420// #######################################################################
5421// -----------------------------------------------------------------------
5615
5616__parser__push__(doc-group=Route,doc-index=RouteApi);
5617
5630 MQ_CTX ctx,
5631 MK_STRN route,
5632 MK_STRN service,
5633 bool overwrite __parser__(default=false)
5635
5641 MQ_CTX ctx,
5642 MK_STRN route,
5643 MK_STRN service,
5644 bool overwrite __parser__(default=false)
5646
5675 MQ_CTX ctx,
5676 MK_STRN service,
5677 MK_BAC args __parser__(default=NULL)
5679
5684#define MQ_ROUTE_CTX_MAX 50
5685
5715
5718 MQ_CTX const ctx,
5719 MK_STRN const ident,
5720 MK_NUM const retnum __parser__(default=-1)
5722
5738 MQ_CTX const ctx,
5739 MK_STRN * path_out
5741
5803 MQ_CTX const ctx,
5804 MK_BFL *treeP_out
5806
5808
5810// MqContextC_RouteApi_Route_C_API
5811
5812
5813// #######################################################################
5814// -----------------------------------------------------------------------
5874
5875__parser__push__(doc-group=Service,doc-index=ServiceApi);
5876
5910__parser__(type=ME_PSN_MQ_TOKEN:"token identifer")
5912
5914#define MQ_TOK_SIZE (8+1)
5915
5916// [MqServiceCallbackF]
5928// [MqServiceCallbackF]
5929
5939 MQ_CTX const ctx
5940) {
5941 MK_INSTANCE_HDL(ctx);
5942 return (ctx->link.protect.transSId != 0);
5943}
5944
5953 MQ_CTX const ctx
5955
5964 MQ_CTX const ctx,
5965 MQ_TOK const token
5967
5978 MQ_CTX const ctx,
5979 MQ_TOK const token
5981
6024__parser__(no-rpc,callback-name=Service)
6027 MQ_CTX const ctx,
6028 MQ_TOK const token,
6029 MqServiceCallbackF const fCall __parser__(callback-call),
6030 MK_CBP callback __parser__(callback-data),
6031 MqDataFreeF fFree __parser__(callback-free),
6032 MkMarkF fMark __parser__(internal,default=NULL)
6034
6035// \anchor \NS{StorageService}
6050 MQ_CTX const ctx,
6051 MQ_TOK const token
6053
6062 MQ_CTX const ctx,
6063 MQ_TOK const token
6065
6073
6089 MQ_CTX const ctx,
6090 MQ_TOK const token,
6091 MQ_SLAVE_ID const id __parser__(default=MQ_SLAVE_OTHER)
6093
6098 MQ_CTX const ctx,
6099 MQ_TOK const token,
6100 MQ_CTX const target
6102
6123 MQ_CTX const ctx,
6124 MQ_TOK const token,
6125 MK_STRN const ident
6127
6133 MQ_CTX const ctx,
6134 MQ_TOK const token,
6135 MQ_CTX const target
6137
6139// MqServiceProxy
6140
6142
6144// MqContextC_ServiceApi_Service_C_API
6145
6146// #######################################################################
6147// -----------------------------------------------------------------------
6179// MqContextC_ReadApi_C_API
6180
6181// #######################################################################
6182// -----------------------------------------------------------------------
6187
6188__parser__push__(doc-group=Block,doc-index=ReadApi);
6189
6202 MQ_CTX const ctx,
6203 MK_BUF buf __parser__(default=NULL)
6205
6213 MQ_CTX const ctx
6215
6229 MQ_CTX const ctx
6231
6239 MQ_CTX const ctx
6241
6243
6245// MqContextC_ReadApi_Block_C_API
6246
6247// #######################################################################
6248// -----------------------------------------------------------------------
6253
6254__parser__push__(doc-group=Atom,doc-index=ReadApi);
6255
6263 MQ_CTX const ctx,
6264 MK_I8 * const val_out
6266
6271 MQ_CTX const ctx,
6272 MK_BOL * const val_out
6274
6279 MQ_CTX const ctx,
6280 MK_I16 * const val_out
6282
6287 MQ_CTX const ctx,
6288 MK_I32 * const val_out
6290
6295 MQ_CTX const ctx,
6296 MK_FLT * const val_out
6298
6303 MQ_CTX const ctx,
6304 MK_I64 * const val_out
6306
6311 MQ_CTX const ctx,
6312 MK_DBL * const val_out
6314
6339 MQ_CTX const ctx,
6340 MK_BUF* const val_out
6342
6360 MQ_CTX const ctx,
6361 MK_BFL* const val_out
6363
6376 MQ_CTX const ctx,
6377 MK_BFL* const val_inout
6379
6394__parser__(template-required,no-rpc,keep,no-static)
6397 MQ_CTX const ctx,
6398 MK_NAT_LIST* const val_out
6400
6409__parser__(template-required,no-rpc,keep,no-static)
6412 MQ_CTX const ctx,
6413 MK_NAT_OBJECT* const val_out
6415
6428 MQ_CTX const ctx,
6429 MK_LONG* const val_out
6431
6444 MQ_CTX const ctx,
6445 MK_HDL* const val_out
6447
6464 MQ_CTX const ctx,
6465 MK_STRN * const val_out
6467
6486 MQ_CTX const ctx,
6487 MkBinaryR * const val_out
6489
6500 MQ_CTX const ctx,
6501 MkStringR * const val_out
6503
6514 MQ_CTX const ctx,
6515 MkBinaryR * const val_out
6517
6519
6521// MqContextC_ReadApi_Atom_C_API
6522
6523// #######################################################################
6524// -----------------------------------------------------------------------
6529
6530__parser__push__(doc-group=Misc,doc-index=ReadApi);
6531
6532__parser__(doc-no)
6535 MQ_CTX const ctx
6537
6548 MQ_CTX const ctx
6550
6556 MQ_CTX const ctx
6558
6564 MQ_CTX const ctx
6566
6572 MQ_CTX const ctx
6574
6579__parser__(internal)
6581 MQ_CTX const ctx
6583
6588__parser__(internal)
6590 MQ_CTX const ctx
6592
6594
6596// MqContextC_ReadApi_Misc_C_API
6597
6598// #######################################################################
6599// -----------------------------------------------------------------------
6629
6630__parser__push__(doc-group=Proxy,doc-index=ProxyApi);
6631
6644 MQ_CTX const sourceCtx,
6645 MQ_CTX const targetCtx
6647
6677__parser__(internal)
6680 MQ_CTX const sourceCtx,
6681 MQ_CTX const targetCtx,
6682 MQ_DMP const dump __parser__(default=NULL)
6684
6713 MQ_CTX const sourceCtx,
6714 MQ_CTX const targetCtx,
6715 MQ_DMP const dump __parser__(default=NULL),
6716 MK_TIME_T const timeout __parser__(default=MK_TIMEOUT_DEFAULT)
6718
6720
6722// MqContextC_ProxyApi_Proxy_C_API
6723
6724// #######################################################################
6725// -----------------------------------------------------------------------
6856
6861__parser__(internal,doc-no,doc-group=Atom,doc-index=SendApi)
6863 MQ_CTX const ctx,
6864 enum MqHandShakeE handShake
6866
6868// MqContextC_SendApi_C_API
6869
6870// #######################################################################
6871// -----------------------------------------------------------------------
6881
6882__parser__push__(doc-group=Atom,doc-index=SendApi);
6883
6892 MQ_CTX const ctx,
6893 MK_I8 const val
6895
6899 MQ_CTX const ctx,
6900 MK_BOL const val
6902
6906 MQ_CTX const ctx,
6907 MK_I16 const val
6909
6913 MQ_CTX const ctx,
6914 MK_I32 const val
6916
6920 MQ_CTX const ctx,
6921 MK_FLT const val
6923
6927 MQ_CTX const ctx,
6928 MK_I64 const val
6930
6934 MQ_CTX const ctx,
6935 MK_DBL const val
6937
6938// \param[in] len the string leagth of \arg{val} or \arg{-1} to calculate with \c strlen
6946 MQ_CTX const ctx,
6947 MK_STRN const val
6949
6957 MQ_CTX const ctx,
6958 MkStringR const val
6960
6971 MQ_CTX const ctx,
6972 MkBinaryR const val
6974
6986 MQ_CTX const ctx,
6987 MkBinaryR const val
6988) {
6989 return MqSendBIN_RT(MK_RT_CALL ctx, val);
6990}
6991
6998 MQ_CTX const ctx,
6999 MK_BUFN const val
7001
7017 MQ_CTX const ctx,
7018 MK_BFLN const val
7020
7031 MQ_CTX const ctx,
7032 MK_BFLN const val
7034
7050 MQ_CTX const ctx,
7051 MK_BUSN const val
7053
7061 MQ_CTX const ctx,
7062 MK_FST const printfmt,
7063 ...
7065
7074 MQ_CTX const ctx,
7075 MK_FST const printfmt,
7076 va_list var_list
7078
7101__parser__(doc-no)
7104 MQ_CTX const ctx,
7105 MQ_LTR const transLId
7107
7121 MQ_CTX const ctx,
7122 MK_LONG const val
7124
7137 MQ_CTX const ctx,
7138 MK_HDL const val
7140
7142
7144// MqContextC_SendApi_Atom_C_API
7145
7146// #######################################################################
7147// -----------------------------------------------------------------------
7152
7153__parser__push__(doc-group=Basics,doc-index=SendApi);
7154
7189 MQ_CTX const ctx,
7190 MQ_TOK const token,
7191 MK_TIME_T timeout __parser__(default=MK_TIMEOUT_DEFAULT)
7193
7220 MQ_CTX const ctx
7222
7238 MQ_CTX const ctx,
7239 MQ_TOK const token,
7240 MK_TIME_T timeout __parser__(default=MK_TIMEOUT_DEFAULT)
7242
7304
7305__parser__(no-rpc)
7308 MQ_CTX const ctx,
7309 MQ_TOK const token,
7310 MQ_TOK const callback,
7311 MK_TIME_T timeout __parser__(default=MK_TIMEOUT_DEFAULT)
7313
7336__parser__(no-rpc,callback-name=Service)
7339 MQ_CTX const ctx,
7340 MQ_TOK const token,
7341 MqServiceCallbackF const fCall __parser__(callback-call),
7342 MK_CBP callback __parser__(callback-data),
7343 MqDataFreeF fFree __parser__(callback-free),
7344 MK_TIME_T timeout __parser__(default=MK_TIMEOUT_DEFAULT)
7346
7384__parser__(no-rpc,callback-name=Service)
7387 MQ_CTX const ctx,
7388 MQ_TOK const token,
7389 MqServiceCallbackF const fCall __parser__(callback-call),
7390 MK_CBP callback __parser__(callback-data),
7391 MqDataFreeF fFree __parser__(callback-free),
7392 MK_TIME_T const timeout __parser__(default=MK_TIMEOUT_DEFAULT)
7394
7413 MQ_CTX const ctx
7415
7417
7419// MqContextC_SendApi_Basics_C_API
7420
7421// #######################################################################
7422// -----------------------------------------------------------------------
7427
7428__parser__push__(doc-group=Return,doc-index=SendApi);
7429
7447 MQ_CTX const ctx
7449
7450//#define MqSendRETURN(ctx) (dbg(ctx),MqSendRETURNx(ctx))
7451
7463 MQ_CTX const ctx
7465
7478 MQ_CTX const ctx
7480
7482
7484// MqContextC_SendApi_Return_C_API
7485
7486// #######################################################################
7487// -----------------------------------------------------------------------
7494
7495__parser__push__(doc-group=Block,doc-index=SendApi);
7496
7514 MQ_CTX const ctx
7516
7524 MQ_CTX const ctx
7526
7543 MQ_CTX const ctx
7545
7556 MQ_CTX const ctx
7558
7560
7562// MqContextC_SendApi_Block_C_API
7563
7564/* ####################################################################### */
7565/* ### ### */
7566/* ### S L A V E - A P I ### */
7567/* ### ### */
7568/* ####################################################################### */
7569
7744__parser__push__(doc-group=Slave,doc-index=SlaveApi);
7745
7775 MQ_CTX const ctx,
7776 MQ_SLAVE_ID const id,
7777 MK_STRN fct __parser__(default=S#"WORKER"),
7778 MK_BAC args __parser__(default=NULL)
7780
7804 MQ_CTX const ctx,
7805 MQ_SLAVE_ID const id,
7806 MQ_CTX const slave
7808
7824 MQ_CTX const ctx,
7825 MQ_SLAVE_ID const id
7827
7835mk_inline bool MqSlaveCheck ( MQ_CTXN const ctx, MQ_SLAVE_ID const id )
7836{
7837 return ctx ? id >= 0 && id < ctx->link.slave.used && ctx->link.slave.slaves[id] != NULL : false;
7838}
7839
7851 MQ_CTX const ctx,
7852 MQ_SLAVE_ID const id,
7853 MQ_CTX* ctx_out
7855
7867 MQ_CTX const ctx,
7868 MQ_SLAVE_ID const id,
7869 MQ_CTX* ctx_out
7871
7892 MQ_CTX const ctx,
7893 MQ_CTX* ctx_out
7895
7900{
7901 return ctx ? (MQ_IS_MASTER(ctx) ? ctx : ctx->config.master) : NULL;
7902}
7903
7909mk_inline bool MqSlaveIs ( MQ_CTXN const ctx)
7910{
7911 return ctx ? (ctx->config.master != NULL) : false;
7912}
7913
7915
7917// MqContextC_SlaveApi_Slave_C_API
7918
7919// #######################################################################
7920// -----------------------------------------------------------------------
8075
8076__parser__push__(doc-group=High,doc-index=HighApi);
8077
8085__parser__(template-required)
8088 MQ_CTX const ctx ,
8089 MK_STRN cstr ,
8090 ...
8092
8095#define MQ_SEND_TRANSACTION_TOKEN_SIZE 10
8096#define MQ_SEND_TOKEN_SIGNATURE_SIZE 50
8098
8101#define MqHigh_O BOL
8102#define MqHigh_Y I8
8103#define MqHigh_S I16
8104#define MqHigh_I I32
8105#define MqHigh_W I64
8106#define MqHigh_H HDL
8107#define MqHigh_F FLT
8108#define MqHigh_D DBL
8109#define MqHigh_C STR
8110#define MqHigh_B BIN
8111#define MqHigh_U BUF
8112#define MqHigh_L BFL
8113#define MqHigh_A BAC
8115
8125 MQ_CTX const ctx ,
8126 MK_STRN cstr ,
8127 va_list var_list
8129
8131
8133// MqContextC_HighApi_High_C_API
8134
8135/* ####################################################################### */
8136/* ### ### */
8137/* ### F I L T E R - A P I ### */
8138/* ### ### */
8139/* ####################################################################### */
8140
8266/* ####################################################################### */
8267/* ### ### */
8268/* ### C L A S S - A P I ### */
8269/* ### ### */
8270/* ####################################################################### */
8271
8291
8292__parser__push__(doc-group=Class,doc-index=ClassApi);
8293
8298 MQ_CTXN const ctx
8300
8308 MQ_CTX const ctx,
8309 MQ_FCT const item
8311
8324 MQ_CTX const ctx,
8325 MK_STRN ident
8327
8336 MQ_CTXN const ctx
8338
8345 MQ_CTXN const ctx
8347
8349
8351// MqContextC_ClassApi_Class_C_API
8352
8353// #######################################################################
8354// only - inline ---------------------------------------------------------
8358
8359__parser__push__(doc-group=Get,doc-index=ConfigApi);
8360
8366 MQ_CTX const ctx
8367) {
8368 MK_INSTANCE_HDL(ctx);
8369 return MQ_IS_SERVER(ctx);
8370}
8371
8377 MQ_CTX const ctx
8378) {
8379 MK_INSTANCE_HDL(ctx);
8380 return ctx->config.identFrom;
8381}
8382
8389 MQ_CTX const ctx
8390) {
8391 MK_INSTANCE_HDL(ctx);
8392 return MQ_IS_PARENT(ctx);
8393}
8394
8400 MQ_CTX const ctx
8401) {
8402 MK_INSTANCE_HDL(ctx);
8403 return (ctx->config.native == MK_NATIVE_IS_STRING);
8404}
8405
8413 MQ_CTXN const ctx
8414) {
8415 MK_INSTANCE_HDL(ctx);
8416 return MkSysStringGetNoNULL((ctx)->config.dispName);
8417}
8418
8426 MQ_CTXN const ctx
8427) {
8428 MK_INSTANCE_HDL(ctx);
8429 return MkSysStringGetNoNULL((ctx)->config.dispPrefix);
8430}
8431
8439 MQ_CTXN const ctx
8440) {
8441 MK_INSTANCE_HDL(ctx);
8443}
8444
8452 MQ_CTXN const ctx
8453) {
8454 MK_INSTANCE_HDL(ctx);
8456}
8457
8464 MQ_CTXN const ctx
8465) {
8466 MK_INSTANCE_HDL(ctx);
8467 return (ctx)->config.io.buffersize;
8468}
8469
8476 MQ_CTXN const ctx
8477) {
8478 MK_INSTANCE_HDL(ctx);
8479 return (ctx)->config.io.pkgsize;
8480}
8481
8488 MQ_CTXN const ctx
8489) {
8490 MK_INSTANCE_HDL(ctx);
8491 return (ctx)->config.io.timeout;
8492}
8493
8501 MQ_CTXN const ctx
8502) {
8503 MK_INSTANCE_HDL(ctx);
8504 return MkSysStringGetNoNULL(ctx->config.io.uds.file);
8505}
8506
8522__parser__(no-rpc)
8525 MQ_CTX const ctx,
8526 MK_STRN *host_out,
8527 MK_STRN *port_out,
8528 MK_STRN *myhost_out,
8529 MK_STRN *myport_out
8531
8556__parser__(no-type-extension)
8560 MQ_CTX const ctx,
8561 MK_BFL *vals_out
8563
8569 MQ_CTX const ctx
8570) {
8571 MK_INSTANCE_HDL(ctx);
8572 return ctx->config.io.pipe.hdl;
8573}
8574
8578 MQ_CTX const ctx
8579) {
8580 MK_INSTANCE_HDL(ctx);
8581 return ctx->config.startAs;
8582}
8583
8587 MQ_CTX const ctx
8588) {
8589 MK_INSTANCE_HDL(ctx);
8590 return ctx->statusIs;
8591}
8592
8596__parser__(internal)
8598 MQ_CTX const ctx
8600
8606__parser__(internal)
8608 MQ_CTX const ctx
8610
8619 MQ_CTX const ctx,
8620 MK_STRN const filename
8622
8624
8626// MqContextC_ConfigApi_Get_C_API
8627
8628/* ####################################################################### */
8629/* ### ### */
8630/* ### D U M P - A P I ### */
8631/* ### ### */
8632/* ####################################################################### */
8633
8653
8654#if defined(MQ_C_BUILD_DLL)
8655
8656 #define META_SECTION_DEFINE
8657 #include "MqDumpS_mq.h"
8658 #undef META_SECTION_DEFINE
8659
8660#else
8661
8664struct MqDumpS {
8665 // BEGIN-MqDumpS-super - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
8666
8667 union {
8668 struct MkObjectS obj; // instance-base MkObjectS
8670
8671 // END-MqDumpS-super - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
8672
8673 // missing PRIVATE instance attributes
8675};
8676
8677#endif
8678
8679// BEGIN-MqDumpS-Definition - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
8680
8684 __parser__push__(prefix=Class, doc-group=Define, doc-index=Class);
8685
8686// Signature --------------------------------------------------------------
8689
8690 #define MqDumpC_SIGNATURE (MkObjectC_SIGNATURE ^ (14u<<10))
8691 #define MqDumpC_MASK (((1u<<22)-1)<<10)
8692
8694
8695// CompileTimeCast --------------------------------------------------------------
8698
8699 #define MqDumpC_X2dmp(x) (x)
8700 #define MqDumpC_X2obj(x) MkOBJ(x)
8701
8703
8704// TypeDef --------------------------------------------------------------
8707
8709 __parser__(ignore) typedef struct MqDumpS MqDumpCR;
8711 __parser__(ignore) typedef const struct MqDumpS MqDumpCNR;
8713 #define MqDumpC_T (&MQ_RT_REF._MqDumpC_T)
8715 #define MqDumpC_TT (MkTYP(MqDumpC_T))
8717 #define MqDumpST MqDumpC_T
8719 #define MqDumpSTT (MkTYP(MqDumpST))
8721 #define MqDumpC_type MQ_DMP
8723 #define MqDumpCT_X(instance) ( (struct MkTypeDefS *) (MkOBJ_R(instance).type) )
8725 #define MqDumpCTT_X(instance) (MkOBJ_R(instance).type)
8727 #define MqDumpCT_TT(typ) ( (struct MkTypeDefS *) (typ) )
8729 #define MqDumpC_NS MQ
8731 #define MqDumpCTT MqDumpCTT
8733 #define MqDumpCT ( (struct MkTypeDefS *) MqDumpCTT )
8734
8736
8737// TypeCheck --------------------------------------------------------------
8740
8741 #pragma GCC diagnostic push
8742 #pragma GCC diagnostic ignored "-Wattributes"
8743
8746 __parser__(class=MqDumpC,static,hide)
8749 return MkSanitizeCheck(MqDumpC,mng);
8750 }
8751
8754 __parser__(class=MqDumpC,static,hide)
8757 return MkSanitizeCheckO(MqDumpC,obj);
8758 }
8759
8760 #pragma GCC diagnostic pop
8761 #define MqDumpC_Check(mng) MqDmpCheck(mng)
8762
8764
8765// RunTimeCast --------------------------------------------------------------
8768
8770 __parser__(class=MqDumpC,hide,static)
8771 META_ATTRIBUTE_SANITIZE
8774 return (MqDmpCheck(mng) ? (MQ_DMP)mng : NULL);
8775 }
8776
8778 __parser__(class=MqDumpC,hide,static)
8779 META_ATTRIBUTE_SANITIZE
8782 return (MqDmpCheck(mng) ? (MQ_DMPN)mng : NULL);
8783 }
8784
8786 #define MqDmpRaise(_dmp) if (!_MkCheckX(MqDumpC,_dmp)) { \
8787 MkErrorSetC_1E("'MqDumpC' hdl is NULL"); \
8788 goto error ; \
8789 }
8790
8792 #define MqDMP_R(x) (*(x)).super.dmp
8794 #define MqDMP(x) (&MqDMP_R(x))
8795
8797
8800// MqDumpC_Class_Define_C_API
8801
8802// END-MqDumpS-Definition - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
8803
8804// =========================================================================
8805// BEGIN-MqDumpS-Export - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
8806
8809
8812
8813__parser__push__(doc-group=_ignore_,doc-index=Class,doc-name=Export,class=MqDumpC);
8814
8830__parser__(class-overload=MkObjectHandleGet)
8834 MQ_DMP const dmp __parser__(null-allowed)
8835) {
8836 return MkObjectHandleGet(dmp?MkOBJ(dmp):NULL);
8837}
8838
8847__parser__(flags=new)
8851 MK_HDL const netHdl
8852) {
8853 return MqDmp(MkObjectHandleResolve(netHdl));
8854}
8855
8865#define MqDumpHandleResolve_e(netHdl) ({ \
8866 MK_HDL tmpHdl=netHdl; \
8867 MQ_DMP tmp; \
8868 if (tmpHdl==0) { \
8869 tmp=NULL; \
8870 } else { \
8871 tmp=MqDumpHandleResolve(tmpHdl); \
8872 if (tmp==NULL) { \
8873 MkErrorSetC_1_NULL("ERROR: 'MqDumpC' handle is 'NULL'"); \
8874 goto error; \
8875 }; \
8876 }; \
8877 tmp; \
8878})
8879
8881
8883// Class export & import
8884
8888 __parser__(flags=new,doc-group=_ignore_,doc-index=Class,doc-name=Misc,class=MqDumpC,null-return-allow)
8891 return (MQ_DMP)MK_NULL;
8892 }
8894// MqDumpC - Misc - function
8895
8897// MqDumpC_Class_C_API
8898
8899// END-MqDumpS-Export - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
8900
8909__parser__(const,class-overload=MkObjectLog)
8912 MQ_DMP const dmp ,
8914 MK_I32 const debug __parser__(default=0),
8915 MK_STRN const callfunc __parser__(default=F#FUNC),
8916 MK_I32 const lvl __parser__(default=0)
8918
8919#define MqDumpLog_1XS(dump) MqDumpLog(dump,0,__func__,0,MkOBJ(META_CONTEXT_S))
8920
8921// #######################################################################
8922// -----------------------------------------------------------------------
8927
8928__parser__push__(doc-group=TOR);
8929
8960__parser__(constructor,lng-constr)
8963 MQ_CTX const ctx __parser__(argument),
8964 MQ_DMP * const dumpP_inout
8966
8984
8985__parser__(constructor)
8988 MQ_CTX const error __parser__(argument),
8989 MQ_DMP * const dumpP_inout
8991
9010 MQ_DMP const dump,
9011 MQ_CTX const ctx
9013
9028__parser__(constructor)
9031 MkBinaryR data,
9032 MQ_DMP *dmp_out
9034
9044 MQ_DMPN const dump
9046
9049
9053__parser__(destructor)
9056 MQ_DMP dmp
9058
9060
9062
9064// MqDumpC_TOR_C_API
9065
9066// #######################################################################
9067// -----------------------------------------------------------------------
9072
9073__parser__push__(doc-group=Misc);
9074
9083 MQ_DMPN const dump
9085
9089__parser__(internal)
9091 MQ_DMP const dump,
9092 MQ_LTR transLId
9094
9098__parser__(internal)
9100 MQ_DMP const dump,
9101 MQ_LTR rmtTransLId
9103
9111__parser__(internal)
9113 MQ_DMP const dump,
9114 MK_SIZE allocsize
9116
9120__parser__(internal)
9122 MQ_DMPN const dump
9124
9128__parser__(internal)
9130 MQ_DMPN const dump
9132
9137 MQ_DMPN const dump
9139
9141
9143// MqDumpC_Misc_C_API
9144
9146// MqDumpC_C_API
9147
9148/* MARK_R ################################################################ */
9149/* ### ### */
9150/* ### R U N T I M E - A P I ### */
9151/* ### ### */
9152/* ####################################################################### */
9153
9154__parser__global__(prefix2class:MqRuntime=MqRuntimeC);
9155
9169
9170#define MqDbgRt() mk_dbg_color_ln(MK_COLOR_PURPLE,"mkrt<%p>, MkRT<%p>, mqrt<%p>, MqRT<%p>", mkrt, MkRT, mqrt, MqRT)
9171
9172__parser__(ignore)
9174
9175#pragma GCC diagnostic push
9176#pragma GCC diagnostic ignored "-Wlto-type-mismatch"
9177
9178#if defined(MQ_C_BUILD_DLL)
9179
9180 #define META_SECTION_DEFINE
9181 #include "MqRuntimeS_mq.h"
9182 #undef META_SECTION_DEFINE
9183
9184#else
9185
9187__parser__(internal)
9189
9190 // ======================================================================================
9191 // PUBLIC variables -> sync with MqRuntimeS_mk.h !!
9192
9199 // by default \ref __MqRtCheckX is \e false and will be set in \RMkNs{RuntimeSetup} .
9200
9201 // BEGIN-MqRuntimeS-super - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
9202
9203 union {
9204 struct MkObjectS obj; // instance-base MkObjectS
9205 struct MkExtensionS ext; // instance-base MkExtensionS
9206 struct MkRtExtS rtext; // instance-base MkRtExtS
9208
9209 // END-MqRuntimeS-super - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
9210
9211 // instance attributes
9212 struct MqErrorS error_mq ;
9214
9215 // ======================================================================================
9216 // TYPES
9217
9218 // BEGIN-rtDef - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
9219
9220 struct MkTypeDefS _MqErrorC_T ;
9221 struct MkTypeDefS _MqRuntimeC_T ;
9222 struct MkTypeS _MqTypeCtxC_TT ;
9223 struct MkTypeDefS _MqFactoryC_T ;
9224 struct MqTypeCtxS _MqContextC_T ;
9225 struct MkTypeDefS _MqDumpC_T ;
9226 struct MkTypeDefS _MqEnvC_T ;
9227
9228 // END-rtDef - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
9229
9230 // offset calculated by "Nhi1InternalSize"
9231 MK_BINB private_variables[291096];
9232};
9233
9234#endif
9235
9236#pragma GCC diagnostic pop
9237
9238// BEGIN-MqRuntimeS-Definition - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
9239
9243 __parser__push__(prefix=Class, doc-group=Define, doc-index=Class);
9244
9245// Signature --------------------------------------------------------------
9248
9249 #define MqRuntimeC_SIGNATURE (MkRtExtC_SIGNATURE ^ (1u<<3))
9250 #define MqRuntimeC_MASK (((1u<<29)-1)<<3)
9251
9253
9254// CompileTimeCast --------------------------------------------------------------
9257
9258 #define MqRuntimeC_X2rt(x) (x)
9259 #define MqRuntimeC_X2rtext(x) MkRTEXT(x)
9260 #define MqRuntimeC_X2ext(x) MkEXT(x)
9261 #define MqRuntimeC_X2obj(x) MkOBJ(x)
9262
9264
9265// TypeDef --------------------------------------------------------------
9268
9270 __parser__(ignore) typedef struct MqRuntimeS MqRuntimeCR;
9272 __parser__(ignore) typedef const struct MqRuntimeS MqRuntimeCNR;
9274 #define MqRuntimeC_T (&MQ_RT_REF._MqRuntimeC_T)
9276 #define MqRuntimeC_TT (MkTYP(MqRuntimeC_T))
9278 #define MqRuntimeST MqRuntimeC_T
9280 #define MqRuntimeSTT (MkTYP(MqRuntimeST))
9282 #define MqRuntimeC_type MQ_RT
9284 #define MqRuntimeCT_X(instance) ( (struct MkTypeDefS *) (MkOBJ_R(instance).type) )
9286 #define MqRuntimeCTT_X(instance) (MkOBJ_R(instance).type)
9288 #define MqRuntimeCT_TT(typ) ( (struct MkTypeDefS *) (typ) )
9290 #define MqRuntimeC_NS MQ
9292 #define MqRuntimeCTT MqRuntimeCTT
9294 #define MqRuntimeCT ( (struct MkTypeDefS *) MqRuntimeCTT )
9295
9297
9298// TypeCheck --------------------------------------------------------------
9301
9302 #pragma GCC diagnostic push
9303 #pragma GCC diagnostic ignored "-Wattributes"
9304
9307 __parser__(class=MqRuntimeC,static,ignore)
9310 return MkSanitizeCheck(MqRuntimeC,mng);
9311 }
9312
9315 __parser__(class=MqRuntimeC,static,ignore)
9318 return MkSanitizeCheckO(MqRuntimeC,obj);
9319 }
9320
9321 #pragma GCC diagnostic pop
9322 #define MqRuntimeC_Check(mng) MqRtCheck(mng)
9323
9325
9326// RunTimeCast --------------------------------------------------------------
9329
9331 __parser__(class=MqRuntimeC,ignore,static)
9332 META_ATTRIBUTE_SANITIZE
9335 return (MqRtCheck(mng) ? (MQ_RT)mng : NULL);
9336 }
9337
9339 __parser__(class=MqRuntimeC,ignore,static)
9340 META_ATTRIBUTE_SANITIZE
9343 return (MqRtCheck(mng) ? (MQ_RTN)mng : NULL);
9344 }
9345
9347 #define MqRtRaise(_rt) if (!_MkCheckX(MqRuntimeC,_rt)) { \
9348 MkErrorSetC_1E("'MqRuntimeC' hdl is NULL"); \
9349 goto error ; \
9350 }
9351
9353
9356// MqRuntimeC_Class_Define_C_API
9357
9358// END-MqRuntimeS-Definition - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
9359
9361// MqRuntime_C_API
9362
9363#define MqRT &MqRuntimeRLS
9364#if 0
9365 #define MqRT_O(o) MqRuntimeGet( MK_RT_CALL_ONLY )
9366 #define MqRT_X(x) MqRuntimeGet( MK_RT_CALL_ONLY )
9367 #define MqRT_ON(o) MqRuntimeGet( MK_RT_CALL_ONLY )
9368 #define MqRT_XN(x) MqRuntimeGet( MK_RT_CALL_ONLY )
9369#else
9370 #define MqRT_O(o) ((o) && (*o).objRtExt ? (MQ_RT)(*o).objRtExt : MqRuntimeGet( MK_RT_CALL_ONLY ))
9371 #define MqRT_X(x) ((x) && MkOBJ_R(x).objRtExt ? (MQ_RT)MkOBJ_R(x).objRtExt : MqRuntimeGet( MK_RT_CALL_ONLY ))
9372 #define MqRT_ON(o) ( (*o).objRtExt ? (MQ_RT)(*o).objRtExt : MqRuntimeGet( MK_RT_CALL_ONLY ))
9373 #define MqRT_XN(x) ( MkOBJ_R(x).objRtExt ? (MQ_RT)MkOBJ_R(x).objRtExt : MqRuntimeGet( MK_RT_CALL_ONLY ))
9374#endif
9375
9376#if META_HAS_THREAD
9377 #define MqRtSetup_O(o) MK_RT_UNUSED MQ_RT const mqrt = MqRT_O(o)
9378 #define MqRtSetup_ON(o) MK_RT_UNUSED MQ_RT const mqrt = MqRT_ON(o)
9379 #define MqRtSetup_X(x) MK_RT_UNUSED MQ_RT const mqrt = MqRT_X(x)
9380 #define MqRtSetup_XN(x) MK_RT_UNUSED MQ_RT const mqrt = MqRT_XN(x)
9381 #define MqRtSetup_RT(r) MK_RT_UNUSED MQ_RT const mqrt = r
9382 #define MqRtSetup_NULL MK_RT_UNUSED MQ_RT const mqrt = MqRuntimeGet( MK_RT_CALL_ONLY )
9383
9384 #define MqRtSetup_O_RT(o) MkRtSetup_O_RT(o) ; MqRtSetup_O(o)
9385 #define MqRtSetup_ON_RT(o) MkRtSetup_ON_RT(o) ; MqRtSetup_ON(o)
9386 #define MqRtSetup_X_RT(x) MkRtSetup_X_RT(x) ; MqRtSetup_X(x)
9387 #define MqRtSetup_XN_RT(x) MkRtSetup_XN_RT(x) ; MqRtSetup_XN(x)
9388 #define MqRtSetup_NULL_RT MkRtSetup_NULL_RT ; MqRtSetup_NULL
9389
9390 #undef AllRtSetup_O
9391 #undef AllRtSetup_ON
9392 #undef AllRtSetup_X
9393 #undef AllRtSetup_XN
9394 #undef AllRtSetup_NULL
9395
9396 #define AllRtSetup_O(o) MkRtSetup_O(o) ; MqRtSetup_O(o)
9397 #define AllRtSetup_ON(o) MkRtSetup_ON(o) ; MqRtSetup_ON(o)
9398 #define AllRtSetup_X(x) MkRtSetup_X(x) ; MqRtSetup_X(x)
9399 #define AllRtSetup_XN(x) MkRtSetup_XN(x) ; MqRtSetup_XN(x)
9400 #define AllRtSetup_NULL MkRtSetup_NULL ; MqRtSetup_NULL
9401#else
9402 #define MqRtSetup_O(o)
9403 #define MqRtSetup_ON(o)
9404 #define MqRtSetup_X(x)
9405 #define MqRtSetup_XN(x)
9406 #define MqRtSetup_RT(r)
9407 #define MqRtSetup_NULL
9408
9409 #define MqRtSetup_O_RT(o)
9410 #define MqRtSetup_ON_RT(o)
9411 #define MqRtSetup_X_RT(x)
9412 #define MqRtSetup_XN_RT(x)
9413 #define MqRtSetup_NULL_RT
9414#endif
9415
9417__parser__(ignore)
9419
9426__parser__(ignore)
9428
9434__parser__(ignore)
9436
9439
9441__parser__(ignore)
9446
9449
9460__parser__(ignore,const)
9463 MQ_RTN const mqrt ,
9465 MK_DBG const debug __parser__(default=0),
9466 MK_STRN const callfunc __parser__(default=F#FUNC),
9467 MK_I32 const lvl __parser__(default=0)
9469
9470#define MqRuntimeLog_2M(mqrt,m) MqRuntimeLog_2(mqrt,MkObj(m))
9471
9473// MqRuntimeLog
9474
9475/* ####################################################################### */
9476/* ### ### */
9477/* ### P A C K A G E - A P I ### */
9478/* ### ### */
9479/* ####################################################################### */
9480
9522// MqMsgque_C_API
9523
9524// #######################################################################
9525// -----------------------------------------------------------------------
9543
9544__parser__global__(doc-force=MqMsgque@Item);
9545
9547// MqMsgque_Item_C_API
9548
9549// #######################################################################
9550// -----------------------------------------------------------------------
9558__parser__global__(doc-force=MqMsgque@Main);
9559__parser__push__(doc-group=Main,class=MqMsgque);
9560
9568__parser__(hide,template-required,class=MqMsgque)
9570 void * code
9572
9574
9576// MqMsgque_Main_C_API
9577
9578// #######################################################################
9579// -----------------------------------------------------------------------
9584
9585__parser__push__(doc-group=Help,class=MqMsgque);
9586
9598 MK_STRN tool
9600
9603 void
9605
9607
9609// MqMsgque_Help_C_API
9610
9611// #######################################################################
9612// -----------------------------------------------------------------------
9620
9621__parser__push__(doc-group=Init,class=MqMsgque);
9622
9624__parser__(ignore)
9626
9643
9658 MK_BAC bfl __parser__(argument,default=NULL)
9660
9665 MK_STRN arg0,
9666 ...
9668
9671 MK_STRN arg0,
9672 va_list var_list
9674
9681 void
9683
9685
9687// MqMsgque_Init_C_API
9688
9689// #######################################################################
9690// MARK_D ----------------------------------------------------------------
9691
9694
9697
9700
9701// BEGIN-Class-Doc-Order - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
9702
9703// external
9709
9710// external
9716
9717// internal
9724
9725// internal
9732
9733// external
9739
9740// internal
9747
9748// internal
9755
9756// END-Class-Doc-Order - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
9757
9758// #######################################################################
9759// -----------------------------------------------------------------------
9765__parser__global__(doc-force=MqMsgque@Enum@local);
9766
9767// BEGIN-Class-Introspection - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
9768
9773
9774__parser__push__(doc-name=Introspection,doc-index=Class,class=MqContextC,no-rpc,null-return-allow,flags=new);
9775
9783
9787 MK_INSTANCE_HDL(ctx);
9788 return (MQ_CTX)MqContextC_X2obj(ctx)->obj_protect.next;
9789}
9790
9794 MK_INSTANCE_HDL(ctx);
9795 return (MQ_CTX)MqContextC_X2obj(ctx)->obj_protect.prev;
9796}
9797
9799
9802// MqContextC_Class_C_API
9803
9808
9809__parser__push__(doc-name=Introspection,doc-index=Class,class=MqDumpC,no-rpc,null-return-allow,flags=new);
9810
9818
9822 MK_INSTANCE_HDL(dmp);
9823 return (MQ_DMP)MqDumpC_X2obj(dmp)->obj_protect.next;
9824}
9825
9829 MK_INSTANCE_HDL(dmp);
9830 return (MQ_DMP)MqDumpC_X2obj(dmp)->obj_protect.prev;
9831}
9832
9834
9837// MqDumpC_Class_C_API
9838
9843
9844__parser__push__(doc-name=Introspection,doc-index=Class,class=MqFactoryC,no-rpc,null-return-allow,flags=new);
9845
9853
9857 MK_INSTANCE_HDL(fct);
9858 return (MQ_FCT)MqFactoryC_X2obj(fct)->obj_protect.next;
9859}
9860
9864 MK_INSTANCE_HDL(fct);
9865 return (MQ_FCT)MqFactoryC_X2obj(fct)->obj_protect.prev;
9866}
9867
9869
9872// MqFactoryC_Class_C_API
9873
9874// END-Class-Introspection - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
9875
9876// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
9877
9880
9881__parser__push__(doc-group=Log,doc-index=LogApi);
9882
9889 MQ_CTXN const ctx
9890) {
9891 MK_INSTANCE_HDL(ctx);
9892 return (MQ_IS_SERVER (ctx) ? "SERVER" : "CLIENT");
9893}
9894
9901 MQ_CTXN ctx
9902) {
9903 MK_INSTANCE_HDL(ctx);
9904 return (MQ_IS_PARENT (ctx) ? "PARENT" : "CHILD");
9905}
9906
9908
9910
9911// end c++ save definition
9913
9914// vim:nowrap
__thread struct MqRuntimeS MqRuntimeRLS
RLS.
#define MqFactoryS_originalIdent_size
#define MqLinkS_targetIdent_size
MqClassIdentGet of the link target, only valid on parent-context
#define MqConfigS_dispPostfix_size
void MqRuntimeCleanup(MK_RT mkrt, MQ_RT mqrt)
cleanup MkRuntimeRLS
#define END_MQ_C_DECLS
#define BEGIN_MQ_C_DECLS
#define MqRT
void MqRuntimeLog_RT(MK_RT mkrt, MQ_RTN const mqrt, MK_OBJN fmtobj, MK_DBG const debug, MK_STRN const callfunc, MK_I32 const lvl)
log the MqRuntimeS …
size_t MqRuntimeId
identify the custom runtime
static MQ_RT MqRuntimeGet(MK_RT mkrt)
inline from MqRuntimeSetup
MQ_RT MqRuntimeSetup(MK_RT const mkrt, MQ_RT const mqrt)
initialize MqRuntimeRLS
#define MqConfigS_storageFile_size
storage file used as default if a database is requested
#define MqConfigS_dispName_size
#define MqConfigS_dispPrefix_size
MK_ERR MkErrorFORMAT(MK_OBJN fmtobj)
#define MK_PARSER_fmtobj
#define MK_DECL
#define mk_inline
#define MK_NULL
MkErrorE
MkNativeIsE
MkTypeE
MK_TIMEOUT_DEFAULT
MK_NATIVE_IS_STRING
#define __parser__global__(...)
#define __parser__pop__
#define __parser__push__(...)
#define __parser__(...)
const MK_PTRB * MK_MNGN
int32_t MK_NUM
float MK_FLT
MK_PTRB * MK_PTR
const MK_STRB * MK_STRN
MK_PTRB * MK_MNG
void * MK_NAT_OBJECT
MK_STRB const * MK_FST
char MK_STRB
MK_PTRB * MK_CBP
signed char MK_I8
unsigned char MK_BINB
signed long long MK_I64
MK_STRB * MK_STR
void * MK_NAT_LIST
unsigned char MK_BOL
long MK_SIZE
MK_PTRB * MK_CCP
void(* MkMarkF)(MK_RT mkrt, MK_PTR data)
long MK_LONG
signed short int MK_I16
double MK_DBL
time_t MK_TIME_T
int32_t MK_HDL
MK_BINB const * MK_BINN
signed int MK_I32
int MK_DBG
void(* MkSelfDeleteF)(MK_RT mkrt, MK_PTR self, MK_PTR const env)
#define __MkCheckX(cls, x)
MK_OBJ(* MkConstructorF)(MK_RT mkrt, MK_TYP type, MK_PTR nat, MK_PTR lnk)
#define MkSanitizeCheck(_root, _m)
MK_PTR(* MkSelfCreateF)(MK_RT mkrt, MK_OBJ const obj, MK_PTR const env)
#define MkSanitizeCheckO(_root, _o)
#define MkObjectHandleResolve(...)
#define MkObjectHandleGet(...)
struct MkObjectS * MK_OBJ
#define MkOBJ(x)
static bool MkObjCheck(MK_MNGN mng)
#define MkObjectLog(...)
#define MkObjectToString(...)
static MK_STRN MkSysStringGetNoNULL(MK_STRN str)
#define MK_ATTR_STATIC
#define MK_ATTR_RT_INSTANCE
#define MK_ATTR_INSTANCE
#define MkThreadLocal
#define MK_RT_PTR
#define MK_PARSER_RT
#define MK_RT_ATTR_FORMAT_2
#define MK_RT_CALL
#define MK_PARSER_RT_ONLY
#define MK_ATTR_RT_STATIC
#define MK_RT_ARGS
#define MK_RT_ARGS_ONLY
#define MK_INSTANCE_HDL(x)
#define MK_RT_REF
static MK_OBJ MkTypeInstances(MK_TYP const typ)
static MK_ERR MqContextErrorFORMAT(MQ_CTXN const fmtobj)
helper used to access MkErrorDEFAULT from MqContextC
MK_STRN MqClassIdentGet(MQ_CTXN const ctx)
get the application-identification …
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
enum MkErrorE MqClassFactorySet_RT(MK_RT mkrt, MQ_CTX const ctx, MQ_FCT const item)
link the MqContextC to a new MqFactoryC
enum MkErrorE MqClassIdentSet_RT(MK_RT mkrt, MQ_CTX const ctx, MK_STRN ident)
link the MqContextC to a new MqFactoryC identified by ident
static MQ_CTX MqContextHandleResolve_RT(MK_RT mkrt, MK_HDL const netHdl)
Handle-Resolve-Slot - return a MqContextC from netHdl or MK_NULL if invalid…
static MQ_CTX MqContextInstances_RT(MK_RT mkrt)
get head-instance from linked-list of MqContextS type …
static MQ_CTX MqContextNext(MQ_CTX const ctx)
get next instance from linked-list of MqContextS type
static MK_HDL MqContextHandleGet_RT(MK_RT mkrt, MQ_CTX const ctx)
Handle-Get-Slot - returns a export-hdl to the MqContextC useable for external storage
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 …
static bool MqCtxCheck(MK_MNGN mng)
check MqContextS -> MkObjectS::signature …
static MQ_CTXN MqCtxN(MK_MNGN mng)
(const) cast a unknown-object into an MqContextS pointer or NULL if not possible
static bool MqCtxCheckO(MK_OBJN obj)
check MqContextS -> MkObjectS::signature …
static MQ_CTX MqCtx(MK_MNG mng)
cast a unknown-object into an MqContextS pointer or NULL if not possible
#define MqContextC_X2obj(x)
#define MqContextC_TT
class as MkTypeS-class-type, useable in a class-macro as: class##_TT …
#define MQ_SERVICE_FREE_ARGS
the MqDataFreeF arguments with default names
enum MkErrorE(* MqTokenF)(MQ_SERVICE_CALL_ARGS)
prototype for an object method function …
void(* MqDataFreeF)(MQ_SERVICE_FREE_ARGS)
prototype for a free additional token data function …
#define MQ_SERVICE_CALL_ARGS
the MqTokenF arguments with default names
void(* MqDataCopyF)(MQ_SERVICE_COPY_ARGS)
prototype for a copy additional token data function …
#define MQ_SERVICE_COPY_ARGS
the MqDataFreeF arguments with default names
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
enum MkErrorE MqConfigSetConfigFile_RT(MK_RT mkrt, MQ_CTX const ctx, MK_STRN const filename)
set the config-file and parse for well-known config-items
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 MK_...
#define MQ_IS_SLAVE(ctx)
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
config_t * MqConfigGetConfigFile(MQ_CTX const ctx)
get the config-file handle used for libconfig API funtions
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
#define MQ_GET_PARENT(ctx)
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
#define MQ_IS_PARENT(ctx)
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 MQ_IS_SERVER(ctx)
extract boolean information from context
static enum MqIdentE MqConfigGetIdentFrom(MQ_CTX const ctx)
get the MqConfigS::identFrom
#define MQ_IS_MASTER(ctx)
config_setting_t * MqConfigGetConfigRoot(MQ_CTX const ctx)
get the config-root handle used for libconfig API funtions
enum MkErrorE MqConfigGetIoTcpL_RT(MK_RT mkrt, MQ_CTX const ctx, MK_BFL *vals_out)
get the configuration-data of the tcp-client-server-link as MkBufferListC …
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 ?
void MqConfigSetServerSetup_RT(MK_RT mkrt, MQ_CTX const ctx, MqTokenF fCall, MK_CBP callback, MqDataFreeF fFree, MqDataCopyF fCopy)
set the MqSetupS::ServerSetup
void MqConfigSetBgError_RT(MK_RT mkrt, MQ_CTX const ctx, MqTokenF fCall, MK_CBP callback, MqDataFreeF fFree, MqDataCopyF fCopy)
set the MqSetupS::BgError
void MqConfigSetServerCleanup_RT(MK_RT mkrt, MQ_CTX const ctx, MqTokenF fCall, MK_CBP callback, MqDataFreeF fFree, MqDataCopyF fCopy)
set the MqSetupS::ServerCleanup
void MqConfigSetEvent_RT(MK_RT mkrt, MQ_CTX const ctx, MqTokenF fCall, MK_CBP callback, MqDataFreeF fFree, MqDataCopyF fCopy)
set the MqSetupS::Event
void MqConfigDup_RT(MK_RT mkrt, MQ_CTX const to, MQ_CTX const from)
copy the MqContextS::config data
void MqSetupDup_RT(MK_RT mkrt, MQ_CTX const to, MQ_CTXN const from)
copy the MqContextS::setup data …
void MqConfigReset_RT(MK_RT mkrt, MQ_CTX const ctx)
clean the MqContextS::config data
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
enum MkErrorE MqConfigSetIoTcp_RT(MK_RT mkrt, MQ_CTX const ctx, MK_STRN host, MK_STRN port, MK_STRN myhost, MK_STRN myport)
configure a context to use a tcp-client-server-link …
enum MkErrorE MqConfigSetIoUds_RT(MK_RT mkrt, MQ_CTX const ctx, MK_STRN file)
configure a context to use a uds-client-server-link …
void MqConfigSetIgnoreExit(MQ_CTX const ctx, bool data)
set the MqSetupS::ignoreExit value
void MqConfigSetStorage_RT(MK_RT mkrt, MQ_CTX const ctx, MK_STRN data)
set the Storage value and cleanup old value
#define MqConfigSetIoTcp(...)
void MqConfigSetPostfix_RT(MK_RT mkrt, MQ_CTX const ctx, MK_STRN data)
set the client-part (2) of the application-identifer MqConfigS::dispName …
enum MkErrorE MqConfigSetDaemon_RT(MK_RT mkrt, MQ_CTX const ctx, MK_STRN pidfile)
start the server-context as daemon …
enum MkErrorE MqConfigSetIoTcpL_RT(MK_RT mkrt, MQ_CTX const ctx, MK_BFL const vals)
configure a context to use a tcp-client-server-link …
void MqConfigSetTimeout(MQ_CTX const ctx, MK_TIME_T data)
set the MqIoConfigS::timeout value
void MqConfigSetPrefix_RT(MK_RT mkrt, MQ_CTX const ctx, MK_STRN data)
set the server-part (1) of the application-identifer MqConfigS::dispName …
void MqConfigSetAllTimeout(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
void MqConfigSetIdentFrom(MQ_CTX const ctx, enum MqIdentE data)
set the MqConfigS::identFrom value
enum MkErrorE MqConfigSetAllDebug_RT(MK_RT mkrt, MQ_CTX const ctx, MK_I32 const data)
set the MkRuntimeS::debug 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
void MqConfigSetPrefixWithNoLock_RT(MK_RT mkrt, MQ_CTX const ctx, MK_STRN data)
set the MqConfigS::dispPrefix with low-priority …
void MqConfigSetName_RT(MK_RT mkrt, MQ_CTX const ctx, MK_STRN data)
set the MqConfigS::dispName value and cleanup old value
void MqConfigSetIsServer(MQ_CTX const ctx, bool data)
set the MqSetupS::isServer value
enum MkErrorE MqConfigSetIoPipe_RT(MK_RT mkrt, MQ_CTX const ctx, MQ_SOCK_HDL fh)
set the pipe configuration data …
void MqEnvLog_RT(MK_RT mkrt, MQ_ENVN const env, MK_OBJN fmtobj, MK_DBG const debug, MK_STRN const callfunc, MK_I32 const lvl, MK_STRN const label)
log the MqEnvS …
void MqEnvRestore(MQ_CTX ctx)
restore the service-environment
void MqEnvProtect_RT(MK_RT mkrt, MQ_CTX ctx)
protect the service-environment
enum MkErrorE MqContextErrorMove_RT(MK_RT mkrt, MQ_CTXN const targetCtx, MQ_CTXN const sourceCtx)
move a MkErrorS from the sourceCtx to the targetCtx …
enum MkErrorE MqContextErrorCopy_RT(MK_RT mkrt, MQ_CTXN const targetCtx, MQ_CTXN const sourceCtx)
copy a MkErrorS from the sourceCtx to the targetCtx …
enum MkErrorE MqSendVL2_RT(MK_RT mkrt, MQ_CTX const ctx, MK_STRN cstr, va_list var_list)
A version of MqSend with va_list support …
enum MkErrorE MqSend_RT(MK_RT mkrt, MQ_CTX const ctx, MK_STRN cstr,...)
user friendly replacement for the MqContextC_SendApi_C_API …
void MqContextLogEnv_RT(MK_RT mkrt, MQ_CTX const ctx, MK_OBJN fmtobj, MK_DBG const debug, MK_STRN const callfunc, MK_I32 const lvl)
log the MqContextC part MqEnvS …
static MK_STRN MqLogParentOrChild(MQ_CTXN ctx)
is ctx a PARENT or a CHILD ? …
void MqContextLogConfig_RT(MK_RT mkrt, MQ_CTXN const ctx, MK_OBJN fmtobj, MK_DBG const debug, MK_STRN const callfunc, MK_I32 const lvl)
log the MqContextC part MqConfigS …
void MqContextLogLink_RT(MK_RT mkrt, MQ_CTXN ctx, MK_OBJN fmtobj, MK_DBG const debug, MK_STRN const callfunc, MK_I32 const lvl)
log the MqContextC part MqLinkS …
void MqContextLogSetup_RT(MK_RT mkrt, MQ_CTXN const ctx, MK_OBJN fmtobj, MK_DBG const debug, MK_STRN const callfunc, MK_I32 const lvl)
log the MqContextC part MqSetupS …
void MqContextLog_RT(MK_RT mkrt, MQ_CTXN const ctx, MK_OBJN fmtobj, MK_DBG const debug, MK_STRN const callfunc, MK_I32 const lvl)
log the MqContextC …
void MqContextLogDebug(MQ_CTX const ctx)
void MqContextLogType_RT(MK_RT mkrt, MQ_CTX const ctx, MK_OBJN fmtobj, MK_DBG const debug, MK_STRN const callfunc, MK_I32 const lvl)
log the MqContextC part MkTypeS …
static MK_STRN MqLogServerOrClient(MQ_CTXN const ctx)
is ctx a SERVER or a CLIENT ? …
void MqContextLogShort_RT(MK_RT mkrt, MQ_CTXN const ctx, MK_OBJN fmtobj, MK_DBG const debug, MK_STRN const callfunc, MK_I32 const lvl, MK_STRN const label)
log the MqContextC with less info then MqContextLog …
int MqExit_RT(MK_RT mkrt, MQ_CTX const ctx, MK_STRN const callfunc, MK_STRN const callfile, MK_I32 const callline)
delete the context and exit the current process or thread …
MK_STRN MqContextToString_RT(MK_RT mkrt, MQ_CTXN const ctx)
String-Slot - returns the string representation of the inst …
enum MkErrorE MqCheckForLeftOverArguments_RT(MK_RT mkrt, MQ_CTX const ctx, MK_BFLN args)
check for left over arguments from parameter args of MqLinkCreate …
enum MkErrorE MqProcessEvent_RT(MK_RT mkrt, MQ_CTX const ctx, enum MqWaitOnEventE const wait, MK_TIME_T timeout)
enter the event-loop and wait for an incoming service-request. …
void MqContextMark_RT(MK_RT mkrt, MQ_CTX const ctx)
Mark objects as used to avoid the freeing of used external memory in an external Garbage-Collection …
static MQ_CTX MqGetRoot(MQ_CTX ctx)
get the Root (toplevel initial context)
static MQ_CTXN MqGetRootN(MQ_CTXN ctx)
(const) get the Root (toplevel initial context)
MK_BUF MqContextGetBuffer_RT(MK_RT mkrt, MQ_CTX const ctx)
get the MqContextS::ctxbuf object
enum MkErrorE MqProxyForward_RT(MK_RT mkrt, MQ_CTX const sourceCtx, MQ_CTX const targetCtx, MQ_DMP const dump, MK_TIME_T const timeout)
send the entire read-data-package-data to the link-target …
enum MkErrorE MqProxyItem_RT(MK_RT mkrt, MQ_CTX const sourceCtx, MQ_CTX const targetCtx)
Copy a single-data-item from the sourceCtx to the targetCtx.
enum MkErrorE MqProxyPackage_RT(MK_RT mkrt, MQ_CTX const sourceCtx, MQ_CTX const targetCtx, MQ_DMP const dump)
copy all package-items from the sourceCtx to the targetCtx …
enum MkErrorE MqReadBFL_RT(MK_RT mkrt, MQ_CTX const ctx, MK_BFL *const val_out)
get a temporary MkBufferListC from next list-item in the read-data-package …
enum MkErrorE MqReadBOL_RT(MK_RT mkrt, MQ_CTX const ctx, MK_BOL *const val_out)
read a PRIMITIVE TYPE from the read-data-package …
enum MkErrorE MqReadHDL_RT(MK_RT mkrt, MQ_CTX const ctx, MK_HDL *const val_out)
read the handle from the read-data-package
enum MkErrorE MqReadI8_RT(MK_RT mkrt, MQ_CTX const ctx, MK_I8 *const val_out)
read a PRIMITIVE TYPE from the read-data-package …
enum MkErrorE MqReadALL_RT(MK_RT mkrt, MQ_CTX const ctx, MK_BFL *const val_inout)
get a temporary MkBufferListC from all data in the read-data-package …
enum MkErrorE MqReadI32_RT(MK_RT mkrt, MQ_CTX const ctx, MK_I32 *const val_out)
read a PRIMITIVE TYPE from the read-data-package …
enum MkErrorE MqReadLIST_RT(MK_RT mkrt, MQ_CTX const ctx, MK_NAT_LIST *const val_out)
get all arguments as native list …
enum MkErrorE MqReadDBL_RT(MK_RT mkrt, MQ_CTX const ctx, MK_DBL *const val_out)
read a PRIMITIVE TYPE from the read-data-package …
enum MkErrorE MqReadBinaryR_RT(MK_RT mkrt, MQ_CTX const ctx, MkBinaryR *const val_out)
read a MkBinaryR from the read-data-package …
enum MkErrorE MqReadLONG_RT(MK_RT mkrt, MQ_CTX const ctx, MK_LONG *const val_out)
read the long native object from the read-data-package
enum MkErrorE MqReadBIN_RT(MK_RT mkrt, MQ_CTX const ctx, MkBinaryR *const val_out)
generic function to read an MK_BIN object from the read-data-package object …
enum MkErrorE MqReadNEXT_RT(MK_RT mkrt, MQ_CTX const ctx, MK_NAT_OBJECT *const val_out)
get the next argument as native object …
enum MkErrorE MqReadI16_RT(MK_RT mkrt, MQ_CTX const ctx, MK_I16 *const val_out)
read a PRIMITIVE TYPE from the read-data-package …
enum MkErrorE MqReadFLT_RT(MK_RT mkrt, MQ_CTX const ctx, MK_FLT *const val_out)
read a PRIMITIVE TYPE from the read-data-package …
enum MkErrorE MqReadI64_RT(MK_RT mkrt, MQ_CTX const ctx, MK_I64 *const val_out)
read a PRIMITIVE TYPE from the read-data-package …
enum MkErrorE MqReadSTR_RT(MK_RT mkrt, MQ_CTX const ctx, MK_STRN *const val_out)
read a PRIMITIVE TYPE from the read-data-package …
enum MkErrorE MqReadStringR_RT(MK_RT mkrt, MQ_CTX const ctx, MkStringR *const val_out)
read a MkStringR from the read-data-package …
enum MkErrorE MqReadBUF_RT(MK_RT mkrt, MQ_CTX const ctx, MK_BUF *const val_out)
get a temporary MkBufferC from the read-data-package …
enum MkErrorE MqReadL_START_RT(MK_RT mkrt, MQ_CTX const ctx, MK_BUF buf)
start to extract a list-items from the read-data-package. …
enum MkErrorE MqReadL_END_RT(MK_RT mkrt, MQ_CTX const ctx)
finish to extract a list-items from the read-data-package. …
enum MkErrorE MqReadT_END_RT(MK_RT mkrt, MQ_CTX const ctx)
finish to extract a longterm-transaction-item from the read-data-package. …
enum MkErrorE MqReadT_START_RT(MK_RT mkrt, MQ_CTX const ctx)
start to extract a longterm-transaction-item from the read-data-package. …
enum MqHandShakeE MqReadGetHandShake(MQ_CTX const ctx)
return the HandShake identifer …
enum MkErrorE MqReadUndo_RT(MK_RT mkrt, MQ_CTX const ctx)
undo the last MqContextC READ API function call …
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 …
enum MqTransTypeE MqReadGetTransType(MQ_CTX const ctx)
return the TransactionType identifer …
void MqReadDbg_RT(MK_RT mkrt, MQ_CTX const ctx)
MQ_CTX_A MqRouteResolve_RT(MK_RT mkrt, MQ_CTX const ctx, MK_STRN const ident, MK_NUM const retnum)
return a list of all context belonging to ident …
enum MkErrorE MqRouteTraverse_RT(MK_RT mkrt, MQ_CTX ctx, MK_STRN service, MK_BAC args)
traverse a tree down and call service if available.
enum MkErrorE MqRouteCreate_RT(MK_RT mkrt, MQ_CTX ctx, MK_STRN route, MK_STRN service, bool overwrite)
create/delete a routing-link between context an a service using route
enum MkErrorE MqRouteDelete_RT(MK_RT mkrt, MQ_CTX ctx, MK_STRN route, MK_STRN service, bool overwrite)
delete a routing-link created with MqRouteCreate
enum MkErrorE MqRouteGetTree_RT(MK_RT mkrt, MQ_CTX const ctx, MK_BFL *treeP_out)
create an overview about all available routing-target and services …
enum MkErrorE MqRouteGetPath_RT(MK_RT mkrt, MQ_CTX const ctx, MK_STRN *path_out)
return the absolut route-connection-string up to the current ctx …
enum MkErrorE MqSendI32_RT(MK_RT mkrt, MQ_CTX const ctx, MK_I32 const val)
MqContextC - append a native PRIMITIVE TYPE value to the send-data-package …
enum MkErrorE MqSendHDL_RT(MK_RT mkrt, MQ_CTX const ctx, MK_HDL const val)
send the handle to the send-data-package
enum MkErrorE MqSendLTR_RT(MK_RT mkrt, MQ_CTX const ctx, MQ_LTR const transLId)
set the Longterm-Transaction-Id (LTT) in the send-data-package …
enum MkErrorE MqSendVL_RT(MK_RT mkrt, MQ_CTX const ctx, MK_FST const printfmt, va_list var_list)
append a vararg string as va_list to the send-data-package object …
enum MkErrorE MqSendV_RT(MK_RT mkrt, MQ_CTX const ctx, MK_FST const printfmt,...)
append a vararg string to the send-data-package object …
enum MkErrorE MqSendBOL_RT(MK_RT mkrt, MQ_CTX const ctx, MK_BOL const val)
MqContextC - append a native PRIMITIVE TYPE value to the send-data-package …
enum MkErrorE MqSendLONG_RT(MK_RT mkrt, MQ_CTX const ctx, MK_LONG const val)
send the long native object to the send-data-package
enum MkErrorE MqSendI16_RT(MK_RT mkrt, MQ_CTX const ctx, MK_I16 const val)
MqContextC - append a native PRIMITIVE TYPE value to the send-data-package …
enum MkErrorE MqSendFLT_RT(MK_RT mkrt, MQ_CTX const ctx, MK_FLT const val)
MqContextC - append a native PRIMITIVE TYPE value to the send-data-package …
enum MkErrorE MqSendDBL_RT(MK_RT mkrt, MQ_CTX const ctx, MK_DBL const val)
MqContextC - append a native PRIMITIVE TYPE value to the send-data-package …
enum MkErrorE MqSendBIN_RT(MK_RT mkrt, MQ_CTX const ctx, MkBinaryR const val)
append a MK_BIN object to the send-data-package. …
enum MkErrorE MqSendSTR_RT(MK_RT mkrt, MQ_CTX const ctx, MK_STRN const val)
MqContextC - append a native PRIMITIVE TYPE value to the send-data-package …
static enum MkErrorE MqSendBinaryR_RT(MK_RT mkrt, MQ_CTX const ctx, MkBinaryR const val)
append a MkBinaryR object to the send-data-package. …
enum MkErrorE MqSendBFL_RT(MK_RT mkrt, MQ_CTX const ctx, MK_BFLN const val)
append a MkBufferListC object to the send-data-package object …
enum MkErrorE MqSendStringR_RT(MK_RT mkrt, MQ_CTX const ctx, MkStringR const val)
MqContextC - append a native PRIMITIVE TYPE value to the send-data-package …
enum MkErrorE MqSendI64_RT(MK_RT mkrt, MQ_CTX const ctx, MK_I64 const val)
MqContextC - append a native PRIMITIVE TYPE value to the send-data-package …
enum MkErrorE MqSendI8_RT(MK_RT mkrt, MQ_CTX const ctx, MK_I8 const val)
MqContextC - append a native PRIMITIVE TYPE value to the send-data-package …
enum MkErrorE MqSendBUF_RT(MK_RT mkrt, MQ_CTX const ctx, MK_BUFN const val)
append a MkBufferC object to the send-data-package object …
enum MkErrorE MqSendBUS_FLAT_RT(MK_RT mkrt, MQ_CTX const ctx, MK_BUSN const val)
append a MkBufferStreamC object to the send-data-package object …
enum MkErrorE MqSendL_FLAT_RT(MK_RT mkrt, MQ_CTX const ctx, MK_BFLN const val)
append a MkBufferListC object as flat list of items to the send-data-package object …
enum MkErrorE MqSendEND_RT(MK_RT mkrt, MQ_CTX const ctx, MQ_TOK const token, MK_TIME_T timeout)
MqContextC - finish the send-data-block and call synchronous/asynchronous a remote-service …
enum MkErrorE MqSendSTART_RT(MK_RT mkrt, MQ_CTX const ctx)
initialize the send-data-package. …
enum MkErrorE MqSendSYNC_RT(MK_RT mkrt, MQ_CTX const ctx)
garantee that all pending asynchronous-service-calls are processed. …
enum MkErrorE MqSendEND_AND_CALLBACK_RT(MK_RT mkrt, MQ_CTX const ctx, MQ_TOK const token, MqServiceCallbackF const fCall, MK_CBP callback, MqDataFreeF fFree, MK_TIME_T const timeout)
finish the send-data-block, call the remote service, do not-wait for the result but expect the result...
enum MkErrorE MqSendEND_AND_WAIT_RT(MK_RT mkrt, MQ_CTX const ctx, MQ_TOK const token, MK_TIME_T timeout)
finish the send-data-block, call the remote service and wait for result…
enum MkErrorE MqSendEND_AND_SUB_RT(MK_RT mkrt, MQ_CTX const ctx, MQ_TOK const token, MqServiceCallbackF const fCall, MK_CBP callback, MqDataFreeF fFree, MK_TIME_T timeout)
finish the send-data-block, call the remote service, do wait for the result and expect multiple sub-r...
enum MkErrorE MqSendEND_AND_TRANSACTION_RT(MK_RT mkrt, MQ_CTX const ctx, MQ_TOK const token, MQ_TOK const callback, MK_TIME_T timeout)
finish the send-data-block, call the remote service to do a longterm-transaction-call …
enum MkErrorE MqSendL_END_RT(MK_RT mkrt, MQ_CTX const ctx)
finish to append an embedded body-list-item to the send-data-package. …
enum MkErrorE MqSendL_START_RT(MK_RT mkrt, MQ_CTX const ctx)
start to append an embedded body-list-item to the send-data-package. …
enum MkErrorE MqSendT_END_RT(MK_RT mkrt, MQ_CTX const ctx)
closed a longterm-transaction-item …
enum MkErrorE MqSendT_START_RT(MK_RT mkrt, MQ_CTX const ctx)
open a longterm-transaction-item …
enum MkErrorE MqSendSetHandShake(MQ_CTX const ctx, enum MqHandShakeE handShake)
set the hand-shake of the send-data-package
enum MkErrorE MqSendRETURN_RT(MK_RT mkrt, MQ_CTX const ctx)
MqContextC - finish the send-data-block on the server and optional return the results....
enum MkErrorE MqSendERROR_RT(MK_RT mkrt, MQ_CTX const ctx)
send the data from the MkErrorC to the link target . …
enum MkErrorE MqSendRETURN_SUB_RT(MK_RT mkrt, MQ_CTX const ctx)
return Sub-Data-Blocks required by MqSendEND_AND_SUB …
enum MkErrorE MqServiceProxyCtx_RT(MK_RT mkrt, MQ_CTX const ctx, MQ_TOK const token, MQ_CTX const target)
same as MqServiceProxy but use an MqContextC as input.
bool MqServiceTokenCheck(MQ_CTX const ctx, MQ_TOK const token)
in an ongoing-service-call check if the current MqContextC_ServiceApi_Identifer is token …
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
enum MkErrorE MqServiceDelete_RT(MK_RT mkrt, MQ_CTX const ctx, MQ_TOK const token)
delete a 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 …
enum MkErrorE MqServiceProxyRoundRobin_RT(MK_RT mkrt, MQ_CTX const ctx, MQ_TOK const token, MK_STRN const ident)
create a proxy-service using Round-Robin as load-balancer …
MK_STRN MQ_TOK
MqContextC - a char[4+1] or hex[8+1] string used to unique identify a service …
enum MkErrorE MqServiceStorage_RT(MK_RT mkrt, MQ_CTX const ctx, MQ_TOK const token)
setup a service listen on a MqContextC_ServiceApi_Identifer and save all read-data-package into the S...
MqTokenF MqServiceCallbackF
MqContextC - the callback-function is used as a service-handle or as a event-handle …
enum MkErrorE MqServiceCreate_RT(MK_RT mkrt, MQ_CTX const ctx, MQ_TOK const token, MqServiceCallbackF const fCall, MK_CBP callback, MqDataFreeF fFree, MkMarkF fMark)
create a link between a service-token and a service-callback …
enum MkErrorE MqServiceProxy_RT(MK_RT mkrt, MQ_CTX const ctx, MQ_TOK const token, MQ_SLAVE_ID const id)
create a service to link a master-context with a slave-context. …
bool MqServiceTokenExists(MQ_CTX const ctx, MQ_TOK const token)
check if the MqContextC_ServiceApi_Identifer token is defined as ctx service …
static bool MqSlaveIs(MQ_CTXN const ctx)
is the context a slave-context ? …
enum MkErrorE MqSlaveWorker_RT(MK_RT mkrt, MQ_CTX const ctx, MQ_SLAVE_ID const id, MK_STRN fct, MK_BAC args)
create a master/slave link using the image of the ctx object self. …
enum MkErrorE MqSlaveGetFilter_RT(MK_RT mkrt, MQ_CTX const ctx, MQ_CTX *ctx_out)
get the filter-ctx or the master-ctx …
enum MkErrorE MqSlaveDelete_RT(MK_RT mkrt, MQ_CTX const ctx, MQ_SLAVE_ID const id)
Delete a slave object from a master/slave link identified by id. …
enum MkErrorE MqSlaveGetProxy_RT(MK_RT mkrt, MQ_CTX const ctx, MQ_SLAVE_ID const id, MQ_CTX *ctx_out)
on slave return the master and on master return the slave identified by id.
static bool MqSlaveCheck(MQ_CTXN const ctx, MQ_SLAVE_ID const id)
check if slave-id is valid
static MQ_CTX MqSlaveGetMaster(MQ_CTX const ctx)
opposite function of MqSlaveGetFilter
enum MkErrorE MqSlaveCreate_RT(MK_RT mkrt, MQ_CTX const ctx, MQ_SLAVE_ID const id, MQ_CTX const slave)
create a master/slave link between the master-parent-context and the slave-parent-context …
enum MkErrorE MqSlaveGet_RT(MK_RT mkrt, MQ_CTX const ctx, MQ_SLAVE_ID const id, MQ_CTX *ctx_out)
get the slave-context from a master-context …
enum MkErrorE MqStorageLog_RT(MK_RT mkrt, MQ_CTX const ctx, MK_STRN const callfunc)
log the storage the status of the open transactions
enum MkErrorE MqStorageExport_RT(MK_RT mkrt, MQ_CTX const ctx, MQ_LTR *ltid_out)
export the read-data-package into the STORAGE …
enum MkErrorE MqStorageClose_RT(MK_RT mkrt, MQ_CTX const ctx)
close the storage. …
enum MkErrorE MqStorageOpen_RT(MK_RT mkrt, MQ_CTX const ctx, MK_STRN const storageFile)
switch to a file-based-transaction-database …
enum MkErrorE MqStorageImport_RT(MK_RT mkrt, MQ_CTX const ctx, MQ_LTR *transLIdP_inout)
import the storage-package into the read-data-package …
enum MkErrorE MqStorageErrCnt_RT(MK_RT mkrt, MQ_CTX const ctx, MQ_LTR transLId, MK_I32 *cnt_out)
increment and return the database row-error-count for the row defined with transLId
enum MkErrorE MqStorageDelete_RT(MK_RT mkrt, MQ_CTX const ctx, MQ_LTR *transLIdP_inout)
delete the storage-row identified by the transLIdP_inout …
enum MkErrorE MqStorageIncrRef_RT(MK_RT mkrt, MQ_CTX const ctx, MQ_LTR transLId)
increase the internal refCount lock of the database-entry
enum MkErrorE MqStorageCount_RT(MK_RT mkrt, MQ_CTX const ctx, MQ_LTR *cnt_out)
count the number of storage-rows …
enum MkErrorE MqStorageResolve_RT(MK_RT mkrt, MQ_CTX const ctx, MQ_CTX *otherCtxP_out, MQ_LTR *otherLIdP_out)
extract the context->link.protect.rmtTransLId entry from the database
enum MkErrorE MqStorageDecrRef_RT(MK_RT mkrt, MQ_CTX const ctx, MQ_LTR transLId)
decrease the internal refCount lock of the database-entry
void MqContextFree_RT(MK_RT mkrt, MQ_CTX const ctx)
free the MqContextC object related data but do not free the toplevel object self …
MQ_CTX MqContextSetup_RT(MK_RT mkrt, MK_TYP type, MQ_CTX const tmpl, MQ_CTX *ctx_out)
void MqContextInit_RT(MK_RT mkrt, MQ_CTX const ctx, MK_TYP type, MQ_CTX const tmpl)
initialize the MqContextC object related data but do not create the object self
MQ_CTX MqContextCreate_RT(MK_RT mkrt, MK_TYP type, MQ_CTX const tmpl)
create and initialize the MqContextC ...
void MqContextDelete_RT(MK_RT mkrt, MQ_CTX ctx)
Destructor - delete a MqContextC instance …
void(* MqSetupF)(MQ_CTX const ctx)
used to setup (initialize) a new thread/fork/process created by libmqmsgque using the SysServer?...
void(* MqHelpF)(MK_STRN basename)
application specific help function type …
int(* MqExitF)(MK_RT mkrt, int num)
prototype for exit a process or thread …
bool(* MqWaitForPipeF)(MK_RT mkrt, MQ_CTX const ctx, const struct MkIdS *idP)
Wait for a pipe-server to finish …
void(* MqDeleteF)(MQ_CTX const ctx)
the prototype for a ContextDelete function …
void(* MqRefCountF)(MK_RT mkrt, MQ_CTX ctx, MK_PTR const env)
used in MqTypeCtxS::fIncrSelf and MqTypeCtxS::fDecrSelf to protect an "embedded" self on deletion
enum MkErrorE(* MqCreateF)(MK_RT mkrt, MQ_CTX const ctx, MK_BFL const args)
the prototype for the ContextCreate function …
void MqDumpLog_RT(MK_RT mkrt, MQ_DMP const dmp, MK_OBJN fmtobj, MK_I32 const debug, MK_STRN const callfunc, MK_I32 const lvl)
log the MqDumpC …
static MQ_DMP MqDumpInstances_RT(MK_RT mkrt)
get head-instance from linked-list of MqDumpS type …
static MQ_DMP MqDumpGetNull(void)
Null-Slot - return a MqDumpC typed NULL instance …
static MQ_DMP MqDumpNext(MQ_DMP const dmp)
get next instance from linked-list of MqDumpS type
static MK_HDL MqDumpHandleGet_RT(MK_RT mkrt, MQ_DMP const dmp)
Handle-Get-Slot - returns a export-hdl to the MqDumpC useable for external storage
static MQ_DMP MqDumpPrev(MQ_DMP const dmp)
get previous instance from linked-list of MqDumpS type
static MQ_DMP MqDumpHandleResolve_RT(MK_RT mkrt, MK_HDL const netHdl)
Handle-Resolve-Slot - return a MqDumpC from netHdl or MK_NULL if invalid…
static bool MqDmpCheckO(MK_OBJN obj)
check MqDumpS -> MkObjectS::signature …
static MQ_DMP MqDmp(MK_MNG mng)
cast a unknown-object into an MqDumpS pointer or NULL if not possible
static MQ_DMPN MqDmpN(MK_MNGN mng)
(const) cast a unknown-object into an MqDumpS pointer or NULL if not possible
#define MqDumpC_TT
class as MkTypeS-class-type, useable in a class-macro as: class##_TT …
#define MqDumpC_X2obj(x)
static bool MqDmpCheck(MK_MNGN mng)
check MqDumpS -> MkObjectS::signature …
enum MqHandShakeE MqDumpHandShakeGet(MQ_DMPN const dump)
return the MqHandShakeE as character …
void MqDumpRmtTransLIdSet(MQ_DMP const dump, MQ_LTR rmtTransLId)
set the MqEnvS::rmtTransLId …
void MqDumpTransLIdSet(MQ_DMP const dump, MQ_LTR transLId)
set the MqEnvS::transLId …
MK_SIZE MqDumpAllocSizeGet(MQ_DMPN const dump)
return the allocated buffer of the MqDumpC …
MK_STRN MqDumpTokenGet(MQ_DMPN const dump)
return the MqContextC_ServiceApi_Identifer …
void MqDumpAllocSizeSet(MQ_DMP const dump, MK_SIZE allocsize)
set the allocated buffer of the MqDumpC …
MK_SIZE MqDumpSizeGet(MQ_DMPN const dump)
report the binary data size from an MqDumpS object
enum MkErrorE MqDumpExport_RT(MK_RT mkrt, MQ_CTX const ctx, MQ_DMP *const dumpP_inout)
create a MqDumpC as export of the ctx-read-data-package …
enum MkErrorE MqDumpError_RT(MK_RT mkrt, MQ_CTX const error, MQ_DMP *const dumpP_inout)
export the context->error into the dump-package …
MkBinaryR MqDumpBinGet(MQ_DMPN const dump)
export the binary data from an MqDumpS object
enum MkErrorE MqDumpImport_RT(MK_RT mkrt, MQ_DMP const dump, MQ_CTX const ctx)
import the dump-package into the ctx-read-data-package …
enum MkErrorE MqDumpBinSet_RT(MK_RT mkrt, MkBinaryR data, MQ_DMP *dmp_out)
create an MqDumpS object from binary data
void MqDumpDelete_RT(MK_RT mkrt, MQ_DMP dmp)
Destructor - delete a MqDumpC instance …
static MQ_ENV MqEnv(MK_MNG mng)
cast a unknown-object into an MqEnvS pointer or NULL if not possible
static MQ_ENVN MqEnvN(MK_MNGN mng)
(const) cast a unknown-object into an MqEnvS pointer or NULL if not possible
static bool MqEnvCheckO(MK_OBJN obj)
check MqEnvS -> MkObjectS::signature …
static bool MqEnvCheck(MK_MNGN mng)
check MqEnvS -> MkObjectS::signature …
void MqErrorEnvReset(MQ_ERR const err)
reset the MqErrorS::client_protect and the MqErrorS::server_protect …
static bool MqErrCheck(MK_MNGN mng)
check MqErrorS -> MkObjectS::signature …
static MQ_ERR MqErr(MK_MNG mng)
cast a unknown-object into an MqErrorS pointer or NULL if not possible
static MQ_ERRN MqErrN(MK_MNGN mng)
(const) cast a unknown-object into an MqErrorS pointer or NULL if not possible
static bool MqErrCheckO(MK_OBJN obj)
check MqErrorS -> MkObjectS::signature …
enum MkErrorE(* MqFactoryCTorF)(MK_RT mkrt, MQ_RT mqrt, MQ_CTX const tmpl, enum MqFactoryE create, MQ_FCT const fct, MQ_CTX *ctx_out)
type of a MqFactoryC constructor
void(* MqFactoryDataFreeF)(MK_RT mkrt, MK_PTR *dataP)
prototype for a free additional factory data function
void(* MqFactoryDTorF)(MK_RT mkrt, MQ_CTX ctx, bool doFactoryCleanup, MQ_FCT const fct)
type of a MqFactoryC destructor
void(* MqFactoryDataCopyF)(MK_RT mkrt, MK_PTR *dataP)
prototype for a copy additional factory data function
static MQ_FCT MqFactoryInstances_RT(MK_RT mkrt)
get head-instance from linked-list of MqFactoryS type …
static MQ_FCT MqFactoryHandleResolve_RT(MK_RT mkrt, MK_HDL const netHdl)
Handle-Resolve-Slot - return a MqFactoryC from netHdl or MK_NULL if invalid…
static MK_HDL MqFactoryHandleGet_RT(MK_RT mkrt, MQ_FCT const fct)
Handle-Get-Slot - returns a export-hdl to the MqFactoryC useable for external storage
static MQ_FCT MqFactoryPrev(MQ_FCT const fct)
get previous instance from linked-list of MqFactoryS type
static MQ_FCT MqFactoryGetNull(void)
Null-Slot - return a MqFactoryC typed NULL instance …
static MQ_FCT MqFactoryNext(MQ_FCT const fct)
get next instance from linked-list of MqFactoryS type
static bool MqFctCheck(MK_MNGN mng)
check MqFactoryS -> MkObjectS::signature …
#define MqFactoryC_X2obj(x)
static bool MqFctCheckO(MK_OBJN obj)
check MqFactoryS -> MkObjectS::signature …
static MQ_FCTN MqFctN(MK_MNGN mng)
(const) cast a unknown-object into an MqFactoryS pointer or NULL if not possible
static MQ_FCT MqFct(MK_MNG mng)
cast a unknown-object into an MqFactoryS pointer or NULL if not possible
#define MqFactoryC_TT
class as MkTypeS-class-type, useable in a class-macro as: class##_TT …
MQ_FCT MqFactoryGetCalled_RT(MK_RT mkrt, MK_STRN const ident)
returns the MqFactoryC identified by ident …
MK_PTR MqFactoryItemGetDeleteData(MQ_FCTN const fct)
helper function to return MqFactoryS::Delete::data
MK_PTR MqFactoryItemGetCreateData(MQ_FCTN const fct)
helper function to return MqFactoryS::Create::data
MQ_FCT MqFactoryGet_RT(MK_RT mkrt, MK_STRN const ident)
return the MqFactoryC
MK_STRN MqFactoryGetOriginalIdent(MQ_FCTN const fct)
helper function to return MqFactoryS::originalIdent
MQ_FCT MqFactoryGetCalledL_RT(MK_RT mkrt, MK_BFLN largs)
returns the MqFactoryC identified as first argument in the largs MkBufferListC …
#define MqFactoryGetCalled(...)
MQ_FCT MqFactoryInitial_RT(MK_RT mkrt, MQ_FCT const fct)
set the initial-attribut to fct …
MK_STRN MqFactoryInitialIdent_RT(MK_RT mkrt)
return the factory-identifier of the initial MqFactoryC
void MqFactoryLogAll_RT(MK_RT mkrt, MK_STRN const callfunc)
log all "factories" to stderr
MQ_FCT MqFactoryDefault_RT(MK_RT mkrt, MQ_FCT const fct)
set the default-attribute to the factory …
MK_STRN MqFactoryDefaultIdent_RT(MK_RT mkrt)
return the factory-identifier of the default MqFactoryC
void MqFactoryLog_RT(MK_RT mkrt, MQ_FCTN const fct, MK_OBJN fmtobj, MK_DBG const debug, MK_STRN const callfunc, MK_I32 const lvl)
log the MqFactoryC …
enum MkErrorE MqFactoryNew_RT(MK_RT mkrt, MQ_FCT const fct, MQ_CTX const tmpl, MQ_CTX *const val_out)
create a new MqContextC from a MqFactoryC …
void MqFactoryDelete_RT(MK_RT mkrt, MQ_FCT fct)
Destructor - delete a MqFactoryC instance …
MQ_FCT MqFactoryTypeAdd_RT(MK_RT mkrt, MK_OBJN const error, MK_STRN const ident, MkSelfCreateF const fctCreate, MkSelfDeleteF const fctDelete, MkConstructorF const constructor, MkSelfDeleteF const selfDelete)
add a new MqFactoryS-Object identified by a fctT
MQ_FCT MqFactoryAdd_RT(MK_RT mkrt, MK_OBJN const error, MqFactoryCTorF const createCallF, MK_CCP const constructor, MqFactoryDataFreeF const createDataFreeF, MqFactoryDataCopyF const createDataCopyF, MqFactoryDTorF const deleteCallF, MK_CCP const destructor, MqFactoryDataFreeF const deleteDataFreeF, MqFactoryDataCopyF const deleteDataCopyF, MK_STRN const ident)
Add a new MqFactoryC identified by factory-identifier and defined by factory-constructor …
void MqFactoryFree_RT(MK_RT mkrt, MQ_FCT const fct)
free internal factory memory and call MqFactoryDTorS::fFree + MqFactoryCTorS::fFree
MQ_FCT MqFactoryDup2_RT(MK_RT mkrt, MQ_FCTN const fct, MK_STRN const ident)
create a duplicate of the singleton object MqFactoryC using a new factory-identifer
#define MQ_EXTERN_DATA
#define MQ_EXTERN
static library
static MK_I32 MqStartE_ToInt(enum MqStartE value)
return the MqStartE as integer …
enum MkErrorE MqTransTypeE_FromInt(MK_I32 const value, enum MqTransTypeE *value_out)
return the MqTransTypeE from integer …
static MK_I32 MqIdentE_ToInt(enum MqIdentE value)
return the MqIdentE as integer …
MK_STRN MqWaitOnEventE_ToString(enum MqWaitOnEventE value)
return the MqWaitOnEventE as string …
static MK_I32 MqStatusIsEF_ToInt(enum MqStatusIsEF value)
return the MqStatusIsEF as integer …
MqFactoryE
the factory is called to create an object for ...
static MK_I32 MqIoComE_ToInt(enum MqIoComE value)
return the MqIoComE as integer …
enum MkErrorE MqFactoryE_FromInt(MK_I32 const value, enum MqFactoryE *value_out)
return the MqFactoryE from integer …
enum MkErrorE MqHandShakeE_FromInt(MK_I32 const value, enum MqHandShakeE *value_out)
return the MqHandShakeE from integer …
enum MkErrorE MqStartE_FromInt(MK_I32 const value, enum MqStartE *value_out)
return the MqStartE from integer …
enum MkErrorE MqIdentE_FromInt(MK_I32 const value, enum MqIdentE *value_out)
return the MqIdentE from integer …
static MK_I32 MqHandShakeE_ToInt(enum MqHandShakeE value)
return the MqHandShakeE as integer …
MqWaitOnEventE
wait for an event? …
MqSlaveE
predefined slave-id for well known slaves …
MK_STRN MqIoComE_ToString(enum MqIoComE value)
return the MqIoComE as string …
MK_STRN MqFactoryE_ToString(enum MqFactoryE value)
return the MqFactoryE as string …
enum MkErrorE MqIoComE_FromInt(MK_I32 const value, enum MqIoComE *value_out)
return the MqIoComE from integer …
MK_STRN MqStatusIsEF_ToString(enum MqStatusIsEF value)
return the MqStatusIsEF as string …
static MK_I32 MqTransTypeE_ToInt(enum MqTransTypeE value)
return the MqTransTypeE as integer …
enum MkErrorE MqSlaveE_FromInt(MK_I32 const value, enum MqSlaveE *value_out)
return the MqSlaveE from integer …
MqIdentE
identify the application using prefix (default) or factory …
MK_STRN MqSlaveE_ToString(enum MqSlaveE value)
return the MqSlaveE as string …
MqStartE
User preferences on HOWTO start a new entity.
MqStatusIsEF
Information about how the context was created.
MK_STRN MqIdentE_ToString(enum MqIdentE value)
return the MqIdentE as string …
MqHandShakeE
the hand-shake of a service-call …
MK_STRN MqStartE_ToString(enum MqStartE value)
return the MqStartE as string …
enum MkErrorE MqStatusIsEF_FromInt(MK_I32 const value, enum MqStatusIsEF *value_out)
return the MqStatusIsEF from integer …
MqIoComE
what kind of socket interface to use? …
static MK_I32 MqFactoryE_ToInt(enum MqFactoryE value)
return the MqFactoryE as integer …
static MK_I32 MqWaitOnEventE_ToInt(enum MqWaitOnEventE value)
return the MqWaitOnEventE as integer …
MqTransTypeE
the type of the transaction …
static MK_I32 MqSlaveE_ToInt(enum MqSlaveE value)
return the MqSlaveE as integer …
MK_STRN MqHandShakeE_ToString(enum MqHandShakeE value)
return the MqHandShakeE as string …
enum MkErrorE MqWaitOnEventE_FromInt(MK_I32 const value, enum MqWaitOnEventE *value_out)
return the MqWaitOnEventE from integer …
MK_STRN MqTransTypeE_ToString(enum MqTransTypeE value)
return the MqTransTypeE as string …
@ MQ_FACTORY_NEW_FILTER
create object as a filter
@ MQ_FACTORY_NEW_FORK
create object as a fork process
@ MQ_FACTORY_NEW_THREAD
create object as a thread
@ MQ_FACTORY_NEW_INIT
initial object, nothing else is known
@ MQ_FACTORY_NEW_SLAVE
create object as a slave of an other object
@ MQ_FACTORY_NEW_CHILD
create object as a child of an other object
@ MQ_WAIT_ONCE
Wait maximum timeout seconds for one new event, doesn't matter which context the event belongs to or ...
@ MQ_WAIT_OWN
Wait maximum timeout seconds for one new event that belongs to the current context or raise an timeou...
@ MQ_WAIT_NO
Check for one event but do not wait …
@ MQ_WAIT_FOREVER
Wait maximum timeout seconds for an event or raise an timeout-error …
@ MQ_SLAVE_OTHER
internal: on the master-ctx get the slave-ctx and on the slave-ctx get the master-ctx
@ MQ_SLAVE_FILTER
internal: the filter-slave-id, (on a master get the filter-slave)
@ MQ_SLAVE_USER
internal: start of user-defined-slave-id
@ MQ_SLAVE_MASTER
internal: the master-slave-id, (on a slave get the master)
@ MQ_SLAVE_LOOPBACK
internal: the loopback-slave-id, (call my own services)
@ MQ_SLAVE_MAX
internal: the maximum slave-id …
@ MQ_IDENT_FACTORY
value from MqFactoryS::originalIdent
@ MQ_IDENT_PREFIX
value from MqConfigS::dispPrefix
@ MQ_START_SPAWN
create entity as spawn process
@ MQ_START_DEFAULT
use application-context default entity creation
@ MQ_START_THREAD
create entity as thread
@ MQ_START_FORK
create entity as fork
@ MQ_STATUS_IS_FORK
context is created as a fork
@ MQ_STATUS_IS_DUP
context is created as a duplicate of an other context
@ MQ_STATUS_IS_THREAD
context is created as a thread
@ MQ_STATUS_IS_INITIAL
context is the first context
@ MQ_STATUS_IS_SPAWN
context is created as a spawn
@ MQ_HANDSHAKE_OK
direction: server -> client
@ MQ_HANDSHAKE_START
direction: client -> server
@ MQ_HANDSHAKE_ERROR
direction: server -> client
@ MQ_IO_UDS
using a uds socket
@ MQ_IO_LOOP
using pipe socket as stdin and stdout
@ MQ_IO_PIPE
using a pipe socket (most internal usage)
@ MQ_IO_INIT
using stdin and stdout
@ MQ_IO_TCP
using a tcp socket
@ MQ_TRANS_TYPE_WAIT
'W' = MqSendEND_AND_WAIT
@ MQ_TRANS_TYPE_SUB
'S' = MqSendEND_AND_SUB
@ MQ_TRANS_TYPE_CB
'C' = MqSendEND_AND_CALLBACK
@ MQ_TRANS_TYPE_NO
'N' = MqSendEND
@ MQ_TRANS_TYPE_TRANS
'T' = MqSendEND_AND_TRANSACTION
MK_STR MqHelp(MK_STRN tool)
write libmqmsgque specific user-help to stderr
MK_STR MqHelpMsgque(void)
return a page with the usage of all libmqmsgque specific options
MK_BFL MqInitGetArg0(void)
get the process startup-prefix argument
MK_BFL MqInitResetArg0(void)
Reset the process-startup-prefix argument to an empty list …
struct MkBufferListS * MqInitArg0
the process-startup-prefix argument …
void MqInitSetArg0VA(MK_STRN arg0,...)
set the process startup-prefix to a args
void MqInitSetArg0VAL(MK_STRN arg0, va_list var_list)
set the process startup-prefix to var_list
void MqInitSetArg0(MK_BAC bfl)
set the process startup-prefix argument to bfl
void MqMain(void *code)
Main entrypoint - start the application
void MqCleanup(void)
cleanup libmqmsgque internal memory …
bool MqCleanupActive
signal that code was triggert by MqCleanup
void MqSetup(void)
setup libmqmsgque internal memory …
void MqSysServerThreadMain(struct MqSysServerThreadMainS *data)
initialize a new thread …
struct MqLalS MqLal
Language Abstraction Layer in duty.
enum MkErrorE(* MqSysServerSpawnF)(MK_RT mkrt, MQ_RT mqrt, MQ_CTX const ctx, char *const *argv, MK_STRN name, struct MkIdS *idPtrOut)
spawn server create syscall with libmqmsgque error plugin
enum MkErrorE(* MqSysServerThreadF)(MK_RT mkrt, MQ_CTX const ctx, struct MqSysServerThreadMainS *const argP, MK_STRN name, int state, struct MkIdS *idPtrOut)
thread server create syscall with libmqmsgque error plugin
enum MkErrorE(* MqSysServerForkF)(MK_RT mkrt, MQ_RT mqrt, MQ_CTX const ctx, MQ_FCT factory, MK_BFL *argsP, MK_STRN name, MQ_SOCK_HDL socket, struct MkIdS *idPtrOut)
fork server create syscall with libmqmsgque error plugin
int(* MqSysSelectF)(int max, void *read, void *write, void *except, struct timeval *timeout)
select syscall …
struct config_t config_t
libconfig struct
MK_NUM MQ_SLAVE_ID
a slave identiver
struct config_setting_t config_setting_t
libconfig struct
int MQ_LTR
32bit longterm transaction token because PHP-32 does NOT support long long
int MQ_ROU
32bit routing token because PHP-32 does NOT support long long
int MQ_HDL
handle data-type
int MQ_SOCK_HDL
#define MQ_RT_ARGS
#define MQ_RT_ARGS_ONLY
bool MqRuntimeThreadPoolUse
#define MQ_STATIC_RT
struct MqRuntimeS * MQ_RT
class-shortcut for struct MqRuntimeS *, all shortcut using the XX_YYY syntax (only for public API) …
static bool MqRtCheckO(MK_OBJN obj)
check MqRuntimeS -> MkObjectS::signature …
static MQ_RTN MqRtN(MK_MNGN mng)
(const) cast a unknown-object into an MqRuntimeS pointer or NULL if not possible
static MQ_RT MqRt(MK_MNG mng)
cast a unknown-object into an MqRuntimeS pointer or NULL if not possible
static bool MqRtCheck(MK_MNGN mng)
check MqRuntimeS -> MkObjectS::signature …
struct MqTypeCtxS * MQ_CTXT
object context type datatype, use &XX->type to cast to MK_TYP
void MqTypeCtxLog_RT(MK_RT mkrt, MQ_CTXT const ctxtype, MK_OBJN fmtobj, MK_DBG const debug, MK_STRN const callfunc, MK_I32 const lvl)
log the MqTypeCtxS …
static MQ_CTXT MqCtxTyp(MK_MNG mng)
type-check and cast a managed-pointer into an MqTypeCtxS pointer or MK_NULL if not possible
static bool MqCtxTypCheckO(MK_OBJN obj)
check MqTypeCtxS -> MkObjectS::signature …
static bool MqCtxTypCheck(MK_MNGN mng)
check MqTypeCtxS -> MkObjectS::signature …
msgque_overload_mq.h - 17 Apr 2025 - aotto1968
array of MqContextC instances
MQ_CTX * data
union MkErrExtS::@19 super
enum MkIdSE type
MK_TYP type
union MkRtExtS::@25 super
union MkTypeS::@1 super
used for callback function pointer management
MK_PTR data
additional data for the callback function
MqTokenF fCall
callback method
MkMarkF fMark
garbage-collector marker for data
MqDataFreeF fFree
free additional data pointer
MqDataCopyF fCopy
copy additional data pointer, used in a MqSetupDup
end-user configuration data, also available as command-line options
bool dispPrefixLOCK
protect prefix
bool storageFileLOCK
protect storage
enum MqStartE startAs
create a new application-context as thread, spawn or fork … A new application-context is created if:
config_setting_t * filterH
libconfig data root
MK_STRB dispPostfix[MqConfigS_dispPostfix_size]
set the client-part (2) of the application-identifer MqConfigS::dispName …
bool dispNameLOCK
protect name
MQ_CTX parent
CHILD: a pointer to the parent object or MK_NULL.
MK_STRB dispName[MqConfigS_dispName_size]
set the display-name of the context … The display-name is used as:
MK_STRB dispPrefix[MqConfigS_dispPrefix_size]
set the server-part (1) of the application-identifer MqConfigS::dispName …
MQ_CTX master
SLAVE: a pointer to the master object or MK_NULL.
MK_NUM master_id
SLAVE: the ID in the master SLAVES array or O.
MK_STRB storageFile[MqConfigS_storageFile_size]
config_t * cfg
add libconfig configuration file …
enum MkNativeIsE native
define if data is string or little or big endian …
enum MqIdentE identFrom
select how to identify the application from remote …
config_setting_t * rootH
libconfig data root
struct MqIoConfigS io
Global configuration data belonging to "io".
bool dispPostfixLOCK
protect postfix
PUBLIC data structure for the libmqmsgque-specific-data
struct MqSetupS setup
the setup data is used to link the object with the user application
union MqContextS::@6 super
enum MqStatusIsEF statusIs
how the context was created?
struct MkBuffer64S ctxbuf
misc temporary MkBufferC object
const struct MqConfigS config
the configuration data is used for "end-user" configuration
struct MqLinkS link
link object data
struct MkObjectS obj
MK_BINB private_variables[16]
MqDumpC - the class known as dmp or dump is used to export a libmqmsgque data package as binary …
struct MkObjectS obj
MK_BINN dummy[]
union MqDumpS::@7 super
MqEnvS - the class known as env or environment is used to store the protected environment in an servi...
struct MkObjectS obj
enum MqTransTypeE transType
what kind of transaction is it: W)ait, T)rans, S)ub, C)allback or N)o
MQ_HDL transSId
storage for the shortterm-transaction
bool LIdLck
Long-Term-Transaction-Lock -> the "transLId" was forwarded.
MQ_LTR transLId
longterm-transaction-id (rowid from readTrans table) used for persistent-transaction
enum MqHandShakeE handShake
what kind of call is it: S)tart, O)k or E)rror
struct MqEnvS * link
work together with MqEnvProtect and MqEnvRestore
bool SIdLck
Short-Term-Transaction-Lock -> the "transSId" was already used.
MQ_LTR rmtTransLId
remote transaction-id (rowid from the remote readTrans table) if ">0LL" -> the value to use or "OLL"...
MQ_HDL routeId
TODO: route-id remote or local. (rowid from the Routing-Table) if "0" -> the default route is used)
Extend the MkErrorS with libmqmsgque specific features …
struct MkObjectS obj
MQ_CTXN server_ctx
MQ_CTXN client_ctx
interface for the constructor
MqFactoryCTorF fCall
create a new object
MqFactoryDataFreeF fFree
free additional data pointer
MqFactoryDataCopyF fCopy
copy additional data pointer
MK_PTR data
additional data pointer for the fCall
interface for the destructor
MqFactoryDataFreeF fFree
free additional data pointer
MK_PTR data
additional data pointer for the fCall
MqFactoryDataCopyF fCopy
copy additional data pointer
MqFactoryDTorF fCall
delete the object created with MqFactoryCTorS
data used to define a factory
union MqFactoryS::@4 super
struct MqFactoryDTorS fct_dtor
instance destructor interface
bool isDeleted
mark a factory as deleted -> MqFactoryGet will ignore this factory
struct MqFactoryCTorS fct_ctor
instance constructor interface
struct MkObjectS obj
MK_STRB originalIdent[MqFactoryS_originalIdent_size+1]
the original factory name used at MqFactoryAdd 2'n parameter
bool factoryCalled
was the factory called?
Basic configuration of a context …
struct MqIoPipeConfigS pipe
set pipe configuration-data
MK_I32 buffersize
set the OS specific value for the socket-operation-buffer (default: OS specific)
struct MqIoUdsConfigS uds
set uds configuration-data
MK_TIME_T timeout
user defined timeout to terminate a blocking function call (default: 90 sec)
enum MqIoComE com
what kind of socket interface to use?
MK_I32 pkgsize
set maximum package size (default: 10 KiB)
configure a context to use a init-client-server-link …
Configure a context to use a loop-client-server-link …
configure a context to use a pipe-client-server-link …
MQ_SOCK_HDL hdl
server-result from a socketpair function-call, [0] for the client-socket and [1] for the server-socke...
configure a context to use a tcp-client-server-link …
configure a context to use a uds-client-server-link …
Interface between MqContextS and the Operating-System …
MqSysServerThreadF MqSysServerThreadCB
thread server create syscall with libmqmsgque error plugin
MqSysServerSpawnF MqSysServerSpawnCB
spawn server create syscall with libmqmsgque error plugin
MqSysServerForkF MqSysServerForkCB
fork server create syscall with libmqmsgque error plugin
MqSysSelectF SysSelect
select syscall …
MqContextC - used to create or delete a instance to manage a link …
MqCreateF fCreate
create a new instance
MqDeleteF fDelete
delete a instance
needed to "run-over-all-slaves" → example: MqRouteGetTree
MQ_CTX * slaves
SLAVE: MK_NULL, MASTER a list of pointers of slave objects.
MK_NUM used
number of slave objects in slaves[]
MK_NUM size
size of slaves[]
MQ_CTX context
link to MQ and initialisation-flag
Extend the MkRuntimeS wie libmqmsgque specific features …
MkThreadDataS mqThreadData
data used to link EXTERNAL runtime to MQ_RT
struct MkObjectS obj
application-programmer configuration data
enum MqFactoryE factoryCall
an object is created by an factory but using a different call-style
MQ_FCT factory
set the application-identifier …
bool EventIsServer
if MqSetupS::Event is a server event
bool ignoreExit
do not delete the server-context on client-server-link shutdown … By default the server-context is de...
bool isServer
change the context to act as server-context (MK_YES) or not (MK_NO) …
data used to initialize a new created thread …
MK_TYP typ
all types from calling thread
MQ_RT mqrt
runtime used to intialize the new thread-runtime
MkBufferStream16384R argvR
command-line arguments, owned by SysServerThread
bool isUsed
is the object used and initialisation-flag
MkThreadDataS mkThreadData
thread-data to set after new runtime was initialized
MK_RT mkrt
runtime used to intialize the new thread-runtime
MQ_CTX tmpl
calling (parent) context
MQ_SOCK_HDL socket
"accept" socket for the new thread
MQ_FCT factory
server configuration (memory belongs to caller)
MQ_FCT fct
factory used for recreate
MqTypeCtxS - the instance-base for the MqContextC …
bool ignoreFork
do not allow the usage of fork
MqRefCountF fDecrSelf
decrement the MqContextS::obj->self reference counting
MqWaitForPipeF MqWaitForPipeCB
wait for pipe target to finish
MqExitF MqThreadExitCB
exit/cleanup a thread
MqSetupF fThreadInit
setup and initialize a thread before a new thread is created by libmqmsgque
struct MkObjectS obj
MqRefCountF fIncrSelf
increment the MqContextS::obj->self reference counting
bool argvFix
add first argument in MkBufferListC argument to MqLinkCreate and MqLinkCreateChild
struct MkTypeS typ
MkMarkF callbackMF
Mark the callback-data-pointer.
MqSetupF fParentAfterFork
cleanup a parent fork-process after a new fork-process is created by libmqmsgque
MqSetupF fParentBeforeFork
setup and initialize a fork-process before a new fork-process is created by libmqmsgque
MqSetupF fSpawnInit
setup and initialize a spawn-process before a new spawn-process is created by libmqmsgque
bool ignoreThread
do not allow the usage of threads
bool ignoreSpawn
do not allow the usage of spawn
MqHelpF fHelp
Create a link to the calling tool help function.
MqExitF MqProcessExitCB
exit/cleanup a process
MqSetupF fChildAfterFork
cleanup a child fork-process after a new fork-process is created by libmqmsgque
MkMarkF dataMF
Mark the data-pointer.
bool ignoreDisasterSetup
do not setup the disaster-handler at startup.