X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=imap%2Fimap_private.h;h=5486c21b52511f4f82d65969fb48ed2abfe69391;hp=ed6832fbe6bd764924b2a2eef514c6973304afb1;hb=284454918cc95058b026d057195eaa5279135c36;hpb=df70e07e24add1869bcc9b7af2277d9d0c09a281 diff --git a/imap/imap_private.h b/imap/imap_private.h index ed6832f..5486c21 100644 --- a/imap/imap_private.h +++ b/imap/imap_private.h @@ -1,29 +1,20 @@ /* + * Copyright notice from original mutt: * Copyright (C) 1996-9 Brandon Long * Copyright (C) 1999-2001 Brendan Cully - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * 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, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. + * + * This file is part of mutt-ng, see http://www.muttng.org/. + * It's licensed under the GNU General Public License, + * please see the file GPL in the top level source directory. */ #ifndef _IMAP_PRIVATE_H #define _IMAP_PRIVATE_H 1 -#include +#include +#include #include "imap.h" -#include "mutt_socket.h" /* -- symbols -- */ #define IMAP_PORT 143 @@ -82,20 +73,7 @@ enum { IMAP_NS_SHARED }; -/* ACL Rights */ -enum { - IMAP_ACL_LOOKUP = 0, - IMAP_ACL_READ, - IMAP_ACL_SEEN, - IMAP_ACL_WRITE, - IMAP_ACL_INSERT, - IMAP_ACL_POST, - IMAP_ACL_CREATE, - IMAP_ACL_DELETE, - IMAP_ACL_ADMIN, - - RIGHTSMAX -}; +/* ACL Rights are moved to ../mx.h */ /* Capabilities we are interested in */ enum { @@ -119,7 +97,7 @@ enum { /* -- data structures -- */ typedef struct { - unsigned int uid; + int uid; char *path; } IMAP_CACHE; @@ -171,13 +149,12 @@ typedef struct { unsigned char rights[(RIGHTSMAX + 7) / 8]; unsigned int newMailCount; IMAP_CACHE cache[IMAP_CACHE_LEN]; - int noclose:1; #ifdef USE_HCACHE - uint64_t uid_validity; + unsigned long uid_validity; #endif /* all folder flags - system flags AND keywords */ - LIST *flags; + string_list_t *flags; } IMAP_DATA; /* I wish that were called IMAP_CONTEXT :( */ @@ -196,10 +173,11 @@ int imap_open_connection (IMAP_DATA * idata); IMAP_DATA *imap_conn_find (const ACCOUNT * account, int flags); int imap_parse_list_response (IMAP_DATA * idata, char **name, int *noselect, int *noinferiors, char *delim); -int imap_read_literal (FILE * fp, IMAP_DATA * idata, long bytes); +int imap_read_literal (FILE * fp, IMAP_DATA * idata, long bytes, progress_t*); void imap_expunge_mailbox (IMAP_DATA * idata); int imap_reconnect (CONTEXT * ctx); void imap_logout (IMAP_DATA * idata); +int imap_sync_message (IMAP_DATA*, HEADER*, BUFFER*, int*); /* auth.c */ int imap_authenticate (IMAP_DATA * idata); @@ -212,7 +190,7 @@ int imap_code (const char *s); int imap_exec (IMAP_DATA * idata, const char *cmd, int flags); /* message.c */ -void imap_add_keywords (char *s, HEADER * keywords, LIST * mailbox_flags, +void imap_add_keywords (char *s, HEADER * keywords, string_list_t * mailbox_flags, size_t slen); void imap_free_header_data (void **data); int imap_read_headers (IMAP_DATA * idata, int msgbegin, int msgend); @@ -224,7 +202,7 @@ void imap_error (const char *where, const char *msg); IMAP_DATA *imap_new_idata (void); void imap_free_idata (IMAP_DATA ** idata); char *imap_fix_path (IMAP_DATA * idata, char *mailbox, char *path, - size_t plen); + ssize_t plen); int imap_get_literal_count (const char *buf, long *bytes); char *imap_get_qualifier (char *buf); char *imap_next_word (char *s);