talons

Fork of Claws Mail https://www.claws-mail
Log | Files | Refs | README | LICENSE

msgcache.h (1796B)


      1 /*
      2  * Claws Mail -- a GTK based, lightweight, and fast e-mail client
      3  * Copyright (C) 1999-2012 Hiroyuki Yamamoto & The Claws Mail Team
      4  *
      5  * This program is free software; you can redistribute it and/or modify
      6  * it under the terms of the GNU General Public License as published by
      7  * the Free Software Foundation; either version 3 of the License, or
      8  * (at your option) any later version.
      9  *
     10  * This program is distributed in the hope that it will be useful,
     11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
     12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     13  * GNU General Public License for more details.
     14  *
     15  * You should have received a copy of the GNU General Public License
     16  * along with this program. If not, see <http://www.gnu.org/licenses/>.
     17  *
     18  */
     19 
     20 #ifndef __MSGCACHE_H__
     21 #define __MSGCACHE_H__
     22 
     23 #include <sys/types.h>
     24 
     25 typedef struct _MsgCache MsgCache;
     26 
     27 #include "procmsg.h"
     28 #include "folder.h"
     29 
     30 MsgCache *msgcache_new(void);
     31 void msgcache_destroy(MsgCache *cache);
     32 MsgCache *msgcache_read_cache(FolderItem *item, const char *cache_file);
     33 void msgcache_read_mark(MsgCache *cache, const char *mark_file);
     34 void msgcache_read_tags(MsgCache *cache, const char *tags_file);
     35 int msgcache_write(const char *cache_file, const char *mark_file, const char *tags_file, MsgCache *cache);
     36 void msgcache_add_msg(MsgCache *cache, MsgInfo *msginfo);
     37 void msgcache_remove_msg(MsgCache *cache, unsigned int num);
     38 void msgcache_update_msg(MsgCache *cache, MsgInfo *msginfo);
     39 MsgInfo *msgcache_get_msg(MsgCache *cache, unsigned int num);
     40 MsgInfo *msgcache_get_msg_by_id(MsgCache *cache, const char *msgid);
     41 MsgInfoList	*msgcache_get_msg_list(MsgCache *cache);
     42 time_t msgcache_get_last_access_time(MsgCache *cache);
     43 int msgcache_get_memory_usage(MsgCache *cache);
     44 
     45 #endif