2 * Copyright notice from original mutt:
3 * Copyright (C) 1998 Brandon Long <blong@fiction.net>
4 * Copyright (C) 1999 Andrej Gritsenko <andrej@lucky.net>
5 * Copyright (C) 2000-2002 Vsevolod Volkov <vvv@mutt.org.ua>
7 * This file is part of mutt-ng, see http://www.muttng.org/.
8 * It's licensed under the GNU General Public License,
9 * please see the file GPL in the top level source directory.
15 #include <lib-sys/mutt_socket.h>
16 #include <lib-mx/mx.h>
18 extern mx_t const nntp_mx;
20 /* number of entries in the hash table */
21 #define NNTP_CACHE_LEN 10
29 typedef struct nntp_data_t nntp_data_t;
31 typedef struct nntp_server_t {
32 unsigned feat_known : 1;
34 unsigned hasXGTITLE : 1;
35 unsigned hasXOVER : 1;
36 unsigned hasLISTGROUP : 1;
43 time_t newgroups_time;
46 nntp_data_t *list; /* list of newsgroups */
62 struct nntp_data_t *next;
64 NEWSRC_ENTRY *entries;
65 int num; /* number of used entries */
66 int max; /* number of allocated entries */
71 unsigned subscribed:1;
80 NNTP_CACHE acache[NNTP_CACHE_LEN];
83 DO_INIT(nntp_data_t, nntp_data);
84 void nntp_data_wipe(nntp_data_t *);
85 DO_NEW(nntp_data_t, nntp_data);
86 DO_DELETE(nntp_data_t, nntp_data);
87 DO_SLIST(nntp_data_t, nntp_data, nntp_data_delete);
89 nntp_server_t *mutt_select_newsserver (char *);
90 nntp_data_t *mutt_newsgroup_subscribe (nntp_server_t *, char *);
91 nntp_data_t *mutt_newsgroup_unsubscribe (nntp_server_t *, char *);
92 nntp_data_t *mutt_newsgroup_catchup (nntp_server_t *, char *);
93 nntp_data_t *mutt_newsgroup_uncatchup (nntp_server_t *, char *);
94 int mutt_newsrc_update (nntp_server_t *);
95 int nntp_close_mailbox (CONTEXT *);
96 int nntp_fetch_message (MESSAGE *, CONTEXT *, int);
97 int nntp_post (const char *);
98 int nntp_check_msgid (CONTEXT *, const char *);
99 int nntp_check_children (CONTEXT *, const char *);
100 int nntp_get_active (nntp_server_t *);
101 void nntp_buffy (char* dst, ssize_t dstlen);
102 void nntp_expand_path (char *, ssize_t, ACCOUNT *);
103 void nntp_logout_all(void);
104 void nntp_sync_sidebar (nntp_data_t*);
106 WHERE nntp_server_t *CurrentNewsSrv INITVAL (NULL);
108 #endif /* _NNTP_H_ */