Loading...
Searching...
No Matches
LibMqMsgque_mq.h
Go to the documentation of this file.
1
12#pragma once
13
14#include "kernel_mk.h"
15
16// =========================================================================
17// global __parser__ definition :
18
19__parser__(library=MqMsgque@internal@Mq);
20
21// MARK_D ################################################################
22// -----------------------------------------------------------------------
23// documentation order
38
52
76
84
92
99
107
114
119
120// =========================================================================================
121// Makefile: CPPFLAGS definitions
122// Config: configure definitions
123
124// define: META_TCP_ONLY_IPV4
125// source: msgque_mq.h
126// default: not set, use IPV8
127// definition: Force the IPV4 support and disable IPV8
128
129// define: META_COMPILE_AS_CC
130// source: Makefile
131// target: kernel_mk.h
132// default: only set by "ccmqmsgque" to compile "C" code as "C++" code
133// definition: By default, the "C" code is compiled as "C" code into a "C" library and eventually linked
134// to the library of the target programming language. With the "META_COMPILE_AS_CC" preprocessor
135// flag, the "C" code is not compiled into an independent library but is translated directly
136// into the target programming language (C++) library along with the additional C++ code as C++
137// code in the "ccmqmsgque::libmkkernel" namespace.
138// The following changes are done:
139// 1. "BEGIN_MK_C_DECLS" is set to "namespace libmsgque {"
140
141// define: META_HAVE_LIBCONFIG
142// source: user defind at build using '-DMETA_HAVE_LIBCONFIG=1/0' or set with the "configure" script
143// default: the default is "1 = set" - other value is "0 = not set"
144// definition: 1. Add the 'libconfig' library to the build to support config-files
145// 2. If the extension is build ontop of libmqmsgque the extension have to set META_HAVE_LIBCONFIG
146// according to libmqmsgque. If META_HAVE_LIBCONFIG differs from libmqmsgque than compile-error occure.
147// 3. autoconf example is at: NHI1/theLink/phpmsgque/MqMsgque/config.m4
148
149#ifndef META_HAVE_LIBCONFIG
150 #error "META_HAVE_LIBCONFIG was NOT defined, require 1 or 0"
151#endif
152
153// define: META_STATIC
154// reference: META_STATIC from kernel_mk.h
155
156#ifdef META_STATIC
157# undef MQ_C_BUILD_DLL
158# define MQ_C_BUILD_DLL
159#endif
160
161// =========================================================================
191#if META_HAS_THREAD
192# define MQ_RT_IS_ARG
193# define MQ_RT_ARGS_ONLY MK_RT const mkrt, MQ_RT const mqrt
194# define MQ_RT_ARGS MQ_RT_ARGS_ONLY,
195# define MQ_RT_CALL_ONLY mkrt, mqrt
196# define MQ_RT_CALL MQ_RT_CALL_ONLY,
197# define MQ_RT_CALL_NULL_ONLY MkRT, MqRT
198# define MQ_RT_CALL_NULL MQ_RT_CALL_NULL_ONLY,
199# define MQ_RT_PTR mqrt
200# define MQ_RT_REF (*mqrt)
201# define MQ_RT_PARSER_ONLY MQ_RT_ARGS_ONLY __parser__(internal,default=N#RUNTIME)
202# define MQ_RT_PARSER MQ_RT_PARSER_ONLY,
203# if META_HDL_USE__NONNULL__GCC_ATTRIBUTE == 1
204 // 1=mkrt, 2=mqrt, 3=hdl, 4=arg → hdl+arg get nonnull
205# define MQ_RT_NONNULL_ATTRIBUTE_2 __attribute__((nonnull(3,4)))
206# define MQ_RT_NONNULL_ATTRIBUTE_1 __attribute__((nonnull(3)))
207# else
208 // 1=mkrt, 2=mqrt, 3=hdl, 4=arg → only arg get nonnull
209# define MQ_RT_NONNULL_ATTRIBUTE_2 __attribute__((nonnull(4)))
210# define MQ_RT_NONNULL_ATTRIBUTE_1
211# endif
212#else
213# define MQ_RT_ARGS_ONLY void
214# define MQ_RT_ARGS
215# define MQ_RT_CALL_ONLY
216# define MQ_RT_CALL
217# define MQ_RT_CALL_NULL_ONLY
218# define MQ_RT_CALL_NULL
219# define MQ_RT_PTR &MqRuntimeRLS
220# define MQ_RT_REF MqRuntimeRLS
221# define MQ_RT_PARSER_ONLY void
222# define MQ_RT_PARSER
223# if META_HDL_USE__NONNULL__GCC_ATTRIBUTE == 1
224 // 1=hdl, 2=arg → all get nonnull
225# define MQ_RT_NONNULL_ATTRIBUTE_2 __attribute__((nonnull(1,2)))
226# define MQ_RT_NONNULL_ATTRIBUTE_1 __attribute__((nonnull(1)))
227# else
228 // 1=hdl, 2=arg → only arg get nonnull
229# define MQ_RT_NONNULL_ATTRIBUTE_2 __attribute__((nonnull(2)))
230# define MQ_RT_NONNULL_ATTRIBUTE_1
231# endif
232#endif
235// MqRuntimeC_C_API
236
237/* BEGIN_MQ_C_DECLS should be used at the beginning of your declarations,
238 so that C++ compilers don't mangle their names. Use END_MQ_C_DECLS at
239 the end of C declarations. */
240
241#undef BEGIN_MQ_C_DECLS
242#undef END_MQ_C_DECLS
243#if defined(META_COMPILE_AS_CC)
244# define BEGIN_MQ_C_DECLS namespace libmqmsgque { using namespace libmkkernel;
245# define END_MQ_C_DECLS }
246#elif defined(__cplusplus)
247# define BEGIN_MQ_C_DECLS extern "C" {
248# define END_MQ_C_DECLS }
249#else
250# define BEGIN_MQ_C_DECLS /* empty */
251# define END_MQ_C_DECLS /* empty */
252#endif
253
254// MARK_O
255#ifndef PARSE_C_HEADER_TO_META
256# include "gen/msgque_overload_mq.h"
257#endif
258
260
261// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
262
337/* ####################################################################### */
338/* ### ### */
339/* ### K E R N A L - A P I ### */
340/* ### ### */
341/* ####################################################################### */
342
343/*****************************************************************************/
344/* */
345/* windows conform extern */
346/* */
347/*****************************************************************************/
348
373
374// BEGIN-HEADER - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
375
376// If the source of libmqmsgque is direct used in an external library
377// (without dynamic linking) and this library should *not* export
378// the symbol's of libmqmsgque then the flag META_IGNORE_EXTERN have
379// to be set
380#undef MQ_EXTERN
381#if defined(META_IGNORE_EXTERN)
382# define MQ_EXTERN
383#elif defined(PIC)
384 // does we build a DLL ?
385# if defined(DLL_EXPORT)
386 // does we build the libmqmsgque library ?
387# if defined(MQ_C_BUILD_DLL)
388# define MQ_EXTERN __declspec(dllexport)
389# else
390# define MQ_EXTERN __declspec(dllimport)
391# endif
392# else
393 // no DLL - architecture specific extern specifier
394# define MQ_EXTERN __attribute__ ((visibility("default")))
395# endif
396#else
398# define MQ_EXTERN
399#endif
400
401// external data lookup
402#undef MQ_EXTERN_DATA
403#if defined(META_PRIVATE)
404# define MQ_EXTERN_DATA extern
405#elif defined(META_IGNORE_EXTERN)
406# define MQ_EXTERN_DATA extern
407#elif defined(PIC)
408 // does we build a DLL ?
409# if defined(DLL_EXPORT)
410 // does we build the libmqmsgque library ?
411# if defined(MQ_C_BUILD_DLL)
412# define MQ_EXTERN_DATA __declspec(dllexport)
413# else
414# define MQ_EXTERN_DATA __declspec(dllimport)
415# endif
416# else
417 // no DLL - architecture specific extern specifier
418# define MQ_EXTERN_DATA __attribute__ ((visibility("default"))) extern
419# endif
420#else
421# define MQ_EXTERN_DATA extern
422#endif
423
424// END-HEADER - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
425
427// MqMsgque_Compiler_C_API
428
429/*****************************************************************************/
430/* */
431/* types/generic */
432/* */
433/*****************************************************************************/
434
437
439typedef struct config_t config_t;
442
443struct MqContextS;
444struct MqTransS;
445struct MqConfigS;
446struct MqEventS;
447struct MqFactoryS;
448struct MqDumpS;
449
451__parser__(type=ME_NI4_MQ_LTR)
452typedef int MQ_LTR;
454__parser__(type=ME_NI4_MQ_ROU)
455typedef int MQ_ROU;
457__parser__(type=ME_NI4_MQ_SLAVE_ID)
459
461__parser__(type=ME_NI4_MQ_HDL:"handle data-type")
462typedef int MQ_HDL;
463
465// MqMsgque_Type_C_API
466
467/* MARK_C ********************************************************************/
468/* */
469/* class types */
470/* */
471/*****************************************************************************/
472
473// BEGIN-ShortDef - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
474
478 __parser__(internal,type=ME_CCC_MqErrorC:"extension management class for MqErrorS":internal)
479 typedef struct MqErrorS * MQ_ERR;
481 __parser__(internal,type=ME_CCN_MqErrorC:"const - extension management class for MqErrorS":internal)
482 typedef const struct MqErrorS * MQ_ERRN;
484 __parser__(ignore)
485 typedef struct MqErrorS MQ_ERRR;
487// MqErrorC_Class_C_API
488
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;
501// MqRuntimeC_Class_C_API
502
506 __parser__(internal,type=ME_CCC_MqCtxTypeC:"MqContextS type":internal)
507 typedef struct MqCtxTypeS * MQ_CTXTYP;
509 __parser__(internal,type=ME_CCN_MqCtxTypeC:"const - MqContextS type":internal)
510 typedef const struct MqCtxTypeS * MQ_CTXTYPN;
512 __parser__(ignore)
513 typedef struct MqCtxTypeS MQ_CTXTYPR;
515// MqCtxTypeC_Class_C_API
516
520 __parser__(type=ME_CCC_MqContextC:"MqContextC class handle":primary)
521 typedef struct MqContextS * MQ_CTX;
523 __parser__(type=ME_CCN_MqContextC:"const - MqContextC class handle":primary)
524 typedef const struct MqContextS * MQ_CTXN;
526 __parser__(ignore)
527 typedef struct MqContextS MQ_CTXR;
529// MqContextC_Class_C_API
530
534 __parser__(type=ME_CCC_MqDumpC:"MqDumpC class handle":primary)
535 typedef struct MqDumpS * MQ_DMP;
537 __parser__(type=ME_CCN_MqDumpC:"const - MqDumpC class handle":primary)
538 typedef const struct MqDumpS * MQ_DMPN;
540 __parser__(ignore)
541 typedef struct MqDumpS MQ_DMPR;
543// MqDumpC_Class_C_API
544
548 __parser__(type=ME_CCC_MqFactoryC:"MqFactoryC class handle":primary)
549 typedef struct MqFactoryS * MQ_FCT;
551 __parser__(type=ME_CCN_MqFactoryC:"const - MqFactoryC class handle":primary)
552 typedef const struct MqFactoryS * MQ_FCTN;
554 __parser__(ignore)
555 typedef struct MqFactoryS MQ_FCTR;
557// MqFactoryC_Class_C_API
558
562 __parser__(internal,type=ME_CCC_MqEnvC:"MqEnvC class handle":internal)
563 typedef struct MqEnvS * MQ_ENV;
565 __parser__(internal,type=ME_CCN_MqEnvC:"const - MqEnvC class handle":internal)
566 typedef const struct MqEnvS * MQ_ENVN;
568 __parser__(ignore)
569 typedef struct MqEnvS MQ_ENVR;
571// MqEnvC_Class_C_API
572
573// END-ShortDef - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
574
577__parser__(type=ME_ACX_MqContextC:"ARRAY of MQ_CTX")
578typedef struct {
581} MQ_CTX_A;
582
583/*****************************************************************************/
584/* */
585/* sockets */
586/* */
587/*****************************************************************************/
588
591
592#if defined(__MINGW32__) || defined(_MSC_VER)
593typedef SOCKET MQ_SOCK_HDL;
594# define MK_FORMAT_SOCK "%I64u"
595#else
596__parser__(type=ME_NI4_MQ_SOCK_HDL)
597typedef int MQ_SOCK_HDL;
598# define MK_FORMAT_SOCK "%i"
599#endif
600
602// MqMsgque_Type_C_API
603
604/*****************************************************************************/
605/* */
606/* type definitions */
607/* */
608/*****************************************************************************/
609
612
613__parser__push__(doc-group=Enum);
614
617
619__parser__(internal)
628
629// BEGIN-MqHandShakeE - created by 'c_MqS.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
630
633__parser__(internal,no-rpc,prefix=EnumFunc,return-type-default-no)
635
638__parser__(internal,no-rpc,prefix=EnumFunc,return-type-default-no)
640 return (MK_I32) value;
641}
642
645__parser__(internal,no-rpc,prefix=EnumFunc)
646MQ_EXTERN enum MkErrorE MqHandShakeE_FromInt ( MK_I32 const value, enum MqHandShakeE * value_out );
647
648// END-MqHandShakeE - created by 'c_MqS.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
649
651// MqHandShakeE
652
655
657__parser__(internal)
665
666// BEGIN-MqTransTypeE - created by 'c_MqS.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
667
670__parser__(internal,no-rpc,prefix=EnumFunc,return-type-default-no)
672
675__parser__(internal,no-rpc,prefix=EnumFunc,return-type-default-no)
677 return (MK_I32) value;
678}
679
682__parser__(internal,no-rpc,prefix=EnumFunc)
683MQ_EXTERN enum MkErrorE MqTransTypeE_FromInt ( MK_I32 const value, enum MqTransTypeE * value_out );
684
685// END-MqTransTypeE - created by 'c_MqS.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
686
688// MqTransTypeE
689
692
698// [MqIdentE]
703// [MqIdentE]
704
705// BEGIN-MqIdentE - created by 'c_MqS.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
706
709__parser__(doc-group=Enum,doc-index=_ignore_,class=MqMsgque,no-rpc,prefix=EnumFunc,return-type-default-no)
711
714__parser__(doc-group=Enum,doc-index=_ignore_,class=MqMsgque,no-rpc,prefix=EnumFunc,return-type-default-no)
716 return (MK_I32) value;
717}
718
721__parser__(doc-group=Enum,doc-index=_ignore_,class=MqMsgque,no-rpc,prefix=EnumFunc)
722MQ_EXTERN enum MkErrorE MqIdentE_FromInt ( MK_I32 const value, enum MqIdentE * value_out );
723
724// END-MqIdentE - created by 'c_MqS.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
725
727// MqIdentE
728
730
732// MqMsgque_Enum_C_API
733
736
737struct MqCtxTypeS;
738
739//__parser__(type=ME_TYC:"a managed object class type pointer")
740__parser__(internal)
742typedef struct MqCtxTypeS * MQ_CTXT;
743
745// MqCtxTypeC_C_API
746
747// #######################################################################
748// -----------------------------------------------------------------------
753
767__parser__(ignore)
768struct MqEnvS {
769 // BEGIN-MqEnvS-super - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
770
771 union {
772 struct MkObjectS obj; // instance-base MkObjectS
773 } super;
774
775 // END-MqEnvS-super - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
776
783 struct MqEnvS *link;
784 struct {
785 bool SIdLck : 1;
786 bool LIdLck : 1;
787 } bits;
788};
789
790// BEGIN-MqEnvS-Definition - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
791
795 __parser__push__(prefix=Class, doc-group=Define, doc-index=Class);
796
797
798// Signature --------------------------------------------------------------
801
802 #define MqEnvC_SIGNATURE (MkObjectC_SIGNATURE ^ (14u<<10))
803 #define MqEnvC_MASK (((1u<<22)-1)<<10)
804
806
807// CompileTimeCast --------------------------------------------------------------
810
811 #define MqEnvC_X2env(x) (x)
812 #define MqEnvC_X2obj(x) MkOBJ(x)
813
815
816
817// TypeDef --------------------------------------------------------------
820
822 __parser__(ignore) typedef struct MqEnvS MqEnvCR;
824 __parser__(ignore) typedef const struct MqEnvS MqEnvCNR;
826 #define MqEnvC_T (&MQ_RT_REF._MqEnvC_T)
828 #define MqEnvC_TT (MkTYP(MqEnvC_T))
830 #define MqEnvST MqEnvC_T
832 #define MqEnvSTT (MkTYP(MqEnvST))
834 #define MqEnvC_type MQ_ENV
836 #define MqEnvCT_X(instance) ( (struct MkSuperTypeS *) (MkOBJ_R(instance).type) )
838 #define MqEnvCTT_X(instance) (MkOBJ_R(instance).type)
840 #define MqEnvCT_TT(typ) ( (struct MkSuperTypeS *) (typ) )
842 #define MqEnvC_NS MQ
844 #define MqEnvCTT MqEnvCTT
846 #define MqEnvCT ( (struct MkSuperTypeS *) MqEnvCTT )
847
849
850
851// TypeCheck --------------------------------------------------------------
854
855 #pragma GCC diagnostic push
856 #pragma GCC diagnostic ignored "-Wattributes"
857
860 __parser__(class=MqEnvC,static,ignore)
862 return MkSanitizeCheck(MqEnvC,mng);
863 }
864
867 __parser__(class=MqEnvC,static,ignore)
869 return MkSanitizeCheckO(MqEnvC,obj);
870 }
871
872 #pragma GCC diagnostic pop
873 #define MqEnvC_Check(mng) MqEnvCheck(mng)
874
876
877
878// RunTimeCast --------------------------------------------------------------
881
883 __parser__(class=MqEnvC,ignore,static)
884 META_ATTRIBUTE_SANITIZE
886 return (MqEnvCheck(mng) ? (MQ_ENV)mng : NULL);
887 }
888
890 __parser__(class=MqEnvC,ignore,static)
891 META_ATTRIBUTE_SANITIZE
893 return (MqEnvCheck(mng) ? (MQ_ENVN)mng : NULL);
894 }
895
897 #define MqEnvRaise(_env) if (!_MkCheckX(MqEnvC,_env)) { \
898 MkErrorSetC_1E("'MqEnvC' hdl is NULL"); \
899 goto error ; \
900 }
901
903 #define MqENV_R(x) (*(x)).super.env
905 #define MqENV(x) (&MqENV_R(x))
906
908
911// MqEnvC_Class_Define_C_API
912
913// END-MqEnvS-Definition - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
914
916// MqEnvC_C_API
917
920
921// \brief check service call environment at the beginning of the service call
922#define MQ_SERVICE_CALL_CHECK do { \
923 assert (__data__ != NULL); \
924 if (MqCtxCheck(mqctx) == false || MkOBJ_R(mqctx).self == NULL) return MK_OK; \
925} while (0)
926
927// [MqTokenF]
929#define MQ_SERVICE_CALL_ARGS MK_RT_ARGS MQ_CTX const mqctx, MK_PTR const __data__
931#define MQ_SERVICE_CALL MK_RT_CALL mqctx, __data__
932
935// [MqTokenF]
936
937// [MqDataFreeF]
939#define MQ_SERVICE_FREE_ARGS MK_RT_ARGS MQ_CTX const mqctx, MK_PTR *dataP
940
943// [MqDataFreeF]
944
945// [MqDataCopyF]
947#define MQ_SERVICE_COPY_ARGS MK_RT_ARGS MQ_CTX const mqctx, MK_PTR *dataP
948
951// [MqDataCopyF]
952
954// MqContextC_ConfigApi_C_API
955
958__parser__(ignore)
966
971
972 // slaves link
976};
977
978#if defined(MQ_C_BUILD_DLL)
979
980 #define META_SECTION_DEFINE
981 #include "MqLinkS_mq.h"
982 #undef META_SECTION_DEFINE
983
984#else // MQ_C_BUILD_DLL
985
988__parser__(ignore)
989struct MqLinkS {
990
991 // PUBLIC variables
992
996 #define MqLinkS_targetIdent_size 64
998
999 // context-management variables
1002
1003 // protected environment
1004 struct MqEnvS protect;
1006
1007 // master/slave relationship
1008 struct MqLinkSlaveS slave;
1009
1010 // offset calculated by "Nhi1InternalSize"
1011 MK_BINB private_variables[40640];
1012};
1013
1014#endif // MQ_C_BUILD_DLL
1015
1016/* MARK_F ################################################################ */
1017/* ### ### */
1018/* ### C T X - C O N F I G - A P I ### */
1019/* ### ### */
1020/* ####################################################################### */
1021
1141// MqContextC_ConfigApi_C_API
1142
1143// #######################################################################
1144// -----------------------------------------------------------------------
1149
1150__parser__push__(doc-group=Misc,doc-index=ConfigApi);
1151
1159typedef enum MkErrorE ( MK_DECL
1161) (
1162 MK_RT_ARGS
1163 MQ_CTX const ctx,
1164 MK_BFL const args
1166
1167#define MQ_CALLBACK_CREATE_ARGS MK_RT_ARGS MQ_CTX const mqctx, MK_BFL const argv
1168#define MQ_CALLBACK_CREATE_CALL MK_RT_CALL mqctx, argv
1169
1177typedef void ( MK_DECL
1178 *MqDeleteF
1179) (
1180 MQ_CTX const ctx
1182
1185typedef void ( MK_DECL
1186 *MqHelpF
1187) (
1188 MK_STRN basename
1189) __attribute__ ((noreturn));
1190
1193typedef void ( MK_DECL
1194 *MqExitF
1195) (
1197 int num
1198);
1199
1203typedef void (MK_DECL *MqSetupF) ( MQ_CTX const ctx );
1204
1217typedef void (MK_DECL *MqRefCountF) ( MK_RT_ARGS MQ_CTX ctx , MK_PTR const env);
1218
1224__parser__(ignore)
1228
1239__parser__(ignore)
1246
1253__parser__(ignore)
1257
1259__parser__(ignore)
1261};
1262
1267__parser__(ignore)
1269};
1270
1271/*****************************************************************************/
1272/* */
1273/* create / delete */
1274/* */
1275/*****************************************************************************/
1276
1280 MQ_CTX const ctx
1282
1284__parser__(internal)
1287 MQ_CTX const to,
1288 MQ_CTX const from
1290
1299// from being overwritten.
1300__parser__(hide)
1303 MQ_CTX const to,
1304 MQ_CTXN const from
1306
1308
1310// MqContextC_ConfigApi_Misc_C_API
1311
1312// #######################################################################
1313// -----------------------------------------------------------------------
1322__parser__push__(no-rpc,template-overload,doc-group=Setup,prefix=Setup);
1323
1328__parser__(no-inline)
1329MQ_EXTERN void MK_DECL MqSetup (void) __attribute__ ((constructor(300)));
1330
1336__parser__(no-inline)
1337MQ_EXTERN void MK_DECL MqCleanup (void) __attribute__ ((destructor(300)));
1338
1340__parser__(ignore)
1342
1344
1346// MqMsgque_Setup_C_API
1347
1348
1349// #######################################################################
1350// -----------------------------------------------------------------------
1354
1355__parser__push__(doc-group=Enum,doc-index=_ignore_,class=MqMsgque);
1356
1359
1365// [MqStartE]
1372// [MqStartE]
1373
1374// BEGIN-MqStartE - created by 'c_MqS.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
1375
1378__parser__(doc-group=Enum,doc-index=_ignore_,class=MqMsgque,no-rpc,prefix=EnumFunc,return-type-default-no)
1380
1383__parser__(doc-group=Enum,doc-index=_ignore_,class=MqMsgque,no-rpc,prefix=EnumFunc,return-type-default-no)
1385 return (MK_I32) value;
1386}
1387
1390__parser__(doc-group=Enum,doc-index=_ignore_,class=MqMsgque,no-rpc,prefix=EnumFunc)
1391MQ_EXTERN enum MkErrorE MqStartE_FromInt ( MK_I32 const value, enum MqStartE * value_out );
1392
1393// END-MqStartE - created by 'c_MqS.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
1394
1396
1399
1405// [MqStatusIsEF]
1406__parser__(enum-is-flag)
1414// [MqStatusIsEF]
1415
1416// BEGIN-MqStatusIsEF - created by 'c_MqS.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
1417
1420__parser__(doc-group=Enum,doc-index=_ignore_,class=MqMsgque,no-rpc,prefix=EnumFunc,return-type-default-no)
1422
1425__parser__(doc-group=Enum,doc-index=_ignore_,class=MqMsgque,no-rpc,prefix=EnumFunc,return-type-default-no)
1427 return (MK_I32) value;
1428}
1429
1432__parser__(doc-group=Enum,doc-index=_ignore_,class=MqMsgque,no-rpc,prefix=EnumFunc)
1433MQ_EXTERN enum MkErrorE MqStatusIsEF_FromInt ( MK_I32 const value, enum MqStatusIsEF * value_out );
1434
1435// END-MqStatusIsEF - created by 'c_MqS.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
1436
1438// MqStatusIsEF
1439
1442
1444__parser__(internal,enum-is-flag)
1453
1454// BEGIN-MqFactoryE - created by 'c_MqS.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
1455
1458__parser__(internal,no-rpc,prefix=EnumFunc,return-type-default-no)
1460
1463__parser__(internal,no-rpc,prefix=EnumFunc,return-type-default-no)
1465 return (MK_I32) value;
1466}
1467
1470__parser__(internal,no-rpc,prefix=EnumFunc)
1471MQ_EXTERN enum MkErrorE MqFactoryE_FromInt ( MK_I32 const value, enum MqFactoryE * value_out );
1472
1473// END-MqFactoryE - created by 'c_MqS.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
1474
1476// MqFactoryE
1477
1480
1482__parser__(internal)
1490
1491// BEGIN-MqIoComE - created by 'c_MqS.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
1492
1495__parser__(internal,no-rpc,prefix=EnumFunc,return-type-default-no)
1497
1500__parser__(internal,no-rpc,prefix=EnumFunc,return-type-default-no)
1502 return (MK_I32) value;
1503}
1504
1507__parser__(internal,no-rpc,prefix=EnumFunc)
1508MQ_EXTERN enum MkErrorE MqIoComE_FromInt ( MK_I32 const value, enum MqIoComE * value_out );
1509
1510// END-MqIoComE - created by 'c_MqS.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
1511
1513// MqIoComE
1514
1517
1523// [MqWaitOnEventE]
1556// [MqWaitOnEventE]
1557
1558// BEGIN-MqWaitOnEventE - created by 'c_MqS.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
1559
1562__parser__(doc-group=Enum,doc-index=_ignore_,class=MqMsgque,no-rpc,prefix=EnumFunc,return-type-default-no)
1564
1567__parser__(doc-group=Enum,doc-index=_ignore_,class=MqMsgque,no-rpc,prefix=EnumFunc,return-type-default-no)
1569 return (MK_I32) value;
1570}
1571
1574__parser__(doc-group=Enum,doc-index=_ignore_,class=MqMsgque,no-rpc,prefix=EnumFunc)
1575MQ_EXTERN enum MkErrorE MqWaitOnEventE_FromInt ( MK_I32 const value, enum MqWaitOnEventE * value_out );
1576
1577// END-MqWaitOnEventE - created by 'c_MqS.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
1578
1580// MqWaitOnEventE
1581
1584
1591// [MqSlaveE]
1592__parser__(enum-accept-integer=int32)
1604// [MqSlaveE]
1605
1606// BEGIN-MqSlaveE - created by 'c_MqS.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
1607
1610__parser__(doc-group=Enum,doc-index=_ignore_,class=MqMsgque,no-rpc,prefix=EnumFunc,return-type-default-no)
1612
1615__parser__(doc-group=Enum,doc-index=_ignore_,class=MqMsgque,no-rpc,prefix=EnumFunc,return-type-default-no)
1617 return (MK_I32) value;
1618}
1619
1622__parser__(doc-group=Enum,doc-index=_ignore_,class=MqMsgque,no-rpc,prefix=EnumFunc)
1623MQ_EXTERN enum MkErrorE MqSlaveE_FromInt ( MK_I32 const value, enum MqSlaveE * value_out );
1624
1625// END-MqSlaveE - created by 'c_MqS.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
1626
1628// MqSlaveE
1629
1631
1633// MqMsgque_Enum_C_API
1634
1637__parser__(ignore)
1642
1643// #######################################################################
1644// -----------------------------------------------------------------------
1648
1650__parser__(ignore)
1652
1658
1661
1664
1672
1674 struct MqIoUdsConfigS uds;
1675
1677 struct MqIoTcpConfigS tcp;
1678
1680 struct MqIoPipeConfigS pipe;
1681
1683 struct MqIoLoopConfigS loop;
1684
1686 struct MqIoInitConfigS init;
1687};
1688
1690__parser__(ignore)
1692
1695
1717
1718 #define MqConfigS_dispname_size 64
1747
1748 #define MqConfigS_prefix_size 64
1764
1765 #define MqConfigS_postfix_size 64
1779
1782
1785
1788
1790 struct MqIoConfigS io;
1791
1799 #define MqConfigS_storage_size 256
1801
1802 struct {
1803 bool dispnameLOCK :1 ;
1804 bool storageLOCK :1 ;
1805 bool prefixLOCK :1 ;
1806 bool postfixLOCK :1 ;
1807 } bits;
1808
1846
1848
1849#if META_HAVE_LIBCONFIG
1900
1903
1906#else
1907 void * cfg_dummy;
1908 void * rootH_dummy;
1909 void * filterH_dummy;
1910#endif // META_HAVE_LIBCONFIG
1911
1912};
1913
1915__parser__(ignore)
1916struct MqSetupS {
1917
1938 //MK_STRN ident;
1940
1943
1954 struct MqCallbackS BgError;
1955
1965
1978 // PRIVATE: \attention the \RMKNS{BFL} commandline-arguments are available at \RCNs{LinkS::alfa} in \RCNs{ContextS::link}
1979 struct MqCallbackS ServerSetup;
1980
1990 struct MqCallbackS ServerCleanup;
1991
1992 // misc
1993
2013 struct MqCallbackS Event;
2014
2017
2030};
2031
2033// MqContextC_ConfigApi_Misc_C_API
2034
2035// #######################################################################
2036// -----------------------------------------------------------------------
2041
2042__parser__push__(doc-group=Set,doc-index=ConfigApi);
2043
2045MQ_EXTERN void
2048 MQ_CTX const ctx,
2051
2059__parser__(internal)
2060MQ_EXTERN void
2063 MQ_CTX const ctx,
2066
2068MQ_EXTERN void
2071 MQ_CTX const ctx,
2074
2076MQ_EXTERN void
2079 MQ_CTX const ctx,
2082
2084MQ_EXTERN void
2087 MQ_CTX const ctx,
2090
2091
2095__parser__(internal)
2096MQ_EXTERN void
2098 MQ_CTX const ctx,
2100) MK_ATTR_HDL;
2101
2108 MQ_CTX const ctx,
2109 MK_I32 const data
2111
2115MQ_EXTERN void
2117 MQ_CTX const ctx,
2118 bool data
2119) MK_ATTR_HDL;
2120
2124 MQ_CTX const ctx,
2125 enum MqStartE data
2126) MK_ATTR_HDL;
2127
2131 MQ_CTX const ctx,
2133) MK_ATTR_HDL;
2134
2136MQ_EXTERN bool
2138 MQ_CTX const ctx,
2139 enum MqStartE data
2140) MK_ATTR_HDL;
2141
2151 MQ_CTX const ctx,
2152 MK_STRN file
2154
2164 MQ_CTX const ctx,
2165 MK_STRN host __parser__(default=F#STRING_NULL),
2166 MK_STRN port __parser__(default=F#STRING_NULL),
2167 MK_STRN myhost __parser__(default=F#STRING_NULL),
2168 MK_STRN myport __parser__(default=F#STRING_NULL)
2170
2172//
2177__parser__(no-type-extension,overload=MqConfigSetIoTcp)
2181 MQ_CTX const ctx,
2182 MK_BFL const vals
2184
2189//
2197 MQ_CTX const ctx,
2198 MQ_SOCK_HDL fh
2200
2218 MQ_CTX const ctx,
2219 MK_STRN pidfile
2221
2223MQ_EXTERN void
2225 MQ_CTX const ctx,
2226 MK_I32 data
2227) MK_ATTR_HDL;
2228
2230MQ_EXTERN void
2232 MQ_CTX const ctx,
2233 MK_I32 data
2234) MK_ATTR_HDL;
2235
2237MQ_EXTERN void
2239 MQ_CTX const ctx,
2241) MK_ATTR_HDL;
2242
2244MQ_EXTERN void
2246 MQ_CTX const ctx,
2247 bool data
2248) MK_ATTR_HDL;
2249
2251MQ_EXTERN void
2253 MQ_CTX const ctx,
2254 enum MqIdentE data
2255) MK_ATTR_HDL;
2256
2258MQ_EXTERN void
2260 MQ_CTX const ctx,
2261 bool data
2262) MK_ATTR_HDL;
2264
2266// MqContextC_ConfigApi_Set_C_API
2267
2268
2269// #######################################################################
2270// -----------------------------------------------------------------------
2292
2293__parser__push__(doc-group=Interface,doc-index=ConfigApi);
2294
2307#define MqInterfaceDoc(mkrt,ctx,fCall,callback,fFree,fCopy)
2308
2314__parser__(no-rpc,callback-name=ServerSetup,callback-null)
2315MQ_EXTERN void
2318 MQ_CTX const ctx,
2319 MqTokenF fCall __parser__(callback-call),
2320 MK_CBP callback __parser__(callback-null,callback-data),
2321 MqDataFreeF fFree __parser__(callback-free),
2322 MqDataCopyF fCopy __parser__(callback-copy)
2324
2330__parser__(no-rpc,callback-name=ServerCleanup,callback-null)
2331MQ_EXTERN void
2334 MQ_CTX const ctx,
2335 MqTokenF fCall __parser__(callback-call),
2336 MK_CBP callback __parser__(callback-data),
2337 MqDataFreeF fFree __parser__(callback-free),
2338 MqDataCopyF fCopy __parser__(callback-copy)
2340
2346__parser__(no-rpc,callback-name=BgError,callback-null)
2347MQ_EXTERN void
2350 MQ_CTX const ctx,
2351 MqTokenF fCall __parser__(callback-call),
2352 MK_CBP callback __parser__(callback-data),
2353 MqDataFreeF fFree __parser__(callback-free),
2354 MqDataCopyF fCopy __parser__(callback-copy)
2356
2366__parser__(no-rpc,callback-name=Event,callback-null)
2367MQ_EXTERN void
2370 MQ_CTX const ctx,
2371 MqTokenF fCall __parser__(callback-call),
2372 MK_CBP callback __parser__(callback-data),
2373 MqDataFreeF fFree __parser__(callback-free),
2374 MqDataCopyF fCopy __parser__(callback-copy)
2376
2378
2380// MqContextC_ConfigApi_Interface_C_API
2381
2382// #######################################################################
2383// -----------------------------------------------------------------------
2388
2391#define MQ_IS_SERVER(ctx) (ctx->setup.isServer == true)
2392#define MQ_IS_SERVER_PARENT(ctx) (MQ_IS_SERVER(ctx) && MQ_IS_PARENT(ctx))
2393#define MQ_IS_CLIENT(ctx) (ctx->setup.isServer == false)
2394#define MQ_IS_CLIENT_PARENT(ctx) (MQ_IS_CLIENT(ctx) && MQ_IS_PARENT(ctx))
2395#define MQ_IS_CHILD(ctx) ((ctx)->config.parent != NULL)
2396#define MQ_IS_PARENT(ctx) ((ctx)->config.parent == NULL)
2397#define MQ_IS_SLAVE(ctx) ((ctx)->config.master != NULL)
2398#define MQ_IS_MASTER(ctx) ((ctx)->config.master == NULL)
2399#define MQ_IS_LOOPBACK(ctx) ((ctx)->config.io.com == MQ_IO_LOOP)
2400
2401#define MQ_GET_PARENT(ctx) (MQ_IS_CHILD(ctx) ? ctx->link.ctxIdP : ctx)
2402#define MQ_GET_MASTER(ctx) (MQ_IS_SLAVE(ctx) ? ctx->config.master : ctx)
2404
2406
2407/* ####################################################################### */
2408/* ### ### */
2409/* ### C T X - L O G - A P I ### */
2410/* ### ### */
2411/* ####################################################################### */
2412
2427
2428__parser__push__(doc-group=Log,doc-index=LogApi);
2429
2440__parser__(const,flags=new,runtime=MqContextLog)
2443 MQ_CTXN const ctx ,
2444 MK_OBJN fmtobj __parser__(default=NULL),
2445 MK_DBG const debug __parser__(default=0),
2446 MK_STRN const callfunc __parser__(default=F#FUNC),
2447 MK_I32 const lvl __parser__(default=0)
2449
2461__parser__(const,runtime=MqContextLogShort)
2464 MQ_CTXN const ctx ,
2465 MK_OBJN fmtobj __parser__(default=NULL),
2466 MK_DBG const debug __parser__(default=0),
2467 MK_STRN const callfunc __parser__(default=F#FUNC),
2468 MK_I32 const lvl __parser__(default=0),
2469 MK_STRN const label __parser__(default=F#STRING_NULL)
2471
2480__parser__(const,runtime=MqContextLogConfig)
2483 MQ_CTXN const ctx,
2484 MK_OBJN fmtobj __parser__(default=NULL),
2485 MK_DBG const debug __parser__(default=0),
2486 MK_STRN const callfunc __parser__(default=F#FUNC),
2487 MK_I32 const lvl __parser__(default=0)
2489
2498__parser__(const,runtime=MqContextLogSetup)
2501 MQ_CTXN const ctx,
2502 MK_OBJN fmtobj __parser__(default=NULL),
2503 MK_DBG const debug __parser__(default=0),
2504 MK_STRN const callfunc __parser__(default=F#FUNC),
2505 MK_I32 const lvl __parser__(default=0)
2507
2516__parser__(const,runtime=MqContextLogLink)
2519 MQ_CTXN ctx ,
2520 MK_OBJN const fmtobj __parser__(default=NULL),
2521 MK_DBG const debug __parser__(default=0),
2522 MK_STRN const callfunc __parser__(default=F#FUNC),
2523 MK_I32 const lvl __parser__(default=0)
2525
2536__parser__(const,runtime=MqContextLogEnv)
2539 MQ_CTX const ctx ,
2540 MK_OBJ const fmtobj __parser__(default=NULL),
2541 MK_DBG const debug __parser__(default=0),
2542 MK_STRN const callfunc __parser__(default=F#FUNC),
2543 MK_I32 const lvl __parser__(default=0)
2545
2556__parser__(const)
2559 MQ_CTX const ctx ,
2560 MK_OBJ fmtobj __parser__(default=NULL),
2561 MK_DBG const debug __parser__(default=0),
2562 MK_STRN const callfunc __parser__(default=F#FUNC),
2563 MK_I32 const lvl __parser__(default=0)
2565
2566__parser__(ignore)
2568
2569// end of class=MqContextC,doc-group=Log
2571
2573// MqContextC_LogApi_Log_C_API
2574
2575// #######################################################################
2576// -----------------------------------------------------------------------
2589
2598typedef int (*MqSysSelectF) (int max, void* read, void* write, void* except, struct timeval* timeout);
2599
2613
2638__parser__(ignore)
2641);
2642
2644__parser__(ignore)
2645struct MqLalS {
2648
2661 enum MkErrorE (*SysServerSpawn) (
2663 MQ_CTX const ctx,
2664 char *const * argv,
2665 MK_STRN name,
2666 struct MkIdS * val_out
2667 );
2668
2684 enum MkErrorE (*SysServerThread) (
2686 MQ_CTX const ctx,
2687 struct MqSysServerThreadMainS * const argP,
2688 MK_STRN name,
2689 int state,
2690 struct MkIdS * val_out
2691 );
2692
2708 enum MkErrorE (*SysServerFork) (
2710 MQ_CTX const ctx,
2711 MQ_FCT factory,
2712 MK_BFL* argsP,
2713 MK_STRN name,
2714 MQ_SOCK_HDL socket,
2715 struct MkIdS * val_out
2716 );
2717};
2718
2720__parser__(ignore)
2722
2724// - MqMsgque_Sys_C_API
2725
2726/* MARK_E ################################################################ */
2727/* ### ### */
2728/* ### E R R O R - A P I ### */
2729/* ### ### */
2730/* ####################################################################### */
2731
2742
2744__parser__(internal)
2745struct MqErrorS {
2746 // BEGIN-MqErrorS-super - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
2747
2748 union {
2749 struct MkObjectS obj; // instance-base MkObjectS
2750 struct MkExtensionS ext; // instance-base MkExtensionS
2751 struct MkErrExtS errext; // instance-base MkErrExtS
2753
2754 // END-MqErrorS-super - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
2755
2756 // instance attributes
2757 char errhint; // the TYPE if the \e errobj U=undefined, C=client, S=server
2758
2759 MQ_CTXN client_ctx; // context source of the error, NULL = current context
2760
2761 // The \e error_protect is used in \RCNs{SendERROR} to restructure the environment at
2762 // the time of the error. The data is a copy of the \RCNs{LinkS::protect} data
2763 struct MqEnvS client_protect;
2764
2765 MQ_CTXN server_ctx; // context source of the error, NULL = current context
2766
2767 // The \e error_protect is used in \RCNs{SendERROR} to restructure the environment at
2768 // the time of the error. The data is a copy of the \RCNs{LinkS::protect} data
2769 struct MqEnvS server_protect;
2770};
2771
2772// BEGIN-MqErrorS-Definition - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
2773
2777 __parser__push__(prefix=Class, doc-group=Define, doc-index=Class);
2778
2779
2780// Signature --------------------------------------------------------------
2783
2784 #define MqErrorC_SIGNATURE (MkErrExtC_SIGNATURE ^ (1u<<3))
2785 #define MqErrorC_MASK (((1u<<29)-1)<<3)
2786
2788
2789// CompileTimeCast --------------------------------------------------------------
2792
2793 #define MqErrorC_X2err(x) (x)
2794 #define MqErrorC_X2errext(x) MkERREXT(x)
2795 #define MqErrorC_X2ext(x) MkEXT(x)
2796 #define MqErrorC_X2obj(x) MkOBJ(x)
2797
2799
2800
2801// TypeDef --------------------------------------------------------------
2804
2806 __parser__(ignore) typedef struct MqErrorS MqErrorCR;
2808 __parser__(ignore) typedef const struct MqErrorS MqErrorCNR;
2810 #define MqErrorC_T (&MQ_RT_REF._MqErrorC_T)
2812 #define MqErrorC_TT (MkTYP(MqErrorC_T))
2814 #define MqErrorST MqErrorC_T
2816 #define MqErrorSTT (MkTYP(MqErrorST))
2818 #define MqErrorC_type MQ_ERR
2820 #define MqErrorCT_X(instance) ( (struct MkSuperTypeS *) (MkOBJ_R(instance).type) )
2822 #define MqErrorCTT_X(instance) (MkOBJ_R(instance).type)
2824 #define MqErrorCT_TT(typ) ( (struct MkSuperTypeS *) (typ) )
2826 #define MqErrorC_NS MQ
2828 #define MqErrorCTT MqErrorCTT
2830 #define MqErrorCT ( (struct MkSuperTypeS *) MqErrorCTT )
2831
2833
2834
2835// TypeCheck --------------------------------------------------------------
2838
2839 #pragma GCC diagnostic push
2840 #pragma GCC diagnostic ignored "-Wattributes"
2841
2844 __parser__(class=MqErrorC,static,ignore)
2846 return MkSanitizeCheck(MqErrorC,mng);
2847 }
2848
2851 __parser__(class=MqErrorC,static,ignore)
2853 return MkSanitizeCheckO(MqErrorC,obj);
2854 }
2855
2856 #pragma GCC diagnostic pop
2857 #define MqErrorC_Check(mng) MqErrCheck(mng)
2858
2860
2861
2862// RunTimeCast --------------------------------------------------------------
2865
2867 __parser__(class=MqErrorC,ignore,static)
2868 META_ATTRIBUTE_SANITIZE
2870 return (MqErrCheck(mng) ? (MQ_ERR)mng : NULL);
2871 }
2872
2874 __parser__(class=MqErrorC,ignore,static)
2875 META_ATTRIBUTE_SANITIZE
2877 return (MqErrCheck(mng) ? (MQ_ERRN)mng : NULL);
2878 }
2879
2881 #define MqErrRaise(_err) if (!_MkCheckX(MqErrorC,_err)) { \
2882 MkErrorSetC_1E("'MqErrorC' hdl is NULL"); \
2883 goto error ; \
2884 }
2885
2887 #define MqERR_R(x) (*(x)).super.err
2889 #define MqERR(x) (&MqERR_R(x))
2890
2892
2895// MqErrorC_Class_Define_C_API
2896
2897// END-MqErrorS-Definition - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
2898
2901#define MqERROR_R(r) ((*r).error_mq)
2902#define MqERROR_RT MqERROR_R(&MQ_RT_REF)
2903#define MqERROR_O(o) MqERROR_R(MqRT_O(o))
2904#define MqERROR_X(x) MqERROR_R(MqRT_X(x))
2905#define MqERROR_XN(x) MqERROR_R(MqRT_XN(x))
2906#define MqERROR MqERROR_R(&MqRuntimeRLS)
2908
2909
2915__parser__(ignore)
2917 MQ_ERR const err
2918) MK_ATTR_HDL;
2919
2921// MqErrorC_C_API
2922
2923/* ####################################################################### */
2924/* ### ### */
2925/* ### F A C T O R Y - A P I ### */
2926/* ### ### */
2927/* ####################################################################### */
2928
2986
2987#define MqFactoryPanic(fct) if (fct == NULL) MkPanicC(MK_ERROR_PANIC, __func__, -1, "MqFactoryS exception");
2988
2996typedef enum MkErrorE ( MK_DECL
2998) (
3000 MQ_CTX const tmpl,
3001 enum MqFactoryE create,
3002 MQ_FCT const fct,
3003 MQ_CTX * ctx_out
3004);
3005
3007#define MQ_CALLBACK_FACTORY_CTOR_ARGS \
3008 MQ_RT_ARGS \
3009 MQ_CTX const tmpl, \
3010 enum MqFactoryE create, \
3011 struct MqFactoryS * const fct, \
3012 MQ_CTX *contextP \
3013
3014#define MQ_CALLBACK_FACTORY_CTOR_CALL MQ_RT_CALL tmpl, create, fct, contextP
3015
3029typedef void ( MK_DECL
3031) (
3033 MQ_CTX ctx,
3034 bool doFactoryCleanup,
3035 MQ_FCT const fct
3037
3039typedef void ( MK_DECL
3041) (
3043 MK_PTR *dataP
3045
3047typedef void ( MK_DECL
3049) (
3051 MK_PTR *dataP
3053
3055__parser__(ignore)
3062
3064__parser__(ignore)
3071
3076 // BEGIN-MqFactoryS-super - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
3077
3078 union {
3079 struct MkObjectS obj; // instance-base MkObjectS
3081
3082 // END-MqFactoryS-super - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
3083
3084 // instance attributes
3091};
3092
3093// BEGIN-MqFactoryS-Definition - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
3094
3098 __parser__push__(prefix=Class, doc-group=Define, doc-index=Class);
3099
3100
3101// Signature --------------------------------------------------------------
3104
3105 #define MqFactoryC_SIGNATURE (MkObjectC_SIGNATURE ^ (13u<<10))
3106 #define MqFactoryC_MASK (((1u<<22)-1)<<10)
3107
3109
3110// CompileTimeCast --------------------------------------------------------------
3113
3114 #define MqFactoryC_X2fct(x) (x)
3115 #define MqFactoryC_X2obj(x) MkOBJ(x)
3116
3118
3119
3120// TypeDef --------------------------------------------------------------
3123
3125 __parser__(ignore) typedef struct MqFactoryS MqFactoryCR;
3127 __parser__(ignore) typedef const struct MqFactoryS MqFactoryCNR;
3129 #define MqFactoryC_T (&MQ_RT_REF._MqFactoryC_T)
3131 #define MqFactoryC_TT (MkTYP(MqFactoryC_T))
3133 #define MqFactoryST MqFactoryC_T
3135 #define MqFactorySTT (MkTYP(MqFactoryST))
3137 #define MqFactoryC_type MQ_FCT
3139 #define MqFactoryCT_X(instance) ( (struct MkSuperTypeS *) (MkOBJ_R(instance).type) )
3141 #define MqFactoryCTT_X(instance) (MkOBJ_R(instance).type)
3143 #define MqFactoryCT_TT(typ) ( (struct MkSuperTypeS *) (typ) )
3145 #define MqFactoryC_NS MQ
3147 #define MqFactoryCTT MqFactoryCTT
3149 #define MqFactoryCT ( (struct MkSuperTypeS *) MqFactoryCTT )
3150
3152
3153
3154// TypeCheck --------------------------------------------------------------
3157
3158 #pragma GCC diagnostic push
3159 #pragma GCC diagnostic ignored "-Wattributes"
3160
3163 __parser__(class=MqFactoryC,static,hide)
3165 return MkSanitizeCheck(MqFactoryC,mng);
3166 }
3167
3170 __parser__(class=MqFactoryC,static,hide)
3172 return MkSanitizeCheckO(MqFactoryC,obj);
3173 }
3174
3175 #pragma GCC diagnostic pop
3176 #define MqFactoryC_Check(mng) MqFctCheck(mng)
3177
3179
3180
3181// RunTimeCast --------------------------------------------------------------
3184
3186 __parser__(class=MqFactoryC,hide,static)
3187 META_ATTRIBUTE_SANITIZE
3189 return (MqFctCheck(mng) ? (MQ_FCT)mng : NULL);
3190 }
3191
3193 __parser__(class=MqFactoryC,hide,static)
3194 META_ATTRIBUTE_SANITIZE
3196 return (MqFctCheck(mng) ? (MQ_FCTN)mng : NULL);
3197 }
3198
3200 #define MqFctRaise(_fct) if (!_MkCheckX(MqFactoryC,_fct)) { \
3201 MkErrorSetC_1E("'MqFactoryC' hdl is NULL"); \
3202 goto error ; \
3203 }
3204
3206 #define MqFCT_R(x) (*(x)).super.fct
3208 #define MqFCT(x) (&MqFCT_R(x))
3209
3211
3214// MqFactoryC_Class_Define_C_API
3215
3216// END-MqFactoryS-Definition - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
3217
3218// =========================================================================
3219// BEGIN-MqFactoryS-Export - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
3220
3223
3226
3227__parser__push__(doc-group=_ignore_,doc-index=Class,doc-name=Export,class=MqFactoryC);
3228
3241__parser__(class-overload=MkObjectHandleGet)
3249
3258__parser__(flags=new)
3265
3275#define MqFactoryHandleResolve_e(netHdl) ({ \
3276 MK_HDL tmpHdl=netHdl; \
3277 MQ_FCT tmp; \
3278 if (tmpHdl==0) { \
3279 tmp=NULL; \
3280 } else { \
3281 tmp=MqFactoryHandleResolve(tmpHdl); \
3282 if (tmp==NULL) { \
3283 MkErrorSetC_1_NULL("ERROR: 'MqFactoryC' handle is 'NULL'"); \
3284 goto error; \
3285 }; \
3286 }; \
3287 tmp; \
3288})
3289
3291
3293// Class export & import
3294
3298 __parser__(flags=new,doc-group=_ignore_,doc-index=Class,doc-name=Misc,class=MqFactoryC,null-return-allow)
3300 return (MQ_FCT)MK_NULL;
3301 }
3303// MqFactoryC - Misc - function
3304
3306// MqFactoryC_Class_C_API
3307
3308// END-MqFactoryS-Export - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
3309
3310// #######################################################################
3311// -----------------------------------------------------------------------
3316
3317__parser__push__(doc-group=Get);
3318
3320__parser__(hide)
3322 MQ_FCTN const fct
3323) MK_ATTR_HDL;
3324
3326__parser__(internal)
3328 MQ_FCTN const fct
3329) MK_ATTR_HDL;
3330
3334 MQ_FCTN const fct
3335) MK_ATTR_HDL;
3336
3350 MK_STRN const ident __parser__(default=S#"")
3351);
3352
3364 MK_STRN const ident __parser__(default=S#"")
3365) MK_ATTR_HDL ;
3366
3380// [MqFactoryGetCalledL_RT]
3381__parser__(no-type-extension,overload=MqFactoryGetCalled)
3384 MK_BFLN largs __parser__(argument)
3386// [MqFactoryGetCalledL_RT]
3387
3389
3391// MqFactoryC_Get_C_API
3392
3393// #######################################################################
3394// -----------------------------------------------------------------------
3399
3400__parser__push__(doc-group=TOR);
3401
3409__parser__(hide)
3412 MQ_FCT const fct
3414
3417
3430__parser__(destructor,runtime=MqFactoryDelete)
3433 MQ_FCT fct
3435
3437
3466__parser__(constructor,lng-constr,no-rpc,overload-c-no)
3469 MK_OBJN const error __parser__(internal,default=NULL), //C# reguire non "ERROR" name
3470// constructor
3471 MqFactoryCTorF const createCallF __parser__(internal,default=FactoryObjCreate),
3472 MK_CCP const constructor __parser__(constructor),
3473 MqFactoryDataFreeF const createDataFreeF __parser__(internal,default=FactoryFree),
3474 MqFactoryDataCopyF const createDataCopyF __parser__(internal,default=FactoryDup2),
3475// destructor
3476 MqFactoryDTorF const deleteCallF __parser__(internal,default=FactoryObjDelete),
3477 MK_CCP const destructor __parser__(internal,default=NULL),
3478 MqFactoryDataFreeF const deleteDataFreeF __parser__(internal,default=NULL),
3479 MqFactoryDataCopyF const deleteDataCopyF __parser__(internal,default=NULL),
3480
3481 MK_STRN const ident __parser__(default=F#CTOR#constructor)
3483
3484#define MqFactoryAdd_1(fct) MqFactoryAdd(MK_ERROR_PANIC,fct,NULL, NULL, NULL, NULL, NULL, NULL, NULL, #fct)
3485#define MqFactoryAdd_2(fct,ident) MqFactoryAdd(MK_ERROR_PANIC,fct,NULL, NULL, NULL, NULL, NULL, NULL, NULL, ident)
3486
3498__parser__(constructor,internal)
3501 MK_OBJN const error,
3502 MK_STRN const ident,
3503 MkSelfCreateF const fctCreate,
3504 MkSelfDeleteF const fctDelete,
3505 MkConstructorF const constructor,
3506 MkSelfDeleteF const selfDelete
3508
3510__parser__(constructor)
3513 MQ_FCTN const fct,
3514 MK_STRN const ident
3516
3518
3520// MqFactoryC_TOR_C_API
3521
3522// #######################################################################
3523// -----------------------------------------------------------------------
3528
3529__parser__push__(doc-group=Misc);
3530
3546 MQ_FCT const fct
3547) MK_ATTR_HDL;
3548
3566 MQ_FCT const fct
3567) MK_ATTR_HDL;
3568
3571 void
3572);
3573
3576 void
3577);
3578
3598__parser__(class=MqFactoryC,flags=virtual)
3601 MQ_FCT const fct,
3602 MQ_CTX const tmpl __parser__(internal,default=NULL),
3603 MQ_CTX* const val_out
3605
3612 MK_STRN const callfunc __parser__(default=F#FUNC)
3614
3617
3628__parser__(const,flags=new)
3631 MQ_FCTN const fct,
3632 MK_OBJN fmtobj __parser__(default=NULL),
3633 MK_DBG const debug __parser__(default=0),
3634 MK_STRN const callfunc __parser__(default=F#FUNC),
3635 MK_I32 const lvl __parser__(default=0)
3637
3638#define MqFactoryLog_2M(fct,m) MqFactoryLog_2(fct,MkObj(m))
3639
3641
3643
3645// MqFactoryC_Misc_C_API
3646
3648// MqFactoryC_C_API
3649
3650// #######################################################################
3651// -----------------------------------------------------------------------
3656
3662__parser__(ignore)
3664 // BEGIN-MqCtxTypeS-super - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
3665
3666 union {
3667 struct MkObjectS obj; // instance-base MkObjectS
3668 struct MkTypeS typ; // instance-base MkTypeS
3670
3671 // END-MqCtxTypeS-super - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
3672
3673 // instance attributes
3674
3683
3686
3689
3692
3697
3702
3705
3708
3711
3714
3717
3722 struct MqLinkSetupS Child;
3723
3726 struct MqLinkSetupS Parent;
3727
3740 struct MqCallbackS Idle;
3741
3744
3747
3757
3760
3763
3772};
3773
3774// BEGIN-MqCtxTypeS-Definition - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
3775
3779 __parser__push__(prefix=Class, doc-group=Define, doc-index=Class);
3780
3781
3782// Signature --------------------------------------------------------------
3785
3786 #define MqCtxTypeC_SIGNATURE (MkTypeC_SIGNATURE ^ (2u<<6))
3787 #define MqCtxTypeC_MASK (((1u<<26)-1)<<6)
3788
3790
3791// CompileTimeCast --------------------------------------------------------------
3794
3795 #define MqCtxTypeC_X2ctxtyp(x) (x)
3796 #define MqCtxTypeC_X2typ(x) MkTYP(x)
3797 #define MqCtxTypeC_X2obj(x) MkOBJ(x)
3798
3800
3801
3802// TypeDef --------------------------------------------------------------
3805
3807 __parser__(ignore) typedef struct MqCtxTypeS MqCtxTypeCR;
3809 __parser__(ignore) typedef const struct MqCtxTypeS MqCtxTypeCNR;
3811 #define MqCtxTypeSTT (&MQ_RT_REF._MqCtxTypeC_TT)
3813 #define MqCtxTypeC_TT (&MQ_RT_REF._MqCtxTypeC_TT)
3815 #define MqCtxTypeC_type MQ_CTXTYP
3817 #define MqCtxTypeCT_X(instance) ( (struct MkTypeS *) (MkOBJ_R(instance).type) )
3819 #define MqCtxTypeCTT_X(instance) (MkOBJ_R(instance).type)
3821 #define MqCtxTypeCT_TT(typ) ( (struct MkTypeS *) (typ) )
3823 #define MqCtxTypeC_NS MQ
3825 #define MqCtxTypeCTT MqCtxTypeCTT
3827 #define MqCtxTypeCT ( (struct MkTypeS *) MqCtxTypeCTT )
3828
3830
3831
3832// TypeCheck --------------------------------------------------------------
3835
3836 #pragma GCC diagnostic push
3837 #pragma GCC diagnostic ignored "-Wattributes"
3838
3841 __parser__(class=MqCtxTypeC,static,ignore)
3843 return MkSanitizeCheck(MqCtxTypeC,mng);
3844 }
3845
3848 __parser__(class=MqCtxTypeC,static,ignore)
3850 return MkSanitizeCheckO(MqCtxTypeC,obj);
3851 }
3852
3853 #pragma GCC diagnostic pop
3854 #define MqCtxTypeC_Check(mng) MqCtxTypCheck(mng)
3855
3857
3860// MqCtxTypeC_Class_Define_C_API
3861
3862// END-MqCtxTypeS-Definition - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
3863
3865__parser__(class=MqContextC,internal,static)
3867 if (!MkObjCheck(mng)) return NULL;
3868 MK_OBJ obj = (MK_OBJ) mng;
3869 if (MqCtxTypCheck(obj)) return (MQ_CTXT)obj;
3870 MQ_CTXT typ = (MQ_CTXT) obj->type;
3871 if (MqCtxTypCheck(typ)) return typ;
3872 return NULL;
3873}
3874
3885__parser__(internal,const,flags=new,runtime=MqCtxTypeLog_RT)
3888 MQ_CTXT const ctxtype ,
3889 MK_OBJ fmtobj __parser__(default=NULL),
3890 MK_DBG const debug __parser__(default=0),
3891 MK_STRN const callfunc __parser__(default=F#FUNC),
3892 MK_I32 const lvl __parser__(default=0)
3894
3896// MqCtxTypeC_C_API
3897
3898/* ####################################################################### */
3899/* ### ### */
3900/* ### C O N T E X T - A P I ### */
3901/* ### ### */
3902/* ####################################################################### */
3903
3985
3986// ===================================================================================================
3987
3989#if defined(MQ_C_BUILD_DLL)
3990
3991 #define META_SECTION_DEFINE
3992 #include "MqContextS_mq.h"
3993 #undef META_SECTION_DEFINE
3994
3995#else // MQ_C_BUILD_DLL
3996
3998 // BEGIN-MqContextS-super - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
3999
4000 union {
4001 struct MkObjectS obj; // instance-base MkObjectS
4003
4004 // END-MqContextS-super - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
4005
4006 // instance attributes
4007 const
4012 struct MqLinkS link;
4013
4014 // offset calculated by "Nhi1InternalSize"
4016};
4017
4018#endif // MQ_C_BUILD_DLL
4019
4020// BEGIN-MqContextS-Definition - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
4021
4025 __parser__push__(prefix=Class, doc-group=Define, doc-index=Class);
4026
4027
4028// Signature --------------------------------------------------------------
4031
4032 #define MqContextC_SIGNATURE (MkObjectC_SIGNATURE ^ (11u<<10))
4033 #define MqContextC_MASK (((1u<<22)-1)<<10)
4034
4036
4037// CompileTimeCast --------------------------------------------------------------
4040
4041 #define MqContextC_X2ctx(x) (x)
4042 #define MqContextC_X2obj(x) MkOBJ(x)
4043
4045
4046
4047// TypeDef --------------------------------------------------------------
4050
4052 __parser__(ignore) typedef struct MqContextS MqContextCR;
4054 __parser__(ignore) typedef const struct MqContextS MqContextCNR;
4056 #define MqContextC_T (&MQ_RT_REF._MqContextC_T)
4058 #define MqContextC_TT (MkTYP(MqContextC_T))
4060 #define MqContextST MqContextC_T
4062 #define MqContextSTT (MkTYP(MqContextST))
4064 #define MqContextC_type MQ_CTX
4066 #define MqContextCT_X(instance) ( (struct MqCtxTypeS *) (MkOBJ_R(instance).type) )
4068 #define MqContextCTT_X(instance) (MkOBJ_R(instance).type)
4070 #define MqContextCT_TT(typ) ( (struct MqCtxTypeS *) (typ) )
4072 #define MqContextC_NS MQ
4074 #define MqContextCTT MqContextCTT
4076 #define MqContextCT ( (struct MqCtxTypeS *) MqContextCTT )
4077
4079
4080
4081// TypeCheck --------------------------------------------------------------
4084
4085 #pragma GCC diagnostic push
4086 #pragma GCC diagnostic ignored "-Wattributes"
4087
4090 __parser__(class=MqContextC,static,hide)
4092 return MkSanitizeCheck(MqContextC,mng);
4093 }
4094
4097 __parser__(class=MqContextC,static,hide)
4099 return MkSanitizeCheckO(MqContextC,obj);
4100 }
4101
4102 #pragma GCC diagnostic pop
4103 #define MqContextC_Check(mng) MqCtxCheck(mng)
4104
4106
4107
4108// RunTimeCast --------------------------------------------------------------
4111
4113 __parser__(class=MqContextC,hide,static)
4114 META_ATTRIBUTE_SANITIZE
4116 return (MqCtxCheck(mng) ? (MQ_CTX)mng : NULL);
4117 }
4118
4120 __parser__(class=MqContextC,hide,static)
4121 META_ATTRIBUTE_SANITIZE
4123 return (MqCtxCheck(mng) ? (MQ_CTXN)mng : NULL);
4124 }
4125
4127 #define MqCtxRaise(_ctx) if (!_MkCheckX(MqContextC,_ctx)) { \
4128 MkErrorSetC_1E("'MqContextC' hdl is NULL"); \
4129 goto error ; \
4130 }
4131
4133 #define MqCTX_R(x) (*(x)).super.ctx
4135 #define MqCTX(x) (&MqCTX_R(x))
4136
4138
4141// MqContextC_Class_Define_C_API
4142
4143// END-MqContextS-Definition - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
4144
4145// =========================================================================
4146// BEGIN-MqContextS-Export - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
4147
4150
4153
4154__parser__push__(doc-group=_ignore_,doc-index=Class,doc-name=Export,class=MqContextC);
4155
4168__parser__(class-overload=MkObjectHandleGet)
4176
4185__parser__(flags=new)
4192
4202#define MqContextHandleResolve_e(netHdl) ({ \
4203 MK_HDL tmpHdl=netHdl; \
4204 MQ_CTX tmp; \
4205 if (tmpHdl==0) { \
4206 tmp=NULL; \
4207 } else { \
4208 tmp=MqContextHandleResolve(tmpHdl); \
4209 if (tmp==NULL) { \
4210 MkErrorSetC_1_NULL("ERROR: 'MqContextC' handle is 'NULL'"); \
4211 goto error; \
4212 }; \
4213 }; \
4214 tmp; \
4215})
4216
4218
4220// Class export & import
4221
4225 __parser__(flags=new,doc-group=_ignore_,doc-index=Class,doc-name=Misc,class=MqContextC,null-return-allow)
4227 return (MQ_CTX)MK_NULL;
4228 }
4230// MqContextC - Misc - function
4231
4233// MqContextC_Class_C_API
4234
4235// END-MqContextS-Export - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
4236
4238// MqContextC_C_API
4239
4240// #######################################################################
4241// -----------------------------------------------------------------------
4246
4247__parser__push__(doc-group=TOR);
4248
4250__parser__(internal)
4253 MQ_CTX const ctx,
4254 MK_TYP type,
4255 MQ_CTX const tmpl
4257
4264__parser__(internal)
4267 MQ_CTX const ctx
4269
4288__parser__(constructor,lng-constr)
4291 MK_TYP type __parser__(internal,default=NULL),
4292 MQ_CTX const tmpl __parser__(default=NULL)
4294
4301__parser__(internal,constructor)
4304 MK_TYP type __parser__(internal,default=NULL),
4305 MQ_CTX const tmpl __parser__(default=NULL),
4306 MQ_CTX *ctx_out
4308
4311
4322__parser__(destructor,runtime=MqContextDelete)
4325 MQ_CTX ctx
4327
4329
4331
4333// MqContextC_TOR_C_API
4334
4335// #######################################################################
4336// -----------------------------------------------------------------------
4342
4343__parser__push__(doc-group=Error,doc-index=ErrorApi);
4344
4365__parser__(ignore-error,no-static)
4368 MQ_CTXN const targetCtx ,
4369 MQ_CTXN const sourceCtx
4371
4386__parser__(ignore-error,no-static)
4389 MQ_CTXN const targetCtx ,
4390 MQ_CTXN const sourceCtx
4392
4396 MQ_CTXN const fmtobj __parser__(default=NULL)
4397) {
4398 return MkErrorFORMAT(MkOBJ(fmtobj));
4399}
4400
4402
4404// MqContextC_ErrorApi_Error_C_API
4405
4406
4407// #######################################################################
4408// -----------------------------------------------------------------------
4413
4414__parser__push__(doc-group=Misc,doc-index=MiscApi);
4415
4418 return ctx ? (MQ_IS_SLAVE(ctx) ? MqGetRoot(ctx->config.master) : MQ_GET_PARENT(ctx)) : NULL;
4419}
4420
4422__parser__(ignore)
4424 return ctx ? (MQ_IS_SLAVE(ctx) ? MqGetRoot(ctx->config.master) : MQ_GET_PARENT(ctx)) : NULL;
4425}
4426
4468 MQ_CTX const ctx,
4469 MK_STRN const callfunc __parser__(default=F#FUNC),
4470 MK_STRN const callfile __parser__(default=F#FILE),
4471 MK_I32 const callline __parser__(default=F#LINE)
4473
4486__parser__(internal)
4489 MQ_CTX const ctx
4491
4508__parser__(hide)
4511 MQ_CTX const ctx,
4512 MK_BFLN args
4514
4524 MQ_CTX const ctx
4526
4575
4578 MQ_CTX const ctx,
4579 enum MqWaitOnEventE const wait __parser__(default=MQ_WAIT_NO),
4580 MK_TIME_T timeout __parser__(default=MK_TIMEOUT_DEFAULT)
4582
4583// sync with: MkObjectToString
4584//
4597 MQ_CTXN const ctx
4599
4600/*
4612__parser__(internal)
4613MQ_EXTERN bool MK_DECL MqContextCheckLock (
4614 MQ_CTX ctx
4615) MK_ATTR_HDL
4616*/
4617
4619
4621// MqContextC_MiscApi_Misc_C_API
4622
4623// #######################################################################
4624// -----------------------------------------------------------------------
4650
4651__parser__push__(doc-group=Env,doc-index=EnvApi);
4652
4658 MQ_CTX ctx
4660
4664 MQ_CTX ctx
4665) MK_ATTR_HDL;
4666
4669
4681__parser__(const,ignore,flags=new,runtime=MqEnvLog)
4684 MQ_ENVN const env ,
4685 MK_OBJN fmtobj __parser__(default=NULL),
4686 MK_DBG const debug __parser__(default=0),
4687 MK_STRN const callfunc __parser__(default=F#FUNC),
4688 MK_I32 const lvl __parser__(default=0),
4689 MK_STRN const label __parser__(default=S#"ENV")
4691
4692#define MqEnvLog_0() MqEnvLog(&(META_CONTEXT_S)->link.protect,META_CONTEXT_S,NULL,0,__func__,0,"ENV")
4693#define MqEnvLog_1(env) MqEnvLog(env,NULL,NULL,0,__func__,0,"ENV")
4694#define MqEnvLog_2(env,fmt) MqEnvLog(env,fmt,NULL,0,__func__,0,"ENV")
4695#define MqEnvLog_3(env,fmt,lbl) MqEnvLog(env,fmt,lbl,0,__func__,0,"ENV")
4696
4698
4700
4702// MqContextC_EnvApi_Env_C_API
4703
4704// #######################################################################
4705// -----------------------------------------------------------------------
4782
4804
4805__parser__push__(doc-group=Storage,doc-index=StorageApi);
4806
4816 MQ_CTX const ctx,
4817 MQ_LTR transLId,
4818 MK_I32 *cnt_out
4820
4835 MQ_CTX const ctx,
4836 MK_STRN const storageFile
4838
4849 MQ_CTX const ctx
4851
4865 MQ_CTX const ctx,
4866 MQ_LTR *ltid_out
4868
4906 MQ_CTX const ctx,
4907 MQ_LTR *transLIdP_inout __parser__(default=0)
4909
4919 MQ_CTX const ctx,
4920 MQ_LTR transLId
4922
4932 MQ_CTX const ctx,
4933 MQ_LTR transLId
4935
4950 MQ_CTX const ctx,
4951 MQ_LTR *transLIdP_inout __parser__(default=0)
4953
4962 MQ_CTX const ctx,
4963 MQ_LTR *cnt_out
4965
4968
4972 MQ_CTX const ctx,
4973 MK_STRN const callfunc __parser__(default=F#FUNC)
4975
4976#define MqStorageLog_1(ctx) MqStorageLog(ctx,__func__)
4977
4979
4986__parser__(no-rpc)
4989 MQ_CTX const ctx,
4990 MQ_CTX *otherCtxP_out,
4991 MQ_LTR *otherLIdP_out
4993
4995
4997// MqContextC_StorageApi_Storage_C_API
4998
4999// #######################################################################
5000// -----------------------------------------------------------------------
5080
5081__parser__push__(doc-group=Link,doc-index=LinkApi);
5082
5122 MQ_CTX const ctx,
5123 MK_BAC args __parser__(default=NULL)
5125
5138 MQ_CTX const ctx
5140
5155 MQ_CTX const ctx
5157
5176 MQ_CTX const ctx,
5177 MQ_CTX const parent,
5178 MK_BAC const args __parser__(default=NULL)
5180
5196__parser__(hide,overload-c-no)
5199 MQ_CTX const ctx,
5200 MK_BAC const args __parser__(default=NULL)
5202
5214 MQ_CTX const ctx
5216
5227 MQ_CTX const ctx
5228) MK_ATTR_HDL;
5229
5235 // BUF FIX: result always a context id "ctx" is valid
5236 // test: Nhi1Exec lcconfig.test --block-2 --fast-testing --lang-tcl -verbose e
5237 // -match lcconfig-2-5-* --num "1 3 1" --com-uds
5238 // RPC send "object-delete-message" on server-parent-context which can be
5239 // a client-child. The MqLinkGetParent is used to resolve this
5240 // file: LibLcConfigRpcClient.tcl
5241 return ctx ? MQ_GET_PARENT(ctx) : NULL;
5242};
5243
5251 return ctx ? MQ_IS_PARENT(ctx) : false;
5252};
5253
5264 return ctx ? ctx->link.ctxId : 0;
5265};
5266
5275 return ctx && ctx->link.ctxIdP ? ctx->link.ctxIdP->link.targetIdent : "";
5276};
5277
5279
5281// MqContextC_LinkApi_Link_C_API
5282
5283
5284// #######################################################################
5285// -----------------------------------------------------------------------
5479
5480__parser__push__(doc-group=Route,doc-index=RouteApi);
5481
5494 MQ_CTX ctx,
5495 MK_STRN route,
5496 MK_STRN service,
5497 bool overwrite __parser__(default=false)
5499
5505 MQ_CTX ctx,
5506 MK_STRN route,
5507 MK_STRN service,
5508 bool overwrite __parser__(default=false)
5510
5539 MQ_CTX ctx,
5540 MK_STRN service,
5541 MK_BAC args __parser__(default=NULL)
5543
5548#define MQ_ROUTE_CTX_MAX 50
5549
5579
5582 MQ_CTX const ctx,
5583 MK_STRN const ident,
5584 MK_NUM const retnum __parser__(default=-1)
5586
5602 MQ_CTX const ctx,
5603 MK_STRN * path_out
5605
5667 MQ_CTX const ctx,
5668 MK_BFL *treeP_out
5670
5672
5674// MqContextC_RouteApi_Route_C_API
5675
5676
5677// #######################################################################
5678// -----------------------------------------------------------------------
5738
5739__parser__push__(doc-group=Service,doc-index=ServiceApi);
5740
5774__parser__(type=ME_PSN_MQ_TOKEN:"token identifer")
5776
5778#define MQ_TOK_SIZE (8+1)
5779
5780// [MqServiceCallbackF]
5791// [MqServiceCallbackF]
5792
5801 MQ_CTX const ctx
5802) {
5803 MK_ATTR_HDL_CHECK(ctx);
5804 return (ctx->link.protect.transSId != 0);
5805}
5806
5815 MQ_CTX const ctx
5816) MK_ATTR_HDL;
5817
5826 MQ_CTX const ctx,
5827 MQ_TOK const token
5828) MK_ATTR_HDL ;
5829
5840 MQ_CTX const ctx,
5841 MQ_TOK const token
5842) MK_ATTR_HDL ;
5843
5886__parser__(no-rpc,callback-name=Service)
5889 MQ_CTX const ctx,
5890 MQ_TOK const token,
5891 MqServiceCallbackF const fCall __parser__(callback-call),
5892 MK_CBP callback __parser__(callback-data),
5893 MqDataFreeF fFree __parser__(callback-free),
5894 MkMarkF fMark __parser__(internal)
5896
5897// \anchor \NS{StorageService}
5912 MQ_CTX const ctx,
5913 MQ_TOK const token
5915
5924 MQ_CTX const ctx,
5925 MQ_TOK const token
5927
5935
5951 MQ_CTX const ctx,
5952 MQ_TOK const token,
5953 MQ_SLAVE_ID const id __parser__(default=MQ_SLAVE_OTHER)
5955
5960 MQ_CTX const ctx,
5961 MQ_TOK const token,
5962 MQ_CTX const target
5964
5985 MQ_CTX const ctx,
5986 MQ_TOK const token,
5987 MK_STRN const ident
5989
5995 MQ_CTX const ctx,
5996 MQ_TOK const token,
5997 MQ_CTX const target
5999
6001// MqServiceProxy
6002
6004
6006// MqContextC_ServiceApi_Service_C_API
6007
6008// #######################################################################
6009// -----------------------------------------------------------------------
6041// MqContextC_ReadApi_C_API
6042
6043// #######################################################################
6044// -----------------------------------------------------------------------
6049
6050__parser__push__(doc-group=Block,doc-index=ReadApi);
6051
6064 MQ_CTX const ctx,
6065 MK_BUF buf __parser__(default=NULL)
6067
6075 MQ_CTX const ctx
6077
6091 MQ_CTX const ctx
6093
6101 MQ_CTX const ctx
6103
6105
6107// MqContextC_ReadApi_Block_C_API
6108
6109// #######################################################################
6110// -----------------------------------------------------------------------
6115
6116__parser__push__(doc-group=Atom,doc-index=ReadApi);
6117
6125 MQ_CTX const ctx,
6126 MK_I8 * const val_out
6128
6133 MQ_CTX const ctx,
6134 MK_BOL * const val_out
6136
6141 MQ_CTX const ctx,
6142 MK_I16 * const val_out
6144
6149 MQ_CTX const ctx,
6150 MK_I32 * const val_out
6152
6157 MQ_CTX const ctx,
6158 MK_FLT * const val_out
6160
6165 MQ_CTX const ctx,
6166 MK_I64 * const val_out
6168
6173 MQ_CTX const ctx,
6174 MK_DBL * const val_out
6176
6201 MQ_CTX const ctx,
6202 MK_BUF* const val_out
6204
6222 MQ_CTX const ctx,
6223 MK_BFL* const val_out
6225
6241 MQ_CTX const ctx,
6242 MK_BFL* const val_inout __parser__(null-allow)
6244
6259__parser__(template-required,no-rpc,keep,no-static)
6262 MQ_CTX const ctx,
6263 MK_NAT_LIST* const val_out
6265
6274__parser__(template-required,no-rpc,keep,no-static)
6277 MQ_CTX const ctx,
6278 MK_NAT_OBJECT* const val_out
6280
6293 MQ_CTX const ctx,
6294 MK_LONG* const val_out
6296
6309 MQ_CTX const ctx,
6310 MK_HDL* const val_out
6312
6329 MQ_CTX const ctx,
6330 MK_STRN * const val_out
6332
6351 MQ_CTX const ctx,
6352 MkBinaryR * const val_out
6354
6365 MQ_CTX const ctx,
6366 MkStringR * const val_out
6368
6379 MQ_CTX const ctx,
6380 MkBinaryR * const val_out
6382
6384
6386// MqContextC_ReadApi_Atom_C_API
6387
6388// #######################################################################
6389// -----------------------------------------------------------------------
6394
6395__parser__push__(doc-group=Misc,doc-index=ReadApi);
6396
6397__parser__(doc-no)
6400 MQ_CTX const ctx
6402
6413 MQ_CTX const ctx
6415
6421 MQ_CTX const ctx
6422) MK_ATTR_HDL;
6423
6429 MQ_CTX const ctx
6430) MK_ATTR_HDL;
6431
6437 MQ_CTX const ctx
6438) MK_ATTR_HDL;
6439
6444__parser__(internal)
6446 MQ_CTX const ctx
6447) MK_ATTR_HDL;
6448
6453__parser__(internal)
6455 MQ_CTX const ctx
6456) MK_ATTR_HDL;
6457
6459
6461// MqContextC_ReadApi_Misc_C_API
6462
6463// #######################################################################
6464// -----------------------------------------------------------------------
6494
6495__parser__push__(doc-group=Proxy,doc-index=ProxyApi);
6496
6509 MQ_CTX const sourceCtx,
6510 MQ_CTX const targetCtx
6512
6542__parser__(internal)
6545 MQ_CTX const sourceCtx,
6546 MQ_CTX const targetCtx,
6547 MQ_DMP const dump __parser__(default=NULL)
6549
6578 MQ_CTX const sourceCtx,
6579 MQ_CTX const targetCtx,
6580 MQ_DMP const dump __parser__(default=NULL),
6581 MK_TIME_T const timeout __parser__(default=MK_TIMEOUT_DEFAULT)
6583
6585
6587// MqContextC_ProxyApi_Proxy_C_API
6588
6589// #######################################################################
6590// -----------------------------------------------------------------------
6721
6726__parser__(internal,doc-no,doc-group=Atom,doc-index=SendApi)
6728 MQ_CTX const ctx,
6729 enum MqHandShakeE handShake
6730) MK_ATTR_HDL;
6731
6733// MqContextC_SendApi_C_API
6734
6735// #######################################################################
6736// -----------------------------------------------------------------------
6746
6747__parser__push__(doc-group=Atom,doc-index=SendApi);
6748
6757 MQ_CTX const ctx,
6758 MK_I8 const val
6760
6764 MQ_CTX const ctx,
6765 MK_BOL const val
6767
6771 MQ_CTX const ctx,
6772 MK_I16 const val
6774
6778 MQ_CTX const ctx,
6779 MK_I32 const val
6781
6785 MQ_CTX const ctx,
6786 MK_FLT const val
6788
6792 MQ_CTX const ctx,
6793 MK_I64 const val
6795
6799 MQ_CTX const ctx,
6800 MK_DBL const val
6802
6803// \param[in] len the string leagth of \arg{val} or \arg{-1} to calculate with \c strlen
6811 MQ_CTX const ctx,
6812 MK_STRN const val
6814
6822 MQ_CTX const ctx,
6823 MkStringR const val
6825
6836 MQ_CTX const ctx,
6837 MkBinaryR const val
6839
6850 MQ_CTX const ctx,
6851 MkBinaryR const val
6853 return MqSendBIN_RT(MK_RT_CALL ctx, val);
6854}
6855
6862 MQ_CTX const ctx,
6863 MK_BUFN const val
6865
6881 MQ_CTX const ctx,
6882 MK_BFLN const val
6884
6895 MQ_CTX const ctx,
6896 MK_BFLN const val
6898
6914 MQ_CTX const ctx,
6915 MK_BUSN const val
6917
6925 MQ_CTX const ctx,
6926 MK_FST const printfmt,
6927 ...
6929
6938 MQ_CTX const ctx,
6939 MK_FST const printfmt,
6940 va_list var_list
6942
6965__parser__(doc-no)
6968 MQ_CTX const ctx,
6969 MQ_LTR const transLId
6971
6985 MQ_CTX const ctx,
6986 MK_LONG const val
6988
7001 MQ_CTX const ctx,
7002 MK_HDL const val
7004
7006
7008// MqContextC_SendApi_Atom_C_API
7009
7010// #######################################################################
7011// -----------------------------------------------------------------------
7016
7017__parser__push__(doc-group=Basics,doc-index=SendApi);
7018
7053 MQ_CTX const ctx,
7054 MQ_TOK const token,
7055 MK_TIME_T timeout __parser__(default=MK_TIMEOUT_DEFAULT)
7057
7084 MQ_CTX const ctx
7086
7102 MQ_CTX const ctx,
7103 MQ_TOK const token,
7104 MK_TIME_T timeout __parser__(default=MK_TIMEOUT_DEFAULT)
7106
7168
7169__parser__(no-rpc)
7172 MQ_CTX const ctx,
7173 MQ_TOK const token,
7174 MQ_TOK const callback,
7175 MK_TIME_T timeout __parser__(default=MK_TIMEOUT_DEFAULT)
7177
7200__parser__(no-rpc,callback-name=Service)
7203 MQ_CTX const ctx,
7204 MQ_TOK const token,
7205 MqServiceCallbackF const fCall __parser__(callback-call),
7206 MK_CBP callback __parser__(callback-data),
7207 MqDataFreeF fFree __parser__(callback-free),
7208 MK_TIME_T timeout __parser__(default=MK_TIMEOUT_DEFAULT)
7210
7248__parser__(no-rpc,callback-name=Service)
7251 MQ_CTX const ctx,
7252 MQ_TOK const token,
7253 MqServiceCallbackF const fCall __parser__(callback-call),
7254 MK_CBP callback __parser__(callback-data),
7255 MqDataFreeF fFree __parser__(callback-free),
7256 MK_TIME_T const timeout __parser__(default=MK_TIMEOUT_DEFAULT)
7258
7277 MQ_CTX const ctx
7279
7281
7283// MqContextC_SendApi_Basics_C_API
7284
7285// #######################################################################
7286// -----------------------------------------------------------------------
7291
7292__parser__push__(doc-group=Return,doc-index=SendApi);
7293
7311 MQ_CTX const ctx
7313
7314//#define MqSendRETURN(ctx) (dbg(ctx),MqSendRETURNx(ctx))
7315
7327 MQ_CTX const ctx
7329
7342 MQ_CTX const ctx
7344
7346
7348// MqContextC_SendApi_Return_C_API
7349
7350// #######################################################################
7351// -----------------------------------------------------------------------
7358
7359__parser__push__(doc-group=Block,doc-index=SendApi);
7360
7378 MQ_CTX const ctx
7380
7388 MQ_CTX const ctx
7390
7407 MQ_CTX const ctx
7409
7420 MQ_CTX const ctx
7422
7424
7426// MqContextC_SendApi_Block_C_API
7427
7428/* ####################################################################### */
7429/* ### ### */
7430/* ### S L A V E - A P I ### */
7431/* ### ### */
7432/* ####################################################################### */
7433
7608__parser__push__(doc-group=Slave,doc-index=SlaveApi);
7609
7639 MQ_CTX const ctx,
7640 MQ_SLAVE_ID const id,
7641 MK_STRN fct __parser__(default=S#"WORKER"),
7642 MK_BAC args __parser__(default=NULL)
7644
7668 MQ_CTX const ctx,
7669 MQ_SLAVE_ID const id,
7670 MQ_CTX const slave
7672
7688 MQ_CTX const ctx,
7689 MQ_SLAVE_ID const id
7691
7698mk_inline bool MqSlaveCheck ( MQ_CTXN const ctx, MQ_SLAVE_ID const id )
7699{
7700 return ctx ? id >= 0 && id < ctx->link.slave.used && ctx->link.slave.slaves[id] != NULL : false;
7701}
7702
7714 MQ_CTX const ctx,
7715 MQ_SLAVE_ID const id,
7716 MQ_CTX* ctx_out
7718
7730 MQ_CTX const ctx,
7731 MQ_SLAVE_ID const id,
7732 MQ_CTX* ctx_out
7734
7755 MQ_CTX const ctx,
7756 MQ_CTX* ctx_out
7758
7762{
7763 return ctx ? (MQ_IS_MASTER(ctx) ? ctx : ctx->config.master) : NULL;
7764}
7765
7770mk_inline bool MqSlaveIs ( MQ_CTXN const ctx)
7771{
7772 return ctx ? (ctx->config.master != NULL) : false;
7773}
7774
7776
7778// MqContextC_SlaveApi_Slave_C_API
7779
7780// #######################################################################
7781// -----------------------------------------------------------------------
7936
7937__parser__push__(doc-group=High,doc-index=HighApi);
7938
7946__parser__(template-required)
7949 MQ_CTX const ctx ,
7950 MK_STRN cstr ,
7951 ...
7953
7956#define MQ_SEND_TRANSACTION_TOKEN_SIZE 10
7957#define MQ_SEND_TOKEN_SIGNATURE_SIZE 50
7959
7962#define MqHigh_O BOL
7963#define MqHigh_Y I8
7964#define MqHigh_S I16
7965#define MqHigh_I I32
7966#define MqHigh_W I64
7967#define MqHigh_H HDL
7968#define MqHigh_F FLT
7969#define MqHigh_D DBL
7970#define MqHigh_C STR
7971#define MqHigh_B BIN
7972#define MqHigh_U BUF
7973#define MqHigh_L BFL
7974#define MqHigh_A BAC
7976
7986 MQ_CTX const ctx ,
7987 MK_STRN cstr ,
7988 va_list var_list
7990
7992
7994// MqContextC_HighApi_High_C_API
7995
7996/* ####################################################################### */
7997/* ### ### */
7998/* ### F I L T E R - A P I ### */
7999/* ### ### */
8000/* ####################################################################### */
8001
8127/* ####################################################################### */
8128/* ### ### */
8129/* ### C L A S S - A P I ### */
8130/* ### ### */
8131/* ####################################################################### */
8132
8152
8153__parser__push__(doc-group=Class,doc-index=ClassApi);
8154
8159 MQ_CTXN const ctx
8160) MK_ATTR_HDL;
8161
8169 MQ_CTX const ctx,
8170 MQ_FCT const item
8172
8185 MQ_CTX const ctx,
8186 MK_STRN ident
8188
8197 MQ_CTXN const ctx
8198) MK_ATTR_HDL;
8199
8206 MQ_CTXN const ctx
8207) MK_ATTR_HDL;
8208
8210
8212// MqContextC_ClassApi_Class_C_API
8213
8214// #######################################################################
8215// only - inline ---------------------------------------------------------
8219
8220__parser__push__(doc-group=Get,doc-index=ConfigApi);
8221
8226 MQ_CTX const ctx
8227) {
8228 MK_ATTR_HDL_CHECK(ctx);
8229 return MQ_IS_SERVER(ctx);
8230}
8231
8236 MQ_CTX const ctx
8237) {
8238 MK_ATTR_HDL_CHECK(ctx);
8239 return ctx->config.identFrom;
8240}
8241
8247 MQ_CTX const ctx
8248) {
8249 MK_ATTR_HDL_CHECK(ctx);
8250 return MQ_IS_PARENT(ctx);
8251}
8252
8257 MQ_CTX const ctx
8258) {
8259 MK_ATTR_HDL_CHECK(ctx);
8260 return (ctx->config.native == MK_NATIVE_IS_STRING);
8261}
8262
8269 MQ_CTXN const ctx
8270) {
8271 MK_ATTR_HDL_CHECK(ctx);
8272 return MkSysStringGetNoNULL((ctx)->config.dispname);
8273}
8274
8281 MQ_CTXN const ctx
8282) {
8283 MK_ATTR_HDL_CHECK(ctx);
8284 return MkSysStringGetNoNULL((ctx)->config.prefix);
8285}
8286
8293 MQ_CTXN const ctx
8294) {
8295 MK_ATTR_HDL_CHECK(ctx);
8296 return MkSysStringGetNoNULL((ctx)->config.postfix);
8297}
8298
8305 MQ_CTXN const ctx
8306) {
8307 MK_ATTR_HDL_CHECK(ctx);
8308 return MkSysStringGetNoNULL((ctx)->config.storage);
8309}
8310
8316 MQ_CTXN const ctx
8317) {
8318 MK_ATTR_HDL_CHECK(ctx);
8319 return (ctx)->config.io.buffersize;
8320}
8321
8327 MQ_CTXN const ctx
8328) {
8329 MK_ATTR_HDL_CHECK(ctx);
8330 return (ctx)->config.io.pkgsize;
8331}
8332
8338 MQ_CTXN const ctx
8339) {
8340 MK_ATTR_HDL_CHECK(ctx);
8341 return (ctx)->config.io.timeout;
8342}
8343
8350 MQ_CTXN const ctx
8351) {
8352 MK_ATTR_HDL_CHECK(ctx);
8353 return MkSysStringGetNoNULL(ctx->config.io.uds.file);
8354}
8355
8371__parser__(no-rpc)
8374 MQ_CTX const ctx,
8375 MK_STRN *host_out,
8376 MK_STRN *port_out,
8377 MK_STRN *myhost_out,
8378 MK_STRN *myport_out
8379) MK_ATTR_HDL;
8380
8404__parser__(no-type-extension)
8407 MQ_CTX const ctx,
8408 MK_BFL *vals_out
8409) MK_ATTR_HDL;
8410
8415 MQ_CTX const ctx
8416) {
8417 MK_ATTR_HDL_CHECK(ctx);
8418 return ctx->config.io.pipe.hdl;
8419}
8420
8423 MQ_CTX const ctx
8424) {
8425 MK_ATTR_HDL_CHECK(ctx);
8426 return ctx->config.startAs;
8427}
8428
8431 MQ_CTX const ctx
8432) {
8433 MK_ATTR_HDL_CHECK(ctx);
8434 return ctx->statusIs;
8435}
8436
8440__parser__(internal)
8442 MQ_CTX const ctx
8443) MK_ATTR_HDL;
8444
8450__parser__(internal)
8452 MQ_CTX const ctx
8453) MK_ATTR_HDL;
8454
8463 MQ_CTX const ctx,
8464 MK_STRN const filename
8466
8468
8470// MqContextC_ConfigApi_Get_C_API
8471
8472/* ####################################################################### */
8473/* ### ### */
8474/* ### D U M P - A P I ### */
8475/* ### ### */
8476/* ####################################################################### */
8477
8497
8498#if defined(MQ_C_BUILD_DLL)
8499
8500 #define META_SECTION_DEFINE
8501 #include "MqDumpS_mq.h"
8502 #undef META_SECTION_DEFINE
8503
8504#else
8505
8508struct MqDumpS {
8509 // BEGIN-MqDumpS-super - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
8510
8511 union {
8512 struct MkObjectS obj; // instance-base MkObjectS
8514
8515 // END-MqDumpS-super - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
8516
8517 // missing PRIVATE instance attributes
8519};
8520
8521#endif
8522
8523// BEGIN-MqDumpS-Definition - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
8524
8528 __parser__push__(prefix=Class, doc-group=Define, doc-index=Class);
8529
8530
8531// Signature --------------------------------------------------------------
8534
8535 #define MqDumpC_SIGNATURE (MkObjectC_SIGNATURE ^ (12u<<10))
8536 #define MqDumpC_MASK (((1u<<22)-1)<<10)
8537
8539
8540// CompileTimeCast --------------------------------------------------------------
8543
8544 #define MqDumpC_X2dmp(x) (x)
8545 #define MqDumpC_X2obj(x) MkOBJ(x)
8546
8548
8549
8550// TypeDef --------------------------------------------------------------
8553
8555 __parser__(ignore) typedef struct MqDumpS MqDumpCR;
8557 __parser__(ignore) typedef const struct MqDumpS MqDumpCNR;
8559 #define MqDumpC_T (&MQ_RT_REF._MqDumpC_T)
8561 #define MqDumpC_TT (MkTYP(MqDumpC_T))
8563 #define MqDumpST MqDumpC_T
8565 #define MqDumpSTT (MkTYP(MqDumpST))
8567 #define MqDumpC_type MQ_DMP
8569 #define MqDumpCT_X(instance) ( (struct MkSuperTypeS *) (MkOBJ_R(instance).type) )
8571 #define MqDumpCTT_X(instance) (MkOBJ_R(instance).type)
8573 #define MqDumpCT_TT(typ) ( (struct MkSuperTypeS *) (typ) )
8575 #define MqDumpC_NS MQ
8577 #define MqDumpCTT MqDumpCTT
8579 #define MqDumpCT ( (struct MkSuperTypeS *) MqDumpCTT )
8580
8582
8583
8584// TypeCheck --------------------------------------------------------------
8587
8588 #pragma GCC diagnostic push
8589 #pragma GCC diagnostic ignored "-Wattributes"
8590
8593 __parser__(class=MqDumpC,static,hide)
8595 return MkSanitizeCheck(MqDumpC,mng);
8596 }
8597
8600 __parser__(class=MqDumpC,static,hide)
8602 return MkSanitizeCheckO(MqDumpC,obj);
8603 }
8604
8605 #pragma GCC diagnostic pop
8606 #define MqDumpC_Check(mng) MqDmpCheck(mng)
8607
8609
8610
8611// RunTimeCast --------------------------------------------------------------
8614
8616 __parser__(class=MqDumpC,hide,static)
8617 META_ATTRIBUTE_SANITIZE
8619 return (MqDmpCheck(mng) ? (MQ_DMP)mng : NULL);
8620 }
8621
8623 __parser__(class=MqDumpC,hide,static)
8624 META_ATTRIBUTE_SANITIZE
8626 return (MqDmpCheck(mng) ? (MQ_DMPN)mng : NULL);
8627 }
8628
8630 #define MqDmpRaise(_dmp) if (!_MkCheckX(MqDumpC,_dmp)) { \
8631 MkErrorSetC_1E("'MqDumpC' hdl is NULL"); \
8632 goto error ; \
8633 }
8634
8636 #define MqDMP_R(x) (*(x)).super.dmp
8638 #define MqDMP(x) (&MqDMP_R(x))
8639
8641
8644// MqDumpC_Class_Define_C_API
8645
8646// END-MqDumpS-Definition - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
8647
8648// =========================================================================
8649// BEGIN-MqDumpS-Export - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
8650
8653
8656
8657__parser__push__(doc-group=_ignore_,doc-index=Class,doc-name=Export,class=MqDumpC);
8658
8671__parser__(class-overload=MkObjectHandleGet)
8679
8688__parser__(flags=new)
8695
8705#define MqDumpHandleResolve_e(netHdl) ({ \
8706 MK_HDL tmpHdl=netHdl; \
8707 MQ_DMP tmp; \
8708 if (tmpHdl==0) { \
8709 tmp=NULL; \
8710 } else { \
8711 tmp=MqDumpHandleResolve(tmpHdl); \
8712 if (tmp==NULL) { \
8713 MkErrorSetC_1_NULL("ERROR: 'MqDumpC' handle is 'NULL'"); \
8714 goto error; \
8715 }; \
8716 }; \
8717 tmp; \
8718})
8719
8721
8723// Class export & import
8724
8728 __parser__(flags=new,doc-group=_ignore_,doc-index=Class,doc-name=Misc,class=MqDumpC,null-return-allow)
8730 return (MQ_DMP)MK_NULL;
8731 }
8733// MqDumpC - Misc - function
8734
8736// MqDumpC_Class_C_API
8737
8738// END-MqDumpS-Export - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
8739
8748__parser__(const,flags=new,runtime=MqDumpLog)
8751 MQ_DMP const dmp,
8752 MK_OBJ fmtobj __parser__(default=NULL),
8753 MK_I32 const debug __parser__(default=0),
8754 MK_STRN const callfunc __parser__(default=F#FUNC),
8755 MK_I32 const lvl __parser__(default=0)
8757
8758#define MqDumpLog_1XS(dump) MqDumpLog(dump,(MK_OBJ)META_CONTEXT_S,0,__func__,0)
8759
8760// #######################################################################
8761// -----------------------------------------------------------------------
8766
8767__parser__push__(doc-group=TOR);
8768
8799__parser__(constructor,lng-constr)
8802 MQ_CTX const ctx __parser__(argument),
8803 MQ_DMP * const dumpP_inout __parser__(default=NULL)
8805
8823
8824__parser__(constructor)
8827 MQ_CTX const error __parser__(argument),
8828 MQ_DMP * const dumpP_inout __parser__(default=NULL)
8830
8849 MQ_DMP const dump,
8850 MQ_CTX const ctx
8852
8867__parser__(constructor)
8870 MkBinaryR data,
8871 MQ_DMP *dmp_out
8873
8883 MQ_DMPN const dump
8884) MK_ATTR_HDL;
8885
8888
8892__parser__(destructor,runtime=MqDumpDelete)
8895 MQ_DMP dmp
8896);
8897
8899
8901
8903// MqDumpC_TOR_C_API
8904
8905// #######################################################################
8906// -----------------------------------------------------------------------
8911
8912__parser__push__(doc-group=Misc);
8913
8922 MQ_DMPN const dump
8923) MK_ATTR_HDL;
8924
8928__parser__(internal)
8930 MQ_DMP const dump,
8931 MQ_LTR transLId
8932) MK_ATTR_HDL;
8933
8937__parser__(internal)
8939 MQ_DMP const dump,
8940 MQ_LTR rmtTransLId
8941) MK_ATTR_HDL;
8942
8950__parser__(internal)
8952 MQ_DMP const dump,
8953 MK_SIZE allocsize
8954) MK_ATTR_HDL;
8955
8959__parser__(internal)
8961 MQ_DMPN const dump
8962) MK_ATTR_HDL;
8963
8967__parser__(internal)
8969 MQ_DMPN const dump
8970) MK_ATTR_HDL;
8971
8976 MQ_DMPN const dump
8977) MK_ATTR_HDL;
8978
8980
8982// MqDumpC_Misc_C_API
8983
8985// MqDumpC_C_API
8986
8987/* MARK_R ################################################################ */
8988/* ### ### */
8989/* ### R U N T I M E - A P I ### */
8990/* ### ### */
8991/* ####################################################################### */
8992
8993__parser__global__(prefix2class:MqRuntime=MqRuntimeC);
8994
9008
9009#pragma GCC diagnostic push
9010#pragma GCC diagnostic ignored "-Wlto-type-mismatch"
9011
9012#if defined(MQ_C_BUILD_DLL)
9013
9014 #define META_SECTION_DEFINE
9015 #include "MqRuntimeS_mq.h"
9016 #undef META_SECTION_DEFINE
9017
9018#else
9019
9021__parser__(internal)
9023
9024 // ======================================================================================
9025 // PUBLIC variables -> sync with MqRuntimeS_mk.h !!
9026
9033 // by default \ref __MqRtCheckX is \e false and will be set in \RMkNs{RuntimeInit} .
9034
9035 // BEGIN-MqRuntimeS-super - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
9036
9037 union {
9038 struct MkObjectS obj; // instance-base MkObjectS
9039 struct MkExtensionS ext; // instance-base MkExtensionS
9040 struct MkRtExtS rtext; // instance-base MkRtExtS
9042
9043 // END-MqRuntimeS-super - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
9044
9045 // instance attributes
9046 struct MqErrorS error_mq ;
9047
9048 // ======================================================================================
9049 // TYPES
9050
9051 // BEGIN-rtDef - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
9052
9053 struct MkSuperTypeS _MqErrorC_T ;
9054 struct MkSuperTypeS _MqRuntimeC_T ;
9055 struct MkTypeS _MqCtxTypeC_TT ;
9056 struct MqCtxTypeS _MqContextC_T ;
9057 struct MkSuperTypeS _MqDumpC_T ;
9058 struct MkSuperTypeS _MqFactoryC_T ;
9059 struct MkSuperTypeS _MqEnvC_T ;
9060
9061 // END-rtDef - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
9062
9063 // offset calculated by "Nhi1InternalSize"
9064 MK_BINB private_variables[290760];
9065};
9066
9067#endif
9068
9069#pragma GCC diagnostic pop
9070
9071// BEGIN-MqRuntimeS-Definition - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
9072
9076 __parser__push__(prefix=Class, doc-group=Define, doc-index=Class);
9077
9078
9079// Signature --------------------------------------------------------------
9082
9083 #define MqRuntimeC_SIGNATURE (MkRtExtC_SIGNATURE ^ (1u<<3))
9084 #define MqRuntimeC_MASK (((1u<<29)-1)<<3)
9085
9087
9088// CompileTimeCast --------------------------------------------------------------
9091
9092 #define MqRuntimeC_X2rt(x) (x)
9093 #define MqRuntimeC_X2rtext(x) MkRTEXT(x)
9094 #define MqRuntimeC_X2ext(x) MkEXT(x)
9095 #define MqRuntimeC_X2obj(x) MkOBJ(x)
9096
9098
9099
9100// TypeDef --------------------------------------------------------------
9103
9105 __parser__(ignore) typedef struct MqRuntimeS MqRuntimeCR;
9107 __parser__(ignore) typedef const struct MqRuntimeS MqRuntimeCNR;
9109 #define MqRuntimeC_T (&MQ_RT_REF._MqRuntimeC_T)
9111 #define MqRuntimeC_TT (MkTYP(MqRuntimeC_T))
9113 #define MqRuntimeST MqRuntimeC_T
9115 #define MqRuntimeSTT (MkTYP(MqRuntimeST))
9117 #define MqRuntimeC_type MQ_RT
9119 #define MqRuntimeCT_X(instance) ( (struct MkSuperTypeS *) (MkOBJ_R(instance).type) )
9121 #define MqRuntimeCTT_X(instance) (MkOBJ_R(instance).type)
9123 #define MqRuntimeCT_TT(typ) ( (struct MkSuperTypeS *) (typ) )
9125 #define MqRuntimeC_NS MQ
9127 #define MqRuntimeCTT MqRuntimeCTT
9129 #define MqRuntimeCT ( (struct MkSuperTypeS *) MqRuntimeCTT )
9130
9132
9133
9134// TypeCheck --------------------------------------------------------------
9137
9138 #pragma GCC diagnostic push
9139 #pragma GCC diagnostic ignored "-Wattributes"
9140
9143 __parser__(class=MqRuntimeC,static,ignore)
9145 return MkSanitizeCheck(MqRuntimeC,mng);
9146 }
9147
9150 __parser__(class=MqRuntimeC,static,ignore)
9152 return MkSanitizeCheckO(MqRuntimeC,obj);
9153 }
9154
9155 #pragma GCC diagnostic pop
9156 #define MqRuntimeC_Check(mng) MqRtCheck(mng)
9157
9159
9160
9161// RunTimeCast --------------------------------------------------------------
9164
9166 __parser__(class=MqRuntimeC,ignore,static)
9167 META_ATTRIBUTE_SANITIZE
9169 return (MqRtCheck(mng) ? (MQ_RT)mng : NULL);
9170 }
9171
9173 __parser__(class=MqRuntimeC,ignore,static)
9174 META_ATTRIBUTE_SANITIZE
9176 return (MqRtCheck(mng) ? (MQ_RTN)mng : NULL);
9177 }
9178
9180 #define MqRtRaise(_rt) if (!_MkCheckX(MqRuntimeC,_rt)) { \
9181 MkErrorSetC_1E("'MqRuntimeC' hdl is NULL"); \
9182 goto error ; \
9183 }
9184
9186
9189// MqRuntimeC_Class_Define_C_API
9190
9191// END-MqRuntimeS-Definition - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
9192
9194// MqRuntime_C_API
9195
9196#define MqRT &MqRuntimeRLS
9197#if 0
9198 #define MqRT_O(o) MqRuntimeGetI32()
9199 #define MqRT_X(x) MqRuntimeGetI32()
9200 #define MqRT_ON(o) MqRuntimeGetI32()
9201 #define MqRT_XN(x) MqRuntimeGetI32()
9202#else
9203 #define MqRT_O(o) ((o) && (*o).objRtExt ? (MQ_RT)(*o).objRtExt : MqRuntimeGetI32())
9204 #define MqRT_X(x) ((x) && MkOBJ_R(x).objRtExt ? (MQ_RT)MkOBJ_R(x).objRtExt : MqRuntimeGetI32())
9205 #define MqRT_ON(o) ( (*o).objRtExt ? (MQ_RT)(*o).objRtExt : MqRuntimeGetI32())
9206 #define MqRT_XN(x) ( MkOBJ_R(x).objRtExt ? (MQ_RT)MkOBJ_R(x).objRtExt : MqRuntimeGetI32())
9207#endif
9208
9209#if META_HAS_THREAD
9210 #define MqRtSetup_SO(o) MK_RT_UNUSED MQ_RT const mqrt = MqRT_O(o)
9211 #define MqRtSetup_SX(x) MK_RT_UNUSED MQ_RT const mqrt = MqRT_X(x)
9212 #define MqRtSetup_SXN(x) MK_RT_UNUSED MQ_RT const mqrt = MqRT_XN(x)
9213 #define MqRtSetup_SON(o) MK_RT_UNUSED MQ_RT const mqrt = MqRT_ON(o)
9214
9215 #define MqRtSetup_O(o) MK_RT_UNUSED MQ_RT const mqrt = MqRT_O(o) ; MkRtSetup_O(o)
9216 #define MqRtSetup_X(x) MK_RT_UNUSED MQ_RT const mqrt = MqRT_X(x) ; MkRtSetup_X(x)
9217 #define MqRtSetup_XN(x) MK_RT_UNUSED MQ_RT const mqrt = MqRT_XN(x) ; MkRtSetup_XN(x)
9218 #define MqRtSetup_ON(o) MK_RT_UNUSED MQ_RT const mqrt = MqRT_ON(o) ; MkRtSetup_ON(o)
9219 #define MqRtSetup_NULL MK_RT_UNUSED MQ_RT const mqrt = MqRuntimeGetI32() ; MkRtSetupFromRtExt(mqrt)
9220
9221 #define MqRtSetup_NULL_RT MK_RT_UNUSED MQ_RT const mqrt = MqRuntimeGetI32() ; MkRtSetup_NULL_RT
9222 #define MqRtSetup_X_RT(x) MK_RT_UNUSED MQ_RT const mqrt = MqRT_X(x) ; MkRtSetup_X_RT(x)
9223 #define MqRtSetup_XN_RT(x) MK_RT_UNUSED MQ_RT const mqrt = MqRT_XN(x) ; MkRtSetup_XN_RT(x)
9224 #define MqRtSetup_O_RT(o) MK_RT_UNUSED MQ_RT const mqrt = MqRT_O(o) ; MkRtSetup_O_RT(o)
9225 #define MqRtSetup_ON_RT(o) MK_RT_UNUSED MQ_RT const mqrt = MqRT_ON(o) ; MkRtSetup_ON_RT(o)
9226#else
9227 #define MqRtSetup_SO(o)
9228 #define MqRtSetup_SX(x)
9229 #define MqRtSetup_SXN(x)
9230 #define MqRtSetup_SON(o)
9231 #define MqRtSetup_NULL_RT
9232
9233 #define MqRtSetup_O(o)
9234 #define MqRtSetup_X(x)
9235 #define MqRtSetup_XN(x)
9236 #define MqRtSetup_ON(o)
9237 #define MqRtSetup_NULL
9238
9239 #define MqRtSetup_X_RT(x)
9240 #define MqRtSetup_XN_RT(x)
9241 #define MqRtSetup_O_RT(o)
9242 #define MqRtSetup_ON_RT(o)
9243#endif
9244
9246__parser__(ignore)
9248
9250__parser__(ignore)
9251MQ_EXTERN MQ_RT MK_DECL MqRuntimeInit ( MK_RT const mkrt, MQ_RT const mqrt );
9252
9254__parser__(ignore)
9256{
9257 return __MkCheckX(MqRuntimeC,&MqRuntimeRLS) ? MqRT : MqRuntimeInit( MkRuntimeGet(), MqRT );
9258}
9259
9260/* ####################################################################### */
9261/* ### ### */
9262/* ### P A C K A G E - A P I ### */
9263/* ### ### */
9264/* ####################################################################### */
9265
9307// MqMsgque_C_API
9308
9309// #######################################################################
9310// -----------------------------------------------------------------------
9328
9329__parser__global__(doc-force=MqMsgque@Item);
9330
9332// MqMsgque_Item_C_API
9333
9334// #######################################################################
9335// -----------------------------------------------------------------------
9343__parser__global__(doc-force=MqMsgque@Main);
9344__parser__push__(doc-group=Main,class=MqMsgque);
9345
9353__parser__(hide,template-required,class=MqMsgque)
9355 void * code
9356);
9357
9359
9361// MqMsgque_Main_C_API
9362
9363// #######################################################################
9364// -----------------------------------------------------------------------
9369
9370__parser__push__(doc-group=Help,class=MqMsgque);
9371
9383 MK_STRN tool
9384);
9385
9388 void
9389);
9390
9392
9394// MqMsgque_Help_C_API
9395
9396// #######################################################################
9397// -----------------------------------------------------------------------
9405
9406__parser__push__(doc-group=Init,class=MqMsgque);
9407
9409__parser__(ignore)
9411
9428
9443 MK_BAC bfl __parser__(argument,default=NULL)
9444);
9445
9450 MK_STRN arg0,
9451 ...
9452);
9453
9456 MK_STRN arg0,
9457 va_list var_list
9458);
9459
9466 void
9467);
9468
9470
9472// MqMsgque_Init_C_API
9473
9474// #######################################################################
9475// MARK_D ----------------------------------------------------------------
9476
9479
9482
9485
9486// BEGIN-Class-Doc-Order - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
9487
9488// external
9494
9495// internal
9502
9503// external
9509
9510// internal
9517
9518// internal
9525
9526// external
9532
9533// internal
9540
9541// END-Class-Doc-Order - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
9542
9543// #######################################################################
9544// -----------------------------------------------------------------------
9550__parser__global__(doc-force=MqMsgque@Enum@local);
9551
9552// BEGIN-Class-Introspection - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
9553
9558
9559__parser__push__(doc-name=Introspection,doc-index=Class,class=MqContextC,no-rpc,null-return-allow,flags=new);
9560
9567
9571 MK_ATTR_HDL_CHECK(ctx);
9572 return (MQ_CTX)MqContextC_X2obj(ctx)->obj_protect.next;
9573}
9574
9578 MK_ATTR_HDL_CHECK(ctx);
9579 return (MQ_CTX)MqContextC_X2obj(ctx)->obj_protect.prev;
9580}
9581
9583
9586// MqContextC_Class_C_API
9587
9588
9593
9594__parser__push__(doc-name=Introspection,doc-index=Class,class=MqDumpC,no-rpc,null-return-allow,flags=new);
9595
9602
9606 MK_ATTR_HDL_CHECK(dmp);
9607 return (MQ_DMP)MqDumpC_X2obj(dmp)->obj_protect.next;
9608}
9609
9613 MK_ATTR_HDL_CHECK(dmp);
9614 return (MQ_DMP)MqDumpC_X2obj(dmp)->obj_protect.prev;
9615}
9616
9618
9621// MqDumpC_Class_C_API
9622
9623
9628
9629__parser__push__(doc-name=Introspection,doc-index=Class,class=MqFactoryC,no-rpc,null-return-allow,flags=new);
9630
9637
9641 MK_ATTR_HDL_CHECK(fct);
9642 return (MQ_FCT)MqFactoryC_X2obj(fct)->obj_protect.next;
9643}
9644
9648 MK_ATTR_HDL_CHECK(fct);
9649 return (MQ_FCT)MqFactoryC_X2obj(fct)->obj_protect.prev;
9650}
9651
9653
9656// MqFactoryC_Class_C_API
9657
9658// END-Class-Introspection - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
9659
9660// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
9661
9664
9665__parser__push__(doc-group=Log,doc-index=LogApi);
9666
9672 MQ_CTXN const ctx
9673) {
9674 MK_ATTR_HDL_CHECK(ctx);
9675 return (MQ_IS_SERVER (ctx) ? "SERVER" : "CLIENT");
9676}
9677
9683 MQ_CTXN ctx
9684) {
9685 MK_ATTR_HDL_CHECK(ctx);
9686 return (MQ_IS_PARENT (ctx) ? "PARENT" : "CHILD");
9687}
9688
9690
9692
9693// end c++ save definition
9695
9696// vim:nowrap
#define MqLinkS_targetIdent_size
MqClassIdentGet of the link target, only valid on parent-context
#define MqConfigS_postfix_size
#define END_MQ_C_DECLS
MQ_RT MqRuntimeGetI32(void)
inline from MkRuntimeInit
#define BEGIN_MQ_C_DECLS
MQ_EXTERN_DATA MkThreadLocal struct MqRuntimeS MqRuntimeRLS
RLS.
#define MqRT
#define MqRtSetup_NULL_RT
#define MqConfigS_storage_size
storage file used as default if a database is requested
#define MqConfigS_dispname_size
MQ_EXTERN MQ_RT MqRuntimeInit(MK_RT const mkrt, MQ_RT const mqrt)
initialize MkRuntimeRLS
#define MqConfigS_prefix_size
static MK_UNUSED int num
#define error
MK_EXTERN MK_ERR MkErrorFORMAT(MK_OBJN const fmtobj)
#define MK_NO_RETURN
#define MK_DECL
#define mk_inline
#define MK_NULL
MkErrorE
MkNativeIsE
MkTypeE
MK_TIMEOUT_DEFAULT
MK_NATIVE_IS_STRING
#define __parser__global__(...)
#define __parser__pop__
#define __parser__push__(...)
#define __parser__(...)
const M