14#include "LibMkKernel_mk.h"
149#ifndef META_HAVE_LIBCONFIG
150 #error "META_HAVE_LIBCONFIG was NOT defined, require 1 or 0"
161#ifndef META_USE_GLOBAL_EVENT
162# define META_USE_GLOBAL_EVENT 0
169# undef MQ_C_BUILD_DLL
170# define MQ_C_BUILD_DLL
205# define MQ_RT_ARGS_ONLY MK_RT mkrt, MQ_RT mqrt
206# define MQ_RT_ARGS MQ_RT_ARGS_ONLY,
207# define MQ_RT_CALL_ONLY mkrt, mqrt
208# define MQ_RT_CALL MQ_RT_CALL_ONLY,
209# define MQ_RT_PTR mqrt
210# define MQ_RT_REF (*mqrt)
212# define MQ_RT_ARGS_ONLY void
214# define MQ_RT_CALL_ONLY
216# define MQ_RT_PTR &MqRuntimeRLS
217# define MQ_RT_REF MqRuntimeRLS
222#define MQ_INSTANCE_RT_X(x) MK_INSTANCE_RT_X(x) ; MqRtSetup_XN(x)
223#define MQ_INSTANCE_RT_XN(x) MK_INSTANCE_RT_XN(x) ; MqRtSetup_XN(x)
224#define MQ_INSTANCE_RT_O(o) MK_INSTANCE_RT_O(o) ; MqRtSetup_ON(o)
225#define MQ_INSTANCE_RT_ON(o) MK_INSTANCE_RT_ON(o) ; MqRtSetup_ON(o)
226#define MQ_DESTRUCTOR_RT_X(c,x) MK_DESTRUCTOR_RT_X(c,x) ; MqRtSetup_XN(x)
227#define MQ_STATIC_RT MK_STATIC_RT ; MqRtSetup_NULL
236#undef BEGIN_MQ_C_DECLS
238#if defined(META_COMPILE_AS_CC)
239# define BEGIN_MQ_C_DECLS namespace libmqmsgque { using namespace libmkkernel;
240# define END_MQ_C_DECLS }
241#elif defined(__cplusplus)
242# define BEGIN_MQ_C_DECLS extern "C" {
243# define END_MQ_C_DECLS }
245# define BEGIN_MQ_C_DECLS
246# define END_MQ_C_DECLS
250#ifndef PARSE_C_HEADER_TO_META
376#if defined(META_IGNORE_EXTERN)
380# if defined(DLL_EXPORT)
382# if defined(MQ_C_BUILD_DLL)
383# define MQ_EXTERN __declspec(dllexport)
385# define MQ_EXTERN __declspec(dllimport)
389# define MQ_EXTERN __attribute__ ((visibility("default")))
398#if defined(META_PRIVATE)
399# define MQ_EXTERN_DATA extern
400#elif defined(META_IGNORE_EXTERN)
401# define MQ_EXTERN_DATA extern
404# if defined(DLL_EXPORT)
406# if defined(MQ_C_BUILD_DLL)
407# define MQ_EXTERN_DATA __declspec(dllexport)
409# define MQ_EXTERN_DATA __declspec(dllimport)
413# define MQ_EXTERN_DATA __attribute__ ((visibility("default"))) extern
416# define MQ_EXTERN_DATA extern
456__parser__(type=ME_NI4_MQ_HDL:"handle data-type")
473 __parser__(internal,type=ME_CCC_MqErrorC:"extension management class for
MqErrorS":internal)
476 __parser__(internal,type=ME_CCN_MqErrorC:"const - extension management class for
MqErrorS":internal)
487 __parser__(internal,type=ME_CCC_MqRuntimeC:"MqRuntimeC class handle":internal)
490 __parser__(internal,type=ME_CCN_MqRuntimeC:"const - MqRuntimeC class handle":internal)
515 __parser__(type=ME_CCC_MqContextC:"MqContextC class handle":primary)
518 __parser__(type=ME_CCN_MqContextC:"const - MqContextC class handle":primary)
529 __parser__(type=ME_CCC_MqDumpC:"MqDumpC class handle":primary)
532 __parser__(type=ME_CCN_MqDumpC:"const - MqDumpC class handle":primary)
543 __parser__(type=ME_CCC_MqFactoryC:"MqFactoryC class handle":primary)
546 __parser__(type=ME_CCN_MqFactoryC:"const - MqFactoryC class handle":primary)
557 __parser__(internal,type=ME_CCC_MqEnvC:"MqEnvC class handle":internal)
560 __parser__(internal,type=ME_CCN_MqEnvC:"const - MqEnvC class handle":internal)
587#if defined(__MINGW32__) || defined(_MSC_VER)
589# define MK_FORMAT_SOCK "%I64u"
593# define MK_FORMAT_SOCK "%i"
628__parser__(internal,no-rpc,prefix=EnumFunc,
return-type-
default-no)
633__parser__(internal,no-rpc,prefix=EnumFunc,return-type-default-no)
666__parser__(internal,no-rpc,prefix=EnumFunc,
return-type-
default-no)
671__parser__(internal,no-rpc,prefix=EnumFunc,return-type-default-no)
706__parser__(doc-group=Enum,doc-index=_ignore_,
class=MqMsgque,no-rpc,prefix=EnumFunc,
return-type-
default-no)
711__parser__(doc-group=Enum,doc-index=_ignore_,class=MqMsgque,no-rpc,prefix=EnumFunc,return-type-default-no)
719__parser__(doc-group=Enum,doc-index=_ignore_,
class=MqMsgque,no-rpc,prefix=EnumFunc)
799 #define MqEnvC_SIGNATURE (MkObjectC_SIGNATURE ^ (14u<<10))
800 #define MqEnvC_MASK (((1u<<22)-1)<<10)
808 #define MqEnvC_X2env(x) (x)
809 #define MqEnvC_X2obj(x) MkOBJ(x)
822 #define MqEnvC_T (&MQ_RT_REF._MqEnvC_T)
824 #define MqEnvC_TT (MkTYP(MqEnvC_T))
826 #define MqEnvST MqEnvC_T
828 #define MqEnvSTT (MkTYP(MqEnvST))
830 #define MqEnvC_type MQ_ENV
832 #define MqEnvCT_X(instance) ( (struct MkSuperTypeS *) (MkOBJ_R(instance).type) )
834 #define MqEnvCTT_X(instance) (MkOBJ_R(instance).type)
836 #define MqEnvCT_TT(typ) ( (struct MkSuperTypeS *) (typ) )
840 #define MqEnvCTT MqEnvCTT
842 #define MqEnvCT ( (struct MkSuperTypeS *) MqEnvCTT )
850 #pragma GCC diagnostic push
851 #pragma GCC diagnostic ignored "-Wattributes"
869 #pragma GCC diagnostic pop
870 #define MqEnvC_Check(mng) MqEnvCheck(mng)
880 META_ATTRIBUTE_SANITIZE
888 META_ATTRIBUTE_SANITIZE
895 #define MqEnvRaise(_env) if (!_MkCheckX(MqEnvC,_env)) { \
896 MkErrorSetC_1E("'MqEnvC' hdl is NULL"); \
901 #define MqENV_R(x) (*(x)).super.env
903 #define MqENV(x) (&MqENV_R(x))
920#define MQ_SERVICE_CALL_CHECK do { \
921 assert (__data__ != NULL); \
922 if (MqCtxCheck(mqctx) == false || MkOBJ_R(mqctx).self == NULL) return MK_OK; \
927#define MQ_SERVICE_CALL_ARGS MK_RT_ARGS MQ_CTX const mqctx, MK_PTR const __data__
929#define MQ_SERVICE_CALL MK_RT_CALL mqctx, __data__
950#define MQ_SERVICE_FREE_ARGS MK_RT_ARGS MQ_CTX const mqctx, MK_PTR *dataP __parser__(inout)
959#define MQ_SERVICE_COPY_ARGS MK_RT_ARGS MQ_CTX const mqctx, MK_PTR *dataP __parser__(inout)
991#if defined(MQ_C_BUILD_DLL)
993 #define META_SECTION_DEFINE
994 #include "MqLinkS_mq.h"
995 #undef META_SECTION_DEFINE
1009 #define MqLinkS_targetIdent_size 64
1181#define MQ_CALLBACK_CREATE_ARGS MK_RT_ARGS MQ_CTX const mqctx, MK_BFL const argv
1182#define MQ_CALLBACK_CREATE_CALL MK_RT_CALL mqctx, argv
1204) __attribute__ ((noreturn));
1409__parser__(doc-group=Enum,doc-index=_ignore_,
class=MqMsgque,no-rpc,prefix=EnumFunc,
return-type-
default-no)
1414__parser__(doc-group=Enum,doc-index=_ignore_,class=MqMsgque,no-rpc,prefix=EnumFunc,return-type-default-no)
1422__parser__(doc-group=Enum,doc-index=_ignore_,
class=MqMsgque,no-rpc,prefix=EnumFunc)
1452__parser__(doc-group=Enum,doc-index=_ignore_,
class=MqMsgque,no-rpc,prefix=EnumFunc,
return-type-
default-no)
1457__parser__(doc-group=Enum,doc-index=_ignore_,class=MqMsgque,no-rpc,prefix=EnumFunc,return-type-default-no)
1465__parser__(doc-group=Enum,doc-index=_ignore_,
class=MqMsgque,no-rpc,prefix=EnumFunc)
1491__parser__(internal,no-rpc,prefix=EnumFunc,
return-type-
default-no)
1496__parser__(internal,no-rpc,prefix=EnumFunc,return-type-default-no)
1529__parser__(internal,no-rpc,prefix=EnumFunc,
return-type-
default-no)
1534__parser__(internal,no-rpc,prefix=EnumFunc,return-type-default-no)
1597__parser__(doc-group=Enum,doc-index=_ignore_,
class=MqMsgque,no-rpc,prefix=EnumFunc,
return-type-
default-no)
1602__parser__(doc-group=Enum,doc-index=_ignore_,class=MqMsgque,no-rpc,prefix=EnumFunc,return-type-default-no)
1610__parser__(doc-group=Enum,doc-index=_ignore_,
class=MqMsgque,no-rpc,prefix=EnumFunc)
1646__parser__(doc-group=Enum,doc-index=_ignore_,
class=MqMsgque,no-rpc,prefix=EnumFunc,
return-type-
default-no)
1651__parser__(doc-group=Enum,doc-index=_ignore_,class=MqMsgque,no-rpc,prefix=EnumFunc,return-type-default-no)
1659__parser__(doc-group=Enum,doc-index=_ignore_,
class=MqMsgque,no-rpc,prefix=EnumFunc)
1755 #define MqConfigS_dispName_size 64
1785 #define MqConfigS_dispPrefix_size 64
1802 #define MqConfigS_dispPostfix_size 64
1836 #define MqConfigS_storageFile_size 256
1886#if META_HAVE_LIBCONFIG
1946 void * filterH_dummy;
2345#define MqInterfaceDoc(mkrt,ctx,fCall,callback,fFree,fCopy)
2352__parser__(no-rpc,callback-name=ServerSetup,callback-null,flags=
public-internal)
2359 MqDataFreeF fFree
__parser__(callback-free,null-allowed),
2360 MqDataCopyF fCopy
__parser__(callback-copy,null-allowed)
2368__parser__(no-rpc,callback-name=ServerCleanup,callback-null,flags=
public-internal)
2384__parser__(no-rpc,callback-name=BgError,callback-null,flags=
public-internal)
2404__parser__(no-rpc,callback-name=Event,callback-null,flags=
public-internal)
2429#define MQ_IS_SERVER(ctx) (ctx->setup.isServer == true)
2430#define MQ_IS_SERVER_PARENT(ctx) (MQ_IS_SERVER(ctx) && MQ_IS_PARENT(ctx))
2431#define MQ_IS_CLIENT(ctx) (ctx->setup.isServer == false)
2432#define MQ_IS_CLIENT_PARENT(ctx) (MQ_IS_CLIENT(ctx) && MQ_IS_PARENT(ctx))
2433#define MQ_IS_CHILD(ctx) ((ctx)->config.parent != NULL)
2434#define MQ_IS_PARENT(ctx) ((ctx)->config.parent == NULL)
2435#define MQ_IS_SLAVE(ctx) ((ctx)->config.master != NULL)
2436#define MQ_IS_MASTER(ctx) ((ctx)->config.master == NULL)
2437#define MQ_IS_LOOPBACK(ctx) ((ctx)->config.io.com == MQ_IO_LOOP)
2439#define MQ_GET_PARENT(ctx) (MQ_IS_CHILD(ctx) ? ctx->link.ctxIdP : ctx)
2440#define MQ_GET_MASTER(ctx) (MQ_IS_SLAVE(ctx) ? ctx->config.master : ctx)
2636typedef
int (*MqSysSelectF) (
int max,
void* read,
void* write,
void* except, struct timeval* timeout);
2695typedef enum
MkErrorE (*MqSysServerSpawnF) (
2700 struct
MkIdS * idPtrOut
2717typedef enum
MkErrorE (*MqSysServerThreadF) (
2742typedef enum
MkErrorE (*MqSysServerForkF) (
2832 #define MqErrorC_SIGNATURE (MkErrExtC_SIGNATURE ^ (1u<<3))
2833 #define MqErrorC_MASK (((1u<<29)-1)<<3)
2841 #define MqErrorC_X2err(x) (x)
2842 #define MqErrorC_X2errext(x) MkERREXT(x)
2843 #define MqErrorC_X2ext(x) MkEXT(x)
2844 #define MqErrorC_X2obj(x) MkOBJ(x)
2857 #define MqErrorC_T (&MQ_RT_REF._MqErrorC_T)
2859 #define MqErrorC_TT (MkTYP(MqErrorC_T))
2861 #define MqErrorST MqErrorC_T
2863 #define MqErrorSTT (MkTYP(MqErrorST))
2865 #define MqErrorC_type MQ_ERR
2867 #define MqErrorCT_X(instance) ( (struct MkSuperTypeS *) (MkOBJ_R(instance).type) )
2869 #define MqErrorCTT_X(instance) (MkOBJ_R(instance).type)
2871 #define MqErrorCT_TT(typ) ( (struct MkSuperTypeS *) (typ) )
2873 #define MqErrorC_NS MQ
2875 #define MqErrorCTT MqErrorCTT
2877 #define MqErrorCT ( (struct MkSuperTypeS *) MqErrorCTT )
2885 #pragma GCC diagnostic push
2886 #pragma GCC diagnostic ignored "-Wattributes"
2904 #pragma GCC diagnostic pop
2905 #define MqErrorC_Check(mng) MqErrCheck(mng)
2915 META_ATTRIBUTE_SANITIZE
2923 META_ATTRIBUTE_SANITIZE
2930 #define MqErrRaise(_err) if (!_MkCheckX(MqErrorC,_err)) { \
2931 MkErrorSetC_1E("'MqErrorC' hdl is NULL"); \
2936 #define MqERR_R(x) (*(x)).super.err
2938 #define MqERR(x) (&MqERR_R(x))
2950#define MqERROR_R(r) ((*r).error_mq)
2951#define MqERROR_RT MqERROR_R(&MQ_RT_REF)
2952#define MqERROR_O(o) MqERROR_R(MqRT_O(o))
2953#define MqERROR_X(x) MqERROR_R(MqRT_X(x))
2954#define MqERROR_XN(x) MqERROR_R(MqRT_XN(x))
2955#define MqERROR MqERROR_R(&MqRuntimeRLS)
3036#define MqFactoryPanic(fct) if (fct == NULL) MkPanicC(MK_ERROR_PANIC, __func__, -1, "MqFactoryS exception");
3046typedef enum MkErrorE (
MK_DECL
3051 enum MqFactoryE create,
3057#define MQ_CALLBACK_FACTORY_CTOR_ARGS \
3059 MQ_CTX const tmpl, \
3060 enum MqFactoryE create, \
3061 struct MqFactoryS * const fct, \
3064#define MQ_CALLBACK_FACTORY_CTOR_CALL MQ_RT_CALL tmpl, create, fct, contextP
3084 bool doFactoryCleanup,
3137 #define MqFactoryS_originalIdent_size 63
3155 #define MqFactoryC_SIGNATURE (MkObjectC_SIGNATURE ^ (13u<<10))
3156 #define MqFactoryC_MASK (((1u<<22)-1)<<10)
3164 #define MqFactoryC_X2fct(x) (x)
3165 #define MqFactoryC_X2obj(x) MkOBJ(x)
3178 #define MqFactoryC_T (&MQ_RT_REF._MqFactoryC_T)
3180 #define MqFactoryC_TT (MkTYP(MqFactoryC_T))
3182 #define MqFactoryST MqFactoryC_T
3184 #define MqFactorySTT (MkTYP(MqFactoryST))
3186 #define MqFactoryC_type MQ_FCT
3188 #define MqFactoryCT_X(instance) ( (struct MkSuperTypeS *) (MkOBJ_R(instance).type) )
3190 #define MqFactoryCTT_X(instance) (MkOBJ_R(instance).type)
3192 #define MqFactoryCT_TT(typ) ( (struct MkSuperTypeS *) (typ) )
3194 #define MqFactoryC_NS MQ
3196 #define MqFactoryCTT MqFactoryCTT
3198 #define MqFactoryCT ( (struct MkSuperTypeS *) MqFactoryCTT )
3206 #pragma GCC diagnostic push
3207 #pragma GCC diagnostic ignored "-Wattributes"
3225 #pragma GCC diagnostic pop
3226 #define MqFactoryC_Check(mng) MqFctCheck(mng)
3236 META_ATTRIBUTE_SANITIZE
3244 META_ATTRIBUTE_SANITIZE
3251 #define MqFctRaise(_fct) if (!_MkCheckX(MqFactoryC,_fct)) { \
3252 MkErrorSetC_1E("'MqFactoryC' hdl is NULL"); \
3257 #define MqFCT_R(x) (*(x)).super.fct
3259 #define MqFCT(x) (&MqFCT_R(x))
3278__parser__push__(doc-group=_ignore_,doc-index=Class,doc-name=Export,
class=MqFactoryC);
3330#define MqFactoryHandleResolve_e(netHdl) ({ \
3331 MK_HDL tmpHdl=netHdl; \
3336 tmp=MqFactoryHandleResolve(tmpHdl); \
3338 MkErrorSetC_1_NULL("ERROR: 'MqFactoryC' handle is 'NULL'"); \
3353 __parser__(flags=
new,doc-group=_ignore_,doc-index=Class,doc-name=Misc,
class=MqFactoryC,null-
return-allow)
3437__parser__(no-type-extension,overload=MqFactoryGetCalled)
3522__parser__(constructor,lng-constr,no-rpc,overload-c-no)
3527 MqFactoryCTorF const createCallF
__parser__(internal,default=FactoryObjCreate),
3529 MqFactoryDataFreeF const createDataFreeF
__parser__(internal,default=FactoryFree),
3530 MqFactoryDataCopyF const createDataCopyF
__parser__(internal,default=FactoryDup2),
3532 MqFactoryDTorF const deleteCallF
__parser__(internal,default=FactoryObjDelete),
3534 MqFactoryDataFreeF const deleteDataFreeF
__parser__(internal,default=NULL),
3535 MqFactoryDataCopyF const deleteDataCopyF
__parser__(internal,default=NULL),
3540#define MqFactoryAdd_1(fct) MqFactoryAdd(MK_ERROR_PANIC,fct,NULL, NULL, NULL, NULL, NULL, NULL, NULL, #fct)
3541#define MqFactoryAdd_2(fct,ident) MqFactoryAdd(MK_ERROR_PANIC,fct,NULL, NULL, NULL, NULL, NULL, NULL, NULL, ident)
3559 MkSelfCreateF const fctCreate,
3560 MkSelfDeleteF const fctDelete,
3561 MkConstructorF const constructor,
3562 MkSelfDeleteF const selfDelete
3694#define MqFactoryLog_2M(fct,m) MqFactoryLog_2(fct,MkObj(m))
3844 #define MqCtxTypeC_SIGNATURE (MkTypeC_SIGNATURE ^ (2u<<6))
3845 #define MqCtxTypeC_MASK (((1u<<26)-1)<<6)
3853 #define MqCtxTypeC_X2ctxtyp(x) (x)
3854 #define MqCtxTypeC_X2typ(x) MkTYP(x)
3855 #define MqCtxTypeC_X2obj(x) MkOBJ(x)
3868 #define MqCtxTypeSTT (&MQ_RT_REF._MqCtxTypeC_TT)
3870 #define MqCtxTypeC_TT (&MQ_RT_REF._MqCtxTypeC_TT)
3872 #define MqCtxTypeC_type MQ_CTXTYP
3874 #define MqCtxTypeCT_X(instance) ( (struct MkTypeS *) (MkOBJ_R(instance).type) )
3876 #define MqCtxTypeCTT_X(instance) (MkOBJ_R(instance).type)
3878 #define MqCtxTypeCT_TT(typ) ( (struct MkTypeS *) (typ) )
3880 #define MqCtxTypeC_NS MQ
3882 #define MqCtxTypeCTT MqCtxTypeCTT
3884 #define MqCtxTypeCT ( (struct MkTypeS *) MqCtxTypeCTT )
3892 #pragma GCC diagnostic push
3893 #pragma GCC diagnostic ignored "-Wattributes"
3911 #pragma GCC diagnostic pop
3912 #define MqCtxTypeC_Check(mng) MqCtxTypCheck(mng)
3925 if (!MkObjCheck(mng))
return NULL;
4047#if defined(MQ_C_BUILD_DLL)
4049 #define META_SECTION_DEFINE
4050 #include "MqContextS_mq.h"
4051 #undef META_SECTION_DEFINE
4089 #define MqContextC_SIGNATURE (MkObjectC_SIGNATURE ^ (11u<<10))
4090 #define MqContextC_MASK (((1u<<22)-1)<<10)
4098 #define MqContextC_X2ctx(x) (x)
4099 #define MqContextC_X2obj(x) MkOBJ(x)
4112 #define MqContextC_T (&MQ_RT_REF._MqContextC_T)
4114 #define MqContextC_TT (MkTYP(MqContextC_T))
4116 #define MqContextST MqContextC_T
4118 #define MqContextSTT (MkTYP(MqContextST))
4120 #define MqContextC_type MQ_CTX
4122 #define MqContextCT_X(instance) ( (struct MqCtxTypeS *) (MkOBJ_R(instance).type) )
4124 #define MqContextCTT_X(instance) (MkOBJ_R(instance).type)
4126 #define MqContextCT_TT(typ) ( (struct MqCtxTypeS *) (typ) )
4128 #define MqContextC_NS MQ
4130 #define MqContextCTT MqContextCTT
4132 #define MqContextCT ( (struct MqCtxTypeS *) MqContextCTT )
4140 #pragma GCC diagnostic push
4141 #pragma GCC diagnostic ignored "-Wattributes"
4159 #pragma GCC diagnostic pop
4160 #define MqContextC_Check(mng) MqCtxCheck(mng)
4170 META_ATTRIBUTE_SANITIZE
4178 META_ATTRIBUTE_SANITIZE
4185 #define MqCtxRaise(_ctx) if (!_MkCheckX(MqContextC,_ctx)) { \
4186 MkErrorSetC_1E("'MqContextC' hdl is NULL"); \
4191 #define MqCTX_R(x) (*(x)).super.ctx
4193 #define MqCTX(x) (&MqCTX_R(x))
4212__parser__push__(doc-group=_ignore_,doc-index=Class,doc-name=Export,
class=MqContextC);
4264#define MqContextHandleResolve_e(netHdl) ({ \
4265 MK_HDL tmpHdl=netHdl; \
4270 tmp=MqContextHandleResolve(tmpHdl); \
4272 MkErrorSetC_1_NULL("ERROR: 'MqContextC' handle is 'NULL'"); \
4287 __parser__(flags=
new,doc-group=_ignore_,doc-index=Class,doc-name=Misc,
class=MqContextC,null-
return-allow)
4685MQ_EXTERN bool MK_DECL MqContextCheckLock (
4764#define MqEnvLog_0() MqEnvLog(&(META_CONTEXT_S)->link.protect,META_CONTEXT_S,NULL,0,__func__,0,"ENV")
4765#define MqEnvLog_1(env) MqEnvLog(env,NULL,NULL,0,__func__,0,"ENV")
4766#define MqEnvLog_2(env,fmt) MqEnvLog(env,fmt,NULL,0,__func__,0,"ENV")
4767#define MqEnvLog_3(env,fmt,lbl) MqEnvLog(env,fmt,lbl,0,__func__,0,"ENV")
5048#define MqStorageLog_1(ctx) MqStorageLog(ctx,__func__)
5626#define MQ_ROUTE_CTX_MAX 50
5852__parser__(type=ME_PSN_MQ_TOKEN:"token identifer")
5856#define MQ_TOK_SIZE (8+1)
5974 MkMarkF fMark
__parser__(internal,default=NULL)
6206 MK_I8 * const val_out
6336__parser__(template-required,no-rpc,keep,no-static)
6351__parser__(template-required,no-rpc,keep,no-static)
6803__parser__(internal,doc-no,doc-group=Atom,doc-index=SendApi)
8037#define MQ_SEND_TRANSACTION_TOKEN_SIZE 10
8038#define MQ_SEND_TOKEN_SIGNATURE_SIZE 50
8358 return MkSysStringGetNoNULL((ctx)->config.dispName);
8371 return MkSysStringGetNoNULL((ctx)->config.dispPrefix);
8384 return MkSysStringGetNoNULL((ctx)->config.dispPostfix);
8397 return MkSysStringGetNoNULL((ctx)->config.storageFile);
8409 return (ctx)->config.io.buffersize;
8421 return (ctx)->config.io.pkgsize;
8433 return (ctx)->config.io.timeout;
8596#if defined(MQ_C_BUILD_DLL)
8598 #define META_SECTION_DEFINE
8599 #include "MqDumpS_mq.h"
8600 #undef META_SECTION_DEFINE
8632 #define MqDumpC_SIGNATURE (MkObjectC_SIGNATURE ^ (12u<<10))
8633 #define MqDumpC_MASK (((1u<<22)-1)<<10)
8641 #define MqDumpC_X2dmp(x) (x)
8642 #define MqDumpC_X2obj(x) MkOBJ(x)
8655 #define MqDumpC_T (&MQ_RT_REF._MqDumpC_T)
8657 #define MqDumpC_TT (MkTYP(MqDumpC_T))
8659 #define MqDumpST MqDumpC_T
8661 #define MqDumpSTT (MkTYP(MqDumpST))
8663 #define MqDumpC_type MQ_DMP
8665 #define MqDumpCT_X(instance) ( (struct MkSuperTypeS *) (MkOBJ_R(instance).type) )
8667 #define MqDumpCTT_X(instance) (MkOBJ_R(instance).type)
8669 #define MqDumpCT_TT(typ) ( (struct MkSuperTypeS *) (typ) )
8671 #define MqDumpC_NS MQ
8673 #define MqDumpCTT MqDumpCTT
8675 #define MqDumpCT ( (struct MkSuperTypeS *) MqDumpCTT )
8683 #pragma GCC diagnostic push
8684 #pragma GCC diagnostic ignored "-Wattributes"
8702 #pragma GCC diagnostic pop
8703 #define MqDumpC_Check(mng) MqDmpCheck(mng)
8713 META_ATTRIBUTE_SANITIZE
8721 META_ATTRIBUTE_SANITIZE
8728 #define MqDmpRaise(_dmp) if (!_MkCheckX(MqDumpC,_dmp)) { \
8729 MkErrorSetC_1E("'MqDumpC' hdl is NULL"); \
8734 #define MqDMP_R(x) (*(x)).super.dmp
8736 #define MqDMP(x) (&MqDMP_R(x))
8755__parser__push__(doc-group=_ignore_,doc-index=Class,doc-name=Export,
class=MqDumpC);
8807#define MqDumpHandleResolve_e(netHdl) ({ \
8808 MK_HDL tmpHdl=netHdl; \
8813 tmp=MqDumpHandleResolve(tmpHdl); \
8815 MkErrorSetC_1_NULL("ERROR: 'MqDumpC' handle is 'NULL'"); \
8830 __parser__(flags=
new,doc-group=_ignore_,doc-index=Class,doc-name=Misc,
class=MqDumpC,null-
return-allow)
8861#define MqDumpLog_1XS(dump) MqDumpLog(dump,(MK_OBJ)META_CONTEXT_S,0,__func__,0)
8906 MQ_DMP * const dumpP_inout
8931 MQ_DMP * const dumpP_inout
9112#pragma GCC diagnostic push
9113#pragma GCC diagnostic ignored "-Wlto-type-mismatch"
9115#if defined(MQ_C_BUILD_DLL)
9117 #define META_SECTION_DEFINE
9118 #include "MqRuntimeS_mq.h"
9119 #undef META_SECTION_DEFINE
9172#pragma GCC diagnostic pop
9185 #define MqRuntimeC_SIGNATURE (MkRtExtC_SIGNATURE ^ (1u<<3))
9186 #define MqRuntimeC_MASK (((1u<<29)-1)<<3)
9194 #define MqRuntimeC_X2rt(x) (x)
9195 #define MqRuntimeC_X2rtext(x) MkRTEXT(x)
9196 #define MqRuntimeC_X2ext(x) MkEXT(x)
9197 #define MqRuntimeC_X2obj(x) MkOBJ(x)
9210 #define MqRuntimeC_T (&MQ_RT_REF._MqRuntimeC_T)
9212 #define MqRuntimeC_TT (MkTYP(MqRuntimeC_T))
9214 #define MqRuntimeST MqRuntimeC_T
9216 #define MqRuntimeSTT (MkTYP(MqRuntimeST))
9218 #define MqRuntimeC_type MQ_RT
9220 #define MqRuntimeCT_X(instance) ( (struct MkSuperTypeS *) (MkOBJ_R(instance).type) )
9222 #define MqRuntimeCTT_X(instance) (MkOBJ_R(instance).type)
9224 #define MqRuntimeCT_TT(typ) ( (struct MkSuperTypeS *) (typ) )
9226 #define MqRuntimeC_NS MQ
9228 #define MqRuntimeCTT MqRuntimeCTT
9230 #define MqRuntimeCT ( (struct MkSuperTypeS *) MqRuntimeCTT )
9238 #pragma GCC diagnostic push
9239 #pragma GCC diagnostic ignored "-Wattributes"
9257 #pragma GCC diagnostic pop
9258 #define MqRuntimeC_Check(mng) MqRtCheck(mng)
9268 META_ATTRIBUTE_SANITIZE
9276 META_ATTRIBUTE_SANITIZE
9283 #define MqRtRaise(_rt) if (!_MkCheckX(MqRuntimeC,_rt)) { \
9284 MkErrorSetC_1E("'MqRuntimeC' hdl is NULL"); \
9299#define MqRT &MqRuntimeRLS
9301 #define MqRT_O(o) MqRuntimeGet( MK_RT_CALL_ONLY )
9302 #define MqRT_X(x) MqRuntimeGet( MK_RT_CALL_ONLY )
9303 #define MqRT_ON(o) MqRuntimeGet( MK_RT_CALL_ONLY )
9304 #define MqRT_XN(x) MqRuntimeGet( MK_RT_CALL_ONLY )
9306 #define MqRT_O(o) ((o) && (*o).objRtExt ? (MQ_RT)(*o).objRtExt : MqRuntimeGet( MK_RT_CALL_ONLY ))
9307 #define MqRT_X(x) ((x) && MkOBJ_R(x).objRtExt ? (MQ_RT)MkOBJ_R(x).objRtExt : MqRuntimeGet( MK_RT_CALL_ONLY ))
9308 #define MqRT_ON(o) ( (*o).objRtExt ? (MQ_RT)(*o).objRtExt : MqRuntimeGet( MK_RT_CALL_ONLY ))
9309 #define MqRT_XN(x) ( MkOBJ_R(x).objRtExt ? (MQ_RT)MkOBJ_R(x).objRtExt : MqRuntimeGet( MK_RT_CALL_ONLY ))
9313 #define MqRtSetup_O(o) MK_RT_UNUSED MQ_RT const mqrt = MqRT_O(o)
9314 #define MqRtSetup_ON(o) MK_RT_UNUSED MQ_RT const mqrt = MqRT_ON(o)
9315 #define MqRtSetup_X(x) MK_RT_UNUSED MQ_RT const mqrt = MqRT_X(x)
9316 #define MqRtSetup_XN(x) MK_RT_UNUSED MQ_RT const mqrt = MqRT_XN(x)
9317 #define MqRtSetup_NULL MK_RT_UNUSED MQ_RT const mqrt = MqRuntimeGet( MK_RT_CALL_ONLY )
9319 #define MqRtSetup_O_RT(o) MkRtSetup_O_RT(o) ; MqRtSetup_O(o)
9320 #define MqRtSetup_ON_RT(o) MkRtSetup_ON_RT(o) ; MqRtSetup_ON(o)
9321 #define MqRtSetup_X_RT(x) MkRtSetup_X_RT(x) ; MqRtSetup_X(x)
9322 #define MqRtSetup_XN_RT(x) MkRtSetup_XN_RT(x) ; MqRtSetup_XN(x)
9323 #define MqRtSetup_NULL_RT MkRtSetup_NULL_RT ; MqRtSetup_NULL
9326 #undef AllRtSetup_ON
9328 #undef AllRtSetup_XN
9329 #undef AllRtSetup_NULL
9331 #define AllRtSetup_O(o) MkRtSetup_O(o) ; MqRtSetup_O(o)
9332 #define AllRtSetup_ON(o) MkRtSetup_ON(o) ; MqRtSetup_ON(o)
9333 #define AllRtSetup_X(x) MkRtSetup_X(x) ; MqRtSetup_X(x)
9334 #define AllRtSetup_XN(x) MkRtSetup_XN(x) ; MqRtSetup_XN(x)
9335 #define AllRtSetup_NULL MkRtSetup_NULL ; MqRtSetup_NULL
9337 #define MqRtSetup_O(o)
9338 #define MqRtSetup_ON(o)
9339 #define MqRtSetup_X(x)
9340 #define MqRtSetup_XN(x)
9341 #define MqRtSetup_NULL
9343 #define MqRtSetup_O_RT(o)
9344 #define MqRtSetup_ON_RT(o)
9345 #define MqRtSetup_X_RT(x)
9346 #define MqRtSetup_XN_RT(x)
9347 #define MqRtSetup_NULL_RT
9475__parser__(hide,
template-required,
class=MqMsgque)
9681__parser__push__(doc-name=Introspection,doc-index=Class,class=MqContextC,no-rpc,null-return-allow,flags=new);
9716__parser__push__(doc-name=Introspection,doc-index=Class,
class=MqDumpC,no-rpc,null-
return-allow,flags=
new);
9751__parser__push__(doc-name=Introspection,doc-index=Class,
class=MqFactoryC,no-rpc,null-
return-allow,flags=
new);
#define MqFactoryS_originalIdent_size
#define MqLinkS_targetIdent_size
MqClassIdentGet of the link target, only valid on parent-context
#define MqConfigS_dispPostfix_size
#define MqConfigS_storageFile_size
storage file used as default if a database is requested
#define MqConfigS_dispName_size
#define MqConfigS_dispPrefix_size
MK_ERR MkErrorFORMAT(MK_OBJN fmtobj)
void Log(MK_DBG debug=0, MK_STRN callfunc=__builtin_FUNCTION(), MK_I32 lvl=0) const
#define __parser__global__(...)
#define __parser__push__(...)
void(* MkMarkF)(MK_RT mkrt, MK_PTR data)
#define __MkCheckX(cls, x)
#define MkSanitizeCheck(_root, _m)
#define MkSanitizeCheckO(_root, _o)
#define MkObjectHandleResolve(...)
#define MkObjectHandleGet(...)
#define MkObjectToString(...)
#define MK_ATTR_RT_INSTANCE
#define MK_RT_ATTR_FORMAT_2
#define MK_PARSER_RT_ONLY
#define MK_ATTR_RT_STATIC
#define MK_INSTANCE_HDL(x)
MK_STRN MqClassIdentGet(MQ_CTXN const ctx)
get the application-identification …
enum MkErrorE MqClassIdentSet_RT(MK_RT mkrt, MQ_CTX const ctx, MK_STRN ident)
link the MqContextC to a new MqFactoryC identified by ident
MQ_FCT const MqClassFactoryGet(MQ_CTXN const ctx)
get the MqFactoryC used by the MqContextC
enum MkErrorE MqClassFactorySet_RT(MK_RT mkrt, MQ_CTX const ctx, MQ_FCT const item)
link the MqContextC to a new MqFactoryC
MK_STRN MqClassOriginalIdentGet(MQ_CTXN const ctx)
get the libmqmsgque::MqFactoryS::originalIdent from the MqContextC
static MQ_CTX MqContextGetNull(void)
Null-Slot - return a MqContextC typed NULL instance …
static MQ_CTX MqContextNext(MQ_CTX const ctx)
get next instance from linked-list of MqContextS type
static MQ_CTX MqContextPrev(MQ_CTX const ctx)
get previous instance from linked-list of MqContextS type
static MK_HDL MqContextHandleGet_RT(MK_RT mkrt, MQ_CTX const ctx)
Handle-Get-Slot - returns a export-hdl to the MqContextC useable for external storage
static MQ_CTX MqCtx(MK_MNG mng)
cast a unknown-object into an MqContextS pointer or NULL if not possible
static bool MqCtxCheckO(MK_OBJN obj)
check MqContextS -> libmkkernel::MkObjectS::signature …
static bool MqCtxCheck(MK_MNGN mng)
check MqContextS -> libmkkernel::MkObjectS::signature …
#define MqContextC_X2obj(x)
#define MqContextC_TT
class as MkTypeS-class-type, useable in a class-macro as: class##_TT …
void(* MqDataCopyF)(MQ_SERVICE_COPY_ARGS)
prototype for a copy additional token data function …
enum MkErrorE(* MqTokenF)(MQ_SERVICE_CALL_ARGS)
prototype for an object method function …
#define MQ_SERVICE_FREE_ARGS
the libmqmsgque::MqDataFreeF arguments with default names
void(* MqDataFreeF)(MQ_SERVICE_FREE_ARGS)
prototype for a free additional token data function …
#define MQ_SERVICE_CALL_ARGS
the libmqmsgque::MqTokenF arguments with default names
#define MQ_SERVICE_COPY_ARGS
the libmqmsgque::MqDataFreeF arguments with default names
static bool MqConfigGetIsString(MQ_CTX const ctx)
does the context object is using the string-mode ?
static bool MqConfigGetIsParent(MQ_CTX const ctx)
does the context object is a parent ? An objext is a parent id the libmqmsgque::MqConfigS::parent att...
static bool MqConfigGetIsServer(MQ_CTX const ctx)
does the context object is a server ?
static MK_STRN MqConfigGetPostfix(MQ_CTXN const ctx)
get the libmqmsgque::MqConfigS::dispPostfix
static MK_STRN MqConfigGetStorage(MQ_CTXN const ctx)
get the storage of the context object
static MK_TIME_T MqConfigGetTimeout(MQ_CTXN const ctx)
get the timeout value of the context object
static MQ_SOCK_HDL MqConfigGetIoPipe(MQ_CTX const ctx)
return the libmqmsgque::MqIoPipeConfigS
enum MkErrorE MqConfigGetIoTcp(MQ_CTX const ctx, MK_STRN *host_out, MK_STRN *port_out, MK_STRN *myhost_out, MK_STRN *myport_out)
get the configuration-data of the tcp-client-server-link …
static enum MqStartE MqConfigGetStartAs(MQ_CTX const ctx)
return the libmqmsgque::MqConfigS::startAs value
static MK_STRN MqConfigGetName(MQ_CTXN const ctx)
get the name of the context object
static enum MqIdentE MqConfigGetIdentFrom(MQ_CTX const ctx)
get the libmqmsgque::MqConfigS::identFrom
static MK_STRN MqConfigGetIoUds(MQ_CTXN const ctx)
return the libmqmsgque::MqIoUdsConfigS
static MK_I32 MqConfigGetPkgsize(MQ_CTXN const ctx)
get the maximun size of a BDY package
static MK_I32 MqConfigGetBuffersize(MQ_CTXN const ctx)
get the minimum of the read/send buffersize of the socket
#define MQ_GET_PARENT(ctx)
#define MQ_IS_PARENT(ctx)
static enum MqStatusIsEF MqConfigGetStatusIs(MQ_CTX const ctx)
return the libmqmsgque::MqContextS::statusIs value
enum MkErrorE MqConfigGetIoTcpL_RT(MK_RT mkrt, MQ_CTX const ctx, MK_BFL *vals_out)
get the configuration-data of the tcp-client-server-link as MkBufferListC …
#define MQ_IS_SERVER(ctx)
extract boolean information from context
#define MQ_IS_MASTER(ctx)
static MK_STRN MqConfigGetPrefix(MQ_CTXN const ctx)
get the libmqmsgque::MqConfigS::dispPrefix
void MqConfigSetServerCleanup_RT(MK_RT mkrt, MQ_CTX const ctx, MqTokenF fCall, MK_CBP callback, MqDataFreeF fFree, MqDataCopyF fCopy)
set the libmqmsgque::MqSetupS::ServerCleanup
void MqConfigSetEvent_RT(MK_RT mkrt, MQ_CTX const ctx, MqTokenF fCall, MK_CBP callback, MqDataFreeF fFree, MqDataCopyF fCopy)
set the libmqmsgque::MqSetupS::Event
void MqConfigSetBgError_RT(MK_RT mkrt, MQ_CTX const ctx, MqTokenF fCall, MK_CBP callback, MqDataFreeF fFree, MqDataCopyF fCopy)
set the libmqmsgque::MqSetupS::BgError
void MqConfigSetServerSetup_RT(MK_RT mkrt, MQ_CTX const ctx, MqTokenF fCall, MK_CBP callback, MqDataFreeF fFree, MqDataCopyF fCopy)
set the libmqmsgque::MqSetupS::ServerSetup
void MqConfigReset_RT(MK_RT mkrt, MQ_CTX const ctx)
clean the libmqmsgque::MqContextS::config data
void MqConfigSetAllTimeout(MQ_CTX const ctx, MK_TIME_T data)
set the libmqmsgque::MqIoConfigS::timeout value
void MqConfigSetIsServer(MQ_CTX const ctx, bool data)
set the libmqmsgque::MqSetupS::isServer value
enum MkErrorE MqConfigSetStartAsString(MQ_CTX const ctx, MK_STRN data)
set the libmqmsgque::MqConfigS::startAs value using string default, thread, fork or spawn
bool MqConfigCheckStartAs(MQ_CTX const ctx, enum MqStartE data)
check if libmqmsgque::MqConfigS::startAs can be set to data
void MqConfigSetBuffersize(MQ_CTX const ctx, MK_I32 data)
set the libmqmsgque::MqIoConfigS::buffersize value
void MqConfigSetPrefixWithNoLock_RT(MK_RT mkrt, MQ_CTX const ctx, MK_STRN data)
set the libmqmsgque::MqConfigS::dispPrefix with low-priority …
enum MkErrorE MqConfigSetIoTcp_RT(MK_RT mkrt, MQ_CTX const ctx, MK_STRN host, MK_STRN port, MK_STRN myhost, MK_STRN myport)
configure a context to use a tcp-client-server-link …
void MqConfigSetIgnoreExit(MQ_CTX const ctx, bool data)
set the libmqmsgque::MqSetupS::ignoreExit value
#define MqConfigSetIoTcp(...)
void MqConfigSetIsString(MQ_CTX const ctx, bool data)
set the libmqmsgque::MqConfigS::native value 'S'string or 'L'owEndian or 'B'igEndian
void MqConfigSetStorage_RT(MK_RT mkrt, MQ_CTX const ctx, MK_STRN data)
set the Storage value and cleanup old value
void MqConfigSetTimeout(MQ_CTX const ctx, MK_TIME_T data)
set the libmqmsgque::MqIoConfigS::timeout value
void MqConfigSetPostfix_RT(MK_RT mkrt, MQ_CTX const ctx, MK_STRN data)
set the client-part (2) of the application-identifer libmqmsgque::MqConfigS::dispName …
enum MkErrorE MqConfigSetIoTcpL_RT(MK_RT mkrt, MQ_CTX const ctx, MK_BFL const vals)
configure a context to use a tcp-client-server-link …
void MqConfigSetIdentFrom(MQ_CTX const ctx, enum MqIdentE data)
set the libmqmsgque::MqConfigS::identFrom value
enum MkErrorE MqConfigSetIoUds_RT(MK_RT mkrt, MQ_CTX const ctx, MK_STRN file)
configure a context to use a uds-client-server-link …
void MqConfigSetPrefix_RT(MK_RT mkrt, MQ_CTX const ctx, MK_STRN data)
set the server-part (1) of the application-identifer libmqmsgque::MqConfigS::dispName …
enum MkErrorE MqConfigSetAllDebug_RT(MK_RT mkrt, MQ_CTX const ctx, MK_I32 const data)
set the MkRuntimeS::debug value
enum MkErrorE MqConfigSetIoPipe_RT(MK_RT mkrt, MQ_CTX const ctx, MQ_SOCK_HDL fh)
set the pipe configuration data …
enum MkErrorE MqConfigSetDaemon_RT(MK_RT mkrt, MQ_CTX const ctx, MK_STRN pidfile)
start the server-context as daemon …
enum MkErrorE MqConfigSetStartAs(MQ_CTX const ctx, enum MqStartE data)
set the libmqmsgque::MqConfigS::startAs value
void MqConfigSetPkgsize(MQ_CTX const ctx, MK_I32 data)
set the libmqmsgque::MqIoConfigS::pkgsize value
void MqConfigSetName_RT(MK_RT mkrt, MQ_CTX const ctx, MK_STRN data)
set the libmqmsgque::MqConfigS::dispName value and cleanup old value
enum MkErrorE MqSendVL2_RT(MK_RT mkrt, MQ_CTX const ctx, MK_STRN cstr, va_list var_list)
A version of MqSend with va_list support …
static MK_STRN MqLinkGetTargetIdent(MQ_CTX const ctx)
get the ident of the link-target …
static MK_NUM MqLinkGetCtxId(MQ_CTX const ctx)
get an identifier which is unique per parent-or-child-context …
static bool MqLinkIsParent(MQ_CTX const ctx)
is the context a parent-context? …
static MK_STRN MqLogServerOrClient(MQ_CTXN const ctx)
is ctx a SERVER or a CLIENT ? …
static MK_STRN MqLogParentOrChild(MQ_CTXN ctx)
is ctx a PARENT or a CHILD ? …
void MqExit_RT(MK_RT mkrt, MQ_CTX const ctx, MK_STRN const callfunc, MK_STRN const callfile, MK_I32 const callline) MK_NO_RETURN
delete the context and exit the current process or thread …
static MQ_CTXN MqGetRootN(MQ_CTXN ctx)
(const) get the Root (toplevel initial context)
static MQ_CTX MqGetRoot(MQ_CTX ctx)
get the Root (toplevel initial context)
MQ_CTX_A MqRouteResolve_RT(MK_RT mkrt, MQ_CTX const ctx, MK_STRN const ident, MK_NUM const retnum)
return a list of all context belonging to ident …
enum MkErrorE MqRouteCreate_RT(MK_RT mkrt, MQ_CTX ctx, MK_STRN route, MK_STRN service, bool overwrite)
create/delete a routing-link between context an a service using route
enum MkErrorE MqSendBUF_RT(MK_RT mkrt, MQ_CTX const ctx, MK_BUFN const val)
append a MkBufferC object to the send-data-package object …
enum MkErrorE MqSendBUS_FLAT_RT(MK_RT mkrt, MQ_CTX const ctx, MK_BUSN const val)
append a MkBufferStreamC object to the send-data-package object …
enum MkErrorE MqSendL_FLAT_RT(MK_RT mkrt, MQ_CTX const ctx, MK_BFLN const val)
append a MkBufferListC object as flat list of items to the send-data-package object …
enum MkErrorE MqSendV_RT(MK_RT mkrt, MQ_CTX const ctx, MK_FST const printfmt,...)
append a vararg string to the send-data-package object …
enum MkErrorE MqSendBIN_RT(MK_RT mkrt, MQ_CTX const ctx, MkBinaryR const val)
append a libmkkernel::MK_BIN object to the send-data-package. …
enum MkErrorE MqSendBFL_RT(MK_RT mkrt, MQ_CTX const ctx, MK_BFLN const val)
append a MkBufferListC object to the send-data-package object …
static bool MqServiceIsTransaction(MQ_CTX const ctx)
check if the ongoing-service-call belongs to a transaction …
MK_STRN MQ_TOK
MqContextC - a char[4+1] or hex[8+1] string used to unique identify a service …
MqTokenF MqServiceCallbackF
MqContextC - the callback-function is used as a service-handle or as a event-handle …
MQ_TOK MqServiceTokenGet(MQ_CTX const ctx)
in an ongoing-service-call get the current MqContextC_ServiceApi_Identifer …
bool MqServiceTokenCheck(MQ_CTX const ctx, MQ_TOK const token)
in an ongoing-service-call check if the current MqContextC_ServiceApi_Identifer is token …
bool MqServiceTokenExists(MQ_CTX const ctx, MQ_TOK const token)
check if the MqContextC_ServiceApi_Identifer token is defined as ctx service …
enum MkErrorE MqSlaveGetFilter_RT(MK_RT mkrt, MQ_CTX const ctx, MQ_CTX *ctx_out)
get the filter-ctx or the master-ctx …
enum MkErrorE MqSlaveGetProxy_RT(MK_RT mkrt, MQ_CTX const ctx, MQ_SLAVE_ID const id, MQ_CTX *ctx_out)
on slave return the master and on master return the slave identified by id.
static bool MqSlaveCheck(MQ_CTXN const ctx, MQ_SLAVE_ID const id)
check if slave-id is valid
enum MkErrorE MqSlaveCreate_RT(MK_RT mkrt, MQ_CTX const ctx, MQ_SLAVE_ID const id, MQ_CTX const slave)
create a master/slave link between the master-parent-context and the slave-parent-context …
enum MkErrorE MqSlaveGet_RT(MK_RT mkrt, MQ_CTX const ctx, MQ_SLAVE_ID const id, MQ_CTX *ctx_out)
get the slave-context from a master-context …
enum MkErrorE MqSlaveDelete_RT(MK_RT mkrt, MQ_CTX const ctx, MQ_SLAVE_ID const id)
Delete a slave object from a master/slave link identified by id. …
static MQ_CTX MqSlaveGetMaster(MQ_CTX const ctx)
opposite function of MqSlaveGetFilter
static bool MqSlaveIs(MQ_CTXN const ctx)
is the context a slave-context ? …
enum MkErrorE MqStorageImport_RT(MK_RT mkrt, MQ_CTX const ctx, MQ_LTR *transLIdP_inout)
import the storage-package into the read-data-package …
enum MkErrorE MqStorageClose_RT(MK_RT mkrt, MQ_CTX const ctx)
close the storage. …
enum MkErrorE MqStorageErrCnt_RT(MK_RT mkrt, MQ_CTX const ctx, MQ_LTR transLId, MK_I32 *cnt_out)
increment and return the database row-error-count for the row defined with transLId
enum MkErrorE MqStorageExport_RT(MK_RT mkrt, MQ_CTX const ctx, MQ_LTR *ltid_out)
export the read-data-package into the STORAGE …
enum MkErrorE MqStorageOpen_RT(MK_RT mkrt, MQ_CTX const ctx, MK_STRN const storageFile)
switch to a file-based-transaction-database …
void(* MqWaitForPipeF)(MK_RT mkrt, MQ_CTX const ctx, const struct MkIdS *idP)
Wait for a pipe-server to finish …
void(* MqExitF)(MK_RT mkrt, int num)
prototype for exit a process or thread …
void(* MqSetupF)(MQ_CTX const ctx)
used to setup (initialize) a new thread/fork/process created by ccmqmsgque using the SysServer?...
enum MkErrorE(* MqCreateF)(MK_RT mkrt, MQ_CTX const ctx, MK_BFL const args)
the prototype for the ContextCreate function …
void(* MqDeleteF)(MQ_CTX const ctx)
the prototype for a ContextDelete function …
void(* MqHelpF)(MK_STRN basename)
application specific help function type …
void(* MqRefCountF)(MK_RT mkrt, MQ_CTX ctx, MK_PTR const env)
used in libmqmsgque::MqCtxTypeS::fIncrSelf and libmqmsgque::MqCtxTypeS::fDecrSelf to protect an "embe...
static bool MqCtxTypCheckO(MK_OBJN obj)
check MqCtxTypeS -> libmkkernel::MkObjectS::signature …
static bool MqCtxTypCheck(MK_MNGN mng)
check MqCtxTypeS -> libmkkernel::MkObjectS::signature …
static MK_HDL MqDumpHandleGet_RT(MK_RT mkrt, MQ_DMP const dmp)
Handle-Get-Slot - returns a export-hdl to the MqDumpC useable for external storage
static MQ_DMP MqDumpPrev(MQ_DMP const dmp)
get previous instance from linked-list of MqDumpS type
static MQ_DMP MqDumpInstances_RT(MK_RT mkrt)
get head-instance from linked-list of MqDumpS type …
static MQ_DMP MqDumpNext(MQ_DMP const dmp)
get next instance from linked-list of MqDumpS type
static MQ_DMP MqDumpGetNull(void)
Null-Slot - return a MqDumpC typed NULL instance …
static MQ_DMP MqDmp(MK_MNG mng)
cast a unknown-object into an MqDumpS pointer or NULL if not possible
#define MqDumpC_TT
class as MkTypeS-class-type, useable in a class-macro as: class##_TT …
static bool MqDmpCheck(MK_MNGN mng)
check MqDumpS -> libmkkernel::MkObjectS::signature …
static bool MqDmpCheckO(MK_OBJN obj)
check MqDumpS -> libmkkernel::MkObjectS::signature …
static bool MqEnvCheckO(MK_OBJN obj)
check MqEnvS -> libmkkernel::MkObjectS::signature …
static bool MqEnvCheck(MK_MNGN mng)
check MqEnvS -> libmkkernel::MkObjectS::signature …
static bool MqErrCheckO(MK_OBJN obj)
check MqErrorS -> libmkkernel::MkObjectS::signature …
static bool MqErrCheck(MK_MNGN mng)
check MqErrorS -> libmkkernel::MkObjectS::signature …
void(* MqFactoryDataFreeF)(MK_RT mkrt, MK_PTR *dataP)
prototype for a free additional factory data function
enum MkErrorE(* MqFactoryCTorF)(MK_RT mkrt, MQ_RT mqrt, MQ_CTX const tmpl, enum MqFactoryE create, MQ_FCT const fct, MQ_CTX *ctx_out)
type of a MqFactoryC constructor
void(* MqFactoryDataCopyF)(MK_RT mkrt, MK_PTR *dataP)
prototype for a copy additional factory data function
void(* MqFactoryDTorF)(MK_RT mkrt, MQ_CTX ctx, bool doFactoryCleanup, MQ_FCT const fct)
type of a MqFactoryC destructor
static MQ_FCT MqFactoryPrev(MQ_FCT const fct)
get previous instance from linked-list of MqFactoryS type
static MQ_FCT MqFactoryGetNull(void)
Null-Slot - return a MqFactoryC typed NULL instance …
static MK_HDL MqFactoryHandleGet_RT(MK_RT mkrt, MQ_FCT const fct)
Handle-Get-Slot - returns a export-hdl to the MqFactoryC useable for external storage
static MQ_FCT MqFactoryNext(MQ_FCT const fct)
get next instance from linked-list of MqFactoryS type
static MQ_FCT MqFactoryInstances_RT(MK_RT mkrt)
get head-instance from linked-list of MqFactoryS type …
static bool MqFctCheckO(MK_OBJN obj)
check MqFactoryS -> libmkkernel::MkObjectS::signature …
#define MqFactoryC_X2obj(x)
static bool MqFctCheck(MK_MNGN mng)
check MqFactoryS -> libmkkernel::MkObjectS::signature …
#define MqFactoryC_TT
class as MkTypeS-class-type, useable in a class-macro as: class##_TT …
static MQ_FCT MqFct(MK_MNG mng)
cast a unknown-object into an MqFactoryS pointer or NULL if not possible
MQ_FCT MqFactoryGetCalled(MK_STRN const ident)
returns the MqFactoryC identified by ident …
#define MQ_EXTERN
static library
MqIdentE
identify the application using prefix (default) or factory …
MqWaitOnEventE
wait for an event? …
MqFactoryE
the factory is called to create an object for ...
MqStatusIsEF
Information about how the context was created.
MqSlaveE
predefined slave-id for well known slaves …
MqIoComE
what kind of socket interface to use? …
MqHandShakeE
the hand-shake of a service-call …
MqTransTypeE
the type of the transaction …
MqStartE
User preferences on HOWTO start a new entity.
@ MQ_IDENT_FACTORY
value from libmqmsgque::MqFactoryS::originalIdent
@ MQ_IDENT_PREFIX
value from libmqmsgque::MqConfigS::dispPrefix
@ MQ_WAIT_NO
Check for one event but do not wait …
@ MQ_WAIT_FOREVER
Wait maximum timeout seconds for an event or raise an timeout-error …
@ MQ_WAIT_ONCE
Wait maximum timeout seconds for one new event, doesn't matter which context the event belongs to or ...
@ MQ_WAIT_OWN
Wait maximum timeout seconds for one new event that belongs to the current context or raise an timeou...
@ MQ_FACTORY_NEW_INIT
initial object, nothing else is known
@ MQ_FACTORY_NEW_CHILD
create object as a child of an other object
@ MQ_FACTORY_NEW_FILTER
create object as a filter
@ MQ_FACTORY_NEW_SLAVE
create object as a slave of an other object
@ MQ_FACTORY_NEW_FORK
create object as a fork process
@ MQ_FACTORY_NEW_THREAD
create object as a thread
@ MQ_STATUS_IS_DUP
context is created as a duplicate of an other context
@ MQ_STATUS_IS_THREAD
context is created as a thread
@ MQ_STATUS_IS_FORK
context is created as a fork
@ MQ_STATUS_IS_INITIAL
context is the first context
@ MQ_STATUS_IS_SPAWN
context is created as a spawn
@ MQ_SLAVE_FILTER
internal: the filter-slave-id, (on a master get the filter-slave)
@ MQ_SLAVE_USER
internal: start of user-defined-slave-id
@ MQ_SLAVE_LOOPBACK
internal: the loopback-slave-id, (call my own services)
@ MQ_SLAVE_MASTER
internal: the master-slave-id, (on a slave get the master)
@ MQ_SLAVE_MAX
internal: the maximum slave-id …
@ MQ_SLAVE_OTHER
internal: on the master-ctx get the slave-ctx and on the slave-ctx get the master-ctx
@ MQ_IO_LOOP
using pipe socket as stdin and stdout
@ MQ_IO_INIT
using stdin and stdout
@ MQ_IO_PIPE
using a pipe socket (most internal usage)
@ MQ_IO_UDS
using a uds socket
@ MQ_IO_TCP
using a tcp socket
@ MQ_HANDSHAKE_START
direction: client -> server
@ MQ_HANDSHAKE_ERROR
direction: server -> client
@ MQ_HANDSHAKE_OK
direction: server -> client
@ MQ_TRANS_TYPE_TRANS
'T' = MqSendEND_AND_TRANSACTION
@ MQ_TRANS_TYPE_NO
'N' = MqSendEND
@ MQ_TRANS_TYPE_SUB
'S' = MqSendEND_AND_SUB
@ MQ_TRANS_TYPE_WAIT
'W' = MqSendEND_AND_WAIT
@ MQ_TRANS_TYPE_CB
'C' = MqSendEND_AND_CALLBACK
@ MQ_START_SPAWN
create entity as spawn process
@ MQ_START_THREAD
create entity as thread
@ MQ_START_FORK
create entity as fork
@ MQ_START_DEFAULT
use application-context default entity creation
int(* MqSysSelectF)(int max, void *read, void *write, void *except, struct timeval *timeout)
select syscall …
enum MkErrorE(* MqSysServerForkF)(MK_RT mkrt, MQ_RT mqrt, MQ_CTX const ctx, MQ_FCT factory, MK_BFL *argsP, MK_STRN name, MQ_SOCK_HDL socket, struct MkIdS *idPtrOut)
fork server create syscall with ccmqmsgque error plugin
struct MqLalS MqLal
Language Abstraction Layer in duty.
enum MkErrorE(* MqSysServerThreadF)(MK_RT mkrt, MQ_CTX const ctx, struct MqSysServerThreadMainS *const argP, MK_STRN name, int state, struct MkIdS *idPtrOut)
thread server create syscall with ccmqmsgque error plugin
enum MkErrorE(* MqSysServerSpawnF)(MK_RT mkrt, MQ_RT mqrt, MQ_CTX const ctx, char *const *argv, MK_STRN name, struct MkIdS *idPtrOut)
spawn server create syscall with ccmqmsgque error plugin
int MQ_ROU
32bit routing token because PHP-32 does NOT support long long
MK_NUM MQ_SLAVE_ID
a slave identiver
int MQ_LTR
32bit longterm transaction token because PHP-32 does NOT support long long
struct config_setting_t config_setting_t
libconfig struct
int MQ_HDL
handle data-type
struct config_t config_t
libconfig struct
static bool MqRtCheckO(MK_OBJN obj)
check MqRuntimeS -> libmkkernel::MkObjectS::signature …
static bool MqRtCheck(MK_MNGN mng)
check MqRuntimeS -> libmkkernel::MkObjectS::signature …
MQ_RT MqRuntimeSetup(MK_RT const mkrt, MQ_RT const mqrt)
initialize MqRuntimeRLS
__thread struct MqRuntimeS MqRuntimeRLS
RLS.
size_t MqRuntimeId
identify the custom runtime
array of MqContextC instances
used for callback function pointer management
MqTokenF fCall
callback method
MqDataCopyF fCopy
copy additional data pointer, used in a MqSetupDup
MkMarkF fMark
garbage-collector marker for data
MK_PTR data
additional data for the callback function
MqDataFreeF fFree
free additional data pointer
end-user configuration data, also available as command-line options
config_t * cfg
add libconfig configuration file …
enum MkNativeIsE native
define if data is string or little or big endian …
MQ_CTX parent
CHILD: a pointer to the parent object or MK_NULL.
MQ_CTX master
SLAVE: a pointer to the master object or MK_NULL.
enum MqStartE startAs
create a new application-context as thread, spawn or fork … A new application-context is created if:
config_setting_t * rootH
libconfig data root
bool dispPrefixLOCK
protect prefix
config_setting_t * filterH
libconfig data root
MK_NUM master_id
SLAVE: the ID in the master SLAVES array or O.
bool storageFileLOCK
protect storage
struct MqIoConfigS io
Global configuration data belonging to "io".
enum MqIdentE identFrom
select how to identify the application from remote …
bool dispNameLOCK
protect name
bool dispPostfixLOCK
protect postfix
PUBLIC data structure for the ccmqmsgque-specific-data
const struct MqConfigS config
the configuration data is used for "end-user" configuration
enum MqStatusIsEF statusIs
how the context was created?
struct MqLinkS link
link object data
MqCtxTypeS - the instance-base for the MqContextC …
MqWaitForPipeF MqWaitForPipeCB
wait for pipe target to finish
bool ignoreSpawn
do not allow the usage of spawn
bool ignoreDisasterSetup
do not setup the disaster-handler at startup.
MqRefCountF fDecrSelf
decrement the libmqmsgque::MqContextS::obj->self reference counting
MqSetupF fParentAfterFork
cleanup a parent fork-process after a new fork-process is created by ccmqmsgque
MqSetupF fThreadInit
setup and initialize a thread before a new thread is created by ccmqmsgque
MqHelpF fHelp
Create a link to the calling tool help function.
MqSetupF fSpawnInit
setup and initialize a spawn-process before a new spawn-process is created by ccmqmsgque
bool ignoreThread
do not allow the usage of threads
MqRefCountF fIncrSelf
increment the libmqmsgque::MqContextS::obj->self reference counting
MkMarkF callbackMF
Mark the callback-data-pointer.
bool argvFix
add first argument in MkBufferListC argument to MqLinkCreate and MqLinkCreateChild
MqExitF MqProcessExitCB
exit/cleanup a process
MqSetupF fChildAfterFork
cleanup a child fork-process after a new fork-process is created by ccmqmsgque
MkMarkF dataMF
Mark the data-pointer.
MqSetupF fParentBeforeFork
setup and initialize a fork-process before a new fork-process is created by ccmqmsgque
bool ignoreFork
do not allow the usage of fork
MqExitF MqThreadExitCB
exit/cleanup a thread
MqDumpC - the class known as dmp or dump is used to export a ccmqmsgque data package as binary …
MqEnvS - the class known as env or environment is used to store the protected environment in an servi...
bool SIdLck
Short-Term-Transaction-Lock -> the "transSId" was already used.
bool LIdLck
Long-Term-Transaction-Lock -> the "transLId" was forwarded.
MQ_LTR transLId
longterm-transaction-id (rowid from readTrans table) used for persistent-transaction
MQ_HDL routeId
TODO: route-id remote or local. (rowid from the Routing-Table) if "0" -> the default route is used)
struct MqEnvS * link
work together with MqEnvProtect and MqEnvRestore
enum MqTransTypeE transType
what kind of transaction is it: W)ait, T)rans, S)ub, C)allback or N)o
enum MqHandShakeE handShake
what kind of call is it: S)tart, O)k or E)rror
MQ_HDL transSId
storage for the shortterm-transaction
MQ_LTR rmtTransLId
remote transaction-id (rowid from the remote readTrans table) if ">0LL" -> the value to use or "OLL"...
Extend the MkErrorS with ccmqmsgque specific features …
interface for the constructor
MqFactoryDataCopyF fCopy
copy additional data pointer
MK_PTR data
additional data pointer for the fCall
MqFactoryCTorF fCall
create a new object
MqFactoryDataFreeF fFree
free additional data pointer
interface for the destructor
MqFactoryDataCopyF fCopy
copy additional data pointer
MK_PTR data
additional data pointer for the fCall
MqFactoryDTorF fCall
delete the object created with libmqmsgque::MqFactoryCTorS
MqFactoryDataFreeF fFree
free additional data pointer
data used to define a factory
bool isDeleted
mark a factory as deleted -> libmqmsgque::MqFactoryGet will ignore this factory
bool factoryCalled
was the factory called?
MK_NUM itemsId
entry-id in global "space.itemsP"
Basic configuration of a context …
MK_I32 buffersize
set the OS specific value for the socket-operation-buffer (default: OS specific)
MK_I32 pkgsize
set maximum package size (default: 10 KiB)
enum MqIoComE com
what kind of socket interface to use?
struct MqIoUdsConfigS uds
set uds configuration-data
MK_TIME_T timeout
user defined timeout to terminate a blocking function call (default: 90 sec)
struct MqIoPipeConfigS pipe
set pipe configuration-data
configure a context to use a init-client-server-link …
Configure a context to use a loop-client-server-link …
configure a context to use a pipe-client-server-link …
MQ_SOCK_HDL hdl
server-result from a socketpair function-call, [0] for the client-socket and [1] for the server-socke...
configure a context to use a tcp-client-server-link …
configure a context to use a uds-client-server-link …
Interface between libmqmsgque::MqContextS and the Operating-System …
MqSysSelectF SysSelect
select syscall …
MqSysServerSpawnF MqSysServerSpawnCB
spawn server create syscall with ccmqmsgque error plugin
MqSysServerForkF MqSysServerForkCB
fork server create syscall with ccmqmsgque error plugin
MqSysServerThreadF MqSysServerThreadCB
thread server create syscall with ccmqmsgque error plugin
object responsible to manage a client/server link data
struct MqEnvS * protectStack
work together with MqEnvProtect and MqEnvRestore
MK_NUM ctxId
the ctxId of this MqContextS object
MK_STRB targetIdent[MqLinkS_targetIdent_size]
struct MqEnvS protect
important part for consistency
struct MqLinkSlaveS slave
link to the SLAVE object
MQ_CTX ctxIdP
the initial (first) context (home of the ctxIdA)
MqContextC - used to create or delete a instance to manage a link …
MqDeleteF fDelete
delete a instance
MqCreateF fCreate
create a new instance
needed to "run-over-all-slaves" → example: MqRouteGetTree
MK_NUM size
size of slaves[]
MK_NUM used
number of slave objects in slaves[]
MQ_CTX context
link to MQ and initialisation-flag
MQ_CTX * slaves
SLAVE: MK_NULL, MASTER a list of pointers of slave objects.
Extend the MkRuntimeS wie ccmqmsgque specific features …
application-programmer configuration data
enum MqFactoryE factoryCall
an object is created by an factory but using a different call-style
bool isServer
change the context to act as server-context (true) or not (false) …
MQ_FCT factory
set the application-identifier …
bool EventIsServer
if libmqmsgque::MqSetupS::Event is a server event
bool ignoreExit
do not delete the server-context on client-server-link shutdown … By default the server-context is de...
data used to initialize a new created thread …
MK_PTR threadData
thread-data to set after new runtime was initialized
MK_RT mkrt
runtime used to intialize the new thread-runtime
bool isUsed
is the object used and initialisation-flag
MkBufferStream16384R argvR
command-line arguments, owned by SysServerThread
MQ_SOCK_HDL socket
"accept" socket for the new thread
MQ_FCT factory
server configuration (memory belongs to caller)
MQ_CTX tmpl
calling (parent) context