X-Git-Url: http://git.madism.org/?p=apps%2Fpfixtools.git;a=blobdiff_plain;f=postlicyd%2Fquery.h;h=1443d65e107cbad3b65a6fc14dcec674dd6d8df8;hp=86e41ba1072e85e27e5509056bf8892078c3cf60;hb=e327d3786ba0371eaaff8e6ba0fe3fc39f095ae2;hpb=90966df1a5149c39beed4f6a3c5d6a7699b83024 diff --git a/postlicyd/query.h b/postlicyd/query.h index 86e41ba..1443d65 100644 --- a/postlicyd/query.h +++ b/postlicyd/query.h @@ -39,6 +39,7 @@ #include "mem.h" #include "common.h" +#include "policy_tokens.h" enum smtp_state { SMTP_CONNECT, @@ -102,4 +103,14 @@ typedef struct query_t { __attribute__((nonnull(1,2))) bool query_parse(query_t *query, char *p); +/** Return the value of the field with the given name. + */ +__attribute__((nonnull(1,2))) +const char *query_field_for_name(const query_t *query, const char *name); + +/** Returns the value of the field with the given id. + */ +__attribute__((nonnull)) +const char *query_field_for_id(const query_t *query, postlicyd_token id); + #endif