diff options
Diffstat (limited to 'src/lib-storage/list/subscription-file.h')
-rw-r--r-- | src/lib-storage/list/subscription-file.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/lib-storage/list/subscription-file.h b/src/lib-storage/list/subscription-file.h new file mode 100644 index 0000000..fbaa0a3 --- /dev/null +++ b/src/lib-storage/list/subscription-file.h @@ -0,0 +1,25 @@ +#ifndef SUBSCRIPTION_FILE_H +#define SUBSCRIPTION_FILE_H + +struct stat; +struct mailbox_list; + +/* Initialize new subscription file listing. */ +struct subsfile_list_context * +subsfile_list_init(struct mailbox_list *list, const char *path); +/* Deinitialize subscription file listing. Returns 0 if ok, or -1 if some + error occurred while listing. */ +int subsfile_list_deinit(struct subsfile_list_context **ctx); + +/* Call fstat() for subscription file */ +int subsfile_list_fstat(struct subsfile_list_context *ctx, struct stat *st_r); + +/* Returns the next subscribed mailbox, or NULL. */ +const char *subsfile_list_next(struct subsfile_list_context *ctx); + +/* Returns 1 if subscribed, 0 if no changes done, -1 if error. */ +int subsfile_set_subscribed(struct mailbox_list *list, const char *path, + const char *temp_prefix, const char *name, + bool set); + +#endif |