X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=nntp.h;h=09472c53375eb5447ba0294dac9252509c8b49fd;hp=3bc9103d53d3a056920c2fdba73e30e22696bc82;hb=8ab1ab66eb1c4b95f9b2a5ed9c2b2cf1dfa74544;hpb=a30218f8b3d68023d354d75b7c4674ae0c528f28 diff --git a/nntp.h b/nntp.h index 3bc9103..09472c5 100644 --- a/nntp.h +++ b/nntp.h @@ -28,7 +28,7 @@ enum { typedef struct nntp_data_t nntp_data_t; -typedef struct { +typedef struct nntp_server_t { unsigned feat_known : 1; unsigned hasXPAT : 1; unsigned hasXGTITLE : 1; @@ -44,8 +44,9 @@ typedef struct { time_t check_time; hash_t *newsgroups; nntp_data_t *list; /* list of newsgroups */ + nntp_data_t **tail; CONNECTION *conn; -} NNTP_SERVER; +} nntp_server_t; typedef struct { int index; @@ -64,8 +65,7 @@ struct nntp_data_t { int num; /* number of used entries */ int max; /* number of allocated entries */ int unread; - int firstMessage; - int lastMessage; + int first, last; int lastLoaded; int lastCached; unsigned subscribed:1; @@ -76,7 +76,7 @@ struct nntp_data_t { char *group; char *desc; char *cache; - NNTP_SERVER *nserv; + nntp_server_t *nserv; NNTP_CACHE acache[NNTP_CACHE_LEN]; }; @@ -86,26 +86,23 @@ DO_NEW(nntp_data_t, nntp_data); DO_DELETE(nntp_data_t, nntp_data); DO_SLIST(nntp_data_t, nntp_data, nntp_data_delete); -NNTP_SERVER *mutt_select_newsserver (char *); -nntp_data_t *mutt_newsgroup_subscribe (NNTP_SERVER *, char *); -nntp_data_t *mutt_newsgroup_unsubscribe (NNTP_SERVER *, char *); -nntp_data_t *mutt_newsgroup_catchup (NNTP_SERVER *, char *); -nntp_data_t *mutt_newsgroup_uncatchup (NNTP_SERVER *, char *); -void nntp_clear_cacheindex (NNTP_SERVER *); -int mutt_newsrc_update (NNTP_SERVER *); +nntp_server_t *mutt_select_newsserver (char *); +nntp_data_t *mutt_newsgroup_subscribe (nntp_server_t *, char *); +nntp_data_t *mutt_newsgroup_unsubscribe (nntp_server_t *, char *); +nntp_data_t *mutt_newsgroup_catchup (nntp_server_t *, char *); +nntp_data_t *mutt_newsgroup_uncatchup (nntp_server_t *, char *); +int mutt_newsrc_update (nntp_server_t *); int nntp_close_mailbox (CONTEXT *); int nntp_fetch_message (MESSAGE *, CONTEXT *, int); int nntp_post (const char *); int nntp_check_msgid (CONTEXT *, const char *); int nntp_check_children (CONTEXT *, const char *); -int nntp_get_active (NNTP_SERVER *); +int nntp_get_active (nntp_server_t *); void nntp_buffy (char* dst, ssize_t dstlen); void nntp_expand_path (char *, ssize_t, ACCOUNT *); void nntp_logout_all(void); -const char *nntp_format_str(char *, ssize_t, char, const char *, const char *, - const char *, const char *, anytype, format_flag); void nntp_sync_sidebar (nntp_data_t*); -WHERE NNTP_SERVER *CurrentNewsSrv INITVAL (NULL); +WHERE nntp_server_t *CurrentNewsSrv INITVAL (NULL); #endif /* _NNTP_H_ */