X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/75dfb67fd068cc291e22f4f813b407812ebd09d2..5e4900a6f10a184153e12266db4d46a695d62b49:/projects/rlm_stg/stgpair.h diff --git a/projects/rlm_stg/stgpair.h b/projects/rlm_stg/stgpair.h index 19b42bc1..e82c6672 100644 --- a/projects/rlm_stg/stgpair.h +++ b/projects/rlm_stg/stgpair.h @@ -1,12 +1,33 @@ #ifndef __STG_STGPAIR_H__ #define __STG_STGPAIR_H__ +#include + #define STGPAIR_KEYLENGTH 64 #define STGPAIR_VALUELENGTH 256 +#ifdef __cplusplus +extern "C" { +#endif + typedef struct STG_PAIR { char key[STGPAIR_KEYLENGTH]; char value[STGPAIR_VALUELENGTH]; } STG_PAIR; +typedef struct STG_RESULT { + STG_PAIR* modify; + STG_PAIR* reply; +} STG_RESULT; + +inline +int emptyPair(const STG_PAIR* pair) +{ + return pair == NULL || pair->key[0] == '\0' || pair->value[0] == '\0'; +} + +#ifdef __cplusplus +} +#endif + #endif