author | zautrix <zautrix> | 2004-07-03 16:33:12 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-07-03 16:33:12 (UTC) |
commit | e3b89230f065c48c84b48c88edb6eb088374c487 (patch) (unidiff) | |
tree | 162ea2ef909a6f82ccfcedf45d80d6c821174912 /kmicromail/libetpan/nntp/newsnntp.h | |
parent | 2dd6ac0b2d24c91d35ce674a6c26351352df2b15 (diff) | |
download | kdepimpi-e3b89230f065c48c84b48c88edb6eb088374c487.zip kdepimpi-e3b89230f065c48c84b48c88edb6eb088374c487.tar.gz kdepimpi-e3b89230f065c48c84b48c88edb6eb088374c487.tar.bz2 |
Initial revision
Diffstat (limited to 'kmicromail/libetpan/nntp/newsnntp.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | kmicromail/libetpan/nntp/newsnntp.h | 188 |
1 files changed, 188 insertions, 0 deletions
diff --git a/kmicromail/libetpan/nntp/newsnntp.h b/kmicromail/libetpan/nntp/newsnntp.h new file mode 100644 index 0000000..13360d0 --- a/dev/null +++ b/kmicromail/libetpan/nntp/newsnntp.h | |||
@@ -0,0 +1,188 @@ | |||
1 | /* | ||
2 | * libEtPan! -- a mail stuff library | ||
3 | * | ||
4 | * Copyright (C) 2001, 2002 - DINH Viet Hoa | ||
5 | * All rights reserved. | ||
6 | * | ||
7 | * Redistribution and use in source and binary forms, with or without | ||
8 | * modification, are permitted provided that the following conditions | ||
9 | * are met: | ||
10 | * 1. Redistributions of source code must retain the above copyright | ||
11 | * notice, this list of conditions and the following disclaimer. | ||
12 | * 2. Redistributions in binary form must reproduce the above copyright | ||
13 | * notice, this list of conditions and the following disclaimer in the | ||
14 | * documentation and/or other materials provided with the distribution. | ||
15 | * 3. Neither the name of the libEtPan! project nor the names of its | ||
16 | * contributors may be used to endorse or promote products derived | ||
17 | * from this software without specific prior written permission. | ||
18 | * | ||
19 | * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND | ||
20 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
21 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
22 | * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE | ||
23 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
24 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
25 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
26 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
27 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
28 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
29 | * SUCH DAMAGE. | ||
30 | */ | ||
31 | |||
32 | /* | ||
33 | * $Id$ | ||
34 | */ | ||
35 | |||
36 | #ifndef NEWSNNTP_H | ||
37 | |||
38 | #define NEWSNNTP_H | ||
39 | |||
40 | #ifdef __cplusplus | ||
41 | extern "C" { | ||
42 | #endif | ||
43 | |||
44 | #include <inttypes.h> | ||
45 | #include <sys/types.h> | ||
46 | #include <time.h> | ||
47 | |||
48 | #include <libetpan/clist.h> | ||
49 | #include <libetpan/mailstream.h> | ||
50 | #include <libetpan/newsnntp_socket.h> | ||
51 | #include <libetpan/newsnntp_ssl.h> | ||
52 | #include <libetpan/newsnntp_types.h> | ||
53 | |||
54 | |||
55 | newsnntp * newsnntp_new(size_t nntp_progr_rate, | ||
56 | progress_function * nntp_progr_fun); | ||
57 | void newsnntp_free(newsnntp * f); | ||
58 | |||
59 | int newsnntp_quit(newsnntp * f); | ||
60 | int newsnntp_connect(newsnntp * f, mailstream * s); | ||
61 | |||
62 | int newsnntp_head(newsnntp * f, uint32_t index, char ** result, | ||
63 | size_t * result_len); | ||
64 | int newsnntp_article(newsnntp * f, uint32_t index, char ** result, | ||
65 | size_t * result_len); | ||
66 | int newsnntp_body(newsnntp * f, uint32_t index, char ** result, | ||
67 | size_t * result_len); | ||
68 | |||
69 | void newsnntp_head_free(char * str); | ||
70 | void newsnntp_article_free(char * str); | ||
71 | void newsnntp_body_free(char * str); | ||
72 | |||
73 | int newsnntp_mode_reader(newsnntp * f); | ||
74 | |||
75 | int newsnntp_date(newsnntp * f, struct tm * tm); | ||
76 | |||
77 | int newsnntp_authinfo_generic(newsnntp * f, const char * authentificator, | ||
78 | const char * arguments); | ||
79 | |||
80 | int newsnntp_authinfo_username(newsnntp * f, const char * username); | ||
81 | int newsnntp_authinfo_password(newsnntp * f, const char * password); | ||
82 | |||
83 | int newsnntp_post(newsnntp * f, const char * message, size_t size); | ||
84 | |||
85 | |||
86 | |||
87 | |||
88 | |||
89 | |||
90 | /******************* requests ******************************/ | ||
91 | |||
92 | int newsnntp_group(newsnntp * f, const char * groupname, | ||
93 | struct newsnntp_group_info ** info); | ||
94 | void newsnntp_group_free(struct newsnntp_group_info * info); | ||
95 | |||
96 | /* | ||
97 | elements are struct newsnntp_group_info * | ||
98 | */ | ||
99 | |||
100 | int newsnntp_list(newsnntp * f, clist ** result); | ||
101 | void newsnntp_list_free(clist * l); | ||
102 | |||
103 | /* | ||
104 | elements are char * | ||
105 | */ | ||
106 | |||
107 | int newsnntp_list_overview_fmt(newsnntp * f, clist ** result); | ||
108 | void newsnntp_list_overview_fmt_free(clist * l); | ||
109 | |||
110 | /* | ||
111 | elements are struct newsnntp_group_info * | ||
112 | */ | ||
113 | |||
114 | int newsnntp_list_active(newsnntp * f, const char * wildcard, clist ** result); | ||
115 | void newsnntp_list_active_free(clist * l); | ||
116 | |||
117 | /* | ||
118 | elements are struct newsnntp_group_time * | ||
119 | */ | ||
120 | |||
121 | int newsnntp_list_active_times(newsnntp * f, clist ** result); | ||
122 | void newsnntp_list_active_times_free(clist * l); | ||
123 | |||
124 | /* | ||
125 | elements are struct newsnntp_distrib_value_meaning * | ||
126 | */ | ||
127 | |||
128 | int newsnntp_list_distribution(newsnntp * f, clist ** result); | ||
129 | void newsnntp_list_distribution_free(clist * l); | ||
130 | |||
131 | /* | ||
132 | elements are struct newsnntp_distrib_default_value * | ||
133 | */ | ||
134 | |||
135 | int newsnntp_list_distrib_pats(newsnntp * f, clist ** result); | ||
136 | void newsnntp_list_distrib_pats_free(clist * l); | ||
137 | |||
138 | /* | ||
139 | elements are struct newsnntp_group_description * | ||
140 | */ | ||
141 | |||
142 | int newsnntp_list_newsgroups(newsnntp * f, const char * pattern, | ||
143 | clist ** result); | ||
144 | void newsnntp_list_newsgroups_free(clist * l); | ||
145 | |||
146 | /* | ||
147 | elements are char * | ||
148 | */ | ||
149 | |||
150 | int newsnntp_list_subscriptions(newsnntp * f, clist ** result); | ||
151 | void newsnntp_list_subscriptions_free(clist * l); | ||
152 | |||
153 | /* | ||
154 | elements are uint32_t * | ||
155 | */ | ||
156 | |||
157 | int newsnntp_listgroup(newsnntp * f, const char * group_name, | ||
158 | clist ** result); | ||
159 | void newsnntp_listgroup_free(clist * l); | ||
160 | |||
161 | /* | ||
162 | elements are struct newsnntp_xhdr_resp_item * | ||
163 | */ | ||
164 | |||
165 | int newsnntp_xhdr_single(newsnntp * f, const char * header, uint32_t article, | ||
166 | clist ** result); | ||
167 | int newsnntp_xhdr_range(newsnntp * f, const char * header, | ||
168 | uint32_t rangeinf, uint32_t rangesup, | ||
169 | clist ** result); | ||
170 | void newsnntp_xhdr_free(clist * l); | ||
171 | |||
172 | /* | ||
173 | elements are struct newsnntp_xover_resp_item * | ||
174 | */ | ||
175 | |||
176 | int newsnntp_xover_single(newsnntp * f, uint32_t article, | ||
177 | struct newsnntp_xover_resp_item ** result); | ||
178 | int newsnntp_xover_range(newsnntp * f, uint32_t rangeinf, uint32_t rangesup, | ||
179 | clist ** result); | ||
180 | void newsnntp_xover_free(clist * l); | ||
181 | void xover_resp_item_free(struct newsnntp_xover_resp_item * n); | ||
182 | void newsnntp_xover_resp_list_free(clist * l); | ||
183 | |||
184 | #ifdef __cplusplus | ||
185 | } | ||
186 | #endif | ||
187 | |||
188 | #endif | ||