ee6df9526e9716b3f1734d85b566e00fc41208bcTimo Sirainen /* This field is internal to auth process and won't be sent to client */
559f278a4c54d9fa7e0f2e96ebceda30562f9009Timo Sirainen /* Changed since last snapshot. Set/cleared automatically. */
ee6df9526e9716b3f1734d85b566e00fc41208bcTimo SirainenARRAY_DEFINE_TYPE(auth_field, struct auth_field);
ee6df9526e9716b3f1734d85b566e00fc41208bcTimo Sirainenstruct auth_fields *auth_fields_init(pool_t pool);
ee6df9526e9716b3f1734d85b566e00fc41208bcTimo Sirainenvoid auth_fields_add(struct auth_fields *fields,
32e0da4449754351bcff1e7c3fd1262fc26d4973Timo Sirainenvoid auth_fields_reset(struct auth_fields *fields);
32e0da4449754351bcff1e7c3fd1262fc26d4973Timo Sirainenvoid auth_fields_remove(struct auth_fields *fields, const char *key);
32e0da4449754351bcff1e7c3fd1262fc26d4973Timo Sirainenconst char *auth_fields_find(struct auth_fields *fields, const char *key);
32e0da4449754351bcff1e7c3fd1262fc26d4973Timo Sirainenbool auth_fields_exists(struct auth_fields *fields, const char *key);
32e0da4449754351bcff1e7c3fd1262fc26d4973Timo Sirainenvoid auth_fields_import(struct auth_fields *fields, const char *str,
6e76be05e480dc717f4d48483029ac1cbd8d237bAki Tuomivoid auth_fields_import_prefixed(struct auth_fields *fields, const char *prefix,
32e0da4449754351bcff1e7c3fd1262fc26d4973Timo Sirainenconst ARRAY_TYPE(auth_field) *auth_fields_export(struct auth_fields *fields);
559f278a4c54d9fa7e0f2e96ebceda30562f9009Timo Sirainen/* Append fields where (flag & flags_mask) == flags_result. */
32e0da4449754351bcff1e7c3fd1262fc26d4973Timo Sirainenvoid auth_fields_append(struct auth_fields *fields, string_t *dest,
32e0da4449754351bcff1e7c3fd1262fc26d4973Timo Sirainenbool auth_fields_is_empty(struct auth_fields *fields);
068ac108503f9b3c81bbdac3b95db545d479188aTimo Sirainen/* If the field exists, clear its value (so the exported string will be "key"
068ac108503f9b3c81bbdac3b95db545d479188aTimo Sirainen instead of e.g. "key=y"). */
068ac108503f9b3c81bbdac3b95db545d479188aTimo Sirainenvoid auth_fields_booleanize(struct auth_fields *fields, const char *key);
559f278a4c54d9fa7e0f2e96ebceda30562f9009Timo Sirainen/* Remember the current fields. */
559f278a4c54d9fa7e0f2e96ebceda30562f9009Timo Sirainenvoid auth_fields_snapshot(struct auth_fields *fields);
559f278a4c54d9fa7e0f2e96ebceda30562f9009Timo Sirainen/* Rollback to previous snapshot, or clear the fields if there isn't any. */