2 * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
3 * Copyright (C) 1999,2000 Hiroyuki Yamamoto
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
25 typedef struct _NNTPSockInfo NNTPSockInfo;
37 #define NNTPBUFSIZE 8192
47 NNTPSockInfo *nntp_open(const gchar *server, gushort port, gchar *buf);
48 NNTPSockInfo *nntp_open_auth(const gchar *server, gushort port, gchar *buf,
49 const gchar *userid, const gchar *passwd);
50 void nntp_close(NNTPSockInfo *sock);
51 gint nntp_group(NNTPSockInfo *sock, const gchar *group,
52 gint *num, gint *first, gint *last);
53 gint nntp_get_article(NNTPSockInfo *sock, const gchar *cmd, gint num, gchar **msgid);
54 gint nntp_article(NNTPSockInfo *sock, gint num, gchar **msgid);
55 gint nntp_body(NNTPSockInfo *sock, gint num, gchar **msgid);
56 gint nntp_head(NNTPSockInfo *sock, gint num, gchar **msgid);
57 gint nntp_stat(NNTPSockInfo *sock, gint num, gchar **msgid);
58 gint nntp_next(NNTPSockInfo *sock, gint *num, gchar **msgid);
59 gint nntp_xover(NNTPSockInfo *sock, gint first, gint last);
60 gint nntp_post(NNTPSockInfo *sock, FILE *fp);
61 gint nntp_newgroups(NNTPSockInfo *sock);
62 gint nntp_newnews(NNTPSockInfo *sock);
63 gint nntp_mode(NNTPSockInfo *sock, gboolean stream);
64 gint nntp_ok(NNTPSockInfo *sock, gchar *argbuf);
65 gint nntp_list(NNTPSockInfo *sock);
66 gint nntp_xhdr(NNTPSockInfo *sock, gchar * header, gint first, gint last);
68 #endif /* __NNTP_H__ */