HEX
Server: Apache/2
System: Linux ctr1224126.novalocal 4.9.241-37.el7.x86_64 #1 SMP Mon Nov 2 13:55:04 UTC 2020 x86_64
User: gokitchen (1017)
PHP: 8.0.30
Disabled: exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Upload Files
File: //usr/include/dovecot/maildir-keywords.h
#ifndef MAILDIR_KEYWORDS_H
#define MAILDIR_KEYWORDS_H

#define MAILDIR_KEYWORDS_NAME "dovecot-keywords"

struct maildir_mailbox;
struct maildir_keywords;
struct maildir_keywords_sync_ctx;

struct maildir_keywords *maildir_keywords_init(struct maildir_mailbox *mbox);
void maildir_keywords_deinit(struct maildir_keywords **mk);

/* Initialize a read-only maildir_keywords instance. Mailbox needs to contain
   the dovecot-keywords file, but otherwise it doesn't have to be in maildir
   format. */
struct maildir_keywords *
maildir_keywords_init_readonly(struct mailbox *box);

struct maildir_keywords_sync_ctx *
maildir_keywords_sync_init(struct maildir_keywords *mk,
			   struct mail_index *index);
/* Don't try to add any nonexistent keywords */
struct maildir_keywords_sync_ctx *
maildir_keywords_sync_init_readonly(struct maildir_keywords *mk,
				    struct mail_index *index);
void maildir_keywords_sync_deinit(struct maildir_keywords_sync_ctx **ctx);

/* Returns keyword index. */
unsigned int maildir_keywords_char_idx(struct maildir_keywords_sync_ctx *ctx,
				       char keyword);
/* Returns keyword character for given index, or \0 if keyword couldn't be
   added. */
char maildir_keywords_idx_char(struct maildir_keywords_sync_ctx *ctx,
			       unsigned int idx);

#endif