libmqmsgque 9.0
Loading...
Searching...
No Matches
msgque_mq.h
Go to the documentation of this file.
1
12#ifndef PARSE_C_HEADER_TO_META
13 #pragma once
14#endif
15
16#include "kernel_mk.h"
17
18// =========================================================================
19// global __parser__ definition :
20
21__parser__(library=MqMsgque@internal@Mq);
22
23// MARK_D ################################################################
24// -----------------------------------------------------------------------
25// documentation order
40
54
77
85
93
100
108
115
116// =========================================================================================
117// Makefile: CPPFLAGS definitions
118// Config: configure definitions
119
120// define: META_TCP_ONLY_IPV4
121// source: msgque_mq.h
122// default: not set, use IPV8
123// definition: Force the IPV4 support and disable IPV8
124
125// define: META_COMPILE_AS_CC
126// source: Makefile
127// target: kernel_mk.h
128// default: only set by "ccmqmsgque" to compile "C" code as "C++" code
129// definition: By default, the "C" code is compiled as "C" code into a "C" library and eventually linked
130// to the library of the target programming language. With the "META_COMPILE_AS_CC" preprocessor
131// flag, the "C" code is not compiled into an independent library but is translated directly
132// into the target programming language (C++) library along with the additional C++ code as C++
133// code in the "ccmqmsgque::libmkkernel" namespace.
134// The following changes are done:
135// 1. "BEGIN_MK_C_DECLS" is set to "namespace libmsgque {"
136
137// define: META_HAVE_LIBCONFIG
138// source: user defind at build using '-DMETA_HAVE_LIBCONFIG=1/0' or set with the "configure" script
139// default: the default is "1 = set" - other value is "0 = not set"
140// definition: 1. Add the 'libconfig' library to the build to support config-files
141// 2. If the extension is build ontop of libmqmsgque the extension have to set META_HAVE_LIBCONFIG
142// according to libmqmsgque. If META_HAVE_LIBCONFIG differs from libmqmsgque than compile-error occure.
143// 3. autoconf example is at: NHI1/theLink/phpmsgque/MqMsgque/config.m4
144
145#ifndef META_HAVE_LIBCONFIG
146 #error "META_HAVE_LIBCONFIG was NOT defined, require 1 or 0"
147#endif
148
149// define: META_STATIC
150// reference: META_STATIC from kernel_mk.h
151
152#ifdef META_STATIC
153# undef MQ_LIB_BUILD_DLL
154# define MQ_LIB_BUILD_DLL
155#endif
156
157// =========================================================================
187#if META_HAS_THREAD
188# define MQ_RT_IS_ARG
189# define MQ_RT_ARGS_ONLY MK_RT const mkrt, MQ_RT const mqrt
190# define MQ_RT_ARGS MQ_RT_ARGS_ONLY,
191# define MQ_RT_CALL_ONLY mkrt, mqrt
192# define MQ_RT_CALL MQ_RT_CALL_ONLY,
193# define MQ_RT_CALL_NULL_ONLY MkRT, MqRT
194# define MQ_RT_CALL_NULL MQ_RT_CALL_NULL_ONLY,
195# define MQ_RT_PTR mqrt
196# define MQ_RT_REF (*mqrt)
197# define MQ_RT_PARSER_ONLY MQ_RT_ARGS_ONLY __parser__(internal,default=N#RUNTIME)
198# define MQ_RT_PARSER MQ_RT_PARSER_ONLY,
199# if defined(META_HDL_USE_NULL_GCC_ATTRIBUTE)
200 // 1=mkrt, 2=mqrt, 3=hdl, 4=arg → hdl+arg get nonnull
201# define MQ_RT_NONNULL_ATTRIBUTE_2 __attribute__((nonnull(3,4)))
202# define MQ_RT_NONNULL_ATTRIBUTE_1 __attribute__((nonnull(3)))
203# else
204 // 1=mkrt, 2=mqrt, 3=hdl, 4=arg → only arg get nonnull
205# define MQ_RT_NONNULL_ATTRIBUTE_2 __attribute__((nonnull(4)))
206# define MQ_RT_NONNULL_ATTRIBUTE_1
207# endif
208#else
209# define MQ_RT_ARGS_ONLY void
210# define MQ_RT_ARGS
211# define MQ_RT_CALL_ONLY
212# define MQ_RT_CALL
213# define MQ_RT_CALL_NULL_ONLY
214# define MQ_RT_CALL_NULL
215# define MQ_RT_PTR &MqRuntimeRLS
216# define MQ_RT_REF MqRuntimeRLS
217# define MQ_RT_PARSER_ONLY void
218# define MQ_RT_PARSER
219# if defined(META_HDL_USE_NULL_GCC_ATTRIBUTE)
220 // 1=hdl, 2=arg → all get nonnull
221# define MQ_RT_NONNULL_ATTRIBUTE_2 __attribute__((nonnull(1,2)))
222# define MQ_RT_NONNULL_ATTRIBUTE_1 __attribute__((nonnull(1)))
223# else
224 // 1=hdl, 2=arg → only arg get nonnull
225# define MQ_RT_NONNULL_ATTRIBUTE_2 __attribute__((nonnull(2)))
226# define MQ_RT_NONNULL_ATTRIBUTE_1
227# endif
228#endif
231
232/* BEGIN_MQ_C_DECLS should be used at the beginning of your declarations,
233 so that C++ compilers don't mangle their names. Use END_MQ_C_DECLS at
234 the end of C declarations. */
235
236#undef BEGIN_MQ_C_DECLS
237#undef END_MQ_C_DECLS
238#if defined(META_COMPILE_AS_CC)
239# define BEGIN_MQ_C_DECLS namespace libmqmsgque { using namespace libmkkernel;
240# define END_MQ_C_DECLS }
241#elif defined(__cplusplus)
242# define BEGIN_MQ_C_DECLS extern "C" {
243# define END_MQ_C_DECLS }
244#else
245# define BEGIN_MQ_C_DECLS /* empty */
246# define END_MQ_C_DECLS /* empty */
247#endif
248
249// MARK_O
250#include "msgque_overload_mq.h"
251
254
255// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
256
327
328/* ####################################################################### */
329/* ### ### */
330/* ### K E R N A L - A P I ### */
331/* ### ### */
332/* ####################################################################### */
333
336
337/*****************************************************************************/
338/* */
339/* windows conform extern */
340/* */
341/*****************************************************************************/
342
367
368// BEGIN-HEADER - created by 'c_MqS.tcl -i NHI1_HOME/theLink/libmqmsgque/.libmqmsgque.meta' - DO NOT change
369
370// If the source of libmqmsgque is direct used in an external library
371// (without dynamic linking) and this library should *not* export
372// the symbol's of libmqmsgque then the flag META_IGNORE_EXTERN have
373// to be set
374#undef MQ_EXTERN
375#if defined(META_IGNORE_EXTERN)
376# define MQ_EXTERN
377#elif defined(PIC)
378 // does we build a DLL ?
379# if defined(DLL_EXPORT)
380 // does we build the libmqmsgque library ?
381# if defined(MQ_LIB_BUILD_DLL)
382# define MQ_EXTERN __declspec(dllexport)
383# else
384# define MQ_EXTERN __declspec(dllimport)
385# endif
386# else
387 // no DLL - architecture specific extern specifier
388# define MQ_EXTERN __attribute__ ((visibility("default")))
389# endif
390#else
392# define MQ_EXTERN
393#endif
394
395// external data lookup
396#undef MQ_EXTERN_DATA
397#if defined(META_PRIVATE)
398# define MQ_EXTERN_DATA extern
399#elif defined(META_IGNORE_EXTERN)
400# define MQ_EXTERN_DATA extern
401#elif defined(PIC)
402 // does we build a DLL ?
403# if defined(DLL_EXPORT)
404 // does we build the libmqmsgque library ?
405# if defined(MQ_LIB_BUILD_DLL)
406# define MQ_EXTERN_DATA __declspec(dllexport)
407# else
408# define MQ_EXTERN_DATA __declspec(dllimport)
409# endif
410# else
411 // no DLL - architecture specific extern specifier
412# define MQ_EXTERN_DATA __attribute__ ((visibility("default"))) extern
413# endif
414#else
415# define MQ_EXTERN_DATA extern
416#endif
417
418// END-HEADER - created by 'c_MqS.tcl -i NHI1_HOME/theLink/libmqmsgque/.libmqmsgque.meta' - DO NOT change
419
421
422/*****************************************************************************/
423/* */
424/* types/generic */
425/* */
426/*****************************************************************************/
427
430
432typedef struct config_t config_t;
435
436struct MqContextS;
437struct MqTransS;
438struct MqConfigS;
439struct MqEventS;
440struct MqFactoryS;
441struct MqDumpS;
442
444__parser__(type=ME_NI4_MQ_LTR)
445typedef int MQ_LTR;
447__parser__(type=ME_NI4_MQ_ROU)
448typedef int MQ_ROU;
450__parser__(type=ME_NI4_MQ_SLAVE_ID)
452
454__parser__(type=ME_NI4_MQ_HDL:"handle data-type")
455typedef int MQ_HDL;
456
458
459/* MARK_C ********************************************************************/
460/* */
461/* class types */
462/* */
463/*****************************************************************************/
464
468
469// BEGIN-ShortDef - created by 'cls_MqS.tcl -i NHI1_HOME/theLink/libmqmsgque/.libmqmsgque.meta' - DO NOT change
470
476 __parser__(internal,type=ME_CCC_MqErrorC:"extension management class for MqErrorS":internal)
477 typedef struct MqErrorS * MQ_ERR;
479 __parser__(internal,type=ME_CCN_MqErrorC:"const - extension management class for MqErrorS":internal)
480 typedef const struct MqErrorS * MQ_ERRN;
482 __parser__(ignore)
483 typedef struct MqErrorS MQ_ERRR;
486
492 __parser__(internal,type=ME_CCC_MqRuntimeC:"MqRuntimeC class handle":internal)
493 typedef struct MqRuntimeS * MQ_RT;
495 __parser__(internal,type=ME_CCN_MqRuntimeC:"const - MqRuntimeC class handle":internal)
496 typedef const struct MqRuntimeS * MQ_RTN;
498 __parser__(ignore)
499 typedef struct MqRuntimeS MQ_RTR;
502
508 __parser__(internal,type=ME_CCC_MqCtxTypeC:"MqContextS type":internal)
509 typedef struct MqCtxTypeS * MQ_CTXTYP;
511 __parser__(internal,type=ME_CCN_MqCtxTypeC:"const - MqContextS type":internal)
512 typedef const struct MqCtxTypeS * MQ_CTXTYPN;
514 __parser__(ignore)
515 typedef struct MqCtxTypeS MQ_CTXTYPR;
518
524 __parser__(type=ME_CCC_MqContextC:"MqContextC class handle":primary)
525 typedef struct MqContextS * MQ_CTX;
527 __parser__(type=ME_CCN_MqContextC:"const - MqContextC class handle":primary)
528 typedef const struct MqContextS * MQ_CTXN;
530 __parser__(ignore)
531 typedef struct MqContextS MQ_CTXR;
534
540 __parser__(type=ME_CCC_MqDumpC:"MqDumpC class handle":primary)
541 typedef struct MqDumpS * MQ_DMP;
543 __parser__(type=ME_CCN_MqDumpC:"const - MqDumpC class handle":primary)
544 typedef const struct MqDumpS * MQ_DMPN;
546 __parser__(ignore)
547 typedef struct MqDumpS MQ_DMPR;
550
556 __parser__(type=ME_CCC_MqFactoryC:"MqFactoryC class handle":primary)
557 typedef struct MqFactoryS * MQ_FCT;
559 __parser__(type=ME_CCN_MqFactoryC:"const - MqFactoryC class handle":primary)
560 typedef const struct MqFactoryS * MQ_FCTN;
562 __parser__(ignore)
563 typedef struct MqFactoryS MQ_FCTR;
566
572 __parser__(internal,type=ME_CCC_MqEnvC:"MqEnvC class handle":internal)
573 typedef struct MqEnvS * MQ_ENV;
575 __parser__(internal,type=ME_CCN_MqEnvC:"const - MqEnvC class handle":internal)
576 typedef const struct MqEnvS * MQ_ENVN;
578 __parser__(ignore)
579 typedef struct MqEnvS MQ_ENVR;
582// END-ShortDef - created by 'cls_MqS.tcl -i NHI1_HOME/theLink/libmqmsgque/.libmqmsgque.meta' - DO NOT change
583
585
588__parser__(type=ME_ACX_MqContextC:"ARRAY of MQ_CTX")
589typedef struct {
592} MQ_CTX_A;
593
594/*****************************************************************************/
595/* */
596/* sockets */
597/* */
598/*****************************************************************************/
599
602
603#if defined(__MINGW32__) || defined(_MSC_VER)
604typedef SOCKET MQ_SOCK_HDL;
605# define MK_FORMAT_SOCK "%I64u"
606#else
607__parser__(type=ME_NI4_MQ_SOCK_HDL)
608typedef int MQ_SOCK_HDL;
609# define MK_FORMAT_SOCK "%i"
610#endif
611
613
614/*****************************************************************************/
615/* */
616/* type definitions */
617/* */
618/*****************************************************************************/
619
622
623__parser__push__(doc=Enum);
624
627
629__parser__(internal)
638
639// BEGIN-MqHandShakeE - created by 'c_MqS.tcl -i NHI1_HOME/theLink/libmqmsgque/.libmqmsgque.meta' - DO NOT change
640
643__parser__(internal,no-rpc)
645
648__parser__(internal,no-rpc)
649mk_inline MK_INT MqHandShakeE_ToInt ( enum MqHandShakeE value ) {
650 return (MK_INT) value;
651}
652
655__parser__(internal,no-rpc)
656MQ_EXTERN enum MkErrorE MqHandShakeE_FromInt ( MK_INT const value, enum MqHandShakeE * value_out );
657
658// END-MqHandShakeE - created by 'c_MqS.tcl -i NHI1_HOME/theLink/libmqmsgque/.libmqmsgque.meta' - DO NOT change
659
661
664
666__parser__(internal)
674
675// BEGIN-MqTransTypeE - created by 'c_MqS.tcl -i NHI1_HOME/theLink/libmqmsgque/.libmqmsgque.meta' - DO NOT change
676
679__parser__(internal,no-rpc)
681
684__parser__(internal,no-rpc)
685mk_inline MK_INT MqTransTypeE_ToInt ( enum MqTransTypeE value ) {
686 return (MK_INT) value;
687}
688
691__parser__(internal,no-rpc)
692MQ_EXTERN enum MkErrorE MqTransTypeE_FromInt ( MK_INT const value, enum MqTransTypeE * value_out );
693
694// END-MqTransTypeE - created by 'c_MqS.tcl -i NHI1_HOME/theLink/libmqmsgque/.libmqmsgque.meta' - DO NOT change
695
697
700
706// [MqIdentE]
711// [MqIdentE]
712
713// BEGIN-MqIdentE - created by 'c_MqS.tcl -i NHI1_HOME/theLink/libmqmsgque/.libmqmsgque.meta' - DO NOT change
714
717__parser__(doc=Enum,doc-index=_ignore_,class=MqMsgque,no-rpc,prefix=EnumFunc)
719
722__parser__(doc=Enum,doc-index=_ignore_,class=MqMsgque,no-rpc,prefix=EnumFunc)
723mk_inline MK_INT MqIdentE_ToInt ( enum MqIdentE value ) {
724 return (MK_INT) value;
725}
726
729__parser__(doc=Enum,doc-index=_ignore_,class=MqMsgque,no-rpc,prefix=EnumFunc)
730MQ_EXTERN enum MkErrorE MqIdentE_FromInt ( MK_INT const value, enum MqIdentE * value_out );
731
732// END-MqIdentE - created by 'c_MqS.tcl -i NHI1_HOME/theLink/libmqmsgque/.libmqmsgque.meta' - DO NOT change
733
735
736__parser__pop__;
737
739
742
743struct MqCtxTypeS;
744
745//__parser__(type=ME_TYC:"a managed object class type pointer")
746__parser__(internal)
749typedef struct MqCtxTypeS * MQ_CTXT;
750
752
753// #######################################################################
754// -----------------------------------------------------------------------
759
771__parser__(ignore)
772struct MqEnvS {
773 // BEGIN-MqEnvS-super - created by 'cls_MqS.tcl -i NHI1_HOME/theLink/libmqmsgque/.libmqmsgque.meta' - DO NOT change
774 union {
775 struct MkObjectS obj; // base CLASS \MkObjectS
776 } super;
777 // END-MqEnvS-super - created by 'cls_MqS.tcl -i NHI1_HOME/theLink/libmqmsgque/.libmqmsgque.meta' - DO NOT change
778
785 struct MqEnvS *link;
786 struct {
787 bool SIdLck : 1;
788 bool LIdLck : 1;
789 } bits;
790};
791
792// BEGIN-MqEnvS-ClassDef - created by 'cls_MqS.tcl -i NHI1_HOME/theLink/libmqmsgque/.libmqmsgque.meta' - DO NOT change
793
794// Signature --------------------------------------------------------------
797
798 #define MqEnvC_SIGNATURE (MkObjectC_SIGNATURE ^ (16u<<10))
799 #define MqEnvC_MASK (((1u<<22)-1)<<10)
800
802
803// Signature --------------------------------------------------------------
806
807 #define MqEnvC_X2env(x) (x)
808 #define MqEnvC_X2obj(x) MkOBJ(x)
809
811
812
813// TypeDef --------------------------------------------------------------
816
818 __parser__(ignore) typedef struct MqEnvS MqEnvCR;
820 __parser__(ignore) typedef const struct MqEnvS MqEnvCNR;
822 #define MqEnvC_T (&MQ_RT_REF._MqEnvC_T)
824 #define MqEnvC_TT (MkTYP(MqEnvC_T))
826 #define MqEnvST MqEnvC_T
828 #define MqEnvSTT (MkTYP(MqEnvST))
830 #define MqEnvC_type MQ_ENV
832 #define MqEnvCT_X(instance) ( (struct MkDefTypeS *) (MkOBJ_R(instance).type) )
834 #define MqEnvCTT_X(instance) (MkOBJ_R(instance).type)
836 #define MqEnvCT_TT(typ) ( (struct MkDefTypeS *) (typ) )
838 #define MqEnvC_NS MQ
840 #define MqEnvCTT MqEnvCTT
842 #define MqEnvCT ( (struct MkDefTypeS *) MqEnvCTT )
843
845
846
847// TypeCheck --------------------------------------------------------------
850
851 #pragma GCC diagnostic push
852 #pragma GCC diagnostic ignored "-Wattributes"
853
856 __parser__(class=MqEnvC,static,ignore)
857 mk_inline bool MqEnvCheck (MK_MNGN mng) {
858 return MkSanitizeCheck(MqEnvC,mng);
859 }
860
861 #pragma GCC diagnostic pop
862 #define MqEnvC_Check(mng) MqEnvCheck(mng)
863
865
866
867// ObjectCast --------------------------------------------------------------
871 __parser__push__(prefix=Cast);
872
874 __parser__(class=MqEnvC,ignore,static)
875 META_ATTRIBUTE_SANITIZE
876 mk_inline MQ_ENV MqEnv(MK_MNG mng) {
877 return (MqEnvCheck(mng) ? (MQ_ENV)mng : NULL);
878 }
879
881 __parser__(ignore)
882 META_ATTRIBUTE_SANITIZE
884 return (MqEnvCheck(mng) ? (MQ_ENVN)mng : NULL);
885 }
886
888 #define MqEnvRaise(_env) if (!_MkCheckX(MqEnvC,_env)) { \
889 MkErrorSetC_1E("'MqEnvC' hdl is NULL"); \
890 goto error ; \
891 }
892
894 #define MqENV_R(x) (*(x)).super.env
896 #define MqENV(x) (&MqENV_R(x))
897
900
901// END-MqEnvS-ClassDef - created by 'cls_MqS.tcl -i NHI1_HOME/theLink/libmqmsgque/.libmqmsgque.meta' - DO NOT change
902
904
907
909typedef enum MkErrorE ( MK_DECL
910 *MqTokenF
911) (
913 MQ_CTX const ctx,
914 MK_PTR const data
915) MK_RT_ATTR_HDL;
916
918#define MQ_CALLBACK_SERVICE_CALL_ARGS MK_RT_ARGS MQ_CTX const mqctx, MK_PTR const __data__
920#define MQ_CALLBACK_SERVICE_CALL MK_RT_CALL mqctx, __data__
921
923typedef void ( MK_DECL
925) (
927 MQ_CTX const ctx,
928 MK_PTR *dataP
929) MK_RT_ATTR_HDL;
930
932#define MQ_CALLBACK_SERVICE_FREE_ARGS MK_RT_ARGS MQ_CTX const mqctx, MK_PTR *dataP
933
935typedef void ( MK_DECL
937) (
939 MQ_CTX const ctx,
940 MK_PTR *dataP
941) MK_RT_ATTR_HDL;
942
944#define MQ_CALLBACK_SERVICE_COPY_ARGS MK_RT_ARGS MQ_CTX const mqctx, MK_PTR *dataP
945
947
950__parser__(ignore)
958
963
964 // slaves link
968};
969
970#if defined(MQ_LIB_BUILD_DLL)
971
972 #define META_SECTION_DEFINE
973 #include "MqLinkS_mq.h"
974 #undef META_SECTION_DEFINE
975
976#else // MQ_LIB_BUILD_DLL
977
980__parser__(ignore)
981struct MqLinkS {
982
983 // PUBLIC variables
984
988 #define MqLinkS_targetIdent_size 64
990
991 // context-management variables
994
995 // protected environment
996 struct MqEnvS protect;
998
999 // master/slave relationship
1000 struct MqLinkSlaveS slave;
1001
1002 // offset calculated by "Nhi1InternalSize"
1003 MK_BINB private_variables[40568];
1004};
1005
1006#endif // MQ_LIB_BUILD_DLL
1007
1008/* MARK_F ################################################################ */
1009/* ### ### */
1010/* ### C T X - C O N F I G - A P I ### */
1011/* ### ### */
1012/* ####################################################################### */
1013
1133
1134// #######################################################################
1135// -----------------------------------------------------------------------
1140
1141__parser__push__(doc=Misc,doc-index=ConfigApi);
1142
1150typedef enum MkErrorE ( MK_DECL
1151 *MqCreateF
1152) (
1153 MK_RT_ARGS
1154 MQ_CTX const ctx,
1155 MK_BFL const args
1156) MK_RT_ATTR_HDL;
1157
1158#define MQ_CALLBACK_CREATE_ARGS MK_RT_ARGS MQ_CTX const mqctx, MK_BFL const argv
1159#define MQ_CALLBACK_CREATE_CALL MK_RT_CALL mqctx, argv
1160
1168typedef void ( MK_DECL
1169 *MqDeleteF
1170) (
1171 MQ_CTX const ctx
1172) MK_RT_ATTR_HDL;
1173
1176typedef void ( MK_DECL
1177 *MqHelpF
1178) (
1179 MK_STRN basename
1180) __attribute__ ((noreturn));
1181
1184typedef void ( MK_DECL
1185 *MqExitF
1186) (
1188 int num
1189);
1190
1194typedef void (MK_DECL *MqSetupF) ( MQ_CTX const ctx );
1195
1208typedef void (MK_DECL *MqRefCountF) ( MK_RT_ARGS MQ_CTX ctx , MK_PTR const env);
1209
1215__parser__(ignore)
1219
1230__parser__(ignore)
1237
1244__parser__(ignore)
1248
1250__parser__(ignore)
1252};
1253
1258__parser__(ignore)
1260};
1261
1262/*****************************************************************************/
1263/* */
1264/* create / delete */
1265/* */
1266/*****************************************************************************/
1267
1270 MK_RT_PARSER
1271 MQ_CTX const ctx
1273
1275__parser__(internal)
1277 MK_RT_PARSER
1278 MQ_CTX const to,
1279 MQ_CTX const from
1280) MK_RT_ATTR_RUNTIME MK_RT_ATTR_HDL;
1281
1290// from being overwritten.
1291__parser__(hide)
1293 MK_RT_PARSER
1294 MQ_CTX const to,
1295 MQ_CTXN const from
1296) MK_RT_ATTR_RUNTIME MK_RT_ATTR_HDL;
1297
1298__parser__pop__;
1299
1301
1302// #######################################################################
1303// -----------------------------------------------------------------------
1312__parser__push__(no-rpc,template-overload,doc=Setup,prefix=Setup);
1313
1318MQ_EXTERN void MK_DECL MqSetup (void) __attribute__ ((constructor(300)));
1319
1325MQ_EXTERN void MK_DECL MqCleanup (void) __attribute__ ((destructor(300)));
1326
1328__parser__(ignore)
1330
1331__parser__pop__;
1332
1334
1335
1336// #######################################################################
1337// -----------------------------------------------------------------------
1341
1342__parser__push__(doc=Enum,doc-index=_ignore_,class=MqMsgque);
1343
1346
1352// [MqStartE]
1359// [MqStartE]
1360
1361// BEGIN-MqStartE - created by 'c_MqS.tcl -i NHI1_HOME/theLink/libmqmsgque/.libmqmsgque.meta' - DO NOT change
1362
1365__parser__(doc=Enum,doc-index=_ignore_,class=MqMsgque,no-rpc,prefix=EnumFunc)
1367
1370__parser__(doc=Enum,doc-index=_ignore_,class=MqMsgque,no-rpc,prefix=EnumFunc)
1371mk_inline MK_INT MqStartE_ToInt ( enum MqStartE value ) {
1372 return (MK_INT) value;
1373}
1374
1377__parser__(doc=Enum,doc-index=_ignore_,class=MqMsgque,no-rpc,prefix=EnumFunc)
1378MQ_EXTERN enum MkErrorE MqStartE_FromInt ( MK_INT const value, enum MqStartE * value_out );
1379
1380// END-MqStartE - created by 'c_MqS.tcl -i NHI1_HOME/theLink/libmqmsgque/.libmqmsgque.meta' - DO NOT change
1381
1383
1386
1392// [MqStatusIsEF]
1393__parser__(enum-is-flag)
1401// [MqStatusIsEF]
1402
1403// BEGIN-MqStatusIsEF - created by 'c_MqS.tcl -i NHI1_HOME/theLink/libmqmsgque/.libmqmsgque.meta' - DO NOT change
1404
1407__parser__(doc=Enum,doc-index=_ignore_,class=MqMsgque,no-rpc,prefix=EnumFunc)
1409
1412__parser__(doc=Enum,doc-index=_ignore_,class=MqMsgque,no-rpc,prefix=EnumFunc)
1413mk_inline MK_INT MqStatusIsEF_ToInt ( enum MqStatusIsEF value ) {
1414 return (MK_INT) value;
1415}
1416
1419__parser__(doc=Enum,doc-index=_ignore_,class=MqMsgque,no-rpc,prefix=EnumFunc)
1420MQ_EXTERN enum MkErrorE MqStatusIsEF_FromInt ( MK_INT const value, enum MqStatusIsEF * value_out );
1421
1422// END-MqStatusIsEF - created by 'c_MqS.tcl -i NHI1_HOME/theLink/libmqmsgque/.libmqmsgque.meta' - DO NOT change
1423
1425
1428
1429// TODO : this is FLAG → MqFactoryEF !!
1431__parser__(internal,enum-is-flag)
1440
1441// BEGIN-MqFactoryE - created by 'c_MqS.tcl -i NHI1_HOME/theLink/libmqmsgque/.libmqmsgque.meta' - DO NOT change
1442
1445__parser__(internal,no-rpc)
1447
1450__parser__(internal,no-rpc)
1451mk_inline MK_INT MqFactoryE_ToInt ( enum MqFactoryE value ) {
1452 return (MK_INT) value;
1453}
1454
1457__parser__(internal,no-rpc)
1458MQ_EXTERN enum MkErrorE MqFactoryE_FromInt ( MK_INT const value, enum MqFactoryE * value_out );
1459
1460// END-MqFactoryE - created by 'c_MqS.tcl -i NHI1_HOME/theLink/libmqmsgque/.libmqmsgque.meta' - DO NOT change
1461
1463
1466
1468__parser__(internal)
1476
1477// BEGIN-MqIoComE - created by 'c_MqS.tcl -i NHI1_HOME/theLink/libmqmsgque/.libmqmsgque.meta' - DO NOT change
1478
1481__parser__(internal,no-rpc)
1483
1486__parser__(internal,no-rpc)
1487mk_inline MK_INT MqIoComE_ToInt ( enum MqIoComE value ) {
1488 return (MK_INT) value;
1489}
1490
1493__parser__(internal,no-rpc)
1494MQ_EXTERN enum MkErrorE MqIoComE_FromInt ( MK_INT const value, enum MqIoComE * value_out );
1495
1496// END-MqIoComE - created by 'c_MqS.tcl -i NHI1_HOME/theLink/libmqmsgque/.libmqmsgque.meta' - DO NOT change
1497
1499
1502
1508// [MqWaitOnEventE]
1541// [MqWaitOnEventE]
1542
1543// BEGIN-MqWaitOnEventE - created by 'c_MqS.tcl -i NHI1_HOME/theLink/libmqmsgque/.libmqmsgque.meta' - DO NOT change
1544
1547__parser__(doc=Enum,doc-index=_ignore_,class=MqMsgque,no-rpc,prefix=EnumFunc)
1549
1552__parser__(doc=Enum,doc-index=_ignore_,class=MqMsgque,no-rpc,prefix=EnumFunc)
1554 return (MK_INT) value;
1555}
1556
1559__parser__(doc=Enum,doc-index=_ignore_,class=MqMsgque,no-rpc,prefix=EnumFunc)
1560MQ_EXTERN enum MkErrorE MqWaitOnEventE_FromInt ( MK_INT const value, enum MqWaitOnEventE * value_out );
1561
1562// END-MqWaitOnEventE - created by 'c_MqS.tcl -i NHI1_HOME/theLink/libmqmsgque/.libmqmsgque.meta' - DO NOT change
1563
1565
1568
1575// [MqSlaveE]
1576__parser__(enum-accept-integer=int32)
1588// [MqSlaveE]
1589
1590// BEGIN-MqSlaveE - created by 'c_MqS.tcl -i NHI1_HOME/theLink/libmqmsgque/.libmqmsgque.meta' - DO NOT change
1591
1594__parser__(doc=Enum,doc-index=_ignore_,class=MqMsgque,no-rpc,prefix=EnumFunc)
1596
1599__parser__(doc=Enum,doc-index=_ignore_,class=MqMsgque,no-rpc,prefix=EnumFunc)
1600mk_inline MK_INT MqSlaveE_ToInt ( enum MqSlaveE value ) {
1601 return (MK_INT) value;
1602}
1603
1606__parser__(doc=Enum,doc-index=_ignore_,class=MqMsgque,no-rpc,prefix=EnumFunc)
1607MQ_EXTERN enum MkErrorE MqSlaveE_FromInt ( MK_INT const value, enum MqSlaveE * value_out );
1608
1609// END-MqSlaveE - created by 'c_MqS.tcl -i NHI1_HOME/theLink/libmqmsgque/.libmqmsgque.meta' - DO NOT change
1610
1612
1613__parser__pop__;
1614
1616
1619__parser__(ignore)
1624
1625// #######################################################################
1626// -----------------------------------------------------------------------
1630
1632__parser__(ignore)
1634
1640
1643
1646
1654
1656 struct MqIoUdsConfigS uds;
1657
1659 struct MqIoTcpConfigS tcp;
1660
1662 struct MqIoPipeConfigS pipe;
1663
1665 struct MqIoLoopConfigS loop;
1666
1668 struct MqIoInitConfigS init;
1669};
1670
1672__parser__(ignore)
1674
1677
1699
1700 #define MqConfigS_dispname_size 64
1729
1730 #define MqConfigS_prefix_size 64
1746
1747 #define MqConfigS_postfix_size 64
1761
1764
1767
1770
1772 struct MqIoConfigS io;
1773
1781 #define MqConfigS_storage_size 256
1783
1784 struct {
1785 bool dispnameLOCK :1 ;
1786 bool storageLOCK :1 ;
1787 bool prefixLOCK :1 ;
1788 bool postfixLOCK :1 ;
1789 } bits;
1790
1829
1830#if META_HAVE_LIBCONFIG
1881
1884
1887#else
1888 void * cfg_dummy;
1889 void * rootH_dummy;
1890 void * filterH_dummy;
1891#endif // META_HAVE_LIBCONFIG
1892
1893};
1894
1896__parser__(ignore)
1897struct MqSetupS {
1898
1919 //MK_STRN ident;
1921
1924
1935 struct MqCallbackS BgError;
1936
1946
1959 // PRIVATE: \attention the \RMKNS{BFL} commandline-arguments are available at \RCNs{LinkS::alfa} in \RCNs{ContextS::link}
1960 struct MqCallbackS ServerSetup;
1961
1971 struct MqCallbackS ServerCleanup;
1972
1973 // misc
1974
1994 struct MqCallbackS Event;
1995
1998
2011};
2012
2014
2015// #######################################################################
2016// -----------------------------------------------------------------------
2021
2022__parser__push__(doc=Set,doc-index=ConfigApi);
2023
2025MQ_EXTERN void
2027 MK_RT_PARSER
2028 MQ_CTX const ctx,
2031
2039__parser__(internal)
2040MQ_EXTERN void
2042 MK_RT_PARSER
2043 MQ_CTX const ctx,
2046
2048MQ_EXTERN void
2050 MK_RT_PARSER
2051 MQ_CTX const ctx,
2054
2056MQ_EXTERN void
2058 MK_RT_PARSER
2059 MQ_CTX const ctx,
2062
2064MQ_EXTERN void
2066 MK_RT_PARSER
2067 MQ_CTX const ctx,
2070
2071
2075__parser__(internal)
2076MQ_EXTERN void
2078 MQ_CTX const ctx,
2080) MK_ATTR_HDL;
2081
2087 MK_RT_PARSER
2088 MQ_CTX const ctx,
2089 MK_INT const data
2091
2095MQ_EXTERN void
2097 MQ_CTX const ctx,
2098 bool data
2099) MK_ATTR_HDL;
2100
2104 MQ_CTX const ctx,
2105 enum MqStartE data
2106) MK_ATTR_HDL;
2107
2111 MQ_CTX const ctx,
2113) MK_ATTR_HDL;
2114
2116MQ_EXTERN bool
2118 MQ_CTX const ctx,
2119 enum MqStartE data
2120) MK_ATTR_HDL;
2121
2130 MK_RT_PARSER
2131 MQ_CTX const ctx,
2132 MK_STRN file
2134
2143 MK_RT_PARSER
2144 MQ_CTX const ctx,
2145 MK_STRN host __parser__(default=F#STRING_NULL),
2146 MK_STRN port __parser__(default=F#STRING_NULL),
2147 MK_STRN myhost __parser__(default=F#STRING_NULL),
2148 MK_STRN myport __parser__(default=F#STRING_NULL)
2150
2152//
2157__parser__(no-type-extension,overload=MqConfigSetIoTcp)
2160 MK_RT_PARSER
2161 MQ_CTX const ctx,
2162 MK_BFL const vals
2164
2169//
2176 MK_RT_PARSER
2177 MQ_CTX const ctx,
2178 MQ_SOCK_HDL fh
2180
2197 MK_RT_PARSER
2198 MQ_CTX const ctx,
2199 MK_STRN pidfile
2201
2203MQ_EXTERN void
2205 MQ_CTX const ctx,
2206 MK_INT data
2207) MK_ATTR_HDL;
2208
2210MQ_EXTERN void
2212 MQ_CTX const ctx,
2213 MK_INT data
2214) MK_ATTR_HDL;
2215
2217MQ_EXTERN void
2219 MQ_CTX const ctx,
2221) MK_ATTR_HDL;
2222
2224MQ_EXTERN void
2226 MQ_CTX const ctx,
2227 bool data
2228) MK_ATTR_HDL;
2229
2231MQ_EXTERN void
2233 MQ_CTX const ctx,
2234 enum MqIdentE data
2235) MK_ATTR_HDL;
2236
2238MQ_EXTERN void
2240 MQ_CTX const ctx,
2241 bool data
2242) MK_ATTR_HDL;
2244
2246
2247
2248// #######################################################################
2249// -----------------------------------------------------------------------
2271
2272__parser__push__(doc=Interface,doc-index=ConfigApi);
2273
2275__parser__(no-rpc)
2276MQ_EXTERN void
2278 MK_RT_PARSER
2279 MQ_CTX const ctx,
2280 MqTokenF fCall __parser__(internal),
2281 MK_CBP callback __parser__(default=NULL,callback=ServerSetup),
2282 MqDataFreeF fFree __parser__(internal),
2283 MqDataCopyF fCopy __parser__(internal)
2285
2287__parser__(no-rpc)
2288MQ_EXTERN void
2290 MK_RT_PARSER
2291 MQ_CTX const ctx,
2292 MqTokenF fCall __parser__(internal),
2293 MK_CBP callback __parser__(default=NULL,callback=ServerCleanup),
2294 MqDataFreeF fFree __parser__(internal),
2295 MqDataCopyF fCopy __parser__(internal)
2297
2299__parser__(no-rpc)
2300MQ_EXTERN void
2302 MK_RT_PARSER
2303 MQ_CTX const ctx,
2304 MqTokenF fCall __parser__(internal),
2305 MK_CBP callback __parser__(default=NULL,callback=BgError),
2306 MqDataFreeF fFree __parser__(internal),
2307 MqDataCopyF fCopy __parser__(internal)
2309
2315__parser__(no-rpc)
2316MQ_EXTERN void
2318 MK_RT_PARSER
2319 MQ_CTX const ctx,
2320 MqTokenF fEvent __parser__(internal),
2321 MK_CBP data __parser__(default=NULL,callback=Event),
2322 MqDataFreeF fFree __parser__(internal),
2323 MqDataCopyF fCopy __parser__(internal)
2325
2327
2329
2330// #######################################################################
2331// -----------------------------------------------------------------------
2336
2339#define MQ_IS_SERVER(ctx) (ctx->setup.isServer == true)
2340#define MQ_IS_SERVER_PARENT(ctx) (MQ_IS_SERVER(ctx) && MQ_IS_PARENT(ctx))
2341#define MQ_IS_CLIENT(ctx) (ctx->setup.isServer == false)
2342#define MQ_IS_CLIENT_PARENT(ctx) (MQ_IS_CLIENT(ctx) && MQ_IS_PARENT(ctx))
2343#define MQ_IS_CHILD(ctx) ((ctx)->config.parent != NULL)
2344#define MQ_IS_PARENT(ctx) ((ctx)->config.parent == NULL)
2345#define MQ_IS_SLAVE(ctx) ((ctx)->config.master != NULL)
2346#define MQ_IS_MASTER(ctx) ((ctx)->config.master == NULL)
2347#define MQ_IS_LOOPBACK(ctx) ((ctx)->config.io.com == MQ_IO_LOOP)
2348
2349#define MQ_GET_PARENT(ctx) (MQ_IS_CHILD(ctx) ? ctx->link.ctxIdP : ctx)
2350#define MQ_GET_MASTER(ctx) (MQ_IS_SLAVE(ctx) ? ctx->config.master : ctx)
2352
2354
2355/* ####################################################################### */
2356/* ### ### */
2357/* ### C T X - L O G - A P I ### */
2358/* ### ### */
2359/* ####################################################################### */
2360
2375
2376__parser__push__(doc=Log,doc-index=LogApi);
2377
2388__parser__(const,flags=new,runtime=MqContextLog)
2390 MK_RT_PARSER
2391 MQ_CTXN const ctx ,
2392 MK_OBJN fmtobj __parser__(default=NULL),
2393 MK_DBG const debug __parser__(default=0),
2394 MK_STRN const callfunc __parser__(default=F#FUNC),
2395 MK_INT const lvl __parser__(default=0)
2396) MK_RT_ATTR_RUNTIME;
2397
2409__parser__(const,runtime=MqContextLogShort)
2411 MK_RT_PARSER
2412 MQ_CTXN const ctx ,
2413 MK_OBJN fmtobj __parser__(default=NULL),
2414 MK_DBG const debug __parser__(default=0),
2415 MK_STRN const callfunc __parser__(default=F#FUNC),
2416 MK_INT const lvl __parser__(default=0),
2417 MK_STRN const label __parser__(default=F#STRING_NULL)
2418) MK_RT_ATTR_RUNTIME;
2419
2428__parser__(const,runtime=MqContextLogConfig)
2430 MK_RT_PARSER
2431 MQ_CTXN const ctx,
2432 MK_OBJN fmtobj __parser__(default=NULL),
2433 MK_DBG const debug __parser__(default=0),
2434 MK_STRN const callfunc __parser__(default=F#FUNC),
2435 MK_INT const lvl __parser__(default=0)
2436) MK_RT_ATTR_RUNTIME;
2437
2446__parser__(const,runtime=MqContextLogSetup)
2448 MK_RT_PARSER
2449 MQ_CTXN const ctx,
2450 MK_OBJN fmtobj __parser__(default=NULL),
2451 MK_DBG const debug __parser__(default=0),
2452 MK_STRN const callfunc __parser__(default=F#FUNC),
2453 MK_INT const lvl __parser__(default=0)
2454) MK_RT_ATTR_RUNTIME;
2455
2464__parser__(const,runtime=MqContextLogLink)
2466 MK_RT_PARSER
2467 MQ_CTXN ctx ,
2468 MK_OBJN const fmtobj __parser__(default=NULL),
2469 MK_DBG const debug __parser__(default=0),
2470 MK_STRN const callfunc __parser__(default=F#FUNC),
2471 MK_INT const lvl __parser__(default=0)
2472) MK_RT_ATTR_RUNTIME;
2473
2484__parser__(const,runtime=MqContextLogEnv)
2486 MK_RT_PARSER
2487 MQ_CTX const ctx ,
2488 MK_OBJ const fmtobj __parser__(default=NULL),
2489 MK_DBG const debug __parser__(default=0),
2490 MK_STRN const callfunc __parser__(default=F#FUNC),
2491 MK_INT const lvl __parser__(default=0)
2492) MK_RT_ATTR_RUNTIME;
2493
2504__parser__(const)
2506 MK_RT_PARSER
2507 MQ_CTX const ctx ,
2508 MK_OBJ fmtobj __parser__(default=NULL),
2509 MK_DBG const debug __parser__(default=0),
2510 MK_STRN const callfunc __parser__(default=F#FUNC),
2511 MK_INT const lvl __parser__(default=0)
2512) MK_RT_ATTR_RUNTIME;
2513
2514__parser__(ignore)
2515MQ_EXTERN void MK_DECL MqContextLogDebug (MQ_CTX const ctx);
2516
2517// end of class=MqContextC,doc=Log
2518__parser__pop__;
2519
2521
2522// #######################################################################
2523// -----------------------------------------------------------------------
2536
2545typedef int (*MqSysSelectF) (int max, void* read, void* write, void* except, struct timeval* timeout);
2546
2560
2585__parser__(ignore)
2588);
2589
2591__parser__(ignore)
2592struct MqLalS {
2595
2609 enum MkErrorE (*SysServerSpawn) (
2611 MQ_CTX const ctx,
2612 char *const * argv,
2613 MK_STRN name,
2614 struct MkIdS * val_out
2615 );
2616
2633 enum MkErrorE (*SysServerThread) (
2635 MQ_CTX const ctx,
2636 struct MqSysServerThreadMainS * const argP,
2637 MK_STRN name,
2638 int state,
2639 struct MkIdS * val_out
2640 );
2641
2658 enum MkErrorE (*SysServerFork) (
2660 MQ_CTX const ctx,
2661 MQ_FCT factory,
2662 MK_BFL* argsP,
2663 MK_STRN name,
2664 MQ_SOCK_HDL socket,
2665 struct MkIdS * val_out
2666 );
2667};
2668
2670__parser__(ignore)
2672
2674
2675/* MARK_E ################################################################ */
2676/* ### ### */
2677/* ### E R R O R - A P I ### */
2678/* ### ### */
2679/* ####################################################################### */
2680
2691
2693__parser__(internal)
2694struct MqErrorS {
2695 // BEGIN-MqErrorS-super - created by 'cls_MqS.tcl -i NHI1_HOME/theLink/libmqmsgque/.libmqmsgque.meta' - DO NOT change
2696 union {
2697 struct MkObjectS obj; // base CLASS \MkObjectS
2698 struct MkExtensionS ext; // base CLASS \MkExtensionS
2699 struct MkErrExtS errext; // base CLASS \MkErrExtS
2701 // END-MqErrorS-super - created by 'cls_MqS.tcl -i NHI1_HOME/theLink/libmqmsgque/.libmqmsgque.meta' - DO NOT change
2702
2703 // instance attributes
2704 char errhint; // the TYPE if the \e errobj U=undefined, C=client, S=server
2705
2706 MQ_CTXN client_ctx; // context source of the error, NULL = current context
2707
2708 // The \e error_protect is used in \RCNs{SendERROR} to restructure the environment at
2709 // the time of the error. The data is a copy of the \RCNs{LinkS::protect} data
2710 struct MqEnvS client_protect;
2711
2712 MQ_CTXN server_ctx; // context source of the error, NULL = current context
2713
2714 // The \e error_protect is used in \RCNs{SendERROR} to restructure the environment at
2715 // the time of the error. The data is a copy of the \RCNs{LinkS::protect} data
2716 struct MqEnvS server_protect;
2717};
2718
2719// BEGIN-MqErrorS-ClassDef - created by 'cls_MqS.tcl -i NHI1_HOME/theLink/libmqmsgque/.libmqmsgque.meta' - DO NOT change
2720
2721// Signature --------------------------------------------------------------
2724
2725 #define MqErrorC_SIGNATURE (MkErrExtC_SIGNATURE ^ (1u<<3))
2726 #define MqErrorC_MASK (((1u<<29)-1)<<3)
2727
2729
2730// Signature --------------------------------------------------------------
2733
2734 #define MqErrorC_X2err(x) (x)
2735 #define MqErrorC_X2errext(x) MkERREXT(x)
2736 #define MqErrorC_X2ext(x) MkEXT(x)
2737 #define MqErrorC_X2obj(x) MkOBJ(x)
2738
2740
2741
2742// TypeDef --------------------------------------------------------------
2745
2747 __parser__(ignore) typedef struct MqErrorS MqErrorCR;
2749 __parser__(ignore) typedef const struct MqErrorS MqErrorCNR;
2751 #define MqErrorC_T (&MQ_RT_REF._MqErrorC_T)
2753 #define MqErrorC_TT (MkTYP(MqErrorC_T))
2755 #define MqErrorST MqErrorC_T
2757 #define MqErrorSTT (MkTYP(MqErrorST))
2759 #define MqErrorC_type MQ_ERR
2761 #define MqErrorCT_X(instance) ( (struct MkDefTypeS *) (MkOBJ_R(instance).type) )
2763 #define MqErrorCTT_X(instance) (MkOBJ_R(instance).type)
2765 #define MqErrorCT_TT(typ) ( (struct MkDefTypeS *) (typ) )
2767 #define MqErrorC_NS MQ
2769 #define MqErrorCTT MqErrorCTT
2771 #define MqErrorCT ( (struct MkDefTypeS *) MqErrorCTT )
2772
2774
2775
2776// TypeCheck --------------------------------------------------------------
2779
2780 #pragma GCC diagnostic push
2781 #pragma GCC diagnostic ignored "-Wattributes"
2782
2785 __parser__(class=MqErrorC,static,ignore)
2786 mk_inline bool MqErrCheck (MK_MNGN mng) {
2787 return MkSanitizeCheck(MqErrorC,mng);
2788 }
2789
2790 #pragma GCC diagnostic pop
2791 #define MqErrorC_Check(mng) MqErrCheck(mng)
2792
2794
2795
2796// ObjectCast --------------------------------------------------------------
2800 __parser__push__(prefix=Cast);
2801
2803 __parser__(class=MqErrorC,ignore,static)
2804 META_ATTRIBUTE_SANITIZE
2805 mk_inline MQ_ERR MqErr(MK_MNG mng) {
2806 return (MqErrCheck(mng) ? (MQ_ERR)mng : NULL);
2807 }
2808
2810 __parser__(ignore)
2811 META_ATTRIBUTE_SANITIZE
2813 return (MqErrCheck(mng) ? (MQ_ERRN)mng : NULL);
2814 }
2815
2817 #define MqErrRaise(_err) if (!_MkCheckX(MqErrorC,_err)) { \
2818 MkErrorSetC_1E("'MqErrorC' hdl is NULL"); \
2819 goto error ; \
2820 }
2821
2823 #define MqERR_R(x) (*(x)).super.err
2825 #define MqERR(x) (&MqERR_R(x))
2826
2829
2830// END-MqErrorS-ClassDef - created by 'cls_MqS.tcl -i NHI1_HOME/theLink/libmqmsgque/.libmqmsgque.meta' - DO NOT change
2831
2834#define MqERROR_R(r) ((*r).error_mq)
2835#define MqERROR_RT MqERROR_R(&MQ_RT_REF)
2836#define MqERROR_O(o) MqERROR_R(MqRT_O(o))
2837#define MqERROR_X(x) MqERROR_R(MqRT_X(x))
2838#define MqERROR_XN(x) MqERROR_R(MqRT_XN(x))
2839#define MqERROR MqERROR_R(&MqRuntimeRLS)
2841
2842
2848__parser__(ignore)
2850 MQ_ERR const err
2851) MK_ATTR_HDL;
2852
2854
2855/* ####################################################################### */
2856/* ### ### */
2857/* ### F A C T O R Y - A P I ### */
2858/* ### ### */
2859/* ####################################################################### */
2860
2918
2919#define MqFactoryPanic(fct) if (fct == NULL) MkPanicC(MK_ERROR_PANIC, __func__, -1, "MqFactoryS exception");
2920
2928typedef enum MkErrorE ( MK_DECL
2930) (
2932 MQ_CTX const tmpl,
2933 enum MqFactoryE create,
2934 MQ_FCT const fct,
2935 MQ_CTX * ctx_out
2936);
2937
2939#define MQ_CALLBACK_FACTORY_CTOR_ARGS \
2940 MQ_RT_ARGS \
2941 MQ_CTX const tmpl, \
2942 enum MqFactoryE create, \
2943 struct MqFactoryS * const fct, \
2944 MQ_CTX *contextP \
2945
2959typedef void ( MK_DECL
2961) (
2963 MQ_CTX ctx,
2964 bool doFactoryCleanup,
2965 MQ_FCT const fct
2966) MK_RT_ATTR_NONNULL_1;
2967
2969typedef void ( MK_DECL
2971) (
2973 MK_PTR *dataP
2974) MK_RT_ATTR_NONNULL_1;
2975
2977typedef void ( MK_DECL
2979) (
2981 MK_PTR *dataP
2982) MK_RT_ATTR_NONNULL_1;
2983
2985__parser__(ignore)
2992
2994__parser__(ignore)
3001
3006 // BEGIN-MqFactoryS-super - created by 'cls_MqS.tcl -i NHI1_HOME/theLink/libmqmsgque/.libmqmsgque.meta' - DO NOT change
3007 union {
3008 struct MkObjectS obj; // base CLASS \MkObjectS
3010 // END-MqFactoryS-super - created by 'cls_MqS.tcl -i NHI1_HOME/theLink/libmqmsgque/.libmqmsgque.meta' - DO NOT change
3011
3012 // instance attributes
3019};
3020
3021// BEGIN-MqFactoryS-ClassDef - created by 'cls_MqS.tcl -i NHI1_HOME/theLink/libmqmsgque/.libmqmsgque.meta' - DO NOT change
3022
3023// Signature --------------------------------------------------------------
3026
3027 #define MqFactoryC_SIGNATURE (MkObjectC_SIGNATURE ^ (15u<<10))
3028 #define MqFactoryC_MASK (((1u<<22)-1)<<10)
3029
3031
3032// Signature --------------------------------------------------------------
3035
3036 #define MqFactoryC_X2fct(x) (x)
3037 #define MqFactoryC_X2obj(x) MkOBJ(x)
3038
3040
3041
3042// TypeDef --------------------------------------------------------------
3045
3047 __parser__(ignore) typedef struct MqFactoryS MqFactoryCR;
3049 __parser__(ignore) typedef const struct MqFactoryS MqFactoryCNR;
3051 #define MqFactoryC_T (&MQ_RT_REF._MqFactoryC_T)
3053 #define MqFactoryC_TT (MkTYP(MqFactoryC_T))
3055 #define MqFactoryST MqFactoryC_T
3057 #define MqFactorySTT (MkTYP(MqFactoryST))
3059 #define MqFactoryC_type MQ_FCT
3061 #define MqFactoryCT_X(instance) ( (struct MkDefTypeS *) (MkOBJ_R(instance).type) )
3063 #define MqFactoryCTT_X(instance) (MkOBJ_R(instance).type)
3065 #define MqFactoryCT_TT(typ) ( (struct MkDefTypeS *) (typ) )
3067 #define MqFactoryC_NS MQ
3069 #define MqFactoryCTT MqFactoryCTT
3071 #define MqFactoryCT ( (struct MkDefTypeS *) MqFactoryCTT )
3072
3074
3075
3076// TypeCheck --------------------------------------------------------------
3079
3080 #pragma GCC diagnostic push
3081 #pragma GCC diagnostic ignored "-Wattributes"
3082
3085 __parser__(class=MqFactoryC,static,hide)
3086 mk_inline bool MqFctCheck (MK_MNGN mng) {
3087 return MkSanitizeCheck(MqFactoryC,mng);
3088 }
3089
3090 #pragma GCC diagnostic pop
3091 #define MqFactoryC_Check(mng) MqFctCheck(mng)
3092
3094
3095
3096// ObjectCast --------------------------------------------------------------
3100 __parser__push__(prefix=Cast);
3101
3103 __parser__(class=MqFactoryC,hide,static)
3104 META_ATTRIBUTE_SANITIZE
3105 mk_inline MQ_FCT MqFct(MK_MNG mng) {
3106 return (MqFctCheck(mng) ? (MQ_FCT)mng : NULL);
3107 }
3108
3110 __parser__(ignore)
3111 META_ATTRIBUTE_SANITIZE
3113 return (MqFctCheck(mng) ? (MQ_FCTN)mng : NULL);
3114 }
3115
3117 #define MqFctRaise(_fct) if (!_MkCheckX(MqFactoryC,_fct)) { \
3118 MkErrorSetC_1E("'MqFactoryC' hdl is NULL"); \
3119 goto error ; \
3120 }
3121
3123 #define MqFCT_R(x) (*(x)).super.fct
3125 #define MqFCT(x) (&MqFCT_R(x))
3126
3129
3130// END-MqFactoryS-ClassDef - created by 'cls_MqS.tcl -i NHI1_HOME/theLink/libmqmsgque/.libmqmsgque.meta' - DO NOT change
3131
3132// #######################################################################
3133// -----------------------------------------------------------------------
3138
3139__parser__push__(doc=Get);
3140
3142__parser__(hide)
3144 MQ_FCTN const fct
3145) MK_ATTR_HDL;
3146
3148__parser__(internal)
3150 MQ_FCTN const fct
3151) MK_ATTR_HDL;
3152
3156 MQ_FCTN const fct
3157) MK_ATTR_HDL;
3158
3172 MK_STRN const ident __parser__(default=S#"")
3173);
3174
3186 MK_STRN const ident __parser__(default=S#"")
3187) MK_ATTR_HDL ;
3188
3202__parser__(no-type-extension,overload=MqFactoryGetCalled)
3204 MK_RT_PARSER
3205 MK_BFLN largs __parser__(argument)
3206) MK_RT_ATTR_RUNTIME MK_RT_ATTR_HDL;
3207
3208__parser__pop__;
3209
3211
3212// #######################################################################
3213// -----------------------------------------------------------------------
3218
3219__parser__push__(doc=TOR);
3220
3228__parser__(hide)
3230 MK_RT_PARSER
3231 MQ_FCT const fct
3232) MK_RT_ATTR_RUNTIME MK_RT_ATTR_HDL;
3233
3236
3249__parser__(destructor,runtime=MqFactoryDelete)
3251 MK_RT_PARSER
3252 MQ_FCT fct
3253) MK_RT_ATTR_RUNTIME MK_RT_ATTR_HDL;
3254
3256
3285__parser__(constructor,lng-constr,no-rpc)
3287 MK_RT_PARSER
3288 MK_OBJN const error __parser__(internal,default=NULL), //C# reguire non "ERROR" name
3289// constructor
3290 MqFactoryCTorF const createCallF __parser__(internal,default=FactoryObjCreate),
3291 MK_CCP const constructor __parser__(constructor),
3292 MqFactoryDataFreeF const createDataFreeF __parser__(internal,default=FactoryFree),
3293 MqFactoryDataCopyF const createDataCopyF __parser__(internal,default=FactoryDup2),
3294// destructor
3295 MqFactoryDTorF const deleteCallF __parser__(internal,default=FactoryObjDelete),
3296 MK_CCP const destructor __parser__(internal,default=NULL),
3297 MqFactoryDataFreeF const deleteDataFreeF __parser__(internal,default=NULL),
3298 MqFactoryDataCopyF const deleteDataCopyF __parser__(internal,default=NULL),
3299
3300 MK_STRN const ident __parser__(default=F#CTOR#constructor)
3301) MK_RT_ATTR_RUNTIME;
3302
3303#define MqFactoryAdd_1(fct) MqFactoryAdd(MK_ERROR_PANIC,fct,NULL, NULL, NULL, NULL, NULL, NULL, NULL, #fct)
3304#define MqFactoryAdd_2(fct,ident) MqFactoryAdd(MK_ERROR_PANIC,fct,NULL, NULL, NULL, NULL, NULL, NULL, NULL, ident)
3305
3317__parser__(constructor,internal)
3319 MK_RT_PARSER
3320 MK_OBJN const error,
3321 MK_STRN const ident,
3322 MkSelfCreateF const fctCreate,
3323 MkSelfDeleteF const fctDelete,
3324 MkConstructorF const constructor,
3325 MkSelfDeleteF const selfDelete
3326) MK_RT_ATTR_RUNTIME;
3327
3329__parser__(constructor)
3331 MK_RT_PARSER
3332 MQ_FCTN const fct,
3333 MK_STRN const ident
3334) MK_RT_ATTR_RUNTIME MK_RT_ATTR_HDL;
3335
3337__parser__(no-rpc,flags=new)
3338mk_inline MQ_FCT MqFactoryFromHandle (MK_LONG const exporthdl) {
3339 return MqFct((MK_MNG)exporthdl);
3340}
3341
3343
3345
3346// #######################################################################
3347// -----------------------------------------------------------------------
3352
3353__parser__push__(doc=Misc);
3354
3370 MQ_FCT const fct
3371) MK_ATTR_HDL;
3372
3390 MQ_FCT const fct
3391) MK_ATTR_HDL;
3392
3395 void
3396);
3397
3400 void
3401);
3402
3422__parser__(class=MqFactoryC,flags=virtual)
3424 MK_RT_PARSER
3425 MQ_FCT const fct,
3426 MQ_CTX const tmpl __parser__(internal,default=NULL),
3427 MQ_CTX* const val_out
3428) MK_RT_ATTR_RUNTIME MK_RT_ATTR_HDL;
3429
3435 MK_RT_PARSER
3436 MK_STRN const callfunc __parser__(default=F#FUNC)
3437) MK_RT_ATTR_RUNTIME ;
3438
3441
3452__parser__(const,flags=new)
3454 MK_RT_PARSER
3455 MQ_FCTN const fct,
3456 MK_OBJN fmtobj __parser__(default=NULL),
3457 MK_DBG const debug __parser__(default=0),
3458 MK_STRN const callfunc __parser__(default=F#FUNC),
3459 MK_INT const lvl __parser__(default=0)
3460) MK_RT_ATTR_RUNTIME MK_RT_ATTR_HDL;
3461
3462#define MqFactoryLog_2M(fct,m) MqFactoryLog_2(fct,MkObj(m))
3463
3465
3467
3469
3471
3472// #######################################################################
3473// -----------------------------------------------------------------------
3478
3484__parser__(ignore)
3486 // BEGIN-MqCtxTypeS-super - created by 'cls_MqS.tcl -i NHI1_HOME/theLink/libmqmsgque/.libmqmsgque.meta' - DO NOT change
3487 union {
3488 struct MkObjectS obj; // base CLASS \MkObjectS
3489 struct MkTypeS typ; // base CLASS \MkTypeS
3491 // END-MqCtxTypeS-super - created by 'cls_MqS.tcl -i NHI1_HOME/theLink/libmqmsgque/.libmqmsgque.meta' - DO NOT change
3492
3493 // instance attributes
3494
3503
3506
3509
3512
3517
3522
3525
3528
3531
3534
3537
3542 struct MqLinkSetupS Child;
3543
3546 struct MqLinkSetupS Parent;
3547
3560 struct MqCallbackS Idle;
3561
3564
3567
3577
3580
3583
3592};
3593
3594// BEGIN-MqCtxTypeS-ClassDef - created by 'cls_MqS.tcl -i NHI1_HOME/theLink/libmqmsgque/.libmqmsgque.meta' - DO NOT change
3595
3596// Signature --------------------------------------------------------------
3599
3600 #define MqCtxTypeC_SIGNATURE (MkTypeC_SIGNATURE ^ (2u<<6))
3601 #define MqCtxTypeC_MASK (((1u<<26)-1)<<6)
3602
3604
3605// Signature --------------------------------------------------------------
3608
3609 #define MqCtxTypeC_X2ctxtyp(x) (x)
3610 #define MqCtxTypeC_X2typ(x) MkTYP(x)
3611 #define MqCtxTypeC_X2obj(x) MkOBJ(x)
3612
3614
3615
3616// TypeDef --------------------------------------------------------------
3619
3621 __parser__(ignore) typedef struct MqCtxTypeS MqCtxTypeCR;
3623 __parser__(ignore) typedef const struct MqCtxTypeS MqCtxTypeCNR;
3625 #define MqCtxTypeSTT (&MQ_RT_REF._MqCtxTypeC_TT)
3627 #define MqCtxTypeC_TT (&MQ_RT_REF._MqCtxTypeC_TT)
3629 #define MqCtxTypeC_type MQ_CTXTYP
3631 #define MqCtxTypeCT_X(instance) ( (struct MkTypeS *) (MkOBJ_R(instance).type) )
3633 #define MqCtxTypeCTT_X(instance) (MkOBJ_R(instance).type)
3635 #define MqCtxTypeCT_TT(typ) ( (struct MkTypeS *) (typ) )
3637 #define MqCtxTypeC_NS MQ
3639 #define MqCtxTypeCTT MqCtxTypeCTT
3641 #define MqCtxTypeCT ( (struct MkTypeS *) MqCtxTypeCTT )
3642
3644
3645
3646// TypeCheck --------------------------------------------------------------
3649
3650 #pragma GCC diagnostic push
3651 #pragma GCC diagnostic ignored "-Wattributes"
3652
3655 __parser__(class=MqCtxTypeC,static,ignore)
3656 mk_inline bool MqCtxTypCheck (MK_MNGN mng) {
3657 return MkSanitizeCheck(MqCtxTypeC,mng);
3658 }
3659
3660 #pragma GCC diagnostic pop
3661 #define MqCtxTypeC_Check(mng) MqCtxTypCheck(mng)
3662
3664
3665// END-MqCtxTypeS-ClassDef - created by 'cls_MqS.tcl -i NHI1_HOME/theLink/libmqmsgque/.libmqmsgque.meta' - DO NOT change
3666
3668__parser__(class=MqContextC,internal,static)
3669mk_inline MQ_CTXT MqCtxTyp(MK_MNG mng) {
3670 if (!MkObjCheck(mng)) return NULL;
3671 MK_OBJ obj = (MK_OBJ) mng;
3672 if (MqCtxTypCheck(obj)) return (MQ_CTXT)obj;
3673 MQ_CTXT typ = (MQ_CTXT) obj->type;
3674 if (MqCtxTypCheck(typ)) return typ;
3675 return NULL;
3676}
3677
3680
3691__parser__(internal,const,flags=new,runtime=MqCtxTypeLog_RT)
3693 MK_RT_PARSER
3694 MQ_CTXT const ctxtype ,
3695 MK_OBJ fmtobj __parser__(default=NULL),
3696 MK_DBG const debug __parser__(default=0),
3697 MK_STRN const callfunc __parser__(default=F#FUNC),
3698 MK_INT const lvl __parser__(default=0)
3699) MK_RT_ATTR_RUNTIME;
3700
3702
3704
3705/* ####################################################################### */
3706/* ### ### */
3707/* ### C O N T E X T - A P I ### */
3708/* ### ### */
3709/* ####################################################################### */
3710
3792
3793// ===================================================================================================
3794
3796#if defined(MQ_LIB_BUILD_DLL)
3797
3798 #define META_SECTION_DEFINE
3799 #include "MqContextS_mq.h"
3800 #undef META_SECTION_DEFINE
3801
3802#else // MQ_LIB_BUILD_DLL
3803
3805 // BEGIN-MqContextS-super - created by 'cls_MqS.tcl -i NHI1_HOME/theLink/libmqmsgque/.libmqmsgque.meta' - DO NOT change
3806 union {
3807 struct MkObjectS obj; // base CLASS \MkObjectS
3809 // END-MqContextS-super - created by 'cls_MqS.tcl -i NHI1_HOME/theLink/libmqmsgque/.libmqmsgque.meta' - DO NOT change
3810
3811 // instance attributes
3812 const
3817 struct MqLinkS link;
3818
3819 // offset calculated by "Nhi1InternalSize"
3821};
3822
3823#endif // MQ_LIB_BUILD_DLL
3824
3825// BEGIN-MqContextS-ClassDef - created by 'cls_MqS.tcl -i NHI1_HOME/theLink/libmqmsgque/.libmqmsgque.meta' - DO NOT change
3826
3827// Signature --------------------------------------------------------------
3830
3831 #define MqContextC_SIGNATURE (MkObjectC_SIGNATURE ^ (13u<<10))
3832 #define MqContextC_MASK (((1u<<22)-1)<<10)
3833
3835
3836// Signature --------------------------------------------------------------
3839
3840 #define MqContextC_X2ctx(x) (x)
3841 #define MqContextC_X2obj(x) MkOBJ(x)
3842
3844
3845
3846// TypeDef --------------------------------------------------------------
3849
3851 __parser__(ignore) typedef struct MqContextS MqContextCR;
3853 __parser__(ignore) typedef const struct MqContextS MqContextCNR;
3855 #define MqContextC_T (&MQ_RT_REF._MqContextC_T)
3857 #define MqContextC_TT (MkTYP(MqContextC_T))
3859 #define MqContextST MqContextC_T
3861 #define MqContextSTT (MkTYP(MqContextST))
3863 #define MqContextC_type MQ_CTX
3865 #define MqContextCT_X(instance) ( (struct MqCtxTypeS *) (MkOBJ_R(instance).type) )
3867 #define MqContextCTT_X(instance) (MkOBJ_R(instance).type)
3869 #define MqContextCT_TT(typ) ( (struct MqCtxTypeS *) (typ) )
3871 #define MqContextC_NS MQ
3873 #define MqContextCTT MqContextCTT
3875 #define MqContextCT ( (struct MqCtxTypeS *) MqContextCTT )
3876
3878
3879
3880// TypeCheck --------------------------------------------------------------
3883
3884 #pragma GCC diagnostic push
3885 #pragma GCC diagnostic ignored "-Wattributes"
3886
3889 __parser__(class=MqContextC,static,hide)
3890 mk_inline bool MqCtxCheck (MK_MNGN mng) {
3891 return MkSanitizeCheck(MqContextC,mng);
3892 }
3893
3894 #pragma GCC diagnostic pop
3895 #define MqContextC_Check(mng) MqCtxCheck(mng)
3896
3898
3899
3900// ObjectCast --------------------------------------------------------------
3904 __parser__push__(prefix=Cast);
3905
3907 __parser__(class=MqContextC,hide,static)
3908 META_ATTRIBUTE_SANITIZE
3909 mk_inline MQ_CTX MqCtx(MK_MNG mng) {
3910 return (MqCtxCheck(mng) ? (MQ_CTX)mng : NULL);
3911 }
3912
3914 __parser__(ignore)
3915 META_ATTRIBUTE_SANITIZE
3917 return (MqCtxCheck(mng) ? (MQ_CTXN)mng : NULL);
3918 }
3919
3921 #define MqCtxRaise(_ctx) if (!_MkCheckX(MqContextC,_ctx)) { \
3922 MkErrorSetC_1E("'MqContextC' hdl is NULL"); \
3923 goto error ; \
3924 }
3925
3927 #define MqCTX_R(x) (*(x)).super.ctx
3929 #define MqCTX(x) (&MqCTX_R(x))
3930
3933
3934// END-MqContextS-ClassDef - created by 'cls_MqS.tcl -i NHI1_HOME/theLink/libmqmsgque/.libmqmsgque.meta' - DO NOT change
3935
3937
3938// #######################################################################
3939// -----------------------------------------------------------------------
3944
3945__parser__push__(doc=TOR);
3946
3948__parser__(internal)
3950 MK_RT_PARSER
3951 MQ_CTX const ctx,
3952 MK_TYP type,
3953 MQ_CTX const tmpl
3954) MK_RT_ATTR_RUNTIME MK_RT_ATTR_HDL;
3955
3962__parser__(internal)
3964 MK_RT_PARSER
3965 MQ_CTX const ctx
3966) MK_RT_ATTR_RUNTIME MK_RT_ATTR_HDL;
3967
3986__parser__(constructor,lng-constr)
3988 MK_RT_PARSER
3989 MK_TYP type __parser__(internal,default=NULL),
3990 MQ_CTX const tmpl __parser__(default=NULL)
3991) MK_RT_ATTR_RUNTIME ;
3992
3999__parser__(internal,constructor)
4001 MK_RT_PARSER
4002 MK_TYP type __parser__(internal,default=NULL),
4003 MQ_CTX const tmpl __parser__(default=NULL),
4004 MQ_CTX *ctx_out
4005) MK_RT_ATTR_RUNTIME ;
4006
4009
4020__parser__(destructor,runtime=MqContextDelete)
4022 MK_RT_PARSER
4023 MQ_CTX ctx
4024) MK_RT_ATTR_RUNTIME MK_RT_ATTR_HDL;
4025
4027
4029__parser__(no-rpc,flags=new)
4030mk_inline MQ_CTX MqContextFromHandle (MK_LONG const exporthdl) {
4031 return MqCtx((MK_MNG)exporthdl);
4032}
4033
4035
4037
4038// #######################################################################
4039// -----------------------------------------------------------------------
4045
4046__parser__push__(doc=Error,doc-index=ErrorApi);
4047
4060__parser__(ignore-error,no-static)
4062 MK_RT_PARSER
4063 MQ_CTXN const targetCtx ,
4064 MQ_CTXN const sourceCtx
4065) MK_RT_ATTR_RUNTIME MK_RT_ATTR_HDL;
4066
4079__parser__(ignore-error,no-static)
4081 MK_RT_PARSER
4082 MQ_CTXN const targetCtx ,
4083 MQ_CTXN const sourceCtx
4084) MK_RT_ATTR_RUNTIME MK_RT_ATTR_HDL;
4085
4091 MQ_CTXN const fmtobj __parser__(default=NULL)
4092) {
4093 return MkErrorDEFAULT(MkOBJ(fmtobj));
4094}
4095
4097
4099
4100
4101// #######################################################################
4102// -----------------------------------------------------------------------
4107
4108__parser__push__(doc=Misc,doc-index=MiscApi);
4109
4112 return ctx ? (MQ_IS_SLAVE(ctx) ? MqGetRoot(ctx->config.master) : MQ_GET_PARENT(ctx)) : NULL;
4113}
4114
4116__parser__(ignore)
4118 return ctx ? (MQ_IS_SLAVE(ctx) ? MqGetRoot(ctx->config.master) : MQ_GET_PARENT(ctx)) : NULL;
4119}
4120
4123
4164 MK_RT_PARSER
4165 MQ_CTX const ctx,
4166 MK_STRN const callfunc __parser__(default=F#FUNC),
4167 MK_STRN const callfile __parser__(default=F#FILE),
4168 MK_INT const callline __parser__(default=F#LINE)
4169) MK_RT_ATTR_RUNTIME MK_RT_ATTR_HDL __attribute__((noreturn));
4170
4172
4185__parser__(internal)
4187 MK_RT_PARSER
4188 MQ_CTX const ctx
4189) MK_RT_ATTR_RUNTIME MK_RT_ATTR_HDL;
4190
4208 MK_RT_PARSER
4209 MQ_CTX const ctx,
4210 MK_BFLN args
4211) MK_RT_ATTR_RUNTIME MK_RT_ATTR_HDL;
4212
4221 MK_RT_PARSER
4222 MQ_CTX const ctx
4223) MK_RT_ATTR_RUNTIME MK_RT_ATTR_HDL;
4224
4271
4273 MK_RT_PARSER
4274 MQ_CTX const ctx,
4275 enum MqWaitOnEventE const wait __parser__(default=MQ_WAIT_NO),
4276 MK_TIME_T timeout __parser__(default=MK_TIMEOUT_DEFAULT)
4277) MK_RT_ATTR_RUNTIME MK_RT_ATTR_HDL;
4278
4281 MK_RT_PARSER
4282 MQ_CTXN const ctx
4283) MK_RT_ATTR_RUNTIME MK_RT_ATTR_HDL;
4284
4285__parser__pop__;
4286
4288
4289// #######################################################################
4290// -----------------------------------------------------------------------
4316
4317__parser__push__(doc=Env,doc-index=EnvApi);
4318
4323 MK_RT_PARSER
4324 MQ_CTX ctx
4325) MK_RT_ATTR_RUNTIME MK_RT_ATTR_HDL;
4326
4330 MQ_CTX ctx
4331) MK_ATTR_HDL;
4332
4335
4347__parser__(const,ignore,flags=new,runtime=MqEnvLog)
4349 MK_RT_PARSER
4350 MQ_ENVN const env ,
4351 MK_OBJN fmtobj __parser__(default=NULL),
4352 MK_DBG const debug __parser__(default=0),
4353 MK_STRN const callfunc __parser__(default=F#FUNC),
4354 MK_INT const lvl __parser__(default=0),
4355 MK_STRN const label __parser__(default=S#"ENV")
4356) MK_RT_ATTR_RUNTIME;
4357
4358#define MqEnvLog_0() MqEnvLog(&(META_CONTEXT_S)->link.protect,META_CONTEXT_S,NULL,0,__func__,0,"ENV")
4359#define MqEnvLog_1(env) MqEnvLog(env,NULL,NULL,0,__func__,0,"ENV")
4360#define MqEnvLog_2(env,fmt) MqEnvLog(env,fmt,NULL,0,__func__,0,"ENV")
4361#define MqEnvLog_3(env,fmt,lbl) MqEnvLog(env,fmt,lbl,0,__func__,0,"ENV")
4362
4364
4366
4368
4369// #######################################################################
4370// -----------------------------------------------------------------------
4447
4469
4470__parser__push__(doc=Storage,doc-index=StorageApi);
4471
4480 MK_RT_PARSER
4481 MQ_CTX const ctx,
4482 MQ_LTR transLId,
4483 MK_INT *cnt_out
4485
4499 MK_RT_PARSER
4500 MQ_CTX const ctx,
4501 MK_STRN const storageFile
4503
4513 MK_RT_PARSER
4514 MQ_CTX const ctx
4516
4529 MK_RT_PARSER
4530 MQ_CTX const ctx,
4531 MQ_LTR *ltid_out
4533
4570 MK_RT_PARSER
4571 MQ_CTX const ctx,
4572 MQ_LTR *transLIdP_inout __parser__(default=0)
4573) MK_RT_ATTR_RUNTIME MK_RT_ATTR_HDL;
4574
4583 MK_RT_PARSER
4584 MQ_CTX const ctx,
4585 MQ_LTR transLId
4586) MK_RT_ATTR_RUNTIME MK_RT_ATTR_HDL;
4587
4596 MK_RT_PARSER
4597 MQ_CTX const ctx,
4598 MQ_LTR transLId
4599) MK_RT_ATTR_RUNTIME MK_RT_ATTR_HDL;
4600
4614 MK_RT_PARSER
4615 MQ_CTX const ctx,
4616 MQ_LTR *transLIdP_inout __parser__(default=0)
4617) MK_RT_ATTR_RUNTIME MK_RT_ATTR_HDL;
4618
4626 MK_RT_PARSER
4627 MQ_CTX const ctx,
4628 MQ_LTR *cnt_out
4629) MK_RT_ATTR_RUNTIME MK_RT_ATTR_HDL;
4630
4633
4636 MK_RT_PARSER
4637 MQ_CTX const ctx,
4638 MK_STRN const callfunc __parser__(default=F#FUNC)
4639) MK_RT_ATTR_RUNTIME MK_RT_ATTR_HDL;
4640
4641#define MqStorageLog_1(ctx) MqStorageLog(ctx,__func__)
4642
4644
4651__parser__(no-rpc)
4653 MK_RT_PARSER
4654 MQ_CTX const ctx,
4655 MQ_CTX *otherCtxP_out,
4656 MQ_LTR *otherLIdP_out
4657) MK_RT_ATTR_RUNTIME MK_RT_ATTR_HDL;
4658
4659__parser__pop__;
4660
4662
4663// #######################################################################
4664// -----------------------------------------------------------------------
4744
4745__parser__push__(doc=Link,doc-index=LinkApi);
4746
4773 MK_RT_PARSER
4774 MQ_CTX const ctx,
4775 MK_BAC args __parser__(default=NULL)
4776) MK_RT_ATTR_RUNTIME MK_RT_ATTR_HDL;
4777
4789 MK_RT_PARSER
4790 MQ_CTX const ctx
4791) MK_RT_ATTR_RUNTIME MK_RT_ATTR_HDL;
4792
4806 MK_RT_PARSER
4807 MQ_CTX const ctx
4808) MK_RT_ATTR_RUNTIME MK_RT_ATTR_HDL;
4809
4827 MK_RT_PARSER
4828 MQ_CTX const ctx,
4829 MQ_CTX const parent,
4830 MK_BAC const args __parser__(default=NULL)
4831) MK_RT_ATTR_RUNTIME MK_RT_ATTR_HDL;
4832
4848__parser__(hide,overload-c-no)
4850 MK_RT_PARSER
4851 MQ_CTX const ctx,
4852 MK_BAC const args __parser__(default=NULL)
4853) MK_RT_ATTR_RUNTIME MK_RT_ATTR_HDL;
4854
4865 MK_RT_PARSER
4866 MQ_CTX const ctx
4867) MK_RT_ATTR_RUNTIME MK_RT_ATTR_HDL;
4868
4879 MQ_CTX const ctx
4880) MK_ATTR_HDL;
4881
4886mk_inline MQ_CTX MqLinkGetParent ( MQ_CTX const ctx) {
4887 return ctx ? ctx->config.parent : NULL;
4888};
4889
4897 return ctx ? ctx->config.parent == NULL : false;
4898};
4899
4910 return ctx ? ctx->link.ctxId : 0;
4911};
4912
4921 return ctx && ctx->link.ctxIdP ? ctx->link.ctxIdP->link.targetIdent : "";
4922};
4923
4925
4927
4928
4929// #######################################################################
4930// -----------------------------------------------------------------------
5124
5125__parser__push__(doc=Route,doc-index=RouteApi);
5126
5138 MK_RT_PARSER
5139 MQ_CTX ctx,
5140 MK_STRN route,
5141 MK_STRN service,
5142 bool overwrite __parser__(default=false)
5143) MK_RT_ATTR_RUNTIME MK_RT_ATTR_HDL;
5144
5149 MK_RT_PARSER
5150 MQ_CTX ctx,
5151 MK_STRN route,
5152 MK_STRN service,
5153 bool overwrite __parser__(default=false)
5154) MK_RT_ATTR_RUNTIME MK_RT_ATTR_HDL;
5155
5172 MK_RT_PARSER
5173 MQ_CTX ctx,
5174 MK_STRN service,
5175 MK_BAC args __parser__(default=NULL)
5176) MK_RT_ATTR_RUNTIME MK_RT_ATTR_HDL;
5177
5182#define MQ_ROUTE_CTX_MAX 50
5183
5211
5213 MK_RT_PARSER
5214 MQ_CTX const ctx,
5215 MK_STRN const ident,
5216 MK_NUM const retnum __parser__(default=-1)
5217) MK_RT_ATTR_RUNTIME MK_RT_ATTR_HDL;
5218
5233 MK_RT_PARSER
5234 MQ_CTX const ctx,
5235 MK_STRN * path_out
5236) MK_RT_ATTR_RUNTIME MK_RT_ATTR_HDL;
5237
5298 MK_RT_PARSER
5299 MQ_CTX const ctx,
5300 MK_BFL *treeP_out
5301) MK_RT_ATTR_RUNTIME MK_RT_ATTR_HDL;
5302
5303__parser__pop__;
5304
5306
5307
5308// #######################################################################
5309// -----------------------------------------------------------------------
5364
5365__parser__push__(doc=Service,doc-index=ServiceApi);
5366
5400__parser__(type=ME_PSN_MQ_TOKEN:"token identifer")
5402
5412
5420MK_ATTR_HDL mk_inline bool MqServiceIsTransaction (
5421 MQ_CTX const ctx
5422) {
5423 MK_ATTR_HDL_CHECK(ctx);
5424 return (ctx->link.protect.transSId != 0);
5425}
5426
5434 MQ_CTX const ctx
5435) MK_ATTR_HDL;
5436
5443 MQ_CTX const ctx,
5444 MQ_TOK const token
5445) MK_ATTR_HDL ;
5446
5489__parser__(no-rpc)
5491 MK_RT_PARSER
5492 MQ_CTX const ctx,
5493 MQ_TOK const token,
5494 MqServiceCallbackF const fCall __parser__(internal),
5495 MK_CBP callback __parser__(callback=service),
5496 MqDataFreeF fFree __parser__(internal),
5497 MkMarkF fMark __parser__(internal)
5498) MK_RT_ATTR_RUNTIME MK_RT_ATTR_HDL;
5499
5500// \anchor \NS{StorageService}
5514 MK_RT_PARSER
5515 MQ_CTX const ctx,
5516 MQ_TOK const token
5517) MK_RT_ATTR_RUNTIME MK_RT_ATTR_HDL;
5518
5526 MK_RT_PARSER
5527 MQ_CTX const ctx,
5528 MQ_TOK const token
5529) MK_RT_ATTR_RUNTIME MK_RT_ATTR_HDL;
5530
5538
5553 MK_RT_PARSER
5554 MQ_CTX const ctx,
5555 MQ_TOK const token,
5556 MQ_SLAVE_ID const id __parser__(default=MQ_SLAVE_OTHER)
5557) MK_RT_ATTR_RUNTIME MK_RT_ATTR_HDL;
5558
5562 MK_RT_PARSER
5563 MQ_CTX const ctx,
5564 MQ_TOK const token,
5565 MQ_CTX const target
5566) MK_RT_ATTR_RUNTIME MK_RT_ATTR_HDL;
5567
5587 MK_RT_PARSER
5588 MQ_CTX const ctx,
5589 MQ_TOK const token,
5590 MK_STRN const ident
5591) MK_RT_ATTR_RUNTIME MK_RT_ATTR_HDL;
5592
5598 MQ_CTX const ctx,
5599 MQ_TOK const token,
5600 MQ_CTX const target
5601) MK_RT_ATTR_HDL;
5602
5604
5605__parser__pop__;
5606
5608
5609// #######################################################################
5610// -----------------------------------------------------------------------
5642
5643// #######################################################################
5644// -----------------------------------------------------------------------
5649
5650__parser__push__(doc=Block,doc-index=ReadApi);
5651
5663 MK_RT_PARSER
5664 MQ_CTX const ctx,
5665 MK_BUF buf __parser__(default=NULL)
5666) MK_RT_ATTR_RUNTIME MK_RT_ATTR_HDL;
5667
5674 MK_RT_PARSER
5675 MQ_CTX const ctx
5676) MK_RT_ATTR_RUNTIME MK_RT_ATTR_HDL;
5677
5690 MK_RT_PARSER
5691 MQ_CTX const ctx
5692) MK_RT_ATTR_RUNTIME MK_RT_ATTR_HDL;
5693
5700 MK_RT_PARSER
5701 MQ_CTX const ctx
5702) MK_RT_ATTR_RUNTIME MK_RT_ATTR_HDL;
5703
5704__parser__pop__;
5705
5707
5708// #######################################################################
5709// -----------------------------------------------------------------------
5714
5715__parser__push__(doc=Atom,doc-index=ReadApi);
5716
5723 MK_RT_PARSER
5724 MQ_CTX const ctx,
5725 MK_BYT * const val_out
5726) MK_RT_ATTR_RUNTIME MK_RT_ATTR_HDL;
5727
5731 MK_RT_PARSER
5732 MQ_CTX const ctx,
5733 MK_BOL * const val_out
5734) MK_RT_ATTR_RUNTIME MK_RT_ATTR_HDL;
5735
5739 MK_RT_PARSER
5740 MQ_CTX const ctx,
5741 MK_SRT * const val_out
5742) MK_RT_ATTR_RUNTIME MK_RT_ATTR_HDL;
5743
5747 MK_RT_PARSER
5748 MQ_CTX const ctx,
5749 MK_INT * const val_out
5750) MK_RT_ATTR_RUNTIME MK_RT_ATTR_HDL;
5751
5755 MK_RT_PARSER
5756 MQ_CTX const ctx,
5757 MK_FLT * const val_out
5758) MK_RT_ATTR_RUNTIME MK_RT_ATTR_HDL;
5759
5763 MK_RT_PARSER
5764 MQ_CTX const ctx,
5765 MK_WID * const val_out
5766) MK_RT_ATTR_RUNTIME MK_RT_ATTR_HDL;
5767
5771 MK_RT_PARSER
5772 MQ_CTX const ctx,
5773 MK_DBL * const val_out
5774) MK_RT_ATTR_RUNTIME MK_RT_ATTR_HDL;
5775
5787 MK_RT_PARSER
5788 MQ_CTX const ctx,
5789 MK_STRN * const val_out
5790) MK_RT_ATTR_RUNTIME MK_RT_ATTR_HDL;
5791
5809 MK_RT_PARSER
5810 MQ_CTX const ctx,
5811 MkBinaryR * const val_out
5812) MK_RT_ATTR_RUNTIME MK_RT_ATTR_HDL;
5813
5837 MK_RT_PARSER
5838 MQ_CTX const ctx,
5839 MK_BUF* const val_out
5840) MK_RT_ATTR_RUNTIME MK_RT_ATTR_HDL;
5841
5858 MK_RT_PARSER
5859 MQ_CTX const ctx,
5860 MK_BFL* const val_out
5861) MK_RT_ATTR_RUNTIME MK_RT_ATTR_HDL;
5862
5877 MK_RT_PARSER
5878 MQ_CTX const ctx,
5879 MK_BFL* const val_inout
5880) MK_RT_ATTR_RUNTIME MK_RT_ATTR_HDL;
5881
5892__parser__(template-require,no-rpc)
5894 MK_RT_PARSER
5895 MQ_CTX const ctx,
5896 MK_NAT_LIST* const val_out
5897) MK_RT_ATTR_RUNTIME MK_RT_ATTR_HDL;
5898
5907__parser__(template-require,no-rpc)
5909 MK_RT_PARSER
5910 MQ_CTX const ctx,
5911 MK_NAT_OBJECT* const val_out
5912) MK_RT_ATTR_RUNTIME MK_RT_ATTR_HDL;
5913
5925 MK_RT_PARSER
5926 MQ_CTX const ctx,
5927 MK_LONG* const val_out
5928) MK_RT_ATTR_RUNTIME MK_RT_ATTR_HDL;
5929
5930__parser__pop__;
5931
5933
5934// #######################################################################
5935// -----------------------------------------------------------------------
5940
5941__parser__push__(doc=Misc,doc-index=ReadApi);
5942
5943__parser__(doc-no)
5945 MK_RT_PARSER
5946 MQ_CTX const ctx
5947) MK_RT_ATTR_RUNTIME MK_RT_ATTR_HDL;
5948
5958 MK_RT_PARSER
5959 MQ_CTX const ctx
5960) MK_RT_ATTR_RUNTIME MK_RT_ATTR_HDL;
5961
5967 MQ_CTX const ctx
5968) MK_ATTR_HDL;
5969
5975 MQ_CTX const ctx
5976) MK_ATTR_HDL;
5977
5983 MQ_CTX const ctx
5984) MK_ATTR_HDL;
5985
5990__parser__(internal)
5992 MQ_CTX const ctx
5993) MK_ATTR_HDL;
5994
5999__parser__(internal)
6001 MQ_CTX const ctx
6002) MK_ATTR_HDL;
6003
6004__parser__pop__;
6005
6007
6008// #######################################################################
6009// -----------------------------------------------------------------------
6039
6040__parser__push__(doc=Proxy,doc-index=ProxyApi);
6041
6053 MK_RT_PARSER
6054 MQ_CTX const sourceCtx,
6055 MQ_CTX const targetCtx
6056) MK_RT_ATTR_RUNTIME MK_RT_ATTR_HDL;
6057
6087__parser__(internal)
6089 MK_RT_PARSER
6090 MQ_CTX const sourceCtx,
6091 MQ_CTX const targetCtx,
6092 MQ_DMP const dump __parser__(default=NULL)
6093) MK_RT_ATTR_RUNTIME MK_RT_ATTR_HDL;
6094
6122 MK_RT_PARSER
6123 MQ_CTX const sourceCtx,
6124 MQ_CTX const targetCtx,
6125 MQ_DMP const dump __parser__(default=NULL),
6126 MK_TIME_T const timeout __parser__(default=MK_TIMEOUT_DEFAULT)
6127) MK_RT_ATTR_RUNTIME MK_RT_ATTR_HDL;
6128
6129__parser__pop__;
6130
6132
6133// #######################################################################
6134// -----------------------------------------------------------------------
6265
6270__parser__(internal,doc-no,doc=Atom,doc-index=SendApi)
6272 MQ_CTX const ctx,
6273 enum MqHandShakeE handShake
6274) MK_ATTR_HDL;
6275
6277
6278// #######################################################################
6279// -----------------------------------------------------------------------
6289
6290__parser__push__(doc=Atom,doc-index=SendApi);
6291
6299 MK_RT_PARSER
6300 MQ_CTX const ctx,
6301 MK_BYT const val
6302) MK_RT_ATTR_RUNTIME MK_RT_ATTR_HDL;
6303
6306 MK_RT_PARSER
6307 MQ_CTX const ctx,
6308 MK_BOL const val
6309) MK_RT_ATTR_RUNTIME MK_RT_ATTR_HDL;
6310
6313 MK_RT_PARSER
6314 MQ_CTX const ctx,
6315 MK_SRT const val
6316) MK_RT_ATTR_RUNTIME MK_RT_ATTR_HDL;
6317
6320 MK_RT_PARSER
6321 MQ_CTX const ctx,
6322 MK_INT const val
6323) MK_RT_ATTR_RUNTIME MK_RT_ATTR_HDL;
6324
6327 MK_RT_PARSER
6328 MQ_CTX const ctx,
6329 MK_FLT const val
6330) MK_RT_ATTR_RUNTIME MK_RT_ATTR_HDL;
6331
6334 MK_RT_PARSER
6335 MQ_CTX const ctx,
6336 MK_WID const val
6337) MK_RT_ATTR_RUNTIME MK_RT_ATTR_HDL;
6338
6341 MK_RT_PARSER
6342 MQ_CTX const ctx,
6343 MK_DBL const val
6344) MK_RT_ATTR_RUNTIME MK_RT_ATTR_HDL;
6345
6350 MK_RT_PARSER
6351 MQ_CTX const ctx,
6352 MK_STRN const val
6353) MK_RT_ATTR_RUNTIME MK_RT_ATTR_HDL;
6354
6364 MK_RT_PARSER
6365 MQ_CTX const ctx,
6366 MkBinaryR const val
6367) MK_RT_ATTR_RUNTIME MK_RT_ATTR_HDL;
6368
6374 MK_RT_PARSER
6375 MQ_CTX const ctx,
6376 MK_BUF const val
6377) MK_RT_ATTR_RUNTIME MK_RT_ATTR_HDL;
6378
6393 MK_RT_PARSER
6394 MQ_CTX const ctx,
6395 MK_BFL const val
6396) MK_RT_ATTR_RUNTIME MK_RT_ATTR_HDL;
6397
6407 MK_RT_PARSER
6408 MQ_CTX const ctx,
6409 MK_BFL const val
6410) MK_RT_ATTR_RUNTIME MK_RT_ATTR_HDL;
6411
6418 MK_RT_PARSER
6419 MQ_CTX const ctx,
6420 MK_FST const printfmt,
6421 ...
6422) MK_RT_ATTR_RUNTIME MK_RT_ATTR_HDL MK_RT_ATTR_FORMAT_2;
6423
6431 MK_RT_PARSER
6432 MQ_CTX const ctx,
6433 MK_FST const printfmt,
6434 va_list var_list
6435) MK_RT_ATTR_RUNTIME MK_RT_ATTR_HDL;
6436
6459__parser__(doc-no)
6461 MK_RT_PARSER
6462 MQ_CTX const ctx,
6463 MQ_LTR const transLId
6464) MK_RT_ATTR_RUNTIME MK_RT_ATTR_HDL;
6465
6478 MK_RT_PARSER
6479 MQ_CTX const ctx,
6480 MK_LONG const val
6481) MK_RT_ATTR_RUNTIME MK_RT_ATTR_HDL;
6482
6483__parser__pop__;
6484
6486
6487// #######################################################################
6488// -----------------------------------------------------------------------
6493
6494__parser__push__(doc=Basics,doc-index=SendApi);
6495
6529 MK_RT_PARSER
6530 MQ_CTX const ctx,
6531 MQ_TOK const token,
6532 MK_TIME_T timeout __parser__(default=MK_TIMEOUT_DEFAULT)
6533) MK_RT_ATTR_RUNTIME MK_RT_ATTR_HDL;
6534
6546 MK_RT_PARSER
6547 MQ_CTX const ctx
6548) MK_RT_ATTR_RUNTIME MK_RT_ATTR_HDL;
6549
6562 MK_RT_PARSER
6563 MQ_CTX const ctx,
6564 MQ_TOK const token,
6565 MK_TIME_T timeout __parser__(default=MK_TIMEOUT_DEFAULT)
6566) MK_RT_ATTR_RUNTIME MK_RT_ATTR_HDL;
6567
6629
6630__parser__(no-rpc)
6632 MK_RT_PARSER
6633 MQ_CTX const ctx,
6634 MQ_TOK const token,
6635 MQ_TOK const callback,
6636 MK_TIME_T timeout __parser__(default=MK_TIMEOUT_DEFAULT)
6637) MK_RT_ATTR_RUNTIME MK_RT_ATTR_HDL;
6638
6661__parser__(no-rpc)
6663 MK_RT_PARSER
6664 MQ_CTX const ctx,
6665 MQ_TOK const token,
6666 MqServiceCallbackF const fCall __parser__(internal),
6667 MK_CBP callback __parser__(callback=service),
6668 MqDataFreeF fFree __parser__(internal),
6669 MK_TIME_T timeout __parser__(default=MK_TIMEOUT_DEFAULT)
6670) MK_RT_ATTR_RUNTIME MK_RT_ATTR_HDL;
6671
6702__parser__(no-rpc)
6704 MK_RT_PARSER
6705 MQ_CTX const ctx,
6706 MQ_TOK const token,
6707 MqServiceCallbackF const fCall __parser__(internal),
6708 MK_CBP callback __parser__(callback=service),
6709 MqDataFreeF fFree __parser__(internal),
6710 MK_TIME_T const timeout __parser__(default=MK_TIMEOUT_DEFAULT)
6711) MK_RT_ATTR_RUNTIME MK_RT_ATTR_HDL;
6712
6726 MK_RT_PARSER
6727 MQ_CTX const ctx
6728) MK_RT_ATTR_RUNTIME MK_RT_ATTR_HDL;
6729
6730__parser__pop__;
6731
6733
6734// #######################################################################
6735// -----------------------------------------------------------------------
6740
6741__parser__push__(doc=Return,doc-index=SendApi);
6742
6759 MK_RT_PARSER
6760 MQ_CTX const ctx
6761) MK_RT_ATTR_RUNTIME MK_RT_ATTR_HDL;
6762
6763//#define MqSendRETURN(ctx) (dbg(ctx),MqSendRETURNx(ctx))
6764
6775 MK_RT_PARSER
6776 MQ_CTX const ctx
6777) MK_RT_ATTR_RUNTIME MK_RT_ATTR_HDL;
6778
6789 MK_RT_PARSER
6790 MQ_CTX const ctx
6791) MK_RT_ATTR_RUNTIME MK_RT_ATTR_HDL;
6792
6793__parser__pop__;
6794
6796
6797// #######################################################################
6798// -----------------------------------------------------------------------
6805
6806__parser__push__(doc=Block,doc-index=SendApi);
6807
6825 MK_RT_PARSER
6826 MQ_CTX const ctx
6827) MK_RT_ATTR_RUNTIME MK_RT_ATTR_HDL;
6828
6835 MK_RT_PARSER
6836 MQ_CTX const ctx
6837) MK_RT_ATTR_RUNTIME MK_RT_ATTR_HDL;
6838
6854 MK_RT_PARSER
6855 MQ_CTX const ctx
6856) MK_RT_ATTR_RUNTIME MK_RT_ATTR_HDL;
6857
6867 MK_RT_PARSER
6868 MQ_CTX const ctx
6869) MK_RT_ATTR_RUNTIME MK_RT_ATTR_HDL;
6870
6871__parser__pop__;
6872
6874
6875/* ####################################################################### */
6876/* ### ### */
6877/* ### S L A V E - A P I ### */
6878/* ### ### */
6879/* ####################################################################### */
6880
7055__parser__push__(doc=Slave,doc-index=SlaveApi);
7056
7085 MK_RT_PARSER
7086 MQ_CTX const ctx,
7087 MQ_SLAVE_ID const id,
7088 MK_STRN fct __parser__(default=S#"WORKER"),
7089 MK_BAC args __parser__(default=NULL)
7090) MK_RT_ATTR_RUNTIME MK_RT_ATTR_HDL;
7091
7114 MK_RT_PARSER
7115 MQ_CTX const ctx,
7116 MQ_SLAVE_ID const id,
7117 MQ_CTX const slave
7119
7134 MK_RT_PARSER
7135 MQ_CTX const ctx,
7136 MQ_SLAVE_ID const id
7138
7145mk_inline bool MqSlaveCheck ( MQ_CTXN const ctx, MQ_SLAVE_ID const id )
7146{
7147 return ctx ? id >= 0 && id < ctx->link.slave.used && ctx->link.slave.slaves[id] != NULL : false;
7148}
7149
7160 MK_RT_PARSER
7161 MQ_CTX const ctx,
7162 MQ_SLAVE_ID const id,
7163 MQ_CTX* ctx_out
7165
7176 MK_RT_PARSER
7177 MQ_CTX const ctx,
7178 MQ_SLAVE_ID const id,
7179 MQ_CTX* ctx_out
7181
7201 MK_RT_PARSER
7202 MQ_CTX const ctx,
7203 MQ_CTX* ctx_out
7205
7209{
7210 return ctx ? (MQ_IS_MASTER(ctx) ? ctx : ctx->config.master) : NULL;
7211}
7212
7217mk_inline bool MqSlaveIs ( MQ_CTXN const ctx)
7218{
7219 return ctx ? (ctx->config.master != NULL) : false;
7220}
7221
7223
7225
7226// #######################################################################
7227// -----------------------------------------------------------------------
7381
7382__parser__push__(doc=High,doc-index=HighApi);
7383
7391__parser__(template-require)
7393 MK_RT_PARSER
7394 MQ_CTX const ctx ,
7395 MK_STRN cstr ,
7396 ...
7397) MK_RT_ATTR_RUNTIME MK_RT_ATTR_HDL;
7398
7401#define MQ_SEND_TRANSACTION_TOKEN_SIZE 10
7402#define MQ_SEND_TOKEN_SIGNATURE_SIZE 50
7404
7413 MK_RT_PARSER
7414 MQ_CTX const ctx ,
7415 MK_STRN cstr ,
7416 va_list var_list
7418
7420
7422
7423/* ####################################################################### */
7424/* ### ### */
7425/* ### F I L T E R - A P I ### */
7426/* ### ### */
7427/* ####################################################################### */
7428
7552/* ####################################################################### */
7553/* ### ### */
7554/* ### C L A S S - A P I ### */
7555/* ### ### */
7556/* ####################################################################### */
7557
7577
7578__parser__push__(doc=Class,doc-index=ClassApi);
7579
7584 MQ_CTXN const ctx
7585) MK_ATTR_HDL;
7586
7593 MK_RT_PARSER
7594 MQ_CTX const ctx,
7595 MQ_FCT const item
7597
7609 MK_RT_PARSER
7610 MQ_CTX const ctx,
7611 MK_STRN ident
7613
7622 MQ_CTXN const ctx
7623) MK_ATTR_HDL;
7624
7631 MQ_CTXN const ctx
7632) MK_ATTR_HDL;
7633
7635
7637
7638// #######################################################################
7639// only - inline ---------------------------------------------------------
7643
7644__parser__push__(doc=Get,doc-index=ConfigApi);
7645
7650 MQ_CTX const ctx
7651) {
7652 MK_ATTR_HDL_CHECK(ctx);
7653 return MQ_IS_SERVER(ctx);
7654}
7655
7660 MQ_CTX const ctx
7661) {
7662 MK_ATTR_HDL_CHECK(ctx);
7663 return ctx->config.identFrom;
7664}
7665
7671 MQ_CTX const ctx
7672) {
7673 MK_ATTR_HDL_CHECK(ctx);
7674 return MQ_IS_PARENT(ctx);
7675}
7676
7681 MQ_CTX const ctx
7682) {
7683 MK_ATTR_HDL_CHECK(ctx);
7684 return (ctx->config.native == MK_NATIVE_IS_STRING);
7685}
7686
7693 MQ_CTXN const ctx
7694) {
7695 MK_ATTR_HDL_CHECK(ctx);
7696 return MkSysStringGetNoNULL((ctx)->config.dispname);
7697}
7698
7705 MQ_CTXN const ctx
7706) {
7707 MK_ATTR_HDL_CHECK(ctx);
7708 return MkSysStringGetNoNULL((ctx)->config.prefix);
7709}
7710
7717 MQ_CTXN const ctx
7718) {
7719 MK_ATTR_HDL_CHECK(ctx);
7720 return MkSysStringGetNoNULL((ctx)->config.postfix);
7721}
7722
7729 MQ_CTXN const ctx
7730) {
7731 MK_ATTR_HDL_CHECK(ctx);
7732 return MkSysStringGetNoNULL((ctx)->config.storage);
7733}
7734
7740 MQ_CTXN const ctx
7741) {
7742 MK_ATTR_HDL_CHECK(ctx);
7743 return (ctx)->config.io.buffersize;
7744}
7745
7751 MQ_CTXN const ctx
7752) {
7753 MK_ATTR_HDL_CHECK(ctx);
7754 return (ctx)->config.io.pkgsize;
7755}
7756
7762 MQ_CTXN const ctx
7763) {
7764 MK_ATTR_HDL_CHECK(ctx);
7765 return (ctx)->config.io.timeout;
7766}
7767
7774 MQ_CTXN const ctx
7775) {
7776 MK_ATTR_HDL_CHECK(ctx);
7777 return MkSysStringGetNoNULL(ctx->config.io.uds.file);
7778}
7779
7795__parser__(no-rpc)
7798 MQ_CTX const ctx,
7799 MK_STRN *host_out,
7800 MK_STRN *port_out,
7801 MK_STRN *myhost_out,
7802 MK_STRN *myport_out
7803) MK_ATTR_HDL;
7804
7828__parser__(no-type-extension)
7831 MQ_CTX const ctx,
7832 MK_BFL *vals_out
7833) MK_ATTR_HDL;
7834
7839 MQ_CTX const ctx
7840) {
7841 MK_ATTR_HDL_CHECK(ctx);
7842 return ctx->config.io.pipe.hdl;
7843}
7844
7847 MQ_CTX const ctx
7848) {
7849 MK_ATTR_HDL_CHECK(ctx);
7850 return ctx->config.startAs;
7851}
7852
7855 MQ_CTX const ctx
7856) {
7857 MK_ATTR_HDL_CHECK(ctx);
7858 return ctx->statusIs;
7859}
7860
7861#if META_HAVE_LIBCONFIG
7862
7866__parser__(internal)
7868 MQ_CTX const ctx
7869) MK_ATTR_HDL;
7870
7876__parser__(internal)
7878 MQ_CTX const ctx
7879) MK_ATTR_HDL;
7880
7888 MK_RT_PARSER
7889 MQ_CTX const ctx,
7890 MK_STRN const filename
7891) MK_RT_ATTR_RUNTIME MK_RT_ATTR_HDL;
7892
7893#endif
7894
7896
7898
7899/* ####################################################################### */
7900/* ### ### */
7901/* ### D U M P - A P I ### */
7902/* ### ### */
7903/* ####################################################################### */
7904
7924
7925#if defined(MQ_LIB_BUILD_DLL)
7926
7927 #define META_SECTION_DEFINE
7928 #include "MqDumpS_mq.h"
7929 #undef META_SECTION_DEFINE
7930
7931#else
7932
7935struct MqDumpS {
7936 // BEGIN-MqDumpS-super - created by 'cls_MqS.tcl -i NHI1_HOME/theLink/libmqmsgque/.libmqmsgque.meta' - DO NOT change
7937 union {
7938 struct MkObjectS obj; // base CLASS \MkObjectS
7940 // END-MqDumpS-super - created by 'cls_MqS.tcl -i NHI1_HOME/theLink/libmqmsgque/.libmqmsgque.meta' - DO NOT change
7941
7942 // missing PRIVATE instance attributes
7944};
7945
7946#endif
7947
7948// BEGIN-MqDumpS-ClassDef - created by 'cls_MqS.tcl -i NHI1_HOME/theLink/libmqmsgque/.libmqmsgque.meta' - DO NOT change
7949
7950// Signature --------------------------------------------------------------
7953
7954 #define MqDumpC_SIGNATURE (MkObjectC_SIGNATURE ^ (14u<<10))
7955 #define MqDumpC_MASK (((1u<<22)-1)<<10)
7956
7958
7959// Signature --------------------------------------------------------------
7962
7963 #define MqDumpC_X2dmp(x) (x)
7964 #define MqDumpC_X2obj(x) MkOBJ(x)
7965
7967
7968
7969// TypeDef --------------------------------------------------------------
7972
7974 __parser__(ignore) typedef struct MqDumpS MqDumpCR;
7976 __parser__(ignore) typedef const struct MqDumpS MqDumpCNR;
7978 #define MqDumpC_T (&MQ_RT_REF._MqDumpC_T)
7980 #define MqDumpC_TT (MkTYP(MqDumpC_T))
7982 #define MqDumpST MqDumpC_T
7984 #define MqDumpSTT (MkTYP(MqDumpST))
7986 #define MqDumpC_type MQ_DMP
7988 #define MqDumpCT_X(instance) ( (struct MkDefTypeS *) (MkOBJ_R(instance).type) )
7990 #define MqDumpCTT_X(instance) (MkOBJ_R(instance).type)
7992 #define MqDumpCT_TT(typ) ( (struct MkDefTypeS *) (typ) )
7994 #define MqDumpC_NS MQ
7996 #define MqDumpCTT MqDumpCTT
7998 #define MqDumpCT ( (struct MkDefTypeS *) MqDumpCTT )
7999
8001
8002
8003// TypeCheck --------------------------------------------------------------
8006
8007 #pragma GCC diagnostic push
8008 #pragma GCC diagnostic ignored "-Wattributes"
8009
8012 __parser__(class=MqDumpC,static,hide)
8013 mk_inline bool MqDmpCheck (MK_MNGN mng) {
8014 return MkSanitizeCheck(MqDumpC,mng);
8015 }
8016
8017 #pragma GCC diagnostic pop
8018 #define MqDumpC_Check(mng) MqDmpCheck(mng)
8019
8021
8022
8023// ObjectCast --------------------------------------------------------------
8027 __parser__push__(prefix=Cast);
8028
8030 __parser__(class=MqDumpC,hide,static)
8031 META_ATTRIBUTE_SANITIZE
8032 mk_inline MQ_DMP MqDmp(MK_MNG mng) {
8033 return (MqDmpCheck(mng) ? (MQ_DMP)mng : NULL);
8034 }
8035
8037 __parser__(ignore)
8038 META_ATTRIBUTE_SANITIZE
8040 return (MqDmpCheck(mng) ? (MQ_DMPN)mng : NULL);
8041 }
8042
8044 #define MqDmpRaise(_dmp) if (!_MkCheckX(MqDumpC,_dmp)) { \
8045 MkErrorSetC_1E("'MqDumpC' hdl is NULL"); \
8046 goto error ; \
8047 }
8048
8050 #define MqDMP_R(x) (*(x)).super.dmp
8052 #define MqDMP(x) (&MqDMP_R(x))
8053
8056
8057// END-MqDumpS-ClassDef - created by 'cls_MqS.tcl -i NHI1_HOME/theLink/libmqmsgque/.libmqmsgque.meta' - DO NOT change
8058
8067__parser__(const,flags=new,runtime=MqDumpLog)
8069 MK_RT_PARSER
8070 MQ_DMP const dmp,
8071 MK_OBJ fmtobj __parser__(default=NULL),
8072 MK_INT const debug __parser__(default=0),
8073 MK_STRN const callfunc __parser__(default=F#FUNC),
8074 MK_INT const lvl __parser__(default=0)
8075) MK_RT_ATTR_RUNTIME;
8076
8077#define MqDumpLog_1XS(dump) MqDumpLog(dump,(MK_OBJ)META_CONTEXT_S,0,__func__,0)
8078
8079// #######################################################################
8080// -----------------------------------------------------------------------
8085
8086__parser__push__(doc=TOR);
8087
8118__parser__(constructor,lng-constr)
8120 MK_RT_PARSER
8121 MQ_CTX const ctx __parser__(argument),
8122 MQ_DMP * const dumpP_inout __parser__(default=NULL)
8123) MK_RT_ATTR_RUNTIME MK_RT_ATTR_HDL;
8124
8142
8143__parser__(constructor)
8145 MK_RT_PARSER
8146 MQ_CTX const error __parser__(argument),
8147 MQ_DMP * const dumpP_inout __parser__(default=NULL)
8148) MK_RT_ATTR_RUNTIME MK_RT_ATTR_HDL;
8149
8167 MK_RT_PARSER
8168 MQ_DMP const dump,
8169 MQ_CTX const ctx
8170) MK_RT_ATTR_RUNTIME MK_RT_ATTR_HDL MK_RT_ATTR_NONNULL_1;
8171
8186__parser__(constructor)
8188 MK_RT_PARSER
8189 MkBinaryR data,
8190 MQ_DMP *dmp_out
8191) MK_RT_ATTR_RUNTIME MK_RT_ATTR_HDL;
8192
8202 MQ_DMPN const dump
8203) MK_ATTR_HDL;
8204
8207
8213__parser__(destructor,runtime=MqDumpDelete)
8215 MK_RT_PARSER
8216 MQ_DMP dmp
8217);
8218
8220
8222__parser__(no-rpc,flags=new)
8223mk_inline MQ_DMP MqDumpFromHandle (MK_LONG const exporthdl) {
8224 return MqDmp((MK_MNG)exporthdl);
8225}
8226
8228
8230
8231// #######################################################################
8232// -----------------------------------------------------------------------
8237
8238__parser__push__(doc=Misc);
8239
8248 MQ_DMPN const dump
8249) MK_ATTR_HDL;
8250
8254__parser__(internal)
8256 MQ_DMP const dump,
8257 MQ_LTR transLId
8258) MK_ATTR_HDL;
8259
8263__parser__(internal)
8265 MQ_DMP const dump,
8266 MQ_LTR rmtTransLId
8267) MK_ATTR_HDL;
8268
8276__parser__(internal)
8278 MQ_DMP const dump,
8279 MK_SIZE allocsize
8280) MK_ATTR_HDL;
8281
8285__parser__(internal)
8287 MQ_DMPN const dump
8288) MK_ATTR_HDL;
8289
8293__parser__(internal)
8295 MQ_DMPN const dump
8296) MK_ATTR_HDL;
8297
8302 MQ_DMPN const dump
8303) MK_ATTR_HDL;
8304
8305__parser__pop__;
8306
8308
8310
8311/* MARK_R ################################################################ */
8312/* ### ### */
8313/* ### R U N T I M E - A P I ### */
8314/* ### ### */
8315/* ####################################################################### */
8316
8317__parser__(global=prefix2class:MqRuntime:MqRuntimeC);
8318
8332
8333#pragma GCC diagnostic push
8334#pragma GCC diagnostic ignored "-Wlto-type-mismatch"
8335
8336#if defined(MQ_LIB_BUILD_DLL)
8337
8338 #define META_SECTION_DEFINE
8339 #include "MqRuntimeS_mq.h"
8340 #undef META_SECTION_DEFINE
8341
8342#else
8343
8345__parser__(internal)
8347
8348 // ======================================================================================
8349 // PUBLIC variables -> sync with MqRuntimeS_mk.h !!
8350
8357 // by default \ref __MqRtCheckX is \e false and will be set in \RMkNs{RuntimeInit} .
8358
8359 // BEGIN-MqRuntimeS-super - created by 'cls_MqS.tcl -i NHI1_HOME/theLink/libmqmsgque/.libmqmsgque.meta' - DO NOT change
8360 union {
8361 struct MkObjectS obj; // base CLASS \MkObjectS
8362 struct MkExtensionS ext; // base CLASS \MkExtensionS
8363 struct MkRtExtS rtext; // base CLASS \MkRtExtS
8365 // END-MqRuntimeS-super - created by 'cls_MqS.tcl -i NHI1_HOME/theLink/libmqmsgque/.libmqmsgque.meta' - DO NOT change
8366
8367 // instance attributes
8368 struct MqErrorS error_mq ;
8369
8370 // ======================================================================================
8371 // TYPES
8372
8373 // BEGIN-rtDef - created by 'cls_MqS.tcl -i NHI1_HOME/theLink/libmqmsgque/.libmqmsgque.meta' - DO NOT change
8374 struct MkDefTypeS _MqErrorC_T ;
8375 struct MkDefTypeS _MqRuntimeC_T ;
8376 struct MkTypeS _MqCtxTypeC_TT ;
8377 struct MqCtxTypeS _MqContextC_T ;
8378 struct MkDefTypeS _MqDumpC_T ;
8379 struct MkDefTypeS _MqFactoryC_T ;
8380 struct MkDefTypeS _MqEnvC_T ;
8381 // END-rtDef - created by 'cls_MqS.tcl -i NHI1_HOME/theLink/libmqmsgque/.libmqmsgque.meta' - DO NOT change
8382
8383 // offset calculated by "Nhi1InternalSize"
8384 MK_BINB private_variables[290376];
8385};
8386
8387#endif
8388
8389#pragma GCC diagnostic pop
8390
8391// BEGIN-MqRuntimeS-ClassDef - created by 'cls_MqS.tcl -i NHI1_HOME/theLink/libmqmsgque/.libmqmsgque.meta' - DO NOT change
8392
8393// Signature --------------------------------------------------------------
8396
8397 #define MqRuntimeC_SIGNATURE (MkRtExtC_SIGNATURE ^ (1u<<3))
8398 #define MqRuntimeC_MASK (((1u<<29)-1)<<3)
8399
8401
8402// Signature --------------------------------------------------------------
8405
8406 #define MqRuntimeC_X2rt(x) (x)
8407 #define MqRuntimeC_X2rtext(x) MkRTEXT(x)
8408 #define MqRuntimeC_X2ext(x) MkEXT(x)
8409 #define MqRuntimeC_X2obj(x) MkOBJ(x)
8410
8412
8413
8414// TypeDef --------------------------------------------------------------
8417
8419 __parser__(ignore) typedef struct MqRuntimeS MqRuntimeCR;
8421 __parser__(ignore) typedef const struct MqRuntimeS MqRuntimeCNR;
8423 #define MqRuntimeC_T (&MQ_RT_REF._MqRuntimeC_T)
8425 #define MqRuntimeC_TT (MkTYP(MqRuntimeC_T))
8427 #define MqRuntimeST MqRuntimeC_T
8429 #define MqRuntimeSTT (MkTYP(MqRuntimeST))
8431 #define MqRuntimeC_type MQ_RT
8433 #define MqRuntimeCT_X(instance) ( (struct MkDefTypeS *) (MkOBJ_R(instance).type) )
8435 #define MqRuntimeCTT_X(instance) (MkOBJ_R(instance).type)
8437 #define MqRuntimeCT_TT(typ) ( (struct MkDefTypeS *) (typ) )
8439 #define MqRuntimeC_NS MQ
8441 #define MqRuntimeCTT MqRuntimeCTT
8443 #define MqRuntimeCT ( (struct MkDefTypeS *) MqRuntimeCTT )
8444
8446
8447
8448// TypeCheck --------------------------------------------------------------
8451
8452 #pragma GCC diagnostic push
8453 #pragma GCC diagnostic ignored "-Wattributes"
8454
8457 __parser__(class=MqRuntimeC,static,ignore)
8458 mk_inline bool MqRtCheck (MK_MNGN mng) {
8459 return MkSanitizeCheck(MqRuntimeC,mng);
8460 }
8461
8462 #pragma GCC diagnostic pop
8463 #define MqRuntimeC_Check(mng) MqRtCheck(mng)
8464
8466
8467
8468// ObjectCast --------------------------------------------------------------
8472 __parser__push__(prefix=Cast);
8473
8475 __parser__(class=MqRuntimeC,ignore,static)
8476 META_ATTRIBUTE_SANITIZE
8477 mk_inline MQ_RT MqRt(MK_MNG mng) {
8478 return (MqRtCheck(mng) ? (MQ_RT)mng : NULL);
8479 }
8480
8482 __parser__(ignore)
8483 META_ATTRIBUTE_SANITIZE
8485 return (MqRtCheck(mng) ? (MQ_RTN)mng : NULL);
8486 }
8487
8489 #define MqRtRaise(_rt) if (!_MkCheckX(MqRuntimeC,_rt)) { \
8490 MkErrorSetC_1E("'MqRuntimeC' hdl is NULL"); \
8491 goto error ; \
8492 }
8493
8496
8497// END-MqRuntimeS-ClassDef - created by 'cls_MqS.tcl -i NHI1_HOME/theLink/libmqmsgque/.libmqmsgque.meta' - DO NOT change
8498
8500
8501#define MqRT &MqRuntimeRLS
8502#if 0
8503 #define MqRT_O(o) MqRuntimeGetI()
8504 #define MqRT_X(x) MqRuntimeGetI()
8505 #define MqRT_ON(o) MqRuntimeGetI()
8506 #define MqRT_XN(x) MqRuntimeGetI()
8507#else
8508 #define MqRT_O(o) ((o) && (*o).objRtExt ? (MQ_RT)(*o).objRtExt : MqRuntimeGetI())
8509 #define MqRT_X(x) ((x) && MkOBJ_R(x).objRtExt ? (MQ_RT)MkOBJ_R(x).objRtExt : MqRuntimeGetI())
8510 #define MqRT_ON(o) ( (*o).objRtExt ? (MQ_RT)(*o).objRtExt : MqRuntimeGetI())
8511 #define MqRT_XN(x) ( MkOBJ_R(x).objRtExt ? (MQ_RT)MkOBJ_R(x).objRtExt : MqRuntimeGetI())
8512#endif
8513
8514#if META_HAS_THREAD
8515 #define MqRtSetup_SO(o) MK_RT_UNUSED MQ_RT const mqrt = MqRT_O(o)
8516 #define MqRtSetup_SX(x) MK_RT_UNUSED MQ_RT const mqrt = MqRT_X(x)
8517 #define MqRtSetup_SXN(x) MK_RT_UNUSED MQ_RT const mqrt = MqRT_XN(x)
8518 #define MqRtSetup_SON(o) MK_RT_UNUSED MQ_RT const mqrt = MqRT_ON(o)
8519
8520 #define MqRtSetup_O(o) MK_RT_UNUSED MQ_RT const mqrt = MqRT_O(o) ; MkRtSetup_O(o)
8521 #define MqRtSetup_X(x) MK_RT_UNUSED MQ_RT const mqrt = MqRT_X(x) ; MkRtSetup_X(x)
8522 #define MqRtSetup_XN(x) MK_RT_UNUSED MQ_RT const mqrt = MqRT_XN(x) ; MkRtSetup_XN(x)
8523 #define MqRtSetup_ON(o) MK_RT_UNUSED MQ_RT const mqrt = MqRT_ON(o) ; MkRtSetup_ON(o)
8524 #define MqRtSetup_NULL MK_RT_UNUSED MQ_RT const mqrt = MqRuntimeGetI() ; MkRtSetupFromRtExt(mqrt)
8525
8526 #define MqRtSetup_NULL_RT MK_RT_UNUSED MQ_RT const mqrt = MqRuntimeGetI() ; MkRtSetup_NULL_RT
8527 #define MqRtSetup_X_RT(x) MK_RT_UNUSED MQ_RT const mqrt = MqRT_X(x) ; MkRtSetup_X_RT(x)
8528 #define MqRtSetup_XN_RT(x) MK_RT_UNUSED MQ_RT const mqrt = MqRT_XN(x) ; MkRtSetup_XN_RT(x)
8529 #define MqRtSetup_O_RT(o) MK_RT_UNUSED MQ_RT const mqrt = MqRT_O(o) ; MkRtSetup_O_RT(o)
8530 #define MqRtSetup_ON_RT(o) MK_RT_UNUSED MQ_RT const mqrt = MqRT_ON(o) ; MkRtSetup_ON_RT(o)
8531#else
8532 #define MqRtSetup_SO(o)
8533 #define MqRtSetup_SX(x)
8534 #define MqRtSetup_SXN(x)
8535 #define MqRtSetup_SON(o)
8536 #define MqRtSetup_NULL_RT
8537
8538 #define MqRtSetup_O(o)
8539 #define MqRtSetup_X(x)
8540 #define MqRtSetup_XN(x)
8541 #define MqRtSetup_ON(o)
8542 #define MqRtSetup_NULL
8543
8544 #define MqRtSetup_XN_RT(x)
8545 #define MqRtSetup_O_RT(o)
8546 #define MqRtSetup_ON_RT(o)
8547#endif
8548
8550__parser__(ignore)
8552
8554__parser__(ignore)
8555MQ_EXTERN MQ_RT MK_DECL MqRuntimeInit ( MK_RT const mkrt, MQ_RT const mqrt );
8556
8558__parser__(ignore)
8559mk_inline MQ_RT MqRuntimeGetI ( void )
8560{
8561 return __MkCheckX(MqRuntimeC,&MqRuntimeRLS) ? MqRT : MqRuntimeInit( MkRuntimeGet(), MqRT );
8562}
8563
8564/* ####################################################################### */
8565/* ### ### */
8566/* ### P A C K A G E - A P I ### */
8567/* ### ### */
8568/* ####################################################################### */
8569
8611
8612// #######################################################################
8613// -----------------------------------------------------------------------
8631
8632__parser__(global=doc-force:MqMsgque:Item);
8633
8635
8636// #######################################################################
8637// -----------------------------------------------------------------------
8645__parser__(global=doc-force:MqMsgque:Main);
8646__parser__push__(doc=Main,class=MqMsgque);
8647
8655__parser__(hide,template-require,class=MqMsgque)
8656MQ_EXTERN void MK_DECL MqMain (
8657 void * code
8658);
8659
8660__parser__pop__;
8661
8663
8664// #######################################################################
8665// -----------------------------------------------------------------------
8670
8671__parser__push__(doc=Help,class=MqMsgque);
8672
8684 MK_STRN tool
8685);
8686
8689 void
8690);
8691
8692__parser__pop__;
8693
8695
8696// #######################################################################
8697// -----------------------------------------------------------------------
8705
8706__parser__push__(doc=Init,class=MqMsgque);
8707
8709__parser__(ignore)
8711
8728
8744 MK_BAC bfl __parser__(argument,default=NULL)
8745);
8746
8751 MK_STRN arg0,
8752 ...
8753);
8754
8757 MK_STRN arg0,
8758 va_list var_list
8759);
8760
8767 void
8768);
8769
8770__parser__pop__;
8771
8773
8774// #######################################################################
8775// -----------------------------------------------------------------------
8779
8780// #######################################################################
8781// -----------------------------------------------------------------------
8785__parser__(global=doc-force:MqMsgque:Enum:local);
8786
8787// BEGIN-ClassInline - created by 'cls_MqS.tcl -i NHI1_HOME/theLink/libmqmsgque/.libmqmsgque.meta' - DO NOT change
8788// ClassInline --------------------------------------------------------------
8789
8793
8794__parser__push__(doc=Introspection,class=MqContextC,no-rpc,null-return-allow,flags=new);
8795
8800 return (MQ_CTX)MqContextC_TT->instances;
8801}
8802
8805 return (MQ_CTX)MqContextC_X2obj(ctx)->obj_protect.next;
8806}
8807
8810 return (MQ_CTX)MqContextC_X2obj(ctx)->obj_protect.prev;
8811}
8812
8814
8816
8817// ClassInline --------------------------------------------------------------
8818
8822
8823__parser__push__(doc=Introspection,class=MqDumpC,no-rpc,null-return-allow,flags=new);
8824
8829 return (MQ_DMP)MqDumpC_TT->instances;
8830}
8831
8834 return (MQ_DMP)MqDumpC_X2obj(dmp)->obj_protect.next;
8835}
8836
8839 return (MQ_DMP)MqDumpC_X2obj(dmp)->obj_protect.prev;
8840}
8841
8843
8845
8846// ClassInline --------------------------------------------------------------
8847
8851
8852__parser__push__(doc=Introspection,class=MqFactoryC,no-rpc,null-return-allow,flags=new);
8853
8858 return (MQ_FCT)MqFactoryC_TT->instances;
8859}
8860
8863 return (MQ_FCT)MqFactoryC_X2obj(fct)->obj_protect.next;
8864}
8865
8868 return (MQ_FCT)MqFactoryC_X2obj(fct)->obj_protect.prev;
8869}
8870
8872
8874
8875// END-ClassInline - created by 'cls_MqS.tcl -i NHI1_HOME/theLink/libmqmsgque/.libmqmsgque.meta' - DO NOT change
8876
8877// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
8878
8881
8882__parser__push__(doc=Log,doc-index=LogApi);
8883
8889 MQ_CTXN const ctx
8890) {
8891 MK_ATTR_HDL_CHECK(ctx);
8892 return (MQ_IS_SERVER (ctx) ? "SERVER" : "CLIENT");
8893}
8894
8900 MQ_CTXN ctx
8901) {
8902 MK_ATTR_HDL_CHECK(ctx);
8903 return (MQ_IS_PARENT (ctx) ? "PARENT" : "CHILD");
8904}
8905
8907
8909
8910// end c++ save definition
8912
8913// vim:nowrap
MK_ERR MkErrorDEFAULT(MK_OBJN const fmtobj)
void(* MkMarkF)(MK_RT const mkrt, MK_PTR data)
#define MK_DECL
#define mk_inline
MkErrorE
MkNativeIsE
MkTypeE
MK_NATIVE_IS_STRING
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
signed char MK_BYT
MK_STRB const * MK_FST
char MK_STRB
MK_PTRB * MK_CBP
unsigned char MK_BINB
MK_STRB * MK_STR
void * MK_NAT_LIST
unsigned char MK_BOL
int64_t MK_WID
signed short MK_SRT
long MK_SIZE
MK_PTRB * MK_CCP
long MK_LONG
double MK_DBL
time_t MK_TIME_T
MK_BINB const * MK_BINN
signed int MK_INT
int MK_DBG
#define __MkCheckX(cls, x)
#define MkSanitizeCheck(_root, _m)
bool MkObjCheck(MK_MNGN mng)
#define MkOBJ(x)
MK_STRN MkSysStringGetNoNULL(MK_STRN str)
MK_RT MkRuntimeGet(void)
#define MK_RT_ATTR_RUNTIME
#define MK_RT_ARGS
#define MK_RT_ATTR_HDL
MK_ERR MqContextErrorDEFAULT(MQ_CTXN const fmtobj)
helper used to access ErrorDEFAULT from MqContextC
Definition msgque_mq.h:4090
#define MqContextC_X2obj(x)
Definition msgque_mq.h:3841
bool MqCtxCheck(MK_MNGN mng)
check MqContextS%->Mk{ObjectS::signature} …
Definition msgque_mq.h:3890
struct MqCtxTypeS * MQ_CTXT
object context type datatype, use &XX->type to cast to MK_TYP
Definition msgque_mq.h:749
#define MqContextC_TT
instance-type as common-instance-type, useable in a class-macro as: class##_TT …
Definition msgque_mq.h:3857
MQ_CTX MqCtx(MK_MNG mng)
cast a unknown-object into an MqContextS pointer or NULL if not possible
Definition msgque_mq.h:3909
MQ_CTXN MqCtxN(MK_MNGN mng)
(const) cast a unknown-object into an MqContextS pointer or NULL if not possible
Definition msgque_mq.h:3916
MQ_EXTERN MQ_FCT const MqClassFactoryGet(MQ_CTXN const ctx) MK_ATTR_HDL
get the MqFactoryC used by the MqContextC
MQ_EXTERN MK_STRN MqClassIdentGet(MQ_CTXN const ctx) MK_ATTR_HDL
get the application-identification …
MQ_EXTERN enum MkErrorE MqClassIdentSet_RT(MK_RT const mkrt, MQ_CTX const ctx, MK_STRN ident)
link the MqContextC to a new MqFactoryC identified by ident
MQ_EXTERN enum MkErrorE MqClassFactorySet_RT(MK_RT const mkrt, MQ_CTX const ctx, MQ_FCT const item)
link the MqContextC to a new MqFactoryC
MQ_EXTERN MK_STRN MqClassOriginalIdentGet(MQ_CTXN const ctx) MK_ATTR_HDL
get the MqFactoryS::originalIdent from the MqContextC
enum MkErrorE(* MqTokenF)(MK_RT const mkrt, MQ_CTX const ctx, MK_PTR const data)
prototype for an object method function …
Definition msgque_mq.h:911
void(* MqDataFreeF)(MK_RT const mkrt, MQ_CTX const ctx, MK_PTR *dataP)
prototype for a free additional token data function …
Definition msgque_mq.h:925
void(* MqDataCopyF)(MK_RT const mkrt, MQ_CTX const ctx, MK_PTR *dataP)
prototype for a copy additional token data function …
Definition msgque_mq.h:937
MK_ATTR_HDL MK_STRN MqConfigGetName(MQ_CTXN const ctx)
get the name of the context object
Definition msgque_mq.h:7692
MQ_EXTERN enum MkErrorE MqConfigGetIoTcpL(MQ_CTX const ctx, MK_BFL *vals_out) MK_ATTR_HDL
get the configuration-data of the tcp-client-server-link as MkBufferListC …
#define MQ_IS_SLAVE(ctx)
Definition msgque_mq.h:2345
MQ_EXTERN config_t * MqConfigGetConfigFile(MQ_CTX const ctx) MK_ATTR_HDL
get the config-file handle used for libconfig API funtions
MK_ATTR_HDL MK_STRN MqConfigGetStorage(MQ_CTXN const ctx)
get the storage of the context object
Definition msgque_mq.h:7728
MK_ATTR_HDL MK_STRN MqConfigGetPostfix(MQ_CTXN const ctx)
get the MqConfigS::postfix
Definition msgque_mq.h:7716
MQ_EXTERN enum MkErrorE MqConfigGetIoTcp(MQ_CTX const ctx, MK_STRN *host_out, MK_STRN *port_out, MK_STRN *myhost_out, MK_STRN *myport_out) MK_ATTR_HDL
get the configuration-data of the tcp-client-server-link …
MK_ATTR_HDL MK_INT MqConfigGetPkgsize(MQ_CTXN const ctx)
get the maximun size of a BDY package
Definition msgque_mq.h:7750
MK_ATTR_HDL MK_TIME_T MqConfigGetTimeout(MQ_CTXN const ctx)
get the timeout value of the context object
Definition msgque_mq.h:7761
MQ_EXTERN config_setting_t * MqConfigGetConfigRoot(MQ_CTX const ctx) MK_ATTR_HDL
get the config-root handle used for libconfig API funtions
#define MQ_GET_PARENT(ctx)
Definition msgque_mq.h:2349
#define MQ_IS_PARENT(ctx)
Definition msgque_mq.h:2344
MK_ATTR_HDL MK_STRN MqConfigGetPrefix(MQ_CTXN const ctx)
get the MqConfigS::prefix
Definition msgque_mq.h:7704
MK_ATTR_HDL MK_INT MqConfigGetBuffersize(MQ_CTXN const ctx)
get the minimum of the read/send buffersize of the socket
Definition msgque_mq.h:7739
MK_ATTR_HDL bool MqConfigGetIsServer(MQ_CTX const ctx)
does the context object is a server ?
Definition msgque_mq.h:7649
MK_ATTR_HDL bool MqConfigGetIsString(MQ_CTX const ctx)
does the context object is using the string-mode ?
Definition msgque_mq.h:7680
MK_ATTR_HDL bool MqConfigGetIsParent(MQ_CTX const ctx)
does the context object is a parent ? An objext is a parent id the MqConfigS::parent attribute is NUL...
Definition msgque_mq.h:7670
MK_ATTR_HDL MK_STRN MqConfigGetIoUds(MQ_CTXN const ctx)
return the MqIoUdsConfigS
Definition msgque_mq.h:7773
#define MQ_IS_SERVER(ctx)
extract boolean information from context
Definition msgque_mq.h:2339
MK_ATTR_HDL enum MqIdentE MqConfigGetIdentFrom(MQ_CTX const ctx)
get the MqConfigS::identFrom
Definition msgque_mq.h:7659
MK_ATTR_HDL enum MqStatusIsEF MqConfigGetStatusIs(MQ_CTX const ctx)
return the MqContextS::statusIs value
Definition msgque_mq.h:7854
#define MQ_IS_MASTER(ctx)
Definition msgque_mq.h:2346
MK_ATTR_HDL enum MqStartE MqConfigGetStartAs(MQ_CTX const ctx)
return the MqConfigS::startAs value
Definition msgque_mq.h:7846
MK_ATTR_HDL MQ_SOCK_HDL MqConfigGetIoPipe(MQ_CTX const ctx)
return the MqIoPipeConfigS
Definition msgque_mq.h:7838
MQ_EXTERN enum MkErrorE MqConfigSetConfigFile_RT(MK_RT const mkrt, MQ_CTX const ctx, MK_STRN const filename)
set the config-file and parse for well-known config-items
MQ_EXTERN void MqConfigSetServerSetup_RT(MK_RT const mkrt, MQ_CTX const ctx, MqTokenF fCall, MK_CBP callback, MqDataFreeF fFree, MqDataCopyF fCopy)
set the MqSetupS::ServerSetup
MQ_EXTERN void MqConfigSetBgError_RT(MK_RT const mkrt, MQ_CTX const ctx, MqTokenF fCall, MK_CBP callback, MqDataFreeF fFree, MqDataCopyF fCopy)
set the MqSetupS::BgError
MQ_EXTERN void MqConfigSetServerCleanup_RT(MK_RT const mkrt, MQ_CTX const ctx, MqTokenF fCall, MK_CBP callback, MqDataFreeF fFree, MqDataCopyF fCopy)
set the MqSetupS::ServerCleanup
MQ_EXTERN void MqConfigSetEvent_RT(MK_RT const mkrt, MQ_CTX const ctx, MqTokenF fEvent, MK_CBP data, MqDataFreeF fFree, MqDataCopyF fCopy)
set the MqSetupS::Event
MQ_EXTERN void MqConfigDup_RT(MK_RT const mkrt, MQ_CTX const to, MQ_CTX const from)
copy the MqContextS::config data
MQ_EXTERN void MqSetupDup_RT(MK_RT const mkrt, MQ_CTX const to, MQ_CTXN const from)
copy the MqContextS::setup data …
MQ_EXTERN void MqConfigReset_RT(MK_RT const mkrt, MQ_CTX const ctx)
clean the MqContextS::config data
enum MkErrorE(* MqCreateF)(MK_RT const mkrt, MQ_CTX const ctx, MK_BFL const args)
the prototype for the ContextCreate function …
Definition msgque_mq.h:1152
void(* MqDeleteF)(MQ_CTX const ctx)
the prototype for a ContextDelete function …
Definition msgque_mq.h:1170
MQ_EXTERN enum MkErrorE MqConfigSetDaemon_RT(MK_RT const mkrt, MQ_CTX const ctx, MK_STRN pidfile)
start the server-context as daemon …
MQ_EXTERN void MqConfigSetTimeout(MQ_CTX const ctx, MK_TIME_T data) MK_ATTR_HDL
set the MqIoConfigS::timeout value
MQ_EXTERN enum MkErrorE MqConfigSetIoPipe_RT(MK_RT const mkrt, MQ_CTX const ctx, MQ_SOCK_HDL fh)
set the pipe configuration data …
MQ_EXTERN void MqConfigSetIsServer(MQ_CTX const ctx, bool data) MK_ATTR_HDL
set the MqSetupS::isServer value
MQ_EXTERN void MqConfigSetPrefix_RT(MK_RT const mkrt, MQ_CTX const ctx, MK_STRN data)
set the server-part (1) of the application-identifer MqConfigS::dispname …
MQ_EXTERN void MqConfigSetStorage_RT(MK_RT const mkrt, MQ_CTX const ctx, MK_STRN data)
set the Storage value and cleanup old value
MQ_EXTERN void MqConfigSetAllTimeout(MQ_CTX const ctx, MK_TIME_T data) MK_ATTR_HDL
set the MqIoConfigS::timeout value
MQ_EXTERN enum MkErrorE MqConfigSetIoUds_RT(MK_RT const mkrt, MQ_CTX const ctx, MK_STRN file)
configure a context to use a uds-client-server-link …
MQ_EXTERN enum MkErrorE MqConfigSetIoTcpL_RT(MK_RT const mkrt, MQ_CTX const ctx, MK_BFL const vals)
configure a context to use a tcp-client-server-link …
MQ_EXTERN void MqConfigSetIsString(MQ_CTX const ctx, bool data) MK_ATTR_HDL
set the MqConfigS::native value 'S'string or 'L'owEndian or 'B'igEndian
MQ_EXTERN void MqConfigSetName_RT(MK_RT const mkrt, MQ_CTX const ctx, MK_STRN data)
set the MqConfigS::dispname value and cleanup old value
MQ_EXTERN enum MkErrorE MqConfigSetIoTcp_RT(MK_RT const 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 …
MQ_EXTERN void MqConfigSetIgnoreExit(MQ_CTX const ctx, bool data) MK_ATTR_HDL
set the MqSetupS::ignoreExit value
MQ_EXTERN void MqConfigSetBuffersize(MQ_CTX const ctx, MK_INT data) MK_ATTR_HDL
set the MqIoConfigS::buffersize value
MQ_EXTERN bool MqConfigCheckStartAs(MQ_CTX const ctx, enum MqStartE data) MK_ATTR_HDL
check if MqConfigS::startAs can be set to data
MQ_EXTERN void MqConfigSetPkgsize(MQ_CTX const ctx, MK_INT data) MK_ATTR_HDL
set the MqIoConfigS::pkgsize value
MQ_EXTERN void MqConfigSetPrefixWithNoLock_RT(MK_RT const mkrt, MQ_CTX const ctx, MK_STRN data)
set the MqConfigS::prefix with low-priority …
MQ_EXTERN void MqConfigSetPostfix_RT(MK_RT const mkrt, MQ_CTX const ctx, MK_STRN data)
set the client-part (2) of the application-identifer MqConfigS::dispname …
MQ_EXTERN void MqConfigSetIdentFrom(MQ_CTX const ctx, enum MqIdentE data) MK_ATTR_HDL
set the MqConfigS::identFrom value
MQ_EXTERN enum MkErrorE MqConfigSetStartAsString(MQ_CTX const ctx, MK_STRN data) MK_ATTR_HDL
set the MqConfigS::startAs value using string default, thread, fork or spawn
MQ_EXTERN enum MkErrorE MqConfigSetStartAs(MQ_CTX const ctx, enum MqStartE data) MK_ATTR_HDL
set the MqConfigS::startAs value
MQ_EXTERN enum MkErrorE MqConfigSetAllDebug_RT(MK_RT const mkrt, MQ_CTX const ctx, MK_INT const data)
set the MkRuntimeS::debug value
MQ_EXTERN void MqEnvRestore(MQ_CTX ctx) MK_ATTR_HDL
restore the service-environment
MQ_EXTERN void MqEnvProtect_RT(MK_RT const mkrt, MQ_CTX ctx)
protect the service-environment
MQ_EXTERN void MqEnvLog_RT(MK_RT const mkrt, MQ_ENVN const env, MK_OBJN fmtobj, MK_DBG const debug, MK_STRN const callfunc, MK_INT const lvl, MK_STRN const label)
log the MqEnvS …
MQ_EXTERN enum MkErrorE MqContextErrorCopy_RT(MK_RT const mkrt, MQ_CTXN const targetCtx, MQ_CTXN const sourceCtx)
copy a MkErrorS from the sourceCtx to the targetCtx …
MQ_EXTERN enum MkErrorE MqContextErrorMove_RT(MK_RT const mkrt, MQ_CTXN const targetCtx, MQ_CTXN const sourceCtx)
move a MkErrorS from the sourceCtx to the targetCtx …
MQ_EXTERN enum MkErrorE MqSendVL2_RT(MK_RT const mkrt, MQ_CTX const ctx, MK_STRN cstr, va_list var_list)
va_list version of MqSend …
MQ_EXTERN enum MkErrorE MqSend_RT(MK_RT const mkrt, MQ_CTX const ctx, MK_STRN cstr,...)
user friendly replacement for the MqContextC_SendApi_C_API …
MQ_CTX MqContextInstances(void)
get head-instance from linked-list of MqContextS type …
Definition msgque_mq.h:8798
MQ_CTX MqContextNext(MQ_CTX const ctx)
get next instance from linked-list of MqContextS type
Definition msgque_mq.h:8804
MQ_CTX MqContextPrev(MQ_CTX const ctx)
get previous instance from linked-list of MqContextS type
Definition msgque_mq.h:8809
MQ_EXTERN void MqContextLogLink_RT(MK_RT const mkrt, MQ_CTXN ctx, MK_OBJN const fmtobj, MK_DBG const debug, MK_STRN const callfunc, MK_INT const lvl)
log the MqContextC part MqLinkS …
MQ_EXTERN void MqContextLogDebug(MQ_CTX const ctx)
MQ_EXTERN void MqContextLogSetup_RT(MK_RT const mkrt, MQ_CTXN const ctx, MK_OBJN fmtobj, MK_DBG const debug, MK_STRN const callfunc, MK_INT const lvl)
log the MqContextC part MqSetupS …
MQ_EXTERN void MqContextLogEnv_RT(MK_RT const mkrt, MQ_CTX const ctx, MK_OBJ const fmtobj, MK_DBG const debug, MK_STRN const callfunc, MK_INT const lvl)
log the MqContextC part MqEnvS …
MK_ATTR_HDL MK_STRN MqLogParentOrChild(MQ_CTXN ctx)
is ctx a PARENT or a CHILD ? …
Definition msgque_mq.h:8899
MQ_EXTERN void MqContextLogType_RT(MK_RT const mkrt, MQ_CTX const ctx, MK_OBJ fmtobj, MK_DBG const debug, MK_STRN const callfunc, MK_INT const lvl)
log the MqContextC part MkTypeS …
MK_ATTR_HDL MK_STRN MqLogServerOrClient(MQ_CTXN const ctx)
is ctx a SERVER or a CLIENT ? …
Definition msgque_mq.h:8888
MQ_EXTERN void MqContextLog_RT(MK_RT const mkrt, MQ_CTXN const ctx, MK_OBJN fmtobj, MK_DBG const debug, MK_STRN const callfunc, MK_INT const lvl)
log the MqContextC …
MQ_EXTERN void MqContextLogConfig_RT(MK_RT const mkrt, MQ_CTXN const ctx, MK_OBJN fmtobj, MK_DBG const debug, MK_STRN const callfunc, MK_INT const lvl)
log the MqContextC part MqConfigS …
MQ_EXTERN void MqContextLogShort_RT(MK_RT const mkrt, MQ_CTXN const ctx, MK_OBJN fmtobj, MK_DBG const debug, MK_STRN const callfunc, MK_INT const lvl, MK_STRN const label)
log the MqContextC with less info then ContextLog …
MQ_EXTERN enum MkErrorE MqProcessEvent_RT(MK_RT const mkrt, MQ_CTX const ctx, enum MqWaitOnEventE const wait, MK_TIME_T timeout)
enter the event-loop and wait for an incoming service-request. …
MQ_EXTERN void MqContextMark_RT(MK_RT const mkrt, MQ_CTX const ctx)
Mark objects as used to avoid the freeing of used external memory in an external Garbage-Collection …
MQ_EXTERN enum MkErrorE MqCheckForLeftOverArguments_RT(MK_RT const mkrt, MQ_CTX const ctx, MK_BFLN args)
check for left over arguments from parameter args of LinkCreate …
MQ_CTX MqGetRoot(MQ_CTX ctx)
get the Root (toplevel initial context)
Definition msgque_mq.h:4111
MQ_EXTERN void MqExit_RT(MK_RT const mkrt, MQ_CTX const ctx, MK_STRN const callfunc, MK_STRN const callfile, MK_INT const callline)
delete the context and exit the current process or thread …
MQ_EXTERN MK_BUF MqContextGetBuffer_RT(MK_RT const mkrt, MQ_CTX const ctx)
get the MqContextS::ctxbuf object
MQ_EXTERN MK_STRN MqContextToString_RT(MK_RT const mkrt, MQ_CTXN const ctx)
toString slot of MqContextC …
MQ_CTXN MqGetRootN(MQ_CTXN ctx)
(const) get the Root (toplevel initial context)
Definition msgque_mq.h:4117
MQ_EXTERN enum MkErrorE MqProxyPackage_RT(MK_RT const mkrt, MQ_CTX const sourceCtx, MQ_CTX const targetCtx, MQ_DMP const dump)
copy all package-items from the sourceCtx to the targetCtx …
MQ_EXTERN enum MkErrorE MqProxyForward_RT(MK_RT const 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 …
MQ_EXTERN enum MkErrorE MqProxyItem_RT(MK_RT const mkrt, MQ_CTX const sourceCtx, MQ_CTX const targetCtx)
Copy a single-data-item from the sourceCtx to the targetCtx.
MQ_EXTERN enum MkErrorE MqReadALL_RT(MK_RT const mkrt, MQ_CTX const ctx, MK_BFL *const val_inout)
get a temporary MkBufferListC from all data in the read-data-package …
MQ_EXTERN enum MkErrorE MqReadS_RT(MK_RT const mkrt, MQ_CTX const ctx, MK_SRT *const val_out)
read a PRIMITIVE TYPE from the read-data-package …
MQ_EXTERN enum MkErrorE MqReadO_RT(MK_RT const mkrt, MQ_CTX const ctx, MK_BOL *const val_out)
read a PRIMITIVE TYPE from the read-data-package …
MQ_EXTERN enum MkErrorE MqReadL_RT(MK_RT const mkrt, MQ_CTX const ctx, MK_BFL *const val_out)
get a temporary MkBufferListC from next list-item in the read-data-package …
MQ_EXTERN enum MkErrorE MqReadC_RT(MK_RT const mkrt, MQ_CTX const ctx, MK_STRN *const val_out)
read a PRIMITIVE TYPE from the read-data-package …
MQ_EXTERN enum MkErrorE MqReadF_RT(MK_RT const mkrt, MQ_CTX const ctx, MK_FLT *const val_out)
read a PRIMITIVE TYPE from the read-data-package …
MQ_EXTERN enum MkErrorE MqReadU_RT(MK_RT const mkrt, MQ_CTX const ctx, MK_BUF *const val_out)
get a temporary MkBufferC from the read-data-package …
MQ_EXTERN enum MkErrorE MqReadY_RT(MK_RT const mkrt, MQ_CTX const ctx, MK_BYT *const val_out)
read a PRIMITIVE TYPE from the read-data-package …
MQ_EXTERN enum MkErrorE MqReadLONG_RT(MK_RT const mkrt, MQ_CTX const ctx, MK_LONG *const val_out)
read the long native object from the read-data-package
MQ_EXTERN enum MkErrorE MqReadI_RT(MK_RT const mkrt, MQ_CTX const ctx, MK_INT *const val_out)
read a PRIMITIVE TYPE from the read-data-package …
MQ_EXTERN enum MkErrorE MqReadLIST_RT(MK_RT const mkrt, MQ_CTX const ctx, MK_NAT_LIST *const val_out)
get all arguments as native list …
MQ_EXTERN enum MkErrorE MqReadW_RT(MK_RT const mkrt, MQ_CTX const ctx, MK_WID *const val_out)
read a PRIMITIVE TYPE from the read-data-package …
MQ_EXTERN enum MkErrorE MqReadNEXT_RT(MK_RT const mkrt, MQ_CTX const ctx, MK_NAT_OBJECT *const val_out)
get the next argument as native object …
MQ_EXTERN enum MkErrorE MqReadB_RT(MK_RT const mkrt, MQ_CTX const ctx, MkBinaryR *const val_out)
generic function to read an MK_BIN object from the read-data-package object …
MQ_EXTERN enum MkErrorE MqReadD_RT(MK_RT const mkrt, MQ_CTX const ctx, MK_DBL *const val_out)
read a PRIMITIVE TYPE from the read-data-package …
MQ_EXTERN enum MkErrorE MqReadL_START_RT(MK_RT const mkrt, MQ_CTX const ctx, MK_BUF buf)
start to extract a list-items from the read-data-package. …
MQ_EXTERN enum MkErrorE MqReadT_END_RT(MK_RT const mkrt, MQ_CTX const ctx)
finish to extract a longterm-transaction-item from the read-data-package. …
MQ_EXTERN enum MkErrorE MqReadL_END_RT(MK_RT const mkrt, MQ_CTX const ctx)
finish to extract a list-items from the read-data-package. …
MQ_EXTERN enum MkErrorE MqReadT_START_RT(MK_RT const mkrt, MQ_CTX const ctx)
start to extract a longterm-transaction-item from the read-data-package. …
MQ_EXTERN enum MqTransTypeE MqReadGetTransType(MQ_CTX const ctx) MK_ATTR_HDL
return the TransactionType identifer …
MQ_EXTERN void MqReadDbg_RT(MK_RT const mkrt, MQ_CTX const ctx)
MQ_EXTERN enum MqHandShakeE MqReadGetHandShake(MQ_CTX const ctx) MK_ATTR_HDL
return the HandShake identifer …
MQ_EXTERN bool MqReadItemExists(MQ_CTX const ctx) MK_ATTR_HDL
check if an item exists in the read-data-package …
MQ_EXTERN MK_NUM MqReadGetNumItems(MQ_CTX const ctx) MK_ATTR_HDL
get the number of items left in the read-data-package …
MQ_EXTERN enum MkErrorE MqReadUndo_RT(MK_RT const mkrt, MQ_CTX const ctx)
undo the last MqContextC READ API function call …
MQ_EXTERN enum MkTypeE MqReadGetNextType(MQ_CTX const ctx) MK_ATTR_HDL
get the type (MkTypeE) of the next Item in the read-data-buffer or "0" if not available
MQ_EXTERN enum MkErrorE MqRouteDelete_RT(MK_RT const mkrt, MQ_CTX ctx, MK_STRN route, MK_STRN service, bool overwrite)
delete a routing-link created with RouteCreate
MQ_EXTERN enum MkErrorE MqRouteGetPath_RT(MK_RT const mkrt, MQ_CTX const ctx, MK_STRN *path_out)
return the absolut route-connection-string up to the current ctx …
MQ_EXTERN MQ_CTX_A MqRouteResolve_RT(MK_RT const mkrt, MQ_CTX const ctx, MK_STRN const ident, MK_NUM const retnum)
return a list of all context belonging to ident …
MQ_EXTERN enum MkErrorE MqRouteGetTree_RT(MK_RT const mkrt, MQ_CTX const ctx, MK_BFL *treeP_out)
create an overview about all available routing-target and services …
MQ_EXTERN enum MkErrorE MqRouteCreate_RT(MK_RT const mkrt, MQ_CTX ctx, MK_STRN route, MK_STRN service, bool overwrite)
create/delete a routing-link between context an a service using route
MQ_EXTERN enum MkErrorE MqRouteTraverse_RT(MK_RT const mkrt, MQ_CTX ctx, MK_STRN service, MK_BAC args)
traverse a tree down and call service if available.
MQ_EXTERN enum MkErrorE MqSendLONG_RT(MK_RT const mkrt, MQ_CTX const ctx, MK_LONG const val)
send the long native object to the send-data-package
MQ_EXTERN enum MkErrorE MqSendW_RT(MK_RT const mkrt, MQ_CTX const ctx, MK_WID const val)
append a native PRIMITIVE TYPE value to the send-data-package. …
MQ_EXTERN enum MkErrorE MqSendB_RT(MK_RT const mkrt, MQ_CTX const ctx, MkBinaryR const val)
append a MK_BIN object to the send-data-package. …
MQ_EXTERN enum MkErrorE MqSendL_FLAT_RT(MK_RT const mkrt, MQ_CTX const ctx, MK_BFL const val)
append a MkBufferListC object as flat list of items to the send-data-package object …
MQ_EXTERN enum MkErrorE MqSendL_RT(MK_RT const mkrt, MQ_CTX const ctx, MK_BFL const val)
append a MkBufferListC object to the send-data-package object …
MQ_EXTERN enum MkErrorE MqSendI_RT(MK_RT const mkrt, MQ_CTX const ctx, MK_INT const val)
append a native PRIMITIVE TYPE value to the send-data-package. …
MQ_EXTERN enum MkErrorE MqSendU_RT(MK_RT const mkrt, MQ_CTX const ctx, MK_BUF const val)
append a MkBufferC object to the send-data-package object …
MQ_EXTERN enum MkErrorE MqSendO_RT(MK_RT const mkrt, MQ_CTX const ctx, MK_BOL const val)
append a native PRIMITIVE TYPE value to the send-data-package. …
MQ_EXTERN enum MkErrorE MqSendVL_RT(MK_RT const 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 …
MQ_EXTERN enum MkErrorE MqSendF_RT(MK_RT const mkrt, MQ_CTX const ctx, MK_FLT const val)
append a native PRIMITIVE TYPE value to the send-data-package. …
MQ_EXTERN enum MkErrorE MqSendS_RT(MK_RT const mkrt, MQ_CTX const ctx, MK_SRT const val)
append a native PRIMITIVE TYPE value to the send-data-package. …
MQ_EXTERN enum MkErrorE MqSendD_RT(MK_RT const mkrt, MQ_CTX const ctx, MK_DBL const val)
append a native PRIMITIVE TYPE value to the send-data-package. …
MQ_EXTERN enum MkErrorE MqSendC_RT(MK_RT const mkrt, MQ_CTX const ctx, MK_STRN const val)
append a native PRIMITIVE TYPE value to the send-data-package. …
MQ_EXTERN enum MkErrorE MqSendY_RT(MK_RT const mkrt, MQ_CTX const ctx, MK_BYT const val)
append a native PRIMITIVE TYPE value to the send-data-package. …
MQ_EXTERN enum MkErrorE MqSendLTR_RT(MK_RT const mkrt, MQ_CTX const ctx, MQ_LTR const transLId)
set the Longterm-Transaction-Id (LTT) in the send-data-package …
MQ_EXTERN enum MkErrorE MqSendV_RT(MK_RT const mkrt, MQ_CTX const ctx, MK_FST const printfmt,...)
append a vararg string to the send-data-package object …
MQ_EXTERN enum MkErrorE MqSendSTART_RT(MK_RT const mkrt, MQ_CTX const ctx)
initialize the send-data-package. …
MQ_EXTERN enum MkErrorE MqSendEND_AND_TRANSACTION_RT(MK_RT const 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 …
MQ_EXTERN enum MkErrorE MqSendEND_RT(MK_RT const mkrt, MQ_CTX const ctx, MQ_TOK const token, MK_TIME_T timeout)
finish the send-data-block and call synchronous/asynchronous a remote-service …
MQ_EXTERN enum MkErrorE MqSendSYNC_RT(MK_RT const mkrt, MQ_CTX const ctx)
The is used to garantee that all pending asynchronous-service-call are processed. …
MQ_EXTERN enum MkErrorE MqSendEND_AND_CALLBACK_RT(MK_RT const 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...
MQ_EXTERN enum MkErrorE MqSendEND_AND_WAIT_RT(MK_RT const 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…
MQ_EXTERN enum MkErrorE MqSendEND_AND_SUB_RT(MK_RT const 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...
MQ_EXTERN enum MkErrorE MqSendL_START_RT(MK_RT const mkrt, MQ_CTX const ctx)
start to append an embedded body-list-item to the send-data-package. …
MQ_EXTERN enum MkErrorE MqSendT_END_RT(MK_RT const mkrt, MQ_CTX const ctx)
closed a longterm-transaction-item …
MQ_EXTERN enum MkErrorE MqSendT_START_RT(MK_RT const mkrt, MQ_CTX const ctx)
open a longterm-transaction-item …
MQ_EXTERN enum MkErrorE MqSendL_END_RT(MK_RT const mkrt, MQ_CTX const ctx)
finish to append an embedded body-list-item to the send-data-package. …
MQ_EXTERN enum MkErrorE MqSendSetHandShake(MQ_CTX const ctx, enum MqHandShakeE handShake) MK_ATTR_HDL
set the hand-shake of the send-data-package
MQ_EXTERN enum MkErrorE MqSendRETURN_RT(MK_RT const mkrt, MQ_CTX const ctx)
finish the send-data-block on the server and optional return the results. …
MQ_EXTERN enum MkErrorE MqSendERROR_RT(MK_RT const mkrt, MQ_CTX const ctx)
send the data from the MkErrorC to the link target . …
MQ_EXTERN enum MkErrorE MqSend_SUB_RETURN_RT(MK_RT const mkrt, MQ_CTX const ctx)
return Sub-Data-Blocks required by SendEND_AND_SUB …
MQ_EXTERN enum MkErrorE MqServiceStorage_RT(MK_RT const 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...
MK_ATTR_HDL bool MqServiceIsTransaction(MQ_CTX const ctx)
check if the ongoing-service-call belongs to a transaction …
Definition msgque_mq.h:5420
MQ_EXTERN enum MkErrorE MqServiceProxyRoundRobin_RT(MK_RT const mkrt, MQ_CTX const ctx, MQ_TOK const token, MK_STRN const ident)
create a proxy-service using Round-Robin as load-balancer …
MQ_EXTERN bool MqServiceProxyCtxExists(MQ_CTX const ctx, MQ_TOK const token, MQ_CTX const target)
check if service who belongs to token is a proxy-service
MQ_EXTERN enum MkErrorE MqServiceDelete_RT(MK_RT const mkrt, MQ_CTX const ctx, MQ_TOK const token)
delete a service. …
MQ_EXTERN MQ_TOK MqServiceGetToken(MQ_CTX const ctx) MK_ATTR_HDL
get the MqContextC_ServiceApi_Identifer from an ongoing-service-call …
MK_STRN MQ_TOK
a char[4+1] or hex[8+1] string used to unique identify a service …
Definition msgque_mq.h:5401
MqTokenF MqServiceCallbackF
The callback-function is used as a service-handle or as a event-handle…
Definition msgque_mq.h:5411
MQ_EXTERN bool MqServiceCheckToken(MQ_CTX const ctx, MQ_TOK const token) MK_ATTR_HDL
in an ongoing-service-call compare the MqContextC_ServiceApi_Identifer with token on equity …
MQ_EXTERN enum MkErrorE MqServiceCreate_RT(MK_RT const 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 …
MQ_EXTERN enum MkErrorE MqServiceProxy_RT(MK_RT const 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. …
MQ_EXTERN enum MkErrorE MqServiceProxyCtx_RT(MK_RT const mkrt, MQ_CTX const ctx, MQ_TOK const token, MQ_CTX const target)
same as ServiceProxy but use an MqContextC as input.
MQ_EXTERN enum MkErrorE MqSlaveGetProxy_RT(MK_RT const 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.
bool MqSlaveCheck(MQ_CTXN const ctx, MQ_SLAVE_ID const id)
check if slave-id is valid
Definition msgque_mq.h:7145
MQ_EXTERN enum MkErrorE MqSlaveGetFilter_RT(MK_RT const mkrt, MQ_CTX const ctx, MQ_CTX *ctx_out)
get the filter-ctx or the master-ctx …
MQ_EXTERN enum MkErrorE MqSlaveGet_RT(MK_RT const mkrt, MQ_CTX const ctx, MQ_SLAVE_ID const id, MQ_CTX *ctx_out)
get the slave-context from a master-context …
MQ_CTX MqSlaveGetMaster(MQ_CTX const ctx)
opposite function of SlaveGetFilter
Definition msgque_mq.h:7208
MQ_EXTERN enum MkErrorE MqSlaveCreate_RT(MK_RT const 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 …
bool MqSlaveIs(MQ_CTXN const ctx)
is the context a slave-context ? …
Definition msgque_mq.h:7217
MQ_EXTERN enum MkErrorE MqSlaveWorker_RT(MK_RT const 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. …
MQ_EXTERN enum MkErrorE MqSlaveDelete_RT(MK_RT const mkrt, MQ_CTX const ctx, MQ_SLAVE_ID const id)
Delete a slave object from a master/slave link identified by id. …
MQ_EXTERN enum MkErrorE MqStorageLog_RT(MK_RT const mkrt, MQ_CTX const ctx, MK_STRN const callfunc)
log the storage the status of the open transactions
MQ_EXTERN enum MkErrorE MqStorageDelete_RT(MK_RT const mkrt, MQ_CTX const ctx, MQ_LTR *transLIdP_inout)
delete the storage-row identified by the transLIdP_inout …
MQ_EXTERN enum MkErrorE MqStorageClose_RT(MK_RT const mkrt, MQ_CTX const ctx)
close the storage. …
MQ_EXTERN enum MkErrorE MqStorageCount_RT(MK_RT const mkrt, MQ_CTX const ctx, MQ_LTR *cnt_out)
count the number of storage-rows …
MQ_EXTERN enum MkErrorE MqStorageImport_RT(MK_RT const mkrt, MQ_CTX const ctx, MQ_LTR *transLIdP_inout)
import the storage-package into the read-data-package …
MQ_EXTERN enum MkErrorE MqStorageResolve_RT(MK_RT const mkrt, MQ_CTX const ctx, MQ_CTX *otherCtxP_out, MQ_LTR *otherLIdP_out)
extract the context->link.protect.rmtTransLId entry from the database
MQ_EXTERN enum MkErrorE MqStorageOpen_RT(MK_RT const mkrt, MQ_CTX const ctx, MK_STRN const storageFile)
switch to a file-based-transaction-database …
MQ_EXTERN enum MkErrorE MqStorageDecrRef_RT(MK_RT const mkrt, MQ_CTX const ctx, MQ_LTR transLId)
decrease the internal refCount lock of the database-entry
MQ_EXTERN enum MkErrorE MqStorageExport_RT(MK_RT const mkrt, MQ_CTX const ctx, MQ_LTR *ltid_out)
export the read-data-package into the STORAGE …
MQ_EXTERN enum MkErrorE MqStorageErrCnt_RT(MK_RT const mkrt, MQ_CTX const ctx, MQ_LTR transLId, MK_INT *cnt_out)
increment and return the database row-error-count for the row defined with transLId
MQ_EXTERN enum MkErrorE MqStorageIncrRef_RT(MK_RT const mkrt, MQ_CTX const ctx, MQ_LTR transLId)
increase the internal refCount lock of the database-entry
MQ_EXTERN void MqContextDelete_RT(MK_RT const mkrt, MQ_CTX ctx)
Destructor - delete a MqContextC instance …
MQ_CTX MqContextFromHandle(MK_LONG const exporthdl)
Definition msgque_mq.h:4030
MQ_EXTERN void MqContextFree_RT(MK_RT const mkrt, MQ_CTX const ctx)
free the MqContextC object related data but do not free the toplevel object self …
MQ_EXTERN MQ_CTX MqContextCreate_RT(MK_RT const mkrt, MK_TYP type, MQ_CTX const tmpl)
create and initialize the MqContextC ...
MQ_EXTERN void MqContextSetup_RT(MK_RT const mkrt, MK_TYP type, MQ_CTX const tmpl, MQ_CTX *ctx_out)
MQ_EXTERN void MqContextInit_RT(MK_RT const 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_CTXT MqCtxTyp(MK_MNG mng)
type-check and cast a managed-pointer into an MqCtxTypeS pointer or NULL if not possible
Definition msgque_mq.h:3669
void(* MqHelpF)(MK_STRN basename)
application specific help function type …
Definition msgque_mq.h:1178
void(* MqExitF)(MK_RT const mkrt, int num)
prototype for exit a process or thread …
Definition msgque_mq.h:1186
bool MqCtxTypCheck(MK_MNGN mng)
check MqCtxTypeS%->Mk{ObjectS::signature} …
Definition msgque_mq.h:3656
MQ_EXTERN void MqCtxTypeLog_RT(MK_RT const mkrt, MQ_CTXT const ctxtype, MK_OBJ fmtobj, MK_DBG const debug, MK_STRN const callfunc, MK_INT const lvl)
log the MqCtxTypeS …
void(* MqRefCountF)(MK_RT const mkrt, MQ_CTX ctx, MK_PTR const env)
used in MqCtxTypeS::fIncrSelf and MqCtxTypeS::fDecrSelf to protect an "embedded" self on deletion
Definition msgque_mq.h:1208
void(* MqSetupF)(MQ_CTX const ctx)
used to setup (initialize) a new thread/fork/process created by libmqmsgque using the SysServer?...
Definition msgque_mq.h:1194
#define MqDumpC_TT
instance-type as common-instance-type, useable in a class-macro as: class##_TT …
Definition msgque_mq.h:7980
MQ_EXTERN void MqDumpLog_RT(MK_RT const mkrt, MQ_DMP const dmp, MK_OBJ fmtobj, MK_INT const debug, MK_STRN const callfunc, MK_INT const lvl)
log the MqDumpC …
#define MqDumpC_X2obj(x)
Definition msgque_mq.h:7964
bool MqDmpCheck(MK_MNGN mng)
check MqDumpS%->Mk{ObjectS::signature} …
Definition msgque_mq.h:8013
MQ_DMPN MqDmpN(MK_MNGN mng)
(const) cast a unknown-object into an MqDumpS pointer or NULL if not possible
Definition msgque_mq.h:8039
MQ_DMP MqDmp(MK_MNG mng)
cast a unknown-object into an MqDumpS pointer or NULL if not possible
Definition msgque_mq.h:8032
MQ_DMP MqDumpNext(MQ_DMP const dmp)
get next instance from linked-list of MqDumpS type
Definition msgque_mq.h:8833
MQ_DMP MqDumpPrev(MQ_DMP const dmp)
get previous instance from linked-list of MqDumpS type
Definition msgque_mq.h:8838
MQ_DMP MqDumpInstances(void)
get head-instance from linked-list of MqDumpS type …
Definition msgque_mq.h:8827
MQ_EXTERN void MqDumpAllocSizeSet(MQ_DMP const dump, MK_SIZE allocsize) MK_ATTR_HDL
set the allocated buffer of the MqDumpC …
MQ_EXTERN void MqDumpRmtTransLIdSet(MQ_DMP const dump, MQ_LTR rmtTransLId) MK_ATTR_HDL
set the MqEnvS::rmtTransLId …
MQ_EXTERN MK_STRN MqDumpTokenGet(MQ_DMPN const dump) MK_ATTR_HDL
return the MqContextC_ServiceApi_Identifer …
MQ_EXTERN MK_SIZE MqDumpSizeGet(MQ_DMPN const dump) MK_ATTR_HDL
report the binary data size from an MqDumpS object
MQ_EXTERN MK_SIZE MqDumpAllocSizeGet(MQ_DMPN const dump) MK_ATTR_HDL
return the allocated buffer of the MqDumpC …
MQ_EXTERN enum MqHandShakeE MqDumpHandShakeGet(MQ_DMPN const dump) MK_ATTR_HDL
return the MqHandShakeE as character …
MQ_EXTERN void MqDumpTransLIdSet(MQ_DMP const dump, MQ_LTR transLId) MK_ATTR_HDL
set the MqEnvS::transLId …
MQ_DMP MqDumpFromHandle(MK_LONG const exporthdl)
Definition msgque_mq.h:8223
MQ_EXTERN MkBinaryR MqDumpBinGet(MQ_DMPN const dump) MK_ATTR_HDL
export the binary data from an MqDumpS object
MQ_EXTERN void MqDumpDelete_RT(MK_RT const mkrt, MQ_DMP dmp)
Destructor - delete a MqDumpC instance …
MQ_EXTERN enum MkErrorE MqDumpError_RT(MK_RT const mkrt, MQ_CTX const error, MQ_DMP *const dumpP_inout)
export the context->error into the dump-package …
MQ_EXTERN enum MkErrorE MqDumpBinSet_RT(MK_RT const mkrt, MkBinaryR data, MQ_DMP *dmp_out)
create an MqDumpS object from binary data
MQ_EXTERN enum MkErrorE MqDumpImport_RT(MK_RT const mkrt, MQ_DMP const dump, MQ_CTX const ctx)
import the dump-package into the ctx-read-data-package …
MQ_EXTERN enum MkErrorE MqDumpExport_RT(MK_RT const mkrt, MQ_CTX const ctx, MQ_DMP *const dumpP_inout)
create a MqDumpC as export of the ctx-read-data-package …
bool MqEnvCheck(MK_MNGN mng)
check MqEnvS%->Mk{ObjectS::signature} …
Definition msgque_mq.h:857
MQ_ENV MqEnv(MK_MNG mng)
cast a unknown-object into an MqEnvS pointer or NULL if not possible
Definition msgque_mq.h:876
MQ_ENVN MqEnvN(MK_MNGN mng)
(const) cast a unknown-object into an MqEnvS pointer or NULL if not possible
Definition msgque_mq.h:883
MQ_EXTERN void MqErrorEnvReset(MQ_ERR const err) MK_ATTR_HDL
reset the MqErrorS::client_protect and the MqErrorS::server_protect …
bool MqErrCheck(MK_MNGN mng)
check MqErrorS%->Mk{ObjectS::signature} …
Definition msgque_mq.h:2786
MQ_ERRN MqErrN(MK_MNGN mng)
(const) cast a unknown-object into an MqErrorS pointer or NULL if not possible
Definition msgque_mq.h:2812
MQ_ERR MqErr(MK_MNG mng)
cast a unknown-object into an MqErrorS pointer or NULL if not possible
Definition msgque_mq.h:2805
void(* MqFactoryDataFreeF)(MK_RT const mkrt, MK_PTR *dataP)
prototype for a free additional factory data function
Definition msgque_mq.h:2971
#define MqFactoryC_X2obj(x)
Definition msgque_mq.h:3037
bool MqFctCheck(MK_MNGN mng)
check MqFactoryS%->Mk{ObjectS::signature} …
Definition msgque_mq.h:3086
enum MkErrorE(* MqFactoryCTorF)(MQ_RT const mqrt, MQ_CTX const tmpl, enum MqFactoryE create, MQ_FCT const fct, MQ_CTX *ctx_out)
type of a MqFactoryC constructor
Definition msgque_mq.h:2930
void(* MqFactoryDataCopyF)(MK_RT const mkrt, MK_PTR *dataP)
prototype for a copy additional factory data function
Definition msgque_mq.h:2979
void(* MqFactoryDTorF)(MK_RT const mkrt, MQ_CTX ctx, bool doFactoryCleanup, MQ_FCT const fct)
type of a MqFactoryC destructor
Definition msgque_mq.h:2961
#define MqFactoryC_TT
instance-type as common-instance-type, useable in a class-macro as: class##_TT …
Definition msgque_mq.h:3053
MQ_FCTN MqFctN(MK_MNGN mng)
(const) cast a unknown-object into an MqFactoryS pointer or NULL if not possible
Definition msgque_mq.h:3112
MQ_FCT MqFct(MK_MNG mng)
cast a unknown-object into an MqFactoryS pointer or NULL if not possible
Definition msgque_mq.h:3105
MQ_EXTERN MQ_FCT MqFactoryGetCalledL_RT(MK_RT const mkrt, MK_BFLN largs)
returns the MqFactoryC identified as first argument in the largs MkBufferListC …
MQ_EXTERN MK_PTR MqFactoryItemGetDeleteData(MQ_FCTN const fct) MK_ATTR_HDL
helper function to return MqFactoryS::Delete::data
MQ_EXTERN MK_PTR MqFactoryItemGetCreateData(MQ_FCTN const fct) MK_ATTR_HDL
helper function to return MqFactoryS::Create::data
MQ_EXTERN MK_STRN MqFactoryGetOriginalIdent(MQ_FCTN const fct) MK_ATTR_HDL
helper function to return MqFactoryS::originalIdent
MQ_EXTERN MQ_FCT MqFactoryGetCalled(MK_STRN const ident) MK_ATTR_HDL
returns the MqFactoryC identified by ident …
MQ_EXTERN MQ_FCT MqFactoryGet(MK_STRN const ident)
return the MqFactoryC
MQ_FCT MqFactoryInstances(void)
get head-instance from linked-list of MqFactoryS type …
Definition msgque_mq.h:8856
MQ_FCT MqFactoryPrev(MQ_FCT const fct)
get previous instance from linked-list of MqFactoryS type
Definition msgque_mq.h:8867
MQ_FCT MqFactoryNext(MQ_FCT const fct)
get next instance from linked-list of MqFactoryS type
Definition msgque_mq.h:8862
MQ_EXTERN enum MkErrorE MqFactoryNew_RT(MK_RT const mkrt, MQ_FCT const fct, MQ_CTX const tmpl, MQ_CTX *const val_out)
create a new MqContextC from a MqFactoryC …
MQ_EXTERN MK_STRN MqFactoryDefaultIdent(void)
return the factory-identifier of the default MqFactoryC
MQ_EXTERN MQ_FCT MqFactoryDefault(MQ_FCT const fct) MK_ATTR_HDL
set the default-attribute to the factory …
MQ_EXTERN MK_STRN MqFactoryInitialIdent(void)
return the factory-identifier of the initial MqFactoryC
MQ_EXTERN void MqFactoryLog_RT(MK_RT const mkrt, MQ_FCTN const fct, MK_OBJN fmtobj, MK_DBG const debug, MK_STRN const callfunc, MK_INT const lvl)
log the MqFactoryC …
MQ_EXTERN MQ_FCT MqFactoryInitial(MQ_FCT const fct) MK_ATTR_HDL
set the initial-attribut to fct …
MQ_EXTERN void MqFactoryLogAll_RT(MK_RT const mkrt, MK_STRN const callfunc)
log all "factories" to stderr
MQ_EXTERN MQ_FCT MqFactoryTypeAdd_RT(MK_RT const 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_EXTERN MQ_FCT MqFactoryAdd_RT(MK_RT const 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 …
MQ_FCT MqFactoryFromHandle(MK_LONG const exporthdl)
Definition msgque_mq.h:3338
MQ_EXTERN void MqFactoryDelete_RT(MK_RT const mkrt, MQ_FCT fct)
Destructor - delete a MqFactoryC instance …
MQ_EXTERN void MqFactoryFree_RT(MK_RT const mkrt, MQ_FCT const fct)
free internal factory memory and call MqFactoryDTorS::fFree + MqFactoryCTorS::fFree
MQ_EXTERN MQ_FCT MqFactoryDup2_RT(MK_RT const 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
Definition msgque_mq.h:415
#define MQ_EXTERN
static library
Definition msgque_mq.h:392
MQ_EXTERN MK_STRN MqStatusIsEF_ToString(enum MqStatusIsEF value)
return the MqStatusIsEF as string …
MQ_EXTERN enum MkErrorE MqStartE_FromInt(MK_INT const value, enum MqStartE *value_out)
return the MqStartE from integer …
#define MqContextLogShort(...)
#define MqContextLogEnv(...)
#define MqDumpLog(...)
MQ_EXTERN MK_STRN MqHandShakeE_ToString(enum MqHandShakeE value)
return the MqHandShakeE as string …
MqFactoryE
the factory is called to create an object for ...
Definition msgque_mq.h:1432
MQ_EXTERN enum MkErrorE MqSlaveE_FromInt(MK_INT const value, enum MqSlaveE *value_out)
return the MqSlaveE from integer …
MK_INT MqHandShakeE_ToInt(enum MqHandShakeE value)
return the MqHandShakeE as integer …
Definition msgque_mq.h:649
MQ_EXTERN MK_STRN MqStartE_ToString(enum MqStartE value)
return the MqStartE as string …
#define MqContextLogConfig(...)
#define MqContextLogSetup(...)
MQ_EXTERN enum MkErrorE MqWaitOnEventE_FromInt(MK_INT const value, enum MqWaitOnEventE *value_out)
return the MqWaitOnEventE from integer …
MQ_EXTERN MK_STRN MqFactoryE_ToString(enum MqFactoryE value)
return the MqFactoryE as string …
MqWaitOnEventE
wait for an event? …
Definition msgque_mq.h:1509
#define MqConfigSetIoTcp(...)
MQ_EXTERN enum MkErrorE MqStatusIsEF_FromInt(MK_INT const value, enum MqStatusIsEF *value_out)
return the MqStatusIsEF from integer …
MqSlaveE
predefined slave-id for well known slaves …
Definition msgque_mq.h:1577
#define MqFactoryDelete(x)
#define MqContextLog(...)
MQ_EXTERN MK_STRN MqIoComE_ToString(enum MqIoComE value)
return the MqIoComE as string …
#define MqContextDelete(x)
MQ_EXTERN enum MkErrorE MqFactoryE_FromInt(MK_INT const value, enum MqFactoryE *value_out)
return the MqFactoryE from integer …
MK_INT MqStartE_ToInt(enum MqStartE value)
return the MqStartE as integer …
Definition msgque_mq.h:1371
#define MqContextLogLink(...)
MK_INT MqIdentE_ToInt(enum MqIdentE value)
return the MqIdentE as integer …
Definition msgque_mq.h:723
MQ_EXTERN enum MkErrorE MqTransTypeE_FromInt(MK_INT const value, enum MqTransTypeE *value_out)
return the MqTransTypeE from integer …
MK_INT MqWaitOnEventE_ToInt(enum MqWaitOnEventE value)
return the MqWaitOnEventE as integer …
Definition msgque_mq.h:1553
MK_INT MqFactoryE_ToInt(enum MqFactoryE value)
return the MqFactoryE as integer …
Definition msgque_mq.h:1451
MK_INT MqStatusIsEF_ToInt(enum MqStatusIsEF value)
return the MqStatusIsEF as integer …
Definition msgque_mq.h:1413
#define MqDumpDelete(x)
MqIdentE
identify the application using prefix (default) or factory …
Definition msgque_mq.h:707
MQ_EXTERN MK_STRN MqWaitOnEventE_ToString(enum MqWaitOnEventE value)
return the MqWaitOnEventE as string …
MQ_EXTERN MK_STRN MqTransTypeE_ToString(enum MqTransTypeE value)
return the MqTransTypeE as string …
MqStartE
User preferences on HOWTO start a new entity.
Definition msgque_mq.h:1353
MqStatusIsEF
Information about how the context was created.
Definition msgque_mq.h:1394
MQ_EXTERN enum MkErrorE MqHandShakeE_FromInt(MK_INT const value, enum MqHandShakeE *value_out)
return the MqHandShakeE from integer …
MQ_EXTERN MK_STRN MqIdentE_ToString(enum MqIdentE value)
return the MqIdentE as string …
MqHandShakeE
the hand-shake of a service-call …
Definition msgque_mq.h:630
MqIoComE
what kind of socket interface to use? …
Definition msgque_mq.h:1469
MK_INT MqTransTypeE_ToInt(enum MqTransTypeE value)
return the MqTransTypeE as integer …
Definition msgque_mq.h:685
MqTransTypeE
the type of the transaction …
Definition msgque_mq.h:667
MK_INT MqSlaveE_ToInt(enum MqSlaveE value)
return the MqSlaveE as integer …
Definition msgque_mq.h:1600
MQ_EXTERN enum MkErrorE MqIdentE_FromInt(MK_INT const value, enum MqIdentE *value_out)
return the MqIdentE from integer …
MQ_EXTERN enum MkErrorE MqIoComE_FromInt(MK_INT const value, enum MqIoComE *value_out)
return the MqIoComE from integer …
MQ_EXTERN MK_STRN MqSlaveE_ToString(enum MqSlaveE value)
return the MqSlaveE as string …
MK_INT MqIoComE_ToInt(enum MqIoComE value)
return the MqIoComE as integer …
Definition msgque_mq.h:1487
@ MQ_FACTORY_NEW_FILTER
create object as a filter
Definition msgque_mq.h:1438
@ MQ_FACTORY_NEW_FORK
create object as a fork process
Definition msgque_mq.h:1436
@ MQ_FACTORY_NEW_THREAD
create object as a thread
Definition msgque_mq.h:1437
@ MQ_FACTORY_NEW_INIT
initial object, nothing else is known
Definition msgque_mq.h:1433
@ MQ_FACTORY_NEW_SLAVE
create object as a slave of an other object
Definition msgque_mq.h:1435
@ MQ_FACTORY_NEW_CHILD
create object as a child of an other object
Definition msgque_mq.h:1434
@ MQ_WAIT_ONCE
Wait maximum timeout seconds for one new event, doesn't matter which context the event belongs to or ...
Definition msgque_mq.h:1524
@ MQ_WAIT_OWN
Wait maximum timeout seconds for one new event that belongs to the current context or raise an timeou...
Definition msgque_mq.h:1531
@ MQ_WAIT_NO
Check for one event but do not wait …
Definition msgque_mq.h:1514
@ MQ_WAIT_FOREVER
Wait maximum timeout seconds for an event or raise an timeout-error …
Definition msgque_mq.h:1539
@ MQ_SLAVE_OTHER
internal: on the master-ctx get the slave-ctx and on the slave-ctx get the master-ctx
Definition msgque_mq.h:1581
@ MQ_SLAVE_FILTER
internal: the filter-slave-id, (on a master get the filter-slave)
Definition msgque_mq.h:1579
@ MQ_SLAVE_USER
internal: start of user-defined-slave-id
Definition msgque_mq.h:1582
@ MQ_SLAVE_MASTER
internal: the master-slave-id, (on a slave get the master)
Definition msgque_mq.h:1580
@ MQ_SLAVE_LOOPBACK
internal: the loopback-slave-id, (call my own services)
Definition msgque_mq.h:1578
@ MQ_SLAVE_MAX
internal: the maximum slave-id …
Definition msgque_mq.h:1586
@ MQ_IDENT_FACTORY
value from MqFactoryS::originalIdent
Definition msgque_mq.h:709
@ MQ_IDENT_PREFIX
value from MqConfigS::prefix
Definition msgque_mq.h:708
@ MQ_START_SPAWN
create entity as spawn process
Definition msgque_mq.h:1357
@ MQ_START_DEFAULT
use application-context default entity creation
Definition msgque_mq.h:1354
@ MQ_START_THREAD
create entity as thread
Definition msgque_mq.h:1356
@ MQ_START_FORK
create entity as fork
Definition msgque_mq.h:1355
@ MQ_STATUS_IS_FORK
context is created as a fork
Definition msgque_mq.h:1398
@ MQ_STATUS_IS_DUP
context is created as a duplicate of an other context
Definition msgque_mq.h:1396
@ MQ_STATUS_IS_THREAD
context is created as a thread
Definition msgque_mq.h:1397
@ MQ_STATUS_IS_INITIAL
context is the first context
Definition msgque_mq.h:1395
@ MQ_STATUS_IS_SPAWN
context is created as a spawn
Definition msgque_mq.h:1399
@ MQ_HANDSHAKE_OK
direction: server -> client
Definition msgque_mq.h:634
@ MQ_HANDSHAKE_START
direction: client -> server
Definition msgque_mq.h:632
@ MQ_HANDSHAKE_ERROR
direction: server -> client
Definition msgque_mq.h:636
@ MQ_IO_UDS
using a uds socket
Definition msgque_mq.h:1471
@ MQ_IO_LOOP
using pipe socket as stdin and stdout
Definition msgque_mq.h:1474
@ MQ_IO_PIPE
using a pipe socket (most internal usage)
Definition msgque_mq.h:1470
@ MQ_IO_INIT
using stdin and stdout
Definition msgque_mq.h:1473
@ MQ_IO_TCP
using a tcp socket
Definition msgque_mq.h:1472
@ MQ_TRANS_TYPE_WAIT
'W' = SendEND_AND_WAIT
Definition msgque_mq.h:668
@ MQ_TRANS_TYPE_SUB
'S' = SendEND_AND_SUB
Definition msgque_mq.h:669
@ MQ_TRANS_TYPE_CB
'C' = SendEND_AND_CALLBACK
Definition msgque_mq.h:670
@ MQ_TRANS_TYPE_NO
'N' = SendEND
Definition msgque_mq.h:672
@ MQ_TRANS_TYPE_TRANS
'T' = SendEND_AND_TRANSACTION
Definition msgque_mq.h:671
MQ_EXTERN MK_STR MqHelpMsgque(void)
return a page with the usage of all libmqmsgque specific options
MQ_EXTERN MK_STR MqHelp(MK_STRN tool)
write libmqmsgque specific user-help to stderr
MQ_EXTERN void MqInitSetArg0(MK_BAC bfl)
set the process startup-prefix argument to bfl
MQ_EXTERN MK_BFL MqInitGetArg0(void)
get the process startup-prefix argument
MQ_EXTERN MK_BFL MqInitResetArg0(void)
Reset the process-startup-prefix argument to an empty list …
MQ_EXTERN_DATA struct MkBufferListS * MqInitArg0
the process-startup-prefix argument …
Definition msgque_mq.h:8710
MQ_EXTERN void MqInitSetArg0VAL(MK_STRN arg0, va_list var_list)
set the process startup-prefix to var_list
MQ_EXTERN void MqInitSetArg0VA(MK_STRN arg0,...)
set the process startup-prefix to a args
MQ_EXTERN void MqMain(void *code)
Main entrypoint - start the application
MQ_EXTERN void MqSetup(void)
setup libmqmsgque internal memory …
MQ_EXTERN_DATA bool MqCleanupActive
signal that code was triggert by MqCleanup
Definition msgque_mq.h:1329
MQ_EXTERN void MqCleanup(void)
cleanup libmqmsgque internal memory …
MQ_EXTERN_DATA struct MqLalS MqLal
Language Abstraction Layer in duty.
Definition msgque_mq.h:2671
MQ_EXTERN void MqSysServerThreadMain(struct MqSysServerThreadMainS *data)
initialize a new thread …
int(* MqSysSelectF)(int max, void *read, void *write, void *except, struct timeval *timeout)
select syscall …
Definition msgque_mq.h:2545
struct config_t config_t
libconfig struct
Definition msgque_mq.h:432
MK_NUM MQ_SLAVE_ID
a slave identiver
Definition msgque_mq.h:451
struct config_setting_t config_setting_t
libconfig struct
Definition msgque_mq.h:434
int MQ_LTR
32bit longterm transaction token because PHP-32 does NOT support long long
Definition msgque_mq.h:445
int MQ_ROU
32bit routing token because PHP-32 does NOT support long long
Definition msgque_mq.h:448
int MQ_HDL
handle data-type
Definition msgque_mq.h:455
int MQ_SOCK_HDL
Definition msgque_mq.h:608
#define MQ_RT_ARGS
Definition msgque_mq.h:190
bool MqRtCheck(MK_MNGN mng)
check MqRuntimeS%->Mk{ObjectS::signature} …
Definition msgque_mq.h:8458
MQ_RTN MqRtN(MK_MNGN mng)
(const) cast a unknown-object into an MqRuntimeS pointer or NULL if not possible
Definition msgque_mq.h:8484
MQ_RT MqRt(MK_MNG mng)
cast a unknown-object into an MqRuntimeS pointer or NULL if not possible
Definition msgque_mq.h:8477
#define MK_ATTR_HDL_CHECK(x)
#define __parser__pop__
#define __parser__push__(...)
#define MK_ATTR_HDL
#define __parser__(...)
#define MqLinkS_targetIdent_size
ClassIdentGet of the link target, only valid on parent-context
Definition msgque_mq.h:988
#define MqConfigS_postfix_size
Definition msgque_mq.h:1747
#define END_MQ_C_DECLS
Definition msgque_mq.h:246
#define BEGIN_MQ_C_DECLS
Definition msgque_mq.h:245
MQ_EXTERN_DATA MkThreadLocal struct MqRuntimeS MqRuntimeRLS
RLS.
Definition msgque_mq.h:8551
#define MqRT
Definition msgque_mq.h:8501
MQ_RT MqRuntimeGetI(void)
inline from MkRuntimeInit
Definition msgque_mq.h:8559
#define MqRtSetup_NULL
Definition msgque_mq.h:8524
#define MqConfigS_storage_size
storage file used as default if a database is requested
Definition msgque_mq.h:1781
#define MqConfigS_dispname_size
Definition msgque_mq.h:1700
MQ_EXTERN MQ_RT MqRuntimeInit(MK_RT const mkrt, MQ_RT const mqrt)
initialize MkRuntimeRLS
#define MqConfigS_prefix_size
Definition msgque_mq.h:1730
msgque_overload_mq.h - 08 May 2023 - aotto1968
array of MqContextC instances
Definition msgque_mq.h:589
MK_NUM size
Definition msgque_mq.h:590
MQ_CTX * data
Definition msgque_mq.h:591
union MkErrExtS::@19 super
MK_TYP type
union MkRtExtS::@24 super
union MkTypeS::@0 super
used for callback function pointer management
Definition msgque_mq.h:951
MK_PTR data
additional data for the callback function
Definition msgque_mq.h:953
MqTokenF fCall
callback method
Definition msgque_mq.h:952
MkMarkF fMark
garbage-collector marker for data
Definition msgque_mq.h:956
MqDataFreeF fFree
free additional data pointer
Definition msgque_mq.h:954
MqDataCopyF fCopy
copy additional data pointer, used in a SetupDup
Definition msgque_mq.h:955
end-user configuration data, also available as command-line options
Definition msgque_mq.h:1673
bool postfixLOCK
protect postfix
Definition msgque_mq.h:1788
bool storageLOCK
protect storage
Definition msgque_mq.h:1786
enum MqStartE startAs
create a new application-context as thread, spawn or fork … A new application-context is created if:
Definition msgque_mq.h:1698
bool prefixLOCK
protect prefix
Definition msgque_mq.h:1787
bool dispnameLOCK
protect name
Definition msgque_mq.h:1785
config_setting_t * filterH
libconfig data root
Definition msgque_mq.h:1886
MK_STRB prefix[MqConfigS_prefix_size]
set the server-part (1) of the application-identifer MqConfigS::dispname …
Definition msgque_mq.h:1745
MQ_CTX parent
CHILD: a pointer to the parent object or NULL.
Definition msgque_mq.h:1763
MQ_CTX master
SLAVE: a pointer to the master object or NULL.
Definition msgque_mq.h:1766
MK_STRB dispname[MqConfigS_dispname_size]
set the display-name of the context … The display-name is used as:
Definition msgque_mq.h:1728
MK_NUM master_id
SLAVE: the ID in the master SLAVES array or O.
Definition msgque_mq.h:1769
config_t * cfg
add libconfig configuration file …
Definition msgque_mq.h:1880
enum MkNativeIsE native
Definition msgque_mq.h:1676
MK_STRB storage[MqConfigS_storage_size]
Definition msgque_mq.h:1782
MK_STRB postfix[MqConfigS_postfix_size]
set the client-part (2) of the application-identifer MqConfigS::dispname …
Definition msgque_mq.h:1760
enum MqIdentE identFrom
select how to identify the application from remote …
Definition