X-Git-Url: https://code.citadel.org/?p=citadel.git;a=blobdiff_plain;f=webcit%2Fsubst.h;fp=webcit%2Fsubst.h;h=d80c97f5275e63747c1bea721d3b78d231f498c9;hp=bd6f8318d97d1d0202c8a93de535c546a64bb3a6;hb=01dab5c387efaa597377d1264e832474f30a754b;hpb=cbc736c6fd45401b653454914a1b437050600a00 diff --git a/webcit/subst.h b/webcit/subst.h index bd6f8318d..d80c97f52 100644 --- a/webcit/subst.h +++ b/webcit/subst.h @@ -180,7 +180,7 @@ typedef struct _ConditionalStruct { typedef void (*SubTemplFunc)(StrBuf *TemplBuffer, WCTemplputParams *TP); typedef HashList *(*RetrieveHashlistFunc)(StrBuf *Target, WCTemplputParams *TP); typedef void (*HashDestructorFunc) (HashList **KillMe); - +typedef int (*FilterByParamFunc)(const char* key, long len, void *Context, StrBuf *Target, WCTemplputParams *TP); extern WCTemplputParams NoCtx; @@ -362,13 +362,15 @@ long GetTokenDefine(const char *Name, #define IT_NOFLAG 0 #define IT_FLAG_DETECT_GROUPCHANGE (1<<0) -#define RegisterIterator(a, b, c, d, e, f, g, h, i) RegisterITERATOR(a, sizeof(a)-1, b, c, d, e, f, g, h, i) +#define RegisterIterator(a, b, c, d, e, f, g, h, i) RegisterITERATOR(a, sizeof(a)-1, b, c, d, e, f, NULL, g, h, i) +#define RegisterFilteredIterator(a, b, c, d, e, f, g, h, i, j) RegisterITERATOR(a, sizeof(a)-1, b, c, d, e, f, g, h, i, j) void RegisterITERATOR(const char *Name, long len, /* Our identifier */ - int AdditionalParams, /* doe we use more parameters? */ + int AdditionalParams, /* do we use more parameters? */ HashList *StaticList, /* pointer to webcit lifetime hashlists */ RetrieveHashlistFunc GetHash, /* else retrieve the hashlist by calling this function */ SubTemplFunc DoSubTempl, /* call this function on each iteration for svput & friends */ HashDestructorFunc Destructor, /* use this function to shut down the hash; NULL if its a reference */ + FilterByParamFunc Filter, /* use this function if you want to skip items */ CtxType ContextType, /* which context do we provide to the subtemplate? */ CtxType XPectContextType, /* which context do we expct to be called in? */ int Flags);