Main Page | Alphabetical List | Compound List | File List | Compound Members | File Members

mailbox.h

Go to the documentation of this file.
00001 /*
00002  * XetPan: a libEtPan! based Mail User Agent
00003  * Copyright (C) 2002-2003 Melvin Hadasht
00004  *
00005  * This program is free software; you can redistribute it and/or modify
00006  * it under the terms of the GNU General Public License as published by
00007  * the Free Software Foundation; either version 2 of the License, or
00008  * (at your option) any later version.
00009  *
00010  * This program is distributed in the hope that it will be useful,
00011  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013  * GNU General Public License for more details.
00014  *
00015  * You should have received a copy of the GNU General Public License
00016  * along with this program; if not, write to the Free Software
00017  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
00018  */
00019 
00020 #ifndef MAILBOX_H
00021 #define MAILBOX_H
00022 
00023 #include <clist.h>
00024 
00025 #include "folder-types.h"
00026 #include "mailbox-types.h"
00027 #include "server.h"
00028 #include "manager.h"
00029 
00030 typedef void (*XePMailboxListCloneCb)(clist *mailboxes, void *adata);
00031 typedef void (*XePMailboxDisconnectCb)(XePMailbox *mailbox, void *adata);
00032 
00037 struct XePMailbox_s
00038 {
00039   char *id;              
00040   char *name;            
00041   long uid;
00042   XePMailboxType type;   
00043   XePServer *server;
00044 
00045   char *inbox_ref;
00046   char *draft_ref;
00047   char *queue_ref;
00048   char *sent_ref;
00049 
00050   char *command;         
00051   char *cache;           
00052   char *flags;           
00054   int use_multiple_connections; 
00057   int max_connections;          
00061   int subscribed_only;
00062   XePFolder *folder;            
00065   clist *folders;
00066   struct mail_list *ep_mail_list;
00067   struct mail_list *ep_mail_lsub;
00068 };
00069 
00072 clist *
00073 a_Mailbox_list_new(void);
00074 
00079 clist *
00080 a_Mailbox_list_new_copy(clist *mailboxes);
00081 
00085 void
00086 a_Mailbox_list_free(clist *mailboxes);
00087 
00091 void
00092 a_Mailbox_list_free_copy(clist *mailboxes);
00093 
00108 int
00109 a_Mailbox_list_clone(clist *mailboxes_copy,
00110                      XePMailboxListCloneCb user_cb,
00111                      void *user_data);
00112 
00124 XePMailbox *
00125 a_Mailbox_new(const char *id);
00126 
00141 XePMailbox *
00142 a_Mailbox_new_copy(XePMailbox *mailbox);
00143 
00148 void
00149 a_Mailbox_free(XePMailbox *mailbox);
00150 
00155 void
00156 a_Mailbox_free_copy(XePMailbox *mailbox);
00157 
00165 void
00166 a_Mailbox_set_type(XePMailbox *mailbox, XePMailboxType type);
00167 
00175 void
00176 a_Mailbox_set_toplevel(XePMailbox *mailbox, const char *toplevel);
00177 
00178 const char *
00179 a_Mailbox_get_id(XePMailbox *mailbox);
00180 
00181 XePMailbox *
00182 a_Mailbox_get_from_uid(long uid);
00183 
00184 const char *
00185 a_Mailbox_type_as_string(XePMailboxType type);
00186 
00187 XePMailboxType
00188 a_Mailbox_type_from_string(const char *type);
00189 
00195 int
00196 a_Mailbox_is_busy(XePMailbox *mailbox);
00197 
00205 void
00206 a_Mailbox_disconnect_all(XePMailbox *mailbox,
00207                          XePMailboxDisconnectCb user_cb,
00208                          void *user_data);
00215 void
00216 a_Mailbox_disconnect_async(XePMailbox *mailbox,
00217                            XePManagerMsgCb user_cb, 
00218                            void *user_data);
00219 #endif

Generated on Wed Oct 22 15:50:40 2003 for XetPan by doxygen 1.3.2