NeoMutt  2021-10-29-43-g6b8931
Teaching an old dog new tricks
DOXYGEN
private.h
Go to the documentation of this file.
1 
23 #ifndef MUTT_NNTP_PRIVATE_H
24 #define MUTT_NNTP_PRIVATE_H
25 
26 #include <stdbool.h>
27 #include <stdint.h>
28 #include "lib.h"
29 
30 struct Email;
31 struct HeaderCache;
32 struct Mailbox;
33 struct NntpAccountData;
34 struct NntpMboxData;
35 
36 #define NNTP_PORT 119
37 #define NNTP_SSL_PORT 563
38 
43 {
44  NNTP_NONE = 0,
47 };
48 
49 void nntp_acache_free (struct NntpMboxData *mdata);
51 int nntp_add_group (char *line, void *data);
52 void nntp_article_status (struct Mailbox *m, struct Email *e, char *group, anum_t anum);
54 int nntp_check_new_groups (struct Mailbox *m, struct NntpAccountData *adata);
57 void nntp_hash_destructor_t (int type, void *obj, intptr_t data);
58 void nntp_hashelem_free (int type, void *obj, intptr_t data);
59 struct HeaderCache * nntp_hcache_open (struct NntpMboxData *mdata);
60 void nntp_hcache_update (struct NntpMboxData *mdata, struct HeaderCache *hc);
61 void nntp_newsrc_gen_entries(struct Mailbox *m);
62 int nntp_open_connection (struct NntpAccountData *adata);
63 
64 #endif /* MUTT_NNTP_PRIVATE_H */
void nntp_hashelem_free(int type, void *obj, intptr_t data)
Free our hash table data - Implements hash_hdata_free_t -.
Definition: nntp.c:117
#define anum_t
Definition: lib.h:60
void nntp_delete_group_cache(struct NntpMboxData *mdata)
Remove hcache and bcache of newsgroup.
Definition: newsrc.c:814
int nntp_check_new_groups(struct Mailbox *m, struct NntpAccountData *adata)
Check for new groups/articles in subscribed groups.
Definition: nntp.c:2032
void nntp_newsrc_gen_entries(struct Mailbox *m)
Generate array of .newsrc entries.
Definition: newsrc.c:297
void nntp_hcache_update(struct NntpMboxData *mdata, struct HeaderCache *hc)
Remove stale cached headers.
Definition: newsrc.c:737
NntpStatus
NNTP server return values.
Definition: private.h:43
@ NNTP_NONE
No connection to server.
Definition: private.h:44
@ NNTP_BYE
Disconnected from server.
Definition: private.h:46
@ NNTP_OK
Connected to server.
Definition: private.h:45
void nntp_article_status(struct Mailbox *m, struct Email *e, char *group, anum_t anum)
Get status of articles from .newsrc.
Definition: newsrc.c:1221
int nntp_add_group(char *line, void *data)
Parse newsgroup.
Definition: newsrc.c:576
void nntp_hash_destructor_t(int type, void *obj, intptr_t data)
int nntp_active_save_cache(struct NntpAccountData *adata)
Save list of all newsgroups to cache.
Definition: newsrc.c:652
void nntp_bcache_update(struct NntpMboxData *mdata)
Remove stale cached messages.
Definition: newsrc.c:805
void nntp_group_unread_stat(struct NntpMboxData *mdata)
Count number of unread articles using .newsrc data.
Definition: newsrc.c:133
int nntp_open_connection(struct NntpAccountData *adata)
Connect to server, authenticate and get capabilities.
Definition: nntp.c:1712
void nntp_acache_free(struct NntpMboxData *mdata)
Remove all temporarily cache files.
Definition: newsrc.c:103
struct HeaderCache * nntp_hcache_open(struct NntpMboxData *mdata)
Open newsgroup hcache.
Definition: newsrc.c:711
Key value store.
The envelope/body of an email.
Definition: email.h:37
Header cache structure.
Definition: lib.h:87
A mailbox.
Definition: mailbox.h:82
enum MailboxType type
Mailbox type.
Definition: mailbox.h:105
void * mdata
Driver specific data.
Definition: mailbox.h:136
NNTP-specific Account data -.
Definition: adata.h:37
NNTP-specific Mailbox data -.
Definition: mdata.h:33
char * group
Name of newsgroup.
Definition: mdata.h:34
struct NntpAccountData * adata
Definition: mdata.h:47