39 #ifndef MUTT_NNTP_LIB_H 40 #define MUTT_NNTP_LIB_H 45 #include <sys/types.h> 69 #define anum_t uint32_t 133 #define NNTP_ACACHE_LEN 10 173 const char *
nntp_format_str(
char *buf,
size_t buflen,
size_t col,
int cols,
char op,
const char *src,
const char *prec,
const char *if_str,
const char *else_str, intptr_t data,
MuttFormatFlags flags);
176 const char *
group_index_format_str(
char *buf,
size_t buflen,
size_t col,
int cols,
char op,
const char *src,
const char *prec,
const char *if_str,
const char *else_str, intptr_t data,
MuttFormatFlags flags);
Container for lots of config items.
const char * nntp_format_str(char *buf, size_t buflen, size_t col, int cols, char op, const char *src, const char *prec, const char *if_str, const char *else_str, intptr_t data, MuttFormatFlags flags)
Expand the newsrc filename - Implements format_t.
int nntp_complete(char *buf, size_t buflen)
Auto-complete NNTP newsgroups.
void nntp_clear_cache(struct NntpAccountData *adata)
Clear the NNTP cache.
struct NntpAccountData * adata
struct NntpMboxData * mutt_newsgroup_uncatchup(struct Mailbox *m, struct NntpAccountData *adata, char *group)
Uncatchup newsgroup.
An open network connection (socket)
int nntp_check_msgid(struct Mailbox *m, const char *msgid)
Fetch article by Message-ID.
struct NntpMboxData * mutt_newsgroup_subscribe(struct NntpAccountData *adata, char *group)
Subscribe newsgroup.
struct MxOps MxNntpOps
NNTP Mailbox - Implements MxOps.
void nntp_newsrc_close(struct NntpAccountData *adata)
Unlock and close .newsrc file.
NNTP-specific Email data -.
struct HashTable * groups_hash
NNTP-specific Account data -.
int nntp_active_fetch(struct NntpAccountData *adata, bool mark_new)
Fetch list of all newsgroups from server.
An entry in a .newsrc (subscribed newsgroups)
unsigned char C_PostModerated
Config: (nntp) Allow posting to moderated newsgroups.
Convenience wrapper for the core headers.
int nntp_check_children(struct Mailbox *m, const char *msgid)
Fetch children of article with the Message-ID.
struct NntpAccountData * nntp_select_server(struct Mailbox *m, const char *server, bool leave_lock)
Open a connection to an NNTP server.
unsigned char C_CatchupNewsgroup
Config: (nntp) Mark all articles as read when leaving a newsgroup.
struct BodyCache * bcache
int nntp_compare_order(const void *a, const void *b)
Sort to mailbox order - Implements sort_t.
void * adata
Private data (for Mailbox backends)
enum MailboxType nntp_path_probe(const char *path, const struct stat *st)
Is this an NNTP Mailbox? - Implements MxOps::path_probe()
int nntp_post(struct Mailbox *m, const char *msg)
Post article.
int nntp_newsrc_parse(struct NntpAccountData *adata)
Parse .newsrc file.
const char * group_index_format_str(char *buf, size_t buflen, size_t col, int cols, char op, const char *src, const char *prec, const char *if_str, const char *else_str, intptr_t data, MuttFormatFlags flags)
Format a string for the newsgroup menu - Implements format_t.
char * C_NewsgroupsCharset
Config: (nntp) Character set of newsgroups' descriptions.
char * C_GroupIndexFormat
Config: (nntp) printf-like format string for the browser's display of newsgroups. ...
struct NntpMboxData * mutt_newsgroup_unsubscribe(struct NntpAccountData *adata, char *group)
Unsubscribe newsgroup.
bool C_XCommentTo
Config: (nntp) Add 'X-Comment-To' header that contains article author.
Login details for a remote server.
struct NewsrcEntry * newsrc_ent
NNTP-specific Mailbox data -.
Local cache of email bodies.
uint8_t flags
e.g. MB_NORMAL
MailboxType
Supported mailbox formats.
bool C_ShowOnlyUnread
Config: (nntp) Only show subscribed newsgroups with unread articles.
struct NntpAccountData * CurrentNewsSrv
Current NNTP news server.
char * C_NewsServer
Config: (nntp) Url of the news server.
bool config_init_nntp(struct ConfigSet *cs)
Register nntp config variables - Implements module_init_config_t.
int nntp_newsrc_update(struct NntpAccountData *adata)
Update .newsrc file.
unsigned char C_FollowupToPoster
Config: (nntp) Reply to the poster if 'poster' is in the 'Followup-To' header.
struct NntpMboxData * mutt_newsgroup_catchup(struct Mailbox *m, struct NntpAccountData *adata, char *group)
Catchup newsgroup.
void nntp_expand_path(char *buf, size_t buflen, struct ConnAccount *acct)
Make fully qualified url from newsgroup name.
void nntp_mailbox(struct Mailbox *m, char *buf, size_t buflen)
Get first newsgroup with new messages.