Maildir Header Cache. More...
#include "config.h"
#include <stdbool.h>
#include <string.h>
#include <sys/stat.h>
#include "mutt/lib.h"
#include "config/lib.h"
#include "email/lib.h"
#include "core/lib.h"
#include "hcache/lib.h"
#include "edata.h"
#include "mailbox.h"
Go to the source code of this file.
Functions | |
static const char * | maildir_hcache_key (struct Email *e) |
Get the header cache key for an Email. | |
static size_t | maildir_hcache_keylen (const char *fn) |
Calculate the length of the Maildir path. | |
void | maildir_hcache_close (struct HeaderCache **ptr) |
Close the Header Cache. | |
int | maildir_hcache_delete (struct HeaderCache *hc, struct Email *e) |
Delete an Email from the Header Cache. | |
struct HeaderCache * | maildir_hcache_open (struct Mailbox *m) |
Open the Header Cache. | |
struct Email * | maildir_hcache_read (struct HeaderCache *hc, struct Email *e, const char *fn) |
Read an Email from the Header Cache. | |
int | maildir_hcache_store (struct HeaderCache *hc, struct Email *e) |
Save an Email to the Header Cache. | |
Maildir Header Cache.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.
Definition in file hcache.c.
|
static |
|
static |
Calculate the length of the Maildir path.
fn | File name |
num | Length in bytes |
Definition at line 58 of file hcache.c.
void maildir_hcache_close | ( | struct HeaderCache ** | ptr | ) |
Close the Header Cache.
ptr | Header Cache |
Definition at line 69 of file hcache.c.
int maildir_hcache_delete | ( | struct HeaderCache * | hc, |
struct Email * | e | ||
) |
Delete an Email from the Header Cache.
hc | Header Cache |
e | Email to delete |
0 | Success |
-1 | Error |
Definition at line 81 of file hcache.c.
struct HeaderCache * maildir_hcache_open | ( | struct Mailbox * | m | ) |
Open the Header Cache.
m | Mailbox |
Definition at line 96 of file hcache.c.
struct Email * maildir_hcache_read | ( | struct HeaderCache * | hc, |
struct Email * | e, | ||
const char * | fn | ||
) |
Read an Email from the Header Cache.
[in] | hc | Header Cache |
[in] | e | Email to find |
[in] | fn | Filename |
ptr | Email from Header Cache |
Definition at line 113 of file hcache.c.
int maildir_hcache_store | ( | struct HeaderCache * | hc, |
struct Email * | e | ||
) |
Save an Email to the Header Cache.
hc | Header Cache |
e | Email to save |
0 | Success |
-1 | Error |
Definition at line 155 of file hcache.c.