c25356d5978632df6203437e1953bcb29e0c736fTimo Sirainen#ifndef IMAP_STATUS_H
c25356d5978632df6203437e1953bcb29e0c736fTimo Sirainen#define IMAP_STATUS_H
a91a2767511952acb79044b8405f69cfd8f1d15bTimo Sirainen
fbd918f47f591f8084fd52b207ef29515ddd11b9Timo Sirainenstruct imap_status_items {
51327f2489a4e0e615eb9f7d921473cf8512bb79Timo Sirainen enum mailbox_status_items status;
51327f2489a4e0e615eb9f7d921473cf8512bb79Timo Sirainen enum mailbox_metadata_items metadata;
fbd918f47f591f8084fd52b207ef29515ddd11b9Timo Sirainen};
fbd918f47f591f8084fd52b207ef29515ddd11b9Timo Sirainen
fbd918f47f591f8084fd52b207ef29515ddd11b9Timo Sirainenstruct imap_status_result {
fbd918f47f591f8084fd52b207ef29515ddd11b9Timo Sirainen struct mailbox_status status;
51327f2489a4e0e615eb9f7d921473cf8512bb79Timo Sirainen struct mailbox_metadata metadata;
4f5f48fcfacc47329428c82e0bc98d6fdb7b40b4Timo Sirainen enum mail_error error;
4f5f48fcfacc47329428c82e0bc98d6fdb7b40b4Timo Sirainen const char *errstr;
fbd918f47f591f8084fd52b207ef29515ddd11b9Timo Sirainen};
fbd918f47f591f8084fd52b207ef29515ddd11b9Timo Sirainen
a91a2767511952acb79044b8405f69cfd8f1d15bTimo Sirainenint imap_status_parse_items(struct client_command_context *cmd,
a91a2767511952acb79044b8405f69cfd8f1d15bTimo Sirainen const struct imap_arg *args,
fbd918f47f591f8084fd52b207ef29515ddd11b9Timo Sirainen struct imap_status_items *items_r);
dcd4d96ba85264382f2f928f139607db87975f03Timo Sirainenint imap_status_get(struct client_command_context *cmd,
4f5f48fcfacc47329428c82e0bc98d6fdb7b40b4Timo Sirainen struct mail_namespace *ns, const char *mailbox,
4f5f48fcfacc47329428c82e0bc98d6fdb7b40b4Timo Sirainen const struct imap_status_items *items,
4f5f48fcfacc47329428c82e0bc98d6fdb7b40b4Timo Sirainen struct imap_status_result *result_r);
4f5f48fcfacc47329428c82e0bc98d6fdb7b40b4Timo Sirainenint imap_status_send(struct client *client, const char *mailbox_mutf7,
4f5f48fcfacc47329428c82e0bc98d6fdb7b40b4Timo Sirainen const struct imap_status_items *items,
4f5f48fcfacc47329428c82e0bc98d6fdb7b40b4Timo Sirainen const struct imap_status_result *result)
4f5f48fcfacc47329428c82e0bc98d6fdb7b40b4Timo Sirainen ATTR_NOWARN_UNUSED_RESULT;
a91a2767511952acb79044b8405f69cfd8f1d15bTimo Sirainen
a91a2767511952acb79044b8405f69cfd8f1d15bTimo Sirainen#endif