0a09ddca6d44a6df822aa7e4c037a58ed4dbbee8
[claws.git] / src / etpan / nntp-thread.h
1 /*
2  * Claws Mail -- a GTK+ based, lightweight, and fast e-mail client
3  * Copyright (C) 2005-2009 DINH Viet Hoa and the Claws Mail team
4  *
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 3 of the License, or
8  * (at your option) any later version.
9  *
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.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program. If not, see <http://www.gnu.org/licenses/>.
17  * 
18  */
19
20 #ifndef NNTP_THREAD_H
21
22 #define NNTP_THREAD_H
23
24 #include <libetpan/libetpan.h>
25 #include "folder.h"
26
27 void nntp_main_set_timeout(int sec);
28 void nntp_main_init(gboolean skip_ssl_cert_check);
29 void nntp_main_done(gboolean have_connectivity);
30
31 void nntp_init(Folder * folder);
32 void nntp_done(Folder * folder);
33
34 int nntp_threaded_connect(Folder * folder, const char * server, int port);
35 int nntp_threaded_connect_ssl(Folder * folder, const char * server, int port);
36
37 void nntp_threaded_disconnect(Folder * folder);
38
39 void nntp_threaded_cancel(Folder * folder);
40
41 int nntp_threaded_login(Folder * folder, const char * login, const char * password);
42 int nntp_threaded_date(Folder * folder, struct tm *lt);
43 int nntp_threaded_list(Folder * folder, clist **grouplist);
44 int nntp_threaded_post(Folder * folder, char *contents, size_t len);
45 int nntp_threaded_article(Folder * folder, guint32 num, char **contents, size_t *len);
46 int nntp_threaded_group(Folder * folder, const char *group, struct newsnntp_group_info **info);
47 int nntp_threaded_mode_reader(Folder * folder);
48 int nntp_threaded_xover(Folder * folder, guint32 beg, guint32 end, struct newsnntp_xover_resp_item **single_result, clist **multiple_result);
49 int nntp_threaded_xhdr(Folder * folder, const char *header, guint32 beg, guint32 end, clist **hdrlist);
50
51 #endif