1 #ifndef MAIL_CRYPT_PLUGIN_H 2 #define MAIL_CRYPT_PLUGIN_H 3 4 struct mailbox; 5 struct module; 6 7 struct mail_crypt_cache { 8 struct timeout *to; 9 struct mailbox *box; 10 uint32_t uid; 11 12 struct istream *input; 13 }; 14 15 struct mail_crypt_user { 16 union mail_user_module_context module_ctx; 17 18 struct mail_crypt_global_keys global_keys; 19 struct mail_crypt_cache cache; 20 struct mail_crypt_key_cache_entry *key_cache; 21 const char *curve; 22 int save_version; 23 }; 24 25 void mail_crypt_plugin_init(struct module *module); 26 void mail_crypt_plugin_deinit(void); 27 28 #define MAIL_CRYPT_MAIL_CACHE_EXPIRE_MSECS (60*1000) 29 30 struct mail_crypt_user *mail_crypt_get_mail_crypt_user(struct mail_user *user); 31 32 #endif 33